gcc/java:
[official-gcc.git] / gcc / java / ChangeLog
blobf9ef73fb28e414e191ffa1071cea66139ac05878
1 2007-02-15  David Daney  <ddaney@avtrex.com>
3         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
4         (java.maintainer-clean):Add gc-analyze.1.
5         (.INTERMEDIATE): Add gc-analyze.pod.
6         (gc-analyze.pod): New rule.
7         (java.install-man): Install gc-analyze.1
8         * gcj.texi: Add new section for the gc-analyze program.
10 2007-02-07  Andrew Haley  <aph@redhat.com>
12         * class.c (uncache_this_class_ref): New.
13         * expr.c (build_jni_stub): Initialize the class.
14         (expand_byte_code): Call uncache_this_class_ref after generating
15         code.
17 2007-02-06  Tom Tromey  <tromey@redhat.com>
19         PR java/30714:
20         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
22 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
24         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
26 2007-02-02  Andrew Haley  <aph@redhat.com>
28         * expr.c (expand_byte_code): Call cache_this_class_ref() and
29         cache_cpool_data_ref().
30         Set TYPE_CPOOL_DATA_REF.
31         (cache_cpool_data_ref): New function.
32         * constants.c (build_ref_from_constant_pool): Remove special-case
33         code for flag_indirect_classes.
34         (build_constant_data_ref): Move special-case code for
35         flag_indirect_classes here from build_ref_from_constant_pool.
36         * decl.c (finish_method): Move class initialization from here to
37         cache_this_class_ref.
38         * class.c (cache_this_class_ref): New function.
39         (build_class_ref): Use this_classdollar for the ouput class.
41 2007-02-02  David Daney  <ddaney@avtrex.com>
43         * class.c (is_compiled_class): Move check to avoid reloading
44         current class.
45         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
46         already set.
48 2007-02-01  Andrew Haley  <aph@redhat.com>
50         PR java/30641
51         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
53 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
55         * class.c, jcf-parse.c: Fix comment typos.
57 2007-01-30  Tom Tromey  <tromey@redhat.com>
59         * gcj.texi (Strings): Fix documentation for JvNewString.
61 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
63         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
64         typos.
66 2007-01-30  Ben Elliston  <bje@au.ibm.com>
68         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
70 2007-01-29  Tom Tromey  <tromey@redhat.com>
72         PR java/30607:
73         * jvspec.c (lang_specific_driver): Handle separate -I argument.
74         * lang.opt (-I): Add 'Separate'.
76 2007-01-29  Andrew Haley  <aph@redhat.com>
78         * class.c (add_method_1): Mark fndecl as external unless we are
79         compiling it into this object file.
81 2007-01-24  Andrew Haley  <aph@redhat.com>
83         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
84         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
86 2007-01-22  Andrew Haley  <aph@redhat.com>
88         * builtins.c (VMSupportsCS8_builtin): New function.
90 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
92         PR java/30454
93         * jcf-io.c (opendir_in_zip): Close the file
94         and free zipf before returning after an error.
96 2007-01-16  Tom Tromey  <tromey@redhat.com>
98         * java-tree.def: Added copyright header.
100 2007-01-15  Tom Tromey  <tromey@redhat.com>
102         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
103         case.
104         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
105         Removed case.
106         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
107         (EXPR_WFL_NODE): Likewise.
108         (EXPR_WFL_LINECOL): Likewise.
109         (EXPR_WFL_FILENAME): Likewise.
110         (EXPR_WFL_LINENO): Likewise.
111         (build_expr_wfl, expr_add_location): Don't declare.
112         (build_unknown_wfl): Removed.
113         (EXPR_WFL_FILENAME_NODE): Removed.
114         (EXPR_WFL_COLNO): Removed.
115         (EXPR_WFL_SET_LINECOL): Removed.
116         (DECL_FUNCTION_WFL): Removed.
117         (DECL_FIELD_FINAL_WFL): Removed.
118         (struct lang_decl_func) <wfl>: Removed field.
119         <called_constructor>: Likewise.
120         <inner_access>: Likewise.
121         (struct lang_decl_var) <wfl>: Removed field.
122         (DECL_CONSTRUCTOR_CALLS): Removed.
123         (DECL_FUNCTION_ACCESS_DECL): Likewise.
124         (DECL_FUNCTION_INNER_ACCESS): Likewise.
125         (DECL_SPECIFIC_COUNT): Likewise.
126         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
127         * expr.c (build_expr_wfl): Removed.
128         (expr_add_location): Likewise.
130 2007-01-12  Tom Tromey  <tromey@redhat.com>
132         * jcf-dump.c (main): Updated call to find_class.
133         * lang.c (java_init): Removed dead code.
134         * jcf-parse.c (read_class): Don't use java_source field.  Removed
135         dead code.
136         (parse_zip_file_entries): Don't use java_source field.
137         (process_zip_dir): Likewise.
138         (jcf_parse): Removed dead code.
139         (java_parse_file): Likewise.
140         (read_class): Updated call to find_class.
141         * jcf-io.c (find_class): Don't use java_source field.  Removed
142         'source_ok' argument, .java logic.
143         * jcf.h (JCF) <java_source>: Removed field.
144         (JCF_ZERO): Updated.    (find_class): Updated.
145         * decl.c: Removed dead code.
146         * class.c: Removed dead code.
148 2007-01-11  Tom Tromey  <tromey@redhat.com>
150         * typeck.c (convert): Don't use flag_emit_class_files.
151         * lang.c (java_post_options): Don't use flag_emit_class_files.
152         (java_handle_option): Don't use flag_extraneous_semicolon or
153         flag_redundant.
154         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
155         flag_emit_class_files.
156         (load_class): Likewise.
157         * java-tree.h (flag_emit_class_files): Don't declare.
158         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
159         (flag_extraneous_semicolon): Don't declare.
160         (flag_not_overriding): Likewise.
161         (flag_static_local_jdk1_1): Likewise.
162         (flag_redundant): Likewise.
163         * expr.c (build_newarray): Don't use flag_emit_class_files.
164         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
165         flag_emit_class_files.
166         (build_class_ref): Likewise.
167         * builtins.c (check_for_builtin): Don't use
168         flag_emit_class_files.
170 2007-01-10  Tom Tromey  <tromey@redhat.com>
172         * lang.c (java_can_use_bit_fields_p): Removed.
173         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
175 2007-01-09  Andrew Haley  <aph@redhat.com>
177         * expr.c (build_java_arrayaccess): Rewrite to generate array
178         access in canonical form.
179         (expand_java_arraystore): Use build_fold_addr_expr() on address of
180         array access.
182 2007-01-03  Andrew Haley  <aph@redhat.com>
184         PR java/28754
185         * expr.c (expand_java_field_op): If we're initializing a field's
186         declaring interface we should not also initialize the class
187         context in which it was referenced.
189 2007-01-02  Tom Tromey  <tromey@redhat.com>
191         * java-tree.h (compiling_from_source, current_encoding,
192         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
193         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
194         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
195         JTI_WFL_OPERATOR): Removed
196         (finit_identifier_node, instinit_identifier_node,
197         length_identifier_node, super_identifier_node,
198         continue_identifier_node, access0_identifier_node, wfl_operator):
199         Removed.
200         (cyclic_inheritance_report,
201         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
202         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
203         DECL_FIXED_CONSTRUCTOR_P): Removed.
204         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
205         Removed.
206         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
207         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
208         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
209         import_list, import_demand_list>: Removed.
210         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
211         cxx_keyword_p): Removed.
212         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
213         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
214         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
215         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
216         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
217         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
218         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
219         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
220         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
221         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
222         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
223         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
224         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
225         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
226         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
227         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
228         java_parse_abort_on_error, extract_field_decl): Removed.
229         (finput): Declare.
230         * lang.c: (compiling_from_source, current_encoding): Removed.
231         (java_handle_option): Ignore -fencoding.
232         * parse.h: Don't include lex.h.
233         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
234         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
235         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
236         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
237         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
238         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
239         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
240         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
241         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
242         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
243         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
244         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
245         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
246         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
247         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
248         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
249         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
250         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
251         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
252         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
253         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
254         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
255         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
256         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
257         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
258         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
259         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
260         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
261         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
262         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
263         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
264         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
265         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
266         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
267         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
268         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
269         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
270         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
271         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
272         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
273         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
274         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
275         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
276         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
277         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
278         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
279         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
280         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
281         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
282         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
283         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
284         SET_CPC_STATIC_INITIALIZER_STMT,
285         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
286         java_complete_class, java_check_circular_reference,
287         java_fix_constructors, java_layout_classes, java_reorder_fields,
288         java_method_add_stmt, java_get_line_col, reset_report,
289         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
290         java_finish_classes, ctxp, ctxp_for_generation,
291         ctxp_for_generation_last): Removed.
292         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
293         * mangle.c (utf8_cmp): New function.
294         (cxx_keywords): New global.
295         (cxx_keyword_p): New function.
296         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
297         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
298         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
299         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
300         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
301         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
302         * Make-lang.in (java.srcextra): Do nothing.
303         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
304         (JAVA_OBJS): Don't mention deleted files.
305         (java.mostlyclean): Likewise.
306         (java.clean): Likewise.
307         (JAVA_LEX_C): Removed.
308         (buffer.o, check-init.o, parse.o): Remove unused targets.
309         (typeck.o): Updated.
310         * jcf-parse.c (read_class): Comment out unused code.
311         (java_layout_seen_class_methods): New function.
312         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
313         Removed.
314         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
315         (init_jcf_parse): Removed.
316         * config-lang.in (gtfiles): Remove deleted files.
317         * decl.c (java_init_decl_processing): Don't initialize
318         finit_identifier_node, instinit_identifier_node,
319         length_identifier_node, super_identifier_node,
320         continue_identifier_node, access0_identifier_node.  Don't call
321         init_jcf_parse.
322         * class.c (cyclic_inheritance_report): New global.
323         (add_method_1): Don't use
324         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
325         (maybe_layout_super_class): Comment out code.
326         (safe_layout_class): New function.
327         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
328         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
329         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
330         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
331         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
332         (java_gimplify_case_expr): Removed.
333         (java_gimplify_default_expr): Likewise.
334         (java_gimplify_new_array_init): Likewise.
335         * parse.y: Removed.
336         * keyword.gperf, keyword.h: Removed.
337         * chartables.h: Removed.
338         * check-init.c: Removed.
339         * buffer.c, buffer.h: Removed.
340         * convert.h: Removed.
341         * gen-table.pl: Removed.
342         * lex.c, lex.h: Removed.
344 2007-01-02  Andrew Haley  <aph@redhat.com>
346         * expr.c (expand_java_arraystore): Make sure we perform a bounds
347         check at runtime before we perform a type check.
349 2006-12-19  Andrew Haley  <aph@redhat.com>
351         * decl.c: Bump minor BC ABI version.
353 2006-12-13  Gary Benson  <gbenson@redhat.com>
355         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
357 2006-12-12  Tom Tromey  <tromey@redhat.com>
359         * lang-specs.h: Pass -M options to jc1.
360         * jcf-depend.c (jcf_dependency_add_file): Don't emit
361         dependencies.
363 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
365         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
367 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
369         * lang-specs.h: Pass '%U'-based options as separate arguments.
371 2006-12-05  Tom Tromey  <tromey@redhat.com>
373         PR java/29495:
374         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
375         classes as well.
376         * class.c (add_field): Handle ACC_SYNTHETIC.
377         (add_method_1): Likewise.  Handle bridge and varargs.
378         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
379         annotation.
380         (set_class_decl_access_flags): Handle synthetic and annotation.
381         * java-tree.h (METHOD_BRIDGE): New macro.
382         (METHOD_VARARGS): Likewise.
383         (TYPE_SYNTHETIC): Likewise.
384         (TYPE_ANNOTATION): Likewise.
385         (lang_type): New fields 'synthetic' and 'annotation'.
386         (lang_decl_func): New fields 'varargs' and 'bridge'.
388 2006-12-04  Andrew Haley  <aph@redhat.com>
390         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
391         there's no map.
393 2006-11-29  Gary Benson  <gbenson@redhat.com>
395         * expr.c (rewrite_arglist_getcaller): Reorder.
397 2006-11-29  Andrew Haley  <aph@redhat.com>
399         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
400         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
402 2006-11-23  Andrew Haley  <aph@redhat.com>
404         * expr.c (rewrite_arglist_getcaller): New.
405         (rewrite_arglist_getclass): Fix indentation.
406         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
407         gnu.classpath.VMStackWalker.getCallingClassLoader().
408         * builtins.c (initialize_builtins): Remove duplicate def'n of
409         __sync_synchronize.
410         Add __builtin_return_address.
412 2006-11-22  Andrew Haley  <aph@redhat.com>
414         * jcf-reader.c (get_attribute): Mark attr_type unused.
416         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
418 2007-01-08  Richard Guenther  <rguenther@suse.de>
420         * lex.c (do_java_lex): Use build_int_cst_wide_type.
421         * jcf-parse.c (get_constant): Likewise.
423 2006-11-12  Jan Hubicka  <jh@suse.cz>
425         * resource.c (compile_resource_data): Update for new varpool names.
426         * java/class.c (build_utf8_ref): Likewise.
428 2006-11-12  David Daney  <ddaney@avtrex.com>
430         PR java/29805
431         * typeck.c (build_java_array_type): Increase buffer sizes.
433 2006-11-11  Richard Guenther  <rguenther@suse.de>
435         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
436         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
438 2006-11-06  Andrew Haley  <aph@redhat.com>
440         * java-tree.h (CONSTANT_LazyFlag): New.
441         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
442         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
443         reflection_data.
444         (handle_constant): Return 0 for dummy cpool entries.
445         Handle constants of kind Class.
446         Handle constants of kind NameAndType.
447         (handle_enclosingmethod_attribute): New.
448         (handle_signature_attribute): New.
449         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
450         (HANDLE_SIGNATURE_ATTRIBUTE): New.
451         (handle_constant): Use unmangle_classname()rather than calling
452         identifier_subst() directly.
454 2006-11-02  Andrew Haley  <aph@redhat.com>
456         * java-tree.h (FIELD_ENUM): New.
457         (lang_decl_var.field_enum): New.
458         (lang_type.enum_class): New.
459         (CLASS_ENUM): New.
460         * class.c (set_class_decl_access_flags): Handle enum types.
461         (add_field): Handle enum fields.
462         (get_access_flags_from_decl): Likewise.
464         * class.c (make_class_data): Put reflection_data into rodata.
466 2006-11-01  Andrew Haley  <aph@redhat.com>
468         * jcf-parse.c (field_offsets, bit_obstack): New variables.
469         (jcf_parse): Write end marker to annotation_data.
470         (java_parse_file): Create field_offsets bitmap.  Destroy it.
471         (annotation_grow, annotation_rewrite_byte) 
472         (annotation_rewrite_short, annotation_rewrite_int) 
473         (annotation_read_short, annotation_write_byte) 
474         (annotation_write_short, annotation_write_int) 
475         (handle_long_constant, handle_constant, handle_element_value) 
476         (handle_annotation, handle_annotations) 
477         (handle_annotation_attribute, rewrite_reflection_indexes) 
478         (handle_member_annotations, handle_parameter_annotations) 
479         (handle_default_annotation): New functions.
480         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
481         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
482         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
483         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
484         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
485         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
486         (TYPE_REFLECTION_DATA): New.
487         (TYPE_REFLECTION_DATASIZE): New.
488         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
489         an enum.
490         * jcf-reader.c (get_attribute): Pass field/method index and
491         attribute type to get_attribute().
492         * constants.c (find_class_or_string_constant): Make nonstatic.
493         (cpool_for_class): Likewise.
494         (build_constants_constructor): Separate string and scalar types.
495         * class.c (make_class_data): Generate field_indexes permutation.
496         Pass it to rewrite_reflection_indexes().
497         (make_class_data): Generate constructor for reflection_data field.
499 2006-10-20  Tom Tromey  <tromey@redhat.com>
501         * gcj.texi (Top): Don't mention jv-scan.
502         (Invoking gcj): Likewise.
503         (Invoking gcjh): Likewise.
504         (Invoking gjnih): Likewise.
505         (Invoking gij): Likewise.
506         (Invoking gcj-dbtool): Likewise.
507         (Invoking jv-scan): Removed.
508         * parse-scan.y: Removed.
509         * jv-scan.c: Removed.
510         * config-lang.in (stagestuff): Don't mention jv-scan.
511         * Make-lang.in (java): Removed jv-scan.
512         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
513         (JVSCAN_OBJS): Removed.
514         (jv-scan$(exeext)): Likewise.
515         (JAVA_MANFILES): Removed jv-scan.1.
516         (java.uninstall): Don't mention jv-scan.
517         (java.mostlyclean): Likewise.
518         (java.maintainer-clean): Likewise.
519         (.INTERMEDIATE): Likewise.
520         (java/jv-scan.o): Removed.
521         (jv-scan.pod): Likewise.
522         (java.srcextra): Don't mention parse-scan.c.
523         (java.mostlyclean): Likewise.
524         (java/parse-scan.c): Removed.
525         (java/parse-scan.o-warn): Removed.
526         (java/parse-scan.o): Removed.
528 2006-10-20  Tom Tromey  <tromey@redhat.com>
530         * lang.c (java_handle_option): Don't use
531         jcf_write_base_directory.
532         * jcf.h (jcf_write_base_directory): Removed.
533         * parse.y (java_expand_classes): Don't call write_classfile.
534         * config-lang.in (gtfiles): Removed jcf-write.c.
535         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
536         (java/jcf-write.o): Removed.
537         * jcf-parse.c (parse_class_file): Don't call write_classfile.
538         * java-tree.h (write_classfile): Removed declaration.
539         * jcf-write.c: Removed.
541 2006-10-20  Tom Tromey  <tromey@redhat.com>
543         * Make-lang.in (java): Removed gjnih, gcjh.
544         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
545         (GCJH_OBJS): Removed.
546         (GJNIH_OBJS): Likewise.
547         (gjnih$(exeext)): Likewise.
548         (gcjh$(exeext)): Likewise.
549         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
550         (java.install-common): Don't special case gcjh.
551         (java.uninstall): Don't mention gcjh, gjnih.
552         (java.mostlyclean): Likewise.
553         (java.maintainer-clean): Likewise.
554         (.INTERMEDIATE): Likewise.
555         (gcjh.pod): Removed.
556         (gjnih.pod): Likewise.
557         (GCJH_TARGET_INSTALL_NAME): Removed.
558         (java/gjavah-jni.o): Removed.
559         (java/gjavah.o): Likewise.
560         * config-lang.in (stagestuff): Removed gjnih, gcjh.
561         * gjavah.c: Removed.
563 2006-10-17  Tom Tromey  <tromey@redhat.com>
565         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
566         "string" case.
568 2006-10-17  Tom Tromey  <tromey@redhat.com>
570         * jvgenmain.c (main): Handle -findirect-dispatch.
571         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
572         jvgenmain.
574 2006-10-06  Andrew Haley  <aph@redhat.com>
576         * builtins.c (compareAndSwapInt_builtin): Check that we really do
577         have a compare_and_swap builtin.
578         (compareAndSwapLong_builtin): Likewise.
579         (compareAndSwapObject_builtin): Likewise.
581 2006-10-04  Andrew Haley  <aph@redhat.com>
583         * builtins.c (java_builtins): Add compareAndSwapInt,
584         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
585         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
586         putObjectVolatile, getObjectVolatile, getIntVolatile,
587         getLongVolatile, getLong.
588         (UNMARSHAL3): New macro.
589         (UNMARSHAL4): Likewise.
590         (UNMARSHAL5): Likewise.
591         (build_arglist_for_builtin): New function.
592         (build_addr_sum, build_check_this): New functions.
593         (putObject_builtin. compareAndSwapInt_builtin,
594         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
595         putVolatile_builtin, getVolatile_builtin): New builtins.
597 2006-06-08  Andrew Haley  <aph@redhat.com>
599         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
600         get_symbol_table_index().
601         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
602         private method.
603         (build_known_method_ref): New arg: special.  Pass it to
604         get_symbol_table_index.
605         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
606         the method list.
607         (build_invokevirtual): New arg: special.  Pass it to
608         get_symbol_table_index.
609         (expand_invoke): New variable: special.
610         Pass it to maybe_rewrite_invocation().
611         Pass it to build_known_method_ref().
612         * class.c (build_symbol_entry): Add new arg: special.  Use it to
613         build the symbol table conbstructor.
614         (emit_symbol_table): Extract SPECIAL from the method list and pass
615         it to build_symbol_entry().
616         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
617         special accordingly.
619 2006-09-08  Andrew Haley  <aph@redhat.com>
621         * class.c (layout_class_method): Use build_java_signature, not
622         build_java_argument_signature.  Use lookup_java_method, not
623         lookup_argument_method.
625 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
626             Bryce McKinlay  <bryce@mckinlay.net.nz>
628         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
630 2006-07-18  Tom Tromey  <tromey@redhat.com>
632         * lang.opt: Added missing -W options.
634 2006-07-12  Tom Tromey  <tromey@redhat.com>
636         PR java/28329:
637         * lang-specs.h: Pass '%U'-based options as separate arguments.
638         Use -faux-classpath.
639         * lang.c (java_handle_option): Handle OPT_faux_classpath.
640         * lang.opt (faux-classpath): New option.
642 2006-07-07  Tom Tromey  <tromey@redhat.com>
644         * class.c (make_class_data): Set value for reflection_data field.
645         * decl.c (java_init_decl_processing): Add reflection_data field.
647 2006-07-07  Tom Tromey  <tromey@redhat.com>
649         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
650         earlier.
651         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
653 2006-07-07  Andrew Haley  <aph@redhat.com>
655         * jcf-parse.c (set_source_filename): Don't check for
656         CLASS_FROM_CURRENTLY_COMPILED_P.
657         Remove // comments.
659 2006-07-07  Andrew Haley  <aph@redhat.com>
661         * java-tree.h (java_read_sourcefilenames): Declare.
662         * lang.c (java_handle_option): Call java_read_sourcefilenames().
663         * lang.opt (fsource-filename): New opt.
664         * lang-specs.h: Add -fsource-filename.
665         * jcf-parse.c (num_files, filenames): New variables.
666         (reverse, cmpstringp, java_read_sourcefilenames,
667         find_sourcefile): New.
668         (set_source_filename): Call find_sourcefile to find the real name
669         of a source file.
671 2006-06-27  Tom Tromey  <tromey@redhat.com>
673         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
674         Signature, LocalVariableTypeTable, annotation attributes.
675         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
676         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
677         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
678         (HANDLE_METHOD): Likewise.
679         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
680         (print_annotation): New function.
681         (print_element_value): Likewise.
682         (indent): Likewise.
683         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
684         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
685         (print_parameter_annotations): New function.
686         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
687         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
688         Likewise.
689         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
690         (print_annotations): New function.
692 2006-06-23  Tom Tromey  <tromey@redhat.com>
694         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
695         emitting class files, always use 1.5.
696         * gcj.texi (Input Options): Document -fsource.
697         (Code Generation): Document -ftarget.
699 2006-06-21  Tom Tromey  <tromey@redhat.com>
701         PR java/28089:
702         * expr.c (expand_java_field_op): Initialize field's declaring
703         class.
705 2006-06-20  Tom Tromey  <tromey@redhat.com>
707         * expr.c (push_value): Always flush quick stack.
709 2006-06-19  Tom Tromey  <tromey@redhat.com>
711         * expr.c (push_value): Also flush quick stack if value is a
712         component_ref.
714 2006-06-19  Tom Tromey  <tromey@redhat.com>
716         * expr.c (push_value): Flush quick stack if value has side
717         effects.
719 2006-06-13  Tom Tromey  <tromey@redhat.com>
721         * class.c (is_compiled_class): Explicitly check for current
722         class.
724 2006-06-09  Tom Tromey  <tromey@redhat.com>
726         * gjavah.c (decompile_method): Don't decompile a static field
727         accessor method.
729 2006-06-06  Tom Tromey  <tromey@redhat.com>
731         * lang-specs.h <jc1>: Add .jar file to command line if
732         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
734 2006-06-05  Tom Tromey  <tromey@redhat.com>
736         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
737         synthetic, enum, annotation.
738         * jcf.h (ACC_BRIDGE): New macro.
739         (ACC_VARARGS): Likewise.
740         (ACC_SYNTHETIC): Likewise.
741         (ACC_ENUM): Likewise.
742         (ACC_ANNOTATION): Likewise.
744 2006-06-04  Tom Tromey  <tromey@redhat.com>
746         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
747         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
748         and -ftarget.
749         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
750         when needed.  Handle classpath-setting.
751         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
752         * lang-specs.h: Rewrote.
754 2006-06-04  Tom Tromey  <tromey@redhat.com>
756         * jcf-io.c (find_class): Set source_ok to 0.
757         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
758         (parse_class_file): Don't call java_mark_class_local.
759         (java_parse_file): Skip .java files.  Call java_mark_class_local
760         before lowering any code.
761         (parse_zip_file_entries): Don't call duplicate_class_warning
762         here.
763         (process_zip_dir): ... call it here.
764         * class.c (add_field): Don't mark field external if it is being
765         compiled into this object.
766         (make_class_data): Handle situation where class_dtable_decl is
767         created before Class is compiled.
768         (is_compiled_class): Don't assume files in zip are compiled into
769         this object.
770         (layout_class_method): Don't mark method external if it is being
771         compiled into this object.
773 2006-06-04  Tom Tromey  <tromey@redhat.com>
775         * jcf-path.c (jcf_path_compute): New function.
776         * jcf.h (jcf_path_compute): Declare.
778 2006-10-23 Rafael Avila de Espindola  <rafael.espindola@gmail.com>
780         * decl.c: Include langhooks.h.
781         (builtin_function): Remove.
782         (java_init_decl_processing): Replace calls to builtin_function
783         with add_builtin_function.
784         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
785         (java/decl.o): Depend on langhooks.h.
786         * java-tree.h (builtin_function): Remove.
788 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
790         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
792 2006-09-12  Tom Tromey  <tromey@redhat.com>
794         * expr.c (push_value): Always flush quick stack.
796 2006-09-12  Tom Tromey  <tromey@redhat.com>
798         PR java/29013:
799         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
800         the push of the called method's return result.
802 2006-09-12  Tom Tromey  <tromey@redhat.com>
804         * jvspec.c (lang_specific_driver): Read spec file even if
805         -fsyntax-only.
807 2006-09-12  Tom Tromey  <tromey@redhat.com>
809         PR java/28754:
810         * expr.c (expand_java_field_op): Initialize field's declaring
811         interface if necessary.
813 2006-09-12  Tom Tromey  <tromey@redhat.com>
815         PR java/28892:
816         * expr.c (expand_java_field_op): No error for assignments not in
817         class initializer or constructor.
819 2006-08-22  Andrew Haley  <aph@redhat.com>
821         * decl.c (java_add_stmt): Give the statement list a type.
823 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
824             Bryce McKinlay  <bryce@mckinlay.net.nz>
826         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
828 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
830         PR java/8923
831         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
832         or '--' is used with a constant operand.
833         (java_complete_lhs): When processing a '++' or '--' expression,
834         don't call java_complete_tree but java_complete_lhs, so that a
835         static final variable operand is never replaced by its value. This
836         avoids an ICE later on.
837         (patch_unaryop): Fixed typo in comment.
839 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
841         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
843 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
845         * builtins.c (check_for_builtin): If a builtin could result in a
846         direct call being generated, don't use it if flag_indirect_dispatch
847         is set.
849 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
851         * gcj.texi (Invocation): Corrections for Invocation API example.
853 2006-07-04  Andrew Haley  <aph@redhat.com>
855         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
856         entry.
858 2006-06-21  Andrew Haley  <aph@redhat.com>
860         * java-tree.h (update_aliases): Remove
861         * expr.c (expand_iinc): Remove call to update_aliases().
862         (STORE_INTERNAL): Likewise.
863         * decl.c (update_aliases, initialize_local_variable) 
864         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
866 2006-06-19  Andrew Haley  <aph@redhat.com>
868         PR java/1305
869         PR java/27908
870         * expr.c (java_modify_addr_for_volatile): New function.
871         (expand_java_field_op): Handle volatile fields.
872         * java-gimplify.c (java_gimplify_component_ref): Call
873         java_modify_addr_for_volatile to give the field_ref the correct
874         volatile type.
875         (java_gimplify_modify_expr): Likewise.
876         * java-tree.h (java_modify_addr_for_volatile): New decl.
878 2006-06-17  Karl Berry  <karl@gnu.org>
880         * gcj.texi (@dircategory): Use "Software development" instead
881         of "Programming", following the Free Software Directory.
883 2006-06-16  Andrew Haley  <aph@redhat.com>
885         * class.c (make_class_data): When using flag_indirect_classes,
886         don't initialize the vtable of Class instances.
888 2006-06-09  Andrew Haley  <aph@redhat.com>
890         PR java/1305
891         PR java/27908
892         * builtins.c (initialize_builtins): Add __sync_synchronize().
893         * class.c (add_field): Mark volatile fields.
894         * java-gimplify.c (java_gimplify_expr): Call new functions to
895         handle self-modifying exprs and COMPONENT_REFs.
896         (java_gimplify_component_ref): New.
897         (java_gimplify_modify_expr): Add handling for volatiles.
899 2006-06-08  Tom Tromey  <tromey@redhat.com>
901         * gcj.texi (libgcj Runtime Properties): Document
902         gnu.gcj.user.realname.
904 2006-06-08  Andrew Haley  <aph@redhat.com>
906         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
907         get_symbol_table_index().
908         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
909         private method.
910         (build_known_method_ref): New arg: special.  Pass it to
911         get_symbol_table_index.
912         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
913         the method list.
914         (build_invokevirtual): New arg: special.  Pass it to
915         get_symbol_table_index.
916         (expand_invoke): New variable: special.
917         Pass it to maybe_rewrite_invocation().
918         Pass it to build_known_method_ref().
919         * class.c (build_symbol_entry): Add new arg: special.  Use it to
920         build the symbol table conbstructor.
921         (emit_symbol_table): Extract SPECIAL from the method list and pass
922         it to build_symbol_entry().
923         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
924         special accordingly.
926 2006-06-06  David Daney  <ddaney@avtrex.com>
928         * gcj.texi (libgcj Runtime Properties): Document
929         gnu.gcj.runtime.NameFinder.show_raw and
930         gnu.gcj.runtime.NameFinder.remove_unknown.
932 2006-06-06  Tom Tromey  <tromey@redhat.com>
934         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
935         synthetic, enum, annotation.
936         * jcf.h (ACC_BRIDGE): New macro.
937         (ACC_VARARGS): Likewise.
938         (ACC_SYNTHETIC): Likewise.
939         (ACC_ENUM): Likewise.
940         (ACC_ANNOTATION): Likewise.
942 2006-06-06  Mike Stump  <mrs@apple.com>
944         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
945         installing during build.
947 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
949         * gcj.texi (Extensions): Document the new gcj-dbtool-based
950         classname-to-library resolution mechanism.
951         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
952         mechanism deprecated.
953         (libgcj Runtime Properties): Document
954         gnu.gcj.runtime.VMClassLoader.library_control's new default.
956 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
958         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
959         bit wide type.
960         (jword): Define to uint64 on 64-bit arches.
961         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
963 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
965         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
966         typos.
968 2006-05-26  Tom Tromey  <tromey@redhat.com>
970         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
971         * verify-glue.c (vfy_class_type): New function.
972         * verify-impl.c (check_constant): Allow 'ldc class'.
973         * verify.h (vfy_class_type): Declare.
975 2006-05-25  Andrew Haley  <aph@redhat.com>
977         PR java/27756
978         * decl.c (maybe_pushlevels): When variable ranges are non-nested
979         update all lifetimes, not just the first one.
981 2006-05-24  Tom Tromey  <tromey@redhat.com>
983         * java-tree.h: Fixed flag documentation.
985 2006-05-24  Tom Tromey  <tromey@redhat.com>
987         PR libgcj/27729:
988         * jcf.h (ACC_INVISIBLE): Changed value.
990 2006-05-24  Andrew Haley  <aph@redhat.com>
992         PR java/27754
993         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
994         COMPOUND_EXPR.
996 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
998         * lang.opt (femit-class-file): Remove VarExists.
1000 2006-05-16  Tom Tromey  <tromey@redhat.com>
1002         * verify-impl.c (verify_instructions_0) <op_return>: Special case
1003         for Object.<init>.
1005 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1007         PR driver/26885
1008         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1009         $(GCC_OBJS).
1011 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1013         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1014         (java/expr.o): Replace target.h with $(TARGET_H).
1015         (java/parse.o): Likewise.
1017 2006-05-10  Andrew Haley  <aph@redhat.com>
1019         * class.c (emit_indirect_register_classes): Fix comment.
1021 2006-05-04  Tom Tromey  <tromey@redhat.com>
1023         * java-tree.h (uses_jv_markobj_p): Declare.
1024         * class.c (uses_jv_markobj_p): Removed.
1025         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1026         (get_boehm_type_descriptor): Use it.
1027         (uses_jv_markobj_p): Moved from class.c.  Return bool.
1029 2006-05-04  Tom Tromey  <tromey@redhat.com>
1031         * java-tree.def (THIS_EXPR): Now a tcc_expression.
1033 2006-05-04  Andrew Haley  <aph@redhat.com>
1035         * class.c (make_field_value): Always build_address_of fdecl if
1036         there is an initializer.
1038 2006-05-03  Andrew Haley  <aph@redhat.com>
1040         PR libgcj/27352
1041         * expr.c (maybe_rewrite_invocation): New function.
1042         (rewrite_arglist_getclass): Likewise.
1043         (rules): New.
1044         (expand_invoke): Call maybe_rewrite_invocation.
1045         * parse.y (patch_invoke): Likewise.
1046         * java-tree.h: (maybe_rewrite_invocation): New function.
1048 2006-04-21  Andrew Haley  <aph@redhat.com>
1050         * lang.c (java_init): Handle flag_indirect_classes.
1051         * jvgenmain.c: Use "class$$" instead of "class$".
1052         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1053         DECLs.
1054         (mangle_class_field): Special case "class$$" as well as "class$".
1055         * constants.c (build_ref_from_constant_pool): If
1056         flag_indirect_classes, generate a ref into the heap.
1057         * decl.c (constants_field_decl_node,
1058         constants_data_field_decl_node): New.
1059         * class.c (build_static_class_ref): New.
1060         (build_classdollar_field): Factor out from build_class_ref().
1061         (make_field_value): Handle static fields in heap.
1062         (make_class_data): Make sure we get a static ref to class.
1063         Make class initializer const if flag_indirect_classes.
1064         (register_class): Build a class_ref for initialization if
1065         flag_indirect_classes.
1066         (emit_indirect_register_classes): New.
1068 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1070         * expr.c, gjavah.c: Fix comment typos.
1072 2006-04-03  Andrew Haley  <aph@redhat.com>
1074         PR java/26858
1075         * expr.c (build_field_ref): Don't check the field offset if
1076         flag_syntax_only.
1078 2006-03-30  Andrew Haley  <aph@redhat.com>
1080         PR java/26858
1081         * lang.c (java_attribute_table): New.
1082         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1083         * expr.c (build_field_ref): Add a null pointer check for all
1084         fields of offset > 4k.  Don't do so for accesses via the this
1085         pointer, which we know can never be null.
1086         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1087         methods nonnull.
1089 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1091         * Make-lang.in: Rename docdir to gcc_docdir.
1093 2006-03-30  Tom Tromey  <tromey@redhat.com>
1095         PR java/26042:
1096         * parse.y (java_reorder_fields): Reset superclass field's size as
1097         well.
1099 2006-03-28  Tom Tromey  <tromey@redhat.com>
1101         PR java/26390:
1102         * parse.y (find_most_specific_methods_list): Added 'class'
1103         argument.
1104         (lookup_method_invoke): Updated.
1106 2006-03-15  Tom Tromey  <tromey@redhat.com>
1108         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1109         non-static method calls.
1111 2006-03-15  David Daney  <ddaney@avtrex.com>
1113         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1114         declaration.
1116 2006-03-15  David Daney  <ddaney@avtrex.com>
1118         * lang.opt (-freduced-reflection): New option.
1119         * lang.c (java_post_options): Generate an error if
1120         -freduced-reflection used with -fjni or -findirect-dispatch.
1121         * java-tree.h (flag_reduced_reflection): Declare new variable.
1122         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1123         if bitmap overflows and flag_reduced_reflection set.
1124         * class.c (uses_jv_markobj_p): New function.
1125         (make_class_data): Moved generation of vtable to before
1126         reflection data, generate less reflection data if
1127         flag_reduced_reflection set.
1128         * gcj.texi: Document -freduced-reflection.
1130 2006-03-15  Tom Tromey  <tromey@redhat.com>
1132         PR java/26638:
1133         * class.c (get_interface_method_index): Don't put <clinit> into
1134         interface table.
1136 2006-03-15  Tom Tromey  <tromey@redhat.com>
1138         * parse.y (analyze_clinit_body): Ignore empty statements.
1140 2006-03-08  David Daney  <ddaney@avtrex.com>
1142         * gcj.texi: Document -static-libgcj option.
1144 2006-02-20  Andrew Haley  <aph@redhat.com>
1146         * jcf-parse.c (parse_class_file): Set input_location from
1147         current_class.
1149 2006-02-15  Andrew Haley  <aph@redhat.com>
1151         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1152         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1153         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1155 2006-02-09  Andrew Haley  <aph@redhat.com>
1157         PR java/26192
1158         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1159         in their superclass.
1161         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1162         array types.
1163         
1164 2006-02-08  Tom Tromey  <tromey@redhat.com>
1166         PR java/22578:
1167         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1168         * builtins.c (convert_real): New function.
1169         (java_builtins): Handle Float.intBitsToFloat,
1170         Float.floatToRawIntBits, Double.longBitsToDouble,
1171         Double.doubleToRawLongBits.
1173 2006-02-07  Andrew Haley  <aph@redhat.com>
1175         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1176         class other than the one in which we expected to find it, ignore
1177         the result.
1179         PR java/25535
1180         * constants.c (build_constants_constructor): move initializer into
1181         first halfword on a 64-bit big-endian machine.
1183 2006-02-04  Tom Tromey  <tromey@redhat.com>
1185         PR java/25676:
1186         * builtins.c (max_builtin): Skip floating point 'max'.
1187         (min_builtin): Skip floating point 'min'.
1188         (check_for_builtin): Never return NULL_TREE.
1190 2006-02-04  Tom Tromey  <tromey@redhat.com>
1192         PR java/26097:
1193         * expr.c (push_type): Avoid side effect in gcc_assert.
1195 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1197         * decl.c (java_init_decl_processing): Create char_type_node as a
1198         regular INTEGER_TYPE node.
1199         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1200         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1201         test for char_type_node and promoted_char_type_node as special
1202         instances of INTEGER_TYPE tree codes.
1203         (promote_type,build_java_signature): Likewise.
1204         * jcf-write.c (adjust_typed_op): Likewise.
1205         * mangle.c (mangle_type): Likewise.
1206         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1207         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1209 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1211         * expr.c (java_stack_swap): Revert gcc_assert patch.
1213 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1215         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1216         * typeck.c: Likewise.
1217         * verify-impl.c: Likewise.
1218         * class.c: Likewise.
1219         * decl.c: Likewise.
1220         * jcf-parse.c: Likewise.
1221         * constants.c: Likewise.
1222         * check-init.c: Likewise.
1223         * jcf-write.c: Likewise.
1224         * verify-glue.c: Likewise.
1225         * mangle.c: Likewise.
1226         * expr.c: Likewise.
1227         * lang.c: Likewise.
1228         * boehm.c: Likewise.
1230 2006-02-01  Jan Hubicka  <jh@suse.cz>
1232         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1233         * lang.c (java_init_options): Set no_unit_at_a_time_default.
1235 2006-01-30  Andrew Haley  <aph@redhat.com>
1237         PR java/21428
1238         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1240 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1242         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1243         Update copyright notice dates.
1245 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1247         * jvspec.c (lang_specific_spec_functions): Remove.
1249 2006-01-06  Tom Tromey  <tromey@redhat.com>
1251         * gcj.texi (Arrays): Added more documentation for
1252         JvNewObjectArray.
1253         (Primitive types): Correct information about primitive classes.
1254         (Reference types): New node.
1255         (Index): New node.
1257 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
1259         * jcf-parse.c (set_source_filename): Set the decl source location
1260         even when returning early.
1262 2005-12-15  Tom Tromey  <tromey@redhat.com>
1263             Andrew Haley  <aph@redhat.com>
1265         PR java/25429
1266         * parse.y (resolve_expression_name): Don't generate accessor
1267         methods for constant fields.
1269 2005-12-13  Andrew Haley  <aph@redhat.com>
1271         PR java/25366
1272         PR java/25368
1273         * class.c (maybe_layout_super_class): Update current_class before
1274         calling do_resolve_class.
1276 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
1278         PR java/25330
1279         * jcf-write.c (write_classfile): Use PID in temporary class
1280         file. Save/restore errno when reporting error.
1282 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1284         PR java/9861
1285         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1286         to bare_function_type and including the return type
1287         * builtins.c (initialize_builtins) : Change builtin mangled name
1288         constants to conform to new mangling scheme
1290 2005-12-08  Andrew Haley  <aph@redhat.com>
1292         PR libgcj/25265
1293         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1294         (soft_abstractmethod_node): New.
1295         * expr.c (build_field_ref): Add in-line check for missing field.
1296         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1298 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1300         * Make-lang.in (java.all.build, java.install-normal): Remove.
1302 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1304         * Make-lang.in: Remove all dependencies on s-gtype, except for
1305         gt-java-parse.h.
1307 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
1309         * class.c (build_utf8_ref, emit_register_classes): Use
1310         switch_to_section and get_section.
1312 2005-12-06  Tom Tromey  <tromey@redhat.com>
1314         PR java/25283:
1315         * parse.y (patch_new_array_init): Revert previous patch.
1316         (lookup_method_invoke): Use size-less array type when creating an
1317         anonymous constructor.
1319 2005-12-05  Tom Tromey  <tromey@redhat.com>
1321         * parse.y (patch_new_array_init): Don't set length on array.
1323 2005-12-02  Richard Guenther  <rguenther@suse.de>
1325         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1326         buildN instead of build.
1327         * class.c (finish_class): Likewise.
1328         * expr.c (java_create_object): Likewise.
1330 2005-11-28  Tom Tromey  <tromey@redhat.com>
1332         PR java/18278:
1333         * expr.c (build_jni_stub): Unwrap the return value.
1334         * java-tree.h (soft_unwrapjni_node): New define.
1335         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1336         * decl.c (java_init_decl_processing): Initialize
1337         soft_unwrapjni_node.
1339 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
1341         * gcj.texi (gij options): Add -Xss documentation.
1343 2005-11-08  Wil Mahan  <wmahan@gmail.com>
1345         PR java/23617
1346         * zextract.c (read_zip_archive): Fix out of memory error when
1347         reading jar files with zip-style comments.
1349 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
1351         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1352         formats.
1353         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1355 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1356             Wil Mahan <wmahan@gmail.com>
1358         PR java/23620
1359         * class.c (make_class): Create empty binfo here.
1360         (set_super_info): Only create binfo if we have superclasses.
1362 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
1364         PR java/24127
1365         * parse.y (method_header): Make the result of the rule a NULL_TREE
1366         when a parsing error occurs.
1368 2005-09-29  Tom Tromey  <tromey@redhat.com>
1370         PR java/24120:
1371         * jcf-io.c (memoized_dirlist_hash): New function.
1372         (caching_stat): Use it.
1374 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
1376         PR java/21418
1377         * class.c (inherits_from_p): Try to lay out super class
1378         if it is not already laid out.
1379         (maybe_layout_super_class): Handle the case where SUPER_CLASS
1380         is a NULL_TREE.
1382 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
1384         * builtins.c (max_builtin, min_builtin, abs_builtin,
1385         java_build_function_call_expr): Use fold_buildN.
1386         * class.c (layout_class_method): Likewise.
1387         * expr.c (java_truthvalue_conversion, build_java_jsr,
1388         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1389         build_java_binop, build_field_ref, expand_compare,
1390         build_known_method_ref, build_invokevirtual,
1391         process_jvm_instruction): Likewise.
1392         * parse.y (patch_binop, patch_exit_expr): Likewise.
1393         * typeck.c (convert_ieee_real_to_integer): Likewise.
1394         (convert): Don't call fold after convert_ieee_real_to_integer.
1396 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
1398         PR java/23891
1399         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1400         the newly created type. Set import lists here, not in create_class.
1401         (jdep_resolve_class): Set current_class.
1402         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
1403         the current package context, not ctxp->package.
1404         (cicp_cache): Removed.
1405         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
1406         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
1407         * java-tree.h (TYPE_PACKAGE): New macro.
1408         (struct lang_type): New member 'package'.
1410 2005-09-09  Andrew Haley  <aph@redhat.com>
1412         PR libgcj/23182 
1413         * expr.c (pop_type_0): If the expected type is object or ptr
1414         (i.e. void*), return the type of the object we just popped from
1415         the stack.
1417 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
1419         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1420         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1422 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
1424         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
1425         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
1426         typos.  Follow spelling conventions.
1428 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
1430         PR java/23431
1431         * typeck.c (lookup_do): Look up interfaces for the original class,
1432         not the base class.
1433         * parse.y (java_check_regular_methods): Fix diagnostic message for
1434         more restrictive overriding of a method from an interface.
1436 2005-08-16  Tom Tromey  <tromey@redhat.com>
1438         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1439         class' initial state.
1441 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1443         PR java/22113
1444         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1445         `literal_token' for large numeric input tokens.
1447 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1449         PR java/19870
1450         * parse.y (nested_field_access_p): Rename to nested_member_access_p
1451         and expand to handle method accesses across nested classes.
1452         (build_outer_method_access_method): Rename to
1453         build_nested_method_access_method.  Minor adjustments to comments.
1454         (resolve_expression_name): Use the newly-renamed
1455         nested_member_access_p method.
1456         (resolve_qualified_expression_name): Likewise.
1457         (patch_method_invocation): Also consider static methods for access
1458         method generation.  Minor adjustments to comments.
1459         (maybe_use_access_method): Use the more general
1460         nested_memeber_access_p to determine access across nested class
1461         boundaries.  Allow THIS_ARG to be NULL (for static methods).
1463 2005-08-15  Tom Tromey  <tromey@redhat.com>
1465         PR java/23300.
1466         * expr.c (build_field_ref): Don't generate otable reference when
1467         DECL_FIELD_OFFSET is 0.
1468         * class.c (maybe_layout_super_class): Pass outer class to
1469         do_resolve_class.
1471 2005-08-15  Tom Tromey  <tromey@redhat.com>
1473         * java-tree.h (LABEL_IN_SUBR): Removed.
1474         (LABEL_IN_SUBR): Likewise.
1475         (LABEL_IS_SUBR_START): Likewise.
1476         (LABEL_SUBR_START): Likewise.
1477         (LABEL_SUBR_CONTEXT): Likewise.
1478         (LABEL_CHANGED): Likewise.
1479         (LABEL_RETURN_LABEL): Likewise.
1480         (LABEL_RETURN_TYPE_STATE): Likewise.
1481         (LABEL_RETURN_LABELS): Likewise.
1482         (RETURN_MAP_ADJUSTED): Likewise.
1483         (LABEL_PENDING_CHAIN): Likewise.
1485 2005-08-15  Tom Tromey  <tromey@redhat.com>
1487         * Make-lang.in (JAVA_OBJS): Removed verify.o
1488         (java/verify.o): Removed.
1489         * verify.c: Removed.
1490         * lang.c (flag_new_verifier): Removed.
1491         (java_post_options): Updated.
1492         * java-tree.h (flag_new_verifier): Removed.
1493         (verify_jvm_instructions): Removed.
1494         * expr.c (pop_type_0): Assume flag_new_verifier is true.
1495         (build_java_check_indexed_type): Likewise.
1496         (expand_java_arraystore): Likewise.
1497         (expand_java_arrayload): Likewise.
1498         (pop_arguments): Likewise.
1499         (expand_byte_code): Likewise.
1500         (process_jvm_instruction): Likewise.
1502 2005-08-10  Andrew Haley  <aph@redhat.com>
1504         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1505         type mismatches to make legal GIMPLE.
1507 2005-08-10  Robin Green <greenrd@greenrd.org>
1509         PR java/23230:
1510         * parse.y (maybe_use_access_method): Generalize check from
1511         java.lang.Object to any superclass of current_class
1513 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1515         * class.c (build_class_ref): Wrap the primary class type in a
1516         NOP_EXPR.
1517         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1518         primary class type from the NOP_EXPR in which it was placed.
1520 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
1522         * expr.c (expand_load_internal): Fix missing parens in
1523         predicate.
1525 2005-07-28  Andrew Haley  <aph@redhat.com>
1527         * expr.c (expand_load_internal): Convert to destination type.
1529 2005-07-22  Manfred Hollstein  <mh@suse.com>
1531         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1532         (check_constant): Likewise.
1533         (check_wide_constant): Likewise.
1535 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
1537         Make CONSTRUCTOR use VEC to store initializers.
1538         * check-init.c (check_init): Update to cope with VEC in
1539         CONSTRUCTOR_ELTS.
1540         * class.c (make_field_value, make_method_value, get_dispatch_table,
1541         make_class_data, emit_symbol_table, emit_catch_table,
1542         emit_assertion_table): Use build_constructor_from_list instead of
1543         build_constructor.
1544         * constants.c (build_constants_constructor): Likewise.
1545         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
1546         VEC in CONSTRUCTOR_ELTS.
1547         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
1548         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
1549         of a TREE_LIST.
1550         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
1551         CONSTRUCTOR_ELTS.
1552         * parse.y (build_new_array_init): Use build_constructor_from_list
1553         instead of build_constructor.
1554         (patch_new_array_init): Update to cope with VEC in
1555         CONSTRUCTOR_ELTS.
1556         (array_constructor_check_entry): Likewise.
1558 2005-07-12  Tom Tromey  <tromey@redhat.com>
1560         * jvspec.c (lang_specific_driver): Put filelist_filename first on
1561         command line.
1563 2005-07-12  Tom Tromey  <tromey@redhat.com>
1565         PR java/19674:
1566         * parse-scan.y (interface_member_declaration): Added
1567         empty_statement.
1569 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
1570         
1571         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
1572         (LABEL_PENDING_CHAIN): Ditto.
1573         (LABEL_PC): Ditto.
1574         (DECL_BIT_INDEX): Ditto.        
1576 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1578         PR java/18119
1579         * parse.y (inner_class_accessible): New function. Logic moved from
1580         check_inner_class_access.
1581         (check_inner_class_access): Use inner_class_accessible.
1582         (resolve_inner_class): Simplify arguments. Create circularity hash
1583         here. Keep looking for classes if we found one that was inaccessible. 
1584         Return the inaccessible class only if there is no other match.
1585         (do_resolve_class): Update for new resolve_inner_class arguments.
1586         Don't create circularity_hash here.
1588 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1590         PR java/21045
1591         * parse.y (add_exception_to_throws): New function.
1592         (purge_unchecked_exceptions): Removed.
1593         (get_constructor_super): Renamed from verify_constructor_super. Now
1594         returns the super constructor after verification.
1595         (java_complete_expand_method): Don't use purge_unchecked_exceptions
1596         or save/restore the exception list.
1597         (check_thrown_exceptions): Add uncaught exceptions in anonymous
1598         class initializers and constructors to the throws clause of the method. 
1600 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
1602         PR java/19674
1603         * parse.y (interface_member_declaration): Allow empty statements in
1604         interface declarations.
1606 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
1608         * Makefile.in (parse.o): Adjust dependencies.
1609         * parse.y: Include tree-dump.h.
1611 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
1613         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
1614         flag for quoting.
1616 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
1618         * parse.y (issue_warning_error_from_context): Call
1619         pp_output_formatted_text to be able to get the buffer.
1621 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
1623         * parse.y (issue_warning_error_from_context): Update for the
1624         renaming of pp_format_text to pp_format.
1626 2005-06-28  Paul Brook  <paul@codesourcery.com>
1628         * decl.c (java_init_decl_processing): Call
1629         default_init_unwind_resume_libfunc.
1631 2005-06-27  Tom Tromey  <tromey@redhat.com>
1633         PR java/21540, PR java/13788:
1634         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
1635         fold_constant_for_init.
1636         (patch_binop): Added 'folding' argument.  Updated all callers.
1637         (patch_unaryop) <NOP_EXPR>: New case.
1638         (fold_constant_for_init) <NOP_EXPR>: Likewise.
1639         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
1641 2005-06-25  Jan Hubicka  <jh@suse.cz>
1643         * builtins.c (define_builtin): Accept new flags parameter.
1644         (initialize_builtins): Mark the builtins const and nothrow accordingly.
1646 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
1648         * all files: Update FSF address in copyright headers.
1650 2005-06-24  Tom Tromey  <tromey@redhat.com>
1652         * verify-impl.c (verify_instructions_0): Correctly handle
1653         situation where PC falls off end.
1655 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
1657         PR java/20697
1658         * parse.y (find_most_specific_methods_list): Remove special case for
1659         inner classes.
1661 2005-06-15  Tom Tromey  <tromey@redhat.com>
1663         PR libgcj/21906:
1664         * class.c (make_method_value): Use soft_abstractmethod_node for
1665         abstract method.
1666         * java-tree.h (soft_abstractmethod_node): New define.
1667         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
1668         * decl.c (java_init_decl_processing): Initialize
1669         soft_abstractmethod_node.
1671 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
1673         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
1675 2005-06-13  Per Bothner  <per@bothner.com>
1677         * expr.c (int highest_label_pc_this_method,
1678         start_label_pc_this_method): New globals.
1679         (lookup_label): Add start_label_pc_this_method to pc for label, and
1680         update highest_label_pc_this_method.  This prevents conflicts between
1681         labels from different methods.
1682         * java-tree.h: Declare new globals.
1683         * jcf-parse.c (parse_class_file): If needed bump
1684         start_label_pc_this_method and reset highest_label_pc_this_method.
1686 2005-06-13  Tom Tromey  <tromey@redhat.com>
1688         PR java/21844:
1689         * parse.y (nested_field_access_p): Handle case where outer field
1690         is inherited by enclosing class.
1692 2005-06-12  Per Bothner  <per@bothner.com>
1694         * class.c (inherits_from_p): Do load_class if needed.
1696 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1698         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
1699         * java-tree.h (parse_error_context): Move...
1700         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
1701         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
1702         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
1704 2005-06-08  Roger Sayle  <roger@eyesopen.com>
1706         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
1708 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
1710         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
1711         msgid for argument name.
1712         * gjavah.c (error): Likewise.
1713         * java-tree.h (parse_error_context): Likewise.
1714         * parse.y (parse_error_context, parse_warning_context,
1715         issue_warning_error_from_context): Likewise.
1717 2005-06-01  Tom Tromey  <tromey@redhat.com>
1719         PR java/21722:
1720         * class.c (build_static_field_ref): Don't fold constant fields if
1721         current class is from a .class file and we're using indirect
1722         dispatch.
1724 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1726         * java/verify-glue.c: Don't include errors.h and include toplev.h.
1727         * java/Make-lang.in: Updates dependencies.
1729 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
1731         PR java/19870.
1732         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
1733         NESTED_FIELD_ACCESS_IDENTIFIER_P.
1734         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
1735         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
1736         * jcf-write.c (generate_classfile): Use
1737         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1738         OUTER_FIELD_ACCESS_IDENTIFIER_P.
1739         * parse.y (build_outer_field_access): Rename to
1740         build_nested_field_access. Support static fields and outer-to-inner
1741         class accesses.
1742         (outer_field_access_p): Rename to nested_field_access_p. Support
1743         static fields and generalise to outer-to-inner class and sibling
1744         inner class accesses.
1745         (outer_field_expanded_access_p): Rename to
1746         nested_field_expanded_access_p and support static fields.
1747         (outer_field_access_fix): Rename to nested_field_access_fix and
1748         support static fields.
1749         (build_outer_field_access_expr): Rename to
1750         build_nested_field_access_expr and support static fields.
1751         (build_outer_field_access_methods): Rename to
1752         build_nested_field_access_methods and support static fields. For
1753         static fields, generate accessors without class instance parameters.
1754         (build_outer_field_access_method): Rename to
1755         build_nested_field_access_method and support static fields.
1756         (build_outer_method_access_method): Use
1757         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1758         OUTER_FIELD_ACCESS_IDENTIFIER_P.
1759         (resolve_expression_name): Consider static field accesses across
1760         nested classes.
1761         (resolve_qualified_expression_name): Likewise.
1762         (java_complete_lhs): Use nested_field_access_fix instead of
1763         outer_field_access_fix.
1764         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
1765         Use nested_field_expanded_access_p instead of
1766         outer_field_expanded_access_p. Use nested_field_access_fix instead
1767         of outer_field_access_fix.
1768         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
1769         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
1771 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
1773         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
1774         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
1775         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
1776         MINOR_BINARYCOMPAT_ABI_VERSION): New.
1777         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
1778         (parse_version): Calculate version ID using new method. Use bit-flags
1779         for flag_indirect_dispatch and flag_bootstrap_classes.
1781 2005-05-25  Richard Henderson  <rth@redhat.com>
1783         PR libgcj/21692
1784         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
1785         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
1786         DECL_CONTEXT; avoid pushdecl_top_level.
1787         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
1788         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
1789         (layout_class_method): Likewise.
1790         * decl.c (java_mark_cni_decl_local): New.
1791         (java_mark_class_local): Use it.
1792         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
1793         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
1794         (struct lang_decl_func): Add local_cni;
1795         (struct lang_decl_var): Add class_field, vtable.
1796         (java_mangle_decl): Declare.
1797         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
1798         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
1799         (mangle_obstack_1): New.
1800         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
1801         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
1802         lhd_set_decl_assembler_name for things that don't need mangling.
1803         (mangle_class_field): Rename from java_mangle_class_field, make
1804         static, don't call init_mangling or finish_mangling.
1805         (mangle_vtable): Similarly.
1806         (mangle_local_cni_method_decl): New.
1807         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
1808         gcc_assert, and MANGLE_RAW_STRING.
1809         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
1811 2005-05-25  DJ Delorie  <dj@redhat.com>
1813         * class.c (set_constant_value): Move warning control from if() to
1814         warning(OPT_*).
1816 2005-05-24  Richard Henderson  <rth@redhat.com>
1818         * builtins.c (define_builtin): Don't call make_decl_rtl.
1819         * constants.c (build_constant_data_ref): Likewise.
1820         * class.c (build_utf8_ref): Likewise.
1821         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
1822         (get_dispatch_table, layout_class_method): Likewise.
1823         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
1824         by hand.
1825         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
1826         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
1827         to determine if we need a non-zero address.
1828         * decl.c (builtin_function): Don't call make_decl_rtl.
1829         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
1830         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
1831         * resource.c (compile_resource_data): Likewise.
1832         * parse.y (resolve_field_access): Re-word comment to avoid
1833         building DECL_RTL.
1835 2005-05-24  Richard Henderson  <rth@redhat.com>
1837         * class.c (registered_class): Take it out of class_roots; turn into
1838         a vec of trees.
1839         (register_class): Make static.  Don't duplicate decl node.  Use
1840         VEC_safe_push.
1841         (emit_register_classes): Use VEC_iterate.  Use output_constant
1842         instead of assemble_integer.  Don't call mark_decl_referenced
1843         directly.
1844         * java-tree.h (register_class): Remove decl.
1846 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
1848         PR java/17845
1850         * parse.y (register_package, package_list): Remove.
1851         (package_declaration): Do not call register_package.
1852         (do_resolve_class): Do not use package_list.
1854 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
1856         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
1857         unused variable.
1859 2005-05-15  Tom Tromey  <tromey@redhat.com>
1861         PR java/21519:
1862         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
1863         NOTE_PUSH.
1865 2005-05-12  Aaron Luchko <aluchko@redhat.com>
1867         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
1869 2005-05-11  Tom Tromey  <tromey@redhat.com>
1871         * gcj.texi (Code Generation): Document -fbootstrap-classes.
1872         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
1873         (parse_version): Use it.
1874         * lang.opt (-fbootstrap-classes): New option.
1876 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
1878         PR java/21436
1879         * class.c (maybe_layout_super_class): Look for imports in this_class.
1880         * parse.h (ctxp_for_generation_last): New.
1881         (do_resolve_class): Add a parameter.
1882         * parse.y (ctxp_for_generation_last): New.
1883         (java_pop_parser_context): Add at end of list.
1884         (find_in_imports, find_in_imports_on_demand): Look in ctxp
1885         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
1886         the given type are NULL.
1887         (do_resolve_class): Look into the imports of the new second parameter.
1888         Adjust recursive calls.
1889         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
1890         calls to do_resolve_class.
1891         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
1892         (java_complete_class): Do not do that here.
1894 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
1896         PR java/20309
1897         * Make-lang.in (java): Add gjnih.
1898         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1899         (GJNIH_OBJS): New variable.
1900         (gjnih$(exeext)): New target.
1901         (JAVA_MANFILES): Add gjnih.1.
1902         (java.uninstall): Add gjnih.1.
1903         (java.mostlyclean): Add gjnih.
1904         (java.maintainer-clean): Add gjnih.1.
1905         (java/gjavah-jni.o): New target.
1906         (.INTERMEDIATE): Add gjnih.pod.
1907         (gjnih.pod): New target.
1908         * config-lang.in (stagestuff): Add gjnih.
1909         * gcj.texi (Top): Add gjnih node.
1910         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
1911         -bootclasspath options.
1912         (Invoking gjnih): New node.
1913         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
1914         (TOOLNAME): New macro.
1915         (error): Replace hard-coded gcjh with TOOLNAME.
1916         (process_file): Likewise.
1917         (usage): Likewise.
1918         (version): Likewise.
1919         (help): Likewise.  Add help output for -force, -old, -trace and -J
1920         options.
1921         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
1922         (options): Add force, old, trace and J fields.
1923         (main): Handle -force, -old, -trace and -J options.
1925 2005-05-03  Tom Tromey  <tromey@redhat.com>
1927         PR java/21245:
1928         * gjavah.c (main): Unlink output file on error.
1930 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
1932         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
1933         copyright.
1935 2005-04-29  Tom Tromey  <tromey@redhat.com>
1937         * expr.c (build_jni_stub): Updated for change to build_block.
1939 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
1941         * expr.c (force_evaluation_order): Declare 'saved' earlier.
1943 2005-04-28  Andrew Haley  <aph@redhat.com>
1945         PR java/19285
1946         * java-tree.h (soft_resolvepoolentry_node): New.
1947         (alloc_constant_fieldref): Declare.
1948         * expr.c (expand_java_field_op): Don't call class_init for
1949         accesses to static fields with indirect dispatch.
1950         * builtins.c (initialize_builtins): Add "__builtin_expect".
1951         * decl.c (soft_resolvepoolentry_node): New variable.
1952         (java_init_decl_processing): Create a decl for
1953         "_Jv_ResolvePoolEntry".
1954         * class.c (build_fieldref_cache_entry): New function.
1955         (build_static_field_ref): Rewrite for indirect dispatch.
1956         * constants.c (find_name_and_type_constant_tree): New function.
1957         (alloc_constant_fieldref): Likewise.
1958         (build_constants_constructor): Handle CONSTANT_Fieldref and
1959         CONSTANT_NameAndType.
1961         PR java/21115
1962         * expr.c (force_evaluation_order): Convert outgoing args smaller
1963         than integer.
1965 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
1967         * gcj.texi (libgcj Runtime Properties): Remove obsolete
1968         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
1969         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
1971 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1973         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
1974         to `unlock_stream' with `unlock_std_streams'.
1976 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
1978         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
1979         instead of just expr.h.
1981 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1983         * gjavah.c (main): Unlock the stdio streams.
1984         * jcf-dump.c (main): Likewise.
1985         * jv-scan.c (main): Likewise.
1986         * jvgenmain.c (main): Likewise.
1988 2005-04-23  DJ Delorie  <dj@redhat.com>
1990         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
1991         parse.y: Adjust warning() callers.
1993 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
1995         * gcj.texi (Object fields): Change "Integer" to "Int" in example
1996         contructor.
1998 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2000         * gcj.texi: Fix typos and bogus example.
2002 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
2004         * except.c: Fix a comment typo.
2006 2005-04-19  Julian Brown  <julian@codesourcery.com>
2008         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2009         indirect dispatch with PIC.
2011 2005-04-18  Andrew Haley  <aph@redhat.com>
2013         * java-except.h (struct eh_range.handler): Remove unused field.
2014         (handle_nested_ranges): Remove function declaration.
2015         (sanity_check_exception_range): Add function declaration.       
2016         * verify.c (verify_jvm_instructions): Remove call to
2017         handle_nested_ranges.
2018         * verify-glue.c (verify_jvm_instructions_new): Call
2019         sanity_check_exception_range.
2020         * except.c (link_handler, eh_range_freelist, link_handler,
2021         handle_nested_ranges): Remove.
2022         (add_handler): Rewrite.
2023         (sanity_check_exception_range): New function.
2024         (print_ranges): New function.
2026 2005-04-13  Julian Brown  <julian@codesourcery.com>
2028         * decl.c (finish_method): Give methods once-only linkage.
2030 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
2032         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2034 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2036         * java-tree.h: Don't use PARAMS().
2038 2005-04-07  Per Bothner  <per@bothner.com>
2040         * class.c (push_class): By default, suppress debug output.
2041         (finish_class): Enable debug output for classes we're emitting.
2043 2005-04-07  Andrew Haley  <aph@redhat.com>
2045         * gcj.texi: Correct gcj-dbtool instructions.
2047 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
2049         * gcj.texi: Fix a typo.
2050         * lang.c: Fix a comment typo.
2052 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
2054         * gcj.texi (Invoking gij): Add descriptions of new -X options.
2055         Mention recognized-and-ignored compatibility options.
2056         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2057         JvFree.
2058         (About CNI): Add Memory allocation section.
2060 2005-04-01  Tom Tromey  <tromey@redhat.com>
2062         * decl.c (java_init_decl_processing): Fix types of
2063         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2064         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2065         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2067 2005-03-31  Jan Hubicka  <jh@suse.cz>
2069         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2070         * class.c: Include cgraph.h
2071         (make_local_functoin_alias): Mark aslias as needed.
2072         * resource.c: Include cgraph.h
2073         (compile_resource_data): Go via cgraph interface.
2075 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2077         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2079 2005-03-30  Tom Tromey  <tromey@redhat.com>
2081         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2082         inner_class_info_index==0 or outer_class_info_index==0.
2084 2005-03-29  Tom Tromey  <tromey@redhat.com>
2086         * gcj.texi (libgcj Runtime Properties): Document
2087         gnu.gcj.runtime.endorsed.dirs.
2089 2005-03-24  Anthony Green  <green@redhat.com>
2091         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2092         'gcj-dbtool -p'.
2094 2005-03-23  Tom Tromey  <tromey@redhat.com>
2096         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2097         (parse_version): Use it.
2099 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2101         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2103 2005-03-18  Andrew Haley  <aph@redhat.com>
2105         PR java/20522
2106         * decl.c (update_aliases): Don't update variables that are about
2107         to die.
2108         (maybe_poplevels): Add comment.
2110 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2112         PR java/20502
2113         * jcf-parse.c (duplicate_class_warning): New function.
2114         (java_parse_file): Call duplicate_class_warning if 
2115         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2116         (parse_zip_file_entries): Likewise. Also set
2117         CLASS_FROM_CURRENTLY_COMPILED_P.
2119 2005-03-16  Andrew Haley  <aph@redhat.com>
2121         * expr.c (expand_java_arrayload): Don't generate a
2122         NullPointerException based on the type of the node.
2123         (build_java_array_length_access): Likewise.
2125 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2127         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2129 2005-03-11  Tom Tromey  <tromey@redhat.com>
2131         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2132         (libgcj Runtime Properties): Document the default .db.
2134 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2136         PR java/20312
2137         * parse.y (checks_throws_clauses): Check exceptions list even when
2138         the base class does not come from a source file being compiled.
2139         (java_complete_lhs): Remove unused variable 'wfl'.
2141 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2143         PR java/20338
2144         * decl.c (finish_method): Emit _Jv_InitClass for private static
2145         methods inside inner classes as well.
2147 2005-03-08  Julian Brown  <julian@codesourcery.com>
2148         * Revert patch from 2005-03-08 for causing bootstrap failure on
2149         ppc-darwin.
2151 2005-03-08  Julian Brown  <julian@codesourcery.com>
2153         * decl.c (finish_method): Give methods once-only linkage.
2155 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2157         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2159 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2161         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2162         can_widen_reference_to if the C++ ABI is in use.
2163         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2164         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2165         type_isresolved, init_state, set_pc, state_get_pc,
2166         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2167         (verify_fail): Report the current PC from the verifier context.
2168         (free_state): Remove #if 0 block to enable this function.
2169         (free_verifier_context): Call free_state on state_list iterator
2170         values before freeing them.
2171         * expr.c (pop_type_0): Pop correct type for error message when stack
2172         contains a multi-word type.
2174 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2176         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2177         for known NULL array length access.
2179 2005-03-07  Tom Tromey  <tromey@redhat.com>
2181         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2183 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2185         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2186         typeck.c: Update copyright.
2188 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2190         Remove xref code.
2191         * xref.c, xref.h: Remove file.
2192         * Make-lang.in (java/xref.o): Remove.
2193         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2194         * lang.c (flag_emit_xref): Remove definition.
2195         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2196         * typeck.c (convert): Remove use of do_not_fold.
2197         * parse.y (do_not_fold): Remove definition.
2198         (parser grammar): Remove xref code.
2199         (maybe_create_class_interface_decl, create_class): Likewise.
2200         (register_fields, method_header, finish_method_declaration): Likewise.
2201         (declare_local_variables, source_end_java_method): Likewise.
2202         (java_complete_expand_classes): Do not set do_not_fold.
2203         (java_complete_expand_method): Remove xref code.
2204         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2205         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2206         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2207         (patch_synchronized_statement, patch_throw_statement): Likewise.
2208         (maybe_build_class_init_for_field): Likewise.
2210 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2212         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2213         instead of IS_NON_TYPE_CODE_CLASS.
2215 2005-03-04  Andrew Haley  <aph@redhat.com>
2217         PR java/18362
2218         * class.c (set_method_index): Don't set method_index if it is
2219         NULL_TREE.
2220         (layout_class_method): Don't complain about "non-static method foo
2221         overrides static method" in the case of indirect dispatch.
2223 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2225         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2226         warning.
2227         * Make-lang.in: Don't elide warnings in jcf-io.c.
2229 2005-03-01  Per Bothner  <per@bothner.com>
2231         PR java/8608
2232         * check-init.c (wfl): Remove static.
2233         (final_assign_error, check_init): Replace calls to parse_error_context
2234         by plain error.
2235         (check_init): Save, set, and restore input_location for each exp.
2237 2005-03-01  Per Bothner  <per@bothner.com>
2239         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2240         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2241         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2243 2005-03-01  Per Bothner  <per@bothner.com>
2245         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2247 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2249         PR libgcj/16923
2250         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2251         JvVMOption.
2253 2005-02-22  Tom Tromey  <tromey@redhat.com>
2255         PR java/20056:
2256         * verify-impl.c (EITHER): New define.
2257         (types_compatible): Handle it.
2258         (check_field_constant): Use it.
2260 2005-02-18  Tom Tromey  <tromey@redhat.com>
2262         PR java/20056:
2263         * verify-impl.c (types_equal): Fixed test.
2265         PR java/20056:
2266         * verify-glue.c (vfy_class_has_field): New function.
2267         * verify.h (vfy_class_has_field): Declare.
2268         * verify-impl.c (check_field_constant): Added 'putfield'
2269         argument.
2270         (verify_instructions_0): Updated.
2271         (types_equal): New function.
2273 2005-02-14  Tom Tromey  <tromey@redhat.com>
2275         PR java/19921:
2276         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2277         stack effect of multianewarray.
2279 2005-02-14  Andrew Haley  <aph@redhat.com>
2281         PR java/19907
2282         * expr.c (expand_byte_code): Call promote_arguments().
2283         (promote_arguments): New function.
2284         * decl.c (check_local_unnamed_variable): Remove special case for
2285         new verifier.
2286         (find_local_variable): Promote all boolean types to int
2287         when searching for local variable decls.
2289 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
2291         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2292         parse-scan.y: Update copyright.
2294 2005-02-11  Per Bothner  <per@bothner.com>
2296         PR java/15543
2297         * parse-scan.y (input_location): Remove variable.
2298         (main_input_filename): New - replaces input_filename, which isn't
2299         settable if USE_MAPPED_LOCATION.
2300         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2301         so we don't reference input_location or wfl_operator in that case.
2302         * jv-scan.c (expand_location): Remove - no longer used.
2303         (main): Set main_input_filename rather than input_filename.
2305 2005-02-09  Richard Henderson  <rth@redhat.com>
2307         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2308         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2310 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
2312         * expr.c (add_type_assertion): Use the proper enumeration type,
2313         since this is what htab_find_slot() is expecting.
2315 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2317         * gcj.texi: Update copyright dates.
2319 2005-02-02  Tom Tromey  <tromey@redhat.com>
2321         * gcj.texi (libgcj Runtime Properties): Default library_control
2322         to 'cache'.
2324 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
2326         PR java/15543
2327         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2328         (modifiers) when square brackets are present in a declaration for
2329         a final paramter.
2330         * jv-scan.c (main): Set input_filename and input_line.
2332 2005-02-01  Tom Tromey  <tromey@redhat.com>
2334         PR java/19742:
2335         * gjavah.c (get_field_name): Don't override name for JNI header.
2337 2005-02-01  Roger Sayle  <roger@eyesopen.com>
2339         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2340         of unsigned types using iushr and lushr JVM bytecodes.
2342 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2344         PR java/19738
2345         * gjavah.c (jni_print_float): Do not emit floating-point
2346         initialiser for a static final field.
2347         (jni_print_double): Likewise.
2349 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
2351         Revert:
2352         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2353         * gjavah.c (print_field_info): Mark static data members of
2354         floating-point type with "__extension__".
2356 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2358         * gjavah.c (print_field_info): Mark static data members of
2359         floating-point type with "__extension__".
2361 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2363         PR java/9157
2364         * parse.y (build_string_concatenation): Remove redundant if.
2365         (patch_conditional_expr): Attempt to patch_string() the condition
2366         of a ?: as well, in addition to its other operands.
2368 2005-01-25  Tom Tromey  <tromey@redhat.com>
2370         * Make-lang.in (java/java-tree-inline.o): Removed.
2372 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
2374         PR java/19070
2375         * parse.y (patch_binop): Allow comparisons against NULL only
2376         if the other operand is of a reference type.
2378 2005-01-24  Tom Tromey  <tromey@redhat.com>
2380         * java-tree.h (gcj_abi_version): Declare.
2381         * class.c (make_class_data): Push gcj_abi_version into "next"
2382         field.  Renamed field.
2383         * decl.c (gcj_abi_version): New global.
2384         (parse_version): New function.
2385         (java_init_decl_processing): Call it.  Renamed 'next' field.
2386         Include version.h.
2387         (GCJ_BINARYCOMPAT_ADDITION): New define.
2389 2005-01-24  Roger Sayle  <roger@eyesopen.com>
2391         PR java/19295
2392         * jcf-write.c (generate_bytecode_insns): Conversions between
2393         integer types of the same precision shouldn't generate widening
2394         or narrowing conversion bytecodes.
2396 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
2398         * java-except.h, java-tree.h: Remove unused prototypes.
2400 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
2402         PR java/18091:
2403         * jcf-write.c (perform_relocations): Don't call memcpy if source
2404         and destination are the same.
2406 2005-01-17  Tom Tromey  <tromey@redhat.com>
2408         * verify-impl.c (get_short): Sign extend.
2409         (get_int): Likewise.
2411 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
2413         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2414         with TYPE_SIZE.
2416 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2418         * verify.c: Revert to the version before the BC-ABI merge.
2420 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2422         PR java/19277
2423         * check-init.c (check_init): Take care of references that do not
2424         have an explicit final variable declaration (e.g. array length
2425         access) for pre/post in/de-crement operators.
2427 2005-01-08  Mark Wielaard  <mark@klomp.org>
2429         * parse.y (process_imports): Allocate (and free) original_name only
2430         when not already defined.
2431         * jcf-parse.c (read_class): Free results of find_class() and
2432         lrealpath().
2433         (java_parse_file): Keep pointer to head of file_list and free when
2434         done. Free result of lrealpath().
2436 2005-01-05  Tom Tromey  <tromey@redhat.com>
2438         * gcj.texi (Standard Properties): java.ext.dirs is now used.
2440 2004-12-20  Andrew Haley  <aph@redhat.com>
2442         * typeck.c: Use fold_convert for ints and booleans.
2444 2004-12-17  Andrew Haley  <aph@redhat.com>
2446         PR java/18931
2447         * typeck.c (convert): Use a CONVERT_EXPR when converting to
2448         BOOLEAN_TYPE or CHAR_TYPE.
2449         (convert_to_boolean, convert_to_char) : Remove.
2450         * convert.h (convert_to_boolean, convert_to_char) : Remove.
2451         * expr.c (expand_load_internal): Do type conversion if type is not
2452         as required.
2454 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
2456         PR target/18459
2457         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2458         Update comment.
2460 2004-12-07  Andrew Haley  <aph@redhat.com>
2462         PR java/18811:
2463         * jcf-parse.c (load_class): Remove sanity test for missing inner
2464         class file.
2466 2004-12-06  Tom Tromey  <tromey@redhat.com>
2468         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
2469         (java.uninstall): Likewise.
2470         (java.maintainer-clean): Likewise.
2471         (.INTERMEDIATE): Likewise.
2472         (java.install-man): Likewise.
2473         (gcj-dbtool.pod): New target.
2474         * gcj.texi (Code Generation): Document -findirect-dispatch.
2475         (libgcj Runtime Properties): Document
2476         gnu.gcj.precompiled.db.path.
2477         (Top): Link to "Invoking gcj-dbtool".
2479 2004-12-06  Tom Tromey  <tromey@redhat.com>
2481         PR java/14853:
2482         * java-tree.h (extract_field_decl): Declare.
2483         * parse.y (extract_field_decl): Renamed from
2484         strip_out_static_field_access_decl.  No longer static.
2485         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
2487 2004-12-03  Tom Tromey  <tromey@redhat.com>
2489         * lang.c (flag_new_verifier): Define.
2490         (java_post_options): Set flag_new_verifier if indirect dispatch
2491         is being used.
2492         * lang.opt (fnew-verifier): Removed.
2494 2004-12-03  Tom Tromey  <tromey@redhat.com>
2496         PR bootstrap/14614:
2497         * Make-lang.in (java.install-common): Only install transformed
2498         gcjh if gcj-cross exists.
2500 2004-12-03  Andrew Haley  <aph@redhat.com>
2502         PR java/18812
2503         * except.c (link_handler): Patch 'outer' field of siblings of the
2504         range we're demoting.
2506 2004-12-03  Andrew Haley  <aph@redhat.com>
2508         PR java/18697
2509         * class.c (layout_class_method): Don't fail to override a method
2510         simply because it has DECL_ARTIFICIAL set.
2512 2004-12-02  Tom Tromey  <tromey@redhat.com>
2514         PR java/16675:
2515         * parse.y (craft_constructor): Special case null_pointer_node.
2517 2004-12-02  Tom Tromey  <tromey@redhat.com>
2519         PR java/18741:
2520         * java-gimplify.c (java_gimplify_expr): Don't call
2521         SET_EXPR_LOCATION unless wrapped tree is an expression.
2523 2004-11-27  Per Bothner  <per@bothner.com>
2525         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
2526         Fix fencepost error in 'i', which got executed one too many times.
2527         Also, fold memcpy into explicit loop, as originally intended.
2528         Also, free temporary 'buf' which otherwise leaks.
2530 2004-11-27  Per Bothner  <per@bothner.com>
2532         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2533         local static variables if not USE_MAPPED_LOCATION.
2535 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2537         * class.c, decl.c, expr.c: Fix comment typos.
2539 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
2541         PR java/18305
2542         * decl.c (end_java_method): Call
2543         attach_init_test_initialization_flags on all the init_decls.
2544         * parse.y (attach_init_test_initialization_flags): Move to ...
2545         * expr.c (attach_init_test_initialization_flags): here and
2546         support BIND_EXPR also.
2547         * java-tree.h (attach_init_test_initialization_flags): Prototype.
2548         * jcf-parse.c (parse_class_file): Don't disable class init
2549         optimization.
2551 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2553         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
2554         in diagnostics.
2556 2004-11-24  Richard Henderson  <rth@redhat.com>
2558         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
2559         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2561 2004-11-24  Tom Tromey  <tromey@redhat.com>
2563         * verify.c (defer_merging): Don't use C++-style comment.
2564         * verify.h (java_opcode): Added java_opcode_end.
2565         * class.c (build_class_ref): Remove C++ comment and old FIXME.
2567         * verify-impl.c (vfy_push_type): Removed bogus "return".
2568         (initialize_stack): Use vfy_alloc and vfy_free.
2569         (verify_instructions_0): Likewise.
2571         * Merged gcj-abi-2-dev-branch to trunk.
2573 2004-11-24  Andrew Haley  <aph@redhat.com>
2575         * jcf-parse.c (parse_class_file): Set file_start_location.
2577 2004-11-10  Tom Tromey  <tromey@redhat.com>
2579         * class.c (make_field_value): Don't call build_static_field_ref.
2580         (build_static_field_ref): Don't emit direct references when using
2581         indirect dispatch.
2583         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
2584         -verbose:class into man page synopsis.
2586 2004-11-09  Tom Tromey  <tromey@redhat.com>
2588         * expr.c (build_java_arraystore_check): Still generate check if
2589         element type is itself an array.
2591 2004-11-08  Tom Tromey  <tromey@redhat.com>
2593         * java-tree.h (soft_check_assignment_node): Removed.
2594         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
2595         * decl.c (java_init_decl_processing): Don't initialize
2596         soft_check_assignment_node.
2598 2004-11-05  Tom Tromey  <tromey@redhat.com>
2600         * class.c (layout_class_methods): Don't add Miranda methods when
2601         using indirect dispatch.
2603 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
2605         * class.c (make_class_data): Call emit_assertion_table to set the
2606         'assertion_table' field.
2607         (build_signature_for_libgcj): Move here from expr.c.
2608         (add_assertion_table_entry): New function. Callback for assertion
2609         hashtable traversal.
2610         (emit_assertion_table): New. Take class argument, and generate
2611         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
2612         * decl.c (init_decl_processing): Define assertion_entry_type record.
2613         Push 'assertion_table' class field instead of 'verify'.
2614         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
2615         (type_assertion_hash): Include 'assertion_code' in hash.
2616         (add_type_assertion): Rewritten. Take class and assertion_code
2617         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
2618         (can_widen_reference_to): Use new add_type_assertion() arguments.
2619         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
2620         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
2621         (verify_identifier_node): Removed.
2622         (assertion_entry_type, assertion_table_type): New.
2623         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
2624         assertion code definitions.
2625         (struct type_assertion): Add assertion_code. Rename 'source_type' and
2626         'target_type' to 'op1' and 'op2'.
2627         (add_type_assertion): Declare.
2628         (lang_printable_name_wls): Remove unused definition.
2629         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
2630         to emit runtime assertion.
2631         (vfy_note_stack_type): Clean up non-C90 declarations.
2632         (vfy_note_local_type): Likewise.
2633         * verify.h (vfy_is_assignable_from): Declare.
2634         * verify-impl.c (is_assignable_from_slow): Remove unused function.
2635         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
2636         instead of is_assignable_from_slow().
2637         (types_compatible): Reinstate ref_compatible() call.
2639 2004-11-04  Tom Tromey  <tromey@redhat.com>
2641         * class.c (build_static_field_ref): Reverted previous patch.
2643         * class.c (build_static_field_ref): Don't emit direct references
2644         when using indirect dispatch.
2646 2004-11-03  Tom Tromey  <tromey@redhat.com>
2648         * expr.c (expand_java_arrayload): Set lhs_type_node.
2649         (expand_java_arraystore): Set rhs_type_node.
2651 2004-11-02  Tom Tromey  <tromey@redhat.com>
2653         * jcf-parse.c (compute_class_name): Use filename length from zip
2654         directory, not strlen.
2656         * expr.c (expand_invoke): Mark new interface methods as abstract.
2658 2004-11-01  Tom Tromey  <tromey@redhat.com>
2660         * verify-impl.c (push_jump): Removed check for uninitialized
2661         objects.
2662         (push_exception_jump): Likewise.
2663         (handle_ret_insn): Likewise.
2664         (handle_jsr_insn): Likewise.
2665         (state_check_no_uninitialized_objects): Removed.
2667         * decl.c (check_local_unnamed_variable): Recognize
2668         promoted-to-int parameters when using the new verifier.
2669         * expr.c (expand_java_arraystore): Explicitly request array type
2670         when using new verifier.
2671         (expand_java_arrayload): Likewise.
2672         (invoke_build_dtable): Don't pass object_type_node as
2673         expression argument to build_java_indirect_ref.
2674         (build_java_check_indexed_type): Do nothing.
2675         (build_java_arraystore_check): Handle case where array doesn't
2676         have array type.
2677         (build_java_array_length_access): Likewise.
2678         (expand_invoke): Handle case where interface overrides a method
2679         from Object.
2680         (pop_type_0): Always succeed for reference types.
2681         (process_jvm_instruction): Don't pop a value in a dead
2682         exception handler.
2683         (pop_arguments): Convert arguments to correct types.
2685 2004-10-29  Andrew Haley  <aph@redhat.com>
2687         * jcf-parse.c (give_name_to_class): Remove line that was
2688         incorrectly merged.
2690 2004-10-29  Andrew Haley  <aph@redhat.com>
2692         * jcf-parse.c (set_source_filename): Add code to build new sfname.
2694 2004-10-20  Andrew Haley  <aph@redhat.com>
2696         * decl.c (end_java_method): Don't expand if flag_syntax_only.
2698 2004-10-26  Tom Tromey  <tromey@redhat.com>
2700         * verify.h (vfy_notify_verified): Removed.
2701         * verify-glue.c (vfy_notify_verified): Removed.
2703 2004-10-26  Tom Tromey  <tromey@redhat.com>
2705         * verify-impl.c (debug_print_state): Declare `i' before code.
2706         (merge_types): Modify `t' when it is null_type.
2708 2004-10-26  Tom Tromey  <tromey@redhat.com>
2710         * verify-impl.c (type_print): Renamed from print.  Now static and
2711         takes an argument.
2712         (debug_print_state): Use type_print.
2714 2004-10-25  Tom Tromey  <tromey@redhat.com>
2716         * expr.c (build_invokeinterface): Compute correct offset for
2717         index into interface methods.
2719 2004-10-20  Tom Tromey  <tromey@redhat.com>
2721         * java-tree.h (verify_jvm_instructions_new): Declare.
2723         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
2724         command line.
2726         * verify-impl.c (verify_instructions): Correctly handle wide
2727         types on the stack.
2728         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
2729         (vfy_get_component_type): Strip pointer types.
2730         (vfy_find_class): Use get_type_from_signature.  Strip pointer
2731         types.
2732         Include java-except.h.
2734 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
2736         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
2737         vfy_push_type_t, set_variable, add_new_state, merge_into,
2738         handle_jsr_insn, branch_prepass, check_class_constant,
2739         check_wide_constant, get_one_type, compute_static_types,
2740         verify_instructions_0): Clean up C99 declarations after statements.
2742 2004-10-20  Tom Tromey  <tromey@redhat.com>
2744         * verify-impl.c (merge_refs): Compare reference against iterator,
2745         not ref2.
2747         * verify-glue.c (vfy_tag): Mask off resolved flag.
2749 2004-10-19  Tom Tromey  <tromey@redhat.com>
2751         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
2752         (init_state_with_stack): Initialize `this_type' in state.
2753         (verify_method): Use debug_print.
2754         * verify-glue.c (vfy_is_primitive): Removed debugging print.
2755         (vfy_note_stack_depth): Reverted last patch.
2756         (vfy_note_stack_type): Note pointer to Object, not Object.
2757         (vfy_note_local_type): Likewise.
2759         * verify.h (vfy_note_instruction_seen): Declare.
2760         * verify-glue.c (verify_jvm_instructions_new): Set
2761         BCODE_EXCEPTION_TARGET on target instruction.
2762         (vfy_note_instruction_seen): New function.
2763         * verify-impl.c (FLAG_INSN_SEEN): New define.
2764         (verify_instructions_0): Set flag on instruction.  Save state for
2765         PC=0 later.
2766         (verify_instructions): Call vfy_note_instruction_seen.
2768         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
2769         (verify_jvm_instructions_new): Call method_init_exceptions,
2770         add_handler, and handle_nested_ranges.
2771         * verify-impl.c (verify_method): Return 1 on success.
2772         (verify_instructions_0): Save the state at PC=0.
2774         * verify-impl.c (init_type_from_class): Set is_resolved and
2775         ref_next on new ref_intersection.
2776         (init_type_from_string): Likewise.
2778 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
2780         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
2781         if flag_new_verifier is set.
2782         * java-tree.h (flag_new_verifier): Declare.
2783         * lang.opt (fnew-verifier): New option.
2784         * verify-impl.c: Work around namespace pollution by undef'ing
2785         'current_class'.
2786         (struct verifier_context): Make 'bytecode' const.
2787         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
2788         (types_compatible): For the BC-ABI, always consider reference types
2789         compatible.
2790         (check_class_constant): Use vfr->current_class.
2791         (check_constant): Likewise.
2792         (check_wide_constant): Likewise.
2793         (check_field_constant): Check for 'L' at start of type name.
2794         (get_one_type): Return pointer instead of type. Set type result in
2795         caller via passed type pointer.
2796         (compute_argument_types): Update to use new get_one_type arguments.
2797         (compute_return_type): Likewise.
2798         (make_verifier_context): New. Allocate and initialize 'vfr'.
2799         (free_verifier_context): New. Free 'vfr' and its contents.
2800         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
2801         and free_verifier_context.
2803 2004-10-15  Tom Tromey  <tromey@redhat.com>
2805         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
2806         * verify.h (vfy_fail): Fixed formatting.
2808         * verify-impl.c (vfr): Fixed comment formatting.
2809         (collapse_type): New function.
2810         (verify_instructions): Notify compiler about type map.
2811         * verify.h (vfy_note_stack_depth): Updated.
2812         (vfy_note_stack_type): Likewise.
2813         (vfy_note_local_type): Likewise.
2814         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
2815         Declare.
2816         * verify-glue.c (vfy_note_stack_depth): Correctly size type
2817         state.  Added `method' argument.
2818         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
2819         argument.
2820         (vfy_note_local_type): New function.
2821         (vfy_unsuitable_type): Likewise.
2822         (vfy_return_address_type): Likewise.
2823         (vfy_null_type): Likewise.
2825         * verify.h (VFY_IN_GCC): Removed.
2826         (VFY_WANT_TYPEMAP): Removed.
2827         * verify-impl.c (verify_instructions_0): Removed useless "\".
2828         (struct state) <next>: Uncomment.
2830 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
2832         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
2833         C-style.
2835 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2837         * Make-lang.in (verify.o): Re-enabled this target.
2838         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
2839         (vfy_get_interface): Likewise.
2840         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
2841         * verify.h (verify_jvm_instructions_new): Declare.
2842         * verify-impl.c (free_state): Temporarily comment out unused
2843         function.
2845 2004-10-06  Tom Tromey  <tromey@redhat.com>
2847         * java-tree.h (JV_STATE_READ): New enum value.
2849 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2851         * verify.h: New file.
2853 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
2855         * verify-impl.c, verify-glue.c, verify.h: New files.
2856         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
2858 2004-09-24  Andrew Haley  <aph@redhat.com>
2860         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
2861         for a slot if it's of pointer type.
2863 2004-09-14  Tom Tromey  <tromey@redhat.com>
2865         * class.c (make_class_data): Correctly initialize "state" field.
2866         Initialize "engine" field.
2867         * decl.c (java_init_decl_processing): Add "engine" field.
2869 2004-09-10  Andrew Haley  <aph@redhat.com>
2871         PR java/12760
2872         * expr.c (build_invokeinterface): Use fast method for interface
2873         dispatch.
2874         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
2875         JTI_ITABLE_PTR_TYPE.
2876         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
2877         (emit_symbol_table): Add new arg, element_size.
2878         * decl.c (java_init_decl_processing): Initialize Class.itable.
2879         * class.c (GEN_TABLE): New macro.
2880         (gen_indirect_dispatch_tables): Use it.  Add itable.
2881         (make_class_data): Add new arg for emit_symbol_table().
2882         Emit itable.
2883         (add_miranda_methods): Make sure search_class has been parsed.
2884         (emit_symbol_table): Add new arg, element_size.
2886 2004-09-06  Andrew Haley  <aph@redhat.com>
2888         * verify.c (merge_types): Return Object for all merges of
2889         interfaces.
2890         * expr.c (add_type_assertion): Don't generate assertions when
2891         source type is array of Object.
2893 2004-09-03  Andrew Haley  <aph@redhat.com>
2895         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
2897         * lang.c (java_post_options): Force flag_verify_invocations if
2898         we're not using indirect dispatch.
2900         * expr.c (pop_type_0): Move test for interfaces before call to
2901         can_widen_reference_to().
2902         (build_signature_for_libgcj): Remove generation of canonical array
2903         type.
2904         (add_type_assertion): Canonicalize both arrays.
2905         Don't assert that type X can be assigned to Object.
2906         Don't assert that type X an be assigned to type X.
2907         Don't assert that Object can be assigned to type X.
2908         (can_widen_reference_to): Warn whenever we generate an assertion.
2909         (process_jvm_instruction): Use throwable_type_node for the type of
2910         an exception class.
2912 2004-09-01  Andrew Haley  <aph@redhat.com>
2914         * decl.c (java_init_decl_processing): Change
2915         verify_identifier_node to "__verify".
2916         * expr.c (add_type_assertion): Use verify_identifier_node for name.
2917         * java-tree.h (verify_identifier_node): Change to "__verify".
2919         * expr.c (build_signature_for_libgcj): New function.
2920         (add_type_assertion): Use it to construct signatures for
2921         source_type and target_type.
2923 2004-08-27  Andrew Haley  <aph@redhat.com>
2925         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
2926         (verify_identifier_node): New.
2927         (TYPE_VERIFY_METHOD): New.
2928         (struct type_assertion): New type.
2929         * expr.c (type_assertion_eq): New function.
2930         (type_assertion_hash): New function.
2931         (add_type_assertion): New function.
2932         (can_widen_reference_to): Call add_type_assertion().
2933         * decl.c (java_init_decl_processing): Add verify_identifier_node.
2934         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
2935         (finish_class): Output TYPE_VERIFY_METHOD (type).
2937         * decl.c (end_java_method): Nullify unused fields.
2939 2004-08-17  Andrew Haley  <aph@redhat.com>
2941         * verify.c (defer_merging): Quieten.
2942         * jcf-parse.c (load_class): Only try to open a class file if it's
2943         java.lang.Object or if it's part of the current compilation.
2944         Check that the class we just tried to load is the class we just
2945         loaded.  Quieten.
2946         (java_parse_file): Set flag_verify_invocations off if we're
2947         compiling from .class.
2948         (parse_zip_file_entries): Abort if we try to read a dummy class.
2949         * expr.c (can_widen_reference_to): Quieten.
2950         (build_invokevirtual): Abort if we try to invokevirtual an
2951         interface.
2952         (expand_invoke): Don't build a non-interface call to an interface.
2953         (build_instanceof): Don't do premature optimization if
2954         flag_verify_invocations is not set.
2955         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
2956         from superclass.
2957         (build_static_field_ref): Add correct type conversion for
2958         field_address.
2959         (add_miranda_methods): Disable generation of Miranda methods for
2960         dummy classes.
2961         (layout_class_method): Don't complain about non-static method
2962         overrides static method with dummy classes.
2964 2004-08-13  Tom Tromey  <tromey@redhat.com>
2966         * class.c (build_static_field_ref): Re-enable atable lookups for
2967         static fields.
2969         * parse.y (strip_out_static_field_access_decl): Indentation fix.
2971 2004-08-11  Tom Tromey  <tromey@redhat.com>
2973         * gcj.texi (libgcj Runtime Properties): Document new properties.
2975 2004-08-06  Andrew Haley  <aph@redhat.com>
2977         * jcf-parse.c (load_class): Check that we really have loaded the
2978         class we're looking for.
2980 2004-07-19  Andrew Haley  <aph@redhat.com>
2982         * verify.c (verify_jvm_instructions): Comment change only.
2984         * typeck.c (build_java_array_type): Add size field to array name.
2986         * java-tree.h (LOCAL_SLOT_P): New.
2987         (update_aliases): Add PC argument.
2988         (pushdecl_function_level): New function.
2990         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2991         MODIFY_EXPR, and SAVE_EXPR.
2992         (java_gimplify_modify_expr): New function.
2994         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2995         (expand_iinc): Pass PC to update_aliases().
2996         (STORE_INTERNAL): Likewise.
2997         (process_jvm_instruction): Likewise.
2999         * decl.c (base_decl_map): New variable.
3000         (uniq): New variable.
3001         (update_aliases): Rewrite with more thorough checking.
3002         (debug_variable_p): New function.
3003         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3004         (check_local_named_variable): Delete whole function.
3005         (initialize_local_variable): New function.
3006         (check_local_unnamed_variable): Add checks and comments.
3007         (find_local_variable): Rewrite.
3008         (java_replace_reference): New function.
3009         (function_binding_level): New variable.
3010         (pushdecl_function_level): New function.
3011         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3012         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3013         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3014         function_binding_level.
3015         (end_java_method): Null unused fields to save memory.
3017 2004-06-29  Andrew Haley  <aph@redhat.com>
3019         * except.c (expand_start_java_handler): Push a new binding level.
3020         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3021         register_exception_range() to register where we'll do it.
3022         (expand_end_java_handler): Remove old bogus code.  Replace with
3023         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3024         the top of the expression we're curently building.
3025         (maybe_end_try): Delete.
3026         * decl.c (binding_level.exception_range): New field.
3027         (clear_binding_level): Add field exception_range.  Reformat.
3028         (poplevel): Call expand_end_java_handler().
3029         (poplevel): Call java_add_stmt only if functionbody is false.
3030         (maybe_poplevels): Don't call maybe_end_try() from here.
3031         (end_java_method): Clear no longer used trees in function decl.
3032         (register_exception_range): New function.
3033         * java-tree.h (register_exception_range, struct eh_range): Declare.
3035 2004-06-22  Andrew Haley  <aph@redhat.com>
3037         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3038         the otable.
3039         * check-init.c (get_variable_decl): Teach check-init about
3040         FIELD_DECLs addressed via the otable.
3041         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3042         CLASS_PARSED_P.
3044 2004-05-28  Andrew Haley  <aph@redhat.com>
3046         * jcf-parse.c (load_class): Don't try to read a class that we've
3047         already read.
3049         * expr.c (build_invokeinterface): Use the old-fashioned way of
3050         doing indirect dispatch: look up interfaces by name.
3051         * java-tree.h (enum java_tree_index): Add
3052         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3053         * decl.c (java_init_decl_processing): Add
3054         soft_lookupinterfacemethodbyname_node.
3056         * gjavah.c (print_method_info): Final methods have vtable entries,
3057         so gjavah needs to output them.
3058         * class.c (layout_class_method): Generate vtable entries for final
3059         methods.
3060         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3061         dispatch, even if a method is final.
3063 2004-05-25  Andrew Haley  <aph@redhat.com>
3065         * class.c (build_symbol_entry): Convert the names of constructors
3066         to init_identifier_node when generating an entry for the indirect
3067         dispatch table.
3069         * expr.c (build_known_method_ref): Generate indirect calls for
3070         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3072 2004-05-24  Andrew Haley  <aph@redhat.com>
3074         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3075         atable element is of the right type.
3077         * class.c (build_static_field_ref): Cast pointer to correct type
3078         for field.
3080 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3082         * Merged with HEAD as of 20040514. Diff against
3083         gcj-abi-2-merge-20040514.
3085 2004-04-16  Andrew Haley  <aph@redhat.com>
3087         * verify.c (check_pending_block): Disable subroutine checks.
3088         (defer_merging): New function.
3089         (merge_types): If types are dummy, use defer_merging to combine them.
3090         (verify_jvm_instructions): If invocation is invokeinterface and
3091         target is dummy, assume target really is an interface.
3093         * parse.y (patch_invoke): Break out call to java_create_object.
3095         * lang.c (flag_verify_invocations): New.
3097         * jcf-parse.c (load_class): If we've already failed to load a
3098         class, don't try again.
3099         (load_class): If we can't find a .class file, don't fail, but emit
3100         a warning.
3101         (parse_class_file): Don't act on dummy methods.
3103         * java-tree.h (flag_verify_invocations): New.
3104         (TYPE_DUMMY): New.
3105         (lang_type.dummy_class): New field.
3106         (java_create_object): New function.
3107         (METHOD_DUMMY): New.
3109         * expr.c (build_field_ref): Widen field offset.
3110         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3111         that each of its elements is compatible with the one we're
3112         popping.
3113         (pop_type_0): Issue a warning to say that we need to generate a
3114         runtime check.
3115         (java_create_object): New function.
3116         (build_field_ref): Only generate hard refs if we're not using
3117         indirect dispatch.
3118         (expand_java_field_op): If we're using !verify_invocations and we
3119         see a missing field, generate a decl for it.
3121         (expand_invoke): If a class doesn't have the method we seek and
3122         we're using !flag_verify_invocations, generate a decl for the
3123         method now.
3125         (build_known_method_ref): Always use indirect dispatch via the
3126         atable for static methods.
3128         (expand_java_NEW): Break out object creation into new function,
3129         java_create_object.
3131         (can_widen_reference_to): Issue a warning to say that we need to
3132         generate a runtime check.
3134         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3135         (make_method_value): Also use index for interfaces.
3136         (make_class_data): Skip dummy field for inherited data.
3137         Don't build method array for dummy methods.
3138         Set size_in_byte to -1 when using inirect dispatch
3139         Don't build a hard class ref if we don't have a hard ref to our
3140         superclass, or if we're using inirect dispatch.
3141         Null out dispatch tables.
3143         (layout_class_method): Don't complain about non-static method
3144         overrides static method is method is artificial.
3146         (build_static_field_ref): Disable atable references to static
3147         fields for the time being.
3149         (layout_class_methods): Check for CLASS_INTERFACE as
3150         well as CLASS_ABSTRACT.
3152 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3154         * class.c (make_class_data): Don't check flag_inline_functions.
3155         * lang.c (flag_really_inline): Remove unused flag.
3156         (java_handle_option): Don't set it here.  Remove special handling
3157         of flag_inline_functions for Java.
3158         (java_init): Don't set flag_inline_trees here.  Already done...
3159         (java_post_options): ...here.  Don't clear flag_inline_functions.
3161 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3163         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3164         (java_gimplify_exit_block_expr): New function.
3165         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3166         LABELED_BLOCK_EXPR.
3167         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3168         (EXIT_BLOCK_EXPR): Likewise.
3169         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3170         (LABELED_BLOCK_BODY): Likewise.
3171         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3172         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3173         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3174         TREE_OPERAND.
3175         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3176         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3177         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3178         second operand of EXIT_BLOCK_EXPR.
3179         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3180         TREE_OPERAND.
3181         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3183 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3185         * xref.h (xref_flag_value): Remove.
3186         (xref_set_data, xref_get_data): Likewise.
3187         (xref_set_current_fp): Likewise.
3188         (XREF_NONE): Likewise.
3189         (XREF_GET_DATA): Likewise.
3190         * xref.c (xref_flag_value): Remove.
3191         (xref_set_data, xref_get_data): Likewise.
3192         (xref_set_current_fp): Likewise.
3194 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3196         * gjavah.c (output_directory): Make static.
3197         (temp_directory): Likewise.
3199 2004-11-15  Tom Tromey  <tromey@redhat.com>
3201         * decl.c (instn_ptr_type_node): Removed.
3202         (lineNumbers_ptr_type_node): Removed.
3203         (jint_type): Removed.
3204         (jint_ptr_type): Removed.
3206 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3208         PR java/15576
3209         * check-init.c (check_init): Ignore DECL_EXPR.
3210         * expr.c (always_initialize_class_p): Reenable.
3211         (build_class_init): Use a variable to store the decl.  Also use
3212         boolean_false_node instead of integer_zero_node.
3213         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3214         to the block.
3216 2004-11-08  Tom Tromey  <tromey@redhat.com>
3218         PR java/16843:
3219         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3220         generating a JNI header.
3221         (print_field_info): Handle JNI headers.
3222         (jni_print_float): Likewise.
3223         (jni_print_double): Likewise.
3225 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
3227         * decl.c (end_java_method): Remove duplicated code.
3229 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
3230             Gerald Pfeifer  <gerald@pfeifer.com>
3232         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3233         as well.
3235 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
3237         PR java/17265
3238         * class.c: Reinstate 2004-08-18 patch.
3239         (make_local_function_alias): Don't create an alias for extern (native)
3240         functions.
3242 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3244         PR java/17265
3245         * class.c (make_local_function_alias): Revert 2004-08-18 change.
3246         (make_method_value): Likewise.
3248 2004-10-21  Andrew Haley  <aph@redhat.com>
3250         PR java/18091:
3251         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3253 2004-10-20  Andrew Haley  <aph@redhat.com>
3255         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3256         Remove duplicated code block.
3258 2004-10-18  Steven Bosscher  <stevenb@suse.de>
3260         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3261         New rules to work around old Bison warnings.
3263 2004-10-17  Steven Bosscher  <stevenb@suse.de>
3265         * class.c (ident_subst): Always alloca buffer.
3266         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3267         opcode after including javaop.def.
3268         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3269         conditional expression that exits, to avoid warnings.
3270         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3271         a user of an extension.
3272         * win32-host.c: Move check down to have non-empty file when
3273         WIN32 is not defined.
3275         * Make-lang.in (java-warn): Add STRICT_WARN.
3276         (java/jcf-io.o-warn): Don't have Werror for this file.
3277         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3279 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
3281         * expr.c (expr_add_location): Move declaration to before all
3282         statements.
3283         * parse.y (java_expand_classes): Ditto.
3284         * lex.c (java_peek_unicode): Ditto.
3286 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3288         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3289         if possible, else convert `foo' to 'foo'.
3290         * class.c: Likewise.
3291         * decl.c: Likewise.
3292         * expr.c: Likewise.
3293         * jcf-io.c: Likewise.
3294         * jcf-parse.c: Likewise.
3295         * lang.c: Likewise.
3296         * lex.c: Likewise.
3297         * parse.h: Likewise.
3299 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3301         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3302         rename parameter 'msg' to 'msgid' in function declaration.
3303         (issue_warning_error_from_context): Likewise.
3304         (yyerror): Rename parameter 'msg' to 'msgid'.
3305         (all over): Use new quoting style for diagnostics.
3307 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
3309         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3310         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3311         Update copyright.
3313 2004-10-14  Matt Austern  <austern@apple.com>
3315         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3316         pointer_set_t* now.
3318 2004-10-13  Tom Tromey  <tromey@redhat.com>
3320         PR java/15578:
3321         * lang.opt (--extdirs): Document.
3322         * jvspec.c (lang_specific_driver): Recognize -encoding and
3323         -extdirs.
3325 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
3327         * parse.y (issue_warning_error_from_context): Use va_list *
3328         instead of va_list parameter.
3329         (parse_error_context): Update call.
3330         (parse_warning_context): Likewise.
3332 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
3334         * parse.y, parse-scan.y: Add list of diagnostic messages to
3335         insulate translation template from version of yacc/bison used
3336         to compile the grammar.
3338 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
3340         Prepare for %q, %< and %> in diagnostic message strings.
3341         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3342         Name second parameter 'msgid'.
3343         * parse.y: Additionally include pretty-print.h and diagnostic.h.
3344         (issue_warning_error_from_context): Use pretty-printer functions
3345         instead of vsprintf for constructing formatted messages. Rename
3346         parameter 'msg' to 'msgid'.
3347         (parse_error_context): Rename parameter 'msg' to 'msgid'.
3348         (parse_warning_context): Likewise.
3350 2004-10-05  Andrew Haley  <aph@redhat.com>
3352         PR java/17779
3353         * jcf-parse.c (parse_zip_file_entries): If a class has a
3354         superclass and a TYPE_SIZE of zero, lay it out.
3356 2004-09-30  Andrew Haley  <aph@redhat.com>
3358         PR java/17733
3359         * jcf-parse.c (compute_class_name): Rewrite.
3361 2004-10-01  Jan Hubicka  <jh@suse.cz>
3363         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3365 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3367         * lex.c: Fix a comment typo.
3369 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3371         * java-tree.h: Fix a comment typo.
3373 2004-09-30  Per Bothner  <per@bothner.com>
3375         Simplify lexer.  Implement --enable-mapped-location support.
3376         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
3377         (parse_source_file_1): Pass filename as extra parameter, so we can call
3378         linemap_add and set input_location here, rather than in both callers.
3379         (read_class): Pass copied filename to parse_source_file_1.
3380         Don't initialize wfl_operator - only needed for source compilation.
3381         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
3382         * lex.h:  Remove a bunch of debugging macros.
3383         * lex.h (struct_java_line, struct java_error):  Remove types.
3384         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
3385         (struct java_lc_s):  Remove prev_col field.
3386         (struct java_lexer):  New fields next_unicode, next_columns, and
3387         avail_unicode.  New position field, and maybe token_start field.
3388         Don't need hit_eof field - use next_unicode == -1 instead.
3389         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
3390         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
3391         * parse.h:  Various changes for USE_MAPPED_LOCATION.
3392         (EXPR_WFL_EMIT_LINE_NOTE): XXX
3393         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3394         (struct parser_ctxt):  New file_start_location field.
3395         Remove p_line, c_line fields since we no longer save lines.
3396         Remove elc, lineno, and current_jcf fields - no longer used.
3397         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
3398         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3399         source_location and is probably not needed anymore anyway.
3400         Use new expr_add_Location function.
3401         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
3402         (java_pop_parser_context):  Minor cleanup.
3403         (java_parser_context_save_global, java_parser_context_restore_global,
3404         java_pop_parser_context):  Save/restore input_location as a unit.
3405         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
3406         a source_location instead of a wfl context node.
3407         (check_class_interface_creation):  input_filename is not addressable.
3408         (create_artificial_method):  Calling java_parser_context_save_global
3409         and java_parser_context_restore_global is overkill.  Instead,
3410         temporarily set input_location from class decl.
3411         (java_layout_seen_class_methods): Set input_location from method decl.
3412         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
3413         (finish_loop_body):  Likewise.
3414         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
3415         (java_sprint_unicode):  Take a character, not index in line.
3416         (java_sneak_uncode):  Replaced by java_peek_unicode.
3417         (java_unget_unicode):  No longer used.
3418         (java_allocate_new_line. java_store_unicode):  Removed, since we
3419         no longer remember "lines".
3420         (java_new_lexer):  Update for new data structures.
3421         (java_read_char):  Move unget_value checking to java_read_unicode.
3422         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
3423         efficient functions that are used directly when lexing.
3424         (java_read_unicode_collapsing_terminators):  No longer needed.
3425         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
3426         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
3427         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
3428         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
3429         combine switch branches, and test for common token kinds earlier.
3430         (java_lex_error):  Rewrite.
3431         * jv-scan.c (expand_location): New function, copied from tree.c.
3432         (main): Set ctxp->filename instead of setting input_filename directly.
3434 2004-09-30  Per Bothner  <per@bothner.com>
3436         More cleanup for --enable-mapped-location.
3437         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
3438         input_location here.  Instead do it in give_name_to_class.
3439         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
3440         * expr.c (expand_byte_code): Call linemap_line_start.
3441         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
3442         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
3443         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
3444         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
3445         to USE_MAPPED_LOCATION case.
3447         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
3448         * jcf-parse.c (java_parse_file): Don't set input_filename.
3449         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
3450         Create a list of TRANSLATION_UNIT_DECL.
3451         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
3452         reason is so we can set a DECL_SOURCE_LOCATION for each file.
3453         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
3454         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
3455         (file_start_location):  New static.
3456         (set_source_filename):  Avoid extra access to input_filename macro.
3457         Concatenate new name with class's package prefix.
3458         (set_source_filename, give_name_to_class): Update.
3459         (give_name_to_class):  Set class's "line 0" input_location here.
3460         (parse_class_file):  Set input_location as a unit.
3462         * jcf-parse.c (load_class): Sanity test if missing inner class file.
3464 2004-09-29  Per Bothner  <per@bothner.com>
3466         * java-tree.h:  Redefine some macros and add some declaration
3467         to handle the USE_MAPPED_LOCATION case.
3468         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
3469         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
3470         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
3471         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
3473         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
3474         * decl.c (finish_method, java_add_stmt): Likewise.
3475         * java-gimplify.c (java-gimplify.c):  Likewise.
3476         * jcf-write.c (generate_bytecode_insns):  Likewise.
3477         * lang.c (java_post_options): Likewise - call linemap_add.
3479 2004-09-29  Andrew Haley  <aph@redhat.com>
3481         PR java/17007
3482         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
3483         result of TRUNC_MOD_EXPR.
3484         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
3485         * decl.c (java_init_decl_processing): Mark
3486         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
3488 2004-09-28  Tom Tromey  <tromey@redhat.com>
3490         PR java/15710:
3491         * class.c (add_miranda_methods): Load superinterface if not
3492         already loaded.
3494 2004-09-28  Andrew Haley  <aph@redhat.com>
3496         PR java/17586
3497         * jcf-parse.c (load_class): Don't try to read a class that we've
3498         already read.
3500 2004-09-28  Andrew Haley  <aph@redhat.com>
3502         * jcf-parse.c (load_class): Back out previous broken patch.
3504 2004-09-28  Andrew Haley  <aph@redhat.com>
3506         PR java/17586
3507         * jcf-parse.c (load_class): Don't try to read a class that we've
3508         already read.
3509         Check that we really did read the right class.
3511 2004-09-25  Tom Tromey  <tromey@redhat.com>
3513         PR java/17500:
3514         * parse.y (create_artificial_method): Use add_method_1.
3516 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
3518         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3519         comment typos.
3520         * gcj.texi: Fix typos.
3522 2004-09-24  Tom Tromey  <tromey@redhat.com>
3524         PR java/15656:
3525         * parse.y (class_instance_creation_expression): Set `$$' to NULL
3526         in error parts of rule.
3527         (unary_expression): Don't call error_if_numeric_overflow when $1
3528         is NULL.
3530 2004-09-24  Tom Tromey  <tromey@redhat.com>
3532         PR java/16789:
3533         * parse.y (resolve_qualified_expression_name): Set
3534         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
3535         * expr.c (force_evaluation_order): Check for empty argument list
3536         after stripping COMPOUND_EXPR.
3538 2004-09-23  Andrew Haley  <aph@redhat.com>
3540         PR java/16927:
3541         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
3542         COND_EXPRs.
3544 2004-09-23  Tom Tromey  <tromey@redhat.com>
3546         PR java/17329:
3547         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
3548         where operand is null.
3550 2004-09-23  Tom Tromey  <tromey@redhat.com>
3552         PR java/17380:
3553         * parse.y (not_accessible_p): Allow access to protected members
3554         even when class is not static.
3556 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
3558         * Make-lang.in: Revert the gcc-none.o change.
3560 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3562         * parse.y (patch_anonymous_class): VEC_space returns true if there
3563         is space.
3565 2004-09-21  Matt Austern  <austern@apple.com>
3567         Fix bootstrap.
3568         * gjavah.c (free_method_name_list): Fix function definition so
3569         it's a proper C prototype.
3571 2004-09-21  Tom Tromey  <tromey@redhat.com>
3573         PR java/17575:
3574         * gjavah.c (free_method_name_list): New method.
3575         (main): Call it.
3577 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3578             Zack Weinberg  <zack@codesourcery.com>
3580         * java-tree.def: Use tree_code_class enumeration constants
3581         instead of code letters.
3582         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
3583         new tree-class enumeration constants.
3585 2004-09-13  Tom Tromey  <tromey@redhat.com>
3587         PR java/17216:
3588         * class.c (layout_class_method): Put synthetic methods into the
3589         vtable.
3591 2004-09-11  Andrew Pinski  <apinski@apple.com>
3593         * Make-lang.in (java/ggc-none.c): Change dependency
3594         for ggc.h into $(GGC_H).
3596 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3598         * Make-lang.in (java/win32-host.o): Add dependency on
3599         coretypes.h.
3600         * win32-host.c: Add includes for coretypes.h, jcf.h
3602 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3604         * Make-lang.in (GCJH_OBJS): Change dependency from
3605         ggc-none.o to java/ggc-none.o
3606         (JCFDUMP_OBJS): Likewise.
3607         (java/ggc-none.o): New target.
3609 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3611         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
3612         * class.c (build_utf8_ref, build_static_field_ref,
3613         make_field_value, make_method_value, get_dispatch_table,
3614         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3615         * constants.c (get_tag_node, build_ref_from_constant_pool,
3616         build_constants_constructor): Likewise.
3617         * decl.c (java_init_decl_processing): Likewise.
3618         * expr.c (build_java_array_length_access, build_newarray,
3619         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3620         build_java_binop, build_field_ref, expand_java_add_case,
3621         expand_java_call, build_known_method_ref, build_invokevirtual,
3622         build_invokeinterface, build_jni_stub): Likewise.
3623         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3624         * jcf-parse.c (get_constant): Likewise.
3625         * lex.c (do_java_lex): Likewise.
3626         * parse.y (patch_binop, patch_unaryop, patch_cast,
3627         build_newarray_node, patch_newarray): Likewise.
3628         * resource.c (compile_resource_data): Likewise.
3629         * typeck.c (build_prim_array_type): Likewise.
3631 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3633         * decl.c (java_init_decl_processing): Adjust
3634         initialize_sizetypes call.
3636 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3638         * jv-scan.c (fancy_abort): Add.
3640 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
3642         * expr.c (build_java_arrayaccess): Use convert to change
3643         len's type.
3645 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
3647         * class.c (make_local_function_alias): Allocate extra space for 'L'
3648         in name buffer. Reported by Thomas Neumann.
3650 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3652         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
3653         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
3654         * lex.c (do_java_lex): Adjust.
3655         (error_if_numeric_overflow): Likewise.
3657 2004-08-18  Andrew Pinski  <apinski@apple.com>
3659         * class.c (make_local_function_alias): Only make a new decl if we
3660         support alias attribute on all decls.
3662 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
3664         * class.c (make_local_function_alias): New function. Create local
3665         alias for public method DECL.
3666         (make_method_value): Use make_local_function_alias.
3667         * parse.y (craft_constructor): Don't special-case anonymous classes.
3668         Always set ctor_name to init_identifier_node.
3669         (lookup_method_invoke): Call layout_class_method when creating
3670         anonymous class constructor.
3672 2004-08-18  Richard Henderson  <rth@redhat.com>
3674         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
3675         default case.  Treat '<' similarly.  Update for
3676         is_gimple_formal_tmp_var name change.
3678 2004-08-17  Andrew Haley  <aph@redhat.com>
3680         * lang.c (lang_printable_name): Obey verbose flag.
3681         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
3682         lang_printable_name().
3683         (verify_constructor_circularity, get_printable_method_name,
3684         check_abstract_method_definitions, java_check_regular_methods,
3685         java_check_abstract_methods, check_inner_class_access,
3686         fix_constructors, patch_method_invocation, patch_return):
3687         Likewise.
3688         * expr.c (pop_type_0): Likewise.
3690         * java-tree.h (lang_printable_name_wls): Delete.
3692 2004-08-16  Tom Tromey  <tromey@redhat.com>
3694         PR java/8473:
3695         * parse.y (primary): Changed for initialized and uninitialized
3696         array creations.
3697         (array_access): Handle array_creation_initialized.
3698         (array_creation_expression): Split into
3699         array_creation_initialized and array_creation_uninitialized.
3701 2004-08-16  Andrew Haley  <aph@redhat.com>
3703         * jcf-write.c (find_constant_index): Canonicalize NaNs when
3704         generating bytecode.
3706 2004-08-16  Elliot Lee <sopwith@redhat.com>
3708         PR java/9677
3709         * jcf-parse.c (java_parse_file): Handle filenames with embedded
3710         spaces, and quoted filelists.
3712 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3714         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
3715         * class.c (build_utf8_ref, build_static_field_ref,
3716         make_field_value, make_method_value, get_dispatch_table,
3717         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3718         * constants.c (get_tag_node,  build_ref_from_constant_pool,
3719         build_constants_constructor): Likewise.
3720         * decl.c (java_init_decl_processing): Likewise.
3721         * expr.c (build_java_array_length_access, build_newarray,
3722         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3723         build_java_binop, build_field_ref, expand_java_add_case,
3724         expand_java_call, build_known_method_ref, build_invokevirtual,
3725         build_invokeinterface, build_jni_stub): Likewise.
3726         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3727         * jcf-parse.c (get_constant): Likewise.
3728         * lex.c (do_java_lex): Likewise.
3729         * parse.y (patch_binop, patch_unaryop, patch_cast,
3730         build_null_of_type, patch_newarray): Likewise.
3731         * resource.c (compile_resource_data): Likewise.
3732         * typeck.c (build_prim_array_type): Likewise.
3734 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
3736         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
3737         Don't create BLOCK here or call java_gimplify_block.
3739 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3741         * java-tree.h (flag_deprecated): Removed.
3742         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
3743         * parse.y (check_deprecation): Check warn_deprecated instead of
3744         flag_deprecated.
3746 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
3748         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
3749         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
3750         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
3751         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
3752         flag_force_classes_archive_check, flag_optimize_sci,
3753         flag_indirect_dispatch): Remove explicit declarations.
3754         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
3755         final comment.
3757 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
3759         PR bootstrap/14893
3760         * Make-lang.in (java.install-man): Install from either build
3761         tree or source tree, whichever has the file first.
3763 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
3765         * jcf-parse.c (get_constant): Adjust force_fit_type call.
3766         * lex.h (SET_LVAL_NODE_TYPE): Remove.
3767         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
3768         (do_java_lex): Likewise. Adjust force_fit_type call.
3770 2004-08-04  Roger Sayle  <roger@eyesopen.com>
3771             Andrew Haley  <aph@redhat.com>
3773         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
3774         checking trees as they're being built.
3775         (convert): Call convert_ieee_real_to_integer if we're
3776         converting a constant, even if we're writing a class file.
3778 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
3780         PR java/16701
3781         * parse.y (fold_constant_for_init): Call resolve_field_access with
3782         correct current_class context.
3784 2004-08-01  Roger Sayle  <roger@eyesopen.com>
3786         * decl.c (update_aliases, initialize_local_variable): Replace calls
3787         to build with calls to buildN.
3788         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
3789         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
3790         * parse.h (BUILD_THROW): Likewise.
3791         * parse.y (switch_expression, synchronized_statement,
3792         catch_clause_parameter, array_creation_expression,
3793         conditional_expression, make_qualified_name,
3794         resolve_qualified_expression_name, patch_method_invocation,
3795         patch_invoke, build_method_invocation, build_new_invocation,
3796         build_assignment, patch_assignment, build_binop, patch_binop,
3797         build_string_concatenation, build_incdec, patch_unaryop,
3798         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
3799         patch_return, build_if_else_statement, build_labeled_block,
3800         build_new_loop, build_loop_body, build_bc_statement,
3801         build_assertion, encapsulate_with_try_catch, build_try_statement,
3802         build_try_finally_statement, patch_synchronized_statement,
3803         emit_test_initialization): Likewise, replace build with buildN.
3805 2004-07-28  Eric Christopher  <echristo@redhat.com>
3807         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3808         (java_unsafe_for_reeval): Ditto.
3810 2004-07-26    <hp@bitrange.com>
3812         * parse.y (build_super_invocation): Adjust declaration order to
3813         avoid declaration after statement.
3815 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
3817         * decl.c: Rename all identifiers named `class' to `cl'.
3819 2004-07-25  Richard Henderson  <rth@redhat.com>
3821         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
3823 2004-07-23  Mike Stump  <mrs@apple.com>
3825         * boehm.c (set_bit): Improve type safety wrt unsignedness.
3826         * gjavah.c (throwable_p, decode_signature_piece,
3827         print_full_cxx_name, print_include, add_namelet, add_class_decl,
3828         process_file): Likewise.
3829         * jcf-dump.c (main): Likewise.
3830         * jcf-io.c (read_zip_member): Likewise.
3831         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
3832         give_name_to_class, get_class_constant): Likewise.
3833         * jcf-write.c (find_constant_wide, push_long_const,
3834         generate_classfile): Likewise.
3835         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
3836         * parse.y (read_import_dir): Likewise.
3837         * typeck.c (parse_signature_type): Likewise.
3838         * verify.c (verify_jvm_instructions): Likewise.
3839         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
3841 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3843         * Make-lang.in: Replace rmic and rmiregistry references with
3844         grmic and grmiregistry.
3845         * gcj.texi: Likewise.
3847 2004-07-20  Andrew Haley  <aph@redhat.com>
3849         PR java/16431.
3850         * verify.c (verify_jvm_instructions): Comment change only.
3852         * typeck.c (build_java_array_type): Add size field to array name.
3854         * java-tree.h (LOCAL_SLOT_P): New.
3855         (update_aliases): Add PC argument.
3856         (pushdecl_function_level): New function.
3858         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3859         MODIFY_EXPR, and SAVE_EXPR.
3860         (java_gimplify_modify_expr): New function.
3862         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3863         (expand_iinc): Pass PC to update_aliases().
3864         (STORE_INTERNAL): Likewise.
3865         (process_jvm_instruction): Likewise.
3867         * decl.c (base_decl_map): New variable.
3868         (uniq): New variable.
3869         (update_aliases): Rewrite with more thorough checking.
3870         (debug_variable_p): New function.
3871         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3872         (check_local_named_variable): Delete whole function.
3873         (initialize_local_variable): New function.
3874         (check_local_unnamed_variable): Add checks and comments.
3875         (find_local_variable): Rewrite.
3876         (java_replace_reference): New function.
3877         (function_binding_level): New variable.
3878         (pushdecl_function_level): New function.
3879         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3880         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3881         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3882         function_binding_level.
3883         (end_java_method): Null unused fields to save memory.
3885 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3887         * class.c (add_interface_do): Remove.
3888         (set_super_info, interface_of_p, maybe_add_interface,
3889         add_interface, make_class_data, layout_class,
3890         add_miranda_methods): Adjust BINFO accessors and addition.
3891         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
3892         accessors.
3893         * jcf-write.c (generate_classfile): Likewise.
3894         * parse.y (patch_anonymous_class, check_inner_circular_reference,
3895         check_circular_reference, java_complete_class,
3896         check_abstract_method_definitions,
3897         java_check_abstract_method_definitions,
3898         check_interface_throws_clauses, java_check_abstract_methods,
3899         lookup_java_interface_method2,
3900         find_applicable_accessible_methods_list): Adjust BINFO accessors
3901         and addition.
3902         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
3904 2004-07-18  Roger Sayle  <roger@eyesopen.com>
3906         * builtins.c (max_builtin, min_builtin,
3907         java_build_function_call_expr): Replace calls to build with buildN.
3908         * class.c (build_class_ref, build_static_field_ref,
3909         get_dispatch_table, make_class_data, layout_class_method): Likewise.
3910         * constants.c (build_ref_from_constant_pool): Likewise.
3911         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
3912         add_stmt_to_compound): Likewise.
3913         * except.c (build_exception_object_ref, expand_end_java_handler):
3914         Likewise.
3915         * java-gimplify.c (java_gimplify_case_expr,
3916         java_gimplify_default_expr, java_gimplify_block,
3917         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
3918         * jcf-write.c (generate_bytecode_insns): Likewise.
3919         * typeck.c (convert_ieee_real_to_integer): Likewise.
3921 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3923         * java-tree.h (builtin_function): Declare.
3925 2004-07-16  Steven Bosscher  <stevenb@suse.de>
3927         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
3928         abuse restore_line_number_status.
3930 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
3932         g++/15861
3933         * jcf-parse.c (java_emit_static_constructor): Specify default
3934         priority.
3936 2004-07-13  Per Bothner  <per@bothner.com>
3938         * java-tree.h (all_class_filename):  Remove useless macro.
3939         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
3940         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
3941         * parse.y (java_parser_context_restore_global):  Replace
3942         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
3943         * jcf-parse.c (read_class, java_parse_file):  Likewise.
3945 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
3947         PR java/16474
3948         gjavah.c (print_field_info): Emit constant only if field is static.
3950 2004-07-11  Roger Sayle  <roger@eyesopen.com>
3952         * expr.c (java_truthvalue_conversion, flush_quick_stack,
3953         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
3954         build_java_ret, build_java_throw_out_of_bounds_exception,
3955         build_java_array_length_access, java_check_reference,
3956         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
3957         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
3958         expand_java_arrayload, build_java_monitor, expand_java_return,
3959         expand_load_internal, expand_java_NEW, build_get_class,
3960         build_instanceof, expand_java_CHECKCAST, expand_iinc,
3961         build_java_soft_divmod, build_java_binop, build_field_ref,
3962         expand_compare, expand_java_goto, expand_java_switch,
3963         expand_java_add_case, build_class_init, build_known_method_ref,
3964         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
3965         expand_invoke, build_jni_stub, expand_java_field_op,
3966         java_expand_expr, expand_byte_code, STORE_INTERNAL,
3967         force_evaluation_order, emit_init_test_initialization): Convert
3968         calls to "build" into calls to the prefered "buildN" functions.
3970 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
3972         * java-tree.h (set_block): Remove.
3973         * lang.c (java_clear_binding_stack): New.
3974         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3975         * decl.c (struct binding_level): Remove this_block.
3976         (clear_binding_level): Likewise.
3977         (poplevel): Don't handle this_block.
3978         (set_block): Remove.
3980 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
3982         * class.c (common_enclosing_context_p): Remove statement with no
3983         side-effects.
3985 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
3987         PR java/8618
3988         * parse.y (create_anonymous_class): Remove 'location' argument. Use
3989         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
3990         (craft_constructor): Inherit access flags for implicit constructor
3991         from the enclosing class.
3992         (create_class): Fix comment typo.
3993         (resolve_qualified_expression_name): Pass type of qualifier to
3994         not_accessible_p, not the type in which target field was found.
3995         (not_accessible_p): Handle inner classes. Expand protected
3996         qualifier-subtype check to enclosing instances, but don't apply this
3997         check to static members. Allow protected access to inner classes
3998         of a subtype. Allow private access within common enclosing context.
3999         (build_super_invocation): Get WFL line number info from current
4000         class decl.
4001         (build_incomplete_class_ref): Update for new create_anonymous_class
4002         signature.
4003         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4004         common_enclosing_instance_p.
4005         * class.c (common_enclosing_context_p): New. Determine if types
4006         share a common enclosing context, even across static contexts.
4007         (common_enclosing_instance_p): Renamed from
4008         common_enclosing_context_p. Determines if types share a common
4009         non-static enclosing instance.
4010         * java-tree.h (common_enclosing_instance_p): Declare.
4011         * jcf-write.c (get_method_access_flags): New. Surpress private flag
4012         for inner class constructors.
4013         (generate_classfile): Use get_method_access_flags.
4015 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4017         * class.c (interface_of_p): Check for null TYPE_BINFO.
4019 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
4021         * class.c (make_class): Do not create binfo here.
4022         (set_super_info): Create it here.
4023         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4025 2004-07-08  Richard Henderson  <rth@redhat.com>
4027         * expr.c (case_identity, get_primitive_array_vtable,
4028         java_expand_expr, emit_init_test_initialization): Remove.
4029         * java-tree.h (java_expand_expr): Remove.
4030         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4032 2004-07-07  Per Bothner  <per@bothner.com>
4034         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
4035         get internal error due to mismatched types.
4037         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4039         * gcj.texi (Linking):   New node.  Document -lgij usage.
4041 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4043         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4044         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4045         * java/class.c (set_super_info, class_depth, interface_of_p,
4046         maybe_add_interface, add_interface, make_class_data,
4047         layout_class, add_miranda_methods): Adjust BINFO macros.
4048         * expr.c (can_widen_reference_to, lookup_field): Likewise.
4049         * jcf-write.c (generate_classfile): Likewise.
4050         * parse.y (patch_anonymous_class,
4051         check_inner_circular_reference, check_circular_reference,
4052         java_complete_class, check_abstract_method_definitions,
4053         java_check_abstract_method_definitions,
4054         check_interface_throws_clauses, java_check_abstract_methods,
4055         lookup_java_interface_method2,
4056         find_applicable_accessible_methods_list): Likewise.
4057         * typeck.c (find_method_in_interface): Likewise.
4058         * verify.c (merge_types): Likewise.
4060 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4062         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4063         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4065 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4067         * class.c (make_class): Use make_tree_binfo.
4068         (set_super_info, add_interface_do): Likewise.
4069         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4071 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4073         * verify.c: Correct array element access formatting thinko.
4075 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4077         * verify.c: Insert a short blurb at the start referring to the JVMS.
4078         (merge_type_state): Remove redundant nested if statement.
4079         (verify_jvm_instructions): Ensure current_subr is initialised to
4080         NULL_TREE.
4081         Minor formatting fixes all over the place.
4083 2004-07-02  Richard Henderson  <rth@redhat.com>
4085         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4087 2004-07-01  Richard Henderson  <rth@redhat.com>
4089         * class.c (registerClass_libfunc): Remove.
4090         (init_class_processing): Don't set it.
4091         (emit_register_classes): Take list_p parameter.  Fill it in
4092         with _Jv_RegisterClass calls.
4093         * decl.c (java_init_decl_processing): Don't call
4094         init_resource_processing.
4095         * jcf-parse.c (java_emit_static_constructor): New.
4096         (java_parse_file): Call it.
4097         * resource.c (registerResource_libfunc): Remove.
4098         (init_resource_processing): Remove.
4099         (write_resource_constructor): Take list_p parameter.  Fill it in
4100         with _Jv_RegisterResource calls.
4101         * java-tree.h: Update prototypes.
4103 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4105         PR java/1262
4106         * class.c (layout_class_method): Do not override package-private
4107         method if its in a different package.
4108         (split_qualified_name): Move here from parse.y. Rename from
4109         breakdown_qualified. Add comment.
4110         (in_same_package): Move here from parse.y. Add comment.
4111         * java-tree.h (break_down_qualified, in_same_package): Declare.
4112         (in_same_package): Likewise.
4113         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4114         Callers updated.
4116 2004-06-29  Andrew Haley  <aph@redhat.com>
4118         * except.c (expand_start_java_handler): Push a new binding level.
4119         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4120         register_exception_range() to register where we'll do it.
4121         (expand_end_java_handler): Remove old bogus code.  Replace with
4122         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4123         the top of the expression we're curently building.
4124         (maybe_end_try): Delete.
4125         * decl.c (binding_level.exception_range): New field.
4126         (clear_binding_level): Add field exception_range.  Reformat.
4127         (poplevel): Call expand_end_java_handler().
4128         (poplevel): Call java_add_stmt only if functionbody is false.
4129         (maybe_poplevels): Don't call maybe_end_try() from here.
4130         (end_java_method): Clear no longer used trees in function decl.
4131         (register_exception_range): New function.
4132         * java-tree.h (register_exception_range, struct eh_range): Declare.
4134 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4136         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4138 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4140         Formatting fixes.
4141         * expr.c (class_has_finalize_method): Fix method name indentation.
4142         (expand_java_call): Remove K&R style parameter declaration.
4143         (expand_invoke): Fix statement indentation.
4144         (expand_java_field_op): Likewise.
4145         * parse-scan.y: Fix typo.
4146         (reset_report): Fix method name indentation.
4147         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4148         line. Fix typos.
4149         * verify.c (verify_jvm_instructions): Document parameters, insert
4150         page break.
4151         * lang.c (lang_init_source): Fix method name indentation.
4152         * class.c (common_enclosing_context_p): Likewise.
4153         (emit_symbol_table): Fix parameter list indentation.
4154         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4155         parameter declaration.
4156         * constants.c: Fix copyright notice indentation.
4157         * typeck.c (find_method_in_superclasses): Fix parameter list
4158         indentation.
4159         (find_method_in_interfaces): Likewise.
4160         * zextract.c (makelong): Fix method name indentation.
4162 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4164         PR java/15715.
4165         * parse.y (create_interface): Set correct access modifiers for
4166         interfaces.
4167         * jcf-write.c (get_classfile_modifiers): New function.
4168         (generate_classfile): Use get_classfile_modifiers, not
4169         get_access_flags.
4171 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4173         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4174         dependency to current parser context, not NULL_TREE, for top-level
4175         classes.
4176         (jdep_resolve_class): Enable member access check for all inner
4177         class dependencies.
4179 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4181         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4182         load_class.
4184 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4186         PR java/15734
4187         * expr.c (expand_java_field_op): Ensure that target class for static
4188         field access has been loaded.
4190 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4191             Ranjit Mathew  <rmathew@hotmail.com>
4193         PR java/1207, java/16178
4194         * jcf-parse.c (load_class): Return immediately if passed a type decl
4195         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4196         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4197         before calling load_class.
4198         (qualify_and_find): Likewise.
4199         (find_in_imports_on_demand): Likewise.
4200         (find_applicable_accessible_methods_list): Likewise.
4202 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4204         * parse.y (java_layout_seen_class_methods): Don't call load_class
4205         on class defined by source parser.
4207 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4209         * parse.y (set_nested_class_simple_name_value): Removed.
4210         (java_complete_expand_class): Remove calls to
4211         set_nested_class_simple_name_value.
4213 2004-06-22  Andrew Haley  <aph@redhat.com>
4214             Ranjit Mathew  <rmathew@hotmail.com>
4216         Fixes PR java/16113.
4217         * decl.c (force_poplevels): Remove call to expand_end_bindings.
4219 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
4221         * parse.y (create_class): Correct diagnostic message about
4222         java.lang.Object extending anything else.
4224 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4226         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4227         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4228         * constants.c (build_ref_from_constant_pool): Likewise.
4229         * expr.c (build_java_array_length_access): Likewise.
4230         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4231         (invoke_build_dtable, build_invokevirtual): Likewise.
4232         (build_invokeinterface, java_expand_expr): Likewise.
4233         (emit_init_test_initialization): Likewise.
4234         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4235         * parse.y (make_qualifed_name, build_array_ref): Likewise.
4237 2004-06-21  Andrew Haley  <aph@redhat.com>
4239         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4240         block.
4242 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4244         * jcf.h (struct JCF): Change java_source, right_zip and finished
4245         to unsigned int.
4246         * lex.h (struct java_lexer): Change hit_eof, read_anything,
4247         byte_swap and use_fallback to unsigned int.
4248         * parse.h (struct _jdep): Change flag0 to unsigned int.
4250 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
4252         Fixes PR java/13948
4253         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4254         before trying to lay out its methods.
4255         * jcf-parse.c (read_class): Track parsed files using canonical paths
4256         obtained via lrealpath from libiberty.
4257         (java_parse_file): Likewise.
4258         (parse_source_file_1): Rename formal parameter to reflect its
4259         modified purpose. Minor formatting fix.
4261 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4263         * class.c (emit_register_classes): Make the function uninlinable,
4264         do not set current_function_cannot_inline.
4265         * resource.c (write_resource_constructor): Do not reset
4266         flag_inline_functions around rest_of_compilation.
4268 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
4270         PR java/15769
4271         * expr.c (java_truthvalue_conversion): Handle
4272         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4273         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4274         i.e. return the expression.
4276 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
4278         * gjavah.c: Include version.h
4280 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
4282         * jcf-write.c (generate_bytecode_conditional): Correct handling
4283         of unordered conditionals. Add comment.
4285 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
4286             Per Bothner  <per@bothner.com>
4288         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4289         local variable was initialised upon declaration.
4290         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4291         variable was final and initialised upon declaration.
4292         * check-init.c (check_final_reassigned): Give error only if a blank
4293         final is not definitely unassigned or if an initialised final is
4294         reassigned.
4295         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4296         assignment expressions. Remove case MODIFY_EXPR, label do_default.
4297         (check_init): Perform initialised-variable-removing-optimisation
4298         only on non-final local variables.
4300 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4302         * jcf-write.c (generate_bytecode_conditional): Handle binops
4303         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4304         and LTGT_EXPR.
4305         (generate_bytecode_insns): Likewise.
4307 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4309         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4310         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4312 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4314         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4315         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4317 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4319         * decl.c (struct binding_level): Add GTY marker. Compile
4320         binding_depth unconditionally.
4321         (current_binding_level, free_binding_level, global_binding_level):
4322         Likewise.
4323         (clear_binding_level): Unconditionally set binding_depth.
4324         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4326 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4328         * lex.c (java_new_lexer): Set 'encoding'.
4329         (java_read_char): Improve error message for unrecognized characters.
4330         * lex.h (struct java_lexer): New field 'encoding'.
4332 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4334         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4336 2004-05-21  Mark Wielaard  <mark@klomp.org>
4338         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4339         extern.
4341 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
4343         * typeck.c: Remove non-printable character 160.
4345 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
4347         * check-init.c: Correct minor typos.
4349 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4351         * Make-lang.in, expr.c, java-gimplify.c: Rename
4352         tree-simple.[ch] to tree-gimple.[ch].
4354 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
4356         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4358 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4360         Merge from tree-ssa-20020619-branch.  See
4361         ChangeLog.tree-ssa for details.
4363         * Make-lang.in, builtins.c, check-init.c, class.c,
4364         constants.c, decl.c, except.c, expr.c, java-except.h,
4365         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4366         lang.c, lang.opt, parse.y, resource.c: Merged.
4367         * java-gimplify.c: New file.
4369 2004-05-10  Andrew Haley  <aph@redhat.com>
4371         * parse.y (create_class): Set TYPE_VFIELD.
4372         * decl.c (java_init_decl_processing): Likewise.
4374         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4375         * class.c (make_method_value): Replace DECL_VINDEX with call to
4376         get_method_index().
4377         (get_dispatch_vector): Likewise.
4378         (layout_class_method): Likewise.
4379         Replace set of DECL_VINDEX with call to set_method_index().
4380         (set_method_index): New function.
4381         (get_method_index): New function.
4382         * java-tree.h (set_method_index): New function decl.
4383         (get_method_index): New function decl.
4385 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
4387         * parse.y (check_pkg_class_access): Add new argument
4388         and use it when cl is NULL to call lookup_cl on it.
4389         (parser_check_super_interface): Do not call lookup_cl.
4390         Pass this_decl to check_pkg_class_access and NULL
4391         instead of lookup_cl.
4392         (parser_check_super): Update for change in
4393         check_pkg_class_access.
4394         (do_resolve_class): Likewise.
4395         (process_imports): Likewise.
4396         (find_in_imports_on_demand): Likewise.
4397         (resolve_qualified_expression_name): Likewise.
4399 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
4401         Fixes PR java/9685, PR java/15073
4402         * parse.y (accessibility_string): New method.
4403         (not_accessible_field_error): Use accessibility_string()
4404         instead of java_accstring_lookup().
4405         (resolve_qualified_expression_name): Check with
4406         check_pkg_class_access() before allowing access using
4407         qualified names.
4408         Fix comment typo.
4409         Use check_pkg_class_access() instead of not_accessible_p()
4410         for unqualified types.
4411         (not_accessible_p): Use DECL_CONTEXT (member) instead of
4412         REFERENCE for package-private access checking.
4413         (patch_method_invocation): Use accessibility_string() instead
4414         of java_accstring_lookup().
4416 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
4418         Fixes PR java/15133
4419         * gjavah.c (struct method_name): Add member is_native.
4420         (overloaded_jni_method_exists_p): Match candidate method only if
4421         it is native.
4422         (print_method_info): Initialise is_native flag from the method's
4423         access flags.
4425 2004-04-30  Roger Sayle  <roger@eyesopen.com>
4427         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4428         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4430 2004-04-22  Roger Sayle  <roger@eyesopen.com>
4432         * resource.c (write_resource_constructor): Guard call to possibly
4433         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4435 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
4437         * class.c (make_class_data): Add new field aux_info.
4438         * decl.c (java_init_decl_processing): Push type and decl for
4439         `aux_info'.
4441 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
4443         * expr.c (expand_java_NEW): Don't use size argument for
4444         _Jv_AllocObject calls.
4445         * parse.y (patch_invoke): Likewise.
4447 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4449         * expr.c (build_invokeinterface): Remove unused variables to
4450         fix warnings.
4452 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4454         * class.c (get_interface_method_index): New function. Return dispatch
4455         index for interface method.
4456         (make_method_value): For interface methods, set index field to
4457         iface dispatch index, not DECL_VINDEX.
4458         * expr.c (build_invokeinterface): Use get_interface_method_index.
4460 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4462         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4464 2004-03-31  Andrew Haley  <aph@redhat.com>
4466         PR java/14104
4467         * jcf-io.c (opendir_in_zip): Tidy up error handling.
4469 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
4471         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4472         form of GTY markers.
4474 2004-03-25  Marcus Meissner  <meissner@suse.de>
4476         PR java/14689:
4477         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4479 2004-03-23  Tom Tromey  <tromey@redhat.com>
4481         PR java/14315:
4482         * jcf-write.c (make_class_file_name): Don't report if mkdir
4483         failed with EEXIST.
4485 2004-03-23  Tom Tromey  <tromey@redhat.com>
4487         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4489 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
4491         * class.c, gjavah.c, lang.c: Fix comment typos.
4492         * gcj.texi: Fix typos.
4494 2004-03-19  Per Bothner  <per@bothner.com>
4496         * gcj.texi (Code Generation):  Document new flags and assert defaults.
4498         * class.c (assume_compiled_node_struct):  Rename type to
4499         class_flag_node_struct, as it is now also used for enable_assertions.
4500         Rename assume_compiled_node typedef.  Rename excludep field to value.
4501         (find_assume_compiled_node):  Rename function to find_class_flag_node.
4502         Minor optimization - avoid needless strlen.
4503         (add_assume_compiled):  Some tweaking and optimization.
4504         Rename and generalize to add_class_flag takem an extra parameter.
4505         (add_assume_compled):  New just calls add_class_flag.
4506         (add_enable_assert, enable_assertions):  New functions.
4507         (enable_assert_tree):  New static.
4508         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
4509         * lang.opt (fenable-assertions, fenable-assertions=,
4510         fdisable-assertions, fdisable-assertions=):  New options.
4511         * lang.c (java_handle_option):  Handle new options.
4512         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
4513         class in an interface - create helper class nested in outer interface.
4514         (build_assertion):  Short-circuit if enable_assertions is false.
4516 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4518         * java-tree.h: Changes throughout to add checking to macros
4519         and numerous whitespace changes.
4520         (VAR_OR_FIELD_CHECK): New macro.
4521         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
4522         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
4524 2004-03-16  Per Bothner  <per@bothner.com>
4526         * jcf-jump.c (options):  New --print-constants option.
4527         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
4529         * jcf-dump.c (flag_print_constant_pool):  Default to off.
4530         (print_constant_terse_with_index):  New helper function.
4531         (various places):  Check flag_print_constant_pool where missing.
4532         (main):  If verbose set flag_print_constant_pool.
4533         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
4535 2004-03-15  Andrew Haley  <aph@redhat.com>
4537         PR java/14581
4538         * parse.y (java_complete_lhs): Check that final variable has an
4539         initializer.
4541 2004-03-12  Andrew Haley  <aph@redhat.com>
4543         PR java/14551
4544         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
4545         conversion.
4547 2004-02-29  Roger Sayle  <roger@eyesopen.com>
4549         * jcf-parse.c (java_parse_file): Handle the case that input_filename
4550         is NULL.
4552 2004-02-27  Per Bothner  <per@bothner.com>
4554         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
4555         suggestion:  Use build_incomplete_class_ref.
4556         This fixes PR java/13508, java/11714.
4558 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
4560         * java/parse.h: Update copyright.
4562 2004-02-26  Andrew Haley  <aph@redhat.com>
4564         PR java/14231:
4565         * parse.y (check_interface_throws_clauses): Check for
4566         !METHOD_INVISIBLE (iface_method).
4567         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
4568         well as CLASS_ABSTRACT.
4570 2004-02-25  Per Bothner  <per@bothner.com>
4572         * parse.y (build_assertion):  If we're in an inner class, create the
4573         class$ helper routine in the outer class.
4575 2004-02-19  Richard Henderson  <rth@redhat.com>
4577         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
4579 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
4581         * Make-lang.in (java.install-man): Add extra dependencies.
4583 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
4585         * Make-lang.in: Install man pages under the same names
4586         (possibly transformed) as the program they document.
4588 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
4590         * gjavah.c: Include "intl.h".
4591         (error): New function.
4592         (main): Call gcc_init_libintl.
4593         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
4594         print_stub_or_jni, process_file, main): Use error rather than
4595         fprintf.
4596         (print_method_info, usage, help, version, main): Mark strings for
4597         translation with _.  Avoid splitting up sentences.  Send
4598         information messages to stdout.
4599         * jcf-dump.c: Include "intl.h".
4600         (main): Call gcc_init_libintl.
4601         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
4602         Mark error, usage and version messages for translation with _.
4603         Avoid splitting up sentences.
4604         * jv-scan.c: Include "intl.h".
4605         (fatal_error, warning): Change parameter s to msgid.  Translate
4606         messages.
4607         (main): Call gcc_init_libintl.
4608         (usage, help, version): Mark error, usage and version messages for
4609         translation with _.  Avoid splitting up sentences.
4610         * jvgenmain.c: Include "intl.h".
4611         (main): Call gcc_init_libintl.
4612         (usage, main): Mark error messages for translation with _.
4613         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
4614         JVGENMAIN_OBJS): Add intl.o.
4615         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
4616         java/jvgenmain.o): Update dependencies.
4618 2004-02-08  Per Bothner  <per@bothner.com>
4620         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
4621         class don't use not_accessible_field_error, which can get confused.
4623 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
4625         Make-lang.in (po-generated):  Delete.
4627 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
4629         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
4630         Depend on target.h.
4631         * decl.c: Include target.h.
4632         (start_java_method): Replace PROMOTE_PROTOTYPES with
4633         targetm.calls.promote_prototypes.
4634         * expr.c: Include target.h.
4635         (pop_arguments): Replace PROMOTE_PROTOTYPES with
4636         targetm.calls.promote_prototypes.
4637         * parse.y: Include target.h.
4638         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
4639         with targetm.calls.promote_prototypes.
4641 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
4643         * typeck.c: Update copyright.
4645 2004-02-02  Tom Tromey  <tromey@redhat.com>
4647         * decl.c (java_init_decl_processing): Remove duplicate
4648         gnu/gcj/RawData.
4650 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
4652         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
4654 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
4656         * expr.c (build_field_ref): Move variable
4657         definition up.
4659 2004-01-28  Andrew Haley  <aph@redhat.com>
4661         * expr.c (build_field_ref): Widen field offset.
4663 2004-01-27  Andrew Haley  <aph@redhat.com>
4665         java/13273
4666         * parse.y (check_interface_throws_clauses): Make sure class_decl
4667         has been loaded.
4669 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
4671         PR java/13733
4672         * parse.y (patch_assignment): Don't modify lhs_type for
4673         reference assignments.
4675 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4677         * Make-lang.in: Replace $(docdir) with doc.
4678         (java.info, java.srcinfo, java.man, java.srcman): New rules.
4679         (java.install-man): Revamp rule.
4681 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4683         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
4684         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
4685         instead of deferred backquote.
4687 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
4689         * typeck.c (find_method_in_interfaces): Move variable
4690         definition up.
4692 2004-01-16  Andrew Haley  <aph@redhat.com>
4694         PR java/13273:
4695         * typeck.c (shallow_find_method): New.
4696         (find_method_in_superclasses): New.
4697         (find_method_in_interfaces): New.
4698         (lookup_do): Rewrite.
4699         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
4701         * jcf-parse.c (read_class): Save and restore output_class.
4702         * decl.c (java_expand_body): Set output_class from fndecl.
4704 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
4706         * class.c (gen_indirect_dispatch_tables): Fix string length
4707         calculations.
4709 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
4711         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
4712         (java.srcextra): Copy above back to source directory if requested.
4713         (po-generated): Delete reference to $(parsedir).
4714         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
4715         Use implicit rule.
4717 2004-01-14  Jan Hubicka  <jh@suse.cz>
4719         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
4720         estimation.
4722 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
4724         * java-tree.h (java_expand_expr): Change prototype.
4725         * expr.c (java_expand_expr): Add alt_rtl parameter.
4727 2004-01-09  Andrew Haley  <aph@redhat.com>
4729         PR java/12755:
4730         * parse.y (java_fix_constructors):  Set output_class.
4731         (java_reorder_fields): Likewise.
4732         (java_layout_classes): Likewise.
4733         (java_expand_classes): Generate indirect dispatch tables.
4734         (java_expand_classes): Set output_class.
4735         (java_finish_classes): Likewise.
4736         * lang.c (java_init): Turn on always_initialize_class_p if we're
4737         using indirect dis[atch.
4738         (java_decl_ok_for_sibcall): Use output_class, not current_class.
4739         (java_get_callee_fndecl): Use class local atable.
4740         * jcf-parse.c
4741         (always_initialize_class_p): Decl moved to java-tree.h.
4742         (HANDLE_CLASS_INFO): Set output_class.
4743         (read_class): Likewise.
4744         (parse_class_file): Call gen_indirect_dispatch_tables.
4745         (parse_zip_file_entries): Set output_class.
4746         (java_parse_file): Set output_class.  Don't emit symbol tables.
4747         * java-tree.h (output_class): New.
4748         Remove global declarations for otable, atable, and ctable.
4749         (always_initialize_class_p): moved here from decl.c.
4750         (DECL_OWNER): New.
4751         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
4752         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
4753         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
4754         (struct lang_type): Add otable_methods, otable_decl,
4755         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
4756         ctable_decl, catch_classes, type_to_runtime_map.
4757         * expr.c (build_field_ref): Make otable, atable, and ctable class
4758         local rather than global.
4759         (build_known_method_ref): Likewise.
4760         (build_invokeinterface): Likewise.
4761         (java_expand_expr): Pass runtime type (rather than actual type) to
4762         expand_start_catch.
4763         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
4764         this class.  Look up each class in that map to delete duplicates.
4765         (expand_end_java_handler): Pass runtime type (rather than actual
4766         type) to expand_start_catch.
4767         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
4768         (do_nothing): New.
4769         (java_init_decl_processing): Rearrange things.  Remove global
4770         declarations of otable, atable, and ctable.
4771         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
4772         (java_expand_body): Set output_class.
4773         * constants.c (build_constant_data_ref): Use output_class, not
4774         current_class.
4775         (alloc_name_constant): Likewise.
4776         * class.c (gen_indirect_dispatch_tables): New.
4777         (build_class_ref): Generate hard reference to superclass, even if
4778         using indirect dispatch.
4779         (build_static_field_ref): Use class local atable.
4780         (make_class_data): Generate hard reference to superclass, even if
4781         using indirect dispatch.
4782         Generate symbolic references to interfaces when using indirect
4783         dispatch.
4784         (make_class_data): Emit otable, atable, and ctable.
4785         Make otable, atable, and ctable class local rather than global.
4786         (emit_catch_table): Make otable, atable, and ctable class local
4787         rather than global.
4789 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
4791         * parse.y (catch_clause_parameter): Fix typo.
4793         PR java/13404
4794         * parse.y: (catch_clause_parameter): Return early if $3, aka
4795         formal_parameter, is null.
4797 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
4799         * class.c: Remove uses of "register" specifier in
4800         declarations of arguments and local variables.
4801         * decl.c: Likewise.
4802         * expr.c: Likewise.
4803         * gjavah.c: Likewise.
4804         * jcf-dump.c: Likewise.
4805         * jcf-io.c: Likewise.
4806         * jcf-parse.c: Likewise.
4807         * jcf-write.c: Likewise.
4808         * keyword.h: Likewise.
4809         * parse.y: Likewise.
4810         * typeck.c: Likewise.
4811         * verify.c: Likewise.
4813 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
4815         * Make-lang.in (GCJ_CROSS_NAME): Delete.
4816         (java.install_common, java.install-man): Adjust for above.
4817         (java.uninstall): Likewise.
4819 2003-12-03  Michael Koch  <konqueror@gmx.de>
4821         * class.c (make_class_data):
4822         Push field value to 'hack_signers' instead of 'signers'.
4823         * decl.c (java_init_decl_processing):
4824         Push field 'hack_signers' instead of 'signers'.
4826 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
4828         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
4829         including iconv.h.
4831 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
4833         PR java/12374:
4834         * parse.y (qualify_ambiguous_name): Remove lots of broken
4835         field access processing - there's no need to do that here,
4836         because we have resolve_field_access.  Remove
4837         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
4838         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
4839         used.
4841 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
4843         Fix PR java/13237
4844         * parse.y (java_complete_lhs): Save location prior to patching
4845         CALL_EXPR.
4847 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
4849         PR java/12548
4850         * resource.c (write_resource_constructor): Append
4851         "_resource" to constructor identifier name.
4853 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
4855         Fix PR java/13183.
4856         * constants.c (cpool_for_class): New function.
4857         (outgoing_cpool): Remove global variable.
4858         (alloc_name_constant): Use cpool_for_class.
4859         (build_constants_constructor): Likewise.
4860         * decl.c (java_expand_body): Set current_class.
4861         * java-tree.h (outgoing_cpool) Remove declaration.
4862         (init_outgoing_cpool): Likewise.
4863         * jcf-parse.c (init_outgoing_cpool): Remove function.
4864         (parse_class_file): Don't call init_outgoing_cpool.
4865         * parse.y (java_complete_expand_methods): Don't call
4866         init_outgoing_cpool.  Don't save outgoing_cpool.
4867         (java_expand_classes): Don't restore outgoing_cpool.
4868         (java_finish_classes): Likewise.
4870 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
4872         * Make-lang.in: (java.install-common) Add
4873         symlink for $(target_noncanonical)-gcjh for
4874         native builds.
4876 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
4878         * Make-lang.in (java.extraclean): Delete.
4880 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
4882         * Make-lang.in (check-java): Add.
4884 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
4886         Fix PR java/13024.
4887         * except.c (prepare_eh_table_type): Allocate variable-sized
4888         buffer `buf' with alloca.
4890 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
4892         Fix PR java/12857.
4894         decl.c (java_init_decl_processing): Don't initialize
4895         class_not_found_type_node, no_class_def_found_type_node.
4897         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
4898         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
4899         (class_not_found_type_node, no_class_def_found_type_node):
4900         Don't define.
4902         parse.y (build_dot_class_method_invocation): Add this_class
4903         argument.  Qualify method invocations to a different class.
4904         (create_new_parser_context): Initialize saved_data_ctx to 0.
4905         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
4906         (build_dot_class_method): Don't load classes.  Register
4907         incomplete types.
4908         (build_incomplete_class_ref): Special cases for interfaces
4909         and inner classes.  Move build_dot_class_method call to here...
4910         (patch_incomplete_class_ref): ...from here.  Pass current_class
4911         to build_dot_class_method_invocation.
4912         (build_assertion): Pass class_type to
4913         build_dot_class_method_invocation.
4914         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
4916 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
4918         Fix PR java/12739.
4919         * java-tree.h (BLOCK_EMPTY_P): Define.
4920         * parse.y (java_complete_lhs): Check for empty blocks
4921         in TRY_FINALLY_EXPR case.
4923 2003-11-17  Andrew Haley  <aph@redhat.com>
4925         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
4926         (struct lang_decl_var:freed): New variable.
4927         * decl.c (poplevel): Mark local vars that have gone out of scope.
4928         (push_jvm_slot): Don't use the RTL of a var that has gone out of
4929         scope.
4931 2003-11-16  Jason Merrill  <jason@redhat.com>
4933         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
4934         and TAGS files that include them for each front end.
4936 2003-11-15  Tom Tromey  <tromey@redhat.com>
4938         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
4940 2003-11-12  Jason Merrill  <jason@redhat.com>
4942         PR optimization/12547
4943         * lang.c (java_tree_inlining_walk_subtrees): Just walk
4944         BLOCK_EXPR_BODY directly.
4946 2003-11-12  Andrew Haley  <aph@redhat.com>
4948         PR java/11045
4949         * parse.y (fold_constant_for_init): Check that we really do have a
4950         constant.
4952         PR java/11533
4953         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
4954         init_test_decls being inlined.
4956         PR java/12890:
4957         * parse.y (do_resolve_class): Check return value from
4958         breakdown_qualified().
4960 2003-11-11  Tom Tromey  <tromey@redhat.com>
4962         PR java/12915:
4963         * parse.y (merge_string_cste): Handle case where we have a
4964         pointer that happens to be zero, not null_pointer_node.
4966 2003-11-10  Tom Tromey  <tromey@redhat.com>
4968         * jcf-parse.c (classify_zip_file): Correctly compare
4969         filename_length against length of manifest file's name.
4971 2003-11-08  Tom Tromey  <tromey@redhat.com>
4973         PR java/12894:
4974         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
4976 2003-11-06  Andrew Haley  <aph@redhat.com>
4978         * expr.c (java_stack_swap): Make sure destination stack slots are
4979         of the correct type.
4981 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
4983         * Make-lang.in (dvi): Move targets to $(docobjdir).
4984         (gcj.dvi): Simplify rule and adjust target.
4985         (gcj.info): Simplify rule.
4986         (gcj.pod): New intermediate rule.
4987         (gcjh.pod): Likewise.
4988         (jv-scan.pod): Likewise.
4989         (jcf-dump.pod): Likewise.
4990         (gij.pod): Likewise.
4991         (jv-convert.pod): Likewise.
4992         (rmic.pod): Likewise.
4993         (rmiregistry.pod): Likewise.
4994         (gcj.1): Delete.
4995         (gcjh.1): Delete.
4996         (jv-scan.1): Delete.
4997         (jcf-dump.1): Delete.
4998         (gij.1): Delete.
4999         (jv-convert.1): Delete.
5000         (rmic.1): Delete.
5001         (rmiregistry.1): Delete.
5003 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
5005         Fixes PR java/12866.
5006         * parse.y (resolve_qualified_expression_name): Move test
5007         for outer field access methods from here...
5008         (check_thrown_exceptions) ...to here.
5010 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
5012         * .cvsignore: Delete.
5014 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
5016         * verify.c (verify_jvm_instructions): Don't warn about legal
5017         eh binding regions generated for example by jdk 1.4.1.
5019 2003-10-24  David S. Miller  <davem@redhat.com>
5021         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5023 2003-10-22  Andrew Haley  <aph@redhat.com>
5025         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5026         (java_get_callee_fndecl): New.
5028         * jcf-parse.c (java_parse_file): Call emit_catch_table().
5030         * java-tree.h (ctable_decl): New.
5031         (catch_classes):  New.
5032         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5034         * decl.c (java_init_decl_processing): Add catch_class_type.
5035         Add ctable_decl.
5036         Add catch_classes field.
5038         * class.c (build_indirect_class_ref): Break out from
5039         build_class_ref.
5040         (make_field_value): Check flag_indirect_dispatch.
5041         (make_class_data): Ditto.
5042         Tidy uses of PUSH_FIELD_VALUE.
5043         Add field catch_classes.
5044         (make_catch_class_record): New.
5046         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5048 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5050         * jcf-write.c: Follow spelling conventions.
5051         * parse.y: Likewise.
5053 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5055         * ChangeLog: Fix typos.
5056         * expr.c: Fix comment typos.
5057         * jcf-write.c: Likewise.
5058         * lang.c: Likewise.
5059         * lex.c: Likewise.
5060         * mangle.c: Likewise.
5061         * parse-scan.y: Likewise.
5062         * parse.y: Likewise.
5064 2003-10-22  Tom Tromey  <tromey@redhat.com>
5066         * expr.c (expand_byte_code): Only warn about dead bytecode when
5067         extra_warnings is set.
5069 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5071         Fix for PR java/12586.
5072         * mangle.c (find_compression_record_match): Don't iterate through
5073         package namespace elements unless they all match compression_table
5074         entries.
5076 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5078         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5079         (generate-manpages): Likewise.
5080         (java.maintainer-clean): Likewise.
5081         (gcj.info): Likewise.
5082         (gcj.1): Likewise.
5083         (gcjh.1): Likewise.
5084         (jv-scan.1): Likewise.
5085         (jcf-dump.1): Likewise.
5086         (gij.1): Likewise.
5087         (jv-convert.1): Likewise.
5088         (rmic.1): Likewise.
5089         (rmiregistry.1): Likewise.
5090         (java.install-man): Likewise.
5091         (parse-scan.o): Move and define complete compile line.
5092         (parse.o): Likewise.
5093         (jcf-tree-inline.o): Move.
5095 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5097         * Make-lang.in (info): Update dependencies.
5098         (java.install-info): Remove.
5099         ($(srcdir)/java/gcj.info): Replace with ...
5100         ($(docobjdir)/gcj.info): ... this.
5102 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5104         * Make-lang.in: Replace uses of $(target_alias) with
5105         $(target_noncanonical).
5107 2003-10-09  Tom Tromey  <tromey@redhat.com>
5109         * decl.c (java_init_decl_processing): Declare signers field.
5110         * class.c (make_class_data): Set signers field.
5112 2003-10-09  Jason Merrill  <jason@redhat.com>
5114         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5115         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5116         POINTER_TYPE.
5118 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5120         * Make-lang.in (java.info): Replace with ...
5121         (info): ... this.
5122         (java.dvi): Replace with ...
5123         (dvi): ... this.
5124         (java.generated-manpages): Replace with ...
5126 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5128         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5130 2003-10-01  Andrew Haley  <aph@redhat.com>
5132         * jcf-parse.c (java_parse_file): Write otable and atable.
5133         * java-tree.h (atable_methods): New.
5134         (atable_decl): New.
5135         (atable_syms_decl): New.
5136         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5137         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5138         (symbol_*type): Rename method_symbol* to symbol*type.
5139         (emit_offset_symbol_table): Delete.
5140         (emit_symbol_table): New.
5141         (get_symbol_table_index): New.
5142         (atable_type): New.
5143         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5144         (build_known_method_ref): Likewise.
5145         (get_symbol_table_index): Rename from get_offset_table_index.
5146         Parameterize to allow re-use by differing types of symbol table.
5147         (build_invokevirtual): Pass table to get_offset_table_index.
5148         * decl.c (java_init_decl_processing): Push types and decls for
5149         atable and atable_syyms.
5150         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5151         (make_class_data): Add new fields atable and atable_syms.
5152         (emit_symbol_table): Rename from emit_offset_symbol_table.
5153         Parameterize to allow re-use by different types of symbol table.
5154         (build_symbol_entry): Renamed from build_method_symbols_entry.
5156 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5158         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5159         semantics for SAVE_EXPR, by caching the result in a temporary.
5161 2003-09-28  Richard Henderson  <rth@redhat.com>
5163         * check-init.c (check_init): Save and restore input_location
5164         instead of file and line separately.
5165         * decl.c (java_expand_body): Likewise.
5166         * jcf-write.c (generate_bytecode_insns): Likewise.
5167         * parse.y (safe_layout_class): Likewise.
5168         * jcf-parse.c (read_class, parse_class_file): Likewise.
5169         (java_parse_file): Use %H for warning locator.
5171 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5173         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5174         with void-type branches instead of using a COMPOUND_EXPR.
5176 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5178         * decl.c (java_optimize_inline, dump_function): Remove.
5179         * java-tree.h (java_optimize_inline): Remove declaration.
5180         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5181         * parse.y (source_end_java_method, java_expand_classes):
5182         Likewise.  Remove dead code.
5184 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5186         * lang.c (java_init_options): Set flag_evaluation_order.
5187         * expr.c (force_evaluation_order): Don't attempt to force
5188         evaluation order of binary operations using save_expr.
5189         * parse.y (java_complete_lhs): No longer need to call
5190         force_evaluation_order when constructing binary operators.
5192 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5193             Bryce McKinlay  <bryce@mckinlay.net.nz>
5195         PR java/1333:
5196         * parse.y (not_accessible_field_error): New function.
5197         (resolve_expression_name): Check field access permissions.
5198         (resolve_qualified_expression_name): Use
5199         not_accessible_field_error.
5200         (resolve_qualified_expression_name): Likewise.
5202 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5204         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5206 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5208         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5209         with equal operands without side-effects.
5211 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5213         * decl.c (java_init_decl_processing): Don't emit otable decls
5214         if flag_indirect_dispatch is not set.
5216 2003-09-21  Richard Henderson  <rth@redhat.com>
5218         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5219         resource.c: Revert.
5221 2003-09-21  Richard Henderson  <rth@redhat.com>
5223         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5224         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5226 2003-09-20  Richard Henderson  <rth@redhat.com>
5228         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5230 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5232         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5233         * check-init.c (check_init): Likewise.
5235 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5237         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5239 2003-09-16  Andrew Haley  <aph@redhat.com>
5241         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5243 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
5245         Fixes PR java/9577
5246         * mangle.c (find_compression_record_match): Skip
5247         over a "6JArray" (the array template mangled string)
5248         IDENTIFIER_NODE.
5249         (mangle_array_type): Correct minor typo.
5250         (atms): Move definition to the beginning.
5252 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
5254         * class.c (add_miranda_methods): Ensure super-interfaces are laid
5255         out. Fix for PR java/12254.
5257 2003-09-11  Richard Henderson  <rth@redhat.com>
5259         * parse.y (source_end_java_method): Update for new
5260         cgraph_finalize_function argument.
5262 2003-09-09  Richard Henderson  <rth@redhat.com>
5264         * parse.y (source_end_java_method): Update call to
5265         cgraph_finalize_function.
5267 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
5269         * decl.c (java_expand_body): New function.
5270         * expr.c (build_class_init): Set DECL_IGNORED_P.
5271         * java-tree.h (start_complete_expand_method,
5272         java_expand_body): Declare.
5273         * jcf-parse.c (cgraph.h): Include.
5274         (java_parse_file): Handle flag_unit_at_a_time.
5275         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5276         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5277         (java_estimate_num_insns): Use walk_tree_without_duplicates.
5278         (java_start_inlining): New function.
5279         * parse.h (java_finish_classes): Declare.
5280         * parse.y: Include cgraph.h.
5281         (block): Don't special-case empty block production.
5282         (craft_constructor): Set DECL_INLINE.
5283         (source_end_java_method): Handle flag_unit_at_a_time.
5284         Replace inline code with call to java_expand_body.
5285         (start_complete_expand_method): Remove static modifier.
5286         (java_expand_method_bodies): Patch function tree for
5287         class initialization and/or synchronization as needed.
5288         Don't begin RTL expansion yet.
5289         (java_expand_classes): Check flag_unit_at_a_time before
5290         calling finish_class.
5291         (java_finish_classes): New function.
5292         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5293         (patch_assignment): Set DECL_CONTEXT on temporary variable.
5294         (emit_test_initialization): Set DECL_IGNORED_P.
5296 2003-09-03  Roger Sayle  <roger@eyesopen.com>
5298         * builtins.c (enum builtin_type): Delete unused enumeration.
5299         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5301 2003-08-28  Tom Tromey  <tromey@redhat.com>
5303         * gcj.texi (Extensions): Document gcjlib URLs.
5305 2003-08-20  Tom Tromey  <tromey@redhat.com>
5307         * gcj.texi (Extensions): Added xref.
5308         (libgcj Runtime Properties): Document
5309         gnu.gcj.runtime.VMClassLoader.library_control.
5311 2003-08-20  Andrew Haley  <aph@redhat.com>
5313         * except.c (prepare_eh_table_type): Use new encoding for exception
5314         handlers when using -fno-assume-compiled.
5316 2003-08-13  Tom Tromey  <tromey@redhat.com>
5318         * gcj.texi (Invoking gij): Document -X and -?.
5320 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
5322         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5323         GCJH_OBJS, JCFDUMP_OBJS
5324         * win32-host.c: Removed the unnecessary and broken dependency
5325         on jcf.h
5327 2003-08-11  Tom Tromey  <tromey@redhat.com>
5329         * parse.y (java_check_regular_methods): Typo fixes.  Call
5330         check_interface_throws_clauses.  Use
5331         check_concrete_throws_clauses.
5332         (check_interface_throws_clauses): New function.
5333         (check_concrete_throws_clauses): New function.
5334         (hack_is_accessible_p): New function.
5335         (find_most_specific_methods_list): Added FIXME.
5336         * typeck.c (lookup_do): Use `flags' argument to decide what to
5337         do.  Reimplemented.
5338         (lookup_argument_method_generic): New function.
5339         (lookup_argument_method2): Removed.
5340         * jcf.h (ACC_INVISIBLE): New define.
5341         * jcf-write.c (generate_classfile): Skip invisible methods.
5342         * class.c (add_miranda_methods): New function.
5343         (layout_class_methods): Use it.
5344         (get_access_flags_from_decl): Use ACC_INVISIBLE.
5345         * java-tree.h (METHOD_INVISIBLE): New define.
5346         (lang_decl_func) [invisible]: New field.
5347         (lookup_argument_method_generic): Declare.
5348         (SEARCH_INTERFACE): New define.
5349         (SEARCH_SUPER): Likewise.
5350         (SEARCH_ONLY_INTERFACE): Likewise.
5351         (SEARCH_VISIBLE): Likewise.
5352         (lookup_argument_method2): Removed declaration.
5354 2003-08-05  Tom Tromey  <tromey@redhat.com>
5356         Fix for PR java/11600:
5357         * parse.y (java_complete_lhs): See whether we're calling a method
5358         on an array.
5359         (check_thrown_exceptions): Added `is_array_call' argument;
5360         fixed `clone' checking; updated all callers.
5362 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
5364         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5366 2003-08-03  Tom Tromey  <tromey@redhat.com>
5368         * java-tree.h (METHOD_TRANSIENT): Removed.
5369         * decl.c (pushdecl): Removed some dead code.
5370         * class.c (get_access_flags_from_decl): Can't have transient
5371         method.
5372         (add_method_1): Can't have a transient method.
5374 2003-07-28  Andreas Jaeger  <aj@suse.de>
5376         * jvspec.c: Convert to ISO C90 prototypes.
5378 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5380         * decl.c (force_poplevels): Fix warning call.
5382 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5384         * expr.c (expand_java_field_op): Don't use xxx_with_decl
5385         (expand_java_field_op): Likewise.
5386         * class.c (layout_class_method): Likewise
5387         (emit_register_classes): Likewise.
5388         * decl.c (pushdecl): Likewise.
5389         (poplevel): Likewise.
5390         (force_poplevels): Likewise.
5391         (give_name_to_locals): Likewise.
5392         * check-init.c (check_for_initialization): Likewise.
5394 2003-07-24  Jason Merrill  <jason@redhat.com>
5396         * java-tree.h: Move boolean_type_node et al to the back end.
5398 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5400         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5401         casts.
5403 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
5405         * lang.opt: Don't show -MD_ and -MDD_.
5407 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
5409         * lang-options.h: Remove.
5410         * lang.opt: Add help text.
5412 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
5414         * expr.c: Remove the last argument to expand_assignment().
5416 2003-07-09  Jan Hubicka  <jh@suse.cz>
5418         * java-tree.h (DECL_NUM_STMTS): Rename to...
5419         (DECL_ESTIMATED_INSNS): ... this.
5420         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
5421         New static functions.
5422         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
5423         * parser.y (add_stmt_to_compound): Do not account statements.
5425 2003-07-08  Mark Wielaard  <mark@klomp.org>
5427         * gcj.texi: CNI now expands to Compiled Native Interface.
5429 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5431         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5433 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5435         * expr.c (expand_byte_code): Adjist emit_line_note call.
5437 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
5439         * lang.c (java_handle_option): Don't handle filenames.
5441 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
5443         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5444         DIR_SEPARATOR.
5445         Use FILENAME_CMP.
5446         * jcf-write.c: Don't default-define DIR_SEPARATOR.
5447         * jcf.h: Delete COMPARE_FILENAMES definition.
5449 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
5451         * lang.c (java_init_options): Update prototype.
5453 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
5455         * decl.c (poplevel): Adjust define_label call.
5457 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
5459         * gjavah.c (flag_jni): Make non-static.
5460         * parse-scan.y (ctxp): Make non-static.
5462         * class.c (build_method_symbols_entry)
5463         * expr.c (get_offset_table_index)
5464         * jcf-parse.c (jcf_parse):
5465         Mark the definition static, matching the forward declaration.
5467 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
5469         * lang.c (java_handle_option): Don't check for missing arguments.
5471 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
5473         * class.c (push_class): Use a location_t to save place.
5474         (emit_register_classes): Set input_location. Adjust
5475         expand_function_end call.
5476         * resource.c (write_resource_constructor): Likewise.
5477         * decl.c (end_java_method): Adjust expand_function_end call.
5478         * parse.y (source_end_java_method): Likewise.
5480 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
5482         * lang.c (java_handle_option): Likewise.
5484 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
5486         * lang.c (java_handle_option): Special-casing of optional
5487         joined arguments no longer needed.
5488         * lang.opt: Update switches that take optional argument.
5490 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5492         * lang.opt: Declare Java.
5493         * lang.c (java_init_options): Update.
5495 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5497         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5499 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5501         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
5502         * lang.c (java_handle_option): -MD and -MMD have an underscore.
5503         * lang.opt: -MD and -MMD have an underscore.
5505 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
5507         * class.c (emit_register_classes): Adjust init_function_start
5508         call.
5509         * decl.c (complete_start_java_method): Likewise.
5510         * resource.c (write_resource_constructor): Likewise.
5512 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5514         * Make-lang.in: Update to use options.c and options.h.
5515         * lang.c: Include options.h not j-options.h.
5516         (java_handle_option): Abort on unrecognized option.
5517         (java_init_options): Request Java switches.
5519 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
5521         * Make-lang.in: Handle mostlyclean.
5523 2003-06-11  Tom Tromey  <tromey@redhat.com>
5525         * lang.c (java_handle_option): Update dependency_tracking for
5526         OPT_MF case.
5528         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5529         empty argument.
5531 2003-06-10  Andrew Haley  <aph@redhat.com>
5533         * resource.c (write_resource_constructor): Use expand_expr to
5534         generate the address of the label attached to a resource.
5535         * Make-lang.in (java/resource.o): Add expr.h
5537 2003-06-10  Andrew Haley  <aph@redhat.com>
5539         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
5540         (java_decl_ok_for_sibcall): New.
5542 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
5544         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
5545         (java/j-options.c, java/j-options.h): New.
5546         * java-tree.h (resource_name, compile_resource_file,
5547         compile_resource_data): Constify.
5548         * jcf-write.c (jcf_write_base_directory): Similarly.
5549         * jcf.h (jcf_write_base_directory): Similarly.
5550         * lang.c: Include j-options.h.
5551         (cl_options_count, cl_options, string_option, java_decode_option,
5552         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
5553         process_option_with_no): Remove.
5554         (resource_name): Constify.
5555         (LANG_HOOKS_HANDLE_OPTION): Override.
5556         (java_handle_option): New.
5557         (java_init): Don't call jcf_path_init.
5558         (java_init_options): Call jcf_path_init.
5559         * lang.opt: New.
5560         * resource.c (compile_resource_data, compile_resource_file): Constify.
5562 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
5564         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
5565         (struct lang_decl_func): Add last_line field.
5566         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
5567         DECL_SOURCE_LINE_LAST): Remove.
5568         * parse.y (missing_return_error, finish_method_declaration,
5569         lookup_cl, start_artificial_method_body, source_end_java_method,
5570         start_complete_expand_method): Adjust.
5572 2003-06-08  Tom Tromey  <tromey@redhat.com>
5574         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
5575         fno-assume-compiled.
5577 2003-06-08  Roger Sayle  <roger@eyesopen.com>
5579         * builtins.c (define_builtin_type, builtin_types): Delete.
5580         (define_builtin): Rewritten to take just the built-in code,
5581         the function's name, type and fallback library function name.
5582         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
5583         (initialize_builtins): Overhaul to define the GCC builtins
5584         used by gcj manually, providing the Java run-time's
5585         implementations as the fallback library function.
5587 2003-06-08  Anthony Green  <green@redhat.com>
5589         * parse.y (patch_cast): Fix conversions from floating-point to
5590         integral types.
5592 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
5594         * Make-lang.in: Update.
5595         * lang.c: Include opts.h. Define cl_options_count and cl_options.
5597 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
5599         * lang.c (java_init_options): Update.
5601 2003-06-05  Jan Hubicka  <jh@suse.cz>
5603         * Make-lang.in:  Add support for stageprofile and stagefeedback
5605 2003-05-31  Roger Sayle  <roger@eyesopen.com>
5607         * lang.c (java_init_options): Prescribe wrap-around two's
5608         complement arithmetic overflow by setting flag_wrapv.
5610 2003-05-29  Roger Sayle  <roger@eyesopen.com>
5612         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
5613         (builtin_record): Add an additional builtin_code field to
5614         record which GCC built-in corresponds to the Java function.
5615         (java_builtins):  Add new entries for atan, atan2, exp, log,
5616         pow and tan.
5617         (max_builtin, min_builtin, abs_builtin): Perform constant
5618         folding on the resulting tree.
5619         (java_build_function_call_expr): Likewise, perform constant
5620         folding on the resulting tree.
5621         (initialize_builtins): The NULL creators are now allowed in
5622         the java_builtins table, which is now terminated by an entry
5623         with builtin_code == END_BUILTINS.
5624         (check_for_builtin): Likewise.  If the matching creator is
5625         NULL, construct the call using java_build_function_call_expr
5626         directly with the decl for the corresponding builtin_code.
5628 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5630         * win32-host.c: Normalize copyright boilerplate.
5632 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5634         * parse.y (print_int_node): Use string concatentation on
5635         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
5636         function calls into one.
5638 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
5640         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
5641         fatal_io_error with calls to fatal_error; add ": %m" to the end of
5642         all the affected error messages.
5644 2003-05-13  Richard Henderson  <rth@redhat.com>
5646         * class.c (layout_class_method): Set DECL_EXTERNAL.
5647         * decl.c (java_mark_decl_local, java_mark_class_local): New.
5648         * java-tree.h (java_mark_class_local): Declare.
5649         * jcf-parse.c (parse_class_file): Use it.
5650         * parse.y (java_expand_classes): Likewise.
5652 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
5654         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
5655         * lex.h: #include input.h.
5656         * jv-scan.c (input_filename): Remove.
5658 2003-05-02  Tom Tromey  <tromey@redhat.com>
5660         PR java/10491:
5661         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5662         (handle_inner_classes): New function.
5664 2003-05-01  Tom Tromey  <tromey@redhat.com>
5666         PR java/10459:
5667         * parse.y (finish_for_loop): Do nothing if update expression is a
5668         EXPR_WFL_NODE wrapping nothing.
5669         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
5671 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
5673         * lex.h (input_lineno): Remove declaration.
5674         * parse-scan.y: #include input.h.
5675         (input_filename): Remove declaration.
5676         (input_location): Add definition.
5677         (input_line): Remove definition.
5679 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
5681         * lex.h (lineno): Rename to ...
5682         (input_line): ... here
5683         * parse-scan.y (lineno): Rename to ...
5684         (input_line): ... here.
5685         (reset_report): Rename lineno to input_line.
5686         * check-init.c (check_init): Likewise.
5687         * class.c (push_class): Likewise.
5688         * decl.c (complete_start_java_method, end_java_method): Likewise.
5689         * expr.c (expand_byte_code): Likewise.
5690         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
5691         * jcf-write.c (generate_bytecode_insns): Likewise.
5692         * lex.c (java_init_lex, java_allocate_new_line,
5693         do_java_lex): Likewise.
5694         * parse.h (YYNOT_TWICE): Likewise.
5695         * parse.y (empty_statement, expression_statement,
5696         java_pop_parser_context, java_parser_context_save_global,
5697         yyerror, register_fields, method_header, safe_layout_class,
5698         find_in_imports_on_demand, create_artificial_method,
5699         source_end_java_method, start_complete_expand_method,
5700         build_thisn_assign, java_complete_lhs,
5701         maybe_absorb_scoping_block): Likewise.
5703 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
5705         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
5706         '/' when computing java source filename
5708 2003-04-13  Tom Tromey  <tromey@redhat.com>
5710         * gjavah.c (print_c_decl): Indentation fix.
5712 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
5714         * class.c (make_field_value, make_method_value, get_dispatch_table)
5715         (make_class_data, emit_offset_symbol_table)
5716         * constants.c (build_constants_constructor)
5717         * java-tree.h (START_RECORD_CONSTRUCTOR)
5718         * parse.y (maybe_build_array_element_wfl):
5719         Use build_constructor.
5721 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
5723         PR java/10253:
5724         * parse.y (string_convert_int_cst): Always use at least one digit
5725         in string conversion. Remove ASCII dependence.
5726         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
5728 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
5730         * Make-lang.in: added win32-host.c
5731         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
5732         resolves to open() on non-Win32 platforms and
5733         Win32-specific jcf_open_exact_case() on Win32
5734         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
5735         when trying .java and .class files
5736         * win32-host.c: added to repository. Defines
5737         Win32-specific jcf_open_exact_case()
5739 2003-04-10  Andrew Haley  <aph@redhat.com>
5741         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
5742         (maybe_free_localvar): Renamed from localvar_free.
5743         Add new arg, really.
5744         (generate_bytecode_insns): Set new variable, jsrs.
5745         Only free local vars if no jsr insns have been emittted.
5746         Call maybe_free_localvar, not localvar_free.
5748 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5750         * gcj.texi: Remove @ at start of file.
5752 2003-03-25  Tom Tromey  <tromey@redhat.com>
5754         * parse.y (create_interface): Call CHECK_DEPRECATED.
5756 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
5758         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
5760 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
5762         * javaop.h (jfloat, jdouble): Make them structures mirroring
5763         the bit fields of IEEE float and double respectively.
5764         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
5765         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
5766         (union Word, union DWord): Delete.
5767         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
5769         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
5770         D_NAN_MASK): Delete.
5771         (jni_print_float, jni_print_double): New.  Generate
5772         hexadecimal floating constants.
5773         (print_field_info): Use jni_print_float/double.
5775         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
5776         finite floating point numbers for output; special case
5777         non-finite floats.
5779 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
5781         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
5782         Replace 0 and 1 with true and false in return statements.
5784 2003-03-19  Tom Tromey  <tromey@redhat.com>
5786         * lex.c (do_java_lex): Renamed from java_lex.
5787         (java_lex): New function.
5788         Include timevar.h.
5790 2003-03-13  Tom Tromey  <tromey@redhat.com>
5792         * parse.y (resolve_inner_class): Error if qualifier is a primitive
5793         type.
5795 2003-03-04  Andrew Haley  <aph@redhat.com>
5797         * gjavah.c (is_first_data_member): New global variable.
5798         (print_c_decl): If it's the first data member, align it as the
5799         superclass.
5800         (process_file): Set is_first_data_member.
5802 2003-03-11  Tom Tromey  <tromey@redhat.com>
5804         * parse.y (resolve_field_access): Initialize class if field is
5805         found in another static field.
5806         * expr.c (build_class_init): Don't optimize out initialization of
5807         implemented interface.
5809 2003-03-11  Andrew Haley  <aph@redhat.com>
5811         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
5812         warning.
5814 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
5816         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
5817         and DIR_SEPARATOR_2 for a target.
5818         Correct minor typos.
5820         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
5821         and DIR_SEPARATOR_2 for a target into account.
5823 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
5825         * lang.c (java_init): Update prototype, move code to java_post_options.
5826         (java_post_options): Similarly.
5828 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
5830         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
5831         compare file name components depending on the case-sensitivity
5832         or otherwise of the host file system.
5834         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
5835         "strcmp" to compare file name components.
5836         Use IS_DIR_SEPARATOR instead of comparing directly against
5837         DIR_SEPARATOR.
5838         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
5839         comparing directly against DIR_SEPARATOR.
5841 2003-03-04  Tom Tromey  <tromey@redhat.com>
5843         * Make-lang.in (java.tags): New target.
5845 2003-03-01  Roger Sayle  <roger@eyesopen.com>
5847         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
5848         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
5850 2003-03-01  Tom Tromey  <tromey@redhat.com>
5852         * parse.y (jdep_resolve_class): Only check deprecation if we found
5853         a decl.
5855 2003-02-28  Tom Tromey  <tromey@redhat.com>
5857         PR java/9695:
5858         * class.c (maybe_layout_super_class): Always pass a WFL to
5859         do_resolve_class.
5860         * parse.y (do_resolve_class): Updated comment to explain
5861         parameters.
5863 2003-02-26  Tom Tromey  <tromey@redhat.com>
5865         * jcf-write.c (generate_classfile): Check whether class is
5866         deprecated before writing attribute count.
5868 2003-02-25  Roger Sayle  <roger@eyesopen.com>
5870         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
5871         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
5873 2003-02-23  Tom Tromey  <tromey@redhat.com>
5875         * lang-options.h: Added -Wdeprecated.
5876         * gcj.texi (Warnings): Document -Wdeprecated.
5877         * java-tree.h (flag_deprecated): Declare.
5878         * lang.c (lang_W_options): Added deprecated.
5879         (flag_deprecated): New global.
5880         * chartables.h: Rebuilt.
5881         * gen-table.pl (process_one): Look at whitespace.
5882         (print_tables): Define LETTER_SPACE, LETTER_MASK.
5883         * parse.h (CLEAR_DEPRECATED): New macro.
5884         (CHECK_DEPRECATED_NO_RESET): New macro.
5885         * jcf-parse.c (handle_deprecated): New function.
5886         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
5887         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
5888         * parse.y (resolve_type_during_patch): Check deprecation.
5889         (jdep_resolve_class): Likewise.
5890         (process_imports): Likewise.
5891         (resolve_expression_name): Likewise.
5892         (check_deprecation): Strip arrays from decl.  Check
5893         flag_deprecated.
5894         (patch_method_invocation): Also check the particular constructor
5895         for deprecation.
5896         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
5897         * jcf-write.c (append_deprecated_attribute): New function.
5898         (generate_classfile): Generate deprecated attribute when
5899         appropriate.
5900         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
5901         (java_lex) [case '*']: Simplify logic.
5902         (java_start_char_p): Use LETTER_MASK.
5903         (java_part_char_p): Likewise.
5904         (java_space_char_p): New function.
5906 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5908         Change base class access representation.
5909         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
5910         (add_interface_do): Likewise.
5912 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
5914         * decl.c (java_init_decl_processing): Change
5915         soft_lookupjnimethod_node to reflect the change in
5916         signature of _Jv_LookupJNIMethod in libjava/jni.cc
5917         * expr.c (build_jni_stub): Calculate and pass the size
5918         on the stack of the arguments to a JNI function. Use
5919         new target macro MODIFY_JNI_METHOD_CALL to allow a
5920         target to modify the call to a JNI method.
5922 2003-02-08  Roger Sayle  <roger@eyesopen.com>
5924         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
5925         instead of basename to avoid compiler warnings on Tru64.
5927 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
5929         * gcj.texi: Update to GFDL 1.2.
5931 2003-01-31  Andrew Haley  <aph@redhat.com>
5933         * parse.y (java_expand_classes): Scan the whole class list looking
5934         for access methods that haven't yet been expanded.
5936 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
5938         Fix for java/4269:
5940         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
5941         to fix bootstrap on sparc-unknown-netbsdelf1.5.
5942         * jcf-parse.c: Likewise.
5944 2003-01-31  Mark Wielaard  <mark@klomp.org>
5946         * gjavah.c (throwable_p): Allocate 1 more byte for string.
5948 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5950         * class.c (make_class): Use BINFO_ELTS.
5951         (set_super_info): Likewse.
5952         (add_interface_do): Likewise.
5954 2003-01-30  Tom Tromey  <tromey@redhat.com>
5956         * jcf-parse.c (read_class): Update identifier's class value if it
5957         changed during parsing.
5959 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
5961         * Make-lang.in (po-generated): Find the targets in $(parsedir).
5962         Propagate change to all other rules as required.
5963         (java/parse-scan.o): Add explicit dependency on
5964         $(parsedir)/java/parse-scan.c .
5966 2003-01-29  Tom Tromey  <tromey@redhat.com>
5968         * parse.y (patch_assignment): Only transform the rhs of an
5969         assignment when compiling to native.
5971 2003-01-28  Tom Tromey  <tromey@redhat.com>
5973         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
5975 2003-01-28  Tom Tromey  <tromey@redhat.com>
5977         * lex.c (java_lex): Don't include UEOF as part of token.
5978         (java_read_unicode): Error if \u sequence prematurely terminated.
5980 2003-01-27  Tom Tromey  <tromey@redhat.com>
5982         * parse.y (java_check_regular_methods): Check for construct after
5983         checking types in throws clause.
5985 2003-01-24  Tom Tromey  <tromey@redhat.com>
5987         * class.c (build_static_field_ref): Only a String or numeric field
5988         can fold to a constant.
5990 2003-01-23  Tom Tromey  <tromey@redhat.com>
5992         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
5993         file name in resource buffer.
5995 2003-01-23  Tom Tromey  <tromey@redhat.com>
5997         * expr.c (build_known_method_ref): Use method's context to find
5998         method table index.
6000 2003-01-23  Tom Tromey  <tromey@redhat.com>
6002         * constants.c (set_constant_entry): Allocated cleared memory.
6004 2003-01-22  Tom Tromey  <tromey@redhat.com>
6006         * java-tree.h: Don't use PARAMS.
6007         * resource.c: Add prototypes for all functions.
6008         (write_resource_constructor): Use `const char *' to avoid
6009         warning.
6011 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
6013         * jcf-parse.c (process_zip_dir): Remove unused variable.
6015 2003-01-22  Tom Tromey  <tromey@redhat.com>
6017         * expr.c (build_invokeinterface): Abort if method's context is not
6018         an interface.
6020 2003-01-22  Tom Tromey  <tromey@redhat.com>
6022         * gcj.texi (Input and output files): Mention non-class entries.
6023         * decl.c (java_init_decl_processing): Call
6024         init_resource_processing.
6025         * java-tree.h (compile_resource_data, write_resource_constructor,
6026         compile_resource_file, init_resource_processing): Declare.
6027         * config-lang.in (gtfiles): Added resource.c.
6028         * Make-lang.in (gt-java-resource.h): New target.
6029         (JAVA_OBJS): Added resource.o.
6030         (java/resource.o): New target.
6031         * resource.c: New file.
6032         * class.c (compile_resource_file): Moved to resource.c.
6033         (registerResource_libfunc): Likewise.
6034         (utf8_decl_list): Mark with GTY; now static.
6035         * jcf-parse.c (classify_zip_file): New function.
6036         (parse_zip_file_entries): Use it; compile .properties files.
6037         (process_zip_dir): Use classify_zip_file and compute_class_name.
6038         Don't write class name into zip directory.
6039         (java_parse_file): Call write_resource_constructor.
6040         (compute_class_name): New function.
6041         * jcf-io.c (read_zip_member): Reindented.
6043 2003-01-21  Tom Tromey  <tromey@redhat.com>
6045         * class.c (supers_all_compiled): New function.
6046         (make_class_data): Use it.
6048 2003-01-21  Tom Tromey  <tromey@redhat.com>
6050         * parse.y (method_header): Native method can't be strictfp.
6051         No method can be transient or volatile.
6053 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6055         Make-lang.in (jvspec.o-warn): Add -Wno-error.
6057 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6059         * check-init.c: Fix comment typos.
6060         * class.c: Likewise.
6061         * constants.c: Likewise.
6062         * decl.c: Likewise.
6063         * except.c: Likewise.
6064         * expr.c: Likewise.
6065         * java-except.h: Likewise.
6066         * java-tree.h: Likewise.
6067         * javaop.h: Likewise.
6068         * jcf-dump.c: Likewise.
6069         * jcf-io.c: Likewise.
6070         * jcf-parse.c: Likewise.
6071         * jcf-write.c: Likewise.
6072         * lang.c: Likewise.
6073         * mangle.c: Likewise.
6074         * typeck.c: Likewise.
6075         * verify.c: Likewise.
6077 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6079         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6080         * jcf-write.c: Include "tm_p.h".
6082 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6084         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6086 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6088         * builtins.c (java_build_function_call_expr): Renamed from
6089         build_function_call_expr.  All callers changed.
6091         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6092         * jcf-parse.c: Include tm_p.h.
6094         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6095         warning.
6097 2003-01-14  Tom Tromey  <tromey@redhat.com>
6099         * class.c (make_class_data): Check that super is compiled before
6100         building class reference to it.
6102 2003-01-14  Andrew Haley  <aph@redhat.com>
6104         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6105         varargs function -- correct.
6107 2003-01-14  Andrew Haley  <aph@redhat.com>
6109         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6111 2003-01-14  Andrew Haley  <aph@redhat.com>
6113         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6114         varargs function -- correct.
6116         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6117         temporary if the RHS is a reference.
6119 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6121         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6122         * keyword.h: Regenerated.
6124         * All Files: Convert to ISO C style function definitions.
6126 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6128         * parse.y (check_pkg_class_access): ANSIfy definition.
6130 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6132         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6133         xmalloc et al.
6135         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6137 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6139         Merge from pch-branch:
6141         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6143         * Make-lang.in (java/gjavah.o): Update dependencies.
6144         * gjavah.c: Include ggc.h.
6146         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6148         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6149         (JCFDUMP_OBJS): Add ggc-none.o.
6150         (java/jcf-dump.o): Depend on GGC_H.
6151         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6152         CPool substructures.
6153         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6154         * jcf-dump.c: Include ggc.h.
6156         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6158         * jcf.h (union cpool_entry): New.
6159         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6160         an array of unions.
6161         (struct JCF): Use gengtype to mark.
6162         (CPOOL_UINT): Update for new cpool_entry type.
6163         (CPOOL_USHORT1): Likewise.
6164         (CPOOL_USHORT2): Likewise.
6165         (CPOOL_FINISH): Use GC to free cpool subfields.
6166         * parse.h (struct parser_ctxt): Mark field current_jcf.
6167         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6168         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6169         (main_jcf): Use gengtype to mark.
6170         (ggc_mark_jcf): Delete.
6171         (get_constant): Update for new cpool_entry type.
6172         (give_name_to_class): Likewise.
6173         (get_class_constant): Likewise.
6174         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6175         (java_parse_file): Use GGC to allocate struct JCF.
6176         (init_jcf_parse): Don't call ggc_add_root.
6177         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6178         cpool_entry type.
6179         * java-tree.h (current_jcf): Use gengtype to mark.
6180         (CPOOL_UTF): Update for new cpool_entry type.
6181         (outgoing_cpool): Use gengtype to mark.
6182         (struct lang_type): GC struct JCF and struct CPool.
6183         * config-lang.in (gtfiles): Add jcf.h.
6184         * constants.c (find_tree_constant): New.
6185         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6186         for new cpool_entry type.
6187         (find_constant1): Update for new cpool_entry type.
6188         (find_constant2): Likewise.
6189         (find_utf8_constant): Use find_tree_constant.
6190         (find_class_or_string_constant): Remove unnecessary cast to jword.
6191         Update for new cpool_entry type.
6192         (count_constant_pool_bytes): Update for new cpool_entry type.
6193         (write_constant_pool): Likewise.
6194         (alloc_name_constant): Use find_tree_constant.
6195         (build_constants_constructor): Update for new cpool_entry type.
6197         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6199         * parse.y (mark_parser_ctxt): Delete.
6200         (goal): Don't use ggc_add_root.
6201         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6202         (java_pop_parser_context): Let GC free parser_ctxt.
6203         (java_parser_context_resume): Likewise.
6204         * parse.h (struct parser_ctxt): Use gengtype to mark.
6205         (ctxp): Likewise.
6206         (ctxp_for_generation): Likewise.
6207         * lex.h (struct java_lc_s): Mark for gengtype.
6208         (java_lexer): Rearrange for gengtype.
6209         * config-lang.in (gtfiles): Add lex.h, parse.h.
6211 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6213         * All Files: Remove PARAMS macro.
6215         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6216         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6217         `__STDC__' macros.
6219         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6220         VA_CLOSE.
6222 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6224         * Make-lang.in (java.install-common, java.uninstall,
6225         java.install-info, java.install-man): Prepend $(DESTDIR)
6226         to destination paths in all (un)installation commands.
6227         (java.install-common): Rewrite $(LN) command to support
6228         DESTDIR with "ln" as well as with "ln -s".
6230 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6232         * java-tree.h: Protect against multiple inclusion.
6234 2003-01-07  Tom Tromey  <tromey@redhat.com>
6236         * class.c (add_assume_compiled): Don't adjust parent if we're
6237         already at the root of tree.
6239 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6241         * lang.c (dump_compound_expr): Prototype.
6243 2003-01-03  Tom Tromey  <tromey@redhat.com>
6245         Fix for PR java/8712:
6246         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6247         when simply checking against `null'.
6249 2003-01-03  Tom Tromey  <tromey@redhat.com>
6251         * gcj.texi (Standard Properties): Document http.proxyHost and
6252         http.proxyPort.
6254         * gcj.texi (GNU Classpath Properties): Document new properties.
6256 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6258         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6259         java/lang-options.h, java/mangle.c, java/mangle_name.c,
6260         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6262 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6264         * Make-lang.in, boehm.c, buffer.c,
6265           buffer.h, builtins.c, class.c,
6266           config-lang.in, constants.c,
6267           convert.h, decl.c, except.c,
6268           expr.c, java-except.h,
6269           java-tree.h, javaop.def,
6270           jcf-parse.c, jcf-write.c,
6271           jv-scan.c, jvgenmain.c,
6272           jvspec.c, keyword.gperf,
6273           keyword.h, lang-options.h,
6274           lang-specs.h, lang.c, lex.c,
6275           lex.h, mangle.c, mangle_name.c,
6276           parse-scan.y, parse.h, parse.y,
6277           typeck.c, verify.c, xref.c,
6278           xref.h: Replace "GNU CC" with
6279           "GCC" in the copyright header.
6281         * check-init.c, gjavah.c, javaop.h,
6282           jcf-depend.c, jcf-dump.c, jcf-io.c,
6283           jcf-path.c, jcf-reader.c, jcf.h,
6284           zextract.c, zipfile.h: These files are
6285           "part of GCC". Also say "GCC" not "GNU CC".
6287 2002-12-30  DJ Delorie  <dj@redhat.com>
6289         * Make-lang.in: Protect against texi2pod/pod2man failing.
6291 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
6293         * gcj.texi: Use @copying.
6295 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6297         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6298         print_cxx_classname.
6299         (print_cxx_classname): Add add_scope parameter.
6300         (print_class_decls): Do not emit a semicolon after the extern
6301         "Java" block.
6302         (process_file): Adjust calls to print_cxx_classname.
6304 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6306         * gcj.texi: Include Cover Texts in man page.
6308 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
6310         * class.c (build_static_field_ref): Check FIELD_FINAL.
6312         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6313         instead of current_constant_pool_data_ref.
6314         * java-tree.h (current_constant_pool_data_ref): Undefine.
6315         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6316         * jcf-parse.c (init_outgoing_cpool): Don't initialize
6317         current_constant_pool_data_ref.
6319         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6320         not build_internal_class_name.
6322         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6323         Use it when class ref isn't certain to be compiled.
6325 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6327         * gcj.texi: Include gcc-common.texi.
6328         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6329         $(srcdir)/doc/include/gcc-common.texi.
6331 2002-12-22  Anthony Green  <green@redhat.com>
6333         * gcj.texi (Limitations): Add note about org.xml.sax and
6334         org.w3c.dom.
6336 2002-12-20  Tom Tromey  <tromey@redhat.com>
6338         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6339         where minimum case value is Integer.MIN_VALUE.
6340         Fixes PR java/8955.
6342 2002-12-18  Andrew Haley  <aph@redhat.com>
6344         * parse.y (patch_invoke): Force evaluation order when `check' is
6345         set.  For PR libgcj/8945.
6347 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
6349         * gcj.texi: Change version number to 3.4.
6351 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
6352         Andrew Haley <aph@redhat.com>
6354         * parse.y (source_end_java_method): Remove custom encoding of line
6355         numbers for a function decl before passing it to the back end.
6357 2002-12-03  Andrew Haley  <aph@redhat.com>
6359         * class.c (make_class_data): New field, "chain".
6360         * decl.c (java_init_decl_processing): Likewise.
6362 2002-12-02  Tom Tromey  <tromey@redhat.com>
6364         For PR java/8740:
6365         * parse.y (do_resolve_class): Handle qualified name via
6366         recursion.
6368 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6370         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6371         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6372         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6373         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6374         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6375         Include coretypes.h and tm.h.
6376         * Make-lang.in: Update dependencies.
6378 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6380         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6382 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6384         * jcf-reader.c: Don't expand JCF_readu4 inside the
6385         expansion of JCF_SKIP.
6387 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6389         * jcf-reader.c: Don't expand JCF_readu4 inside the
6390         expansion of JCF_SKIP.
6392 2002-11-22  Tom Tromey  <tromey@redhat.com>
6394         * parse.y (patch_binop): Cast right hand side of shift expression
6395         to `int'.  Fixes PR java/8676.
6397 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
6398             Andrew Haley <aph@redhat.com>
6400         * gcc/java/jcf-write.c (write_classfile): Remove target
6401         class file, if it exists, before renaming the temporary
6402         class file to it.
6404 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6406         * jvspec.c (lang_specific_spec_functions): New.
6408 2002-11-18  Tom Tromey  <tromey@redhat.com>
6410         Fix for PR java/7912:
6411         * expr.c (can_widen_reference_to): Allow cast of array to
6412         Cloneable or Serializable.
6413         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
6414         (java_io_serializable_identifier_node): Likewise.
6415         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
6416         (valid_ref_assignconv_cast_p): Use new identifier nodes.
6417         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
6418         java_io_serializable.
6419         * decl.c (java_init_decl_processing): Initialize
6420         java_lang_cloneable_identifier_node and
6421         java_io_serializable_identifier_node.
6422         (java_lang_cloneable_identifier_node): New global.
6423         (java_io_serializable_identifier_node): Likewise.
6425 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
6427         * buffer.c: Remove unnecessary casts.
6428         * check-init.c: Likewise.
6429         * class.c: Likewise.
6430         * constants.c: Likewise.
6431         * decl.c: Likewise.
6432         * except.c: Likewise.
6433         * gjavah.c: Likewise.
6434         * jcf-io.c: Likewise.
6435         * jcf-parse.c: Likewise.
6436         * jcf-path.c: Likewise.
6437         * jvspec.c: Likewise.
6438         * lang.c: Likewise.
6439         * lex.c: Likewise.
6440         * verify.c: Likewise.
6442 2002-11-06  Tom Tromey  <tromey@redhat.com>
6444         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6445         a JNI header.
6447 2002-11-05  Tom Tromey  <tromey@redhat.com>
6449         Fix for PR java/6388.
6450         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
6451         * java-tree.h (enum java_tree_index): New values
6452         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
6453         (decimal_int_max, decimal_long_max): New defines.
6454         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
6455         (error_if_numeric_overflow): Rewrote range checking.
6456         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
6457         decimal_long_max.
6459 2002-11-02  Tom Tromey  <tromey@redhat.com>
6461         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6463         * class.c (make_method_value): Put class name, not signature, into
6464         `throws' field.  For PR java/8415.
6466 2002-10-24  Tom Tromey  <tromey@redhat.com>
6468         * gcj.texi (Invoking gij): Document --showversion.
6469         (Standard Properties): java.library.path now set.
6471 2002-10-23  Tom Tromey  <tromey@redhat.com>
6473         * gjavah.c (decode_signature_piece): In JNI mode, print
6474         `jobjectArray' when array depth is nonzero.
6475         Fixes PR java/8296.
6477 2002-10-15  Andrew Haley  <aph@redhat.com>
6479         * parse.y (patch_invoke): Call force_evaluation_order on a static
6480         arg list.
6481         (resolve_qualified_expression_name): Call force_evaluation_order
6482         on a arg list that is part of a Qualified Expression Name.
6484         * lang.c (dump_compound_expr): New.
6485         (java_dump_tree): New.
6487 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
6489         * gcj.texi: Added item describing the GCJ runtime property
6490         "gnu.gcj.progname".
6492 2002-10-15  Richard Henderson  <rth@redhat.com>
6494         * jcf-parse.c (get_constant): Fix type warning.
6496 2002-10-15  Andrew Haley  <aph@redhat.com>
6498         * java-tree.h (java_inlining_merge_static_initializers): Declare.
6499         (java_inlining_map_static_initializers): Declare.
6501 2002-10-14  Andrew Haley  <aph@redhat.com>
6503         * tree-inline.c (remap_block): All local class initialization
6504         flags go in the outermost scope.
6505         (expand_call_inline): Call java_inlining_map_static_initializers.
6506         (expand_call_inline): Call java_inlining_merge_static_initializers.
6507         * java/lang.c (merge_init_test_initialization): New.
6508         (java_inlining_merge_static_initializers): New.
6509         (inline_init_test_initialization): New.
6510         (java_inlining_map_static_initializers): New.
6512 2002-10-11  Mark Wielaard  <mark@klomp.org>
6514         * gcj.texi (Compatibility): Add Limitations and Extensions section.
6516 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6518         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6520 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6522         * parse.y (merge_string_cste): Add parentheses around & within |.
6524 2002-10-08  Tom Tromey  <tromey@redhat.com>
6526         * parse.y (variable_declarator_id): Simplify error path for
6527         array declarator error.  For PR java/8003.
6529 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
6531         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6532         bug_report_url.
6534 2002-10-08  Andrew Haley  <aph@redhat.com>
6536         * parse.y (attach_init_test_initialization_flags): Check for
6537         error_mark_node.
6539 2002-10-07  Anthony Green  <green@redhat.com>
6541         * parse.y (merge_string_cste): Fix bug in string concatenation.
6543 2002-10-03  Michael Koch  <konqueror@gmx.de>
6545         * gcj.texi (Standard properties):
6546         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
6548 2002-10-02  Roger Sayle  <roger@eyesopen.com>
6550         PR optimization/6627
6551         * lang.c (java_init): If storing the vbit in function
6552         pointers, ensure that force_align_functions_log is atleast
6553         one to aid compatability with g++ vtables.
6555 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
6557         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
6558         foul of type-based aliasing.
6560 2002-09-30  Anthony Green  <green@redhat.com>
6562         * gcj.texi (Invoking jv-scan): Fix texinfo.
6564 2002-09-28  Anthony Green  <green@redhat.com>
6566         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
6567         (Code Generation): Add -fno-assert documentation.
6568         * jv-scan.c (flag_assert): New global.
6569         (options): Add assert option.
6570         (help): Add --no-assert documentation.
6571         * parse-scan.y (flag_assert): New global.
6572         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
6573         (flag_assert): New global.
6574         * java-tree.h (flag_assert): New global.
6575         * lex.c (java_lex): Obey flag_assert.
6576         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
6577         calling cc1.
6579 2002-09-26  Andrew Haley  <aph@redhat.com>
6581         * expr.c (build_java_array_length_access): Check for null pointer.
6582         * expr.c (expand_java_arrayload): Likewise.
6584 2002-09-21  Richard Henderson  <rth@redhat.com>
6586         * jcf-parse.c (get_constant): Decode from IEEE no matter
6587         what the target format.
6589 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
6591         * ChangeLog: Follow spelling conventions.
6592         * class.c: Likewise.
6593         * decl.c: Likewise.
6594         * expr.c: Likewise.
6595         * gjavah.c: Likewise.
6596         * java-tree.h: Likewise.
6597         * jcf-dump.c: Likewise.
6598         * jcf-parse.c: Likewise.
6599         * jvspec.c: Likewise.
6600         * lang.c: Likewise.
6601         * mangle.c: Likewise.
6602         * parse.y: Likewise.
6604 2002-09-17  Tom Tromey  <tromey@redhat.com>
6606         * lex.c (java_read_unicode_collapsing_terminators): Handle case
6607         where \r appears at EOF.  Fixes PR java/7950.
6609 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6611         * jvspec.c (lang_specific_driver): Remove unused variable.
6613 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
6615         * java-tree.h (union lang_tree_node): Add chain_next option.
6617 2002-09-16  Richard Henderson  <rth@redhat.com>
6619         * jcf-parse.c (get_constant): Runtime check for IEEE format;
6620         use new real.h interface.
6621         * jcf-write.c (find_constant_index): Use new real.h interface.
6622         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
6624 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
6626         * lang.c: Follow spelling conventions.
6628 2002-09-11  Per Bothner  <per@bothner.com>
6630         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
6631         constant to the type of the field.
6632         (java_complete_tree):  Remove now-redundant code.
6634         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
6636 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
6638         For PR java/5794:
6639         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
6640         return label if a ret instruction for the jsr has been reached.
6642 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
6644         * parse.y (DIR_SEPARATOR): Don't define.
6645         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
6647 2002-08-28  Andrew Haley  <aph@redhat.com>
6649         * verify.c (verify_jvm_instructions): Allow exception handler
6650         inside code that is being protected, but generate a warning.
6651         * except.c (link_handler): Initialize `expanded' in new eh_range.
6652         (binding_depth, is_class_level, current_pc): Declare extern.
6654 2002-09-01  Mark Wielaard <mark@klomp.org>
6656         * gcj.texi: Add chapter about system properties.
6657         Fixed some typos.
6659 2002-08-26  Tom Tromey  <tromey@redhat.com>
6661         * parse.y (try_builtin_assignconv): Allow narrowing primitive
6662         conversion if RHS_TYPE is byte, short, or char.
6664 2002-08-22  Tom Tromey  <tromey@redhat.com>
6666         * gcj.texi (Invoking gij): Document -cp and -classpath.
6668 2002-08-21  Tom Tromey  <tromey@redhat.com>
6670         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
6671         $(prefix)/share.  For PR libgcj/7633.
6673         For PR java/6005 and PR java/7611:
6674         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
6675         (java_can_use_bit_fields_p): New function.
6677 2002-08-16  Tom Tromey  <tromey@redhat.com>
6679         * gcj.texi (Class Initialization): Mention class initialization of
6680         arrays.
6682 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
6684         * Make-lang.in (java-tree-inline.o): New.
6685         (JAVA_OBJS): Add java-tree-inline.o.
6686         * parse.y (source_end_java_method): Call java_optimize_inline.
6687         (java_expand_method_bodies): Save method's tree in
6688         DECL_SAVED_TREE.
6689         (add_stmt_to_compound): Keep track of the number of statments.
6690         * lang.c (java_init): Enable flag_inline_trees.
6691         (java_post_options): If flag_inline_functions is on, enable
6692         flag_inline_trees instread.
6693         (decl_constant_value): New.
6694         (java_tree_inlining_walk_subtrees): New.
6695         * java-tree.h (DECL_NUM_STMTS): New macro.
6696         (java_optimize_inline): Declare.
6697         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
6698         Handle a LABEL_EXPR.
6699         * decl.c (build_result_decl): If we already have a DECL_RESULT
6700         don't make another.
6701         (dump_function): New.
6702         (java_optimize_inline): New.
6703         (dump_function): New.
6705 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
6707         For PR java/7483:
6708         * parse.y (build_assertion): Invert return from
6709         desiredAssertionStatus.
6711 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6713         * jcf-write.c (get_access_flags): Return correct access flags for
6714         private and protected inner classes.
6716 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6718         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
6720 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
6722         * mangle_name.c: Don't include obstack.h twice.
6723         * xref.c: Don't include obstack.h.
6725 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
6727         * class.c: (permanent_obstack): Delete declaration.
6728         * constants.c: (permanent_obstack): Delete declaration.
6729         * except.c: (permanent_obstack): Delete declaration.
6730         * expr.c: (permanent_obstack): Delete declaration.
6731         * jcf-parse.c: (permanent_obstack): Delete declaration.
6732         (saveable_obstack): Delete declaration.
6733         * parse.h: (permanent_obstack): Delete declaration.
6734         * typeck.c: (permanent_obstack): Delete declaration.
6736 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6738         * gcj.texi (version-gcc): Increase to 3.3.
6740 2002-07-22  Tom Tromey  <tromey@redhat.com>
6742         * lex.c (java_lex): Check for `e' or `E' after 0.
6744 2002-07-21  Richard Henderson  <rth@redhat.com>
6746         * lang.c (java_unsafe_for_reeval): New.
6747         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
6749 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
6751         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
6752         (jcf_path_init): Use GET_ENVIRONMENT.
6754 2002-07-10  Roger Sayle  <roger@eyesopen.com>
6755             Zack Weinberg <zack@codesourcery.com>
6757         * builtins.c (initialize_builtins): Remove defines that
6758         handled C/C++ specific junk hereby removed from builtins.def.
6760 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
6762         * lang.c (java_post_options): Update prototype.
6764 2002-07-05  Roger Sayle  <roger@eyesopen.com>
6766         * builtins.c (initialize_builtins): Ignore the additional
6767         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
6768         the builtins.def file.
6770 2002-07-01  Tom Tromey  <tromey@redhat.com>
6772         For PR libgcj/7073:
6773         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
6774         specially.
6776 2002-07-01  Roger Sayle  <roger@eyesopen.com>
6778         * java/decl.c (builtin_function): Accept additional parameter.
6779         (java_init_decl_processing): Pass an additional NULL_TREE
6780         argument to builtin_function.
6782 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
6784         * gcj.texi: Fixed gcj invocation example so that it compiles.
6786 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6788         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
6789         * parse.y (mark_parser_ctxt): Likewise.
6790         (check_modifiers, declare_local_variables): Avoid incorrect
6791         hardcoded constant 10.
6793         * lex.c (java_read_char): Avoid "comparison is always true"
6794         warning.
6796 2002-06-25  Andreas Schwab  <schwab@suse.de>
6798         * expr.c (JSR): Avoid undefined operation on PC.
6800 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6802         * decl.c (clear_binding_level): Const-ify.
6804 2002-06-13  Akim Demaille  <akim@epita.fr>
6806         * parse.y (class_declaration, interface_declaration): Make sure
6807         all their rules have an action, in order to avoid meaningless `$$
6808         = $1' and their type clashes.
6810 2002-06-11  Tom Tromey  <tromey@redhat.com>
6812         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
6813         * parse-scan.y (statement_without_trailing_substatement): Added
6814         assert_statement.
6815         (assert_statement): New rule.
6816         * java-tree.h (struct lang_type) [assertions]: New field.
6817         (TYPE_USES_ASSERTIONS): New macro.
6818         (CLASS_USES_ASSERTIONS): Likewise.
6819         (FIELD_SYNTHETIC): New define.
6820         * lex.c (java_lval;): Added ASSERT_TK.
6821         * parse.y (ASSERT_TK): Added.
6822         (statement_without_trailing_substatement): Added assert_statement.
6823         (assert_statement): New rule.
6824         (build_assertion): New function.
6825         (maybe_generate_pre_expand_clinit): Create and initialize
6826         $assertionsDisabled.
6827         (lookup_package_type): Removed decl.
6828         * keyword.h: Rebuilt.
6829         * keyword.gperf (assert): New token.
6831 2002-06-10  Akim Demaille  <akim@epita.fr>
6833         * parse.y (interface_type_list, class_member_declaration)
6834         (unary_expression_not_plus_minus): Remove duplicate %type.
6835         Whitespace changes.
6837 2002-06-09  Tom Tromey  <tromey@redhat.com>
6839         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
6841         * parse.y (method_header): Give error message in all cases.
6842         Fixes PR java/6865.
6844 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6846         Don't use RTL inlining. Fix for PR java/6820.
6847         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
6848         (flag_really_inline): New.
6849         (java_decode_option): Set flag_really_inline if -finline-functions
6850         is seen.
6851         (java_post_options): New function. Turn off inlining unless
6852         flag_really_inline is set.
6854 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6856         * gjavah.c (throwable_p): Accept argument as either a classname or
6857         signature fragment. Create null-terminated classname string for super
6858         when calling itself recursively.
6859         (decode_signature_piece): Skip first character from class name
6860         signature when calling throwable_p.
6862 2002-06-08  H.J. Lu  (hjl@gnu.org)
6864         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
6866 2002-06-04  Tom Tromey  <tromey@redhat.com>
6868         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
6870 2002-06-04  Michael Koch  <konqueror@gmx.de>
6872         * gcj.texi (Input Options): Fixed typo.
6874 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
6876         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
6877         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
6878         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
6879         and all now-pointless local variables.  Rename other local
6880         variables to reflect their not being handles.
6882         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
6883         #if JCF_USE_STDIO blocks.
6885         * parse.y: Add missing semicolon at end of rule.
6887 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
6889         * check-init.c (attach_initialized_static_class): Delete, unused.
6890         * parse.y: Use htab_t instead of struct hashtable, update
6891         all uses.
6892         * java-tree.h: Include hashtab.h instead of hash.h.
6893         (struct lang_decl_func): Use htab_t, set up for gengtype.
6894         (struct init_test_hash_entry): Delete.
6895         (struct treetreehash_entry): New.
6896         (java_treetreehash_find): New
6897         (java_treetreehash_new): New prototype.
6898         (java_treetreehash_create): New prototype.
6899         (java_mark_tree): Delete prototype.
6900         (java_hash_hash_tree_node): Delete prototype.
6901         (java_hash_compare_tree_node): Delete prototype.
6902         (attach_initialized_static_class): Delete prototype.
6903         * expr.c (build_class_init): Update to use java_treetreehash
6904         functions.
6905         (java_expand_expr): Update to use htab_t.
6906         (emit_init_test_initialization): Likewise.
6907         * decl.c (java_mark_tree): Delete.
6908         * class.c (init_test_hash_newfunc): Delete.
6909         (java_hash_hash_tree_node): Delete.
6910         (java_hash_compare_tree_node): Delete.
6911         (add_method_1): Update to use java_treetreehash functions.
6912         (JAVA_TREEHASHHASH_H): New macro.
6913         (java_treetreehash_hash): New function.
6914         (java_treetreehash_compare): New function.
6915         (java_treetreehash_find): New function.
6916         (java_treetreehash_new): New function.
6917         (java_treetreehash_create): New function.
6918         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
6920         * Make-lang.in (java/parse.o): Depend on debug.h.
6921         * java-tree.h (struct lang_identifier): Use gengtype.
6922         (union lang_tree_node): New.
6923         (struct lang_decl_func): Use gengtype.
6924         (struct lang_decl_var): Likewise.
6925         (struct lang_decl): Likewise.
6926         * parse.y: Include debug.h.
6927         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
6929         * lang.c (struct language_function): New dummy structure.
6931         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
6932         descriminator for DECL_LANG_SPECIFIC.
6933         (struct lang_decl_func): Rename from struct lang_decl.
6934         (enum lang_decl_desc): New.
6935         (struct lang_decl): Make it a union.  Update all the accessor macros.
6936         (struct lang_type): Use gengtype.
6937         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
6938         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
6939         are now the same size.
6940         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
6941         use discriminator to mark DECL_LANG_SPECIFIC.
6943         * Make-lang.in (gt-java-builtins.h): New rule.
6944         (java/builtins.o): Add dependency on gt-<filename>.h.
6945         * builtins.c: Use gengtype for roots.
6946         (union string_or_tree): Use gengtype.
6947         (struct builtin_record): Use gengtype.
6948         * config-lang.in (gtfiles): Add builtins.c.
6950         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
6951         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
6952         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
6953         gt-java-parse.h, gtype-java.h): Add rules to generate.
6954         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
6955         (class.o): Add dependency on gt-*.h.
6956         (constants.o): Likewise.
6957         (decl.o): Likewise.
6958         (expr.o): Likewise.
6959         (jcf-parse.o): Likewise.
6960         (jcf-write.o): Likewise.
6961         (lang.o): Likewise.
6962         * config-lang.in (gtfiles): New.
6963         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6964         * constants.c: Replace uses of ggc_add_* with GTY markers.
6965         Include gt-*.h.
6966         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6967         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6968         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
6969         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
6970         Include gt-*.h.
6971         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
6972         Include gt-*.h.
6973         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6974         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
6975         gt-*.h.
6976         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6977         Include gtype-java.h.
6979 2002-06-02  Tom Tromey  <tromey@redhat.com>
6981         Fix for PR java/5913:
6982         * parse.y (patch_binop): Call patch_string on op1.
6984 2002-06-02  Tom Tromey  <tromey@redhat.com>
6986         Fix for PR java/1343, PR java/6336:
6987         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
6988         formatting.  Changed return type.
6989         (anonymous_class_counter): Moved to top of file.
6990         (maybe_make_nested_class_name): Append number to class name for
6991         function-local classes.
6993 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
6995         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
6996         * Make-lang.in: Update dependency lists.
6998 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
7000         * gjavah.c (throwable_p): Do not free the name of the class after
7001         passing it to find_class.
7002         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7003         * jcf-io.c (dirent.h): Include it.
7004         (fnmatch.h): Likewise.
7005         (compare_path): New function.
7006         (java_or_class_file): Likewise.
7007         (memoized_dirlist_entry): New type.
7008         (memoized_dirlist_lookup_eq): New function.
7009         (memoized_dirlists): New variable.
7010         (caching_stat): New function.
7011         (memoized_class_lookup_eq): New function.
7012         (memoized_class_lookups): Likewise.
7013         (find_class): Use memoized_class_lookups and caching_stat.
7014         * jcf.h (JCF_USE_SCANDIR): Define.
7015         * parse.y (java_expand_classes): Write the class files in reverse
7016         order.
7018 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7020         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7022 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
7024         * jcf-write.c (write_classfile): Unlink the temporary file if it
7025         cannot be renamed.  Use concat to build up the name of the
7026         temporary file.
7028 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
7030         * jcf-write.c (write_classfile): Write the file to a
7031         temporary file and then rename it.
7033 2002-05-07  Tom Tromey  <tromey@redhat.com>
7035         * gjavah.c (throwable_p): Use xstrdup, not strdup.
7037         Fix for PR java/1200:
7038         * gjavah.c (throwable_p): New function.
7039         (decode_signature_piece): Use it.  A `WeakReference' isn't the
7040         same as a `jweak'.
7041         Include hashtab.h.
7042         (gcjh_streq): New function.
7044 2002-05-07  Andreas Jaeger  <aj@suse.de>
7046         * parse.y (finish_for_loop): Fix if statement.
7048 2002-05-06  Tom Tromey  <tromey@redhat.com>
7050         Fix for PR java/5941:
7051         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7052         loop update expression.
7053         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7054         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7056 2002-05-04  Mark Wielaard  <mark@klomp.org>
7058         For PR java/6519:
7059         * parse.y (build_string_concatenation): Return just op1 only when op2
7060         is null and op1 is a STRING_CST, otherwise always construct a
7061         StringBuffer.
7063 2002-04-27  Tom Tromey  <tromey@redhat.com>
7065         For PR java/6382:
7066         * parse.y (string_convert_int_cst): New function.
7067         (merge_string_cste): Use it.
7069 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7071         * java-tree.h (java_parse_file): Update.
7072         (java_set_yydebug): Remove.
7073         * jcf-parse.c (yydebug): Remove.
7074         (java_set_yydebug): Die.
7075         (java_parse_file): Update.
7076         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7078 2002-04-24  Tom Tromey  <tromey@redhat.com>
7080         For PR java/6425:
7081         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7082         EXPR_WFL_QUALIFICATION of qual_wfl.
7084 2002-04-23  Per Bothner  <per@bothner.com>
7086         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7087         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7088         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7090 2002-04-23  Tom Tromey  <tromey@redhat.com>
7092         For PR java/6314:
7093         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7094         recognize `-fcompile-resource='.
7095         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7096         a bit.
7098 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7100         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7101         paths. Fixes PR java/2791.
7103 2002-04-19  Andrew Haley  <aph@redhat.com>
7105         * jcf-write.c (push_long_const): lo, hi: New variables.
7106         Use rshift_double to extract the high part of a 64-bit long.
7107         Use WORD_TO_INT to extract the low part.
7109         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7110         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7111         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7113 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7115         * typeck.c (incomplete_type_error): Remove.
7117 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7119         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7120         for hash synchronization.
7121         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7122         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7123         class_type_node.
7125 2002-04-16  Mark Wielaard  <mark@klomp.org>
7127         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7128         negative zero.
7130 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7132         Fix for PR java/6294:
7133         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7134         interfaces.
7136 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7138         Fix for PR java/6085:
7139         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7140         to get enclosing "this" argument for inner-class constructor
7141         invocation. Pass correct arguments to build_access_to_thisn.
7143 2002-04-10  Andreas Jaeger  <aj@suse.de>
7145         * gcj.texi (Input Options): Fix extdirs patch.
7147 2002-04-10  Anthony Green  <green@redhat.com>
7149         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7151 2002-04-09  Anthony Green  <green@redhat.com>
7153         * gcj.texi (Input Options): Add --extdirs documentation.
7154         * jcf-dump.c (OPT_extdirs): New macro.
7155         (options): Add extdirs option.
7156         (help): Describe --extdirs.
7157         (main): Handle OPT_extdirs.
7158         * gjavah.c (OPT_extdirs): New macro.
7159         (options): Add extdirs option.
7160         (help): Describe --extdirs.
7161         (main): Handle OPT_extdirs.
7162         * jcf-path.c (jcf_path_init): Add extdirs support.
7163         (jcf_path_extdirs_arg): New function.
7164         (extensions): New variable to hold extensions path entries.
7165         * jvspec.c: Remove -fextdirs= when compiling main().
7166         * lang.c (java_decode_option): Handle -fextdirs=.
7167         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7168         * Make-lang.in: Compile jcf-path with version info for use in
7169         identifying the appropriate libgcj.jar.
7171 2002-04-08  Tom Tromey  <tromey@redhat.com>
7173         For PR libgcj/5303:
7174         * .cvsignore: Added rmic.1 and rmiregistry.1.
7175         * gcj.texi (Top): Link to new nodes.
7176         (Invoking rmic): New node.
7177         (Invoking rmiregistry): Likewise.
7178         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7179         rmiregistry.1.
7180         (java.maintainer-clean): Likewise.
7181         ($(srcdir)/java/rmic.1): New target.
7182         ($(srcdir)/java/rmiregistry.1): Likewise.
7183         (java.install-man): Handle rmic.1 and rmiregistry.1.
7185 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7187         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7188         Add note about handling uncaught exceptions. Add an exception handler
7189         to example.
7191 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7193         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7194         after using it to patch CALL_EXPR.
7196 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7198         * gcj.texi (Invocation): Document CNI invocation API.
7200 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7202         * expr.c (truthvalue_conversion): Rename.  Update.
7203         (expand_compare): Update.
7204         * java-tree.h (java_truthvalue_conversion): New.
7205         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7207 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7209         * java-tree.h (java_mark_addressable): New.
7210         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7211         * typeck.c (mark_addressable): Rename, update.
7213 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7215         * expr.c (build_java_binop): Update.
7216         * java-tree.h (java_signed_type, java_unsigned_type,
7217         java_signed_or_unsigned_type): Update.
7218         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7219         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7220         * parse.y (patch_binop): Update.
7221         * typeck.c (signed_or_unsigned_type, unsigned_type,
7222         signed_type): Update.
7224 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7226         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7227         (java_dummy_print): Remove.
7228         (lang_print_error): Rename.  Exit early if inhibiting output.
7229         (inhibit_error_printing_function): New.
7230         (java_init): Don't set hook.
7231         (lang_init_source): Use new boolean.
7233 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7235         * parse.y (do_resolve_class): Fix infinite recursion.
7237 2002-03-29  Tom Tromey  <tromey@redhat.com>
7239         * parse.y (check_inner_circular_reference): Ignore incomplete
7240         types.
7242 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7244         * Make-lang.in (builtins.o): Update.
7245         * boehm.c (get_boehm_type_descriptor): Update.
7246         * builtins.c: Include langhooks.h.
7247         * decl.c (java_init_decl_processing): Update.
7248         * java-tree.h (java_type_for_mode, java_type_for_size): New.
7249         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7250         Redefine.
7251         * typeck.c (type_for_mode, type_for_size): Update.
7253 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7255         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7257 2002-03-28  Tom Tromey  <tromey@redhat.com>
7259         * except.c (expand_end_java_handler): If the handler type is NULL,
7260         use java.lang.Throwable.  Fixes PR java/5986.
7262 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7264         Fix for PR java/4715:
7265         * jcf-parse.c (parse_source_file_3): New function.
7266         (read_class): Call it.
7267         (java_parse_file): Likewise.
7269 2002-03-28  Jan Hubicka  <jh@suse.cz>
7271         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7273 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7275         * parse.y (resolve_package): Initialize "decl".
7276         (lookup_package_type): Remove unused function.
7278 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7280         Fix for PR java/5993:
7281         * parse.y (resolve_package): Return the decl if resolution was
7282         successful. Don't special case "java.lang" and "java.lang.reflect"
7283         packages. Set type_name to the merged identifier.
7284         (resolved_qualified_expression_name): Print error using "name" if
7285         resolve_package returns NULL_TREE.
7287 2002-03-27  Tom Tromey  <tromey@redhat.com>
7289         * expr.c (expand_invoke): Don't generate null pointer check if
7290         we're calling <init>.
7292 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7294         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7295         fix prototype.
7296         * java-tree.h (java_lang_expand_expr): Similarly.
7297         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7298         (java_init): Don't set hook.
7300 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7302         Fix for PR java/5850:
7303         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7304         context if field was not found in the current scope.
7305         * expr.c (lookup_field): Don't look in enclosing contexts.
7307 2002-03-26  Tom Tromey  <tromey@redhat.com>
7309         Fix for PR java/5942:
7310         * parse.y (init_src_parse): Added sanity check.
7311         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7312         elements, not 11.
7314 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7316         * decl.c (lang_mark_tree): Rename java_mark_tree.
7317         * java-tree.h (java_mark_tree): New.
7318         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7320 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
7322         * lex.c: Change java_perform_atof to take normal parameters
7323         instead of a pointer to a parameter block.  Call it directly
7324         from java_lex.
7326 2002-03-22  Mark Wielaard  <mark@klomp.org>
7328         Fix for PR java/5368:
7329         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7330         when printing error message.
7332 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7334         * decl.c (maybe_build_cleanup): Remove.
7336 2002-03-22  Tom Tromey  <tromey@redhat.com>
7338         Andrew Haley  <aph@cambridge.redhat.com>
7340         * expr.c (build_field_ref): Don't build a check if the field is a
7341         member of `this'.
7343 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
7345         Fix for PR java/6026:
7346         * lex.c (java_lex): Fix parsing of consecutive floats.
7348 2002-03-21  Tom Tromey  <tromey@redhat.com>
7350         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7351         class.
7353 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7355         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7356         insert_block, getdecls, kept_level_p, global_bindings_p): New.
7358 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7360         * gcj.texi: @code{gcj} becomes @command{gcj}.
7361         @code{gcc} becomes @command{gcc}.
7362         GcjRaw changed to gnu.gcc.RawData.
7364 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7366         * decl.c (start_java_method): Use new hook.
7367         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7368         (java_init): Remove old hook.
7370 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7372         * builtins.c (define_builtin): Do nothing if `type' is null.
7373         Fixes PR java/5876.
7375 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7377         * parse.y (parser_check_super_interface): Fix error message
7378         grammar/order.
7380 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7382         * jcf-parse.c (get_constant): Delete unused variables.
7384 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7386         * java-tree.h (java_parse_file): New.
7387         * jcf-parse.c (yyparse): Rename java_parse_file.
7388         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7390 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7392         * parse.y (craft_constructor): Return the constructor decl.
7393         (java_expand_classes): Update comments.
7394         (lookup_method_invoke): Call fix_constructors immediately for
7395         anonymous class. Fixes PR java/5935.
7397 2002-03-15  Anthony Green  <green@redhat.com>
7399         * jcf-parse.c (yyparse): Don't emit class registration
7400         constructor when compiling resource files.
7402 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7404         * lang.c (java_tree_code_type, java_tree_code_length,
7405         tree_code_name): Delete.
7406         (tree_code_type, tree_code_length, tree_code_name): Define.
7407         (java_init): Don't try to copy into the various tree_code
7408         arrays.
7410 2002-03-12  Tom Tromey  <tromey@redhat.com>
7412         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7413         UTF-8, not UCS-2.  Fixes PR java/5923.
7415         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7416         a call_expr wrapped in a convert.  Fixes PR java/5848.
7418 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7420         * jcf-write.c (write_classfile): Improve error strings.
7422 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7424         * lex.c: Adjust comments to GNU standards.
7426 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7428         Fix for PR java/5902:
7429         * lex.c (java_lex): Fix parsing of literals.
7431 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7433         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
7434         to prevent it getting evaluated twice in the store checking case.
7435         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
7436         examining OBJECT.
7438 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7440         * decl.c (java_init_decl_processing): Make sure class_type_node
7441         alignment is not less than 64 bits if hash synchronization is enabled.
7443 2002-03-08  Per Bothner  <per@bothner.com>
7445         * parse.y (java_complete_lhs):  Check if patch_assignment
7446         returned an error-mark.
7448         * parse.y (try_builtin_assignconv):  Don't special-case zero.
7450 2002-03-08  Per Bothner  <per@bothner.com>
7452         Fix for PR java/5812.
7453         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
7454         here instead of in JSR macro.  Likewise with load_type_state call.
7455         Do the latter on if the return_pc has been verified (the jsr returns).
7456         (JSR):  Now just call build_java_jsr.
7458 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
7460         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7461         (java.install-common): Link native driver to
7462         JAVA_TARGET_INSTALL_NAME.
7464 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
7466         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7467         * builtins.c(sin_builtin): Likewise
7468         * builtins.c(sqrt_builtin): Likewise
7470 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
7472         * java/expr.c, java/jcf-parse.c, java/lex.c:
7473         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
7474         REAL_ARITHMETIC blocks unconditional.  Delete some further
7475         #ifdef blocks predicated on REAL_ARITHMETIC.
7477 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7479         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
7480         explicit sizeof/sizeof.
7481         * decl.c (java_init_decl_processing): Likewise.
7482         * jcf-parse.c (init_jcf_parse): Likewise.
7483         * parse.y (init_src_parse): Likewise.
7485 2002-03-02  Per Bothner  <per@bothner.com>
7487         Make --CLASSPATH by a synonym for --classpath and -classpath.
7488         Implement --bootclasspath.
7489         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
7490         (classpath_l):  Remove.
7491         (jcf_path_CLASSPATH_arg):  Remove.
7492         (jcf_path_bootclasspath_arg):  New function.
7493         (jcf_path_seal):  Simplify accordingly.
7495         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
7496         (jcf_path_CLASSPATH):  Remove declaration.
7497         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
7498         (lang_specific_driver):  Translate -bootclasspath.
7499         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
7500         * lang.c (decode_lang_options):  Do jcf_path_init first.
7501         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
7502         * gjavah.c:  Also handle --bootclasspath.
7503         Handle --CLASSPATH as a synonum for --classpath.
7504         * jcf-dump.c: Likewise.
7506         "." is not part of system path, but is the default for --classpath.
7507         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
7508         (jcf_path_seal):  Add "." if no CLASSPATH specified.
7510         * gcj.texi:  Document changes.
7512 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7514         * expr.c (build_java_arraystore_check): Fix formatting.
7516 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7518         Fix for PR java/5758, java/5632:
7519         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
7520         inner-class separator too.
7521         * parse.y (do_resolve_class): New local `decl_result.'
7522         Progressively build a name for what can have been loaded.
7524 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7526         * expr.c (java_array_data_offset): Removed function.
7527         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
7528         (build_java_array_length_access): Obtain "length" value using a
7529         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
7530         (build_java_arrayaccess): Correct comment. Access "data" using a
7531         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
7532         (build_java_arraystore_check): New function.
7533         (expand_java_arraystore): Use build_java_arraystore_check.
7534         * parse.y (patch_assignment): Simplify code to insert a store check
7535         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
7536         * check-init.c (check_init): Update to reflect that an array length
7537         access is now a COMPONENT_REF.
7538         * gcj.texi (Code Generation): Improve documentation of
7539         -fno-bounds-check. Add documentation for -fno-store-check.
7540         * java-tree.h (flag_store_check): Declare.
7541         (build_java_arraystore_check): Declare.
7542         * lang.c (flag_store_check): Initialize to 1.
7543         (lang_f_options): Add store-check option.
7544         * jvspec.c: Don't pass store-check option to jvgenmain.
7545         * lang-options.h: Add help string for -fno-store-check.
7547 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
7549         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
7550         * java-tree.h (java_dup_lang_specific_decl): New.
7551         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7553 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
7555         * builtins.c, decl.c: Delete traditional-mode-related code
7556         copied from the C front end but not used, or used only to
7557         permit the compiler to link.
7559 2002-02-22  Tom Tromey  <tromey@redhat.com>
7561         Fix for PR java/2369:
7562         * jvspec.c (verify_class_name): New function.
7563         (lang_specific_driver): Call it.
7564         (JAVA_START_CHAR_P): New macro.
7565         (JAVA_PART_CHAR_P): Likewise.
7567 2002-02-22  Per Bothner  <per@bothner.com>
7569         * class.c:  Change vtable to be more compatible with g++ v3 abi.
7570         (get_dispatch_table):  Prepend offset-to-top (always 0) and
7571         type_info pointer (currently unimplemented hence NULL) to vtable.
7572         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
7573         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
7574         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
7575         (build_dtable_decl):  Add declarations for new fields.
7577 2002-02-20  Per Bothner  <per@bothner.com>
7579         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
7580         to finit$ (otherwise generate_bytecode_insns drops it). However, we
7581         don't need to set it on the COMPOUND_EXPR - the caller does that.
7583 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7585         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
7586         `--CLASSPATH' becomes `--classpath.'
7587         * gjavah.c: Likewise.
7588         * jcf-dump.c: Likewise.
7589         * lang-options.h: Likewise.
7590         * lang.c: Likewise.
7591         * jcf-path.c: Updated comment.
7592         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
7593         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
7594         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
7595         (jcf_path_CLASSPATH_arg): Ditto.
7596         (classpath_u): Updated leading comment.
7598 2002-02-20  Per Bothner  <per@bothner.com>
7600         * builtins.c (check_for_builtin):  New function.
7601         (build_call_or_builtin):  Remove.
7602         * java-tree.h:  Update accordingly.
7603         * expr.c (expand_invoke):  Use build + check_for_builtin instead
7604         of build_call_or_builtin.
7605         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
7606         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
7607         flag (which had caused jcf-write to incorrectly emit invokevirtual).
7609 2002-02-17  Tom Tromey  <tromey@redhat.com>
7611         * java-tree.h (TYPE_STRICTFP): New macro.
7612         (struct lang_type) [strictfp]: New field.
7613         (CLASS_STRICTFP): New macro.
7614         (METHOD_STRICTFP): New macro.
7615         (struct lang_decl) [strictfp]: New field.
7616         * parse.y (method_header): Disallow strictfp constructor or
7617         abstract method.
7618         (STRICT_TK): Move before MODIFIER_TK.
7619         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
7620         (METHOD_MODIFIERS): Likewise.
7621         (INTERFACE_MODIFIERS): Likewise.
7622         * jcf-write.c (get_access_flags): Likewise.
7623         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
7624         (add_method_1): Likewise.
7625         (get_access_flags_from_decl): Likewise.
7626         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
7627         recognize strictfp flag.
7628         * jcf.h (ACC_STRICT): New define.
7630 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
7632         * class.c(build_utf8_ref): Move declaration of decl_size
7634 2002-02-07  Tom Tromey  <tromey@redhat.com>
7636         * gcj.texi (Input Options): --CLASSPATH does not suppress system
7637         path.
7639 2002-02-04  Anthony Green  <green@redhat.com>
7641         * class.c (build_utf8_ref): Put UTF-8 constants into merged
7642         sections if available.
7644 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7646         * parse.y (java_expand_classes): Fix typo in static field loop.
7648 2002-02-02  Richard Henderson  <rth@redhat.com>
7650         * class.c (add_field): Mark static fields external.
7651         (build_class_ref): Remove redundant set.
7652         * parse.y (java_expand_classes): Mark static fields of classes
7653         to be compiled as local.
7654         * jcf-parse.c (parse_class_file): Likewise.
7656 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7658         * gcj.texi (About CNI): New node.
7660 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7662         PR java/5080
7663         * jcf-parse.c : Check for HAVE_LOCALE_H before using
7664         setlocale() with LC_CTYPE as a parameter.
7665         * jv-scan.c: Same.
7667 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
7669         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7670         Follow GNU Coding Standards for --version.
7672 2002-01-28  Tom Tromey  <tromey@redhat.com>
7674         * expr.c (build_jni_stub): Ensure storage for `meth' is
7675         generated.
7676         * parse.y (java_complete_expand_methods): Set
7677         current_function_decl before building JNI stub.
7679 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
7681         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
7682         BUILT_IN_SQRTF.
7684 2002-01-22  Tom Tromey  <tromey@redhat.com>
7686         * decl.c (java_init_decl_processing): Use add_predefined_file.
7687         Predefine RawData.java.
7688         (predef_filenames): Removed.
7689         (java_init_decl_processing): Don't register predef_filenames.
7690         * jcf-parse.c (add_predefined_file): New function.
7691         (predefined_filename_p): Rewrote.
7692         (predefined_filename_p): No longer static.
7693         * decl.c (java_init_decl_processing): Call initialize_builtins.
7694         * Make-lang.in (JAVA_OBJS): Added builtins.o.
7695         (java/builtins.o): New target.
7696         * builtins.c: New file.
7697         * parse.y (patch_invoke): Use build_call_or_builtin.
7698         * java-tree.h (build_call_or_builtin): Declare.
7699         (initialize_builtins): Declare.
7700         (java_set_exception_lang_code): Removed unused declaration.
7701         (PREDEF_FILENAMES_SIZE): Removed.
7702         (java_tree_index): Added JTI_PREDEF_FILENAMES.
7703         (predef_filenames): New define.
7704         (add_predefined_file): Declare.
7705         (predefined_filename_p): Declare.
7706         * expr.c (expand_invoke): Use build_call_or_builtin.
7708 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7710         * parse.y (patch_switch_statement): Fix format specifier.
7712 2002-01-16  Tom Tromey  <tromey@redhat.com>
7714         More for PR java/5365:
7715         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
7716         default.
7717         (process_file): Generate include for
7718         java.lang.UnsupportedOperationExceptions.
7720 2002-01-15  Andreas Jaeger  <aj@suse.de>
7722         * .cvsignore: Add man pages.
7724 2002-01-15  Tom Tromey  <tromey@redhat.com>
7726         Fix for PR java/5365:
7727         * gjavah.c (process_file): Turn class name into a file name.
7729 2002-01-14  Matthias Klose  <doko@debian.org>
7731         * gcj.texi: Fix whitespace and formatting errors in the
7732         synopsis of the man pages. Update copyright.
7734 2002-01-14  Tom Tromey  <tromey@redhat.com>
7736         For PR libgcj/5303:
7737         * Make-lang.in (java.install-man): Handle jv-convert man page.
7738         (java.generated-manpages): Added jv-convert.1.
7739         (java.uninstall): Remove jv-convert.1.
7740         (java.maintainer-clean): Likewise.
7741         ($(srcdir)/java/jv-convert.1): New target.
7742         * gcj.texi (Top): Link to jv-convert node.
7743         (Individual utilities): Likewise.
7744         (Invoking jv-convert): New node.
7746 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
7747             Martin Kahlert  <martin.kahlert@infineon.com>
7749         * jcf-parse.c (get_constant): Don't swap lo/hi for big
7750         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
7752 2002-01-03  Graham Stott  <grahams@redhat.com>
7754         * class.c (compile_resource_file): Update copyright date.
7755         Constify filename parameter.
7756         (java-tree.h): Update copyright date.
7757         (compile_resource_file): Constify filename parameter.
7759 2002-01-03  Graham Stott  <grahams@redhat.com>
7761         * gcc/jcf-parse.c: Update copyright date.
7762         (yyparse): Constify resource_filename.
7764 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7766         * parse.y (src_parse_roots): Don't needlessly zero init.
7768 2001-12-31  Tom Tromey  <tromey@redhat.com>
7770         * parse.y (dump_java_tree): New function.
7771         (source_end_java_method): Call it.
7772         (end_class_declaration): Likewise.
7773         * lang.c (java_decode_option): Call dump_switch_p.
7775 2001-12-28  Tom Tromey  <tromey@redhat.com>
7777         * gen-table.pl: Don't process characters after \uffff.  Added
7778         comment pointing to input file.
7780 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7782         * gen-table.pl: Const-ify output.  Document the location of a
7783         suitable unicode input file.
7785         * chartables.h: Regenerate.
7787 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7789         * chartables.h: Const-ify.
7790         * gjavah.c (options): Likewise.
7791         * jcf-dump.c (options): Likewise.
7792         * jv-scan.c (options): Likewise.
7793         * lex.c (java_start_char_p, java_part_char_p): Likewise.
7794         * parse.y (binop_lookup): Likewise.
7796 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7798         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
7799         the static arrays that are output.
7800         * jvspec.c (jvgenmain_spec): Make static.
7801         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
7802         * keyword.h: Regenerate.
7803         * lang.c (string_option, process_option_with_no, lang_f_options,
7804         lang_W_options): Const-ify.
7805         * lex.c (java_lex): Likewise.
7807 2001-12-21  Richard Henderson  <rth@redhat.com>
7809         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
7810         (get_boehm_type_descriptor): ... here.  Arrange for the
7811         TREE_TYPE to get set properly.
7813 2001-12-21  Richard Henderson  <rth@redhat.com>
7815         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
7816         only if the target requires collect2.
7818         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
7820 2001-12-20  Tom Tromey  <tromey@redhat.com>
7822         For PR java/4509:
7823         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
7824         CAN_COMPLETE_NORMALLY for the node.
7825         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
7826         generate code for second branch if first branch can't complete
7827         normally.
7828         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
7829         the loop head if the loop body can't complete normally.
7831 2001-12-20  Tom Tromey  <tromey@redhat.com>
7833         For PR java/4766:
7834         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
7835         case where `finally' clause can't complete normally.
7837 2001-12-20  Tom Tromey  <tromey@redhat.com>
7839         Fixes PR java/5057:
7840         * parse.y (analyze_clinit_body): Added this_class parameter.
7841         Check for more cases where we must keep <clinit>.
7842         (maybe_yank_clinit): Cleaned up flow control.
7844 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7846         * decl.c (java_init_decl_processing): Don't initialize
7847         finit_leg_identifier_node.
7848         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
7849         (finit_leg_identifier_node): Remove.
7850         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
7852 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7854         * mangle.c (mangle_member_name): Don't special-case for
7855         NO_DOLLAR_IN_LABEL.
7856         * mangle_name.c (unicode_mangling_length): Likewise.
7857         (append_unicode_mangled_name): Likewise.
7858         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
7859         code.
7861 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7863         * expr.c (build_java_array_length_access): Don't force null pointer
7864         check unless flag_check_references is set.
7866 2001-12-20  Tom Tromey  <tromey@redhat.com>
7868         Fix for PR java/3417:
7869         * parse.y (patch_assignment): Added special processing for
7870         `return'.
7871         (patch_return): Don't convert booleans to integers, and don't
7872         special-case `null'.
7874 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
7876         * config-lang.in (diff_excludes): Remove.
7878 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
7880         * gcj.texi: Update link to GCC manual.
7882 2001-12-17  Tom Tromey  <tromey@redhat.com>
7884         * parse.y (link_nested_class_to_enclosing): Removed useless
7885         statement.
7887 2001-12-16  Tom Tromey  <tromey@redhat.com>
7889         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
7890         Fixes PR java/5088.
7892 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
7894         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
7895         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
7896         spelling errors.
7898 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7900         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
7902 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7904         * decl.c (java_init_decl_processing): Build otable_type correctly.
7905         otable_decl is an otable_type.
7907 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7909         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
7910         otable_type, otable_ptr_type, method_symbol_type,
7911         method_symbols_array_type, method_symbols_array_ptr_type): New
7912         field/global tree definitions.
7913         (flag_indirect_dispatch): New flag.
7914         * decl.c (java_init_decl_processing): Initialize new otable and
7915         otable_syms type nodes and decls. Add new field "index" to
7916         method_type_node.
7917         * class.c (build_method_symbols_entry): New function.
7918         (make_method_value): Set "index" to to method's vtable index for
7919         virtual methods when indirect-dispatch is not used.
7920         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
7921         and set vtable_method_count to -1. Set otable and otable_syms field
7922         if indirect-dispatch is used and there was something to put in them.
7923         (build_method_symbols_entry): New function.
7924         (emit_offset_symbol_table): New function.
7925         * expr.c (get_offset_table_index): New function.
7926         (build_invokevirtual): Build array reference to otable at the index
7927         returned by get_offset_table_index, and use the result as the vtable
7928         offset.
7929         (build_invokeinterface): Similar.
7930         * jcf-parse.c (yyparse): If indirect-dispatch, call
7931         emit_offset_symbol_table at the end of compilation, after all classes
7932         have been generated.
7933         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
7934         * lang.c (flag_indirect_dispatch): Define.
7935         (lang_f_options): Add indirect-dispatch flag.
7937 2001-12-14  Matthias Klose  <doko@debian.org>
7939         * gcj.texi: Markup for man page generation. Document missing
7940         options printed by <tool> --help.
7941         Terminate description of gij's -ms option with a dot.
7942         * Make-lang.in ($(srcdir)/java/*.1): New targets.
7943         (java.generated-manpages java.install-man, java.uninstall,
7944         java-maintainer-clean) Updated.
7946 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
7948         * class.c (get_dispatch_table): Fix java vtable layout
7949         for TARGET_VTABLE_USES_DESCRIPTORS.
7950         * decl.c (java_init_decl_processing): Initialize
7951         alloc_no_finalizer_node, finalize_identifier_node.
7952         * expr.c (class_has_finalize_method): New function.
7953         (expand_java_NEW): Generate calls for finalizer-free allocation.
7954         (build_invokevirtual): Fix java vtable layout for
7955         TARGET_VTABLE_USES_DESCRIPTORS.
7956         * java-tree.h (enum java_tree_index): New entries:
7957         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
7958         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
7959         (class_has_finalize_method): declare.
7960         (HAS_FINALIZER_P): New macro.
7961         * parse.y (patch_invoke): Generate calls for finalizer-free
7962         allocation.
7964 2001-12-12  Matthias Klose  <doko@debian.org>
7966         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
7967         whitespace at end of line.
7969 2001-12-11  Tom Tromey  <tromey@redhat.com>
7971         * lex.c (java_init_lex): Define wfl_to_string as
7972         gnu.gcj.runtime.StringBuffer unless generating bytecode.
7974 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
7976         * class.c (make_method_value): Use null_pointer_node to
7977         represent empty exception table.
7979 2001-12-10  Tom Tromey  <tromey@redhat.com>
7981         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
7983 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
7985         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
7987 2001-12-09  Per Bothner  <per@bothner.com>
7989         * check-init.c (current_switch_has_default):  New static field.
7990         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
7991         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
7992         DEFAULT_EXPR seen, simulate a default alternative that copies state.
7994 2001-12-09  Tom Tromey  <tromey@redhat.com>
7996         * check-init.c (check_init): Don't allow pre- or post- increment
7997         or decrement of final variable.
7998         (final_assign_error): Minor error message rewording.
8000 2001-12-08  Tom Tromey  <tromey@redhat.com>
8002         * java-tree.h: Fixed typo.
8004         * gjavah.c (decompile_method): Don't decompile to `return this'
8005         for static methods.
8007         * gjavah.c (cxx_keywords): Re-sorted.
8008         * lex.c (cxx_keywords): Re-sorted.
8010         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8011         else.
8013         * gjavah.c (print_namelet): Clear subnamelets.
8014         (HANDLE_METHOD): Set `method_printed' earlier.
8016 2001-12-07  Tom Tromey  <tromey@redhat.com>
8018         * lang.c (lang_f_options): Added
8019         optimize-static-class-initialization.
8020         (java_decode_option): Removed special case.
8022 2001-12-07  Per Bothner  <per@bothner.com>
8024         * check-init.c (check_init):  Fix typo freeing memory twice.
8026 2001-12-05  Per Bothner  <per@bothner.com>
8028         Restore support for static class initialization optimization.
8029         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8030         * check-init.c (check_int):  At end of BLOCK handle initialization
8031         blocks, which used to be done in java_complete_expand_method but did
8032         not handle the case where check_for_initialization might allocate
8033         more than a word of bits.
8034         * decl.c (lang_make_tree):  The smic field is now a tree.
8035         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
8036         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
8038         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
8040         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8041         Change from a hash table to a list.
8042         (struct_lang_decl):  Change field 'smic' to match.
8043         * class.c (add_method_1):  Initialize
8044         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8045         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
8046         (java_expand_method_bodies): -here, since 'smic' is now a list.
8047         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
8049         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
8051         * class.c (java_hash_compare_tree_node):  Fix casts.
8053 2001-12-04  Per Bothner  <per@bothner.com>
8055         * check-init.c:   Handle definite unassignment to finals in addition
8056         to definite assignment.
8057         (loop_current_locals):  New field.
8058         (num_current_locals, int start_current_locals, num_current_words):
8059         Make static.
8060         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
8061         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8062         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
8063         (get_variable_decl, check_final_reassigned):  New functions.
8064         (check_init, check_bool_init):  Modify as needed for checking finals.
8065         (check_for_initialization):  Take extra parameter and return void.
8066         Do extra start-up logic to check final fields for assignment.
8067         * parse.y (check_static_final_variable_assignment_flag,
8068         reset_static_final_variable_assignment_flag, check_final_assignment,
8069         check_final_variable_local_assignment_flag,
8070         reset_final_variable_indirect_assignment_flag,
8071         reset_final_variable_global_assignment_flag):  Remove functions.
8072         (java_complete_expand_methods, outer_field_access_fix,
8073         patch_assignment): Remove no-longer used logic.
8074         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8075         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8077         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8078         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8079         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8081         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8083         * java-tree.h (DECL FINAL):  New bit-field.
8084         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8085         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8086         (DECL_INIT_CALLS_THIS):  New macro.
8087         (struct lang_decl):  New bit-field init_calls_this.
8088         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8089         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8090         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8091         use it for both local variables and final fields.
8092         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8093         and local_final.
8094         (struct lang_type):  Remove hfv bit-field.
8095         (check_for_initialization):  Change to return void.
8097         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8098         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8099         * check-init.c (final_assign_error):  New helper function.
8100         (check_final_reassigned, check_init):  Use it.
8101         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8103         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8104         bit-fields to unsigned.
8106 2001-12-03  Per Bothner  <per@bothner.com>
8108         * parse.y (patch_binop):  Minor constant folding.
8110         * parse.y (build_current_thisn):  Shorter 'buffer'.
8112 2001-12-03  Per Bothner  <per@bothner.com>
8114         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8115         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8116         * jcf-write.c (generate_bytecode_insns):  Remove support for
8117         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8118         * check-init.c (check_init):  Likewise.
8120 2001-12-03  Per Bothner  <per@bothner.com>
8122         * verify.c (subroutine_nesting):  New function.
8123         (verify_jvm_instructions):  Use it to fix logic for checking that
8124         we're done with the current subroutine.
8126         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8127         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8129 2001-12-03  Per Bothner  <per@bothner.com>
8131         * jcf.h:  Fix obvious typo in comment.
8132         * typeck.c (build_null_signature):  Add comment.
8134 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8136         * expr.c: Remove leading capital from diagnostic messages, as
8137         per GNU coding standards.
8138         * jcf-io.c: Similarly.
8139         * jcf-parse.c: Similarly.
8140         * jv-scan.c: Similarly.
8141         * jvspec.c: Similarly.
8142         * mangle.c: Similarly.
8144 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8145             Alexandre Petit-Bianco  <apbianco@redhat.com>
8147         * expr.c (build_java_arrayaccess): Call save_expr on array for
8148         correct evaluation order, modified comment, fixed indentation.
8149         * parse.y: (patch_assignment): Correctly extract the array base
8150         from the tree generate by build_java_arrayaccess, added comments.
8151         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8152         Fixes PR java/3096, PR java/3803, PR java/3965.
8154 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8156         * expr.c (expand_byte_code): Remove trailing periods from messages.
8157         * jcf-parse.c (load_class, jcf_parse): Similarly.
8158         * jcf-write.c (generate_classfile): Similarly.
8159         * lex.c (java_lex): Similarly.
8161 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8163         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8165 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8167         * Make-lang.in (java.generated-manpages): New dummy target.
8169 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8171         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8172         ASM_FINAL_SPEC.
8173         (lang_specific_pre_link): Use set_input to set input_filename.
8174         Append `main' here.
8175         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8176         (main): Fix definition.
8177         Strip `main' from classname.
8178         Fixes PR java/227.
8180 2001-11-18  Roger Sayle <roger@eyesopen.com>
8182         * parse.h (java_expand_switch): Remove old prototype.
8184 2001-11-18  Tom Tromey  <tromey@redhat.com>
8186         Fix for PR java/1401:
8187         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8188         arg0 is null.
8189         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8190         correctly.
8192 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8194         * lang.c (finish_parse): Rename to java_finish.
8195         (LANG_HOOKS_FINISH, java_finish): New.
8197 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8199         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8200         * java-tree.h: New prototype.
8201         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8203 2001-11-13  Tom Tromey  <tromey@redhat.com>
8205         * gjavah.c (method_signature): New global.
8206         (HANDLE_METHOD): Set it.
8207         (decompile_return_statement): New function.
8208         (decompile_method): Use it.
8209         (print_method_info): Removed `synth' argument.
8211 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8213         * java-tree.h (java_set_yydebug): New.
8214         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8215         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8216         (print_lang_decl, print_lang_type, print_lang_identifier,
8217         print_lang_statistics, lang_print_xnode): Remove.
8219 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8221         * jcf-parse.c (init_lex): Remove.
8222         * lang.c (language_string, lang_identify): Remove.
8223         (struct lang_hooks): Constify.
8224         (LANG_HOOKS_NAME): Override.
8225         (init_parse): Update.
8227 2001-11-08  Andreas Franck  <afranck@gmx.de>
8229         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8230         program_transform_name the way suggested by autoconf.
8231         (java.install-common): Also transform auxiliary program names with
8232         program_transform_name.
8234 2001-11-08  Tom Tromey  <tromey@cygnus.com>
8236         * parse.y (trap_overflow_corner_case): New rule.
8237         (unary_expression): Use it.
8238         * lex.c (java_init_lex): Don't set minus_seen.
8239         (yylex): Don't use minus_seen.  Communicate overflow to parser for
8240         it to handle.
8241         (error_if_numeric_overflow): New function.
8242         * parse.h (minus_seen): Removed field.
8243         (JAVA_RADIX10_FLAG): New define.
8245 2001-11-07  Tom Tromey  <tromey@redhat.com>
8247         Patch for PR java/1414:
8248         * parse.y (case_label_list): New global.
8249         (goal): Register case_label_list with GC.
8250         (java_complete_lhs): Save new case on case_label_list.
8251         (patch_switch_statement): Check for duplicate case labels.
8253 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8255         * parse.y (patch_assignment): Removed unused third argument.
8256         (java_complete_lhs): Removed unused third argument to patch_assignment.
8258 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8260         * lang.c: Include langhooks-def.h.
8261         * Make-lang.in: Update.
8263 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8265         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8267 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8269         * mangle.c (find_compression_record_match): Don't match compression
8270         records for package name elements unless they occur at the start of
8271         the name. Fix for PR java/4717.
8273 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8275         * expr.c (expand_java_field_op): Don't special-case references to
8276         java.lang.PRIMTYPE.TYPE.
8277         (build_primtype_type_ref): Removed.
8278         * java-tree.h (build_primtype_type_ref): Remove prototype.
8279         * parse.y (maybe_build_primttype_type_ref): Removed.
8280         (complete_function_arguments): Don't special-case references to
8281         java.lang.PRIMTYPE.TYPE.
8282         (patch_assignment): Likewise.
8283         (array_constructor_check_entry): Likewise.
8285 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8287         * mangle.c (static tree compression_table): Fixed leading comment.
8288         * parse.h (struct parser_ctxt): Fixed field comment.
8289         * parse.y (check_pkg_class_access): New prototype, fixed leading
8290         comment, new parameter used to emit error only if passed as true.
8291         (parse_check_super): Pass extra argument to check_pkg_class_access.
8292         (do_resolve_class): Likewise.
8293         (process_imports): Likewise.
8294         (read_import_dir): Fixed indentation.
8295         (find_in_imports_on_demand): New local class_type_name. Local
8296         node_to_use deleted. while loop changed into for loop. Report
8297         multiple definition only for accessible classes. Improved error
8298         message.
8299         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8300         assigned to parameter list, fixed indentation. while loop changed
8301         into for loop, restore TREE_CHAIN on local `tem' before the next
8302         iteration.
8304 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8306         * lang.c (lang_get_alias_set): Deleted.
8308 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8310         * gjavah.c (jni_print_char): Fix thinko in last change.
8312         * gjavah.c (jni_print_char, decode_signature_piece): Use
8313         safe-ctype macros and/or fold extra calls into fewer ones.
8314         * lex.c (java_read_unicode, java_lex): Likewise.
8315         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8316         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8317         * mangle_name.c (append_unicode_mangled_name,
8318         unicode_mangling_length): Likewise.
8320 2001-10-17  Richard Henderson  <rth@redhat.com>
8322         * Make-lang.in (java/lang.o): Depend on langhooks.h.
8324 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8326         * lang.c (langhooks.h): Included.
8327         (LANG_HOOKS_INIT): Redefined.
8328         (LANG_HOOKS_INIT_OPTIONS): Likewise.
8329         (LANG_HOOKS_DECODE_OPTION): Likewise.
8330         (struct lang_hooks lang_hooks): New initialization.
8332 2001-10-11  Per Bothner  <per@bothner.com>
8334         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
8335         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8336         The former is simpler, and jcf-write.c handles it better.
8337         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
8338         or WITH_CLEANUP_EXPR.
8339         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
8340         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8342         * parse.y (patch_if_else_statement):  If the condition is constant,
8343         optimize away the test.
8345 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8347         * parse.y (patch_cast): Call patch_string on the first operand of
8348         the incoming node, update it if necessary. Fixes PR java/4510.
8350 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8352         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8353         when name qualifier matches a package name.
8355 2001-10-08  Tom Tromey  <tromey@redhat.com>
8357         Fix for PR java/4489:
8358         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8359         force a new label when computing `body_block'.
8361 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8363         * jcf-io.c (format_uint): Const-ify.
8364         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8365         * lex.c (java_get_line_col): Likewise.
8366         * parse.y (build_incdec): Likewise.
8368 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8370         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8371         a NULL enclosing context if appropriate. Fixes PR java/4466.
8373 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8375         * parse.y (patch_assignment): Use lvalue's original TYPE when
8376         building the final COMPOUND_EXPR.
8377         (try_reference_assignconv): Fixed leading comment.
8379 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8381         * parse.y (check_final_variable_indirect_assignment): For
8382         COMPOUND_EXPR, return only if finals were found initialized
8383         properly, if not, keep on checking.
8384         (check_final_variable_global_assignment_flag): New local
8385         error_found, set when appropriate and used to decide whether to
8386         report uninitialized finals. Fixed typo in comment.
8388 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8390         * decl.c (init_decl_processing): Fixed typo in predef_filenames
8391         last three initializations. Fixes PR java/4360.
8393 2001-09-21  Richard Henderson  <rth@redhat.com>
8395         * class.c (get_dispatch_table): Handle function descriptors.
8396         (build_dtable_decl): Likewise.
8397         * expr.c (build_invokevirtual): Likewise.
8399 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8401         * parse.y (patch_method_invocation): Build class initialization
8402         when static finals are used to qualify method invocation.
8403         Fixes PR java/4366.
8405 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
8407         * parse.h: (WFL_STRIP_BRACKET): Re-written using
8408         build_type_name_from_array_name.
8409         (STRING_STRIP_BRACKETS): New macro.
8410         * parse.y (build_type_name_from_array_name): New function.
8411         (array_creation_expression:): Accumulate []s instead of [s.
8412         (cast_expression:): Accumulate []s instead of [s after cast type
8413         name.
8414         (build_array_from_name): Local string deleted, use
8415         build_type_name_from_array_name.
8416         (build_unresolved_array_type): Accumulate []s instead of [s after
8417         type name.
8418         (register_fields): Fixed comment.
8419         (resolve_class): Local name, base deleted, new locals tname and
8420         array_dims. Use build_type_name_from_array_name. Use array_dims to
8421         build array type.
8422         (purify_type_name): Use STRING_STRIP_BRACKETS.
8424 2001-09-18  Andreas Jaeger  <aj@suse.de>
8426         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8427         * jv-scan.c: Likewise.
8429 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8431         * parse.y (patch_method_invocation): Inner class creation context
8432         check not enforced within constructors. Fixes PR java/1873.
8434 2001-09-16  Tom Tromey  <tromey@redhat.com>
8436         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8437         NOTE_PUSH for single-case push.  Fixes PR java/4189.
8439 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8441         * java-tree.h (TYPE_IMPORT_LIST): New macro.
8442         (TYPE_IMPORT_DEMAND_LIST): Likewise.
8443         (struct lang_type): New fields import_list and import_demand_list.
8444         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
8445         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
8446         (do_resolve_class): New local saved_enclosing_type, initialized,
8447         passed as parameter to find_in_imports and find_in_imports_on_demand.
8448         (find_in_imports): Added paramater enclosing_type, use its
8449         TYPE_IMPORT_LIST when applicable.
8450         (find_in_imports_on_demand): Added parameter enclosing_type, use
8451         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
8452         declaration and initialization.
8453         (fold_constant_for_init): Switch/restore current_class to the
8454         appropriate context.
8456 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
8458         * verify.c (verify_jvm_instructions): Fix typo.
8460 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8462         * expr.c (expand_invoke): Const-ification.
8463         * parse.y (patch_method_invocation): Likewise.
8465 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8467         * gjavah.c (cxx_keywords): Const-ification.
8468         * keyword.gperf (java_keyword): Likewise.
8469         * lang.c (java_tree_code_name): Likewise.
8470         * lex.c (cxx_keywords): Likewise.
8471         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
8473 2001-09-11  Richard Henderson  <rth@redhat.com>
8475         * parse.h (ctxp_for_generation): Mark extern.
8477 2001-09-10  Richard Henderson  <rth@redhat.com>
8479         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8481 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8483         * typeck.c (java_array_type_length, build_prim_array_type):
8484         Represent empty arrays by NULL index.
8486 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
8488         * java-tree.h (compile_resource_file): Grouped with other prototypes.
8489         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8491 2001-09-06  Anthony Green  <green@redhat.com>
8493         * class.c (O_BINARY): Define if necessary.
8494         (registerResource_libfunc): Declare.
8495         (init_class_processing): Initilize registerResource_libfunc.
8496         (compile_resource_file): New function.
8497         * java-tree.h (resource_name): Declare.
8498         (compile_resource_file): Declare.
8499         * jcf-parse.c (yyparse): Handle compiling java resource files.
8500         * lang.c (java_decode_option): Handle -fcompile-resource option.
8501         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
8502         resource files.
8503         * gcj.texi (Code Generation): Add documentation for -R flag.
8505 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
8507         * jcf-write.c (generate_classfile): Issue an error in case of
8508         field/initial value mismatch.
8509         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
8510         being initialized and we're generating bytecode.
8511         (java_complete_lhs): In MODIFY_EXPR section: added comments,
8512         set DECL_INITIAL properly when appropriate.
8513         Fixes PR java/4230
8514         Fixes PR java/4204
8516 2001-09-01  Per Bothner  <per@bothner.com>
8518         * parse.y (maybe_yank_clinit):  A field without an initializer is not
8519         relevant.  All initializers except static final and constant require
8520         <clinit>, regardless of flag_emit_class_files.
8522 2001-08-31  Per Bothner  <per@bothner.com>
8524         * class.c (set_constant_value):  When not emitting class files, then a
8525         String ConstantValue is a utf8const_ptr_type.
8527 2001-08-30  Per Bothner  <per@bothner.com>
8529         * jcf-write.c (generate_classfile):  Check that field is primitive
8530         or string before emitting ConstantValue attribute.
8532 2001-08-30  Per Bothner  <per@bothner.com>
8534         * parse.y (resolve_qualified_expression_name):  If creating a
8535         COMPOUND_EXPR, set it's type correctly.
8537 2001-08-30  Per Bothner  <per@bothner.com>
8539         * jcf-io.c (open_class):  Set filename field.
8541         * jcf-parse,c (parse_class_file):  Set current_function_decl
8542         for better error message when Code attribute is missing.
8544         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
8545         better diagnostics, especially for constructors.
8547 2001-08-30  Per Bothner  <per@bothner.com>
8549         * jcf-write.c (generate_classfile):  Don't write ConstantValue
8550         attribute if field is not final, for compatibility with jdk.
8552         * jcf-write.c (generate_classfile):  Convert ConstantValue values
8553         to correct type.  Work-around for front-end bug.
8554         * class.c (set_constant_value):  Error if constant has wrong type.
8556 2001-08-30  Per Bothner  <per@bothner.com>
8558         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
8559         "Double" are printed at verbosity 1.
8561         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
8563         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
8565 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
8567         * parse.y (patch_assignment): Don't verify final re-assignment here.
8568         (java_complete_lhs): Verify assignments to finals calling
8569         patch_assignment. Verify re-assignments to finals before calling
8570         patch_assignment.
8572 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
8574         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
8575         Fixes PR java/1413
8577 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8579         * lex.c (java_lex): new local found_hex_digits. Set and then used
8580         in test to reject invalid hexadecimal numbers.
8581         * parse.y (java_complete_tree): Prevent unwanted cast with
8582         initialized floating point finals.
8583         (patch_binop): Emit a warning when detecting a division by zero,
8584         mark result not constant, don't simplify non integer division.
8586 2001-08-28  Per Bothner  <per@bothner.com>
8588         * jcf-write.c  (generate_bytecode_insns):  For increments and
8589         decrements just recurse to push constant.  Improvement on Mark's patch.
8591 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
8593         * jcf-write.c (generate_bytecode_insns): Generate an integer to
8594         real conversion for increments and decrements of reals.
8596 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8598         * parse.y (resolve_qualified_expression_name): Handle unresolved
8599         qualified expressions, prevent numerical qualifiers, fixed typo.
8600         Fixes PR java/4141
8602 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8604         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
8605         don't report anything but deprecated class when marked so. Handle
8606         VAR_DECL.
8607         (patch_method_invocation): Check deprecation on methods and types.
8608         (patch_binop): code becomes an enum tree_code, added default: to
8609         switch to handle that. Detect division by zero, try to fold and
8610         return before using a subroutine.
8612 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
8614         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
8615         file smaller than 4 bytes.
8616         * parse.y (check_inner_circular_reference): New function.
8617         (check_circular_reference): Likewise.
8618         (array_initializer:): Accept {,}.
8619         (java_check_circular_reference): Rewritten using
8620         check_circular_reference and check_inner_circular_reference.
8621         (java_complete_expand_method): Unconditionally save and restore
8622         the unpurged exception list.
8623         (build_dot_class_method_invocation): Unmangle signature parameter.
8625 2001-08-21  Tom Tromey  <tromey@redhat.com>
8627         * decl.c (init_decl_processing): Add `throws' field to method
8628         descriptor.
8629         * class.c (make_method_value): Compute `throws' field for method.
8631 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8633         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
8634         circularity is detected.
8635         (ctors_unchecked_throws_clause_p): Fixed leading comment.
8637 2001-08-17  Richard Henderson  <rth@redhat.com>
8639         * class.c (emit_register_classes): Add align parameter to
8640         call to assemble_integer.
8642 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
8644         * jcf-parse.c (load_class): New locals saved and class_loaded. If
8645         loading a class_or_name fails, try considering an innerclass name
8646         and load the enclosing context.
8647         * parse.y (resolve_inner_class): New function.
8648         (find_as_inner_class): Added leading comment.
8649         (register_incomplete_type): Keep the current context as enclosing
8650         context for JDEP_FIELD dependencies.
8651         (do_resolve_class): Locals new_class_decl and super initialized to
8652         NULL. Call resolve_inner_class, explore the enclosing context
8653         superclass if necessary.
8654         Fixes PR java/4007
8656 2001-08-16  Tom Tromey  <tromey@redhat.com>
8658         * jcf-dump.c (main): Updated for change to jcf_path_seal.
8659         * gjavah.c (main): Updated for change to jcf_path_seal.
8660         * lang.c (version_flag): New global.
8661         (java_decode_option): Recognize `-version'.
8662         (java_init): Update for change to jcf_path_seal.
8663         * jcf.h (jcf_path_seal): Added `print' argument.
8664         * jcf-path.c (jcf_path_seal): Added `print' argument.
8666 2001-08-13  Zack Weinberg  <zackw@panix.com>
8668         * Make-lang.in (java/decl.o): Update dependencies.
8669         * decl.c: Include libfuncs.h, don't include toplev.h.
8671 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8673         * decl.c (init_decl_processing): exception_type_node,
8674         class_not_found_type_node, and no_class_def_found_type_node
8675         initialized. predef_filenames augmented accordingly.
8676         instinit_identifier_node initialized.
8677         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
8678         * java-tree.h (enum java_tree_index): New entries
8679         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
8680         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
8681         (exception_type_node): New macro.
8682         (class_not_found_type_node): Likewise.
8683         (no_class_def_found_type_node): Likewise.
8684         (instinit_identifier_node): Likewise.
8685         (PREDEF_FILENAMES_SIZE): Adjusted.
8686         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
8687         (struct lang_type): Fixed typo in bitfield name.
8688         (DECL_INSTINIT_P): New macro.
8689         (ID_INSTINIT_P): Likewise.
8690         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
8691         attribute.
8692         * parse.y (encapsulate_with_try_catch): New function.
8693         (generate_instinit): Likewise.
8694         (build_instinit_invocation): Likewise.
8695         (ctors_unchecked_throws_clause_p): Likewise.
8696         (add_instance_initializer): Deleted.
8697         (build_instance_initializer): Likewise.
8698         (in_instance_initializer): Likewise.
8699         (check_method_redefinition): instinit$ not to be verified.
8700         (java_complete_expand_methods): Generate instinit$, simplified code.
8701         (build_dot_class_method): Eliminated unnecessary locals. Use
8702         encapsulate_with_try_catch, removed unnecessary code.
8703         (fix_constructors): New local iii. Use build_instinit_invocation.
8704         (patch_method_invocation): Added comment.
8705         (maybe_use_access_method): Don't consider instinit$.
8706         (find_applicable_accessible_methods_list): Shorten the search for
8707         instinit$ too.
8708         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
8709         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
8710         (patch_throw_statement): Likewise. Fixed typo.
8712 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
8714         Revert:
8715         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8716         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8717         ASM_FINAL_SPEC.
8718         (lang_specific_pre_link): Use set_input to set input_filename.
8719         Append `main' here.
8720         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8721         (main): Fix definition.
8722         Strip `main' from classname.
8723         Fixes PR java/227.
8725 2001-08-11  Zack Weinberg  <zackw@panix.com>
8727         * lex.h: Don't include setjmp.h.  Don't define
8728         SET_FLOAT_HANDLER or prototype set_float_handler.
8730 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8732         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
8733         `poplevel' in the right order.
8735 2001-08-09  Richard Henderson  <rth@redhat.com>
8737         * Make-lang.in (class.o): Depend on TARGET_H.
8738         * class.c (emit_register_classes): Use target hooks instead of
8739         assemble_constructor and assemble_destructor.
8741 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
8743         * check-init.c (flags.h): Include
8744         (check_init): Don't report uninitialized static class
8745         initialization flags, don't free bit index when doing static class
8746         initialization optimization.
8747         (check_for_initialization): Return type changed to `unsigned int.'
8748         (attach_initialized_static_class): New function.
8749         * class.c (add_method_1): Create the initialized static class
8750         table if necessary.
8751         (finish_class): Always emit deferred inline methods.
8752         * decl.c (emit_init_test_initialization): Moved to expr.c
8753         (complete_start_java_method): Don't traverse
8754         DECL_FUNCTION_INIT_TEST_TABLE.
8755         (lang_mark_tree): Mark hash tables in function decls.
8756         * expr.c (emit_init_test_initialization): Moved from decl.c.
8757         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
8758         initialization flag, set DECL_CONTEXT and
8759         LOCAL_CLASS_INITIALIZATION_FLAG.
8760         (java_lang_expand_expr): Emit initialization code for static class
8761         initialized flags when entering block, if necessary.
8762         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
8763         * java-tree.h (flag_optimize_sci): New global variable declaration.
8764         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
8765         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
8766         (LOCAL_FINAL_P): Fixed typo in comment.
8767         (FINAL_VARIABLE_P): Likewise.
8768         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
8769         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
8770         (struct lang_decl): New fields `ict', `smic' and `cif.'
8771         (check_for_initialization): New returned value for global.
8772         (attach_initialized_static_class): New global function.
8773         (STATIC_CLASS_INIT_OPT_P): New macro.
8774         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
8775         * lang.c (java_decode_option): Handle
8776         `-fno-optimize-static-class-initialization'
8777         * parse.y (start_complete_expand_method): New function.
8778         (java_expand_method_bodies): Likewise.
8779         (attach_init_test_initialization_flags): Likewise.
8780         (adjust_init_test_initialization): Likewise.
8781         (emit_test_initialization): Likewise.
8782         (java_complete_expand_methods): Nullify abstract and native method
8783         bodies.
8784         (java_complete_expand_method): New locals `fbody', `block_body'
8785         and `exception_copy.' Reorganized: directly return on empty method
8786         bodies, call `start_complete_expand_method', remember definitely
8787         initialized static class in function, don't expand method bodies.
8788         (java_expand_classes): Call `java_expand_method_bodies' before
8789         `finish_class' when compiling to native.
8790         (resolve_expression_name): Use `orig' after building outer class
8791         field access.
8792         (patch_invoke): Remember static method invocations.
8794 2001-08-06  Richard Henderson  <rth@redhat.com>
8796         * class.c (emit_register_classes): Pass a symbol_ref and priority
8797         to assemble_constructor.
8799 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
8801         * java-tree.h (all_class_filename): New macro.
8802         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
8803         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
8804         newly created IDENTIFIER_NODE to `all_class_filename.'
8806 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
8808         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
8809         Use ggc_add_tree_root to register roots.
8811 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8813         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
8814         second operand calling check_init.
8815         * decl.c (complete_start_java_method): Swaped second and third
8816         arguments while creating WITH_CLEANUP_EXPR node.
8817         * jcf-write.c (generate_bytecode_insns): Use second operand
8818         instead of third when handling WITH_CLEANUP_EXPR.
8819         * parse.y (java_complete_lhs): Expand second operand of
8820         WITH_CLEANUP_EXPR nodes.
8821         (patch_synchronized_statement): Swaped second and third arguments
8822         while creating WITH_CLEANUP_EXPR node.
8824 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8826         * parse.y (create_interface): Avoid cyclic inheritance report when
8827         syntax error encountered during class definition.
8828         Fixes PR java/2956
8830 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8832         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8833         ASM_FINAL_SPEC.
8834         (lang_specific_pre_link): Use set_input to set input_filename.
8835         Append `main' here.
8836         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8837         (main): Fix definition.
8838         Strip `main' from classname.
8839         Fixes PR java/227.
8841 2001-07-18  Tom Tromey  <tromey@redhat.com>
8843         For PR java/2812:
8844         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
8845         * lex.c (java_new_lexer): Use ICONV_CONST.
8846         (java_read_char): Likewise.
8847         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
8848         (jv-scan$(exeext)): Likewise.
8850 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8852         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
8853         * parse.y (check_class_interface_creation): Allow `private' if the
8854         enclosing is not an interface.
8855         (create_interface): Interface tagged public if the enclosing
8856         context is an interface.
8857         (create_class): Class tagged public if the enclosing context
8858         is an interface.
8859         Fixes PR java/2959
8861 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8863         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
8864         Fixes PR java/2665
8866 2001-07-14  Tim Josling  <tej@melbpc.org.au>
8868         * check-init.c (check_init): Remove references to EXPON_EXPR.
8870 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8872         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
8873         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
8874         Fixes PR java/3602
8876 2001-07-13  Tom Tromey  <tromey@redhat.com>
8878         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
8879         invocation.
8881 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8883         * parse.y (patch_method_invocation): Don't override primary if one
8884         is already provided, but let this$<n> be built. Fixed comment.
8886 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8888         * parse.y (empty_statement:): Report empty statement error only
8889         when found at class declaration level.
8890         Fixes PR java/3635
8892 2001-07-12  Tom Tromey  <tromey@redhat.com>
8894         * expr.c (expand_load_internal): New function.
8895         (LOAD_INTERNAL): Use it.
8897 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
8899         * parse.y (verify_constructor_super): Compare anonymous class ctor
8900         args with `valid_method_invocation_conversion_p.'
8901         Fixes PR java/3285
8903 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8905         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
8906         `-fsyntax-only.' Fixes PR java/3248
8908 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8910         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
8912 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8914         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
8915         current function is static. Fixes PR java/1970
8917 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8919         * parse.y (patch_method_invocation): Add enclosing context to ctor
8920         calls if necessary. Fixes PR java/2953
8922 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8924         * parse.y (resolve_package): Abort if qualified expression member
8925         isn't right.
8926         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
8927         Fixes PR java/1391
8929 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
8931         * verify.c: Don't use // comments.
8933 2001-07-05  Tom Tromey  <tromey@redhat.com>
8935         * lang.c (flag_assume_compiled): Removed.
8936         * java-tree.h (flag_assume_compiled): Removed.
8937         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
8938         -fhash-synchronization, -fuse-divide-subroutine,
8939         -fcheck-references, -femit-class-file, -femit-class-files,
8940         -fassume-compiled.  Updated --encoding information.  Changed
8941         -foutput-class-dir to `-d'.
8943 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
8945         * jcf-parse.c (parse_class_file): Add lineno parameter to
8946         debug_start_source_file call.
8948 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8950         * gcj.texi: Use gpl.texi.
8951         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
8952         dependencies and use doc/include in search path.
8954 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
8956         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
8957         `this'.  If so, don't build instance initializers.
8959 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8961         * parse.y (resolve_expression_name): Improved error message for
8962         inner class cases. Fixes PR java/1958
8964 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8966         * lang.c: #include diagnostic.h
8967         (lang_print_error): Add a `diagnostic_context *' parameter.
8968         (java_dummy_print): Likewise.
8969         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
8971 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8973         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
8974         * jcf.h (typedef struct JCF): New bitfield `finished.'
8975         (JCF_FINISH): Set `finished.'
8976         (JCF_ZERO): Reset `finished.'
8977         Fixes PR java/2633
8979 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8981         * parse.y (class_body_declaration:): Don't install empty instance
8982         initializers.
8983         Fixes PR java/1314
8985 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8987         * class.c (set_super_info): Call `set_class_decl_access_flags.'
8988         (set_class_decl_access_flags): New function.
8989         * java-tree.h (set_class_decl_access_flags): New prototype.
8990         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
8991         (parse_class_file): New local `decl_max_locals.' Take wide types
8992         into account to compute DECL_MAX_LOCALS.
8993         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
8994         imports on demand.
8996 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
8998         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9000 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9002         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9003         * parse.y (do_resolve_class): Moved comments out to leading comment
9004         section. Removed local `start', New local `_ht' and
9005         `circularity_hash.'  Record `enclosing' in hash table and search
9006         it to detect circularity.  Use `enclosing' as an argument to
9007         `lookup_cl.' Free the hash table when done.
9009 2001-06-19  Tom Tromey  <tromey@redhat.com>
9011         * lex.c (java_read_char): Disallow invalid and overlong
9012         sequences.  Fixes PR java/2319.
9014 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
9016         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9018 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9020         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9021         arguments accordingly.
9023 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9025         * gcj.texi: Move contents to just after title page.
9027 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
9029         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9030         builtin type.
9031         (patch_incomplete_class_ref): Build the class ref, build the class
9032         init if necessary, complete the tree.
9033         Fixes PR java/2605
9035 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9037         * parse.y (lookup_field_wrapper): Test `name' code.
9038         (resolve_qualified_expression_name): Test `qual_wfl' code.
9039         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9040         handle `qual_wfl' by code.
9041         (maybe_build_primttype_type_ref): Test `wfl' code.
9043 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9045         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9046         fdl.texi.
9047         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
9048         the dvi file in the java directory.
9050 2001-05-25  Sam TH  <sam@uchicago.edu>
9052         * gen-table.pl javaop.h jcf.h lex.h,
9053         parse.h: Fix header include guards.
9055 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
9057         * jv-scan.c (version): Update copyright year.
9059 2001-05-21  Per Bothner  <per@bothner.com>
9061         * jcf-parse.c (read_class):  If class is from .class or .zip file
9062         and it's already been read, don't push/pop parser context.
9064 2001-05-18  Per Bothner  <per@bothner.com>
9066         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9067         command line so the jvgenmain-generated main program comes first.
9069 2001-05-15  Tom Tromey  <tromey@redhat.com>
9071         * class.c (build_utf8_ref): Don't generate identifier based on
9072         utf8const contents.
9074 2001-05-12  Richard Henderson  <rth@redhat.com>
9076         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9077         * expr.c (java_lang_expand_expr): Expand it.
9078         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9079         calling build_exception_object_ref.
9080         * parse.y (catch_clause_parameter): Likewise.
9081         (build_dot_class_method): Likewise.
9082         (try_reference_assignconv): Likewise.
9083         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9084         * jcf-write.c (generate_bytecode_insns): Likewise.
9086 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9088         * parse.y (build_unresolved_array_type): Set
9089         EXPR_WFL_QUALIFICATION on the newly created wfl.
9090         Fixes PR java/2538. Fixes PR java/2535.
9092 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9094         * parse.y (fix_constructors): Removed unnecessary assignment to
9095         local. Moved assignment to `this$<n>', fixed comments and
9096         indentation.
9097         (build_wfl_wrap): Fixed indentation.
9098         Fixes PR java/2598, java/2579 and java/2658.
9100 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9102         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9103         check for byte swap.
9105 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9107         * expr.c (build_class_init): Move MODIFY_EXPR
9108         outside of COND_EXPR.  Remove variable `call'.
9110 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9112         * decl.c: NULL_PTR -> NULL.
9113         * jcf-write.c: Likewise.
9115 2001-05-01  Tom Tromey  <tromey@redhat.com>
9117         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9118         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9119         * gcj.texi: Updated copyright text.  Include fdl.texi.
9120         (Top): Link to new node.
9122 2001-05-01  Per Bothner  <per@bothner.com>
9124         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9126 2001-05-01  Per Bothner  <per@bothner.com>
9128         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9129         import_list contains the name, not the TREE_PURPOSE.
9131 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9133         * jcf-io.c (read_zip_member): Cast to long in comparison with
9134         signed value.
9136         * jvspec.c (lang_specific_driver): Initialize variables.
9138         * mangle.c (find_compression_record_match): Likewise.
9140         * typeck.c (build_null_signature): Provide static prototype.  Mark
9141         parameter with ATTRIBUTE_UNUSED.
9143         * verify.c (verify_jvm_instructions): Initialize variable.
9145 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9147         * parse.y (do_resolve_class): Check for cyclic inheritance during
9148         inner class resolution.
9150 2001-04-27  Per Bothner  <per@bothner.com>
9152         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9153         while iterating, since that could cause gc to lose stuff.
9155 2001-04-26  Per Bothner  <per@bothner.com>
9157         Fix method search wrt scope of inner classes to match JLS2.
9158         * typeck.c (build_null_signature):  New static function.
9159         (has_method):  New function.  Uses build_null_signature and lookup_do.
9160         * java-tree.h (has_method):  New declaration.
9161         * parse.y (find_applicable_accessible_methods_list):  Do not search
9162         context of inner classes here.
9163         (patch_method_invocation):  Search scope, ie. current and outer clases,
9164         for method matching simple name, to find class.
9166 2001-04-26  Per Bothner  <per@bothner.com>
9168         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9169         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9171         * constants.c (find_methodref_with_class_index):  New function.
9172         (find_methodref_index):  Use find_methodref_with_class_index.
9173         * java-tree.h (find_methodref_with_class_index):  New declaration.
9174         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9175         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9176         If context changed from interface to class, don't use invokeinterface.
9178 2001-04-25  Per Bothner  <per@bothner.com>
9180         * verify.c (verify_jvm_instructions):  For field instructions,
9181         check that field index is valid.  For invoke instructions, check that
9182         method index is valid.
9184 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9186         * config-lang.in (target_libs): Copy from $libgcj_saved.
9188 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9190         * decl.c (init_decl_processing): Add new class "protectionDomain"
9191         field.
9192         * class.c (make_class_data): Set initial value for "protectionDomain".
9194 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9196         * jvspec.c (lang_specific_driver): Fix memory allocation
9197         deficit, by using concat in lieu of xmalloc/sprintf.
9199 2001-04-20  Per Bothner  <per@bothner.com>
9201         Fixes to compile multiple .class files at once.
9202         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9203         * java-tree.h (CLASS_PARSED_P):  New macro.
9204         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9205         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9206         (read_class):  Avoid some code duplication.
9207         Don't call JCF_FINISH for a .class file - might be needed later.
9208         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9209         rather than CLASS_LOADED_P, since latter implies class laid out.
9210         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9211         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9213 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9215         * Make-lang.in (java/boehm.o): Depend on toplev.h.
9217         * boehm.c: Include toplev.h.
9219 2001-04-06  Tom Tromey  <tromey@redhat.com>
9220             Alexandre Petit-Bianco  <apbianco@redhat.com>
9222         Fix for PR gcj/1404 and PR gcj/2332:
9223         * parse.y (build_array_from_name): If we use the type_wfl then
9224         accumulate dimensions from the original type as well.
9225         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9227 2001-04-06  Tom Tromey  <tromey@redhat.com>
9229         * parse.y (analyze_clinit_body): Return true if the second operand
9230         of a METHOD_EXPR is nonzero.
9232 2001-04-06  Tom Tromey  <tromey@redhat.com>
9234         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9235         directory.
9236         ($(srcdir)/java/parse.c): Likewise.
9238 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9240         * gcj.texi: Use `which-gcj' instead of `which-g77.'
9241         (version-gcc): Initialized.
9242         (which-gcj): Likewise.
9244 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9246         * java-tree.h (struct lang_decl): New macro
9247         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9248         * parse.y (build_instance_initializer): New function.
9249         (add_instance_initializer): Use it.
9250         (java_fix_constructors): Set `current_class' before fix pass.
9251         (fix_constructors): Just return if already fixed. Move `super()'
9252         invocation ahead. Use `build_instance_initializer.'
9253         Fixes PR java/1315.
9255 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9257         * parse.y (resolve_qualified_expression_name): Pass field's
9258         DECL_CONTEXT to `not_accessible_p.'
9259         (not_accessible_p): Changed parameters order in `inherits_from_p'
9260         invocation.
9262 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
9264         * lang-options.h: Add flag_check_references.
9266 2001-04-04  Per Bothner  <per@bothner.com>
9268         * java-tree.h (CONSTANT_VALUE_P):  New macro.
9269         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
9270         * parse.y (maybe_build_class_init_for_field):  New static function.
9271         (resolve_expression_name, resolve_field_access):  Use
9272         maybe_build_class_init_for_field instead of build_class_init
9273         This does not do the init if the field is compile-time-constant.
9274         (resolve_field_access):  Simplify.
9276         * parse.y (fold_constant_for_init):  Merge test into switch.
9278 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
9280         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9281         on gansidecl.h.
9282         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9284 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
9286         * expr.c (pop_type_0): Save the result of the first
9287         lang_printable_name call in a scratch buffer, so it
9288         won't be clobbered by the second call.
9290 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9292         * parse-scan.y (array_type:): Rewritten.
9293         (type_declaration:): `empty_statement' replaces `SC_TK.'
9294         (class_member_declaration:): `empty statement' added.
9295         (method_body:): Simplified.
9296         (static_initializer:): Likewise.
9297         (primary_no_new_array:): Use `type_literals.'
9298         (type_literals:): New rule.
9299         (dims:): Set and update `bracket_count.'
9300         Fixes PR java/1074. Fixes PR java/2412.
9302 2001-03-28  Hans Boehm  <boehm@acm.org>
9304         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9305         (get_boehm_type_descriptor): Set type on returned value to be a
9306         pointer length integer.
9308 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9310         * expr.c (pop_type_0): Call `concat' rather than building the
9311         string manually.
9312         (pop_type): Add format specifier in call to `error'.
9314         * parse.y (patch_method_invocation): Avoid casting away
9315         const-ness.
9317 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
9319         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9321 2001-03-28  Richard Henderson  <rth@redhat.com>
9323         IA-64 ABI Exception Handling:
9324         * Make-lang.in (except.o): Don't depend on eh-common.h.
9325         * check-init.c (check_init): Handle EXC_PTR_EXPR.
9326         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9327         [soft_exceptioninfo_call_node]: Remove.
9328         [eh_personality_libfunc, lang_eh_runtime_type]: New.
9329         (end_java_method): No emit_handlers.
9330         * except.c (java_set_exception_lang_code): Remove.
9331         (method_init_exceptions): Don't call it.
9332         (prepare_eh_table_type): No CATCH_ALL_TYPE.
9333         (build_exception_object_ref): New.
9334         (expand_end_java_handler): Update for except.h name changes.
9335         (emit_handlers, expand_resume_after_catch): Remove.
9336         * expr.c (java_lang_expand_expr): Update for except.h name changes.
9337         (process_jvm_instruction): Use build_exception_object_ref.
9338         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9339         (soft_exceptioninfo_call_node): Remove.
9340         (build_exception_object_ref): Declare.
9341         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9342         soft_exceptioninfo_call_node.  Move processing ...
9343         [EXC_PTR_EXPR]: ... here.
9344         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9345         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9346         (source_end_java_method): No java_set_exception_lang_code or
9347         emit_handlers.
9348         (build_dot_class_method): Use build_exception_object_ref.
9349         (try_reference_assignconv): Check EXC_PTR_EXPR not
9350         soft_exceptioninfo_call_node.
9352 2001-03-28  Richard Henderson  <rth@redhat.com>
9354         * java-tree.h (throw_node): Define as a single member of
9355         java_global_trees instead of a separate array.
9356         (JTI_THROW_NODE): New.
9357         * decl.c (throw_node): Don't declare.
9358         (init_decl_processing): Init a scalar throw_node.
9359         Don't register it for gc.
9360         * check-init.c (check_init): Reference scalar throw_node.
9361         * expr.c (build_java_athrow): Likewise.
9362         * jcf-write.c (generate_bytecode_insns): Likewise.
9363         * parse.h (BUILD_THROW): Likewise.
9365 2001-03-28  Richard Henderson  <rth@redhat.com>
9367         * decl.c (end_java_method): Do not save and restore
9368         flag_non_call_exceptions.
9369         * parse.y (source_end_java_method): Likewise.
9370         * lang.c (flag_exceptions): Don't declare.
9371         (java_init_options): Set flag_non_call_exceptions.  Set
9372         flag_exceptions here ...
9373         (java_init): ... not here.
9375 2001-03-27  Richard Henderson  <rth@redhat.com>
9377         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9378         exceptions_via_longjmp.
9380         * lang.c (flag_new_exceptions): Don't declare it.
9381         (java_init_options): Or set it.
9383 2001-03-27  Richard Henderson  <rth@redhat.com>
9385         * decl.c (end_java_method): Rename asynchronous_exceptions to
9386         flag_non_call_exceptions.
9387         * parse.y (source_end_java_method): Likewise.
9389 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9391         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9393 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9395         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9397 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9399         * parse.y (find_as_inner_class): Follow current package
9400         indications not to mistakingly load an unrelated class.
9402 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9404         * constants.c (PUTN): Use memcpy, not bcopy.
9406         * lex.c (java_read_char): Use memmove, not bcopy.
9408         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9410 2001-03-23  Per Bothner  <per@bothner.com>
9412         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
9413         macro for better error pin-pointing.
9414         * java-tree.h:  Fix typo in comment.
9416         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
9417         Don't include jsr/goto in exception range.
9418         Check if start and end of exception range are the same (also TRY_EXPR).
9419         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
9420         However, do emit the following goto even if try_block is empty.
9421         Defer freeing exception_decl until after the finalizer, to make
9422         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
9424         * parse.y (java_complete_lhs):  If the try-clause is empty, just
9425         return the finally-clause and vice versa.
9427 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9429         * gcj.texi (Input Options): documented the check for attribute
9430         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
9431         * java-tree.h (flag_force_classes_archive_check): Declared extern.
9432         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
9433         (jcf_parse): Check for the right classes archive if necessary.
9434         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
9435         (jcf_parse_fields): Fixed indentation.
9436         * jcf-write.c (append_gcj_attribute): New function.
9437         (generate_classfile): Compute the attribute count, invoke
9438         `append_gcj_attribute'.
9439         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
9440         turned into bit-fields. New bit-field `right_zip.'
9441         (JCF_ZERO): Set `right_zip' to zero.
9442         * lang-options.h (-fforce-classes-archive-check): Added flag.
9443         * lang.c (flag_force_classes_archive_check): New flag.
9444         (lang_f_options): New entry `force-classes-archive-check.'
9445         Fixes PR java/1213.
9447 2001-02-07  Andrew Haley  <aph@redhat.com>
9449         * gcj.texi (Configure-time Options): Add -fcheck-references.
9450         * expr.c (build_java_indirect_ref): New function.
9451         (java_check_reference): New function.
9452         (build_java_array_length_access): Use build_java_indirect_ref to
9453         check for null references.
9454         (build_java_arrayaccess): Likewise.
9455         (build_get_class): Likewise.
9456         (build_field_ref): Likewise.
9457         (invoke_build_dtable): Likewise.
9458         (build_invokeinterface): Likewise.
9459         * lang.c (lang_f_options): Add flag_check_references.
9460         * jvspec.c (jvgenmain_spec): Add flag_check_references.
9461         * java-tree.h (flag_check_references): New variable.
9462         * lang.c (flag_check_references): Likewise.
9463         * parse.y (patch_invoke): Use java_check_reference.
9464         (patch_assignment): Allow for extra nesting in
9465         _Jv_CheckArrayStore.
9467 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
9469         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9470         * lex.c (cxx_keywords): Likewise.
9472 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9474         * parse.y (qualify_ambiguous_name): Broaden `length'
9475         recognition. Help MODIFY_EXPR be resolved as expression names.
9476         Fixes PR java/2066. Fixes PR java/2400.
9478 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
9480         * gjavah.c (process_file): Mark interface definitions with
9481         "__attribute__ ((java_interface))".
9483 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9485         * class.c (layout_class): Fixed push_super_field's second
9486         argument. Fixes PR java/2333.
9487         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
9488         too early to lay innerclasses out.
9490 2001-03-20  Tom Tromey  <tromey@redhat.com>
9491             Alexandre Petit-Bianco <apbianco@redhat.com>
9493         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
9494         inside an array reference. Insertion of the array store check
9495         rewritten. Fixes PR java/2299.
9497 2001-03-20  Tom Tromey  <tromey@redhat.com>
9499         * lex.c (java_read_unicode): Only accept leading `u's.
9501 2001-03-20  Tom Tromey  <tromey@redhat.com>
9503         * jcf-parse.c (read_class): Initialize `class'.
9505 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9507         * jcf_parse.c (jcf_parse): Eliminate unused variable.
9509 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9511         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
9512         (layout_class): Likewise.
9513         (layout_class_method): Likewise.
9514         (emit_register_classes): Likewise.
9515         * decl.c (builtin_function): Likewise.
9516         (give_name_to_locals): Likewise.
9518 2001-03-19  Per Bothner  <per@bothner.com>
9520         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
9521         before trying to load an inner class.
9523         Fixes to process to command-line .class files in two passes.
9524         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
9525         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
9526         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
9527         * class.c (is_compiled_class):  Fix for renamed flag.
9528         * parse.y (maybe_create_class_interface_decl):  Likewise.
9529         * jcf-parse.c (yyparse):  Also set if compiling .class files.
9530         * jcf-parse.c (read_class);  Read current_class.
9531         (jcf_parse):  Make static.
9532         (load_inner_classes):  New function, with code moved from jcf_parse,
9533         because we need to inner classes after the command-line files are read.
9534         (yyparse):  Set finput to NULL when it doesn't need to be closed.
9535         Reduce use of main_jcf (basically only for archive) and
9536         use finput instead of main_jcf->read_state.
9537         Inline jcf_figure_file_type into yyparse.
9538         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
9539         Defer load_inner_classes and parse_class_file to a second pass,
9540         after we've correctly mapped command-line .clas fiels to classes.
9541         (jcf_figure_file_type):  Removed.
9542         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
9543         (JCF_ZERO):  Also clear zipd field.
9544         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
9546 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9548         * jcf-parse.c (yyparse): Change ch from char * to char.
9550 2001-03-19  Per Bothner  <per@bothner.com>
9552         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
9553         Add constructed filelist-file at end, following -xjava.  Thus any .o
9554         and library files are not affected by the -xjava.  Also wrap
9555         explicit @FILE with -xjava and -xnone.
9557 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
9559         * class.c (build_static_field_ref): Call make_decl_rtl() after
9560         setting the DECL_EXTERNAL flag.
9562 2001-03-17  Per Bothner  <per@bothner.com>
9564         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
9566         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
9567         when result is is needed (target is STACK_TARGET).
9569         * parse.h (JDEP_SOLV):  Removed.
9570         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
9572         * parse.y (incomplete_class_list): Removed.
9573         (obtain_incomplete_type): Don't use or set incomplete_class_list.
9574         It doesn't work if resolve_class changes the name of an array type
9575         that is on the list and then someone else looks for the modified name.
9576         Also, seems liable to break when compiling multiple source files at
9577         once.  So the simplest is to just remove incomplete_class_list -
9578         it is only a minor space win and it is not even clear it saves time.
9580         * parse.y (resolve_class):  Remove unneeded promote_type.
9582 2001-03-15  Per Bothner  <per@bothner.com>
9584         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
9585         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
9586         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
9587         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
9589         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
9590         * parse.y (java_expand_classes):  Likewise.
9592         * parse.y (expand_start_java_method):  Was only called once and had a
9593         misleading name, so inline in caller java_complete_expand_method.
9594         (enter_a_block):  Likewise inline in enter_block and remove.
9596         Remove junk from when gcc/java was created (by copying from C/C++).
9597         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
9598         (struct binding_level):  Remove fields keep, keep_if_subblocks,
9599         more_cleanups_ok, have_cleanups (which have never been used).
9600         (pushlevel, poplevel):  Remove related useless code.
9602         * class.c (make_class_data):  The class_dtable_decl (i.e. the
9603         vtable for Class) should be external, except when compiling Class.
9605         * jvspec.c (lang_specific_driver):  Fix -C handling.
9606         Check -save-temps to see if temp @FILE should be deleted.
9607         Follow-up to/fix for February 16 patch.
9609         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
9610         (type_stack_dup):  Remove no-longer neded error check.
9612 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
9614         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
9615         to 'for_pointer'. If this type is for a pointer (argument) mangling,
9616         don't surround the element with 'N..E' if the type name is
9617         unqualified.
9619 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9621         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
9622         DECL_RTL_SET_P, etc.
9623         (make_method_value): Likewise.
9624         (get_dispatch_table): Likewise.
9626         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9628 2001-03-07  Tom Tromey  <tromey@redhat.com>
9630         * config-lang.in (lang_requires): Define.
9632 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
9634         * typeck.c (convert): Check flag_unsafe_math_optimizations,
9635         not flag_fast_math.
9637 2001-03-05  Per Bothner  <per@bothner.com>
9639         Fix a problem where rest_of_decl_compilation applied to
9640         class_dtable_decl causes problems because it was done too early,
9641         before output file was opened.
9642         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
9643         * class.c (class_dtable_decl):  Add macro - element of class_roots.
9644         (make_class_data):  Define class_dtable_decl.
9645         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
9647 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9649         * java/class.c, java/decl.c, java/java-tree.h: Replace all
9650         uses of 'boolean' with 'bool'.
9652 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9654         * lang-specs.h: Add zero initializer for cpp_spec field to all
9655         array elements.
9657 2001-02-16  Per Bothner  <per@bothner.com>
9659         Handle compiling multiple input files at once, and @FILE syntax.
9660         * gcj.texi:  Updated documentation to match.
9661         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
9662         * jcf-parse.c (parse_source_file):  Split into ...
9663         (parse_source_file_1):  New function - and:
9664         (parse_source_file_2):  New function.
9665         (yyparse):  On -ffilelist-file, open and scan named file.
9666         On first pass over files, only do parse_source_file_1.
9667         A new second pass calls parse_source_file_2 for each file to compile.
9668         (init_jcf_parse):  Call init_src_parse.
9669         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
9670         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
9671         as multiple input file combined in one compilation.
9672         * lang-options.h:  Add -ffilelist-file
9673         * lang.c (flag_filelist_file):  New flag variable.
9674         (lang_f_options):  Handle -ffilelist-file.
9675         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
9676         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
9677         gclass_list - use global fields of src_parse_roots instead.
9678         * parse.y (src_parse_roots):  New array.
9679         (incomplete_class_list, gclass_list):  New macros.
9680         (push_parser_context, java_pop_parser_context,
9681         java_parser_context_resume):  Don't fiddle with deleted fields.
9682         (various):  Use incomplete_class gclass_list and global macros
9683         instead of parse_ctxt fields - the lists are global.
9684         (init_src_parse):  New function.
9686 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9688         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
9690 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9692         * parse.y (check_inner_class_access): Moved declaration of local
9693         `enclosing_decl_type' to the right location.
9695 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
9697         * parse.y (parser_check_super_interface): Don't call
9698         check_pkg_class_access for an inner interface.
9699         (parser_check_super): Don't call check_pkg_class_access for inner
9700         class.
9701         (do_resolve_class): Simplify enclosing type loop. Don't call
9702         check_pkg_class_access if CL and DECL are not set.
9703         (find_in_imports_on_demand): Set DECL if class_type needed to be
9704         loaded. Don't call check_pkg_class_access for an inner class.
9705         (check_inner_class_access): Rewritten to implement member access
9706         rules as per spec 6.6.1.
9707         (check_pkg_class_access): Handle the empty package correctly.
9708         (in_same_package): New function. Determine if two classes are in the
9709         same package.
9711 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
9713         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
9714         method into array types.
9715         * parse.y (patch_method_invocation): Bypass access check on clone call
9716         to array instance.
9718 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9720         * expr.c (build_instanceof): Check for arrays when trying fold to
9721         false.
9723 2001-02-15  Jim Meyering  <meyering@lucent.com>
9725         * Make-lang.in (java.install-common): Depend on `installdirs'.
9726         (java.install-info): Likewise.
9728 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
9730         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
9732 2001-02-14  Tom Tromey  <tromey@redhat.com>
9733             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9735         Fix for PR java/1261.
9736         * typeck.c (build_java_array_type): Add public `clone' method to
9737         arrays.
9738         * parse.y (resolve_qualified_expression_name): Use current_class
9739         when checking for inaccessibility.
9740         (patch_method_invocation): Fixed error message when accessibility
9741         denied.  Added `from_super' argument.
9743 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
9745         * parse.y (resolve_class): Don't build a fake decl. Use the one
9746         already built.
9747         * typeck.c (build_java_array_type): Build and assign decl to array
9748         type.
9750 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
9752         * parse.y (not_accessible_p): Changed leading comment. Added extra
9753         `where' argument. Use it to enforce protected access rules.
9754         (resolve_qualified_expression_name): Added extra argument to
9755         not_accessible_p.
9756         (patch_method_invocation): Use argument `primary' to provide
9757         not_accessible_p with an extra argument.
9758         (lookup_method_invoke): Added extra argument to not_accessible_p.
9759         (search_applicable_method_list): Likewise.
9761 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9763         * parse.y (resolve_qualified_expression_name): Try to resolve as
9764         an inner class access only if `decl' is a TYPE_DECL.
9766 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9768         * decl.c (classdollar_identifier_node): Initialize.
9769         * java-tree.h (enum java_tree_index): New entry
9770         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
9771         (classdollar_identifier_node): New macro.
9772         (ID_CLASSDOLLAR_P): Likewise.
9773         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
9774         (build_dot_class_method_invocation): Likewise.
9775         (find_applicable_accessible_methods_list): `class$' can't be
9776         inherited.
9778 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
9780         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
9782 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9784         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
9785         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
9786         gone.
9788 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9790         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
9791         outside of the `__U' sequence too.
9792         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
9793         sequence too.
9795 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9797         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
9799 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9801         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
9802         (JVGENMAIN_OBJS): Likewise.
9803         * java-tree.h (append_gpp_mangled_name): New prototype.
9804         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
9805         Removed cast calling `gcc_add_root.'
9806         * jvgenmain.c (mangle_obstack): New global, initialized.
9807         (main): Use it.
9808         (do_mangle_class): Constify local `ptr.'
9809         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
9810         append_gpp_mangle_name and update `count' if necessary.
9811         Use `mangle_obstack.'
9812         * mangle.c (append_unicode_mangled_name): Removed.
9813         (append_gpp_mangled_name): Likewise.
9814         (unicode_mangling_length): Likewise.
9815         (mangle_member_name): Return type set to `void.'
9816         (mangle_field_decl): Don't append `U' in escaped names.
9817         (mangle_method_decl): Likewise.
9818         (mangle_member_name): Just use `append_gpp_mangled_name.'
9819         * mangle_name.c: New file.
9821 2001-02-07  Per Bothner  <per@bothner.com>
9823         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
9825         * check-init.c (check_init):  Don't call done_alternative after
9826         processing loop code, as a LOOP_EXPR never terminates normally.
9828 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9830         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
9832 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9834         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
9835         DECLs.
9837 2001-02-06  Tom Tromey  <tromey@redhat.com>
9839         * lex.c (java_new_lexer): Longer error message.
9841 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
9842             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9844         * typeck.c (build_prim_array_type): Added leading comment.
9845         (build_java_array_type): Moved locals out of
9846         block. Always create the `data' field, fixed alignment to match
9847         C++.
9849 2001-02-04  Tom Tromey  <tromey@redhat.com>
9851         * expr.c (java_lang_expand_expr): Don't bother recomputing
9852         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
9853         Fixes PR java/1866.
9855 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9857         * parse.y (process_imports): Save the original name of the import
9858         for better error report.
9860 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
9862         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
9863         of macros used when compiling jvspec.c.
9864         * jvspec.c (lang_specific_driver): Link with the shared
9865         libgcc by default.
9867 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9869         * check-init.c (check_init): Call internal_error instead of fatal.
9870         * expr.c (java_lang_expand_expr): Likewise.
9871         * jcf-parse.c (get_constant): Likewise.
9872         * mangle.c (java_mangle_decl): Likewise.
9873         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
9874         (operator_string): Likewise.
9875         * check-init.c (check_init): Call abort instead of fatal.
9876         * class.c (build_class_ref): Likewise.
9877         * constants.c (write_constant_pool): Likewise.
9878         * decl.c (start_java_method): Likewise.
9879         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
9880         (java_stack_dup, encode_newarray_type): Likewise.
9881         (build_java_array_length_access): Likewise.
9882         (build_java_check_indexed_type, expand_java_pushc): Likewise.
9883         (build_java_soft_divmod, build_invokeinterface): Likewise.
9884         * java-tree.h (INNER_CLASS_P): Likewise.
9885         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
9886         (give_name_to_class, get_class_constant): Likewise.
9887         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
9888         (find_constant_index, generate_bytecode_conditional): Likewise.
9889         (generate_bytecode_insns, perform_relocations): Likewise.
9890         * lex.c (java_unget_unicode, java_lex): Likewise.
9891         * mangle.c (mangle_type, mangle_record_type): Likewise.
9892         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
9893         (finish_mangling): Likewise.
9894         * parse.h (MARK_FINAL_PARMS): Likewise.
9895         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
9896         (obtain_incomplete_type, java_complete_class): Likewise.
9897         (java_check_regular_methods, java_complete_expand_method): Likewise.
9898         (cut_identifier_in_qualified, check_deprecation): Likewise.
9899         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
9900         (java_complete_lhs, lookup_name_in_blocks): Likewise.
9901         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
9902         * typeck.c (set_local_type, parse_signature_type): Likewise.
9903         (parse_signature_string, build_java_signature): Likewise;
9904         (set_java_signature): Likewise.
9905         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
9906         * class.c (add_method): Call fatal_error instead of fatal.
9907         (build_static_field_ref): Likewise.
9908         * expr.c (build_known_method_ref, expand_invoke): Likewise.
9909         * jcf-parse.c (get_constant, jcf_parse): Likewise.
9910         * lex.c (java_new_new_lexer): Likewise.
9911         * jv-scan.c (main): Likewise.
9912         (fatal_error): Renamed from fatal.
9913         * jcf-parse.c (yyparse): Call fatal_io_error instead of
9914         pfatal_with_name.
9915         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
9916         (yyparse): Likewise.
9917         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
9918         * lex.c (java_get_line_col): Likewise.
9919         * jcf-parse.c (load_class): Make errors non-fatal.
9920         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
9922 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
9924         * jvgenmain.c (class_mangling_suffix): Remove unused string.
9925         (error): Remove unused function.
9926         (main): Don't use "__attribute__ alias" on generated class symbol.
9928 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9930         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
9931         argument.
9932         * parse.y (finish_method_declaration): Code accounting for WFLed
9933         method DECL_NAMEs deleted.
9934         (check_abstract_method_definitions): Likewise.
9935         (resolve_type_during_patch): Layout resolved type.
9936         * typeck.c (lookup_do): Removed unused local.
9938 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
9940         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
9941         * decl.c (init_decl_processing): Use integer_minus_one_node, not
9942         integer_negative_one_node.
9943         * expr.c (build_java_binop): Likewise.
9945 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
9947         * zextract.c (read_zip_archive): Read file_offset before writing
9948         zipd and consequently clobbering the header contents.
9950 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9952         * Make-lang.in: Remove all dependencies on defaults.h.
9953         * decl.c: Don't include defaults.h.
9954         * expr.c: Likewise.
9955         * parse.y: Likewise.
9957 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9959         * ChangeLog (2001-01-21): Fixed typo.
9960         * class.c (layout_class_method): Code accounting for WFLed
9961         method DECL_NAMEs deleted.
9962         * constant.c (find_methodref_index): Likewise.
9963         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
9964         * java-tree.h (DECL_FUNCTION_WFL): New macro.
9965         (struct lang_decl): New field `wfl'.
9966         (java_get_real_method_name): Prototype deleted.
9967         * mangle.c (mangle_method_decl): Code accounting for WFLed
9968         method DECL_NAMEs deleted.
9969         * parse.h (GET_METHOD_NAME): Macro deleted.
9970         * parse.y (reset_method_name): Deleted.
9971         (method_header): Set DECL_FUNCTION_WFL.
9972         (check_abstract_method_header): Code accounting for WFLed method
9973         DECL_NAMEs deleted.
9974         (java_get_real_method_name): Deleted.
9975         (check_method_redefinition): Code accounting for WFLed method
9976         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
9977         (java_check_regular_methods): Likewise.
9978         (java_check_abstract_methods): Likewise.
9979         (java_expand_classes): Don't call `reset_method_name.'
9980         (search_applicable_method_list): Use DECL_NAMEs instead of
9981         GET_METHOD_NAME.
9982         * typeck.c (lookup_do): Code accounting for WFLed method
9983         DECL_NAMEs deleted.
9985 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
9987         * lex.c (java_read_char): Check for EOF from getc first.
9989 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9991         * class.c (layout_class): Don't lay the superclass out if it's
9992         already being laid out.
9993         * jcf-parse.c (handle_innerclass_attribute): New function.
9994         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
9995         handle_innerclasses_attribute.
9996         (jcf_parse): Don't load an innerclasses if it's already being
9997         laid out.
9998         * jcf-write.c (append_innerclass_attribute_entry): Static
9999         `anonymous_name' and its initialization deleted. `ocii' and `ini'
10000         to be zero for anonymous classes.
10002 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10004         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10005         necessary.
10006         * jcf-parse.c (set_source_filename): Use
10007         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10009 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10011         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10012         gets a unique asm name.
10014 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10016         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10017         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10018         if necessary.
10019         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10020         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10021         * parse.y (lookup_package_type_and_set_next): Deleted.
10022         (resolve_package): Removed unnecessary code.
10023         (find_applicable_accessible_methods_list): `finit$' can't be
10024         inherited.
10025         * verify.c (pop_argument_types): Added missing prototype.
10027 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
10029         * config-lang.in: Disable java by default.
10031 2001-01-23  Tom Tromey  <tromey@redhat.com>
10033         * gcj.texi (Copying): New node.
10034         Added copyright information.
10036 2001-01-21  Per Bothner  <per@bothner.com>
10038         Various fixes to allow compiling a compressed .jar/.zip archive.
10039         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
10040         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
10041         (struct ZipDirectory):  New field zipf points to owning ZipFile.
10042         * jcf.h (struct ZipDirectory):  Add forward declaration.
10043         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
10044         Remove seen_in_zip and zip_offset fields.
10045         (JCF_SEEN_IN_ZIP):  New macro.
10046         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
10047         * jcf-io.c:  Change all ZipFileCache to ZipFile.
10048         (read_zip_member):  New function.
10049         (open_in_zip):  Call read_zip_member.
10050         * jcf-parse.c (find_in_current_zip):  Remove function.
10051         (read_class):  Merge in find_in_current_zip functionality.
10052         Call read_zip_member if needed.
10053         (parse_zip_file_entries):  Use read_zip_member.
10054         (process_zip_dir):  Update for removed and added JCF fields.
10055         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
10057 2001-01-21  Per Bothner  <per@bothner.com>
10059         Minor optimization of static ggc roots.
10060         * jcf-parse.c (parse_roots):  New static field.
10061         (current_field, current_method, current_file_list):  Replace by macros
10062         naming fields of parse_roots.
10063         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
10064         * class.c (class_roots):  New static field.
10065         (registered_class, fields_ident, info_ident, class_list):
10066         New macros naming fields of parse_roots.
10067         (build_static_field_ref):  Don't register roots here.
10068         (layout_class):  Static field list replaced by macro class_list.
10069         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10070         Initialize fields_ident and info_ident here.
10072 2001-01-21  Per Bothner  <per@bothner.com>
10074         * jcf-parse.c (ggc_mark_jcf):  New function.
10075         (init_jcf_parse):  Register current_jcf as ggc root.
10077 2001-01-21  Per Bothner  <per@bothner.com>
10079         * lang.c (put_decl_node):  Print method's name.
10081 2001-01-21  Per Bothner  <per@bothner.com>
10083         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10084         (verify_jvm_instructions):  Use it, for better error messages on loads.
10086 2001-01-21  Per Bothner  <per@bothner.com>
10088         * verify.c (merge_type_state):  Still may have to merge even if
10089         LABEL_VERIFIED (label).
10091 2001-01-21  Per Bothner  <per@bothner.com>
10093         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10094         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10096 2001-01-19  Per Bothner  <per@bothner.com>
10098         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10099         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10101 2001-01-18  Per Bothner  <per@bothner.com>
10103         * gcj.texi (Input Options): Mention .java files.
10105 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10107         * lang-options.h (-Wunsupported-jdk11): Removed.
10108         * lang.c (flag_not_overriding): Deleted.
10109         (flag_static_local_jdk1_1): Likewise.
10110         (lang_W_options): Removed "unsupported-jdk11" entry.
10111         * parse.y (java_check_methods): Removed dead code.
10113 2001-01-17  Tom Tromey  <tromey@redhat.com>
10115         Changes suggested by Per Bothner:
10116         * gcj.texi (Input Options): Don't mention input files.
10117         (Code Generation): Updated --main information.
10118         (Invoking jcf-dump): Mention that --javap is incomplete.
10119         From Alexandre Petit-Bianco:
10120         (Warnings): Don't mention -Wunsupported-jdk11.
10121         My stuff:
10122         (Compatibility): Mention JDK 1.2-ness of libraries.
10123         (Resources): Mention resources used when writing gcj.
10125 2001-01-17  Tom Tromey  <tromey@redhat.com>
10127         * gcj.texi: New file.
10128         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10129         (java.info): Depend on gcj.info.
10130         (java/gcj.dvi): New target.
10131         (java.dvi): Depend on gcj.dvi.
10132         (java.install-info): Wrote.
10134 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10136         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10137         having called make_decl_rtl.
10139 2001-01-14  Per Bothner  <per@bothner.com>
10141         Various patches to emit better messages on verification errors.
10142         * expr.c (push_type_0):  Return error indication on stack overflow,
10143         instead of callinfg fatal.
10144         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10145         (pop_type_0):  Return detailed error message (in a char** argument).
10146         (pop_type):  If pop_type_0 fails, print error message.
10147         (pop_argument_types):  Moved to verify.c.
10148         * verify.c (pop_argument_types):  Moved from expr.c.
10149         Return a (possible) error message, rather than void.
10150         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10151         (verify_jvm_instruction):  Use new macros, improving error messages.
10152         For case OPCODE_astore use object_ptr_type_node.
10153         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10154         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10156         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10157         constant, return body without wrapper.  (Improves constant folding.)
10158         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10160 2001-01-13  Per Bothner  <per@bothner.com>
10162         * expr.c (expand_java_field_op):  Assigning to a final field outside
10163         an initializer does not violate JVM spec, so should be warning, not
10164         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10166 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10168         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10169         to 2001.
10171 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10173         * parse.y (resolve_expression_name): Permit instance variables from
10174         enclosing context in super constructor call.
10175         (resolve_qualified_expression_name): Permit enclosing class's qualified
10176         "this" in super constructor call.
10178 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10180         * class.c (build_utf8_ref): Remove last argument in call to
10181         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10182         (build_class_ref): Likewise.
10183         (build_static_field_ref): Likewise.
10184         (get_dispatch_table): Likewise.
10185         (layout_class_method): Likewise.
10186         (emit_register_classes): Likewise.
10187         * constants.c (build_constant_data_ref): Likewise.
10188         * decl.c (builtin_function): Likewise.
10189         (create_primitive_vtable): Likewise.
10190         * expr.c (build_known_method_def): Likewise.
10191         (build_jni_stub): Likewise.
10192         (java_lang_expand_expr): Likewise.
10194 2001-01-10  Tom Tromey  <tromey@redhat.com>
10196         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10198 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10200         * java-tree.h (lang_printable_name_wls): New prototype.
10201         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10202         rather than `current_class' to print type name. Don't prepend type
10203         names when printing constructor names.
10204         (lang_printable_name_wls): New function.
10205         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10206         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10207         * parse.y (patch_method_invocation): Message tuned for constructors.
10208         (not_accessible_p): Grant `private' access from within
10209         enclosing contexts.
10211 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10213         All files with updated copyright when applicable.
10214         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10215         * class.c (mangle_class_field): Function removed.
10216         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10217         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10218         (build_class_ref): Call `java_mangle_class_field' instead of
10219         `mangle_class_field.'
10220         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10221         (layout_class): Call `java_mangle_decl' instead of
10222         `mangle_static_field.'
10223         (cxx_keywords): Initialized static array moved to `lex.c.'
10224         (layout_class_method): Changed leading comment. Simplified to
10225         call `java_mangle_decl.' Local `ptr' moved in for loop body.
10226         * decl.c (lang_mark_tree): Mark field `package_list.'
10227         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10228         (struct lang_type): New field `package_list.'
10229         (unicode_mangling_length): Prototype removed.
10230         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10231         emit_unicode_mangled_name): Likewise.
10232         (cxx_keyword_p): New prototype.
10233         (java_mangle_decl, java_mangle_class_field,
10234         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10235         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10236         `build_expr_wfl.'
10237         * jvgenmain.c (main_method_prefix): Global variable removed.
10238         (main_method_suffix): Likewise.
10239         (do_mangle_classname): New function.
10240         (main): Call it. Format changed to accommodate new mangling scheme.
10241         * lex.c: (utf8_cmp): Conditionally prototyped.
10242         (cxx_keywords): Moved from class.c, conditionally defined.
10243         (utf8_cmp, cxx_keyword_p): Likewise.
10244         * mangle.c (obstack.h, ggc.h): Included.
10245         (mangle_field_decl): New function.
10246         (mangle_method_decl, mangle_type, mangle_pointer_type,
10247         mangle_array_type, mangle_record_type,
10248         find_compression_pointer_match, find_compression_array_match,
10249         find_compression_record_match,
10250         find_compression_array_template_match, set_type_package_list,
10251         entry_match_pointer_p, emit_compression_string, init_mangling,
10252         finish_mangling, compression_table_add, mangle_member_name): Likewise.
10253         (mangle_obstack): New global.
10254         (MANGLE_RAW_STRING): New macro.
10255         (unicode_mangling_length): Turned static.
10256         (append_unicode_mangled_name): Renamed from
10257         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
10258         replaces `obstack', removed from the parameter list.
10259         (append_gpp_mangled_name): Turned static. `mangle_obstack'
10260         replaces parameter `obstack', removed from the parameter list. Call
10261         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10262         (append_gpp_mangled_classtype): Removed.
10263         (compression_table, compression_next): New static variables.
10264         * parse.y (temporary_obstack): Extern declaration removed.
10266 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10268         * parse.y (patch_binop): Compute missing type in error situations.
10270 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10272         * class.c (make_class_data): Push initial value for "arrayclass".
10273         * decl.c (init_decl_processing): Add new class field "arrayclass".
10275 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10277         From patha@softlab.ericsson.se:
10278         * parse.y (switch_label): Use build, not build1, to construct
10279         DEFAULT_EXPR.
10281 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10283         * lang.c (lang_decode_option): Change -MA to -MP.
10284         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10285         Update to new prototype; do quote targets.
10286         (jcf_dependency_write): Update.
10288 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
10290         Shorten primitive array allocation path:
10291         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10292         to create new primitive arrays.
10293         * expr.c (build_newarray): If generating native code, call
10294         soft_newarray_node with a reference to the primitive TYPE identifier
10295         instead of type_value.
10297 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
10299         Fix for PRs gcj/312 and gcj/253:
10300         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10301         dest if they arn't already.
10302         * class.c (layout_class): Call maybe_layout_super_class on
10303         superinterfaces also, but only if compiling from bytecode.
10305         Fix for PR gcj/373:
10306         * parse.y (create_class): Set ACC_STATIC if class is declared in an
10307         interface.
10309 2000-12-15  Tom Tromey  <tromey@redhat.com>
10311         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10312         set.
10314 2000-12-14  Andrew Haley  <aph@redhat.com>
10316         * boehm.c (mark_reference_fields): Change test to correctly detect
10317         bitmap overflow.
10319 2000-12-15  Andreas Jaeger  <aj@suse.de>
10321         * config-lang.in (lang_dirs): Added.
10323 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10325         * parse.y (end_artificial_method_body): Fixed undefined behavior.
10326         Credits go to rth for finding it.
10328 2000-12-13  Mike Stump  <mrs@wrs.com>
10330         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10332 2000-11-07  Tom Tromey  <tromey@cygnus.com>
10334         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10335         * lex.c (java_ignorable_control_p): Removed.
10336         (java_letter_or_digit_p): Removed.
10337         (java_start_char_p): New function.
10338         (java_read_char): Return `int', not `unicode_t'.  Changed
10339         callers.
10340         (java_read_unicode): Likewise.
10341         (java_read_unicode_collapsing_terminators): Likewise.
10342         (java_get_unicode): Likewise.
10343         (java_new_lexer): Initialize hit_eof.
10344         (java_parse_end_comment): Take `int' argument.
10345         (java_parse_doc_section): Likewise.
10346         (java_parse_escape_sequence): Don't allow backlash-newline.
10347         Return `int'.
10348         * lex.h (JAVA_DIGIT_P): Removed.
10349         (_JAVA_LETTER_OR_DIGIT_P): Removed.
10350         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10351         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10352         (JAVA_PART_CHAR_P): New macro.
10353         (UEOF): Now -1.
10354         (JAVA_CHAR_ERROR): Now -2.
10355         (java_lexer): New field `hit_eof'.
10356         * chartables.h: New file.
10357         * gen-table.pl: new file.
10359 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10360             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10362         * parse.y (java_complete_lhs): Only allow compound assignment of
10363         reference type if type is String.
10365 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10367         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10368         jcf-path.c: Likewise.
10370 2000-12-09  Anthony Green  <green@redhat.com>
10372         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10373         filestart and filename_length as int values.
10375 2000-12-07  Mo DeJong  <mdejong@redhat.com>
10377         * jcf-io.c (find_class): Correct the logic that tests to see if a
10378         .java file is newer than its .class file. The compiler was
10379         incorrectly printing a warning when file mod times were equal.
10381 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
10383         * jvgenmain.c: Use ISPRINT not isascii.
10385 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10387         * parse.y (end_artificial_method_body): Fixed typo.
10389 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10391         * parse.y (patch_method_invocation): Pick the correct enclosing
10392         context when creating inner class instances.
10393         Fixes gcj/332.
10395 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
10397         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10398         Update copyright year to 2000.
10400 2000-11-23  Anthony Green  <green@redhat.com>
10402         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10403         Move current_file_list out of yyparse and make it static.
10405         * expr.c: Declare quick_stack and tree_list_free_list as static
10406         (init_expr_processing): Register quick_stack and
10407         tree_list_free_list roots.
10409 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10411         * parse.y (build_outer_field_access): New local `decl_ctx', use
10412         it. Check for field's context and current class immediate outer
10413         context inheritance.
10414         (outer_field_access_p): Consider fields inherited from the last
10415         enclosing context.
10416         (build_access_to_thisn): Stop at the last enclosing context if
10417         necessary.
10418         Fixes gcj/367.
10420 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
10422         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10424 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
10426         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10427         scratch buffer.
10429 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10431         * jv-scan.c (help): Document --complexity.
10432         (options): Added --complexity.
10433         (flag_complexity): New global.
10434         (main): Call `report'.
10435         * parse-scan.y (complexity): New global.
10436         (if_then_statement, if_then_else_statement,
10437         if_then_else_statement_nsi, switch_block_statement_group,
10438         while_expression, do_statement, for_begin, continue_statement,
10439         throw_statement, catch_clause, finally, method_invocation,
10440         conditional_and_expression, conditional_or_expression,
10441         conditional_expression): Update complexity.
10442         (reset_report): Reset complexity.
10443         (report): New function.
10445 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10447         * lex.c (yylex): Added STRICT_TK case.
10448         * parse.y (STRICT_TK): Added.
10449         * parse-scan.y (STRICT_TK): Added.
10450         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
10451         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
10452         file.
10453         * keyword.h: Rebuilt.
10454         * keyword.gperf (strictfp): Added.
10456 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10458         * lex.c (yylex): Recognize floating point constants with leading
10459         0.
10461 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10463         * java-tree.h (cyclic_inheritance_report): Constify.
10464         * parse.y (cyclic_inheritance_report): Likewise.
10466 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10468         * parse.y (goal): Remove call to ggc_add_string_root.
10470 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10472         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10473         Create string in scratch buffer, then pass to build_string.
10475 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10477         * parse.y (issue_warning_error_from_context): Add
10478         ATTRIBUTE_PRINTF.
10480 2000-11-11  Anthony Green  <green@redhat.com>
10482         * jcf-parse.c (process_zip_dir): Add finput parameter.
10483         (jcf_figure_file_type): Call process_zip_dir with appropriate
10484         argument.
10486 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10488         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10489         * jcf-parse.c (jcf_figure_file_type): Likewise.
10491 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10493         * parse.y (create_new_parser_context): Use memset () instead of
10494         bzero ().
10496 2000-11-08  Tom Tromey  <tromey@cygnus.com>
10498         * gjavah.c (process_file): Only include gcj/cni.h when generating
10499         CNI stubs.
10501 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10503         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
10504         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
10505         instead of bzero ().
10507 2000-11-05  Tom Tromey  <tromey@cygnus.com>
10509         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
10510         * lex.c (IS_ZERO): New define.
10511         (java_perform_atof): Error on floating point underflow.
10513 2000-11-04  Tom Tromey  <tromey@cygnus.com>
10515         * lex.c (java_parse_escape_sequence): Only read two octal
10516         characters if the first one is greater than 3.  Don't allow
10517         "octal" numbers to include the digits 8 or 9.
10519 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10521         * Make-lang.in (java.distdir): Remove.
10523 2000-11-03  Tom Tromey  <tromey@cygnus.com>
10525         * Make-lang.in (java.dvi): New target.
10526         Partial fix for PR other/567.
10528         * lang-options.h: Mention -Wout-of-date.
10529         * jcf-dump.c (flag_newer): New global.
10530         * gjavah.c (flag_newer): New global.
10531         * jcf-io.c (find_class): Only warn when flag_newer set.
10532         * lang.c (flag_newer): New global.
10533         (struct string_option): New declaration.
10534         (lang_W_options): New global.
10535         (process_option_with_no): New function.
10536         (lang_decode_option): Use it.
10538         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
10539         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
10540         `$'.
10542         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
10543         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
10544         * lex.c (java_read_unicode): Removed `term_context' argument.
10545         Recognize any number of `u' in `\u'.
10546         (java_read_unicode_collapsing_terminators): New function.
10547         (java_get_unicode): Use it.
10548         (java_lineterminator): Removed.
10549         (yylex): Produce error if character literal is newline or single
10550         quote.  Return if eof found in middle of `//' comment.  EOF in
10551         `//' comment is only an error if pedantic.
10552         (java_ignorable_control_p): New function.
10553         (java_parse_end_comment): Return if eof found in middle of
10554         comment.
10555         Include flags.h.
10556         * jv-scan.c (pedantic): New global.
10558 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10560         * parse.y (outer_field_access_p): Inherited fields aren't
10561         consider outer fields.
10562         (maybe_build_thisn_access_method): Use
10563         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
10564         (resolve_expression_name): Trigger an error if a static field
10565         is being accessed as an outer field.
10567 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10569         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
10570         Fixes gcj/365.
10572 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10574         * Make-lang.in: Move all build rules here from Makefile.in,
10575         adapt to new context.  Wrap all rules that change the current
10576         directory in parentheses.  Expunge all references to $(P).
10577         When one command depends on another and they're run all at
10578         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10579         all object-file generation rules.  Delete obsolete variables.
10581         * Makefile.in: Delete.
10582         * config-lang.in: Delete outputs= line.
10584 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10586         * parse.y (patch_method_invocation): NULLify this_arg when already
10587         inserted.
10588         (maybe_use_access_method): Handle call to methods unrelated to the
10589         current class. Fixed comment.
10590         Fixes gcj/361.
10592 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10594         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
10595         scope.
10597 2000-10-24  Tom Tromey  <tromey@cygnus.com>
10599         * lex.c (java_new_lexer): Initialize new fields.  Work around
10600         broken iconv() implementations.
10601         (java_read_char): Swap bytes if required.  Use fallback decoder if
10602         required.
10603         (byteswap_init, need_byteswap): New globals.
10604         (java_destroy_lexer): Only close iconv handle if it is in use.
10605         * lex.h (java_lexer): New fields read_anything, byte_swap,
10606         use_fallback.
10607         Made out_buffer unsigned.
10609 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10611         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
10612         where an enclosing context can be set on the jdep.
10613         (do_resolve_class): Fixed identation.
10615 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10617         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
10619         * jcf-reader.c (peek_attribute, skip_attribute): Only define
10620         when requested.
10622         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
10624         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
10626 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10628         * jcf-write.c (OP1): Update `last_bc'.
10629         (struct jcf_block): Fixed indentation and typo in comments.  New
10630         field `last_bc'.
10631         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
10632         follows `monitorenter'.
10633         * parse.y (patch_synchronized_statement): New local `tmp'. Call
10634         `patch_string'.
10635         Fixes gcj/232.
10637 2000-10-16  Tom Tromey  <tromey@cygnus.com>
10639         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
10640         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
10641         * lang-options.h: Added -MA, -MT, -MF..
10642         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
10643         (DEPEND_TARGET_SET): New macro.
10644         (DEPEND_FILE_ALREADY_SET): Likewise.
10645         (init_parse): Handle new flags.
10646         * jcf.h (jcf_dependency_print_dummies): Declare.
10647         * Make-lang.in (s-java): Added mkdeps.o.
10648         * Makefile.in (BACKEND): Added mkdeps.o.
10649         (../gcjh$(exeext)): Added mkdeps.o.
10650         (../jcf-dump$(exeext)): Added mkdeps.o.
10651         * jcf-depend.c: Include mkdeps.h.
10652         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
10653         add_entry): Removed.
10654         (jcf_dependency_reset): Rewrote.
10655         (dependencies): New global.
10656         (jcf_dependency_set_target): Rewrote.
10657         (jcf_dependency_add_target): Likewise.
10658         (jcf_dependency_add_file): Likewise.
10659         (munge): Removed.
10660         (print_ents): Removed.
10661         (jcf_dependency_write): Rewrote.
10662         (print_dummies): New global.
10663         (jcf_dependency_print_dummies): New function
10664         (jcf_dependency_write): Call deps_dummy_targets if required.
10666 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10668         * gjavah.c (add_class_decl): Removed unused variables `tname',
10669         `tlen' and `name_index'.
10670         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
10671         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
10672         in `wfl_operator' with value.
10673         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
10674         (jcf_figure_file_type): Fixed identation.
10675         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
10676         * parse.y (analyze_clinit_body): New function.
10677         (static_initializer:): Reset `current_static_block'.
10678         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
10679         `wfl_operator' with new value.
10680         (lookup_cl): Use EXPR_WFL_FILENAME.
10681         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
10682         analyze_clinit_body.
10683         (build_outer_field_access): Access to this$<n> built from
10684         current_class, not its outer context.
10685         (build_access_to_thisn): Fixed leading comment. Tidied things up.
10686         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
10687         (patch_method_invocation): Use `is_static_flag' when already
10688         initialized.
10689         (patch_newarray): Removed assignment in ternary operator.
10691 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10693         * except.c (free_eh_ranges): Don't free `whole_range'.
10695 2000-10-15  Anthony Green  <green@redhat.com>
10697         * decl.c (init_decl_processing): Call init_class_processing before
10698         anything else.
10700 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10702         * check-init.c (check_init): Fixed leading comment. Use
10703         LOCAL_FINAL_P.
10704         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10705         (give_name_to_locals): Likewise.
10706         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
10707         fields in lang_decl_var.
10708         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
10709         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
10710         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
10711         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
10712         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
10713         (LOCAL_FINAL): Rewritten.
10714         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
10715         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
10716         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
10717         `init_final' fields.
10718         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
10719         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
10720         (TYPE_HAS_FINAL_VARIABLE): New macro.
10721         (struct lang_type): Added `afv' field.
10722         * parse.y (check_static_final_variable_assignment_flag): New function.
10723         (reset_static_final_variable_assignment_flag): Likewise.
10724         (check_final_variable_local_assignment_flag): Likewise.
10725         (reset_final_variable_local_assignment_flag): Likewise.
10726         (check_final_variable_indirect_assignment): Likewise.
10727         (check_final_variable_global_assignment_flag): Likewise.
10728         (add_inner_class_fields): Use LOCAL_FINAL_P.
10729         (register_fields): Handle local finals and final variables.
10730         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
10731         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10732         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10733         on local finals.
10734         (java_complete_expand_methods): Loop to set
10735         TYPE_HAS_FINAL_VARIABLE. Call
10736         `reset_final_variable_local_assignment_flag' and
10737         `check_final_variable_local_assignment_flag' accordingly before
10738         and after constructor expansion. Call
10739         `reset_static_final_variable_assignment_flag'
10740         before expanding <clinit> and after call
10741         `check_static_final_variable_assignment_flag' if the
10742         current_class isn't an interface. After all methods have been
10743         expanded, call `check_final_variable_global_assignment_flag' and
10744         `check_static_final_variable_assignment_flag' if the current class
10745         is an interface.
10746         (maybe_yank_clinit): Fixed typo in comment.
10747         (build_outer_field_access_methods): Removed old sanity check. Use
10748         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10749         Don't create access methods for finals.
10750         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
10751         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
10752         existing DECL_INIT has been processed.
10753         (java_complete_lhs): Likewise.
10754         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
10755         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
10756         logic.
10757         (patch_assignment): Use LOCAL_FINAL_P.
10758         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
10759         DECL_INITIAL is nullified.
10760         Fixes gcj/163.
10762 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10764         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
10766         * Makefile.in (parse.c, parse-scan.c): Likewise.
10768 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10770         * class.c (temporary_obstack): Remove.
10771         (make_class): Don't mess with obstascks.
10772         (push_class): Likewise.
10773         (set_super_info): Likewise.
10774         (add_method_1): Likewise.
10775         (add_method): Likewise.
10776         (add_field): Likewise.
10777         (build_utf8_ref): Likewise.
10778         (build_class_ref): Likewise.
10779         (build_static_field_ref): Likewise.
10780         (finish_class): Likewise.
10781         (push_super_field): Likewise.
10782         (layout_class): Likewise.
10783         (layout_class_methods): Likewise.
10784         (init_class_processing): Likewise.
10785         * constants.c (get_tag_node): Likewise.
10786         (build_constant_data_ref): Likewise.
10787         * decl.c (ggc_p): Remove.
10788         (copy_lang_decl): Use ggc_alloc.
10789         (complete_start_java_method): Don't mess with obstacks.
10790         (start_java_method): Likewise.
10791         (end_java_method): Likewise.
10792         * except.c (link_handler): Use xmalloc.
10793         (free_eh_ranges): New function.
10794         (method_init_exceptions): Use it.
10795         (add_handler): Use xmalloc.
10796         (expand_start_java_handler): Don't mess with obstacks.
10797         (prepare_eh_table_type): Likewise.
10798         (expand_end_java_handler): Likewise.
10799         * expr.c (push_value): Likewise.
10800         (create_label_decl): Likewise.
10801         (build_jni_stub): Likewise.
10802         (java_lang_expand_expr): Likewise.
10803         (note_instructions): Use xrealloc.
10804         (java_push_constant_from_pool): Don't mess with obstacks.
10805         (process_jvm_instruction): Likewise.
10806         * java-tree.h (cyclic_inheritance_report): Remove duplicate
10807         declaration.
10808         * jcf-parse.c (get_constant): Don't mess with obstacks.
10809         (read_class): Likewise.
10810         (jcf_parse): Likewise.
10811         * lex.c (expression_obstack): Remove.
10812         (java_lex): Don't use obstack_free.
10813         * parse.h (exit_java_complete_class): Don't mess with obstacks.
10814         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
10815         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
10816         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
10817         * parse.y (gaol): Add more GC roots.
10818         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
10819         (lookup_field_wrapper): Likewise.
10820         (obtain_incomplete_type): Don't mess with obstacks.
10821         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
10822         macros.
10823         (craft_constructor): Don't mess with obstacks.
10824         (safe_layout_class): Likewise.
10825         (java_complete_class): Likewise.
10826         (source_end_java_method): Likewise.
10827         (build_outer_field_access_methods): Likewise.
10828         (build_outer_method_access_method): Likewise.
10829         (maybe_build_thisn_access_method): Likewise.
10830         (build_dot_class_method_invocation): Likewise.
10831         (java_complete_tree): Likewise.
10832         (java_complete_lhs): Likewise.
10833         (do_merge_string_cste): Likewise.
10834         (patch_string_cst): Likewise.
10835         (array_constructor_check_entry): Likewise.
10836         * typeck.c (build_java_array_type): Likewise.
10837         (parse_signature_string): Likewise.
10838         (build_java_signature): Likewise.
10840 2000-10-12  Tom Tromey  <tromey@cygnus.com>
10842         Fix for PR gcj/356:
10843         * gjavah.c (add_class_decl): Don't special-case inner classes.
10844         (add_namelet): Likewise.
10846 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
10848         * java-tree.h: Constify current_encoding.
10849         * lang.c: Constify current_encoding.
10851 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
10853         * jvgenmain.c (class_mangling_suffix): Omit `.'.
10854         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
10856 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10858         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
10859         patch. Fixes gcj/340.
10861 2000-10-10  Tom Tromey  <tromey@cygnus.com>
10863         * lex.c (java_new_lexer): Initialize out_first and out_last
10864         fields.
10865         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
10867 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10869         * parse.y (pop_current_osb): New function.
10870         (array_type:): Use `dims:', changed actions
10871         accordingly. Suggested by Anthony Green.
10872         (array_creation_expression:): Used pop_current_osb.
10873         (cast_expression:): Likewise.
10874         (search_applicable_method_list): Fixed indentation.
10876 2000-10-08  Anthony Green  <green@redhat.com>
10878         * parse.y (array_type_literal): Remove production.
10879         (type_literals): Refer to array_type, not array_type_literal.
10881 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10883         Patch contributed by Corey Minyard.
10884         * decl.c (check_local_named_variable): New function.
10885         (tree check_local_unnamed_variable): Likewise.
10886         (find_local_variable): Splitted. Call check_local_{un}named_variable.
10888 2000-10-07  Anthony Green  <green@redhat.com>
10890         * class.c (layout_class): Handle case where superclass can't be
10891         layed out yet.
10893 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10895         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
10896         gperf.
10898 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10900         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
10901         * jvgenmain.c (class_mangling_prefix): Removed.
10902         (class_mangling_suffix): New global.
10903         (main): Use it.
10904         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
10905         `$'.
10906         (print_method_info): Handle overrides for static and final
10907         methods.
10908         (process_file): Generate declaration for class object field.
10909         * class.c (cxx_keywords): New array.
10910         (utf8_cmp): New function.
10911         (cxx_keyword_p): New function.
10912         (layout_class_method): Mangle C++ keywords by appending `$'.
10913         (mangle_field): New function.
10914         (mangle_class_field): Use mangle_field.  Mangle class name as
10915         `class$'.
10916         (mangle_static_field): Use mangle_field.
10918 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10920         * decl.c (find_local_variable): Removed uncessary type check and
10921         fixed range check typo. From Corey Minyard.
10923 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10925         * decl.c (give_name_to_locals): New local `code_offset'. Call
10926         `maybe_adjust_start_pc'.
10927         * expr.c (note_instructions): New function.
10928         (expand_byte_code): Don't collect insn starts here.
10929         (peek_opcode_at_pc): New function.
10930         (maybe_adjust_start_pc): Likewise.
10931         * java-tree.h (maybe_adjust_start_pc): Declare.
10932         (note_instructions): Likewise.
10933         * jcf-parse.c (parse_class_file): Call `note_instructions'.
10935 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10937         * parse.y (field_access:): Fixed indentation.
10938         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
10940 2000-09-07  Tom Tromey  <tromey@cygnus.com>
10942         Fix for PR gcj/307:
10943         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
10944         JPRIMITIVE_TYPE_P, for arithmetic operators.
10945         (patch_method_invocation): Indentation fix.
10946         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
10947         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
10948         (do_unary_numeric_promotion): Cleaned up code.
10949         (valid_cast_to_p): Handle boolean correctly.
10951 2000-09-27  Tom Tromey  <tromey@cygnus.com>
10953         * lex.c (java_read_unicode): Reset bs_count when finished with
10954         `\u' sequence.
10956 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10958         Convert to GC.
10959         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
10960         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
10961         (typeck.o): Depend on ggc.h.
10962         * class.c (add_method_1): Use GC functions for allocation.
10963         (init_class_processing): Register roots.
10964         * decl.c (ggc_p): Set to 1.
10965         (pending_local_decls): Make it static.
10966         (push_jvm_slot): Use GC functions for allocation.
10967         (init_decl_processing): Register roots.
10968         (give_name_to_locals): Use GC functions for allocation.
10969         (lang_mark_tree): New function.
10970         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
10971         functions for allocation.
10972         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
10973         * lex.c (java_lex): Use build_string, rather than replicating it
10974         inline.
10975         * parse.y (goal): Add more roots.
10976         (mark_parser_ctxt): New function.
10977         * typeck.c: Include ggc.h.
10979 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10981         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
10982         contains something else than MODIFY_EXPR.
10984 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
10986         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
10987         * Makefile.in (parse.o): Depend on ggc.h.
10988         (class.o): Likewise.
10989         (constants.o): Likewise.
10990         (decl.o): Likewise.
10991         (expr.o): Likewise.
10992         (jcf-parse.o): Likewise.
10993         (jcf-write.o): Likewise.
10994         (mangle.o): Likewise.
10995         * class.c: Include ggc.h.
10996         (build_static_field_ref): Register GC roots.
10997         (layout_class): Likewise.
10998         (init_class_processing): Likewise.
10999         * constants.c: Include ggc.h.
11000         (current_constant_pool_data_ref): Remove.
11001         (tag_nodes): Move it to ...
11002         (get_tag_node): ... here.  Register GC roots.
11003         * decl.c: Include ggc.h.  Remove many global tree definitions.
11004         (throw_node): Define.
11005         (java_global_trees): Likewise.
11006         (predef_filenames): Make the size a constant.
11007         (init_decl_processing): Adjust accordingly.
11008         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
11009         * expr.c: Include ggc.h.
11010         (init_expr_processing): Register GC roots.
11011         (build_invokeinterface): Likewise.
11012         * java-tree.h: Replace extern tree declarations with macros.
11013         (java_global_trees): New variable.
11014         (java_tree_index): New enumeration.
11015         (init_jcf_parse): Declare.
11016         * jcf-parse.c: Include ggc.h.
11017         (current_class): Remove declaration.
11018         (main_class): Likewise.
11019         (all_class_list): Likewise.
11020         (predefined_filename_p): Adjust for constant size of
11021         predef_filenames.
11022         (init_jcf_parse): New function.
11023         * jcf-write.c: Include ggc.h.
11024         (generate_classfile): Register GC roots.
11025         (append_synthetic_attribute): Likewise.
11026         (append_innerclass_attribute_entry): Likewise.
11027         * lang.c: Include ggc.h.
11028         (lang_print_error): Register GC roots.
11029         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11030         with macros.
11031         * parse.y: Include ggc.h.
11032         (wfl_operator): Remove.
11033         (goal): Register GC roots.
11034         (java_pop_parser_context): Adjust for new field names.
11035         (java_parser_context_save_global): Likewse.
11036         (java_parser_context_restore_global): Likewise.
11037         (java_parser_context_suspend): Likewise.
11038         (java_parser_context_resume): Likewise.
11039         (verify_constructor_circularity): Register GC roots.
11040         (lookup_cl): Likewise.
11041         (java_reorder_fields): Likewise.
11042         (build_current_this): Likewise.
11043         (class_in_current_package): Likewise.
11044         (argument_types_convertible): Likewise.
11045         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11047 2000-09-14  Tom Tromey  <tromey@cygnus.com>
11049         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11051 2000-09-13  Tom Tromey  <tromey@cygnus.com>
11053         * jcf-parse.c: Include <locale.h>.
11054         * jv-scan.c: Include <locale.h>.
11056 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11058         * expr.c (pop_type_0): Return `Object' if trying to merge two
11059         interface types.
11060         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11061         interface types; `Object' is always a valid supertype.
11063 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11065         Fix for PR gcj/33:
11066         * jv-scan.c (help): Document --encoding.
11067         (options): Added `encoding' entry.
11068         (OPT_ENCODING): New define.
11069         (main): Handle --encoding.
11070         Include <langinfo.h> if nl_langinfo exists.
11071         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11072         --encoding.
11073         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11074         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11075         argument.  Use nl_langinfo to determine default encoding.
11076         * java-tree.h (current_encoding): Declare.
11077         * parse.y (java_parser_context_restore_global): Don't restore
11078         `finput'.
11079         (java_parser_context_save_global): Don't set `finput' field.
11080         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11081         if required.
11082         * lang.c (current_encoding): New global.
11083         (lang_decode_option): Recognize `-fencoding='.
11084         (finish_parse): Don't close finput.
11085         * parse.h (struct parser_ctxt): Removed `finput' and
11086         `unget_utf8_value' fields.  Added `lexer' field.
11087         (java_init_lex): Fixed declaration.
11088         * lex.c (java_new_lexer): New function.
11089         (java_destroy_lexer): Likewise.
11090         (java_read_char): Added `lex' argument.  Handle iconv case.
11091         (java_read_unicode): Added `lex' argument.  Count backslashes in
11092         lexer structure.
11093         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11094         `lexer' field in ctxp.
11095         (BAD_UTF8_VALUE): Removed.
11096         (java_lex): Handle seeing UEOF in the middle of a string literal.
11097         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11098         (java_lexer): New structure.
11099         (UNGETC): Removed.
11100         (GETC): Removed.
11101         (DEFAULT_ENCODING): New define.
11102         (java_destroy_lexer): Declare.
11104 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11106         Fix for PR gcj/343:
11107         * lex.c (java_init_lex): Initialize java_io_serializable.
11108         * parse.y (java_io_serializable): New global.
11109         (valid_ref_assignconv_cast_p): An array can be cast to
11110         serializable.
11112 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11114         * decl.c, expr.c: Include defaults.h if not already included.
11115         Don't define the *_TYPE_SIZE macros.
11117 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11119         * typeck.c (build_java_array_type): Correct first parameter
11120         in ADJUST_FIELD_ALIGN invocation.
11122 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11124         * lang-specs.h: Also recognize `-femit-class-files'.
11126 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11128         * verify.c (merge_types): Load the types to merge if necessary.
11130 2000-09-02  Anthony Green  <green@redhat.com>
11132         * jcf-io.c: Include zlib.h.
11133         (open_in_zip): Read compressed class file archives.
11134         * zipfile.h (ZipDirectory): Add uncompressed_size and
11135         compression_method fields.
11136         * zextract.c (read_zip_archive): Collect file compression info.
11138 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11140         * parse.y (do_resolve_class): Also explore superclasses of
11141         intermediate enclosing contexts when searching for inner classes.
11143 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11145         * parse.y (variable_declarator_id:): Better error message.
11146         (expression_statement:): Use YYNOT_TWICE.
11147         (cast_expression:): Likewise.
11148         (assignment:): Likewise.
11150 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11152         * parse.y (do_merge_string_cste): New locals. Create new
11153         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11155 2000-08-07  Hans Boehm  <boehm@acm.org>
11157         * boehm.c (mark_reference_fields): Set marking bits for all words in
11158         a multiple-word record.
11159         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11160         java.lang.Class.
11162 2000-08-31  Mike Stump  <mrs@wrs.com>
11164         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11165         jcf-dump$(exeext)): Make parallel safe.
11167 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11169         * jcf-parse.c (set_source_filename): Constify a char *.
11170         * jcf-write.c (append_innerclasses_attribute,
11171         make_class_file_name): Constify a char *.  Don't recycle a
11172         variable for an unrelated purpose.
11173         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11174         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11176 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11178         * expr.c (can_widen_reference_to): Fixed indentation.
11179         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11180         * parse.y: `finit$' replaces `$finit$' in comments.
11181         (try_builtin_assignconv): Fixed leading comment.
11183 2000-08-25  Greg McGary  <greg@mcgary.org>
11185         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11187 2000-08-24  Greg McGary  <greg@mcgary.org>
11189         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11190         * parse.y (BINOP_LOOKUP): Likewise.
11192 2000-08-22  Andrew Haley  <aph@cygnus.com>
11194         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11195         sign extending. Fixes gcj/321.
11196         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11197         combining to make a jlong. Fixes gcj/321.
11199 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11201         * lang-specs.h: Do not process -o or run the assembler if
11202         -fsyntax-only.
11204 2000-08-16  Andrew Haley  <aph@cygnus.com>
11206         * typeck.c (build_java_array_type): Rewrite code to do array
11207         alignment.  Take into account back-end macros when aligning array
11208         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11209         user to set alignment. Fixes gcj/252 and 160.
11211 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11213         * parse.y (check_abstract_method_definitions): Now return `int'.
11214         Check implemented interfaces.  Fixes PR gcj/305.
11216         * parse.y (patch_switch_statement): Disallow `long' in switch
11217         expressions.  Fixes PR gcj/310.
11219 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11221         * decl.c (finit_leg_identifier_node): New global.
11222         (init_decl_processing): Use `finit$' to initialize
11223         finit_identifier_node. Use `$finit$' to initialize
11224         finit_leg_identifier_node.
11225         * expr.c (expand_java_field_op): Use ID_FINIT_P.
11226         * java-tree.h (finit_identifier_node): Changed attached comment.
11227         (finit_leg_identifier_node): New declaration.
11228         (ID_FINIT_P): Take finit_identifier_node and
11229         finit_leg_identifier_node into account. This is a backward
11230         compatibility hack.
11232 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11234         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11235         Jan 6 2000 patch.
11236         (generate_bytecode_insns): Check `nargs' before emitting it.
11237         * verify.c (merge_type_state): Fixed typo.
11238         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11239         generate_bytecode_{conditional,insns}.
11241 2000-08-13  Anthony Green  <green@redhat.com>
11243         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11244         for -pg builds).
11246 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11248         * class.c (maybe_layout_super_class): Fixed indentation.
11249         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11250         (java_check_methods): New function declaration.
11251         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11252         instead of `str_ptr'.
11253         * jcf-write.c (generate_bytecode_insns): Emit number the of args
11254         of a `invokeinterface' at the right time.
11255         * parse.h (WFL_STRIP_BRACKET): New macro.
11256         (SET_TYPE_FOR_RESOLUTION): Use it.
11257         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11258         (check_class_interface_creation): Don't check for cross package
11259         innerclass name clashes.
11260         (method_header): Behave properly if MDECL is `error_mark_node'.
11261         (method_declarator): Return `error_mark_node' if bogus current
11262         class.
11263         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11264         (resolve_and_layout): New local `decl_type', set and used. Call
11265         java_check_methods.
11266         (java_check_methods): New method.
11267         (java_layout_classes): Use it.
11268         (resolve_qualified_expression_name): No EH check necessary in
11269         access$<n>.
11270         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11271         `case' statement.
11272         (patch_assignment): Set DECL_INITIAL on integral final local.
11274 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11276         * java-tree.h (flag_extraneous_semicolon): New extern.
11277         * lang-options.h: (-Wextraneous-semicolon): New option.
11278         * lang.c (flag_redundant): Fixed typo in leading comment.
11279         (flag_extraneous_semicolon): New global.
11280         (lang_decode_option): Set `flag_extraneous_semicolon' when
11281         -Wall. Decode `-Wextraneous-semicolon'.
11282         * parse.y (type_declaration:): Removed `SC_TK' hack, added
11283         `empty_statement' rule.
11284         (class_body_declaration): Likewise.
11285         (method_body:): Accept `;' as a method body.
11286         (static_initializer:): Removed `SC_TK' hack.
11287         (constructor_block_end:): Likewise.
11288         (empty_statement:): Report deprecated empty declaration. Fixes
11289         gcj/295
11291 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11293         * parse.y (build_dot_class_method_invocation): Changed parameter
11294         name to `type'. Build signature from `type' and convert it to a
11295         STRING_CST if it's an array.
11296         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11297         to use `ref_type' directly.
11299 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
11301         * lang-options.h: Added a comma after the last element to avoid
11302         syntax errors when other languages define additional options.
11304 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11306         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11307         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11308         (jc1): Link with $(BACKEND).
11309         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11311 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11313         * jvspec.c: Adjust type of second argument to
11314         lang_specific_driver, and update code as necessary.
11316         * class.c (build_dtable_decl): Initialize dummy.
11318 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11320         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11321         method bodies not to rule out discarding `<clinit>'; don't use
11322         <clinit> to initialize static fields with constant initializers.
11324 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11326         * gjavah.c (print_method_info): Added `synth' parameter. Skip
11327         synthetic methods.
11328         (method_synthetic): New global.
11329         (HANDLE_METHOD): Recognize synthetic method and tell
11330         `print_method_info' about it.
11331         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11332         processing a synthetic method.
11333         * jcf-reader.c (skip_attribute): New function.
11334         ( skip_attribute): Likewise.
11336 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11338         * parse.y (build_outer_field_access): Fixed comments.
11339         (fix_constructors): Emit the initialization of this$<n> before
11340         calling $finit$.
11341         (resolve_qualified_expression_name): Build an access to `decl' if
11342         necessary.
11344 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11346         * parse-scan.y (curent_class): Non longer const.
11347         (inner_qualifier, inner_qualifier_length): Deleted.
11348         (current_class_length): New global.
11349         (bracket_count): Fixed typo in leading comment.
11350         (anonymous_count): New global.
11351         (class_instance_creation_expression:): Handle anonymous classes.
11352         (anonymous_class_creation:): New rule.
11353         (push_class_context): Rewritten.
11354         (pop_class_context): Likewise.
11355         (INNER_QUALIFIER): Macro deleted.
11356         (report_class_declaration): call `push_class_context' when
11357         entering the function. `fprintf' format modified not to use
11358         INNER_QUALIFIER.
11359         (report_class_declaration): Assign `package_name' and
11360         `current_class' to NULL separately.
11362 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11364         * expr.c (build_invokeinterface): Call layout_class_methods on
11365         target interface.
11367 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11368             Anthony Green  <green@cygnus.com>
11369             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11371         * class.c (make_class_data): Create vtable for abstract classes.
11372         (get_dispatch_table): Changed to cope with abstract classes.
11374 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11376         * parse.y (patch_method_invocation): Don't reverse the argument
11377         list when dealing with anonymous class constructors. Fixed typo in
11378         comment.
11380 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11382         * parse.y (build_alias_initializer_parameter_list): Reverse
11383         crafted list when building aliases for anonymous class
11384         constructors.
11386 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11388         * parse.y (jdep_resolve_class): Don't bother checking potential
11389         innerclass access if `decl' is NULL.
11390         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11391         WFL.
11393 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11395         * parse.c: Remove (again.)
11397 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11399         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11400         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
11401         outside the `if' statement, alias to innerclass removed, `decl'
11402         used to mark the class complete.
11404 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11406         * parse.y (simple_name:): Fixed typo in error message.
11408 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11410         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11411         or its first operand can be error marks.
11413 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11415         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11416         * parse.y (method_header): Likewise.
11418 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11420         * parse.y (process_imports): Consider that one might be trying to
11421         import an innerclass. Fixes gcj/254
11423 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11425         * parse.y (find_as_inner_class): Handle the case where the
11426         enclosing context of an innerclass has been loaded as bytecode.
11428 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11430         * parse.y (simple_name:): Reject `$' in type names.
11431         (resolve_type_during_patch): Use `type' as a second
11432         argument to resolve_no_layout. Fixes gcj/257.
11434 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
11436         * parse.y (find_most_specific_methods_list): Select the only
11437         non-abstract method even if max has been set.
11438         Fixes gcj/285, gcj/298.
11440 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
11442         * lang-specs.h: Added %(jc1) to java compiler options.
11444 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11446         * .cvsignore: New file.
11448 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11450         * parse.y (not_accessible_p): Access granted to innerclasses
11451         (indirectly) extending the reference type. Fixes gcj/249.
11453 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11455         * parse.y (patch_method_invocation): Fixed comment.
11456         (maybe_use_access_method): Build this$<n>s to the context of the
11457         target method, or a type that extends it. Fixes gcj/242.
11459 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11461         * parse.c: Remove.
11463 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11465         * parse.y (fold_constant_for_init): Avoid bullish conversion.
11467 2000-07-13  Tom Tromey  <tromey@cygnus.com>
11469         * lang-specs.h: Added %{I*}.
11471 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11473         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11475 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11477         * parse-scan.c: Remove.
11479 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11481         * class.c (set_super_info): Handled protected inner classes.
11482         (common_enclosing_context_p): Bail early if arguments aren't both
11483         inner classes.
11484         (get_access_flags_from_decl): Handle private and protected inner
11485         classes.
11486         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
11487         (CLASS_PROTECTED): Likewise.
11488         (struct lang_type): New bitfield `poic'.
11489         * parse.y (jdep_resolve_class): Call check_inner_class_access on
11490         inner classes only.
11491         (check_inner_class_access): Renamed arguments, added
11492         comments. Handles protected inner classes (fixes gcj/225)
11493         (not_accessible_p): Fixed comments. Avoid handling inner classes.
11495 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11497         * parse.y (resolve_qualified_expression_name): Verify qualified
11498         access to `this'. Fixes gcj/239.
11500 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11502         * jcf-write.c (generate_classfile): Don't install ConstantValue
11503         for null pointers.
11505 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11507         * parse.y (resolve_qualified_expression_name): Handle inner class
11508         access. Fixes gcj/256.
11510 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11512         * jcf-write.c (generate_classfile): Properly install the
11513         ConstantValue attribute and the initial value constant pool index
11514         on string constants.
11515         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
11516         class files.
11518 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11520         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
11521         construct.
11522         * parse.y (find_as_inner_class): Fixed typo.
11523         (do_resolve_class): Explore enclosing contexts when searching for
11524         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
11525         (check_inner_class_access): Check `decl' which can be null in case
11526         of previous errors.
11528 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11530         * java-tree.h (java_debug_context): Declared `extern'.
11531         (safe_layout_class): Likewise.
11532         * parse.y (resolve_field_access): Field must be `static' in order
11533         to be replaced by its initial value. Added comments.
11534         (find_applicable_accessible_methods_list): Fixed typo.
11535         (find_most_specific_methods_list): Methods found in innerclasses
11536         take over methods founds in the enclosing contexts.
11537         (java_complete_tree): Loosen restrictions on the type of DECLs
11538         that can be replaced by their initialization values.
11539         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
11541 2000-07-05  Tom Tromey  <tromey@cygnus.com>
11543         * Make-lang.in (PARSE_DIR): New macro.
11544         (PARSE_RELDIR): Likewise.
11545         (PARSE_C): Likewise.
11546         (PARSE_SCAN_C): Likewise.
11547         ($(PARSE_C)): New target.
11548         ($(PARSE_SCAN_C)): Likewise.
11549         (SET_BISON): New macro.
11550         (BISONFLAGS): Likewise.
11551         (JAVABISONFLAGS): Likewise.
11553 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
11555         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
11556         argument on the first pass for CNI as well as JNI.
11557         (print_method_info): Set up method name on the first pass only.
11559 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11561         * parse.y (parser_qualified_classname): Removed parameter
11562         `is_static'.
11563         (create_interface): Removed first passed parameter to
11564         parser_qualified_classname.
11565         (create_class): Likewise. Don't install alias on static
11566         innerclasses. Fixes gcj/275.
11568 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11570         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
11571         debugable statement with empty_stmt_node. Fixes gcj/272
11573 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11575         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
11576         gcj/271.
11578 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11580         * jcf-write.c (push_long_const): Appropriately cast short negative
11581         constant to jword.
11583 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11585         * parse.y (verify_constructor_super): Use loop variable
11586         `m_arg_type' initialized with `mdecl_arg_type'.
11588 2000-06-29  Tom Tromey  <tromey@cygnus.com>
11590         * parse.y (resolve_field_access): Handle case where `type_found'
11591         is NULL.
11593 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11595         * expr.c (lookup_field): The same field can be found through two
11596         different interface. Don't declare it ambiguous in that case.
11598 2000-06-27  Tom Tromey  <tromey@cygnus.com>
11600         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
11601         follows \r, then unget it at a lower level.
11603 2000-06-26  Tom Tromey  <tromey@cygnus.com>
11605         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
11606         java_complete_tree.
11608 2000-06-25  Tom Tromey  <tromey@cygnus.com>
11610         * parse.y (for_statement): Wrap expression in a WFL if it is a
11611         constant.  For PR gcj/268.
11613 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11615         * parse.y (do_resolve_class): Minor optimiztion in the package
11616         list search. Removed unnecessary test and return statement.
11617         (valid_ref_assignconv_cast_p): Order of arguments to
11618         enclosing_context_p fixed.
11620 2000-06-24  Tom Tromey  <tromey@cygnus.com>
11622         * expr.c (lookup_field): Print error and return error_mark_node if
11623         field reference is ambiguous.
11625         * parse.y (check_abstract_method_definitions): Also check if
11626         `other_method' is abstract.
11628 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11630         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
11631         classes.
11632         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
11633         (struct lang_type): New field `pic'.
11634         (CLASS_PRIVATE): New macro.
11635         * parse.y (check_inner_class_access): New function.
11636         (jdep_resolve_class): Call it.
11638 2000-06-23  Tom Tromey  <tromey@cygnus.com>
11640         * parse.y (patch_incomplete_class_ref): Initialize the returned
11641         class.  For PR gcj/260.
11643 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11645         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
11647 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11649         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11650         Java specific checks.
11651         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
11652         screened by DECL_P.
11653         * java-tree.def (CASE_EXPR): Marked 'e'.
11654         (DEFAULT_EXPR): Likewise.
11655         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
11656         screened by DECL_P.
11657         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11658         Java specific checks.
11659         (generate_bytecode_insns): Test try_block for BLOCK before using
11660         BLOCK_EXPR_BODY.
11661         * parse.y (build_wfl_wrap): Added `location' argument. Set
11662         EXPR_WFL_LINECOL accordingly.
11663         (dim_expr:): Wrap constants with WFLs.
11664         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
11665         (resolve_package): Check for `stmt' not being a BLOCK before
11666         building a debuggable statement with it.
11667         (make_qualified_primary): Added extra parameter to build_wfl_wrap
11668         invocation.
11669         (resolve_field_access): Make sure `decl' is a DECL before treating
11670         it as such.
11671         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
11672         IDENTIFIER_NODE before treating it as such.
11673         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
11674         treating it as such.
11675         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
11676         to be applied only on non array types.
11678 2000-06-16  Per Bothner  <per@bothner.com>
11680         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
11681         define in terms of DECL_RESULT, as that fails when --enable-checking.
11683 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11685         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
11686         types the same in comparison.
11687         (CHECK_OP): Add static prototype.
11689 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11691         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
11692         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
11693         * parse.c: Rebuilt.
11695 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11697         * decl.c (create_primitive_vtable): Prototype.
11699         * jcf-write.c (generate_bytecode_insns): Initialize variable
11700         `saved_context'.
11702         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
11704 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11706         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
11707         to track searched classes, and do not search the same class more than
11708         once. Call find_applicable_accessible_methods_list on immediate
11709         superclass, instead of search_applicable_method_list on all ancestors.
11710         Fix for PR gcj/238.
11712 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11714         * parse.y (register_fields): Permit static fields in inner classes
11715         if they are final. Fix for PR gcj/255.
11717 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11719         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
11720         * parse.y (find_in_imports): Returned type changed to void,
11721         leading comment fixed.
11722         (register_package): New function.
11723         (qualify_and_find): Likewise.
11724         (package_declaration:): Use `register_package'.
11725         (single_type_import_declaration:): Removed local variable
11726         `node'. Added missing `;' for consistency.
11727         (type_import_on_demand_declaration:): Use `chainon' to link new
11728         entries.
11729         (lookup_field_wrapper): Lookup local variables defined in outer
11730         contexts first.
11731         (java_complete_class): Don't reverse the list of imported on demand.
11732         (do_resolve_class): Reorganized. Removed local variable
11733         `original_name'. Call `qualify_and_find' with the current package
11734         name, invoke `find_in_imports_on_demand' right after. Call
11735         `qualify_and_find' with the packages we've seen so far. Fixed
11736         operations numbering in comments.
11737         (java_expand_class): Don't reverse `package_list'.
11738         (find_most_specific_methods_list): New local variables `abstract'
11739         and `candidates'. Use them to pick the right method.
11741 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
11743         * parse.y (check_modifiers_consistency): Don't subtract out
11744         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
11746 2000-06-04  Philipp Thomas  <pthomas@suse.de>
11748         * Makefile.in (INTLLIBS): New.
11749         (LIBS): Add above.
11750         (DEPLIBS): Ditto.
11752 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11754         * class.c (get_dispatch_table): Build the vtable dummy entry list
11755         element with a null purpose. Fixed leading comment.
11756         (build_dtable_decl): Build an accurate dtable type when appropriate
11757         and use it.
11759 2000-06-02  Richard Henderson  <rth@cygnus.com>
11761         * lang.c (lang_get_alias_set): New.
11763 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11765         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
11766         before using it as the accessed field.
11768 2000-05-31  Tom Tromey  <tromey@cygnus.com>
11770         * java-tree.h (boolean_array_vtable, byte_array_vtable,
11771         char_array_vtable, short_array_vtable, int_array_vtable,
11772         long_array_vtable, float_array_vtable, double_array_vtable):
11773         Declare.
11774         * expr.c (get_primitive_array_vtable): New function.
11775         (create_primitive_vtable): New function.
11776         (java_lang_expand_expr): Enable code to statically generate
11777         arrays.
11778         * decl.c (init_decl_processing): Create primitive vtables.
11779         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
11780         short_array_vtable, int_array_vtable, long_array_vtable,
11781         float_array_vtable, double_array_vtable): Define.
11783 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
11785         * java/parse.y (find_applicable_accessible_methods_list):
11786         Don't add an uninitialized value to the list.
11788 2000-05-25  Tom Tromey  <tromey@cygnus.com>
11790         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
11791         when trying to see if field's class should be initialized.  Always
11792         initialize field's declaring class, not qualified class.
11793         For PR gcj/162.
11795         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
11796         `wfl_operator', to maybe_build_primttype_type_ref.
11797         Fixes PR gcj/235.
11799 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
11801         * parse.y (patch_method_invocation): Don't try to lookup methods
11802         in primitive types.
11804 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11806         * parse.y (resolve_field_access): Call the appropriate <clinit>
11807         before accessing the length of a static array. Craft a decl for
11808         the field while its time. Fixes PR gcj/129.
11810 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11812         * parse.y (resolve_package): Correctly set `*next' (was off by
11813         one.)
11814         (resolve_qualified_expression_name): Fixed comment.
11816 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11818         * jcf-parse.c (jcf_parse_source): Reset current_class and
11819         current_function_decl to NULL before parsing a new file.
11821 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11823         * parse.y (block_end:): If the collected block doesn't feature a
11824         statement, insert an empty statement.
11826 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11828         * parse.y (maybe_yank_clinit): New function.
11829         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
11830         end of the list of methods belonging to a class.
11831         (java_complete_expand_method): Check whether <clinit> is really
11832         necessary and expand it accordingly.
11834 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11836         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
11837         processed by the method's switch statement.
11839 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11841         * java-tree.h: Added init state enum.
11842         * decl.c (emit_init_test_initialization): Initialize class
11843         initialization check variable by looking at class' state.
11845 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11847         * java-tree.h (build_instanceof): Declare.
11848         (build_get_class): Declare.
11849         * parse.y (patch_binop): Use build_instanceof.
11850         * expr.c (build_instanceof): New function.  If class is final,
11851         don't make a function call.
11852         (expand_java_INSTANCEOF): Use it.
11853         (build_get_class): New function.
11855 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
11857         * jcf-write.c (generate_classfile): Scan the source_file for
11858         slashes with the right pointer variable.
11860 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
11862         * lang.c (lang_decode_option): Update -Wunused flags by calling
11863         set_Wunused.
11864         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
11866 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
11868         * check_init.c (check_init): Constify local char *.
11869         * class.c (push_class): Constify local char *.
11870         * java_tree.h: Update prototypes.
11871         * jcf-io.c (open_class): Constify filename parameter and
11872         return value.
11873         (find_class): Remove redundant string copy.  Cast return from
11874         open_class.
11875         * jcf-parse.c (read_class, parse_class_file, yyparse):
11876         Constify local char *.
11877         * jcf-write.c (generate_bytecode_insns, generate_classfile):
11878         Constify local char *.
11879         * jcf.h (JCF): Constify filename and classname.
11880         (JCF_FINISH): Cast args to FREE to char * when appropriate.
11881         * lang.c (init_parse): Constify parameter and return value.
11882         * lex.c (java_get_line_col): Constify filename parameter.
11883         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
11884         * parse.y (java_parser_context_suspend,
11885         issue_warning_error_from_context, safe_layout_class): Constify
11886         local char *.
11887         * parse.c: Regenerate.
11889 2000-05-08  Tom Tromey  <tromey@cygnus.com>
11891         * expr.c (build_jni_stub): Cache the result of
11892         _Jv_LookupJNIMethod.
11894 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11896         * decl.c (predef_filenames_size): Now 7.
11897         (predef_filenames): New seventh entry.
11899 2000-05-04  Tom Tromey  <tromey@cygnus.com>
11901         * boehm.c (mark_reference_fields): Don't mark RawData fields.
11902         Keep track of when we've seen a reference field after a
11903         non-reference field.
11904         (get_boehm_type_descriptor): Handle case where we see
11905         non-reference fields but no trailing reference field.
11906         * decl.c (rawdata_ptr_type_node): Define.
11907         (init_decl_processing): Initialize rawdata_ptr_type_node.
11908         * java-tree.h (rawdata_ptr_type_node): Declare.
11910 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11912         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
11913         specifiers in calls to fprintf.
11915 2000-05-03  Andrew Haley  <aph@cygnus.com>
11917         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
11919         * javaop.h (WORD_TO_INT): New function.
11920         (IMMEDIATE_s4): Use WORD_TO_INT.
11921         * jcf.h (JPOOL_INT): Ditto.
11923         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
11924         separator.
11926 2000-04-19  Tom Tromey  <tromey@cygnus.com>
11928         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
11929         on native function.
11930         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
11931         JNI methods.
11932         * expr.c (build_jni_stub): New function.
11933         * lang-specs.h: -fjni and -femit-class-file are incompatible.
11934         * parse.c: Rebuilt.
11935         * parse.y (java_complete_expand_methods): Expand a native method
11936         and call build_jni_stub if -fjni given.
11937         * lang-options.h: Document -fjni.
11938         * lang.c (flag_jni): New global.
11939         (lang_f_options): Added `jni' entry.
11940         * java-tree.h (soft_lookupjnimethod_node,
11941         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
11942         Declare.
11943         (flag_jni): Declare.
11944         (build_jni_stub): Declare.
11945         (struct lang_decl): Added `native' flag.
11946         (METHOD_NATIVE): Redefined to use `native' field of lang specific
11947         structure.
11948         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
11949         soft_jnipopsystemframe_node): New globals.
11950         (init_decl_processing): Set them.  _Jv_InitClass only takes one
11951         argument.
11953         * java-tree.def: Put into `C' mode.
11955 2000-04-27  Tom Tromey  <tromey@cygnus.com>
11957         Fix for PR gcj/2:
11958         * expr.c (expand_invoke): Generate check to see if object pointer
11959         is null in nonvirtual invocation case.
11960         * java-tree.h (soft_nullpointer_node): Declare.
11961         * decl.c (soft_nullpointer_node): New global.
11962         (init_decl_processing): Initialize soft_nullpointer_node.
11963         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
11964         or `private' methods.
11965         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
11967 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11969         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11970         from <clinit>
11972 2000-04-26  Tom Tromey  <tromey@cygnus.com>
11974         * zextract.c (find_zip_file_start): New function.
11975         (read_zip_archive): Use it.
11977 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11979         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
11981 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11983         * class.c (common_enclosing_context_p): New function.
11984         * java-tree.h (common_enclosing_context_p): Added prototype.
11985         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
11986         classes sharing an outer context with the current instance.
11987         * parse.y (build_access_to_thisn): Fixed leading comment.
11988         (verify_constructor_super): New local `supper_inner'. Skip
11989         enclosing context argument in the case of inner class constructors.
11990         (patch_method_invocation): Insert proper context as second
11991         parameter to pure inner class constructor super invocations.
11993 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11995         * parse.y (end_class_declaration): Reset the interface number
11996         counter.
11998 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12000         * parse.y (source_start_java_method): Deleted unnecessary code.
12001         (patch_method_invocation): Fixed comment.
12003 2000-04-24  Robert Lipe <robertlipe@usa.net>
12005         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12007 2000-04-23  Tom Tromey  <tromey@cygnus.com>
12009         * boehm.c (mark_reference_fields): Use int_byte_position.
12011 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12013         * boehm.c (mark_reference_fields): Only call byte_position on
12014         non-static fields.
12016 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12018         * boehm.c (mark_reference_fields): Added `last_view_index'
12019         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
12021 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
12023         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12024         * parse.y (check_class_interface_creation): Fixed comments. Select
12025         permitted modifiers for (inner) interfaces. Changed error message
12026         to report rejected modifiers used with local classes.
12028 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12030         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12031         of directly inherited type considered in scope.
12032         * parse.y (do_resolve_class): Search inherited classes for inner
12033         classes.
12035 2000-04-20  Tom Tromey  <tromey@cygnus.com>
12037         * parse.y (not_accessible_p): Use member's class, not current
12038         class, when doing inheritance check for protected reference.
12039         Fixes PR gcj/124.
12041 2000-04-20  Jason Schroeder  <shrode@subnature.com>
12043         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12045 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12047         * parse.y (lookup_field_wrapper): Search for final local aliases.
12048         (resolve_expression_name): Let lookup_field_wrapper search for
12049         final local aliases. Force the value of `name' if one is found.
12050         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12051         an expression name. Fixed comments.
12053 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12055         * parse.y (yyerror): `msg' can be null, don't use it in that case.
12057 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12059         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12061 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12063         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12065 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12067         PR gcj/211:
12068         * gjavah.c (utf8_cmp): Changed return value.
12069         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12070         result.
12071         (cxx_keywords): New global.
12072         (get_field_name): Handle new result of cxx_keyword_subst.
12073         (print_method_info): Likewise.
12075 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12077         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12078         with a newline, for CNI.
12079         (print_stub_or_jni): Print a space or newline before method name for
12080         CNI as well as JNI.
12081         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12082         (process_file): Include gcj/cni.h if generating CNI stubs.
12084 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12086         * gjavah.c (decompile_method): Use print_field_name.
12087         Fixes PR gcj/205.
12089 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12091         * parse.y (java_expand_classes): Reverse the package list once.
12092         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12093         reduction.
12094         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12095         the `==' and `!=' operators.
12097 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12099         * jcf-write.c (generate_bytecode_insns): At invocation time,
12100         always relate an interface method to the type of its selector.
12102 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12104         Fix for PR gcj/2:
12105         * expr.c (expand_invoke): Generate check to see if object pointer
12106         is null in nonvirtual invocation case.
12107         * java-tree.h (soft_nullpointer_node): Declare.
12108         * decl.c (soft_nullpointer_node): New global.
12109         (init_decl_processing): Initialize soft_nullpointer_node.
12110         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12111         or `private' methods.
12112         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12114 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12116         Fix for PR gcj/140:
12117         * parse.y (check_final_assignment): Recognize assignments to the
12118         `length' field of an array when generating class files.
12120 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12122         * class.c (decl_hash): Prototype removed.
12123         (decl_compare): Likewise.
12125 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12127         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12128         * parse.y (check_modifiers_consistency): Check for final/volatile
12129         clash.  Fixes PR gcj/164.
12131 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12133         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12134         made global.
12135         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12136         global.
12137         (add_method_1): Use `java_hash_hash_tree_node' and
12138         `java_hash_compare_tree_node'.
12139         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12140         (java_hash_compare_tree_node): Likewise.
12141         * parse.y (find_applicable_accessible_methods_list): Create,
12142         delete and use a hash table to remember already searched interfaces.
12144 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12146         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12147         with latest entry.
12149 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12151         * boehm.c (mark_reference_fields, set_bit): Prototype.
12152         (set_bit): Un-ANSI-fy definition.
12154         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12155         Prototype.
12157         * decl.c (emit_init_test_initialization): Likewise.
12159         * gjavah.c (jni_print_char): Likewise.
12161         * parse.y (create_new_parser_context): Likewise.
12163 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12165         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12166         patch missing hunk. Fixed indentation.
12168 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12170         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12171         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12173 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12175         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12176         when negative *before* using it as an array index.
12177         * ChangeLog: Fixed typo.
12179 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12181         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12182         to 0 when it reaches -1.
12184 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12186         * jcf-parse.c (get_constant): Properly cast `num' during the
12187         invocation of `add_double'.
12188         * jcf-write.c (push_long_const): Properly cast `lo' before
12189         comparing it to short bounds.
12190         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12191         `interface_body:' is reduced after the current interface is
12192         pushed.
12194 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12196         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12197         Java-specific `-f' option.
12199 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12201         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12202         Adjust order of making types.
12203         Make bitsize_*_node values.
12205 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12207         * class.c (make_field_value): Use byte_position.
12208         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12209         (java_array_data_offset): Likewise.
12210         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12211         bzero call.
12213 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12215         * parse.y (check_abstract_method_definitions): New local
12216         `end_type_reached'. Make sure we also consider `end_type'.
12217         (java_check_abstract_method_definitions): Make sure we eventually
12218         consider `java.lang.Object'.
12219         (maybe_use_access_method): Don't use access method if not in the
12220         context of a pure inner class or if the method's context is right.
12221         (find_applicable_accessible_methods_list): New static flag
12222         `object_done'. Don't search abstract classes as interfaces. Fixed
12223         indentation. Fixed the `java.lang.Object' only search. Search
12224         class interface(s) first, then fully search enclosing contexts.
12225         (find_most_specific_methods_list): Pick the closest candidate when
12226         they're all abstract.
12228 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12230         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12231         properly initialize `finished_label'. Don't emit gotos for empty
12232         try statements.
12234 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12236         * except.c (emit_handlers): Clear catch_clauses_last.
12238 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12240         * parse.y (check_method_types_complete): New function.
12241         (create_class): Reset anonymous class counter only when seeing an
12242         non inner classe.
12243         (java_complete_class): JDEP_METHOD: Don't recompute signature
12244         if incomplete.
12246 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12248         * class.c (build_static_ref): Fixed indentation in comment.
12249         * java-tree.def (TRY_EXPR): Fixed typo in name.
12250         (CLASS_LITERAL): Likewise.
12251         * java-tree.h: (TYPE_DOT_CLASS): New macro.
12252         (struct lang_type): New field `dot_class'.
12253         * jcf-write.c (generate_bytecode_insns): Fixed error message.
12254         (generate_classfile): Method `class$' is synthetic.
12255         * parse.y (build_do_class_method): New function.
12256         (build_dot_class_method_invocation): Likewise.
12257         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12258         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12259         (qualify_ambiguous_name): Likewise.
12260         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12261         (build_try_statement): Fixed leading comment.
12263 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12265         * class.c (make_field_value): Properly handle sizes.
12266         (get_dispatch_vector): Use tree_low_cst and host_integerp.
12267         (layout_class_method): Count using trees.
12268         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12269         * expr.c (java_array_data_offset): Use int_bit_position.
12270         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12271         (build_invokevirtual): Use tree_low_cst and do computations with trees.
12273 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12275         * lang.c (flag_hash_synchronization): New global.
12276         (lang_f_options): Added `hash-synchronization'.
12277         * lang-options.h: Mention -fhash-synchronization.
12278         * java-tree.h (flag_hash_synchronization): Declare.
12279         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12280         hash table synchronization is disabled.
12281         * decl.c (init_decl_processing): Only push `sync_info' value when
12282         hash table synchronization is disabled.
12283         * class.c (make_class_data): Only push `sync_info' field when hash
12284         table synchronization is disabled.  Removed dead code.
12286 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12288         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12290 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12292         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12293         classes.
12294         * parse.y (patch_method_invocation): Handle anonymous classes
12295         creation in static context.
12297 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12299         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12300         * parse.y (resolve_qualified_expression_name): Use it.
12301         (patch_method_invocation): Likewise.
12303 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12305         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12306         depending on the type of dependency which dictates what the
12307         current class is.
12308         (unresolved_type_p): Resolved types limited to the current class.
12310 2000-03-15  Tom Tromey  <tromey@cygnus.com>
12312         * decl.c (init_decl_processing): Set type of `sync_info' to be
12313         pointer to Object.
12315         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12316         Correctly compute bit number for current slot.  Zero `high' and
12317         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
12318         mark_reference_fields.
12319         (mark_reference_fields): New function.
12321 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12323         * parse.y (register_incomplete_type): Fixed initialization of
12324         JDEP_ENCLOSING.
12326 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12328         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12329         static globals.
12330         (push_class_context, pop_class_context): New function.
12331         (class_body:): Call pop_class_context.
12332         (interface_body:): Likewise.
12333         (INNER_QUALIFIER): New macro.
12334         (report_class_declaration): Changed output format and use
12335         INNER_QUALIFIER. Call push_class_context.
12337 2000-02-14  Andrew Haley  <aph@cygnus.com>
12339         * check-init.c (check_init): Add new cases for unary and binary
12340         tree nodes.
12342 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12344         * parse.y (resolve_package): Set `next' once a type name has been
12345         progressively discovered.
12346         (resolve_qualified_expression_name): Propagate resolution only if
12347         there are remaining qualifiers. Take into account `q' might have
12348         been cleared after re-qualification.
12349         * parse.y (patch_method_invocation): New local `resolved'.
12350         Section dealing with qualified expression rewritten to use
12351         resolve_field_access.
12353 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12355         * parse.h (PUSH_CPC): Fixed indentation.
12356         (DEBUG_CPC): New macro.
12357         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12358         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12359         * parse.y (class_body_declaration:): Use
12360         SET_CPC_INSTANCE_INITIALIZER_STMT.
12361         (method_declaration:): Check for null current_function_decl.
12362         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12363         (java_parser_context_pop_initialized_field): Better handling of
12364         empty lists.
12365         (maybe_make_nested_class_name): Mark nested class name as
12366         qualified when necessary.
12367         (end_class_declaration): Don't call java_parse_context_resume when
12368         one or more error occurred.
12369         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12370         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12371         SET_CPC_INITIALIZER_STMT.
12372         (method_header): Check for inner classes declaring static methods.
12373         (resolve_qualified_expression_name): Handle situation where `this'
12374         is implied.
12376 2000-03-13  Hans Boehm <boehm@acm.org>
12378         * typeck.c (build_prim_array_type): Correctly set the high word too.
12380 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12382         * parse.y (java_complete_expand_methods): Leave <clinit> out of
12383         ordinary methods.
12384         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12385         list of methods for interfaces.
12387 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12389         * parse.y (qualify_ambiguous_name): Properly handle expressions
12390         using `null'.
12392 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12394         * parse.y (check_final_assignment): Extended to process
12395         COMPOUND_EXPR.
12396         (patch_assignment): Have check_final_assignment called only once.
12398 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12400         * java-tree.h (IS_INIT_CHECKED): New flag.
12401         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
12402         * parse.y (patch_string): Call force_evaluation_order on the
12403         completed string concatenation tree.
12404         * expr.c (force_evaluation_order): Call force_evaluation_order on
12405         function's arguments too.
12407 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12409         * decl.c (emit_init_test_initialization): Mark KEY as unused.
12410         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12411         (build_anewarray): Likewise.
12412         * parse.y (patch_newarray): Likewise.
12413         * parse.c: Regenerated.
12415 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
12417         * decl.c (init_decl_processing): Added new class fields `depth',
12418         `ancestors', and `idt' to class_type_node. Use
12419         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
12420         * class.c (make_class_data): Push initial values for new fields.
12421         * java-tree.h: Updated prototype for `build_invokeinterface'.
12422         * expr.c (build_invokeinterface): Changed parameters to accept
12423         `method' tree. Calculate index of `method' in its declaring
12424         interface. Build call to _Jv_LookupInterfaceMethodIdx.
12425         (expand_invoke): Call `build_invokeinterface' with new parameters.
12426         * parse.y (patch_invoke): Call `build_invokeinterface' with new
12427         parameters.
12429 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
12431         * typeck.c (lookup_do): Search superinterfaces first
12432         when looking up an interface method. From Godmar Back
12433         <gback@cs.utah.edu>
12435 2000-03-06  Tom Tromey  <tromey@cygnus.com>
12437         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12439 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12441         * java-tree.h (lookup_argument_method2): Declared.
12442         (safe_layout_class): Prototype moved from parse.h.
12443         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
12444         * parse.y (java_check_regular_methods): Local `super_class' gone.
12445         Call lookup_argument_method2 instead of lookup_argument_method.
12446         Perform modifier match for methods found declared in implemented
12447         interfaces. Fixed indentation problem. Overriding/hiding error
12448         report to take place only for methods found in classes.
12449         * typeck.c (lookup_argument_method): Changed leading
12450         comment. Re-written by calling lookup_do.
12451         (lookup_argument_method2): New function.
12452         (lookup_java_method): Re-written by calling lookup_do.
12453         (lookup_do): New function.
12455 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12457         * check-init.c (check_init): Removed dead code. Handle (blank)
12458         final variables.
12459         * parse.y (declare_local_variables): New local `final_p', set it
12460         and use it to initialize LOCAL_FINAL.
12461         (check_final_assignment): Only check FIELD_DECLs.
12463 2000-02-17  Tom Tromey  <tromey@cygnus.com>
12465         * Makefile.in (JAVA_OBJS): Added boehm.o.
12466         (boehm.o): New target.
12467         * Make-lang.in (JAVA_SRCS): Added boehm.c.
12468         * java-tree.h (flag_use_boehm_gc): Declare.
12469         (get_boehm_type_descriptor): Declare.
12470         * lang.c (lang_f_options): Added `use-boehm-gc'.
12471         (flag_use_boehm_gc): New global.
12472         * lang-options.h: Added -fuse-boehm-gc.
12473         * boehm.c: New file.
12474         * class.c (get_dispatch_table): If class uses a Boehm type
12475         descriptor, put it in the vtable.
12476         (make_class_data): Removed dead code.
12478 2000-03-03  Per Bothner  <per@bothner.com>
12480         * decl.c (init_decl_processing):  Initialize sizetype properly.
12482 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12484         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
12485         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
12486         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12487         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
12488         (jcf_parse): New local `current'. Load innerclasses seen in outer
12489         context being processed.
12490         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12491         * jcf-write.c (append_innerclasses_attribute): New function.
12492         (append_innerclasses_attribute_entry): Likewise.
12493         (get_access_flags): Handle static classes. Set anonymous and local
12494         classes to be private.
12495         (generate_classfile): Attribute count adjusted. Call
12496         append_innerclasses_attribute.
12497         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
12498         PURE_INNER_CLASS_TYPE_P.
12499         * parse.y (parser_qualified_classname): New parameter `is_static',
12500         produce non qualified name accordingly.
12501         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
12502         (create_interface): Added argument to parser_qualified_classname.
12503         (create_class): Added argument to parser_qualified_classname. Setup
12504         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
12505         (add_inner_class_fields): Fixed indentation.
12506         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
12507         (method_declarator): Fixed typo in comment.
12508         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
12509         (build_current_thisn): Likewise.
12510         (patch_method_invocation): Likewise.
12512 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12514         * decl.c (current_function_decl): Move to toplev.c.
12516 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12518         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
12519         (DECL_BIT_INDEX): Use underlying representation.
12520         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
12522 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12524         * expr.c (build_java_ret): Pass proper type to size_binop.
12526 2000-02-25  Anthony Green  <green@cygnus.com>
12528         * expr.c (build_class_init): Mark the decl to be ignored by
12529         check_init.
12530         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
12531         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
12532         * class.c (init_test_hash_newfunc): New function.
12533         (decl_hash): New function.
12534         (decl_compare): New function.
12535         * decl.c (emit_init_test_initialization): New function.
12536         (complete_start_java_method): Traverse the init test hashtable,
12537         calling emit_init_test_initialization.
12538         (always_initialize_class_p): Define.
12539         * expr.c (build_class_init): Use initialization tests when
12540         emitting class initialization code.
12541         (always_initialize_class_p): Declare.
12542         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
12543         1.
12544         * java-tree.h: Include hash.h.
12545         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
12546         (struct lang_decl): Add init_test_table field.
12547         (init_test_hash_entry): Define.
12549 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12551         * gjavah.c (main): Avoid using `argi' to report unimplemented
12552         options.
12554 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12556         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12557         initialize locals to avoid warnings. Local `exception_type' moved
12558         into if statement.
12560 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12562         * parse.y (resolve_expression_name): Use `orig' as a second
12563         argument to resolve_field_access.
12564         (resolve_field_access): Removed unnecessary code when dealing with
12565         static fields.
12567 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12569         * class.c (push_super_field): Don't push the field twice.
12570         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
12571         * parse.h (java_reorder_fields): Prototyped.
12572         * parse.y (java_reorder_fields): New function.
12573         (java_layout_class): Simplified not to worry about re-ordering.
12575 2000-02-23  Tom Tromey  <tromey@cygnus.com>
12577         * gjavah.c (print_name): In JNI case, correctly quote string.
12578         (print_method_info): Don't handle overrides in JNI mode.
12580 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12582         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
12583         value type set to `boolean_type_node'.
12585 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12587         * jcf-dump.c (main): Test for correct condition after
12588         output file creation.
12590 2000-02-19  Anthony Green  <green@cygnus.com>
12592         * jcf-depend.c (add_entry): Fix test for first list entry.
12594 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12596         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
12597         * constants.c (build_constants_constructor): Likewise.
12599 2000-02-19  Anthony Green  <green@cygnus.com>
12601         * jcf-depend.c (add_entry): Add entries to the end of the list.
12603 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
12605         * decl.c (INT_TYPE_SIZE): Define if necessary.
12606         (expand_java_return): Handle the case of a native integer smaller
12607         than a JVM integer.
12609 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12611         * gjavah.c (help): Use GCCBUGURL.
12612         * jv-scan.c (help): Likewise.
12613         * jcf-dump.c (help): Likewise.
12615 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12617         * jcf-write.c (generate_bytecode_insns): Don't generate empty
12618         `finally' clauses.
12620 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12622         * jcf-parse.c (load_class): Call `fatal' if no file containing
12623         the target class are found.
12625 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
12627         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
12628         lex.c, lex.h, and PARSE_H to...
12629         (parse.o, parse-scan.o): ...here, respectively.
12631         * lex.c: Split out code that may trigger SIGFPE from yylex()
12632         to its own function.
12633         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
12635 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12637         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
12639 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12641         * parse.y (outer_field_access_p): Stop in time when outer contexts
12642         are exhausted.
12643         (resolve_qualified_expression_name): Properly qualify *everything*
12644         after a package.type to be resoled as expression names.
12645         (find_applicable_accessible_methods_list): Save/restore `class' to
12646         isolate it from a possible outer context search.
12648 2000-02-15  Tom Tromey  <tromey@cygnus.com>
12650         * gjavah.c (jni_print_char): New function.
12651         (print_full_cxx_name): Use it.
12652         (decode_signature_piece): Likewise.
12653         (print_cxx_classname): Likewise.
12655 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12657         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
12658         version.o.
12659         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
12661         * gjavah.c: Include version.h.
12663         * jcf-dump.c: Likewise.
12665         * jv-scan.c: Likewise.
12667 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12669         * parse.y (outer_field_access_fix): First parameter now a tree
12670         node. Check for assignment to final. First argument to
12671         build_outer_field_access_fix modified to accommodate prototype.
12672         (build_outer_field_access): Don't check for assignment to final
12673         here.
12674         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
12675         possibly returned by outer_field_access_fix. Changed
12676         outer_field_access_fix's first argument.
12677         (check_final_assignment): $finit$'s context is OK.
12678         (patch_unaryop): Use node instead of its line/column value when
12679         calling outer_field_access_fix.
12681 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12683         * parse.y (interface_declaration:): No longer tagged
12684         <node>. Re-installed default action.
12685         (class_member_declaration:): Handle inner interfaces.
12686         (interface_member_declaration): Handle inner interfaces and
12687         classes.
12688         (create_interface): Push error if one seen. Suspend parsing
12689         context when processing an inner interface.
12690         (register_fields): Inner class static field limitations not to
12691         apply to inner interfaces.
12693 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12695         * jcf-parse.c (load_class): Update `java_error_count' when a
12696         class' file can't be found.
12697         (parse.y): Avoid (byte)code generation when errors seen.
12699 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12701         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
12702         decodes a valid node.
12703         (patch_binop): Handle TRUNC_DIV_EXPR.
12705 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12707         * parse.y (resolve_package): New local `acc'. Try to progressively
12708         build and guess a package and type name.
12710 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12712         * parse.y (find_applicable_accessible_methods_list): Load and
12713         layout the search class if necessary.
12714         (java_complete_tree): Keep to original type of the folded initial
12715         value.
12717 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12719         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
12720         Generate error message if circularity is detected. New static
12721         local `list'.
12722         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
12723         * jcf-write.c (generate_bytecode_insns): Very simply handle
12724         SAVE_EXPR.
12725         * parse.y (java_check_circular_reference): Use
12726         `cyclic_inheritance_report' during report, if necessary.
12727         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
12728         walking NEW_ARRAY_INIT twice.
12730 2000-02-09  Tom Tromey  <tromey@cygnus.com>
12732         * parse.y (check_class_interface_creation): Allow inner classes to
12733         be `private' or `protected', check modifiers' consistency. Prevent
12734         block local classes from bearing any modifiers.
12736 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12738         * except.c (check_start_handlers): Re-add prototype lost in last
12739         patch.
12740         (maybe_start_try): Remove excess argument to `check_start_handlers'.
12742 2000-02-09  Andrew Haley  <aph@cygnus.com>
12744         * decl.c (clear_binding_level): Remove excess initializer.
12745         (maybe_poplevels): Remove unused variable.
12746         (force_poplevels): Ditto.
12747         (struct binding_level): Add comment.
12749 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12751         * jcf-write.c (generate_classfile): Don't consider
12752         pre-initialization with reference value (use <clinit> instead.)
12753         * parse.y (java_fix_constructors): No generated constructor for
12754         interfaces.
12755         (build_outer_field_access): Removed debug message.
12756         (outer_field_expanded_access_p): Adapted to bytecode generation.
12757         (build_outer_field_access_method): Use fix_method_argument_names.
12758         (build_outer_method_access_method): Fixed indentation. Added
12759         comment. Handle access method generation for static and also void
12760         methods.
12761         (build_access_to_thisn): Inserted debug message.
12762         (maybe_build_thisn_access_method): Use fix_method_argument_names.
12763         (resolve_qualified_expression_name): Fixed comment.
12764         (not_accessible_p): Adapted to bytecode generation. Added comment.
12765         (patch_method_invocation): Added comment.
12766         (maybe_use_access_method): Fixed leading comment. Handle static
12767         methods.
12768         (java_complete_lhs): Don't shortcut handling of initialized upon
12769         declaration String type static fields when generating bytecode.
12770         (patch_unaryop): Handle outer field access when generating
12771         bytecode.
12773 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12775         * java-tree.h (FIELD_THISN): New macro.
12776         * jcf-write.c (append_synthetic_attribute): New function.
12777         (generate_classfile): Set "Synthetic" attribute on this$<n>,
12778         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
12779         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
12780         this$<n> fields.
12781         (build_outer_field_access): Turned on access functions usage and
12782         generation when compiling to bytecode.
12783         (maybe_use_access_method): Likewise.
12785 2000-01-25  Andrew Haley  <aph@cygnus.com>
12787         * java-except.h (struct eh_range): Add `expanded' field.
12788         (maybe_start_try): Add end_pc arg.
12789         (maybe_end_try): Ditto.
12790         * java-tree.h (force_poplevels): new function.
12791         * expr.c (expand_byte_code): Don't call maybe_start_try or
12792         maybe_end_try.
12793         * except.c (add_handler): Reset expanded.
12794         (expand_start_java_handler): Set expanded.
12795         (check_start_handlers): Don't expand a start handler that's
12796         already been expanded.
12797         (maybe_start_try): Add end_pc arg.  Only expand a handler which
12798         ends after end_pc.
12799         (expand_end_java_handler): call force_poplevels.
12800         (force_poplevels): new function.
12801         * decl.c (binding_level): Add start_pc of binding level.
12802         (maybe_pushlevels): Call maybe_start_try when pushing binding
12803         levels.
12804         (maybe_poplevels): Call maybe_end_try when popping binding levels.
12805         (LARGEST_PC): Define.
12806         (clear_binding_level): Use LARGEST_PC.
12808         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
12809         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
12810         (binding_depth, is_class_level, current_pc): new variables.
12811         (struct binding_level): ditto.
12812         (indent): new function.
12813         (push_jvm_slot): add debugging info.
12814         (maybe_pushlevels): ditto.
12815         (maybe_poplevels): ditto.
12816         (pushlevel): ditto.
12817         (poplevel): ditto.
12818         (start_java_method): ditto.
12819         (give_name_to_locals): comment only.
12820         * except.c (binding_depth, is_class_level, current_pc):
12821         new variables.
12822         (expand_start_java_handler): add debugging info.
12823         (expand_end_java_handler): ditto.
12825 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12827         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
12828         (print_name_for_stub_or_jni, process_file): Constify a char*.
12830 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12832         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
12834 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12836         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
12837         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
12838         defined to be 1.
12840 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12842         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
12843         * java-tree.h (TYPE_II_STMT_LIST): New macro.
12844         (struct lang_type): New field `ii_block'.
12845         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
12846         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
12847         * parse.h (struct parser_ctxt): New field `instance_initializers'.
12848         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
12849         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
12850         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
12851         macros.
12852         * parse.y (add_instance_initializer): New function.
12853         (in_instance_initializer): New static global.
12854         (class_body_declaration:): Link instance initializer block.
12855         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
12856         (array_creation_expression:): Remove unused local.
12857         (java_parser_context_push_initialized_field): Fixed leading
12858         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
12859         CPC_INSTANCE_INITIALIZER_LIST.
12860         (java_parser_context_pop_initialized_field): Likewise.
12861         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
12862         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
12863         CPC_INITIALIZER_STMT.
12864         (fix_constructors): New local `class_type'. Use it. Call
12865         add_instance_initializer.
12866         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
12867         (patch_return): Forbid return in instance initializers.
12868         (patch_throw_statement): Enforce exception handling in the context
12869         of instance initializers.
12871 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12873         * Make-lang.in (java.mostlyclean): Remove executables in
12874         `mostlyclean'.
12876 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12878         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
12879         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
12880         (java_float_finite): Convert to use union Word from javaop.h.
12881         (java_double_finite): Convert to use union DWord from javaop.h.
12883 2000-02-02  Tom Tromey  <tromey@cygnus.com>
12885         * gjavah.c (options): Added `jni' entry.
12886         (help): Document -jni.
12887         (flag_jni): New global.
12888         (process_file): Handle JNI output.  Don't print text from
12889         -prepend, -add, etc, when generating stubs.  Only remove `.class'
12890         suffix if it actually exists.
12891         (main): Create a `.c' file when run with `--jni --stubs'.  Create
12892         correct output file name with `--jni'.
12893         (print_include): Mangle header name differently in JNI case.
12894         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
12895         method list.
12896         (print_method_info): Handle JNI case.  Put signature info into
12897         method name.  Handle case when STREAM is NULL.
12898         (print_name_for_stub_or_jni): New function.
12899         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
12900         (print_cxx_classname): Handle JNI.
12901         (print_full_cxx_name): Likewise.
12902         (decode_signature_piece): Likewise.
12903         (overloaded_jni_method_exists_p): New function.
12904         (struct method_name): Added `signature' and `sig_length' fields.
12905         (HANDLE_END_FIELD): Do nothing in JNI mode.
12907 2000-02-02  Tom Tromey  <tromey@cygnus.com>
12909         * jv-scan.c: Include version.c, <getopt.h>.
12910         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
12911         (options): New array.
12912         (usage): New function.
12913         (version): New function.
12914         (main): Use getopt_long to parse command line.
12915         * jcf-dump.c: Include version.c, <getopt.h>.
12916         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
12917         OPT_JAVAP): New macros.
12918         (options): New array.
12919         (usage): Return `void'.  Changed message.
12920         (help): New function.
12921         (version): New function.
12922         (main): Use getopt_long_only to parse command line.
12923         * gjavah.c: Include <getopt.h>.
12924         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
12925         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
12926         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
12927         (options): New array.
12928         (java_no_argument): Removed.
12929         (help): Updated with missing options.
12930         (main): Use getopt_long_only to parse command line.
12931         (usage): Changed message.
12933 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12935         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
12936         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
12937         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
12938         * parse.y (array_creation_expression:): Handle anonymous arrays.
12939         (build_array_from_name): Don't set `ret_name' if null.
12940         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
12941         (qualify_ambiguous_name): Likewise.
12942         (java_complete_expand_class): Likewise.
12944 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12946         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
12947         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
12948         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
12949         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
12950         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
12951         AIPL_FUNCTION_COMPLETED_INVOCATION.
12952         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
12953         AIPL_FUNCTION_INVOCATION_READY.
12954         (AIPL_FUNCTION_DECLARATION): New enum entry.
12955         * parse.y (reorder_static_initialized): New function.
12956         (java_parser_context_pop_initialized_field): Use it.
12957         (add_inner_class_fields): Use
12958         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
12959         augmented. Install marker after last alias initializer, if any.
12960         (generate_finit): Fixed typo. Don't try to retain only the used
12961         fields.
12962         (method_header): Compute and set DECL_FUNCTION_NAP.
12963         (method_declarator): Fixed comment. Insert alias initializer in
12964         parameter list.
12965         (build_alias_initializer_parameter_list): Fixed leading
12966         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
12967         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
12968         (java_complete_expand_class): Code to retain only used aliases
12969         removed.
12970         (java_complete_expand_methods): New local `first_decl'. Generate
12971         $finit$ first, then expand the constructors, regular methods and
12972         <clinit>.
12973         (java_complete_expand_method): Don't report error on missing
12974         return statement if previously detected bogus.
12975         (fix_constructors): Don't patch constructor parameters list.
12976         (patch_method_invocation): Use new AIPL enum values. Reverse
12977         alias initializer list for anonymous classes.
12979 2000-01-30  Anthony Green  <green@redhat.com>
12981         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
12982         determine how many stack slots to pop.
12984 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12986         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
12987         error handling/recovery.
12988         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
12990 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12992         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
12993         FIELD_LOCAL_ALIAS_USED): New macros.
12994         (DECL_FUNCTION_NAP): New macro.
12995         (struct lang_decl): New field `nap'.
12996         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
12997         (struct lang_type): New fields `finit_stmt_list' and
12998         `clinit_stmt_list'.
12999         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13000         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13001         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13002         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13003         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13004         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13005         (BUILD_THROW): Macro line separator re-indented.
13006         * parse.y (end_class_declaration): New function.
13007         (maybe_generate_pre_expand_clinit): New name for
13008         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13009         pre-expand static fields.
13010         (maybe_generate_clinit): Function deleted.
13011         (check_for_static_method_reference): Prototype's parameter list
13012         indented.
13013         (generate_finit): New name for maybe_generate_finit. Changed
13014         leading comment. Function rewritten to use
13015         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13016         (build_alias_initializer_parameter_list): New function.
13017         (java_parser_context_pop_initialized_field): Likewise.
13018         (add_inner_class_fields): Likewise.
13019         (type_declaration:): Call end_class_declaration.
13020         (class_member_declaration:): Likewise.
13021         (formal_parameter_list:): Fixed typos.
13022         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13023         element. Improved error handling.
13024         (block_statement:): Call end_class_declaration.
13025         (anonymous_class_creation:): Likewise.
13026         (create_anonymous_class): Fixed comments.
13027         (create_class): Call add_inner_class_fields.
13028         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13029         (method_header): Use MARK_FINAL_PARMS.
13030         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13031         (method_declarator): Propagate final argument flag.
13032         (craft_constructor): New local `artificial'. Call
13033         build_alias_initializer_parameter_list. Use
13034         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13035         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13036         necessary.
13037         (complete_expand_class): Get rid of unused outer context local
13038         alias fields.
13039         (java_complete_expand_methods): Fixed leading
13040         comment. Generate/pre-expand <clinit> first. Changed method
13041         expansion order to regular, $finit$, constructors, <clinit>.
13042         (java_complete_expand_method): Set current_function_decl.
13043         (fix_constructors): Fix constructor parameter list to account for
13044         outer context local alias initializers.
13045         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13046         (resolve_expression_name): Lookup outer context local aliases. New
13047         local `access', use it.
13048         (patch_method_invocation): Patch inner class ctor invocation with
13049         outer context local aliases initialization values. $finit$
13050         invocation patching now includes things generated with
13051         build_alias_initializer_parameter_list.
13052         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13053         (build_super_invocation): Likewise.
13054         (patch_assignment): Changed comment.
13056 2000-01-27  Andrew Haley  <aph@cygnus.com>
13058         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13059         (emit_if): Ditto.
13060         (emit_jsr): Ditto.
13062 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13064         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13065         concatenation.
13066         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13068         * parse.y (register_fields): Don't pass a format specifier to
13069         OBSOLETE_MODIFIER_WARNING.
13070         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13071         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13072         specifier.
13073         (check_modifiers): Change function into a macro.
13074         (check_class_interface_creation): Pass a literal format string.
13076 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13078         * buffer.h: PROTO -> PARAMS.
13079         * check-init.c: Likewise.
13080         * class.c: Likewise.
13081         * constants.c: Likewise.
13082         * convert.h: Likewise.
13083         * decl.c: Likewise.
13084         * except.c: Likewise.
13085         * expr.c: Likewise.
13086         * gjavah.c: Likewise.
13087         * java-except.h: Likewise.
13088         * java-tree.h: Likewise.
13089         * jcf-depend.c: Likewise.
13090         * jcf-dump.c: Likewise.
13091         * jcf-parse.c: Likewise.
13092         * jcf-path.c: Likewise.
13093         * jcf-reader.c: Likewise.
13094         * jcf-write.c: Likewise.
13095         * jcf.h: Likewise.
13096         * jv-scan.c: Likewise.
13097         * jvgenmain.c: Likewise.
13098         * jvspec.c: Likewise.
13099         * lang.c: Likewise.
13100         * lex.c: Likewise.
13101         * lex.h: Likewise.
13102         * parse-scan.y: Likewise.
13103         * parse.h: Likewise.
13104         * parse.y: Likewise.
13105         * typeck.c: Likewise.
13106         * verify.c: Likewise.
13107         * xref.c: Likewise.
13108         * xref.h: Likewise.
13109         * zextract.c: Likewise.
13110         * zipfile.h: Likewise.
13112 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13114         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13115         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13116         * constants.c (build_constant_data_ref): Check for cached
13117         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13118         in TYPE_CPOOL_DATE_REF.
13119         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13120         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13121         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13122         (LOCAL_FINAL): New macro.
13123         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13124         constant pool -- don't try to reuse.
13125         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13126         TYPE_LANG_SPECIFIC.
13127         (find_in_current_zip): Use TYPE_JCF.
13128         * parse.h (java_check_final): Prototype removed.
13129         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13130         (maybe_create_class_interface_decl,
13131         check_class_interface_creation): Likewise.
13132         (java_expand_finals): Function removed.
13133         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13134         (block_statement:): Fixed comment.
13135         (anonymous_class_creation:): Likewise.
13136         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13137         argument patch.
13138         (check_class_interface_creation): Loosened error report on (inner)
13139         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13140         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13141         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13142         argument patch.
13143         (create_interface): Likewise.
13144         (anonymous_class_counter): New static global.
13145         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13146         patch. Fixed comments.
13147         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13148         anonymous_class_counter when declaring a toplevel class.
13149         (craft_constructor): Fixed constructor name when handling
13150         anonymous classes. Anonymous class constructors to feature hidden
13151         this$<n> parameter.
13152         (java_fix_constructors): Added comment.
13153         (java_check_final): Function removed.
13154         (java_complete_expand_methods): Fixed comment. Don't generate
13155         class data, save its outgoing constant pool instead.
13156         (verify_constructor_super): Skip anonymous class constructor
13157         hidden this$<n> parameter.
13158         (java_expand_classes): New local `saved_ctxp'. Removed call to
13159         java_expand_finals and java_check_final. Expand anonymous class
13160         constructors. Generate class data.
13161         (build_super_invocation): Skip anonymous class hidden this$<n>
13162         parameter.
13163         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13164         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13165         (set_java_signature): Likewise.
13167 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13169         * gjavah.c: Delete ACC_VISIBILITY define.
13170         * jcf.h: Add ACC_VISIBILITY define.
13171         * parse.y: final: rule tagged <value>.
13172         (java_check_regular_methods): Use ACC_VISIBILITY define for
13173         default package access check.
13174         (local_variable_declaration_statement): Use final: rule.
13176 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13178         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13179         (final:): New rule.
13181 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13183         * gjavah.c (print_field_info): Allow non-static final fields.
13185 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13187         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13188         * parse.y (patch_anonymous_class): New function.
13189         (create_anonymous_class): Register incomplete type when the
13190         class/interface to extends/implement isn't known yet.
13191         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13192         (verify_constructor_super): Tuned error message.
13194 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13196         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13197         (ANONYMOUS_CLASS_P): New macro.
13198         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13199         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13200         * parse.y (create_class): Added leading argument.
13201         (maybe_create_class_interface_decl,
13202         check_class_interface_creation): Likewise.
13203         (craft_constructor): New function.
13204         (verify_constructor_super): Added argument in prototype.
13205         (class_declaration:): Inserted leading argument.
13206         (for_begin:): Use FOR_LOOP_P.
13207         (anonymous_class_creation): Create WFL of the anonymous class to
13208         instantiate. Call build_new_invocation. Added comments.
13209         (check_class_interface_creation): Handle parameter `anonymous' in
13210         verbose mode class creation announce.
13211         (link_nested_class_to_enclosing): Exclude anonymous classes.
13212         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13213         anonymous class, even though they appear to have an enclosing
13214         context.
13215         (create_interface): Pass extra argument to
13216         check_class_interface_creation.
13217         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13218         (create_class): Call check_class_interface_creation and
13219         maybe_create_class_interface_decl with extra new argument. Don't
13220         add private this$<n> to anonymous classes.
13221         (method_declarator): Insert hidden this$<n> to anonymous class
13222         constructors.
13223         (java_fix_constructors): Deleted code creating default
13224         constructor. Call craft_constructor instead.
13225         (java_check_regular_methods): Set `saw_constructor' to 1 for
13226         anonymous classes.
13227         (fix_constructors): Pass extra argument to verify_constructor_super.
13228         (verify_constructor_super): New local `sdecl', use it. Search for
13229         matching constructor (possibly featuring arguments) in super
13230         class.
13231         (lookup_method_invoke): Craft constructor according to arguments
13232         list when dealing with anonymous class constructors.
13233         (build_super_invocation): Pass arguments to anonymous class super
13234         constructors.
13235         (search_loop): Use FOR_LOOP_P.
13236         (labeled_block_contains_loop_p): Likewise.
13238 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13240         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13241         (enclosing_context_p): New function.
13242         (get_access_flags_from_decl): Handle CLASS_STATIC.
13243         (maybe_layout_super_class): Extra first argument passed to
13244         do_resolve_class.
13245         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13246         ID_INIT_P.
13247         * decl.c (access0_identifier_node): New global.
13248         (init_decl_processing): access0_identifier_node initialized.
13249         (pushdecl): Set DECL_CONTEXT only on non type decls.
13250         * expr.c (lookup_field): Lookup inner class fields in enclosing
13251         contexts.
13252         (expand_invoke): Use ID_INIT_P.
13253         (expand_java_field_op): Use DECL_CLINIT_P.
13254         * java-tree.def (CLASS_LITERAL): New tree code.
13255         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13256         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13257         (struct lang_decl): New field `inner_access'.
13258         (enclosing_context_p): Prototyped.
13259         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13260         ID_CLINIT_P): New macros.
13261         (CLASS_STATIC): New macro.
13262         (CLASS_ACCESS0_GENERATED_P): New macro.
13263         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13264         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13265         INNER_CLASS_P): New macros.
13266         (DECL_INNER_CLASS_LIST): New macro.
13267         * jcf-parse.c (yyparse): Avoid the use of ANSI string
13268         concatenation.
13269         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13270         the shift value to int. Fixed typo in comment.
13271         * lex.c (inst_id, wpv_id): Initialize.
13272         * mangle.c (unicode_mangling_length): Take `$' into account.
13273         * parse.h (DRECOVER, RECOVER): Terminate properly.
13274         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13275         (typedef struct _jdep): New field `enclosing'.
13276         (JDEP_ENCLOSING): New macro.
13277         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13278         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13279         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13280         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13281         GET_ENCLOSING_CPC_CONTEXT): New macros.
13282         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13283         (do_resolve_class): Added extra argument in prototype.
13284         * parse.y (resolve_class): Added extra argument in prototype.
13285         (maybe_create_class_interface_decl): Likewise.
13286         (maybe_use_access_method, build_wfl_wrap): New functions.
13287         (java_complete_expand_classes, java_complete_expand_class):
13288         Likewise.
13289         (java_parser_context_push_initialized_field,
13290         java_parser_context_suspend, java_parser_context_resume):
13291         Likewise.
13292         (maybe_make_nested_class_name, make_nested_class_name,
13293         set_nested_class_simple_name_value,
13294         link_nested_class_to_enclosing, find_as_inner_class,
13295         find_as_inner_class_do, check_inner_class_redefinition,
13296         build_thisn_assign, build_current_thisn, build_access_to_thisn,
13297         maybe_build_thisn_access_method, build_outer_field_access,
13298         build_outer_field_access_methods, build_outer_field_access_expr,
13299         build_outer_method_access_method, build_new_access_id,
13300         build_outer_field_access_method, outer_field_access_p,
13301         outer_field_expanded_access_p, outer_field_access_fix,
13302         build_incomplete_class_ref, patch_incomplete_class_ref,
13303         create_anonymous_class): Likewise.
13304         (inst_id, wpv_id): New static global variables.
13305         (synchronized:): New rule, tagged <node>.
13306         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13307         rules.
13308         (anonymous_class_creation:): New rule, tagged <node>.
13309         (NEW_TK): Tagged <node>.
13310         (type_literals, array_type_literal): New rules, tagged <node>.
13311         (class_declaration:): Removed action when reducing by class_body:
13312         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13313         using GET_CPC in sub-rules.
13314         (class_member_declaration): Handle inner classes.
13315         (method_declaration): When reducing method_header:, reset
13316         current_function_decl when appropriate.
13317         (method_declarator:): Set the number of formal parameter to 0 for
13318         method declared without arguments.
13319         (constructor_declarator:): Likewise.
13320         (static_initializer:): List of elements kept in a list.
13321         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13322         use of the keyword `static' for type declarations.
13323         (block_statement:): Handle inner class declarations.
13324         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13325         type qualified `this'.
13326         (class_instance_creation_expression): Use anonymous_class_creation:
13327         to handle inner class instances creation. Handle qualified `new'.
13328         (something_dot_new): Added appropriate actions.
13329         (create_new_parser_context): New function.
13330         (java_push_parser_context, java_parser_context_save_global,
13331         java_parser_context_suspend): Use create_new_parser_context.
13332         (check_modifiers): Changed leading comment.
13333         (check_class_interface_creation): Handle interclasses.
13334         (add_superinterfaces): Fixed comment.
13335         (create_interface): Build qualified name from the raw_name instead
13336         of its matching WFL. Push the initialized fields list. raw_name added
13337         as an extra argument to maybe_create_class_interface_decl.
13338         (create_class): Build qualified name from the raw_name instead of
13339         its matching WFL. Removed assignment to current_parsed_class_un.
13340         Call PUSH_ERROR before returning an error. Suspend the current
13341         parser context when processing an inner class. Push the
13342         initialized fields list. raw_name added as an extra argument to
13343         maybe_create_class_interface_decl. Add the private this$<n>
13344         field.
13345         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13346         (register_fields): Get the class type from GET_CPC and handle
13347         previous errors.  Added code to handle the creation of static
13348         fields in inner classes. Initialized fields initialization
13349         statements kept in a list of lists.
13350         (maybe_generate_finit): Initialized fields initialization
13351         statements kept in a list of lists. Use GET_CPC.
13352         (maybe_generate_clinit): Likewise.
13353         (method_header): Use GET_CPC and GET_CPC_UN.
13354         (parser_qualified_classname): Handle inner classes.
13355         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13356         (java_fix_constructors): Hide pointer to enclosing context
13357         instance in constructor list when dealing with inner classes.
13358         (jdep_resolve_class): Call resolve_class with extra first argument
13359         JDEP_ENCLOSING.
13360         (resolve_class): Add enclosing context as a first extra argument
13361         to do_resolve_class.
13362         (do_resolve_class): Call find_as_inner_class. Handle WFLs
13363         properly.
13364         (resolve_no_layout): Extra argument added to resolve_class
13365         invocation.
13366         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13367         (java_get_real_method_name): Use GET_CPC_UN.
13368         (check_abstract_method_definitions): Use DECL_CLINIT_P.
13369         (java_check_abstract_methods): Handle static method declared in
13370         inner classes by an error.
13371         (java_check_regular_methods): Use DECL_CLINIT_P.
13372         (source_start_java_method): Also set DECL_MAX_LOCALS.
13373         (create_artificial_method): Call java_parser_context_save_global
13374         and java_parser_context_restore_global instead of saving/restoring
13375         the context by hand.
13376         (expand_start_java_method): Improved verbose mode message.
13377         (java_complete_expand_methods): Fixed leading comment. Use
13378         DECL_CLINIT_P.
13379         (fix_constructors): Added assignment to this$<n> if necessary.
13380         (java_expand_classes): Call java_complete_expand_classes instead
13381         of java_complete_expand_methods.
13382         (make_qualified_primary): Simplified.
13383         (merge_qualified_name): Optimized for missing left or right parts.
13384         (resolve_expression_name): Handle access to outer class fields from
13385         interclasses.
13386         (resolve_qualified_expression_name): New macro
13387         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13388         classes. Report error on non appropriate qualification of
13389         `new'. Handle qualified `this'.
13390         (not_accessible_p): Allow access to outer class private fields from
13391         inner classes.
13392         (patch_method_invocation): Handle method invocations through
13393         access methods and inner class constructor invocations.
13394         (find_applicable_accessible_methods_list): Search enclosing
13395         contexts of an inner class.
13396         (search_applicable_methods_list): Fixed typo.
13397         (argument_types_convertible): Handle inner class constructors'
13398         hidden outer context reference argument.
13399         (qualify_ambiguous_name): Handle qualified `this'.
13400         (java_complete_lhs): Handle use of field accessed through
13401         artificial access methods in various cases of assignments. Handle
13402         CLASS_LITERAL node.
13403         (check_final_assignment): Use DECL_CLINIT_P.
13404         (valid_ref_assignconv_cast_p): Handle the destination being an
13405         enclosing context of the source.
13406         (patch_unaryop): Handle use of field accessed through artificial
13407         access methods.
13408         (patch_return): Use DECL_CLINIT_P.
13409         (patch_throw_statement): Use DECL_CLINIT_P.
13410         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
13411         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
13412         ID_INIT_P.
13414 2000-01-16  Anthony Green  <green@cygnus.com>
13416         * parse.y (build_string_concatenation): Only use
13417         StringBuffer(String) shortcut if String arg is constant.
13419 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13421         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13422         the shift value to int. Fixed typo in comment.
13424 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
13426         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13427         * jcf-write.c: Likewise.
13428         * parse.y: Likewise.
13429         * parse.c: Regenerate.
13431 2000-01-09  Anthony Green  <green@cygnus.com>
13433         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13434         bytecodes in the correct order.
13436 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13438         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13440 2000-01-06  Anthony Green  <green@cygnus.com>
13442         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13443         before building constant array decl.
13445 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13447         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
13448         method invocation and typo in conditional expression.
13449         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
13450         the appropriate NOTE_POP.
13451         * parse.y (patch_binop): Shift value mask to feature the right
13452         type.
13454 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13456         * class.c (assume_compiled, assume_compiled_node): Add static
13457         prototype.
13458         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13460         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13462         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13464         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13465         to `__modifier' to avoid stringifying it.
13467         * parse.y (verify_constructor_circularity): Don't call a variadic
13468         function with a non-literal format string.
13469         (java_check_abstract_methods): Move unreachable code inside
13470         `continue' statement.
13471         (lookup_method_invoke): Call xstrdup, not strdup.
13473         * expr.c (expand_java_field_op): Avoid the use of ANSI string
13474         concatenation.
13476         * jcf-parse.c (yyparse): Likewise.
13478         * jv-scan.c (main): Likewise.
13480 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13482         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
13483         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13484         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
13485         concatenation.
13487         * parse.y (synchronized, variable_redefinition_error,
13488         check_class_interface_creation, create_interface, create_class,
13489         method_header, finish_method_declaration,
13490         check_modifiers_consistency, method_declarator,
13491         complete_class_report_errors, check_abstract_method_definitions,
13492         java_check_regular_methods, check_throws_clauses,
13493         java_check_abstract_methods, read_import_dir,
13494         check_pkg_class_access, declare_local_variables, fix_constructors,
13495         cut_identifier_in_qualified, resolve_expression_name,
13496         resolve_qualified_expression_name, patch_method_invocation,
13497         java_complete_lhs, patch_assignment, try_builtin_assignconv,
13498         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
13499         patch_exit_expr, patch_exit_expr, patch_switch_statement,
13500         patch_try_statement, patch_synchronized_statement,
13501         patch_throw_statement, check_thrown_exceptions,
13502         patch_conditional_expr): Likewise.
13504 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13506         * Makefile.in (LIBDEPS): Added gcc's errors.o
13507         (../jcf-dump$(exeext):): Link with gcc's errors.o
13508         (../gcjh$(exeext):): Likewise.
13509         * expr.c (expand_java_NEW): Layout the entire target type instead of
13510         laying out its methods only.
13511         (lookup_field): Layout the class after having loaded it.
13512         * java-tree.h (java_debug_context): Declared.
13513         * jcf-io.c (toplev.h): Included.
13514         (find_class): Removed assignment to jcf's outofsynch
13515         field. Force source file to be read if newer than its matching
13516         class file. Tweaked debug messages.
13517         * jcf-parse.c (jcf_out_of_synch): Deleted.
13518         (read_class): Call to jcf_out_of_synch removed.
13519         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
13520         (jcf_out_of_synch): Prototype deleted.
13521         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
13522         `deprecated' and `class_err': integer turned into bit-fields.
13523         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
13524         * parse.y (package_list): New global.
13525         (package_declaration:): Record newly parsed package name.
13526         (extra_ctxp_pushed_p): Static global deleted.
13527         (java_parser_context_save_global): Create buffer context for the
13528         purpose of saving globals, if necessary.
13529         (java_parser_context_restore_global): Pop context pushed for the
13530         purpose of saving globals, if necessary.
13531         (java_debug_context_do): New prototype and function.
13532         (java_debug_context): Likewise.
13533         (do_resolve_class): Use already parsed package names to qualify
13534         and lookup class candidate.
13535         (java_pre_expand_clinit): Removed unnecessary local variable.
13537 1999-12-17  Tom Tromey  <tromey@cygnus.com>
13539         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
13540         fixes PR gcj/119.
13541         (process_file): Use `\n\' at end of each line in string.
13543 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13545         * expr.c (expand_invoke): Layout the loaded class before
13546         attempting to use it.
13547         (expand_java_field_op): Allow final field assignments to take
13548         place in $finit$.
13549         * typeck.c (convert): Return error_mark_node if expr is null.
13551 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13553         * class.c (class_depth): Return -1 if the class doesn't load
13554         properly.
13555         * expr.c (can_widen_reference_to): Check for errors during depth
13556         computation and return 0 accordingly.
13557         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
13558         create default constructors and add an other error check.
13559         * parse.h (java_fix_constructors): Prototyped.
13560         * parse.y (java_pre_expand_clinit): Likewise.
13561         (build_super_invocation): Re-prototyped to feature one argument.
13562         (java_check_circular_reference): Directly use `current'.
13563         (java_fix_constructors): New function.
13564         (java_check_regular_methods): Don't create default constructors
13565         here, but abort if none were found.
13566         (java_complete_expand_methods): Pre-process <clinit> calling
13567         java_pre_expand_clinit.
13568         (java_pre_expand_clinit): New function.
13569         (fix_constructors): build_super_invocation invoked with the
13570         current method declaration as an argument.
13571         (build_super_invocation): Use the context of the processed method
13572         decl argument instead of current_class.
13573         * typeck.c (lookup_java_method): Take WFLs in method names into
13574         account.
13576 1999-12-14  Per Bothner  <per@bothner.com>
13578         * class.c (make_class_data): flag_keep_inline_functions to keep
13579         private methods in the method array.
13581 1999-12-15  Anthony Green  <green@cygnus.com>
13583         * check-init.c (check_init): Take into account both types of
13584         `throw's when checking for uninitialized variables.
13586 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13588         * parse.y (java_complete_lhs): Force conversion of array
13589         dimensions to int_type_node, that's what runtime's ABI expects.
13591 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13593         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
13594         operand of a WFL, until the Java front-end gets fixed with regard
13595         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
13597 1999-12-10  Andrew Haley  <aph@cygnus.com>
13599         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
13600         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
13601         expr.c (build_java_athrow): Add support for sjlj-exceptions.
13602         java-tree.h: Ditto.
13603         jcf-write.c: Ditto.
13605 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13607         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13608         before calling expand_eh_region_start and expand_start_all_catch.
13609         * except.c (expand_start_java_handler): Switch to permanent
13610         obstack before calling expand_eh_region_start.
13611         (expand_end_java_handler): Switch to permanent obstack before
13612         calling expand_start_all_catch.
13614 1999-12-5  Anthony Green  <green@cygnus.com>
13616         * decl.c (init_decl_processing): Mark throw_node as a noreturn
13617         function with side effects.
13618         (init_decl_processing): Mark all memory allocating DECLs with
13619         DECL_IS_MALLOC.
13621 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13623         * except.c (expand_end_java_handler): Call
13624         expand_resume_after_catch and end_catch_handler.
13626 1999-11-30  Anthony Green  <green@cygnus.com>
13628         * verify.c (verify_jvm_instructions): Create new return label
13629         chain if non existent (don't rely on the verified state of the jsr
13630         target.)
13632 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13634         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
13635         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
13637         * parse.y (patch_assignment): Removed bogus final class test on
13638         lhs when checking on whether to emit an ArrayStoreException runtime
13639         check.
13640         * expr.c (expand_java_arraystore): Likewise.
13642 1999-11-28 Anthony Green <green@cygnus.com>
13644         * decl.c (find_local_variable): Reuse single slot decls when
13645           appropriate.
13647 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13649         * jcf-parse.c (saw_java_source): Global variable removed.
13650         (read_class): Don't use `saw_java_source'. Added extra braces.
13651         (yyparse): Code setting `saw_java_source' removed.
13653 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
13655         * except.c (emit_handlers): Zero catch_clauses after emitting them.
13657 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13659         * verify.c (merge_type_state): Non verified subroutines being
13660         considered more than once to trigger passive type merge.
13662 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13664         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
13665         in case of error. Error message tuned.
13667 1999-11-21  Anthony Green  <green@cygnus.com>
13669         * constants.c (find_methodref_index): Unwrap method names before
13670         inserting them in the constant pool.
13672         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
13674         * class.c (assume_compiled_node): New typedef.
13675         (assume_compiled_tree): New static data.
13676         (find_assume_compiled_node): New function.
13677         (add_assume_compiled): New function.
13678         (assume_compiled): New function.
13679         * class.c (make_class_data): Use assume_compiled.
13680         (is_compiled_class): Use assume_compiled.
13682         * java-tree.h (add_assume_compiled): Declare.
13684         * lang.c (lang_decode_option): Parse new options.
13686 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13688         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
13689         int_type_node: that's what `_Jv_AllocObject' expects.
13691 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13693         * parse.y (lookup_method_invoke): Use lang_printable_name to
13694         reliably build the type name during error report. Fixes PR gcj/97.
13696 1999-11-09  Tom Tromey  <tromey@cygnus.com>
13698         * jcf-path.c: Include <sys/stat.h>.
13699         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
13700         (DIR_UP): New macro.
13702 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13704         * parse.y (source_end_java_method): Resume permanent allocation,
13705         reversing Apr 27 1998 patch.
13706         (patch_string_cst): Pop obstacks after having pushed the permanent
13707         ones.
13709 1999-11-05  Tom Tromey  <tromey@cygnus.com>
13711         * class.c (finish_class): Emit inlined methods if any native
13712         methods exist in the class.  Fixes PR gcj/85.
13714 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13716         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
13717         (qualify_ambiguous_name): Likewise.
13719 1999-11-03  Godmar Back <gback@cs.utah.edu>
13721         * typeck.c: (lookup_java_method):  search all inherited
13722         interfaces when looking up interface method.
13724 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13726         * parse.y (method_header:): Issue error message for rule `type
13727         error'.
13728         (synchronized:): Error report when not using synchronized.
13730 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13732         * parse.y (resolve_qualified_expression_name): Prevent `this' from
13733         being used before the superclass constructor has been called.
13734         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
13735         instead of `CALL_THIS_CONSTRUCTOR_P'.
13737 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
13739         * check-init.c: Fix typo in comment.
13741 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13743         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
13744         and final method.
13746 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13748         * parse.y (expression_statement:): Call function to report
13749         improper invocation of a constructor.
13750         (parse_ctor_invocation_error): New function.
13752 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
13754         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
13755         remember_end_note.
13757 1999-10-21  Tom Tromey  <tromey@cygnus.com>
13759         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
13760         in generated `main'.
13762 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13764         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
13765         (qualify_ambiguous_name): Likewise.
13767 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13769         * parse.y (java_complete_tree): fold_constant_for_init to work on
13770         permanent_obstack.
13771         (java_complete_lhs): Likewise.
13772         (array_constructor_check_entry): Complete an initializer element
13773         on permanent_obstack.
13775 1999-10-19  Tom Tromey  <tromey@cygnus.com>
13777         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
13778         From Mike Moreton <mike@pillim.demon.co.uk>.
13780 1999-10-15  Greg McGary  <gkm@gnu.org>
13782         * java-tree.h (flag_bounds_check): Remove extern decl.
13783         * lang.c (flag_bounds_check): Remove global variable.
13784         (lang_f_options): Remove "bounds-check" entry.
13785         (lang_init_options): Default flag_bounds_check to "on".
13787 1999-10-14  Tom Tromey  <tromey@cygnus.com>
13789         * jvgenmain.c (usage): New function.
13790         (main): Use it.  Also, handle `-D' options.
13791         * jvspec.c (lang_specific_driver): Recognize -D.
13792         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
13794         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
13796 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13798         * jcf-dump.c (print_constant, disassemble_method): Don't call a
13799         variadic function with a non-literal format string.
13801         * parse-scan.y (report_main_declaration): Likewise.
13803         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
13805         * parse.y (read_import_dir, patch_assignment, patch_binop,
13806         patch_array_ref): Likewise.
13808         * typeck.c (build_java_array_type): Likewise.
13810         * verify.c (verify_jvm_instructions): Likewise.
13812 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13814         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
13816 1999-10-07  Anthony Green  <green@cygnus.com>
13818         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
13819         where CHECK_PUT may fail for valid reasons.
13821         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
13822         UNSAFE_PUTN): New macros.
13824 1999-10-04  Tom Tromey  <tromey@cygnus.com>
13826         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
13827         well.  Fixes Java PR gcj/59.
13828         * parse-scan.y (yyerror): Report errors.
13830 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
13832         * decl.c (insert_block): Remove unconditional `abort'.
13834 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
13836         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
13837         FUNCTION_CODE now of type int.  All callers changed.
13838         Set the builtin's DECL_BUILT_IN_CLASS.
13840 1999-09-23  Tom Tromey  <tromey@cygnus.com>
13842         * jvspec.c (lang_specific_driver): Don't read spec file if
13843         -fsyntax-only given.
13845 1999-09-22  Tom Tromey  <tromey@cygnus.com>
13847         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
13849         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
13850         (WORDS_TO_LONG): Likewise.
13851         (WORDS_TO_DOUBLE): Likewise.
13853 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13855         * jcf-write.c (RELOCATION_VALUE_0): New macro.
13856         (RELOCATION_VALUE_1): Likewise.
13857         (emit_iinc, emit_reloc, push_constant1, push_constant2,
13858         push_in_const, push_long_const): Prototyped.
13859         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
13860         (push_constant2): Likewise.
13861         (push_int_const): Cast find_constant1's integer arguments to `jword'.
13862         (find_constant_wide): Cast find_constant2's integer arguments to
13863         `jword'.
13864         (find_constant_index): Cast find_constant2's and find_constant2's
13865         integer arguments to `jword'.
13866         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
13867         (emit_switch_reloc): Use RELOCATION_VALUE_0.
13868         (emit_if): Use RELOCATION_VALUE_1.
13869         (emit_goto): Likewise.
13870         (emit_jsr): Likewise.
13871         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
13872         argument to push_long_const to HOST_WIDE_INT.
13874 1999-09-15  Andreas Schwab  <schwab@suse.de>
13876         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
13878 1999-09-20  Nick Clifton  <nickc@cygnus.com>
13880         * lang.c (lang_decode_option): Extend comment.
13882 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13884         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
13885         instead of fndecl.
13887 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13889         * gjavah.c (get_field_name, print_method_info, print_include,
13890         add_namelet): Use xmalloc, not malloc.
13892         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
13893         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
13894         NULL pointer.
13896         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
13898         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
13900         * jcf-path.c (add_entry): Likewise.
13902         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
13904         * jv-scan.c (xmalloc): Remove definition.
13906         * jvgenmain.c (xmalloc): Likewise.
13908         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
13910         * lex.c (java_store_unicode): Use xrealloc, not realloc.
13912         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
13913         concat, not xmalloc/sprintf.
13914         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
13915         (xstrdup): Remove definition.
13917         * parse.y (duplicate_declaration_error_p,
13918         constructor_circularity_msg, verify_constructor_circularity,
13919         check_abstract_method_definitions, java_check_regular_methods,
13920         java_check_abstract_methods, patch_method_invocation,
13921         check_for_static_method_reference, patch_assignment, patch_binop,
13922         patch_cast, array_constructor_check_entry, patch_return,
13923         patch_conditional_expr): Use xstrdup, not strdup.
13925         * zextract.c (ALLOC): Use xmalloc, not malloc.
13927 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13929         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
13931         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
13932         (do_spec, lang_specific_pre_link, lang_specific_driver,
13933         input_filename, input_filename_length): Don't declare.
13934         (main_class_name, jvgenmain_spec, lang_specific_driver):
13935         Constify a char*.
13936         (lang_specific_driver): All calls to the function pointer
13937         parameter now explicitly call `fatal'.
13939 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13941         * parse.y (find_applicable_accessible_methods_list): Search
13942         abstract classes as interfaces.
13944 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13946         * class.c (finish_class): We're now outside a valid method
13947         declaration. Tell the rest of gcc so.
13949 1999-09-08  Bruce Korb  autogen@linuxbox.com
13951         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
13953 1999-09-07  Tom Tromey  <tromey@cygnus.com>
13955         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
13956         java-array.h.
13957         (decode_signature_piece): Don't emit "::" in JArray<>.
13958         (print_namelet): Only print trailing `;' when printing a class.
13960 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
13962         * java-tree.h: Delete declarations for all tree nodes now moved to
13963         global_trees.
13964         * decl.c: Delete their definitions.
13966 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
13968         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
13969         * Makefile.in (OBJS): Add ggc-callbacks.o.
13970         (OBJDEPS): Likewise.
13972 1999-09-03  Tom Tromey  <tromey@cygnus.com>
13974         * parse.y (strip_out_static_field_access_decl): Return operand if
13975         it satisfies JDECL_P.
13977 1999-09-02  Tom Tromey  <tromey@cygnus.com>
13979         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
13980         Handle nested arrays, like `[[I'.
13982 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13984         * class.c (finish_class): Remove unused parameter, all callers
13985         changed.
13987         * expr.c (build_java_athrow): Change return type to void.
13988         (java_lang_expand_expr): Make sure each case in switch returns a
13989         value.
13991         * java-tree.h (finish_class): Fix prototype to take void args.
13993         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
13994         (main): Issue return from main, not exit.
13996         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
13998         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14000         * jv-scan.c (main): Issue return from main, not exit.
14002         * parse.y (check_abstract_method_definitions,
14003         java_check_abstract_method_definitions): Add static prototypes.
14004         (java_complete_expand_methods): Fix call to `finish_class'.
14006         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14007         and `prevpc'.
14009 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14011         * lang.c (language_string): Constify.
14013 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14015         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14016         Remove hacks for stuff which comes from libiberty.
14018         * Make-lang.in: Likewise.
14020 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
14022         * Makefile.in (xref.o): Depend on xref.c explicitly.
14024 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14026         * java-tree.h (lang_printable_name): Constify a char*.
14028         * lang.c (lang_printable_name): Likewise.
14030 1999-08-27  Jeffrey A Law  (law@cygnus.com)
14032         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14033         comments in C code.
14035 1999-08-26  Tom Tromey  <tromey@cygnus.com>
14037         * gjavah.c (print_cxx_classname): Print "::" before qualified
14038         name.
14040 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14042         * parse.y (lookup_cl): Changed leading comment. Now does its best
14043         to set the column number.
14044         (qualify_ambiguous_name): Take WFL wrappers into account.
14046 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
14048         * verify.c (verify_jvm_instructions): Don't check instruction
14049         validity beyond end of method.
14051 1999-08-25  Tom Tromey  <tromey@cygnus.com>
14053         * jvspec.c (lang_specific_driver): Correctly handle --help again.
14055 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14057         * gjavah.c (print_name, print_base_classname, utf8_cmp,
14058         cxx_keyword_subst, generate_access, name_is_method_p,
14059         get_field_name, print_field_name, super_class_name, print_include,
14060         decode_signature_piece, print_class_decls, usage, help,
14061         java_no_argument, version, add_namelet, print_namelet): Add static
14062         prototype.
14063         (print_base_classname, utf8_cmp, cxx_keyword_subst,
14064         name_is_method_p): Constify a char*.
14065         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14066         Provide a final else clause in an if-else-if.
14067         (print_field_info): Add missing final arg in function call to
14068         `print_field_name'.
14069         (print_method_info, decompile_method, decode_signature_piece,
14070         print_c_decl, print_full_cxx_name, print_stub,
14071         print_mangled_classname, super_class_name, print_include,
14072         add_namelet, add_class_decl, print_class_decls, process_file,
14073         help): Constify a char*.
14075         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14076         push_int_const, find_constant_wide, find_constant_index,
14077         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14078         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14079         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14080         emit_if, emit_goto, emit_jsr, call_cleanups,
14081         make_class_file_name): Add static prototypes.
14082         (generate_bytecode_return, generate_bytecode_insns): Pass a
14083         NULL_PTR, not a NULL_TREE.
14085         * jv-scan.c: Include "jcf.h".
14086         (main): Declare using DEFUN macro.
14088         * jvspec.c (find_spec_file, lang_specific_pre_link,
14089         lang_specific_driver): Add prototypes.
14090         (find_spec_file): Constify a char*.
14092         * keyword.gperf (hash, java_keyword): Add prototypes.
14094         * lang.c (lang_print_error): Add static prototype.
14095         (lang_init): Prefer memcpy over bcopy to avoid casts.
14097         * lex.c (yylex): Add static prototype.
14099         * parse-scan.y: Include "lex.c" earlier.
14101         * parse.h: Remove redundant declaration for `yylex'.
14103         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14104         labeled_block_contains_loop_p): Add static prototypes.
14105         (not_accessible_p): Make static to match prototype.
14107         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14109 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14111         * parse.y (check_method_redefinition): Changed leading comment.
14112         (check_abstract_method_definitions): New function.
14113         (java_check_abstract_method_definitions): New function.
14114         (java_check_regular_methods): Call it.
14115         (verify_constructor_super): Fixed indentation.
14116         (lookup_method_invoke): Likewise.
14118 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14120         * parse.y (method_header): Return a null pointer if the current
14121         class node is null.
14122         (finish_method_declaration): Return if the current function decl
14123         is null.
14124         (source_start_java_method): Likewise.
14125         (java_method_add_stmt): Likewise.
14127 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14129         * class.c (emit_register_class): Removed unnecessary call to
14130         start_sequence.
14131         * parse.y (labeled_block_contains_loop_p): Removed unused local
14132         variable.
14134 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14136         * parse.y (java_refold): Added prototype.
14138 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14140         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14141         (java_stabilize_reference): Removed unnecessary `else'.
14142         (java_complete_lhs): Set flag to remember boolean. Call
14143         java_refold. Added comments.
14144         (java_decl_equiv): New function.
14145         (binop_compound_p): Likewise.
14146         (java_refold): Likewise.
14147         (patch_unaryop): Striped static field access assigned to decl and
14148         op. Changed promotion scheme for ++/-- operators.
14149         (search_loop): New function.
14150         (labeled_block_contains_loop_p): Likewise.
14151         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14152         comment.
14153         (patch_bc_statement): Call search_loop. Fixed comment.
14155 1999-08-14  Anthony Green  <green@cygnus.com>
14157         * expr.c (java_lang_expand_expr): Mark static array data as
14158         referenced.
14160 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14162         * jvgenmain.c (main): NUL-terminate name_obstack.
14164 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14166         * check-init.c (check_bool2_init, done_alternative): Add static
14167         prototypes.
14169         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14170         (add_method, build_utf8_ref, build_class_ref,
14171         append_gpp_mangled_type, layout_class_method): Constify a char*.
14173         * decl.c (push_promoted_type, make_binding_level): Add static
14174         prototypes.
14175         (push_promoted_type, pushdecl): Constify a char*.
14177         * except.c (find_handler_in_range, link_handler,
14178         check_start_handlers): Add static prototypes.
14180         * expr.c (process_jvm_instruction): Constify a char*.
14182         * gjavah.c (main): Constify a char*.
14184         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14185         Constify a char*.
14187         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14188         static prototypes.
14189         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14190         munge, print_ents): Constify a char*.
14192         * jcf-dump.c (disassemble_method): Constify a char*.
14193         (print_constant_pool, print_exception_table): Add static prototypes.
14194         (print_constant, print_exception_table, main, disassemble_method):
14195         Constify a char*.
14197         * jcf-io.c (find_classfile, find_class): Likewise.
14199         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14200         (set_source_filename, predefined_filename_p): Add static prototypes.
14201         (set_source_filename, get_constant, get_class_constant,
14202         find_in_current_zip): Constify a char*.
14204         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14205         static prototypes.
14206         (add_entry, add_path, jcf_path_classpath_arg,
14207         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14209         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14210         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14211         jcf_parse_one_method, jcf_parse_methods,
14212         jcf_parse_final_attributes): Add static prototypes.
14213         (get_attribute): Constify a char*.
14215         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14216         jcf_dependency_add_target, jcf_path_classpath_arg,
14217         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14219         * jv-scan.c (main): Constify a char*.
14220         (gcc_obstack_init): Add prototype arguments.
14222         * jvgenmain.c (gcc_obstack_init): Likewise.
14223         (main): Constify a char*.
14225         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14226         static prototypes.
14227         (put_decl_string, lang_print_error): Constify a char*.
14228         (lang_init): Remove redundant extern prototype.
14230         * mangle.c (emit_unicode_mangled_name): Constify a char*.
14232         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14233         Add static prototypes.
14234         (get_type_from_signature): Constify a char*.
14236         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14237         Add static prototypes.
14238         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14239         (verify_jvm_instructions): Constify a char*.
14241         * xref.c (xref_flag_value): Likewise.
14243         * xref.h (xref_flag_value): Likewise.
14245         * zextract.c (makeword, makelong): Add static prototypes.
14246         (makeword, makelong): Constify a uch*.
14248 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14250         * lang.c (java_dummy_print): Constify a char*.
14251         (lang_print_error): Likewise.
14252         (lang_init): Remove redundant prototype for `print_error_function'.
14253         (lang_init_source): Likewise.
14254         (lang_identify): Constify a char*.
14256 1999-08-09  Tom Tromey  <tromey@cygnus.com>
14258         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14259         (WORDS_TO_LONG): Likewise.
14260         (WORDS_TO_DOUBLE): Likewise.
14262 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14264         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14266         * expr.c (java_stack_pop, java_array_data_offset,
14267         build_java_throw_out_of_bounds_exception, case_identity,
14268         build_java_check_indexed_type): Add static prototypes.
14269         (linenumber_table, expand_invoke, expand_java_field_op,
14270         build_primtype_type_ref, expand_byte_code): Constify a char*.
14272         * java-tree.h (build_primtype_type_ref, linenumber_table):
14273         Constify a char*.
14274         (java_lang_expand_expr): Add prototype.
14276         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
14277         `java_lang_expand_expr'.
14279         * lex.c (java_lex_error): Constify a char*.
14280         (java_get_unicode, java_read_char, java_allocate_new_line,
14281         java_unget_unicode, java_sneak_unicode): Prototype.
14283         * parse-scan.y (current_class, package_name, method_declarator,
14284         report_class_declaration, yyerror): Constify a char*.
14286         * parse.h (java_report_errors): Prototype.
14287         (yyerror): Constify a char*.
14289         * parse.y (classitf_redefinition_error, check_modifiers,
14290         parse_jdk1_1_error, lookup_package_type,
14291         lookup_package_type_and_set_next, get_printable_method_name,
14292         purify_type_name): Constify a char*.
14293         (build_super_invocation, maybe_generate_finit,
14294         verify_constructor_super, parser_add_interface,
14295         add_superinterfaces, jdep_resolve_class, note_possible_classname,
14296         java_complete_expand_methods, java_expand_finals,
14297         cut_identifier_in_qualified, java_stabilize_reference,
14298         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14299         merge_string_cste): Prototype.
14300         (single_type_import_declaration, yyerror,
14301         variable_redefinition_error, build_array_from_name,
14302         build_unresolved_array_type, check_class_interface_creation,
14303         resolve_class, complete_class_report_errors,
14304         note_possible_classname, read_import_dir,
14305         find_in_imports_on_demand, resolve_package, fix_constructors,
14306         check_deprecation, lookup_method_invoke,
14307         maybe_build_primttype_type_ref, array_constructor_check_entry):
14308         Constify a char*.
14309         (java_complete_expand_methods, java_expand_finals): Make static.
14310         (convert_narrow): Remove static prototype.
14312 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
14314         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14316 1999-08-02  Richard Henderson  <rth@cygnus.com>
14318         * decl.c: Include defaults.h instead of expr.h.
14319         * parse.y: Likewise.
14321 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
14323         * java/decl.c (start_java_method): Change all uses of
14324         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14325         Ensure expr.h is included.
14326         * java/expr.c (pop_arguments): Ditto.
14327         * java/parse.y (expand_start_java_method): Ditto.
14329 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14331         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14333 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
14335         * decl.c: Include "function.h".
14336         * except.c: Likewise.
14337         * parse.y: Likewise.
14338         * Makefile.in: Update dependencies.
14340 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14342         * expr.c (build_java_soft_divmod): Provide a default case in switch.
14343         (java_lang_expand_expr): Mark parameters `target', `tmode' and
14344         `modifier' with ATTRIBUTE_UNUSED.
14346         * gjavah.c (process_file): Add braces around ambiguous `else'.
14348         * jcf-dump.c (print_access_flags, localvar_free): Change return
14349         type to void.
14351         * parse.y (java_complete_expand_method): Initialize variable
14352         `exception_copy'.
14353         (resolve_qualified_expression_name): Likewise for `field_decl'.
14354         (patch_method_invocation): Likewise for `class_to_search'.
14355         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14356         (patch_assignment): Likewise for `lhs_type'.
14358         * verify.c (verify_jvm_instructions): Remove unused variable
14359         `caller'.
14361 1999-07-25  Richard Henderson  <rth@cygnus.com>
14363         * decl.c (va_list_type_node): New.
14365 1999-07-25  Anthony Green  <green@cygnus.com>
14367         * gjavah.c (print_stub): New function.
14368         (METHOD_IS_NATIVE): New macro.
14369         (print_mangled_classname): Make static.
14370         (HANDLE_END_FIELD): Don't emit fields during stub generation.
14371         (process_file): Perform stub generation.
14372         (HANDLE_METHOD): Don't emit class decls during stub
14373         generation.
14374         (HANDLE_END_METHOD): Take into account stub generation.
14375         (print_method_info): Handle stub generation.
14376         (print_stub): New function.
14377         (print_cxx_classname): Make signature consistant with others.
14378         (help): Describe -stubs option.
14379         (main): Create stub file.
14380         (version): Use version.c.
14381         (print_full_cxx_name): New function.
14382         (print_c_decl): Use print_full_cxx_name.
14384 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14386         * check-init.c (check_init): Handle MAX_EXPR.
14388 1999-07-15  Andrew Haley  <aph@cygnus.com>
14390         * lang.c (flag_use_divide_subroutine): New variable.
14391         * typeck.c: (convert_ieee_real_to_integer): Bounds check
14392         fp-to-integer conversion.
14393         (convert): Call convert_ieee_real_to_integer when flag_fast_math
14394         is not set.
14396         * expr.c (build_java_soft_divmod): New function.
14397         (build_java_binop): Call build_java_soft_divmod if
14398         flag_use_divide_subroutine is set.
14399         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14400         soft_lrem_node: new builtin functions.
14401         (init_decl_processing) Initialize the new builtins.
14402         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14403         soft_lrem_node: new builtin functions.
14404         (build_java_soft_divmod): New function.
14405         * parse.y: Call build_java_soft_divmod if
14406         flag_use_divide_subroutine is set.
14407         * parse.c: Rebuilt.
14409         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
14410         a --specs= arg) even if not linking.
14411         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
14412         -fuse-divide-subroutine
14414 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14416         * parse.y (resolve_and_layout): Check methods only once.
14417         (resolve_qualified_expression_name): Verify thrown exceptions
14418         compatibility.
14419         (check_thrown_exceptions): Reject exceptions thrown in
14420         initializer. Error message tuned.
14422 1999-07-14  Andrew Haley  <aph@cygnus.com>
14424         * expr.c (expand_expr): Do not return the last statement in a
14425         block as the block's value.
14427 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14429         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14430         CALL_EXPR, to avoid order of evaluation changes.
14432 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14434         * parse.y (qualify_ambiguous_name): Do not use
14435         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14437 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14439         * check-init.c (check_init): Handle MAX_EXPR.
14440         * expr.c (force_evaluation_order): Force method call arguments to
14441         be evaluated in left-to-right order.
14442         * parse.y (qualify_ambiguous_name): Loop again to qualify
14443         NEW_ARRAY_EXPR properly.
14445 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14447         * parse.y (patch_invoke): Resolve unresolved invoked method
14448         returned type.
14449         (qualify_ambiguous_name): STRING_CST to qualify expression for
14450         type name resolution.
14452 1999-06-24  Andrew Haley  <aph@cygnus.com>
14454         * class.c (finish_class): Whenever a deferred method is
14455         output, rescan the list of methods to see if a new candidate for
14456         output can be found.
14458 1999-06-28  Tom Tromey  <tromey@cygnus.com>
14460         * jvspec.c (lang_specific_driver): Recognize --help.
14462 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14464         * parse.y (resolve_package): Fixed bogus return statement.
14465         (patch_method_invocation): Resolve method invocation beginning with
14466         a package name qualifier.
14468 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14470         * Make-lang.in (java.stage1): Depend on stage1-start.
14471         (java.stage2): Likewise for stage2-start.
14472         (java.stage3): Likewise for stage3-start.
14473         (java.stage4): Likewise for stage4-start.
14475 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14477         * parse.y (java_complete_lhs): When doing cross referencing, don't
14478         try to keep file location on a WFL expanded as a CALL_EXPR.
14480 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14482         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
14483         compiling to class file a void method with an empty method body.
14484         As a side effect, the bytecode backend will generate the
14485         appropriate `return' instruction.
14487 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14489         * parse.y (lookup_package_type_and_set_next): New function prototype.
14490         (resolve_package): Search current and imported packages.
14491         (lookup_package_type_and_set_next): New function.
14493 1999-06-22  Andrew Haley  <aph@cygnus.com>
14495         * verify.c (verify_jvm_instructions): Check for pending blocks
14496         before invalid PC test and opcode switch, not after.
14498 1999-06-21  Andrew Haley  <aph@cygnus.com>
14500         * except.c (find_handler_in_range): The upper limit for exception
14501         ranges is exclusive, not inclusive: (start <= pc < end).
14502         (link_handler): find child pointer which points to outer by
14503         searching sibling list: previous code incorrectly assumed that
14504         outer->outer->first_child must point to outer.
14505         * verify.c (verify_jvm_instructions): FIXME added to code for
14506         `athrow'.
14507         (verify_jvm_instructions): Do not assume that the last block
14508         processed in a subroutine is a block which ends with a `ret'
14509         instruction.  With some control flows it is possible that the last
14510         block ends with an `athrow'.
14512 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14514         * parse.y (qualify_ambiguous_name): Reorganized the post
14515         evaluation of non WFL leading expression nodes.
14517 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14519         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14520         CONVERT_EXPR.
14522 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14524         * parse.y (qualify_ambiguous_name): Handle qualified expression
14525         beginning with a STRING_CST.
14527 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14529         * parse.y (register_fields): Set DECL_INITIAL on both
14530         pre-initialized static and public fields.
14531         (resolve_field_access): Static field access expressions to always
14532         use pointer types.
14533         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
14534         qualification. CONVERT_EXPR to be resolved as an expression name.
14535         (java_complete_lhs): Identify and access qualified final
14536         initialized field in switch statement case expression.
14537         (fold_constant_for_init): Pre-initialized field decl constant to
14538         be folded.
14540 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14542         * parse.y (note_possible_classname): Mark returned node with
14543         QUALIFIED_P only if the original class name contained a '/'.
14545 1999-06-05  Anthony Green  <green@cygnus.com>
14547         * Make-lang.in (gcjh): More parallel build fixes.
14549 1999-06-03  Mike Stump  <mrs@wrs.com>
14551         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
14553 1999-06-02  Anthony Green  <green@cygnus.com>
14555         * except.c (link_handler): Chain exception handlers in order.
14557 1999-06-02  Anthony Green  <green@cygnus.com>
14559         * expr.c (expand_byte_code): Fill unreachable bytecode regions
14560         with nops and process as usual in order to always set correct EH
14561         ranges.  Emit detailed warnings about unreachable bytecodes.
14563 1999-06-02  Anthony Green  <green@cygnus.com>
14565         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
14566         constant.
14568 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14570         * parse.y (lookup_field_wrapper): Unified returned value to NULL
14571           or the searched field decl.
14573 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14575         * parse.y (fold_constant_for_init): Convert numerical constant
14576         values to the type of the assigned field.
14578 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14580         * expr.c (lookup_field): Relaxed the test on class loading error
14581         detection.
14582         * parse.y (fold_constant_for_init): Enabeled old code.
14584 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14586         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
14587         decide the validity of the cast of a java.lang.Cloneable reference
14588         to an array.
14589         (patch_conditional_expr): Fixed first argument passed to
14590         binary_numeric_promotion.
14592 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14594         * parse.y (qualify_ambiguous_name): Take into account that a
14595         CONVERT_EXPR might specify a type as a WFL.
14597 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14599         * parse.y (patch_assignment): Save the rhs before using it as an
14600         argument to _Jv_CheckArrayStore.
14602 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14604         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
14606 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14608         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
14609         floating point literal only when the exponent indicator has been
14610         parsed.
14612 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14614         * parse.y (formal_parameter:): Construct argument tree list
14615         element even if a yet unsupported final parameter was encountered.
14617 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14619         * parse.y (finish_method_declaration): Issue errors for native or
14620         abstract methods declared with a method body, as well as for non
14621         native or non abstract methods with no method body.
14623 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14625         * class.c (build_utf8_ref): Initialize variable `field'.
14627         * decl.c (init_decl_processing): Initialize variable `field'.
14629         * expr.c (build_known_method_ref): Mark parameters `method_type',
14630         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
14631         (process_jvm_instruction): Likewise for parameter `length'.
14633         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
14634         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
14635         ATTRIBUTE_UNUSED.
14637         * parse.y (maybe_generate_clinit): Remove unused variable
14638         `has_non_primitive_fields'.
14639         (find_in_imports_on_demand): Initialize variables `node_to_use'
14640         and `cl'.
14641         (patch_binop): Likewise for variable `prom_type'.
14642         (patch_unaryop): Likewise for variable `prom_type'.
14644         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
14646         * xref.c (xref_table): Add missing initializer.
14648 1999-05-14  Tom Tromey  <tromey@cygnus.com>
14650         * java-except.h (struct eh_range): Removed unused `next' member.
14651         * verify.c (verify_jvm_instructions): Call check_nested_ranges
14652         after adding all exception handlers.  Sort exception ranges in
14653         order of start PC.
14654         (struct pc_index): New structure.
14655         (start_pc_cmp): New function.
14656         * except.c (add_handler): Return `void'.  Don't call link_handler;
14657         instead construct an ordinary linked list and do range
14658         coalescing.
14659         (check_nested_ranges): New function.
14660         (link_handler): Changed interface to allow merging of eh_ranges.
14661         Split overlapping ranges.  Return `void'.
14663 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14665         * parse.y (constructor_block_end:): New rule, tagged <node>.
14666         (constructor_body:): Use `constructor_block_end' instead of
14667         `block_end'.
14669 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14671         * parse.y (statement_nsi:): Pop `for' statement block.
14672         (java_complete_lhs): Labeled blocks containing no statement are
14673         marked as completing normally.
14675 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14677         * xref.c (xref_set_current_fp): New function, defined.
14678         * xref.h (xref_set_current_fp): New function, prototyped.
14680 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14682         * check-init.c (check_init): Take into account that
14683         LABELED_BLOCK_STMT can be empty.
14685 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14687         * parse.y (java_check_regular_methods): Warning check on not
14688         overriding methods with default access in other packages does not
14689         apply to `<clinit>'.
14690         (java_complete_lhs): If block body is an empty_stmt_node, replace
14691         it by NULL_TREE. This prevents gcc from generating an irrelevant
14692         warning.
14694 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14696         * check-init.c (check_init): Removed code accepting to see things
14697         falling through default:, when doing xrefs.
14698         * java-tree.h (do_not_fold): New global variable, declared.
14699         * parse.y (do_not_fold): New global variable, defined.
14700         (java_complete_expand_method): Set `do_not_fold' to the value of
14701         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
14702         and reinstall them after them have been purged; do not check for
14703         initializations; do not issue missing return errors.
14704         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
14705         when doing xrefs.
14706         (patch_binop): Skip the fold part when doing xrefs.
14707         (build_string_concatenation): Skip the concatenation part when
14708         doing xrefs.
14709         (patch_synchronized_statement): Do not generate a try-finally when
14710         doing xrefs.
14711         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
14712         and keep the location where the throw was seen.
14713         * typeck.c (convert): When `do_not_fold' is set, do not attempt
14714         any treatment on the converted node an simply return a NOP_EXPR of
14715         the targeted type.
14716         * xref.c (xref_get_data): New function, defined.
14717         * xref.h (xref_get_data): New function, declared.
14718         (XREF_GET_DATA): Use xref_get_data.
14720 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14722         * gjavah.c (print_include): Cast the result of `strlen' to int
14723         when comparing against a signed value.
14724         (add_namelet): Likewise.
14726 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14728         * expr.c (expand_invoke): Mark parameter `nargs' with
14729         ATTRIBUTE_UNUSED.
14730         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
14732         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
14733         ATTRIBUTE_UNUSED.
14735         * jcf-reader.c (get_attribute): Cast a value to long
14736         when comparing against a signed expression.  Likewise.
14738         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
14739         HOST_BITS_PER_CHAR.
14741 1999-05-11  Andrew Haley  <aph@cygnus.com>
14743         * parse.y (source_end_java_method): If the current method contains
14744         any exception handlers, force asynchronous_exceptions: this is
14745         necessary because signal handlers in libjava may throw exceptions.
14746         * decl.c (end_java_method): Ditto.
14748 1999-05-11  Tom Tromey  <tromey@cygnus.com>
14750         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
14751         flags.
14752         * jvspec.c (THREAD_NAME): Removed.
14753         (GC_NAME): Likewise.
14754         (MATHLIB): Likewise.
14755         (WITHLIBC): Likewise.
14756         (GCLIB): Likewise.
14757         (THREADLIB): Likewise.
14758         (MATH_LIBRARY): Likewise.
14759         (lang_specific_driver): Don't add `-l' options to command line.
14760         Instead, add a single --specs option.  Recognize `-L' options and
14761         use them to search for spec file.
14762         (find_spec_file): New function.
14763         (SPEC_FILE): New define.
14765 1999-05-11  Dave Brolley  <brolley@cygnus.com>
14767         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
14768         cpplib-enabled build.
14770 1999-05-05  Per Bothner  <bothner@cygnus.com>
14772         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
14773         temporarily zero it while calling rest_of_decl_compilation.
14775         * java-tree.h (string_ptr_type_node):  Add declaration.
14776         * decl.c:  Define and initialize string_ptr_type_node.
14777         * parse.y (patch_string_cst):  Use string_ptr_type_node.
14779         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
14780         * parse.y (for_statement):  Now unconditionally exit_block.
14781         (finish_labeled_statement):  No longer exit_block if for-loop.
14782         (patch_loop_statement):  Check harder if the loop is already labeled.
14784         * parse.y (patch_initialized_static_field):  Removed function.
14785         (maybe_generate_clinit):  Removed special handling for interfaces.
14786         (java_complete_expand_methods):  Do a preliminary java_complete_tree
14787         on <clinit> to determine if it can be removed.
14788         (java_complete_expand_method):  Remove special handling for <clinit>.
14789         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
14790         optimize if we get back empty_stmt_node.
14791         For MODIFY_EXPR, re-do checking of static initializers.
14792         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
14793         For VAR_DECL, pass correct context.
14795         * verify.c (verify_jvm_instructions):  Better error messages.
14797 1999-05-03  Tom Tromey  <tromey@cygnus.com>
14799         * parse-scan.y (interface_declaration): Call
14800         report_class_declaration for interfaces.
14802 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
14804         * Makefile.in: Remove -v from bison command lines.
14806 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14808         * check-init.c (check_init): Exclude a case of error when doing
14809         xrefs.
14810         * class.c (layout_class_method): Don't generate the error message
14811         twice when compiling from source.
14812         * lang-options.h: Added `-Wredundant-modifers' and
14813         `-Wunusupported-jdk11' flags and help text.
14814         * lang.c (lang_decode_option): Added support for
14815         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
14816         flag_static_local_jdk11 and flag_redundant set accordingly.
14817         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
14818         * parse.h (EXPR_WFL_ADD_COL): New macro.
14819         (DECL_END_SOURCE_LINE): Likewise.
14820         (DECL_INHERITED_SOURCE_LINE): Likewise.
14821         * parse.y (static_ref_err): New function, prototyped.
14822         (CCB_TK): Now tagged <operator>.
14823         (class_body:): Remember the location of the closing '}' of a class
14824         definition when doing xrefs.
14825         (block:): Likewise.
14826         (block_end:): Likewise.
14827         (create_class): Remember the location of the inherited class
14828         identifier when doing xrefs.
14829         (register_fields): Added test on first operand of `init' before
14830         testing it TREE_CODE.
14831         (method_header): Store the location of the class identifier in the
14832         class decl when doing xrefs.
14833         (finish_method_declaration): Don't combine first/last method line
14834         when doing xref.
14835         (java_check_regular_methods): Warning check on not overriding
14836         methods with default access on other packages move before check on
14837         static methods. Initialization of `aflags' also moved up.
14838         (resolve_expression_name): Call static_ref_err to report the error.
14839         (static_ref_err): New function, implemented.
14840         (resolve_field_access): Returned simplified static field access
14841         when doing xrefs.
14842         (resolve_qualified_expression_name): Check for illegal use of
14843         static fields in a non static context. Call static_ref_err to
14844         report error in various places.
14845         (java_complete_tree): Do not fold initialized static fields when
14846         doing xrefs.
14847         (java_complete_lhs): Likewise.
14849 1999-04-29  Anthony Green  <green@cygnus.com>
14851         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
14852         create internal labels.
14853         (lookup_label): Ditto.
14855 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14857         * class.c (layout_class_method): Generate <clinit>'s rtl for
14858         interfaces.
14859         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14860         for interfaces' <clinit>.
14861         * expr.c (lookup_field): Search for fields in interfaces.
14862         (expand_invoke): Fixed indentation.
14863         (expand_java_field_op): Likewise. Use IS_CLINIT.
14864         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
14865         (IS_CLINIT): New macro.
14866         * parse.y (type_declaration:): Call maybe_generate_clinit after an
14867         interface was parsed.
14868         (maybe_generate_clinit): Don't generate if the current class is an
14869         interface with only fields of primitive types.
14870         (reset_method_name): Use IS_CLINIT.
14871         (java_complete_expand_method): Expand <clinit> when it exists for
14872         interfaces. Use IS_CLINIT.
14873         (resolve_expression_name): Use DECL_CONTEXT instead of
14874         current_class to build static field references.
14875         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
14876         ARRAY_REF when doing xreferencing.
14877         (check_final_assignment): Fixed typo in leading comment. Use
14878         IS_CLINIT.
14879         (patch_array_ref): Don't fully expand array references when
14880         xreferencing.
14881         (patch_return): Use IS_CLINIT.
14882         (patch_throw_statement): Likewise.
14884 1999-04-22  Tom Tromey  <tromey@cygnus.com>
14886         * Make-lang.in (JAVA_SRCS): Added check-init.c.
14888 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14890         * decl.c (predef_filenames, predef_filenames_size): New globals
14891         (init_decl_processing): predef_filenames and predef_filenames_size
14892         initialized.
14893         * java-tree.h (predef_filenames, predef_filenames_size): Declared
14894         extern.
14895         * jcf-parse.c (predefined_filename_p): New function.
14896         (yyparse): Check that files on the command line are specified only
14897         once and issue a warning otherwise.
14898         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
14899         * parse.y (source_end_java_method): Nullify NOP method bodies, to
14900         avoid a gcc warning with -W -Wall turned on.
14901         (java_expand_classes): Abort if errors were encountered.
14902         (java_complete_lhs): If the cross reference flag is set, wrap
14903         field DECL node around a WFL when resolving expression name.
14905 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14907         * lang.c (lang_decode_option): Fixed returned value when parsing
14908         `-fxref=...' and `-Wall'.
14909         * parse.y (source_end_java_method): Do not generate code when
14910         flag_emit_xref is set.
14911         (resolve_expression_name): Do not build static field access when
14912         flag_emit_xref is set.
14913         (resolve_field_access): No special treatment on `length' when
14914         flag_emit_xref is set. Do not build qualified static field access
14915         when flag_emit_xref is set.
14916         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
14917         when flag_emit_xref is set.
14918         (patch_assignment): Do not generate array store runtime check when
14919         flag_emit_xref is set.
14920         * xref.c (xref_flag_value): Fixed function declaration
14921         indentation.
14922         (xset_set_data): New function.
14923         * xref.h (xref_set_data): Added prototype for new function.
14924         (typedef struct xref_flag_table): New field data.
14925         (XREF_GET_DATA): New macro.
14927 1999-04-19  Tom Tromey  <tromey@cygnus.com>
14929         * xref.h (enum): Removed trailing comma.
14931         * parse.y (resolve_qualified_expression_name): Added missing
14932         `break'.
14934 1999-04-15  Anthony Green  <green@cygnus.com>
14936         * gjavah.c: New prototypes for java_float_finite and
14937         java_double_finite.
14939 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14941         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
14942         references.
14944 1999-04-06  Jeffrey A Law  (law@cygnus.com)
14946         * Makefile.in (TREE_H): Add tree-check.h.
14947         (RTL_H): Add genrtl.h.
14949 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14951         * parse.y (patch_assignment): Added ArrayStoreException runtime
14952         check.
14954 1999-04-06  Per Bothner  <bothner@cygnus.com>
14956         * expr.c (pop_type_0):  New function.
14957         (pop_type):  Use pop_type_0.
14958         * java-tree.h (pop_type_0):  New declaration.
14959         * verify.c (verify_jvm_instructions):  Check return instructions.
14961         * parse.y (patch_binop):  Don't fold if non-constant and emiting
14962         class files.
14964 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14966         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
14968         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
14969         (main_jcf): Don't define.
14970         (process_file): Don't set `main_jcf'.
14972         * java-tree.h (main_jcf): Don't declare.
14974         * jcf-parse.c (main_jcf): Add static definition.
14976         * lang.c (main_jcf): Don't define.
14978 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14980         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
14982         * decl.c (copy_lang_decl): Likewise for `bcopy'.
14984         * jcf-depend.c: Include "config.h", not <config.h>.
14986         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
14987         `bcopy' to PTR.
14989         * jcf-path.c: Include "config.h", not <config.h>.
14991         * lex.c: Don't include various system header files.
14992         (java_init_lex): Cast the argument of `bzero' to PTR
14994         * parse-scan.y (java_push_parser_context): Likewise.
14996         * parse.y (java_push_parser_context): Likewise.
14997         (patch_bc_statement): Match format specifier to variable argument.
14999         * xref.c: Don't include <stdio.h>.
15001 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15003         * parse.y (struct parser_ctxt *ctxp): Now global.
15004         (declare_local_variables): Use WFL compound value for the
15005         declaration source line value, when doing cross-referencing.
15007 1999-03-31  Tom Tromey  <tromey@cygnus.com>
15009         * gjavah.c (print_field_info): Allow constants of other types.
15010         (print_include): Generate include when new name is proper prefix
15011         of already printed name.
15012         (add_namelet): Likewise.
15013         (cxx_keyword_subst): New function.
15014         (print_method_info): Use it.
15015         (print_field_name): New function.
15016         (get_field_name): New function.
15017         (print_field_info): Use get_field_name and print_field_name.
15019 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15021         * Makefile.in (keyword.h): Generate using gperf language 'C', not
15022         'KR-C', so gperf uses the `const' keyword on strings.
15024         * keyword.gperf (java_keyword): Const-ify a char*.
15026 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15028         * parse.y (patch_bc_statement): Fixed identation and a bogus
15029         `printf' format.
15031 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15033         * parse.y (patch_assignment): Allow static variables in other
15034         classes to be assigned.
15036 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15038         * class.c (maybe_add_interface): Remove unused variable
15039         `interface_binfo'.
15040         (make_class_data): Use = for assignment, not ==.  Likewise.
15041         (emit_register_classes): Remove unused variable `decl'.
15043         * lex.c: Fix comment so as not to contain an embedded `/*'.
15045         * verify.c (verify_jvm_instructions): Remove unused variable
15046         `self_type'.
15048 1999-03-27  Per Bothner  <bothner@cygnus.com>
15050         * parse.y (complete_loop_body):  Rename to finish_loop_body.
15051         (complete_labeled_statement):  Rename to finish_labeled_statement.
15052         (complete_for_loop):  Rename to finish_for_loop.
15053         (complete_method_declaration):  Rename to finish_method_declaration.
15055         * java-tree.h (continue_identifier_node):  New global node.
15056         * decl.c:  Define and initialize continue_identifier_node.
15057         * parse.y (generate_labeled_block):  Remove - no longer needed.
15058         (build_loop_body):  Use continue_identifier_node for continue block.
15059         (finish_labeled_statement):  Also do pop_labeled_block actions.
15060         (java_complete_lhs):  POP_LOOP even if error.
15061         (build_labeled_block):  Special handling for continue_identifier_node.
15062         (patch_loop_statement):  Re-organize.
15063         (patch_bc_statement):  Re-write.
15065 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15067         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15068         using a WFL compound value.
15069         * parse.y (xref.h): Include.
15070         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15071         WFL compound value.
15072         (register_fields): Set WFL compound value to lineno if doing
15073         xrefs.
15074         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15075         is set.
15076         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15077         * xref.h (expand_xref): Prototype renamed from xref_generate.
15079 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15081         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15082         (GET_CURRENT_BLOCK): New macro.
15083         * parse.y (current_static_block): New global variable.
15084         (method_body:): Define action.
15085         (complete_method_declaration): Set current_function_decl to NULL
15086         when work on the current method is done.
15087         (declare_local_variables): Use GET_CURRENT_BLOCK.
15088         (java_method_add_stmt): Likewise.
15089         (java_complete_expand_method): Disable the use of `this' when
15090         expanding <clinit>.
15091         (enter_a_block): If no current method exist, use
15092         current_static_block to link static initializer blocks.
15093         (exit_block): Rewritten to use current_static_block when no current
15094         method decl exists.
15095         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15096         (patch_return): Forbid the use of `return' in static initializers.
15097         (patch_throw_statement): Fixed indentation. Issue specific error
15098         for uncaught thrown checked exception in static initializer
15099         blocks. Removed FIXME.
15101 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15103         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15104         Link gcj from gcc.o.
15106 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15108         * parse.y (find_applicable_accessible_methods_list): When dealing
15109         with interface: ensure that a given interface or java.lang.Object
15110         are searched only once.
15112 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15114         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15116         * jcf-dump.c (print_access_flags): Add braces around if-else.
15118         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15119         COMBINE_INPUTS.
15121         * lex.c (build_wfl_node): Add static prototype.
15123         * lex.h (build_wfl_node): Remove static prototype.
15125         * parse.y: Include lex.c early enough to declare everything needed.
15126         Ensure calls to `build_wfl_node' pass the proper arguments.
15127         (create_class): Remove unused variable `super_decl'.
15128         (get_printable_method_name): Initialize variable `name'.
15130 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15132         * Changelog: Fixed 1999-03-22 typos.
15133         * lang.c (lang_decode_option): Fixed typo in error string in the
15134         XARG section.
15136 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15138         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15139         (xref.o): New rule.
15140         * java-tree.h (flag_emit_xref): Declared extern.
15141         * lang.c (xref.h): Included.
15142         (flag_emit_xref): New global variable.
15143         (lang_decode_option): Added support for -fxref.
15144         * xref.c: Created.
15145         * xref.h: Likewise.
15147 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15149         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15150         linked with.
15152 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15154         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15155         $(srcdir)/../system.h and $(JAVA_TREE_H).
15156         (jcf-io.o): Depend on $(JAVA_TREE_H).
15157         (mangle.o): Likewise.
15159         * check-init.c (check_cond_init): Add static prototype.
15161         * class.c (build_java_method_type, hashUtf8String,
15162         make_field_value, get_dispatch_vector, get_dispatch_table,
15163         append_gpp_mangled_type, mangle_static_field): Likewise.
15164         (strLengthUtf8): Hide unused definition.
15165         (hashUtf8String): Const-ify.
15166         (make_field_value): Un-ANSI-fy.
15168         * constants.c: Move inclusion of jcf.h above java-tree.h.
15169         (set_constant_entry, find_class_or_string_constant,
15170         find_name_and_type_constant, get_tag_node,
15171         build_constant_data_ref): Add static prototype.
15173         * decl.c (push_jvm_slot, builtin_function,
15174         lookup_name_current_level): Likewise.
15175         (builtin_function): Const-ify.
15177         * except.c (expand_start_java_handler, expand_end_java_handler):
15178         Add static prototype.
15180         * expr.c (flush_quick_stack, push_value, pop_value,
15181         java_stack_swap, java_stack_dup, build_java_athrow,
15182         build_java_jsr, build_java_ret, expand_java_multianewarray,
15183         expand_java_arraystore, expand_java_arrayload,
15184         expand_java_array_length, build_java_monitor, expand_java_pushc,
15185         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15186         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15187         expand_compare, expand_test, expand_cond, expand_java_goto,
15188         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15189         expand_java_field_op, java_push_constant_from_pool): Likewise.
15191         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15192         (build_java_arraynull_check): Mark parameters `node' and `type'
15193         with ATTRIBUTE_UNUSED.
15194         (note_label): Likewise for parameter `current_pc'.
15195         (expand_java_call, expand_java_ret): Hide unused definition.
15197         * java-tree.h (make_class, build_constants_constructor,
15198         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15199         init_outgoing_cpool, register_class, emit_register_classes,
15200         java_layout_seen_class_methods): Prototype.
15201         (unicode_mangling_length): Const-ify.
15202         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15203         emit_unicode_mangled_name, format_int, format_uint,
15204         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15205         jcf_print_utf8_replace, open_class): Prototype.
15207         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15208         <stdio.h>.  Include tree.h/java-tree.h.
15209         (utf8_equal_string usage, process_class): Add static prototype.
15210         (open_class): Don't prototype this here.
15211         (utf8_equal_string): Match arguments to format specifiers.
15212         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15213         TABLE_SWITCH, disassemble_method): Likewise.
15215         * jcf-io.c: Include tree.h/java-tree.h.
15216         (open_class, find_classfile, jcf_print_utf8,
15217         jcf_print_utf8_replace): Const-ify.
15219         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15220         parse_class_file): Add static prototype.
15221         (find_in_current_zip): Match definition to existing static
15222         prototype.
15224         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15225         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15226         finish_jcf_block, define_jcf_label, get_jcf_label_here,
15227         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15228         write_chunks, adjust_typed_op, generate_bytecode_conditional,
15229         generate_bytecode_return, perform_relocations, init_jcf_state,
15230         init_jcf_method, release_jcf_state, generate_classfile):
15231         Add static prototype.
15232         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15233         (make_class_file_name): Const-ify.
15235         * jcf.h (find_classfile): Const-ify.
15237         * jv-scan.c (reset_report): Remove prototype.
15239         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15240         (error): Rewrite to allow varargs.
15242         * lang.c (lang_f_options): Const-ify.
15244         * lex.c (java_parse_escape_sequence): Add static prototype.
15245         (java_allocate_new_line): Match definition to existing static
15246         prototype.
15248         * mangle.c Include tree.h/java-tree.h.
15249         (unicode_mangling_length, emit_unicode_mangled_name,
15250         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15252         * parse.h (jdep_code): Remove trailing comma in enumeration.
15253         (java_get_line_col): Move prototype outside of !JC1_LITE test.
15254         (reset_report): Add prototype.
15256         * verify.c (push_pending_label, merge_types): Add static
15257         prototypes.
15259         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15261 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15263         * parse.y (find_applicable_accessible_methods_list): Extend the
15264         search to superinterfaces when relevant.
15265         (search_applicable_methods_list): New function.
15267 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15269         * class.c (unmangle_classname): Implemented stricter testing
15270         before setting the QUALIFIED_P flag on an identifier.
15272 1999-03-16  Per Bothner  <bothner@cygnus.com>
15274         * parse.y (java_complete_lhs):  Call force_evaluation_order
15275         after patch_newarray.
15276         (patch_binop):  Don't call fold if there are side effects.
15278 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15280         * parse.y (java_stabilize_reference): Use save_expr instead of
15281         building a SAVE_EXPR node.
15282         (java_complete_lhs): Patch the resulting string of the `+='
15283         operator (if necessary) and complete the RHS after having built
15284         the cast.
15286 1999-03-15  Per Bothner  <bothner@cygnus.com>
15288         * class.c (make_class):  Don't set CLASS_P here (because
15289         this function is also called by build_java_array_type).
15290         (push_class):  Set CLASS_P here instead.
15291         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
15293         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
15294         context.  If the context is class, perfer "super" over "synchronized".
15295         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
15297         * parse.y (create_class):  Don't call parser_check_super here;
15298         it is not robust.  Always wait until later.
15300         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
15301         match what JDK 1.2 does), but don't set ACC_PUBLIC.
15303 1999-03-13  Per Bothner  <bothner@cygnus.com>
15305         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
15306         * lex.h (UNGETC):  Change misleading macro.
15308 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15310         * parse.y (java_stabilize_reference): Return NODE when patching a
15311         COMPOUND_EXPR.
15312         (java_complete_lhs): Put parenthesis around truth values.
15314 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15316         * class.c (layout_class_method): Don't make rtl for interface
15317         methods.
15318         * parse.h (GET_TYPE_NAME): New macro.
15319         * parse.y (if_then_statement:): Fixed indentation.
15320         (if_then_else_statement:): Likewise.
15321         (for_statement:): Fixed spacing.
15322         (try_statement:): Fixed indentation.
15323         (create_interface): Don't force interfaces to be abstract.
15324         (method_header): Abstract methods are OK in interfaces.
15325         (declare_local_variables): Fixed typo in comment.
15326         (java_complete_expand_method): Fixed indentation.
15327         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15328         non accessible fields.
15329         (java_stabilize_reference): New function.
15330         (java_complete_lhs): Fixed indentation. Use
15331         java_stabilize_reference in compound assignment. Insert the
15332         cast. If not processing `+' fix string constants before processing
15333         binop.
15335 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15337         * constants.c (find_class_or_string_constant): Cast variable `j'
15338         to a `jword' when comparing against one.
15340         * expr.c (java_lang_expand_expr): Remove unused variables
15341         `has_finally_p' and `op0'.
15343         * gjavah.c (print_field_info): Cast a value to jint when comparing
15344         against one.  Likewise for a jlong.
15345         (add_namelet): Likewise cast a `sizeof' to an int when comparing
15346         against a signed quantity.
15348         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15349         (print_signature): Don't needlessly dereference variable `str'
15351         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15352         `max_locals' with ATTRIBUTE_UNUSED.
15353         (jcf_parse_class): Likewise for variable `index'.
15355         * parse.h (reverse_jdep_list): Remove static prototype.
15357         * parse.y (build_jump_to_finally): Remove prototype and definition.
15358         (reverse_jdep_list): Add static prototype.
15360         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15361         `assignment' and `expr_decl'.
15363         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15365 1999-03-12  Andrew Haley  <aph@cygnus.com>
15367         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15368         we'll need a directory separator and a null character.
15370 1999-03-10  Per Bothner  <bothner@cygnus.com>
15372         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
15374 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15376         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15377         interfaces.
15379 1999-03-05  Per Bothner  <bothner@cygnus.com>
15381         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
15383         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
15385         * class.c (layout_class_method):  A static method in a base class
15386         is never overridden, so treat it like it doesn't exist.
15387         However, do complain about private non-static method overriding
15388         public static method.
15390         * parse.y:  Don't set unused INITIALIZED_P flag.
15391         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
15393         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
15394         (build_array_from_name):  Re-order &index[string] to &string[index].
15396         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
15397         error_mark (it might catch more errors, but it is more likely to lose).
15399 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15401         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15402         (parse-scan.o): Depend on toplev.h.
15404         * class.c (make_method_value): Add prototype.  Make it static.
15405         Remove unused second argument, caller changed.
15407         * expr.c (java_lang_expand_expr): Remove unused variable
15408         `return_label'.
15410         * java-tree.h: Don't prototype find_in_current_zip.
15411         Add prototypes for verify_constant_pool, start_java_method,
15412         end_java_method, give_name_to_locals, expand_byte_code,
15413         open_in_zip, set_constant_value, find_constant1, find_constant2,
15414         find_utf8_constant, find_string_constant, find_class_constant,
15415         find_fieldref_index, find_methodref_index, write_constant_pool,
15416         count_constant_pool_bytes and encode_newarray_type.
15418         * jcf-dump.c: Remove unused variable `LONG_temp'.
15420         * jcf-parse.c: Include parse.h.
15421         (jcf_parse_source): Remove unused parameter, all callers changed.
15422         (jcf_figure_file_type): Add static prototype.
15423         (find_in_current_zip): Likewise.  Also remove unused parameter,
15424         all callers changed.
15425         (read_class): Initialize variable `saved_pos'.
15427         * jcf-reader.c (jcf_parse_preamble): Mark variables
15428         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
15430         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
15431         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
15432         (java_parse_doc_section): Initialize variable `seen_star'.
15433         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
15434         (java_lex_error): Mark parameters `msg' and `forward' with
15435         ATTRIBUTE_UNUSED.
15436         (java_get_line_col): Mark parameters `filename' and `line' with
15437         ATTRIBUTE_UNUSED.
15439         * parse-scan.y: Include toplev.h.
15440         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
15442         * parse.h: use `struct JCF', not plain `JCF'.
15443         (java_parser_context_save_global, java_expand_classes
15444         java_parser_context_restore_global, java_parse): Add prototypes.
15446         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15447         `node'.
15449 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
15451         *  check-init.c (check_init):  COPYN takes word count, not bit count.
15453 1999-02-26  Per Bothner  <bothner@cygnus.com>
15455         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
15456         explicit build_decl.  (Avoids crash in reload when optimizing.)
15458 1999-02-25  Per Bothner  <bothner@cygnus.com>
15460         * decl.c (complete_start_java_method):  Handle synchronized method
15461         even when compiling from bytecode.
15463 1999-02-26  Tom Tromey  <tromey@cygnus.com>
15465         * gjavah.c (add_class_decl): Only generate `#include' if outer
15466         class is not the name of the class we are processing.  Correctly
15467         append `.h' in #include.
15468         (process_file): Clean up newlines around generated `#include's.
15469         (decode_signature_piece): Correctly handle inner classes.
15470         (struct include): New structure.
15471         (all_includes): New global.
15472         (print_include): New function.
15473         (add_class_decl): Use it.
15474         (process_file): Likewise.
15475         (add_class_decl): Generate include for java-array.h if array
15476         seen.
15477         (process_file): Don't generate java-array.h include.
15479         * gjavah.c (add_namelet): Check for standard package names here.
15480         (add_class_decl): Don't check for standard package names here.
15482 1999-02-25  Tom Tromey  <tromey@cygnus.com>
15484         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
15485         When reading a zip file, only use strncmp if both strings are
15486         bigger than the buffer length.  Initialize `k' when looping
15487         through zip file.
15489 1999-02-24  Tom Tromey  <tromey@cygnus.com>
15491         * gjavah.c (struct namelet): New structure.
15492         (add_namelet): New function.
15493         (print_namelet): New function.
15494         (print_class_decls): Use add_namelet and print_namelet to generate
15495         namespaces and not classes.
15496         (method_printed): New global.
15497         (HANDLE_END_METHOD): Examine method_printed.
15498         (print_method_info): Set method_printed when required.  Print
15499         error if function to be ignored is marked virtual.  Handle $finit$
15500         method.
15501         (METHOD_IS_FINAL): New macro.
15502         (print_field_info): Use it.
15503         (HANDLE_METHOD): Clear method_printed.
15504         (method_pass): New global.
15505         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
15506         (process_file): Do two passes over both fields and methods.
15507         (HANDLE_METHOD): Examine method_pass.
15508         (root): New global.
15509         (add_class_decl): New function.
15510         (print_class_decls): Don't scan over entire constant pool.
15512 1999-02-23  Tom Tromey  <tromey@cygnus.com>
15514         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15515         disable linking in that case.
15517 1999-02-20  Tom Tromey  <tromey@cygnus.com>
15519         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15520         not 0x1f.
15522 1999-02-21  Per Bothner  <bothner@cygnus.com>
15524         * decl.c (build_result_decl), java-tree.h:  New method.
15525         (complete_start_java_method):  Handle synchronized methods.
15526         Don't build DECL_RESULT here.  (Ordering dependency problem.)
15527         (start_java_method):  Call build_result_decl here instead  ...
15528         * parse.y (java_complete_expand_method):  ... and here.
15529         (expand_start_java_method): Don't call complete_start_java_method here.
15530         (java_complete_expand_method):  Call it here instead.
15531         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
15532         * java-tree.h:  ... here.
15534         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
15535         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
15536         for ARRAY_REF - it doesn't work when array bounds are checked.
15537         (patch_array_ref):  Handle it here instead.
15539         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
15541 1999-02-19  Per Bothner  <bothner@cygnus.com>
15543         Force left-to-right evaluation of binary operations etc.
15544         * expr.c (force_evaluation_order), java-tree.h:  New function.
15545         * parse.y (java_complete_lhs):  Pass binary operations, procedure
15546         calls, and ARRAY_REFs to force_evaluation_order.
15547         (various):  Set TREE_SIDE_EFFECTS more carefully.
15549         Tolerate random (non-UTF8) encoding in comments without complaining.
15550         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
15551         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
15553         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
15554         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
15556         * parse.y (java_complete_lhs):  Ignore an empty statement in a
15557         COMPOUND_EXPR.  Don't complain about empty statement after return.
15559 1999-02-19  Per Bothner  <bothner@cygnus.com>
15561         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
15562         in TREE_LIST - just chain the POINTER_TYPEs together.
15563         (resolve_class):  If type already resolved, return decl.
15564         After resolving, update TREE_TYPE(class_type), and name (if array).
15565         * parse.h (do_resolve_class), parse.y:  Make non-static.
15566         * class.c (maybe_layout_super_class):  Take this_class argument.
15567         Do do_resolve_class if necessary.
15568         (layout_class, layout_class_methods): Adjust calls appropriately.
15569         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15570         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
15571         * typeck.c (build_java_array_type):  Don't call layout_class.
15573 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15575         * parse.y (check_pkg_class_access): Allow private class access
15576         within the same package.
15577         (strip_out_static_field_access_decl): New function.
15578         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
15579         operator argument before testing its nature.
15581 1999-02-03  Per Bothner  <bothner@cygnus.com>
15583         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
15584         (TRY_EXPR):  Simplify - it no longer has a finally clause.
15585         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
15586         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15587         * expr.c (java_lang_expand_expr):  Likewise.
15588         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
15589         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
15590         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
15591         (build_try_statement):  Remove finally parameter and handling.
15592         (build_try_finally_statement):  New function.
15593         (patch_try_statement):   No longer need to support finally clause.
15594         (try_statement):  Update grammar action rules.
15595         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
15596         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15598 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
15600         * jcf-parse.c (get_constant): Add braces around computation of 'd'
15601         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
15603 1999-02-17  Andrew Haley  <aph@cygnus.com>
15605         * class.c (build_utf8_ref): Back out broken patch which was
15606         intended to to output signatures using '.' as a separator.
15608         * class.c (make_class_data): Output signatures using '.' as a
15609         separator, rather than '/'.
15610         (mangled_classname): Likewise.
15611         (make_field_value): Likewise.
15612         (make_method_value): Likewise.
15613         * constants.c (alloc_class_constant): Likewise.
15614         * expr.c (build_invokeinterface): Likewise.
15616 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15618         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
15619         of an ancient workaround.
15621 1999-02-10  Jeffrey A Law  (law@cygnus.com)
15623         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
15624         here anymore.
15626 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15628         * lex.c (yylex): Encode \0 as UTF8.
15630 1999-02-10  Tom Tromey  <tromey@cygnus.com>
15632         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
15633         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
15634         (libgcj_zip): Renamed.
15635         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
15636         LIBJAVA_ZIP_FILE.
15637         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
15639         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
15640         (GC_NAME): Renamed -lgc to -lgcjgc.
15642 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15644         * lex.c (java_lang_cloneable): Initialize.
15645         * parse.y (java_lang_cloneable): New static variable.
15646         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
15647         doing one more qualification round.
15648         (valid_ref_assignconv_cast_p): Reject null source or
15649         destination. Allow an array to be cast into java.lang.Cloneable.
15650         (patch_cast): Swapped two first arguments to first call to
15651         valid_ref_assignconv_cast_p.
15653 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15655         * parse.h: DECL_P renamed JDECL_P.
15656         * parse.y: DECL_P replaced by JDECL_P.
15657         (build_array_from_name): Always use pointer's type.
15658         (patch_bc_statement): Extra code to search continue target in a
15659         for loop. Fixed comments. Continue target is current loop when
15660         unlabeled.
15662 1999-02-05  Andrew Haley  <aph@cygnus.com>
15664         * class.c (make_class_data): The superclass of an interface should
15665         be null, not class Object.
15667         * lex.c (java_lex): Sign extend hex literals.
15669 1999-02-04  Andrew Haley  <aph@cygnus.com>
15671         * class.c (build_utf8_ref): Output signatures using '.' as a
15672         separator, rather than '/'.
15673         (make_class_data): Likewise.
15675 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
15677         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
15678         mkstemp.o.  Get them from libiberty now.
15680 1999-02-02  Jeffrey A Law  (law@cygnus.com)
15682         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
15684 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15686         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
15687         from libiberty.h
15689 1999-02-02  Per Bothner  <bothner@cygnus.com>
15691         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
15692         * jcf-write.c (generate_bytecode_return):  New function.
15693         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
15695         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
15696         generate special [fd]const_[01] instructions.
15698         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
15700         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
15701         handling OPCODE_lookupswitch or OPCODE_tableswitch.
15703 1999-02-01  Per Bothner  <bothner@cygnus.com>
15705         * parse.y (patch_method_invocation):  Handle calling static methods,
15706         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
15708         * parse.y (java_complete_lhs):  Don't complain about unreachable
15709         exit condition in a do-while statement.
15711 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15713         * lex.c (java_read_char): Fixed utf8 decoding.
15714         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
15715         range.
15716         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
15717         comments. Local variable `all_primitive' is gone. Broadened
15718         acceptance of `0' to floating point targets. `long' can now be
15719         widened to `double' or `float'.
15720         (valid_method_invocation_conversion_p): Added leading
15721         comment. Fixed tabulation.
15722         (build_string_concatenation): Optimize out left or right empty
15723         string constants.
15725 1999-01-28  Per Bothner  <bothner@cygnus.com>
15727         * jcf-write.c (localvar_alloc):  Only emit entry for
15728         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
15729         (generate_bytecode_insns):  Only call put_linenumber if
15730         debug_info_level > DINFO_LEVEL_NONE.
15731         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
15732         is specified, add -g1 (for compatibility wih javac).
15734 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
15736         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
15737         gjavah.o, check-init.o, jv-scan.o
15739 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15741         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
15743         * gjavah.c: Include config.h and system.h.
15745         * javaop.h (inline): Don't define, its handled by system.h.
15746         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
15747         from `inline' to `static inline'.
15749         * jcf.h (inline): Don't define, its handled by system.h.
15751         * lex.c (inline): Likewise.
15753 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
15755         * lang-specs.h: Map -Qn to -fno-ident.
15757 1999-01-29  Richard Henderson  <rth@cygnus.com>
15759         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
15761 1999-01-29  Tom Tromey  <tromey@cygnus.com>
15763         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
15764         then cast it to Object before calling `append' method.
15766 1999-01-28  Per Bothner  <bothner@cygnus.com>
15768         * check-init.c (check_bool2_init, check_bool_init, check_init):
15769         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
15770         * jcf-write.c (generate_bytecode_insns):  Likewise.
15772 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15774         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
15775         * parse.y (patch_cast): Allow a boolean to be cast into a
15776         boolean.
15778 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15780         * parse.y: (class_declaration:): Fixed indentation.
15781         (class_member_declaration:): Extra `;' after field declaration now
15782         accepted.
15783         (interface_declaration:): Removed debug messages in error reports.
15784         (patch_binop): Nodes created and returned inherit the orignal
15785         node's COMPOUND_ASSIGN_P flag value.
15786         (patch_cast): Fix cast from char to floating point.
15788 1999-01-25  Andrew Haley  <aph@cygnus.com>
15790         * except.c, java-except.h (expand_resume_after_catch): new
15791         function.
15792         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
15793         to branch back to main flow of control after a catch block.
15795 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15797         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
15798         $(srcdir)/../system.h.
15799         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
15800         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
15801         (jcf-write.o): Likewise.
15802         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15803         (mangle.o): Depend on $(srcdir)/../toplev.h.
15804         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15805         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15807         * class.c: Include output.h and parse.h.
15808         (mangled_classname): Add the `const' keyword to a char*.
15809         (find_named_method): Hide unused function definition.
15810         (build_utf8_ref): Change type of variable `c' to unsigned char.
15811         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
15812         (build_class_ref): Add the `const' keyword to a char*.
15813         (layout_class_method): Remove unused variable `buf'.
15815         * decl.c (find_local_variable): Remove unused variable `rtl'.
15816         (pushdecl): Likewise for variables `different_binding_level' and
15817         `oldglobal'.
15818         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
15819         (maybe_build_cleanup): Likewise for parameter `decl'.
15821         * except.c (expand_start_java_handler): Mark parameter `range'
15822         with ATTRIBUTE_UNUSED.
15824         * expr.c: Include except.h.
15825         (pop_type): Remove unused variable `i'.
15826         (pop_value): Likewise for variables `n_words' and `i'.
15827         (expand_java_arrayload): Likewise for variable `convert'.
15828         (java_lang_expand_expr): Likewise for variables `op0', `type',
15829         `mode', `unsignedp', `node' and `elements'.
15830         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
15831         `eh_ranges'.
15832         (process_jvm_instruction): Add a `const' qualifier to a char*.
15834         * gjavah.c (output_directory): Add the `const' keyword to a char*.
15835         (temp_directory): Likewise.
15836         (print_c_decl): Likewise.
15837         (print_method_info): Likewise.
15838         (decode_signature_piece): Likewise.
15839         (print_mangled_classname): Likewise.
15841         * java-except.h: Provide prototypes for maybe_start_try,
15842         maybe_end_try and add_handler.
15844         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
15845         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
15846         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
15847         init_expr_processing, push_super_field, init_class_processing,
15848         can_widen_reference_to, class_depth, verify_jvm_instructions,
15849         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
15850         set_local_type, merge_type_state, push_type, load_type_state,
15851         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
15852         emit_unicode_mangled_name): Add prototypes.
15854         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
15855         (print_signature_type): Use ISDIGIT, not isdigit.
15856         (print_signature): Remove unused variable `j'.
15858         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
15859         int when comparing against one.
15861         * jcf-parse.c: Include toplev.h.
15863         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
15864         (localvar_free): Remove unused variable `i'.
15865         (generate_bytecode_conditional): Likewise for variable `kind'.
15867         * jv-scan.c: Include config.h and system.h.  Remove redundant
15868         OS header and gansidecl.h includes.
15869         (warning): Add the `const' keyword to a char*.  Also add
15870         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
15871         __STDC__, when determining whether to use ANSI-isms.
15872         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
15873         (xmalloc): Don't redundantly prototype here.
15874         (main): Remove unused parameter `envp'.  Also fix the arguments
15875         passed to function `fatal' to match the format specifier.
15877         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
15879         * mangle.c: Include toplev.h.
15880         (emit_unicode_mangled_name): Declare parameter `len'.
15882         * parse.y (parse_warning_context): Add the `const' keyword to a
15883         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
15884         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
15885         (issue_warning_error_from_context): Add the `const' keyword to
15886         a char*.
15887         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
15888         not `__STDC__' for whether to use ANSI-isms.
15890         * typeck.c (incomplete_type_error): Mark parameters `value' and
15891         `type' with ATTRIBUTE_UNUSED.
15892         (parse_signature_type): Use ISDIGIT, not isdigit.
15894         * verify.c (check_pending_block): Add the `const' keyword to a char*.
15895         (verify_jvm_instructions): Likewise.  Remove unused variables
15896         `field_name' and `default_val'.
15898         * zextract.c: Include config.h and system.h.  Remove redundant
15899         OS header includes.
15901         * zipfile.h: Prototype `read_zip_archive'.
15903 1999-01-21  Andrew Haley  <aph@cygnus.com>
15905         * typeck.c (convert): Allow conversions to void type: some
15906         optimizations in gcc do this.
15908 1999-01-21  Andrew Haley  <aph@cygnus.com>
15910         * typeck.c (convert_ieee_real_to_integer): New function.
15911         (convert): When not using fast-math and using hardware fp, convert
15912         an IEEE NaN to zero.
15914 1999-01-18  Andrew Haley  <aph@cygnus.com>
15916         * parse.y (patch_binop): Do a type conversion from signed to
15917         unsigned and then back to signed when a ">>>" is found.
15919 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15921         * java-tree.h: (check_for_initialization): Added prototype.
15922         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
15923         * parse.y (do_resolve_class): Removed unused locals.
15924         (read_import_dir): Likewise.
15925         (resolve_qualified_expression_name): Array creation
15926         expressions are valid primary expressions.
15927         (qualify_ambiguous_name): Likewise.
15928         (patch_synchronized_statement): Removed unused local.
15930 1999-01-17  Jeffrey A Law  (law@cygnus.com)
15932         * Makefile.in (zextract.o): Add dependencies.
15934         * Makefile.in: Do not put ^Ls at the start of a line.
15936 1999-01-15  Per Bothner  <bothner@cygnus.com>
15938         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
15939         sub-type the result of the call that gets the exception value.
15941         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
15942         don't call finish_class.
15944         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
15945         clear found before continuing.
15947         * verify.c (verify_jvm_instructions):  On an array load, allow
15948         and handle top of stack to be TYPE_NULL.
15950         * gjavah.c (generate_access):  Translate Java package private or
15951         protected access to C++ public, but with a comment.
15953 1999-01-13  Andrew Haley  <aph@cygnus.com>
15955         * expr.c (generate_name): Name prefix changed to avoid clashes
15956         with assembler temp labels.
15958         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
15959         MODIFY_EXPR.  Without this, code for the assignment may not be
15960         generated at all and the synchronized statement will read an
15961         uninitialized variable.
15963 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15965         * class.c (maybe_layout_super_class): Fixed returned value.
15966         * lex.c: Added 1999 to the copyright.
15967         (java_init_lex): Initialize java_lang_imported.
15968         * lex.h: Added 1999 to the copyright.
15969         * parse.h: Added 1999 to the copyright.
15970         (REGISTER_IMPORT): Fixed typo in trailing macro.
15971         (CURRENT_OSB): New macro.
15972         (struct parser_ctxt): New fields osb_depth, osb_limit.
15973         * parse.y (java_lang_id): New global variable.
15974         (type_import_on_demand_declaration): Don't import java.lang.* twice.
15975         (array_creation_expression:): Use CURRENT_OSB.
15976         (dims:): Uses a stack to keep track of array dimensions.
15977         (cast_expression:): Use CURRENT_OSB.
15978         (find_expr_with_wfl): Return NULL if node found doesn't meet the
15979         conditions.
15980         (register_fields): Fixed typos in comment.
15981         (check_method_redefinition): Fixed comment indentation.
15982         (java_check_regular_methods): Set saved found wfl to NULL after
15983         having reinstalled it in the previously found DECL_NAME.
15985 1999-01-10  Richard Henderson  <rth@cygnus.com>
15987         * gjavah.c (java_float_finite): Use a union to do type punning.
15988         (java_double_finite): Likewise.
15990 1999-01-09  Per Bothner  <bothner@cygnus.com>
15992         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
15993         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
15994         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
15995         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
15996         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
15997         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
15999 1999-01-08  Per Bothner  <bothner@cygnus.com>
16001         * check-init.c (check_init):  If compiling to native, we don't
16002         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
16004 1999-01-08  Tom Tromey  <tromey@cygnus.com>
16006         * parse-scan.y (variable_declarator_id): Set or increment
16007         bracket_count.
16008         (bracket_count): New global.
16009         (formal_parameter): Handle case where bracket pairs trail variable
16010         declarator id.
16012 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
16014         * jcf-parse.c (yyparse): variable len changed from a char to an
16015         int to prevent overflow.
16017 1999-01-06  Per Bothner  <bothner@cygnus.com>
16019         * java-tree.h:  Declare read_class.
16020         * jcf-parse.c (read_class):  New function.
16021         (load_class):  Now just call read_class.
16023         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
16024         * jcf-parse.c (parse_source_file):  Declare save_error_count,
16025         which is needed by java_parse_abort_on_error macro,
16026         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
16028         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
16029         constructor, if initializing a static field.
16030         (patch_new_array_init):  Set TREE_CONSTANT if it is.
16031         * expr.c (java_lang_expand_expr):  For a static array constructor
16032         of primitive elements, allocate the array itself statically.
16033         Disabled until we can set the vtable field statically.
16035         * check-init.c:  New file.  Checks for definite assignment.
16036         * Makefile.in (JAVA_OBJS):  Add check-init.o.
16037         * parse.y (java_complete_expand_method): Call check_for_initialization.
16038         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
16040 1999-01-06  Graham <grahams@rcp.co.uk>
16042         * parse.y : include system.h instead of including
16043         standard headers directly with the exception of <dirent.h>.
16045 1999-01-06  Per Bothner  <bothner@cygnus.com>
16047         * lex.h:  Moved static function declarations to lex.c,
16048         to shut up some -Wall warnings.
16049         * lex.c:  Static function declarations moved here.
16050         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
16052 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16054         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16056 1998-12-22  Per Bothner  <bothner@cygnus.com>
16058         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
16059         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
16061         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
16062         (localvar_alloc):  Change return type to void,
16063         (emit_unop):  Remove unused variable size.
16065         * jcf-write.c (struct jcf_block):  Add new union.
16066         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16067         (call_cleanups):  New functions.
16068         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16069         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16070         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16071         * lang.c (lang_init):  Call using_eh_for_cleanups.
16072         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16073         completing operands to patch_synchronized_statement.
16074         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16075         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16076         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16078 1998-12-20  John F. Carr  <jfc@mit.edu>
16080         * Make-lang.in: Comment out control-Ls; they upset some makes.
16082 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16084         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16085         consistently.
16087 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16089         * parse.y (DIR_SEPARATOR): New define.
16090         (check_class_interface_creation): Use it.
16092         * parse-scan.y (report_main_declaration): Recognize
16093         `java.lang.String' in argument to main.
16095 1998-12-16  Per Bothner  <bothner@cygnus.com>
16097         * parse.y (create_interface):  Remove bogus test.
16099 1998-12-16  Per Bothner  <bothner@cygnus.com>
16101         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16102         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16104 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16106         * parse-scan.y (qualified_name): Use correct sprintf format.
16108 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16110         * gjavah.c (print_field_info): Changed how most negative number is
16111         printed.
16113 1998-12-14  Per Bothner  <bothner@cygnus.com>
16115         * parse.y (fold_constant_for_init):  New function.
16116         (resolve_expression_name):  Don't replace static final
16117         constant-initialized fields by its value.
16118         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16119         not replace static final constant-initialized fields by their values.
16120         (register_fields):  If there is an initializer, set DECL_INITIAL and
16121         MODIFY_EXPR_FROM_INITIALIZATION_P.
16122         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16123         Only call patch_initialized_static_field if
16124         MODIFY_EXPR_FROM_INITIALIZATION_P.
16125         (patch_initialized_static_field):  If not valid constant, clear
16126         DECL_INITIAL.
16128         * parse.y (lookup_field_wrapper):  Fix thinko.
16130         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16131         set and restore global lineno.
16133 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16135         * gjavah.c (print_field_info): If value to print is the smallest
16136         value of its size, then print as hex to avoid later warnings from
16137         C++ compiler.
16139 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16141         * gjavah.c (decompile_method): Decompile `return null'.
16142         (process_file): Generate `#pragma interface'.
16143         (method_declared): New global.
16144         (print_method_info): Set it.
16145         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16146         (print_method_info): Handle abstract methods.
16148 1998-12-13  Per Bothner  <bothner@cygnus.com>
16150         * parse.y (patch_method_invocation):  If class_decl is null
16151         (e.g. an array type), use original type.
16153         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16154         errors about uncaught exception from clone (of array, specifically).
16156 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16158         * gjavah.c (decompile_method): Handle all types of `return'
16159         opcode.  Decompile `return this' and `return'.
16160         (method_access): New global.
16161         (print_method_info): Set it.
16162         (decompile_method): Don't decompile a synchronized method.
16164 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16166         * jcf-reader.c (jcf_parse_one_method): Recognize
16167         HANDLE_END_METHOD.
16168         * gjavah.c (HANDLE_END_METHOD): New macro.
16169         (HANDLE_CODE_ATTRIBUTE): New macro.
16170         (decompile_method): New function.
16171         (print_method_info): Don't print `;\n' at end of function decl.
16172         Include java-opcodes.h.
16173         (decompiled): New global.
16175 1998-12-12  Per Bothner  <bothner@cygnus.com>
16177         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16178         flag_emit_class_files.
16179         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16180         if flag_emit_class_files.
16181         * parse.y (java_complete_tree):  Pre-liminary support for
16182         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16184         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16185         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16187         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16189         * zipfile.h (opendir_in_zip):  New declaration.
16190         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16191         (opendir_in_zip):  New function, using code from open_in_zip.
16192         (open_in_zip):  Call opendir_in_zip.
16193         (find_class):  Remove no-longer-used do_class_file parameter,
16194         but add source_ok parameter.  Change logic so if we find a .java file,
16195         we don't look for .class in later classpath emtries.
16196         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16197         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16198         * gjavah.c: Update call to find_class.
16199         * jcf-dump.c:  Likewise.
16201         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16202         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16203         nothing if body is empty_stmt_node.
16204         Various little fixes so SP gets correctly adjusted.
16205         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16206         For CALL_EXPR, test if static first.
16207         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16208         such as the ones we create for Object and Class.
16209         Set and restore current_function_decl.
16210         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16211         (note_possible_classname):  New function.
16212         (read_import_entry):  Removed.  Merged with read_import_dir.
16213         (read_import_dir):  Don't call find_class - that only gives us
16214         the first classpath entry having the needed package.
16215         Use the struct buffer data structure from buffer.h.
16216         (read_import_dir, find_in_imports_on_demand):  The remembered
16217         class names now use '.' (not '/') as package separator.
16219         * parse.y (java_complete_expand_methods):  Call write_classfile
16220         here, and not in java_expand_classes (which only gets first class).
16222 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16224         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
16225         (register_fields):  If a static fields has an initializer, just
16226         chain it on ctxp->static_initialized, and handle later.
16227         (java_complete_expand_methods):  Force <clinit> first.
16228         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
16229         - it's already been completed.
16230         (patch_initialized_static_field):  New function.
16231         (java_complete_field):  Call it.
16233 1998-12-12  Per Bothner  <bothner@cygnus.com>
16235         * expr.c (encode_newarray_type, build_new_array):  New functions.
16236         * java-tree.h:  Declare build_new_array.
16237         * jcf-write.c (patch_newarray):  Use build_new_array.
16239         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
16240         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
16242         * parse.y (patch_new_array_init):  Re-organize.
16243         Now is passed the actual array (pointer) type of the value.
16244         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16245         (patch_array_constructor):  Removed - merged into patch_new_array_init.
16246         (java_complete_tree):  Update patch_new_array_init.
16248         * jcf-write.c (find_constant_index):  New function.
16249         (generate_bytecode_insns):  Use find_constant_index.
16250         (generate_classfile):  Use find_constant_index for ConstantValue.
16252 1998-12-11  Tom Tromey  <tromey@cygnus.com>
16254         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16255         * decl.c (init_decl_processing): Renamed dtable -> vtable.
16256         * class.c (make_class_data): Renamed dtable -> vtable, and
16257         dtable_method_count -> vtable_method_count.
16259 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16261         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16262         global variables, initialized.
16263         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16264         Declared new global variables.
16265         * lex.c (java_lex): Return long_zero_node, float_zero_node,
16266         double_zero_node, integer_zero_node upon direct matching.
16267         * parse.y (purify_type_name): Added function prototype.
16268         (duplicate_declaration_error_p): Consider new_type as potentially
16269         being a incomplete type. Use purify_type_name on type string.
16270         (method_header): saved_type: unused variable removed. Don't figure
16271         return type if method name is invalid.
16272         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16273         processed by patch_unaryop.
16274         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16275         increment/decrement node into its original type after binary
16276         numeric promotion on its operands.
16278 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16280         * parse.y (array_initializer:): Array init operand is NULL_TREE
16281         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16282         now an error. Fixed indentation problems.
16283         (patch_string): Handle error_mark_node as an argument.
16284         (patch_new_array_init): Fixed indentation problems.
16285         (array_constructor_check_entry): Removed check on null wfl_value.
16286         Return an error if wfl_value's walk returns an error.
16288 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16290         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16291         * lex.c (java_lex): Remember column position before advancing one
16292         token. Retain location information on OCB_TK.
16293         * lex.h (typedef struct java_lc): Added new field.
16294         * parse.h (GET_SKIP_TYPE): New macro.
16295         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16296         * parse.y (build_new_array_init, patch_new_array_init,
16297         patch_array_constructor, maybe_build_array_element_wfl,
16298         array_constructor_check_entry): New function prototypes.
16299         (switch_block:): Tagged <node>.
16300         (OCB_TK): Tagged <operator>.
16301         (array_initializer:): Installed actions.
16302         (variable_initializer): Build location information on element if
16303         necessary.
16304         (switch_statement:): Fixed indentation typo.
16305         (switch_block:): Redefined default action.
16306         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16307         (patch_assignment): Removed duplicate code.
16308         (maybe_build_array_element_wfl, build_new_array_init,
16309         patch_new_array_init, patch_array_constructor,
16310         array_constructor_check_entry): New functions.
16312 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16314         * parse.y (array_initializer): Tagged <node>.
16315         (variable_initializer:): Use default rule.
16316         (array_initializer:): Defined actions.
16317         (variable_initializers:): Likewise.
16318         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16319         non-static field accesses.
16320         (patch_invoke): Fixed indentation typo.
16321         (java_complete_tree): Likewise.
16322         (build_labeled_block): Changed leading comment. Generate an error
16323         in case of duplicate loop labels.
16324         (patch_conditional_expr): Patch results of string concatenation
16325         operations.
16327 1998-12-06  Per Bothner  <bothner@cygnus.com>
16329         * constants.c (find_methodref_index):  When the class is an interface,
16330         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16332         * decl.c (finit_identifier_node):  Use "$finit$", rather than
16333         "<finit>" (which Sun's verifier rejects).
16334         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
16335         (generate_field_initialization_code):  Removed.
16336         (fix_constructors)  Don't add call to $finit$ here (wrong order).
16337         (patch_method_invocation):  Add $finit$ call here.
16339         * java-tree.h (CALL_USING_SUPER):  New macro.
16340         * parse.y (patch_invoke):  Remove im local variable.
16341         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
16342         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
16343         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
16345         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
16347         * parse.y (java_complete_tree):  Don't complain about unreachable
16348         statement if it is empty_stmt_node.
16350         * jcf-write.c (find_constant_wide):  New function.
16351         (push_long_const):  Use find_constant_wide.
16353         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
16354         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
16355         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16356         Emit invokeinterface when calling an interface method.
16357         Emit invokespecial also when calling super or private methods.
16359         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
16361 1998-12-06  Per Bothner  <bothner@cygnus.com>
16363         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
16365 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16367         * java-tree.h (java_layout_seen_class_methods): New function
16368         prototype.
16369         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16370         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16371         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16372         * parse.y (method_declarator:): Defined action.
16373         (issue_warning_error_from_context): input_filename saved, set to
16374         the appropriate value and restored after java_error is called.
16375         (build_unresolved_array_type): Fixed comment.
16376         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16377         (method_header): Deal with return type the same way type are
16378         handled for fields and method's parameters and local variables
16379         types are handled.
16380         (check_method_redefinition): Removed extra CR.
16381         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16382         (java_layout_seen_class_methods): New function.
16383         (java_layout_classes): Call java_layout_seen_class_methods.
16385 1998-12-03  Per Bothner  <bothner@cygnus.com>
16387         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
16389 1998-12-03  Per Bothner  <bothner@cygnus.com>
16391         * jcf-dump.c (main):  Fix error message.
16392         * jcf-path.c (add_entry):  Style fix.
16394 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16396         * class.c (layout_class_method): Call build_java_argument_signature
16397         on constructors too.
16398         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16399         (patch_method_invocation): Define a primary when resolving an
16400         expression name. Augmented comment on code checking illegal `this'
16401         usage. Loosened it test by accepting NEW_CLASS_EXPR.
16403 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16405         * class.c (layout_class_method): Don't report error on non-static
16406         overriding static if the method is private.
16407         * java-tree.h (finish_class): Prototype added.
16408         * lex.c (java_get_line_col): Handle col argument -2 value.
16409         * parse.h: All static method declarations moved to parse.y.
16410         * parse.y: Now contains all static method declarations previously
16411         found in parse.h.
16412         (find_expr_with_wfl, missing_return_error,
16413         unreachable_stmt_error): New functions.
16414         (java_get_real_method_name): Identify constructors bearing class
16415         names in source code compiled classes only.
16416         (java_complete_expand_methods): Call missing_return_error.
16417         (invocation_mode): Private methods invoked as static methods.
16418         (java_complete_tree): Call unreachable_stmt_error.
16420 1998-12-01  Tom Tromey  <tromey@cygnus.com>
16422         * Makefile.in (+target): Removed.
16423         (+xmake_file): Likewise.
16424         (+tmake_file): Likewise.
16425         (.NOEXPORT): Removed duplicate.
16427 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16429         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16431         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
16433         * jvgenmain.c: Remove the xmalloc prototype, we get it from
16434         libiberty.h.  Provide an xmalloc definition.
16436         * jvspec.c: Remove the xmalloc prototype.
16438         * parse-scan.y: Include config.h and system.h.  Don't include
16439         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
16440         Provide an xstrdup definition.
16442 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
16444         * jcf-path.c (add_entry): Recognize ".jar" too.
16445         * lang-specs.h: Likewise.
16447 1998-11-26  Per Bothner  <bothner@cygnus.com>
16449         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
16450         soft_monitorenter_node, soft_monitorexit_node, throw_node.
16452         * jcf-write.c (generate_bytecode_insns):
16453         Handle pre/post-increment/decrement of long.
16455         * jcf-write.c (generate_bytecode_insns):
16456         Handle missing exception handler (finally for synchronized).
16458 1998-11-25  Per Bothner  <bothner@cygnus.com>
16460         * java-tree.h (end_params_node):  Declare global.
16461         * decl.c (end_params_node):  New global.
16462         (init_decl_processing, start_java_method):  Use end_params_node for
16463         end of list of parameter types.  Follows correct gcc conventions.
16464         * expr.c (pop_argument_types, pop_arguments):  Likewise.
16465         * lang.c (put_decl_node):  Likewise.
16466         * typeck.c (various places):  Likewise.
16467         * class.y (various places):  Likewise.
16468         * parse.y (various places):  Likewise.
16470         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
16471         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
16473         * class.c:  Add #include flags.h, remove no-longer needed declaration.
16475         * class.c (layout_class_method):  Remove commented-out code, re-format.
16476         Don't add vtable entry (or index) for private methods.
16477         * expr.c (expand_invoke):  A private method is implicitly final.
16478         * class.c (make_class_data):  If inlining or optimizing,
16479         skip private methods.
16481         * class.c (finish_class):  New function.  Calls existing methods,
16482         but alls emits deferred inline functions.
16483         * jcf-parse.c (parse_class_file):  Call finish_class.
16484         * parse.y (java_complete_expand_methods):  Likewise.
16486         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
16488         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
16490 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
16492         * jcf-write.c (generate_bytecode_conditional): Fix typo.
16494 1998-11-24  Per Bothner  <bothner@cygnus.com>
16496         * (generate_classfile): Always write class access flag with
16497         ACC_SUPER set.
16499 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16501         * class.c (maybe_layout_super_class): New function.
16502         (layout_class): Reorganized. Loop on class methods dispatched into
16503         a new function. Call maybe_layout_super_class.
16504         (layout_class_methods, layout_class_method): New functions.
16505         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
16506         class.
16507         (expand_invoke): Likewise.
16508         * java-tree.h (all_class_list): New global variable declared.
16509         (layout_class_methods, layout_class_method): New function
16510         prototypes.
16511         (LAYOUT_SEEN_CLASS_METHODS): New macro.
16512         * jcf-parse.c (all_class_list): New global variable.
16513         (load_class): Extended what class_or_name can be. Use parser
16514         context mechanism to save globals before calling jcf_parse.
16515         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
16516         is set on the file name.
16517         (jcf_parse): Layout class methods when Object is loaded, otherwise
16518         record class in all_class_list for delayed method layout.
16519         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
16520         * lang.c (put_decl_node): Decode <init> into the decl context
16521         class name.
16522         * lex.c (java_allocate_new_line): Use xmalloc.
16523         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
16524         pointers, not TREE_LIST elements.
16525         (struct parser_ctxt): Fixed comment indentations, added comments
16526         and reordered some fields.
16527         (java_check_methods): Function prototype removed.
16528         * parse.y (java_push_parser_context): Use xmalloc.
16529         (java_parser_context_restore_global): Pop extra pushed ctxp only
16530         when there's nothing next.
16531         (maybe_create_class_interface_decl): Fixed comment, add new
16532         created class decl to all_class_list.
16533         (method_header): Use GET_REAL_TYPE on argument's types.
16534         (method_declarator): Use GET_REAL_TYPE, change type to the real
16535         type in TREE_LIST dependency node. Build argument list with the
16536         real type.
16537         (create_jdep_list): Use xmalloc. Removed allocation error message.
16538         (obtain_incomplete_type): Fixed leading comment. Broadened
16539         incoming argument meaning.
16540         (register_incomplete_type): Use xmalloc. Removed allocation error
16541         message.
16542         (safe_layout_class): Fixed leading comment.
16543         (jdep_resolve_class): Reversed if statement condition and switch
16544         if and else bodies.
16545         (resolve_and_layout): Fixed leading comment. Broadened incoming
16546         argument meaning.
16547         (complete_class_report_errors): New local variable name, for
16548         clarity. purify_type_name used for all error cases.
16549         (java_get_real_method_name): Stricter check on constructors.
16550         (java_check_regular_methods): Reverse methods list only if not
16551         already laid out. Layout artificial constructor.
16552         (java_check_methods): Deleted.
16553         (source_start_java_method): Obtain incomplete type for patchable
16554         method arguments.
16555         (java_layout_classes): Fixed leading comment. Use
16556         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
16557         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
16558         before returning. Fixed comments.
16559         (java_expand_classes): Check for errors up front.
16560         (patch_method_invocation): Class to search is resolved and laid
16561         out.
16563 1998-11-24  Per Bothner  <bothner@cygnus.com>
16565         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
16567         * javaop.h (int8):  Removed - not used.
16568         (jbyte):  Redefine portably with correct signedness.
16570         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
16572         * jcf-write.c (generate_bytecode_insns):  Fix typo
16573         OPCODE_getstatic to OPCODE_getfield.
16575         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
16576         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
16577         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
16579 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16581         * jcf-parse.c (jcf_parse_source): Function returned type is
16582         void. Added prototype.
16583         (jcf_parse): Function returned type is void.
16584         (yyparse): Remove call to fclose on the last parsed file.
16586         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
16588 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16590         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
16591         (layout_class): Cope with methods featuring WFL in decl names.
16592         * decl.c (unqualified_object_id_node): New global variable,
16593         initialized.
16594         (build_decl_no_layout): Removed.
16595         * expr.c (build_primtype_type_ref): Handle Double.
16596         (java_lang_expand_expr): Fixed indentations.
16597         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
16598         (flag_wall, flag_redundant, flag_not_overriding,
16599         flag_static_local_jdk1_1, unqualified_object_id_node): Global
16600         variable declarations.
16601         (build_decl_no_layout): Removed prototype.
16602         (java_get_real_method_name): Added prototype.
16603         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
16604         (java_parse_abort_on_error): Macro now just returns.
16605         * jcf-parse.c (jcf_parse_source): Check fclose returned
16606         value. Call emit_register_classes if java_report_errors returns
16607         zero.
16608         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
16609         flag_static_local_jdk1_1): New integer flags.
16610         (lang_decode_option): New flags set here.
16611         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
16612         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
16613         the flag_redundant variable.
16614         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
16615         when parsing java.lang.Object class.
16616         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
16617         NULL_TREE to build.
16618         (resolve_qualified_expression_name): Fixed indentation.
16619         (patch_array_ref): Changed prototype.
16620         (not_initialized_as_it_should_p): Prototype removed.
16621         (java_report_errors): Added function prototype.
16622         * parse.y (formal_parameter:): Changed error message for not yet
16623         supported final parameters.
16624         (class_type_list:): Set both PURPOSE and VALUE of created
16625         TREE_LIST to be class_type.
16626         (primary_no_new_array:): Handle class literals on primitive types.
16627         (parse_warning_context): Reinstalled correct force_error and
16628         do_warning flags setups.
16629         (java_report_errors): Changed prototype. Return java_error_count
16630         value.
16631         (variable_redefinition_error): Consider treating variable type as
16632         a fake pointer.
16633         (create_interface): Warn about redundant abstract modifier if
16634         flag_redundant is set. Changed error message.
16635         (lookup_field_wrapper): Save/restore globals before/after looking
16636         up field.
16637         (duplicate_declaration_error_p): Consider treating declaration
16638         type as a fake pointer.
16639         (register_fields): Extract real type from dependency node. Check
16640         for duplicate field declaration after type adjustment. Use
16641         DECL_INITIAL to store static final initialized values.
16642         (method_header): Extract real function type from dependency node.
16643         (check_abstract_method_header): Use GET_METHOD_NAME.
16644         (obtain_incomplete_type): Layout fake pointer type.
16645         (safe_layout_class): Don't try to check for methods before layout.
16646         (java_complete_class): Don't check for correct throws clause
16647         elements inheritance here.
16648         (resolve_and_layout): Broadened name parameter meaning.
16649         (reset_method_name): Use GET_METHOD_NAME.
16650         (java_get_real_method_name): New function.
16651         (java_check_regular_methods): Don't check methods in
16652         java.lang.Object.  Verify lineage of throws clause elements. Use
16653         flag_no_overriding in warning report.
16654         (check_throws_clauses): Don't check if class was from
16655         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
16656         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
16657         (declare_local_variables): Use flag_static_local_jdk1_1 to report
16658         warning on unsupported final local variables. Use build_decl
16659         instead of build_decl_no_layout. Get real local variable type from
16660         dependency node.
16661         (source_start_java_method): Get real parameter type from
16662         dependency node. Call build_decl instead of build_decl_no_layout.
16663         (java_layout_classes): Reverse tree and layout type and class as
16664         required. Mark class as loaded when done.
16665         (resolve_field_access): Fixed indentation. Restricted condition
16666         leading to static field access code generation. Set field_type
16667         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
16668         (resolve_qualified_expression_name): Initialize type_found to
16669         null. Handle static field resolved during qualification. Fixed
16670         layout on non primitive field decl types.
16671         (not_accessible_p): Fixed typo in comment.
16672         (patch_method_invocation): Resolve and layout class to search from
16673         type.
16674         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
16675         layout non primitive type, if necessary. Make method node only to
16676         report errors.
16677         (find_applicable_accessible_methods_list): Consider WFL'ed method
16678         decl names. Fixed indentation.
16679         (argument_types_convertible): Resolve and layout target type if
16680         necessary.
16681         (java_complete_tree): Fixed indentation problems. Rewrote
16682         CALL_EXPR thrown exceptions check. Re-installed further processing
16683         of the assignment in certain cases.
16684         (patch_assignment): Call maybe_build_primttype_type_ref to perform
16685         inlining on class literals.
16686         (valid_builtin_assignconv_identity_widening_p): Cope with constant
16687         0 literal.
16688         (valid_method_invocation_conversion_p): Likewise.
16689         (patch_string): Temporary disable forbidden use of `this' in
16690         explicit constructor invocations when doing string concatenation
16691         within their scope.
16692         (patch_unaryop): Added comment. Reinstalled code to disable
16693         further check on assignment operation with cast expression RHS.
16694         (patch_switch_statement): Fixed indentation.
16695         (build_try_statement): Call build_decl instead of
16696         build_decl_no_layout.
16697         (patch_synchronized_statement): Likewise.
16698         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
16699         IS_UNCHECKED_EXPRESSION_P.
16700         (check_thrown_exceptions_do): Changed leading comment. Resolve and
16701         layout argument exception type.
16702         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
16703         of IS_UNCHECKED_EXPRESSION_P.
16705 1998-11-18  Anthony Green  <green@cygnus.com>
16707         * jcf-parse.c (yyparse): Open class file in binary mode.
16709 1998-11-15  Per Bothner  <bothner@cygnus.com>
16711         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
16713         * jcf-write.c (perform_relocations):  Move check out one loop.
16715 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
16717         * Make-lang.in: Fix reference to srcdir.
16718         * jv-scan.c: Add missing xmalloc prototype.
16719         * jvgenmain.c: Ditto.
16721 1998-11-15  Per Bothner  <bothner@cygnus.com>
16723         * decl.c (error_mark_node), java-tree.h:  New global.
16724         * parse.y:  Use empty_stmt_node instead of size_zero_node.
16725         (build_if_else_statement):  If missing else, use empty_stmt_node.
16727         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
16728         (java_complete_expand_method):  Complain if return is missing.
16729         (java_check_regular_methods):  Comment out incorrect error check.
16730         (not_accessible_p):  Fix incorrect handling of protected methods.
16731         (patch_method_invocation):  Pass correct context to not_accessible_p.
16732         (find_applicable_accessible_methods_list):  Likewise.
16733         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
16734         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
16735         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
16736         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
16738         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
16739         (push_int_const):  Remove reundant NOTE_PUSH.
16740         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
16741         (- case SWITCH_EXPR):  Fix code generation bug.
16742         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
16743         (generate_classfile):  More robust for abstract methods.
16745 1998-11-15  Anthony Green  <green@cygnus.com>
16747         * Makefile.in: jv-scan and jvgenmain all require libiberty.
16748         * Make-lang.in: Ditto.
16750         * jv-scan.c: Remove xmalloc and xstrdup definitions.
16751         * jvgenmain: Ditto.
16753 1998-11-15  Per Bothner  <bothner@cygnus.com>
16755         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
16757         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
16759 1998-11-14  Per Bothner  <bothner@cygnus.com>
16761         Allow uses of interface types to verify.  This is not really
16762         type-safe, but it matches what Sun does, and is OK as long as
16763         there are appropriate run-time checks.
16764         * verify.c (merge_types):  If merging two interface types,
16765         just set the result to java.lang.Object.
16766         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
16768 1998-11-13  Tom Tromey  <tromey@cygnus.com>
16770         * gjavah.c (main): Handle --output-class-directory argument.
16771         * jvspec.c (lang_specific_driver): Translate `-d' into
16772         -foutput-class-dir.
16773         * jcf.h (jcf_write_base_directory): Declare.
16774         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
16775         * lang-options.h: Mention -foutput-class-dir.
16776         * jcf-write.c (jcf_write_base_directory): New global.
16777         (make_class_file_name): Put generated .class file into `-d'
16778         directory, or into source directory if -d not given.  Function now
16779         static.
16780         (write_classfile): Free class file name.  Handle case where class
16781         file name is NULL.
16782         (DIR_SEPARATOR): New macro.
16783         Include <sys/stat.h>
16785         * Makefile.in (prefix): New macro.
16787 1998-11-12  Per Bothner  <bothner@cygnus.com>
16789         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
16790         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
16791         here (done in patch_invoke instead).
16792         (case_identity):  Moved here from parse.y.
16794         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
16795         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
16796         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
16797         so they can be efficiently scanned without recursion.
16798         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
16799         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
16800         in BLOCK iteratively, rather than recursively.
16802         * parse.y (do_unary_numeric_promotion):  New function.
16803         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
16805         * parse.y (patch_newarray):  Various fixes.
16807         Re-do handling of switch statements (for proper block scoping).
16808         * parse.y:  Add just a single block for the enture switch block,
16809         but don't create any "case blocks".
16810         (group_of_labels):  Rmeoved unneeded non-terminal.
16811         CASE_EXPR and DEFAULT_EXPR are added to current block.
16812         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
16813         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
16814         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
16815         * parse.y (wfl_operator, print_int_node): Make non-static.
16816         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
16817         as part of recursive scan of block.
16818         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
16819         (patch_switch_statement):  Most tests move dinto java_complete_tree.
16821         * parse.y:  Make various production be non-typed (void).
16822         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
16823         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
16824         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
16826         * jcf-write.c (struct jcf_handler):  New type.
16827         (struct jcf_switch_state):  New type.
16828         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
16829         (alloc_handler, emit_unop, emit_reloc):  New functions.
16830         (adjust_typed_op):  Add extra parameter ("max type" offset).
16831         (emit_switch_reloc, emit_case-reloc):  New function.
16832         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
16833         (generate_bytecode_insns):  Support REAL_CST, switch statements,
16834         exception handling, method calls, object/array creation, and more.
16836         * class.c:  Remove some unused variables.
16837         * constants.c (find_string_constant):  New function.
16838         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
16839         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
16840         if flag_emit_class_files.
16842 1998-11-12  Tom Tromey  <tromey@cygnus.com>
16844         * jcf-io.c (find_class): Added explanatory comment.
16846         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
16847         trailing slash to `.zip' entries.
16849         * jvspec.c (lang_specific_driver): Correctly handle case where
16850         GC_NAME not defined.
16852 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16854         * jvspec.c (GC_NAME): New define.
16855         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
16856         if required.
16857         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
16859 1998-11-11  Per Bothner  <bothner@cygnus.com>
16861         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
16863 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16865         * jcf-dump.c (main): Correctly recognize `--'-style long options.
16867 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16869         * class.c (is_compiled_class): Call safe_layout_class for class
16870         compiled from source.
16871         * conver.h (convert_to_integer, convert_to_real,
16872         convert_to_pointer): Added prototypes.
16873         * decl.c (init_decl_processing): Non longer push the decls of
16874         `methodtable', `constants', `Class', `Field', `dispatchTable'
16875         `jexception' and `Method'.
16876         * expr.c (build_invokeinterface): New function.
16877         (expand_invoke): static variable CLASS_IDENT now in
16878         build_invokeinterface. Use build_invokeinterface.
16879         (expand_java_field_op): Moved code to inline
16880         java.lang.PRIMTYPE.TYPE into a function.
16881         (build_primtype_type_ref): New function.
16882         * java-tree.def (INSTANCEOF_EXPR): New tree code.
16883         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
16884         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
16885         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
16886         (DECL_LOCAL_STATIC_VALUE): New macro.
16887         (build_invokeinterface, build_primtype_type_ref): New function
16888         prototypes.
16889         (java_parse_abort_on_error): Macro rewritten.
16890         * jcf-parse.c (current_method): Add comment to declaration.
16891         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
16892         Function prototypes fixed.
16893         (jcf_parse_source): push/pop parser context. save/restore global.
16894         (parse_source_file): Fixed leading comment. Now take a
16895         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
16896         classes and pop the parser context anymore.
16897         (yyparse): Push parser context, save globals, parse the source
16898         file, restore globals and pop the parser context when processing a
16899         source file.
16900         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
16901         * lex.c (java_parse_doc_section): New function.
16902         (java_lex): Call java_parse_doc_section when appropriate. Build an
16903         operator around INSTANCEOF_TK.
16904         * lex.h (java_lineterminator, java_sprint_unicode,
16905         java_unicode_2_utf8, java_lex_error, java_store_unicode):
16906         Prototypes rewritten.
16907         (java_parse_escape_sequence, java_letter_or_digit_p,
16908         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
16909         java_read_unicode, java_store_unicode, java_read_char,
16910         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
16911         Added function prototypes.
16912         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
16913         define.
16914         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
16915         New macros
16916         (struct parser_ctxt): New fields: deprecated,
16917         current_parsed_class_un, gclass_list.
16918         (fix_method_argument_names, issue_warning_error_from_context,
16919         resolve_package, lookup_package_type): New function prototypes.
16920         (resolve_expression_name): Fixed function prototype.
16921         (find_applicable_accessible_methods_list): Fixed indentation, added
16922         extra argument in prototype.
16923         (check_final_assignment, build_null_of_type, check_deprecation,
16924         check_method_redefinition, reset_method_name,
16925         java_check_regular_methods, java_check_abstract_methods,
16926         maybe_build_primttype_type_ref): New function prototype.
16927         * parse.y (conver.h): Include.
16928         (INSTANCEOF_TK): Tagged <operator>.
16929         (single_type_import_declaration): Use REGISTER_IMPORT macro.
16930         (relational_expression:): Build binop for instanceof.
16931         (java_push_parser_context): Remember ctxp->gclass_list across
16932         contexts.
16933         (java_pop_parser_context): Simply return if no context
16934         exists. Remember gclass_list across contexts.
16935         (issue_warning_error_from_context): New function.
16936         (parse_error_context): Don't setup ctxp->elc here. Call
16937         issue_warning_error_from_context instead.
16938         (parse_warning_context): Likewise.
16939         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
16940         setup. Link new class/interface to ctxp->gclass_list.
16941         (add_superinterfaces): Register interface as incomplete if not
16942         loaded.
16943         (create_class): Remember class unqualified name in
16944         ctxp->current_parsed_class_un. Check class deprecation.
16945         (register_fields): Check field deprecation. Remember static final
16946         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
16947         processing INIT.
16948         (method_header): New local variable ORIG_ARG. Use unqualified
16949         current class name for check on constructor errors. Promote return
16950         type if of record type. Argument list fix moved in
16951         fix_method_argument_names, called here. Check method deprecation.
16952         (fix_method_argument_names): New function.
16953         (method_declarator): Promote record typed arguments.
16954         (safe_layout_class): Check class methods before layout.
16955         (java_complete_class): Compute field layout when patched.
16956         (do_resolve_class): Try to load class after having it renamed
16957         after the package name.
16958         (get_printable_method_name): Use DECL_CONTEXT.
16959         (reset_method_name): New function.
16960         (check_method_redefinition): Use reset_method_name.
16961         (java_check_regular_methods): New local variable
16962         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
16963         names for error report. Check for compile-time error when method
16964         found has default (package) access.
16965         (java_check_abstract_methods): Now takes an interface DECL node as
16966         an argument. Also reinstall real name on unchecked
16967         overriding/hiding methods for error report.
16968         (java_check_methods): Fixed leading comment. Get classes to verify
16969         from ctxp->gclass_list. Use CHECK_METHODS macro and set
16970         CLASS_METHOD_CHECKED_P on class verification.
16971         (lookup_java_method2): Get real method name if necessary.
16972         (find_in_imports): Don't check package class access here.
16973         (resolve_package, lookup_package_type): New functions.
16974         (java_layout_classes): Fixed leading comment. Take classes to be
16975         laid out from ctxp->gclass_list.
16976         (java_complete_expand_methods): Don't expand native and abstract
16977         methods.
16978         (java_expand_classes): New function.
16979         (resolve_expression_name): Use additional argument ORIG.  Retrieve
16980         values of static final field of primitive types.
16981         (resolve_field_access): Handles static final field of promotive
16982         type.
16983         (resolve_qualified_expression_name): Handle STRING_CST as
16984         primaries and package name resolution. Check deprecation on found
16985         decls. Set where_found and type_found on non static field resolved
16986         during qualification. Layout non primitive field decl types.
16987         (check_deprecation): New function.
16988         (maybe_access_field): Simplified.
16989         (patch_method_invocation_stmt): Local variable CLASS_TYPE
16990         removed. Reverse method's argument when primary is a type. Don't
16991         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
16992         instead. Include abstract class in the list of class searchable
16993         for constructors. Use DECL_CONTEXT of found method for access
16994         checks. Check method deprecation.
16995         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
16996         converting arguments. Handle INVOKE_INTERFACE.
16997         (lookup_method_invoke): Search constructor using existing
16998         infrastructure (don't rely on lookup_java_constructor anymore).
16999         (find_applicable_accessible_methods_list): Extra argument flag
17000         LC. Now include constructor in the search.
17001         (qualify_ambiguous_name): Conditional expression are primaries.
17002         (not_initialized_as_it_should_p): static final are always
17003         initialized.
17004         (java_complete_tree): Pass extra NULL argument to
17005         resolve_expression_name. Stricter test to carry on patching
17006         assignments. New case for INSTANCEOF_EXPR.
17007         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17008         (check_final_assignment, maybe_build_primttype_type_ref): New
17009         functions.
17010         (patch_assignment): Detect resolved static finals and carry normal
17011         assignment error check on them. Inline PRIMTYPE.TYPE read access.
17012         (try_builtin_assignconv): Access constant 0 on all primitive
17013         types.
17014         (valid_builtin_assignconv_identity_widening_p): Accept identical
17015         types. Accept all promoted type on int type.
17016         (valid_ref_assignconv_cast_p): Accept a null pointer to be
17017         assigned to a reference.
17018         (valid_method_invocation_conversion_p): Accept to check null
17019         pointers.
17020         (build_binop): Merge declaration and initialization of local
17021         variable BINOP.
17022         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17023         numeric types. Improved validity test for qualify operators on
17024         references.
17025         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17026         and PREINCREMENT_EXPR. Also detect resolved static finals of a
17027         primitive type and issue the appropriate error message.
17028         (resolve_type_during_patch): Mark class loaded when resolved.
17029         (patch_cast): Allow null to be cased to reference types.
17030         (build_null_of_type): New function.
17031         (patch_array_ref): Handle array on references correctly.
17032         (patch_return): Removed unused local variable MODIFY. Force
17033         boolean to be returned as integers. Allows null to be returned by
17034         a function returning a reference.
17035         * typeck.c (convert_to_integer, convert_to_real,
17036         convert_to_pointer): Prototypes moved to convert.h
17037         (lookup_argument_method): Use method real name, if necessary.
17039 1998-10-30  Tom Tromey  <tromey@cygnus.com>
17041         * class.c (build_class_ref): Changed name of primitive classes to
17042         start with `_Jv_'.
17044         * class.c (make_class_data): Renamed fields: nmethods to
17045         method_count, method_count to dtable_method_count.  Always set
17046         `state' field to 0.
17047         * decl.c (init_decl_processing): Likewise.
17049 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17051         * class.c (layout_class): Don't mangle <finit>, produce
17052         __finit<class> instead. Don't verify artificial methods.
17053         * decl.c (finit_identifier_node): New declared global.
17054         (init_decl_processing): finit_identifier_node initialized.
17055         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17056         * java-tree.h (finit_identifier_node): Declared as extern.
17057         (struct lang_decl): New field called_constructor.
17058         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17059         (CLASS_HAS_FINIT_P): New macro.
17060         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17061         explicit constructor invocation.
17062         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17063         CALL_SUPER_CONSTRUCTOR_P): New macros.
17064         (write_classfile): Added prototype.
17065         * jcf-parse.c (jcf_parse_source): Parse and remember for
17066         generation if the file was seen on the command line.
17067         (parse_source_file): Don't write the class file here.
17068         (yyparse): Loop on files rewritten. Set current_jcf.
17069         (parse_zip_file_entries): Parse class file only if it was found.
17070         * lang.c (init_parse): Don't open command line provided filename
17071         here.
17072         (lang_parse): Don't set main_jcf anymore.
17073         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17074         (JCONSTRUCTOR_CHECK): New macro.
17075         (JBSC_TYPE_P): New macro.
17076         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17077         (COMPLETE_CHECK_OP_2): New macro.
17078         (struct parse_ctxt): New field explicit_constructor_p.
17079         (check_class_interface_creation): Fixed prototype indentation.
17080         (patch_method_invocation_stmt): Prototype reflects added argument.
17081         (patch_invoke): Likewise.
17082         (complete_method_declaration, build_super_invocation,
17083         verify_constructor_circularity,
17084         build_this_super_qualified_invocation, get_printable_method_name,
17085         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17086         verify_constructor_super, create_artificial_method,
17087         start_artificial_method_body, end_artificial_method_body,
17088         generate_field_initialization_code): New function prototypes.
17089         * parse.y: Fixed leading comment
17090         (constructor_header:, constructor_body:, block_end:): Rules tagged
17091         <node>.
17092         (type_declaration:): Call maybe_generate_finit.
17093         (method_declaration:): Action for method_body: placed in new
17094         function complete_method_declaration, called here.
17095         (constructor_declaration:): Defined actions. Removed leading
17096         FIXME.
17097         (constructor_header:): New rule with action.
17098         (constructor_body:): Rule rewritten using block_begin: and
17099         block_end:. Defined actions.
17100         (constructor_declarator:, explicit_constructor_invocation:):
17101         Defined actions.
17102         (block:): Use new rules block_begin: block_end:.
17103         (block_begin:, block_end:): New rules and actions.
17104         (block_statements:): Fixed error message for explicit
17105         constructors.
17106         (method_invocation:): Call build_this_super_qualified_invocation
17107         if primary is `this' or `super' was seen.
17108         (conditional_expression:): Action defined.
17109         (extra_ctxp_pushed_p): New static global flag.
17110         (java_parser_context_save_global): Create parser context if
17111         necessary. Use extra_ctxp_pushed_p to remember it.
17112         (java_parser_context_restore_global): Pop extra parser context if
17113         one exists.
17114         (build_array_from_name): Array on primitive types are marked
17115         loaded.
17116         (register_fields): Restore new name in field initializer
17117         expression if type was altered. Non static fields initialized upon
17118         declaration marked initialized.
17119         (maybe_generate_finit): New function.
17120         (maybe_generate_clinit): Use create_artificial_method,
17121         start_artificial_method_body, end_artificial_method_body. Generate
17122         debug info for enclosed initialization statements.
17123         (method_header): Fixed leading comment. Check constructor
17124         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17125         accordingly.
17126         (complete_method_declaration, constructor_circularity_msg,
17127         verify_constructor_circularity): New functions.
17128         (get_printable_method_name): New function.
17129         (check_method_redefinition): Don't rename <finit> methods. Fix
17130         declared constructor names. Error message for
17131         constructors modified.
17132         (java_check_regular_methods): Local variable seen_constructor
17133         renamed saw_constructor. Skip verification on constructors. Create
17134         default constructor with create_artificial_method.
17135         (java_check_methods): Removed unnecessary empty line.
17136         (create_artificial_method, start_artificial_method_body,
17137         end_artificial_method_body): New functions.
17138         (java_layout_classes): Changed leading comment. Reverse fields
17139         list if necessary. Always layout java.lang.Object if being
17140         defined.
17141         (java_complete_expand_methods): Verify constructor circularity.
17142         (java_complete_expand_method): Call fix_constructor on
17143         constructors.  Local variable no_ac_found removed. Restore
17144         bindings if method body expansion failed.
17145         (fix_constructors, verify_constructor_super,
17146         generate_field_initialization_code): New function.
17147         (java_expand_classes): Fixed leading comment. Write class file
17148         here.
17149         (resolve_expression_name): Check for illegal instance variable
17150         usage within the argument scope of an explicit constructor
17151         invocation.
17152         (resolve_qualified_expression_name): Pass extra from_super flag
17153         when invoking patch_method_invocation_stmt. New case for
17154         conditional expression when used as a primary. Check for error
17155         when acquiring super.
17156         (patch_method_invocation_stmt): Added extra argument super. New
17157         local variable is_static_flag. Set class_to_search according to
17158         the nature of the constructor invocation. Don't add `this'
17159         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17160         invocation within the argument scope of explicit constructor
17161         invocation. Set is_static according to is_static_flag. Provide
17162         extra `super' argument to patch_invoke invocation.
17163         (patch_invoke): New argument from_super. Loop on arguments
17164         indentation fixed. Pass from_super to invocation_mode. New switch
17165         case INVOKE_SUPER. Fixed error message in switch default case.
17166         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17167         value.
17168         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17169         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17170         message takes constructors into account.
17171         (find_applicable_accessible_methods_list): Fixed indentation.
17172         (qualify_ambiguous_name): Take explicit constructor invocation
17173         into account. Deal with a conditional expression as a primary to
17174         a method call.
17175         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17176         case. Added extra argument to patch_method_invocation_stmt.
17177         Register calls made to explicit constructor `this'. Don't call
17178         save_expr in ARRAY_REF case when emitting class files. Check for
17179         illegal use of this when expanding explicit constructor invocation
17180         arguments.
17181         (complete_function_arguments): Set and reset parser context
17182         explicit_constructor_p field value when appropriate.
17183         (build_super_invocation, build_this_super_qualified_invocation):
17184         New functions.
17185         (patch_assignment): Fixed typo.
17186         (patch_unaryop): Check on final fields occurs only when a decl
17187         exits.
17188         (patch_return): Take constructors into account.
17189         (patch_conditional_expr): New function.
17190         * typeck.c (build_java_signature): Removed unnecessary empty line.
17192 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17194         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17196 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17198         * decl.c (init_decl_processing): Renamed fields.
17199         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17200         interface_len, msize fields.
17202         * class.c (make_class_data): Removed subclass_head and
17203         subclass_next fields.
17204         * decl.c (init_decl_processing): Removed subclass_head and
17205         subclass_next fields.
17207 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17209         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17210         * mangle.c (emit_unicode_mangled_name): Similarly.
17212 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17214         * jcf-parse.c (get_constant): Place braces around code to compute
17215         'd' when REAL_ARITHMETIC is not defined.
17217 1998-10-25  H.J. Lu  (hjl@gnu.org)
17219         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17220         dependency.
17222 1998-10-23  Tom Tromey  <tromey@cygnus.com>
17224         * lang-specs.h: `.zip' files are input to jc1.
17226 1998-10-22  Per Bothner  <bothner@cygnus.com>
17228         * jvspecs.c:  Add (but don't enable) support for combining multiple
17229         .class and .java input filenames to a single jc1 invocation.
17230         Add support for -C flag (copile to .class files).
17231         Translate -classpath and -CLASSPATH arguments.
17232         * lang-specs.h:  Don't set %2 spec.
17234 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17236         * jcf-path.c (add_entry): Don't add trailing separator if entry is
17237         a .zip file.
17238         (add_path): Don't add trailing separator to non-empty path
17239         elements.
17241         * lang.c (lang_decode_option): Check for -fclasspath and
17242         -fCLASSPATH before examining other `-f' options.
17244         * java-tree.h (finalize_identifier_node): Don't declare.
17245         * class.c (make_class_data): Don't push "final" field.
17246         * decl.c (init_decl_processing): Don't push "final" field.
17247         (finalize_identifier_node): Removed.
17248         (init_decl_processing): Don't set finalize_identifier_node.
17250         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17252 1998-10-11  Anthony Green  <green@cygnus.com>
17254         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17255         (JV_SCAN_SOURCES): New macro.
17256         (JCF_DUMP_SOURCES): Likewise.
17257         (jcf-dump$(exeext)): New target.
17258         (jv-scan$(exeext)): New target.
17260 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17262         * Makefile.in (LEX): Removed.
17263         (LEXFLAGS): Likewise.
17264         (SET_BISON): New macro.
17265         (BISON): Removed.
17266         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
17267         spurious diffs in parse.c.
17268         ($(PARSE_SCAN_C)): Likewise.
17269         (PARSE_DIR): New macro.
17270         (PARSE_C): Use it.
17271         (PARSE_SCAN_C): Likewise.
17272         (PARSE_RELDIR): New macro.
17274         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17276         * jcf-io.c (find_class): Use saw_java_source to determine when to
17277         look for `.java' file.
17278         * jcf-parse.c (saw_java_source): New global.
17279         (yyparse): Set it if `.java' file seen.
17281         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17282         (GCJH_SOURCES): Likewise.
17283         * Makefile.in (datadir): New macro.
17284         (libjava_zip): Likewise.
17285         (JAVA_OBJS): Added jcf-path.o.
17286         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17287         (../gcjh$(exeext)): Likewise.
17288         (jcf-path.o): New target.
17289         * java-tree.h (fix_classpath): Removed decl.
17290         * jcf-parse.c (fix_classpath): Removed.
17291         (load_class): Don't call fix_classpath.
17292         * parse.y (read_import_dir): Don't call fix_classpath.
17293         * lex.h: Don't mention classpath.
17294         * lex.c (java_init_lex): Don't initialize classpath.
17295         * jcf-io.c (classpath): Removed global.
17296         (find_class): Use jcf_path iteration functions.  Correctly search
17297         class path for .java file.
17298         (open_in_zip): New argument `is_system'.
17299         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
17300         classpath-related options.
17301         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17302         and -I.
17303         (lang_init): Call jcf_path_init.
17304         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17305         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
17306         Correctly put braces around second string in each entry.
17307         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
17308         classpath-related options.
17309         (help): Updated for new options.
17310         * jcf.h: Declare functions from jcf-path.c.  Don't mention
17311         `classpath' global.
17312         * jcf-path.c: New file.
17314         * jcf-depend.c: Include jcf.h.
17316         * jcf-write.c (localvar_alloc): Returns `void'.
17317         (localvar_free): Removed unused variable.
17319         * lang.c (OBJECT_SUFFIX): Define if not already defined.
17320         (init_parse): Use OBJECT_SUFFIX, not ".o".
17322 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17324         * class.c (emit_register_classes): Renamed from
17325         emit_register_class.
17326         * java-tree.h (emit_register_classes): Prototype renamed from
17327         emit_register_class.
17328         * jcf-parse.c (yyparse): Call emit_register_classes once before
17329         returning.
17330         * parse.y (java_expand_classes): No longer register classes.
17332 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17334         * class.c (is_compiled_class): New local variable
17335         seen_in_zip. Identify classes found in currently compiled source
17336         file(s).
17337         * decl.c (complete_start_java_method): Fixed typo.
17338         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17339         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17340         (CLASS_P): Moved around.
17341         (java_parse_abort_on_error): Macro moved from jcf-parse.c
17342         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17343         java-tree.h
17344         (jcf_parse_source): Changed leading comment. Removed unnecessary
17345         fclose and CLASS_FROM_SOURCE_P marking.
17346         (parse_source_file): New local variables remember_for_generation
17347         and filename. Mark parsed file name identifier node. Removed block
17348         executed when parse_only was null. Set remember_for_generation.
17349         Use it as an argument to java_pop_parser_context.
17350         (yyparse): New local variables several_files, list, next node and
17351         current_file_list. Split ampersand separated file names into
17352         current_file_list. Iterate through the list and parse accordingly.
17353         * parse.h (java_pop_parser_context): New function prototype.
17354         * parse.y (ctxp_for_generation): New static global variable.
17355         (java_pop_parser_context): New argument generate. Link popped ctxp
17356         to ctxp_for_generation list accordingly.
17357         (java_complete_expand_methods): Fixed indentation.
17358         (java_expand_classes): New function.
17360 1998-10-17  Per Bothner  <bothner@cygnus.com>
17362         * Makefile.in:  Link with libiberty.a instead of memmove.o.
17364 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17366         * lex.c (setjmp.h): No longer included.
17367         * lex.h (setjmp.h): Included.
17368         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17369         (duplicate_declaration_error_p): Renamed from
17370         duplicate_declaration_error.
17371         (build_array_from_name): New function prototype.
17372         * parse.y (setjmp.h): No longer included.
17373         (variable_declarator_id): Define action.
17374         (build_array_from_name): New function.
17375         (duplicate_declaration_error_p): Renamed from
17376         duplicate_declaration_error.  Fixed leading comment.
17377         (register_fields): Main `for' loop reorganized. Uses
17378         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17379         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17380         build_array_from_name.
17381         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17382         types.
17383         (read_import_dir): Don't try to skip `.' and `..'.
17384         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17385         build_array_from_name. Main `for' loop reorganized.
17386         (resolve_qualified_expression_name): When building access to a
17387         field, use the type where the field was found, not its own type.
17388         (maybe_access_field): Use field DECL_CONTEXT if the type where the
17389         field was found is null.
17390         (qualify_ambiguous_name): Sweep through all successive array
17391         dimensions.
17393 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17395         * java-tree.h (pop_labeled_block, lang_printable_name,
17396         maybe_add_interface, set_super_info, get_access_flags_from_decl,
17397         interface_of_p, inherits_from_p, fix_classpath,
17398         complete_start_java_method, emit_handlers, init_outgoing_cpool,
17399         make_class_data, register_class, alloc_name_constant): New
17400         function prototypes.
17401         * lang.c (lang_decode_option): Set argc argument unused. Fixed
17402         indentation. Added cast to remove warning.
17403         (lang_printable_name): Set v argument unused.
17404         (lang_print_error): Added argument to lang_printable_name call.
17405         (java_dummy_print, print_lang_decl, print_lang_type,
17406         print_lang_identifier, lang_print_xnode): All argument marked
17407         unused.
17408         * lex.c (java_unget_unicode): Removed unnecessary argument.
17409         (java_allocate_new_line): Unused local variable is gone.
17410         (java_read_char): Added parenthesis in expressions to remove
17411         warnings.  Added final return statement.
17412         (java_read_unicode): Added parenthesis in expression to remove
17413         warning.
17414         (java_parse_end_comment): Fixed java_unget_unicode invocation.
17415         (java_parse_escape_sequence): Likewise.
17416         (java_lex): Unused local variables are gone. Fixed
17417         java_unget_unicode invocation.
17418         * lex.h (set_float_handler): Prototype added when JC1_LITE not
17419         defined.
17420         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
17421         lang_printable_name invocation in macro.
17422         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
17423         Likewise.
17424         (duplicate_declaration_error): Suppressed unused argument in
17425         prototype.
17426         (identical_subpath_p): Function declaration is gone.
17427         (patch_invoke): Suppressed unused argument in prototype.
17428         (patch_cast, build_labeled_block, check_thrown_exceptions):
17429         Likewise.
17430         * parse.y (setjmp.h): Included
17431         (toplev.h): Likewise.
17432         (field_declaration:): Suppressed unused local
17433         (label_decl:): Fixed build_labeled_block invocation.
17434         (java_pop_parser_context): Put extra parenthesis around assignment
17435         in if.
17436         (yyerror): Suppressed unused local variables.
17437         (variable_redefinition_error): Fixed lang_printable_name
17438         invocation.
17439         (create_interface): Suppressed unused local variables.
17440         (create_class): Likewise.
17441         (duplicate_declaration_error): Suppressed unused argument. Fixed
17442         lang_printable_name invocation.
17443         (register_fields): Suppressed unused local variable. Fixed
17444         duplicate_declaration_error invocation.
17445         (method_header): Suppressed unused local variable.
17446         (method_declarator, parser_check_super): Likewise.
17447         (java_complete_class): Suppressed unused local variable. Fixed
17448         fatal error message.
17449         (complete_class_report_errors): Added default: in switch.
17450         (java_check_regular_methods): Fixed lang_printable_name
17451         invocations.
17452         (check_throws_clauses): Likewise.
17453         (java_check_abstract_methods): Suppressed unused local
17454         variable. Fixed lang_printable_name invocation.
17455         (read_import_entry): Added supplemental return statement.
17456         (read_import_dir): Suppressed unused local variables.
17457         (check_pkg_class_access, declare_local_variables): Likewise.
17458         (source_start_java_method): Suppressed unused extern variable
17459         declarations
17460         (expand_start_java_method): Suppressed unused extern and local
17461         variable declarations.
17462         (java_complete_expand_methods): Likewise.
17463         (java_complete_expand_method): Suppressed unused local variables.
17464         (make_qualified_name): Likewise.
17465         (resolve_qualified_expression_name): Added default: in
17466         switch. Fixed lang_printable_name invocation.
17467         (class_instance_creation_expression): Added parenthesis around
17468         expressions.
17469         (patch_method_invocation_stmt): Fixed lang_printable_name and
17470         patch_invoke invocations.
17471         (check_for_static_method_reference): Fixed lang_printable_name
17472         invocation.
17473         (patch_invoke): Suppressed unused arguments and local variables.
17474         (lookup_method_invoke): Suppressed unused local variables.
17475         (qualify_ambiguous_name): Added default: in switch.
17476         (identical_subpath_p): Function removed.
17477         (patch_assignment): Suppressed unused local variables. Suppressed
17478         unnecessary if statement. Fixed lang_printable_name invocations.
17479         (try_builtin_assignconv): Fixed lang_printable_name invocations.
17480         (valid_ref_assignconv_cast_p): Parenthesis around
17481         expression. Suppressed unused local variables.
17482         (build_binop): Suppressed unused local variables. fixed
17483         lang_printable_name invocations.
17484         (string_constant_concatenation): Suppressed unused local
17485         variables.
17486         (patch_unaryop): Fixed lang_printable_name invocation.
17487         (patch_cast): Suppressed unnecessary argument. Fixed
17488         lang_printable_name invocation.
17489         (patch_array_ref): Fixed lang_printable_name invocation.
17490         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
17491         (build_labeled_block): Suppressed unused argument.
17492         (generate_labeled_block): Fixed build_labeled_block invocation.
17493         (build_loop_body): Suppressed unused local variables.
17494         (patch_loop_statement): Likewise.
17495         (patch_exit): Fixed lang_printable_name invocation.
17496         (patch_switch_statement): Likewise.
17497         (case_identity): First argument marked unused.
17498         (patch_try_statement): Fixed lang_printable_name invocations.
17499         (patch_synchronized_statement, patch_throw_statement): Likewise.
17500         (check_thrown_exceptions): Fixed check_thrown_exceptions and
17501         lang_printable_name invocations.
17502         (check_thrown_exceptions_do): Suppressed unused argument.
17504 1998-10-14  Tom Tromey  <tromey@cygnus.com>
17506         * jcf-write.c (write_classfile): Add output class file as target.
17507         * lang-options.h: Added -MD, -MMD, -M, and -MM.
17508         * jcf.h: Added declarations for dependency-tracking functions.
17509         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
17510         * lang.c (lang_decode_option): Recognize -MD and -MMD.
17511         (finish_parse): Call jcf_dependency_write.
17512         (dependency_tracking): New global.
17513         (DEPEND_SET_FILE): New define.
17514         (DEPEND_ENABLE): New define.
17515         (init_parse): Enable dependency tracking if required.
17516         Include "flags.h".
17517         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
17518         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17519         (../gcjh$(exeext)): Likewise.
17520         (jcf-depend.o): New target.
17521         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
17522         (GCJH_SOURCES): Likewise.
17523         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
17524         dep_name argument.
17525         (find_classfile): Added dep_name argument.
17526         (find_class): Compute name of dependency.
17527         (open_in_zip): Call jcf_dependency_add_file.
17528         * gjavah.c (output_file): No longer global.
17529         (usage): Don't mention "gjavah".
17530         (help): Likewise.
17531         (java_no_argument): Likewise.
17532         (version): Likewise.
17533         (main): Recognize and handle -M family of options.
17534         (print_mangled_classname): Return is void.
17535         (process_file): Handle case where output is suppressed.
17536         (HANDLE_END_FIELD): Likewise.
17537         (HANDLE_METHOD): Likewise.
17538         * jcf-depend.c: New file.
17540 1998-10-13  Jeffrey A Law  (law@cygnus.com)
17542         * java-tree.def: Add missing newline at EOF.
17544 1998-10-13  Tom Tromey  <tromey@cygnus.com>
17546         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
17547         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
17548         function.
17549         Include <config.h> and "system.h".
17550         (disassemble_method): Undefine RET to avoid clash with
17551         config/i386/i386.h.
17553 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17555         * decl.c (runtime_exception_type_node, error_exception_type_node):
17556         New global variables.
17557         (init_decl_processing): Initialized.
17558         * expr.c (java_lang_expand_expr): Set caught exception type to
17559         null if catch handler argument doesn't exit.
17560         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
17561         tree codes.
17562         * java-tree.h (runtime_exception_type_node,
17563         error_exception_type_node): Global variables declared.
17564         (DECL_FUNCTION_THROWS): New macro.
17565         (DECL_FUNCTION_BODY): Modified comment.
17566         (DECL_SPECIFIC_COUNT): Likewise.
17567         (struct lang_decl): New field throws_list.
17568         (IS_UNCHECKED_EXPRESSION_P): New macro.
17569         * lex.c (java_lex): Generate location information for THROW_TK.
17570         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
17571         EXCEPTIONS_P): New macros.
17572         (enum jdep_code): New value JDEP_EXCEPTION.
17573         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
17574         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
17575         PATCH_METHOD_RETURN_ERROR): New macros.
17576         (patch_method_invocation_stmt): Added new argument to prototype.
17577         (patch_synchronized_statement, patch_throw_statement,
17578         check_thrown_exceptions, check_thrown_exceptions_do,
17579         purge_unchecked_exceptions, check_throws_clauses): New function
17580         prototypes.
17581         * parse.y Fixed typo in keyword section.
17582         (throw:): Rule tagged <node>.
17583         (THROW_TK): Keyword tagged <operator>.
17584         (method_header:): Last argument to call to method_header passed
17585         from throws: rule.
17586         (throws:, class_type_list:, throw_statement:,
17587         synchronized_statement:, synchronized:): Defined actions.
17588         (method_header): New local variable current. Register exceptions
17589         from throws clause.
17590         (java_complete_tree): Complete and verify exceptions from throws
17591         clause.
17592         (complete_class_report_errors): Error message on exceptions not
17593         found
17594         (java_check_regular_methods): Fixed typo. Shortcut on private
17595         overriding methods. Changed error message on method
17596         redefinition. Check for throws clause compatibility.
17597         (check_throws_clauses): New function.
17598         (java_check_abstract_methods): Use DECL_NAME for wfl or current
17599         method. Changed error message on method redefinition.
17600         (currently_caught_type_list): New static variable.
17601         (java_complete_expand_methods): Purge unchecked exceptions from
17602         throws clause list. Call PUSH_EXCEPTIONS before walk and
17603         POP_EXCEPTIONS after.
17604         (resolve_qualified_expression_name): Pass new argument as NULL to
17605         patch_method_invocation_stmt.
17606         (patch_method_invocation_stmt): New argument ref_decl. Invoke
17607         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
17608         argument list when appropriate. Use new argument if non null to
17609         store selected method decl.
17610         (patch_invoke): Convert if necessary args of builtin types before
17611         forming CALL_EXPR. Argument list no longer reversed here.
17612         (invocation_mode): Treat final methods as static methods.
17613         (java_complete_tree): New cases for THROW_EXPR: and
17614         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
17615         function call.
17616         (complete_function_arguments): No more RECORD_TYPE
17617         conversion. Function parameter nodes no longer saved.
17618         (valid_ref_assignconv_cast_p): Avoid handling null type.
17619         (patch_binop): Fixed null constant reference handling.
17620         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
17621         BUILD_THROW macros.
17622         (patch_try_statement): Fixed comments. Record caught types in
17623         list, push the list, expand try block and pop the list.
17624         (patch_synchronized_statement, patch_throw_statement,
17625         check_thrown_exceptions, check_thrown_exceptions_do,
17626         purge_unchecked_exceptions): New functions.
17627         * typeck.c (lookup_argument_method): Allow WFL in place of method
17628         DECL_NAME during method definition check
17630 1998-10-09  Tom Tromey  <tromey@cygnus.com>
17632         * gjavah.c (decode_signature_piece): New function.
17633         (print_c_decl): Use it.  Added `name_override' argument.
17634         (print_method_info): Use name_override argument to print_c_decl.
17635         (seen_fields): Removed.
17636         (print_field_info): Don't update seen_fields.
17637         (struct method_name): New structure.
17638         (method_name_list): New global.
17639         (print_method_info): Add new method to list of methods.
17640         (name_is_method_p): New function.
17641         (print_field_info): If field name has same name as method, then
17642         change field name.
17643         (process_file): Parse methods before fields.
17644         (field_pass): New global.
17645         (HANDLE_END_FIELD): Take field_pass into account.
17647 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17649         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
17650         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
17652 1998-10-03  Anthony Green  <green@cygnus.com>
17654         * jvspec.c: Fix bug in jvgenmain_spec patch.
17656 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17658         * Makefile.in (lang.o:): Install dependency on java-tree.def.
17659         * decl.c (soft_exceptioninfo_call_node): New global variable.
17660         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
17661         takes extra integer argument. soft_exceptioninfo_call_node
17662         initialized.
17663         * except.c (java_set_exception_lang_code): New function
17664         (method_init_exceptions): Called here.
17665         (prepare_eh_table_type): New function.
17666         (expand_end_java_handler): Called here.
17667         * expr.c (build_java_throw_out_of_bounds_exception): Now features
17668         one argument. Modified generation of call to
17669         soft_badarrayindex_node to use new argument.
17670         (build_java_arrayaccess): Pass faulty index value to
17671         build_java_throw_out_of_bounds_exception.
17672         (generate_name): New function.
17673         (java_lang_expand_expr): New local variables node, current,
17674         has_finally_p. Expand TRY_EXPR node.
17675         (process_jvm_instruction): Replace top of the stack with thrown
17676         object reference when entering exception handler.
17677         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
17678         specific tree codes.
17679         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
17680         global.
17681         (DECL_SPECIFIC_COUNT): New macro.
17682         (prepare_eh_table_type, java_set_exception_lang_code,
17683         generate_name): New function declarations.
17684         (match_java_method): Declaration deleted.
17685         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
17686         macros.
17687         * lex.c (TRY_TK, CATCH_TK): Generate location information.
17688         * parse.h (redefinition_error, refine_accessible_methods_list,
17689         can_cast_to_p): Function declaration removed.
17690         (classitf_redefinition_error, variable_redefinition_error,
17691         parse_jdk1_1_error, find_applicable_accessible_methods_list,
17692         find_most_specific_methods_list, argument_types_convertible,
17693         enter_a_block, valid_builtin_assignconv_identity_widening_p,
17694         valid_cast_to_p, valid_method_invocation_conversion_p,
17695         try_reference_assignconv, add_stmt_to_compound,
17696         build_jump_to_finally, build_tree_list, patch_try_statement,
17697         java_get_catch_block): New function declarations.
17698         * parse.y (string_buffer_type): Global variable deleted.
17699         (group_of_labels, catches, catch_clause, catch_clause_parameter,
17700         finally): Rules tagged <node>.
17701         (TRY_TK, CATCH_TK): Token tagged <operator>.
17702         (class_body_declaration:, class_member_declaration:,
17703         formal_parameter:, explicit_constructor_invocation:,
17704         interface_member_declaration:, constant_declaration:,
17705         primary_no_new_array:, class_instance_creation_expression:,
17706         array_creation_expression:): Issue error on unsuported JDK1.1
17707         features.
17708         (try_statement:, catches:, finally:): Define actions.
17709         (catch_clause_parameter): New rule.
17710         (catch_clause:): Use new rule catch_clause_parameter.
17711         (parse_jdk1_1_error): New function.
17712         (redefinition_error): Renamed classitf_redefinition_error.
17713         (variable_redefinition_error): New function.
17714         (check_class_interface_creation): Call
17715         classitf_redefinition_error.
17716         (java_complete_tree): Added error message on JDEP_TYPE: case.
17717         (complete_class_report_errors): Fixed indentation.
17718         (declare_local_variables): Call variable_redefinition_error.
17719         (source_end_java_method): Call java_set_exception_lang_code and
17720         emit_handlers where appropriate.
17721         (java_method_add_stmt): Call add_stmt_to_block.
17722         (add_stmt_to_block): New function.
17723         (lookup_method_invoke): Fixed outside comment. new local variable
17724         candicates.  Call find_applicable_accessible_methods_list and
17725         find_most_specific_methods_list when searching for a
17726         method. Modified error report to list possible candidates when
17727         applicable.
17728         (find_applicable_accessible_methods_list,
17729         find_most_specific_methods_list, argument_types_convertible): New
17730         function.
17731         (refine_accessible_methods_list): Function deleted.
17732         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
17733         expr (if applicable) before calling patch_array_ref.
17734         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
17735         (enter_block): Fixed comment.
17736         (enter_a_block): New function.
17737         (patch_assignment): Reorganized. Call try_reference_assignconv for
17738         references. Call valid_cast_to_p instead of can_cast_to_p.
17739         (try_reference_assignconv,
17740         valid_builtin_assignconv_identity_widening_p): New functions.
17741         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
17742         (valid_cast_to_p, valid_method_invocation_conversion_p): New
17743         functions.
17744         (build_string_concatenation): Don't resolve StringBuffer.
17745         (patch_cast): Fixed inverted arguments.
17746         (patch_array_ref): Code to save array expr deleted. Call
17747         valid_cast_to_p instead of can_cast_to_p.
17748         (generate_labeled_block): Call generate_name.
17749         (build_jump_to_finally, build_try_statement, java_get_catch_block,
17750         patch_try_statement): New functions.
17751         * typeck.c (match_java_method): Function deleted.
17753 1998-10-02  Anthony Green  <green@cygnus.com>
17755         * jvspec.c: jvgenmain_spec uses different temporary file names.
17757 1998-10-02  Anthony Green  <green@cygnus.com>
17759         * jvspec.c (lang_specific_driver): Fail if user specifies
17760         --main= when not linking.
17762 1998-09-28  Tom Tromey  <tromey@cygnus.com>
17764         * class.c (make_class_data): Push value for `thread' field.
17765         * decl.c (init_decl_processing): Added `thread' field to class.
17767         * class.c (add_field): Always make static fields externally
17768         visible.
17770 1998-09-26  Anthony Green  <green@cygnus.com>
17772         * expr.c (build_java_athrow,
17773         build_java_throw_out_of_bounds_exception, expand_invoke,
17774         build_newarray, expand_java_multianewarray, build_java_monitor):
17775         Update comments to reflect _Jv_* function names.
17777 1998-09-25  Per Bothner  <bothner@cygnus.com>
17779         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
17780         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
17781         * parse.y (expand_start_java_method):  Likewise.
17783 1998-09-24  Per Bothner  <bothner@cygnus.com>
17785         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
17787         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
17788         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
17789         * expr.c:  Remove no-longer-needed calls to promote_type.
17790         * decl.c (give_name_to_locals):  Liekwise.
17791         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
17792         * parse.y:  Add/remove promote_type calls as appropriate.
17793         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
17794         (parse_signature_string):  Likewise.
17795         (build_java_array_type):  Fix for now signature convenions.
17797         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
17799 1998-09-23  Tom Tromey  <tromey@cygnus.com>
17801         * class.c (init_class_processing): libjava function renamed to
17802         _Jv_RegisterClass.
17804 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17806         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
17807         * java-tree.def: Fixed DEFTREECODE third argument.
17808         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
17809         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
17810         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
17811         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17812         JAVA_THIS_EXPR): Now replaced by tree code definitions.
17813         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
17814         * lang.c (java_tree_code_type, java_tree_code_length,
17815         java_tree_code_name): New arrays.
17816         (lang_init): Append Java tree node definitions to Gcc ones.
17817         * lex.c (expression_obstack): Declared as extern when JC1_LITE
17818         defined.
17819         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
17820         wfl_to_string.
17821         (java_lex): Allow declaration of empty string constants. Retain
17822         location information on CASE_TK and DEFAULT_TK.
17823         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
17824         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
17825         Modified to be more robust.
17826         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
17827         (build_new_invocation, try_builtin_assignconv,
17828         patch_switch_statement, string_constant_concatenation,
17829         build_string_concatenation, patch_string_cst, patch_string,
17830         java_expand_switch): New function declarations.
17831         * parse.y: Rules related to switch and EH tagged <node>.
17832         (label_id): Set to NULL_TREE
17833         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
17834         tree nodes.
17835         (this_or_super:): Fixed indentation.
17836         (statement:, statement_nsi:, statement_without_trailing_substatement:,
17837         statement_expression:): Removed call to RULE on all sub-rules.
17838         (switch_expression:, switch_labels:): New rules.
17839         (switch_statement:, switch_block:, switch_block_statement_groups:,
17840         switch_block_statement_group:, switch_labels:, switch_label:):
17841         Defined actions.
17842         (throw_statement:, synchronized_statement:, try_statement:):
17843         Defined temporary actions.
17844         (class_instance_creation_expression:): Call
17845         build_new_invocation. Fixed indentation.
17846         (field_access): Fixed indentation.
17847         (method_invocation): Likewise.
17848         (make_qualified_primary): Use THIS_EXPR.
17849         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
17850         resolving from SUPER, set *type_found.
17851         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
17852         (java_complete_tree): Removed unused local variable `location'. Case
17853         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
17854         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
17855         on MODIFY_EXPR: and all binary operator tree code cases. Removed
17856         STRING_CST: case. default: checks for patchable strings.
17857         (complete_function_arguments): Transform string constant or
17858         crafted StringBuffer if necessary.
17859         (build_method_invocation): Fixed comments.
17860         (build_new_invocation): New function.
17861         (patch_assignment): Call try_builtin_assignconv to figure a valid
17862         assignment conversion between builtin types.
17863         (try_builtin_assignconv): New function.
17864         (build_binop): Use URSHIFT_EXPR directly to call build.
17865         (operator_string): Use UNARY_PLUS_EXPR.
17866         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
17867         operator.
17868         (do_merge_string_cste, merge_string_cste,
17869         string_constant_concatenation, build_string_concatenation,
17870         patch_string, patch_string_cst): New function.
17871         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
17872         (patch_unaryop): Likewise. New test of valid ++/-- operands.
17873         (build_newarray_node): Use NEW_ARRAY_EXPR.
17874         (build_this): Use THIS_EXPR.
17875         (build_return): Enable debug information on return statement.
17876         (build_if_else_statement): Likewise.
17877         (complete_labeled_statement): Fixed related comment.
17878         (build_loop_body): Fixed comment.
17879         (build_bc_statement): Enable debug information on break/continue
17880         statements.
17881         (patch_bc_statement): Fixed typos. Handle SWITCH statement
17882         context.
17883         (patch_switch_statement, case_identity, java_expand_switch): New
17884         functions.
17886 1998-09-21  Per Bothner  <bothner@cygnus.com>
17888         * buffer.h (BUFFER_INIT):  New macro.
17889         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
17890         Pass (struct jcf_partial *state) to most functions.
17891         (jcf_block, jcf_relocation):  New types.
17892         Support labels, branches, conditionals, loops.
17894 1998-09-21  Tom Tromey  <tromey@cygnus.com>
17896         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
17898 1998-09-21  Per Bothner  <bothner@cygnus.com>
17900         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
17901         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
17902         not integer_type_node (INT_TYPE_SIZ bits).
17904         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
17906         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
17907         * jcf-dump.c (print_exception_table):  New function.
17908         (disassemble_method):  Better handling of wide instructions.
17909         Make more robust for bad input.
17911 1998-09-30  Jeffrey A Law  (law@cygnus.com)
17913         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
17914         FreeBSD.
17916 1998-09-17  Jeffrey A Law  (law@cygnus.com)
17918         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
17920 1998-09-17  Tom Tromey  <tromey@cygnus.com>
17922         * Makefile.in ($(PARSE_H)): Removed target.
17924 1998-09-17  Jeffrey A Law  (law@cygnus.com)
17926         * Makefile.in (JAVA_OBJS): Add memmove.o
17927         (memmove.o): New target & rules.
17929 1998-09-15  Tom Tromey  <tromey@cygnus.com>
17931         * expr.c (expand_invoke): Don't generate a call to the class init
17932         code.
17934 1998-09-14  Jeffrey A Law  (law@cygnus.com)
17936         * Makefile.in: Add many missing dependencies.
17937         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
17938         as appropriate.
17939         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
17940         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
17942 1998-09-11  Per Bothner  <bothner@cygnus.com>
17944         * decl.c (complete_start_java_method):  If method is static (and
17945         not private) call _Jv_InitClass.
17946         * expr.c (expand_invoke):  Don't call build_class_init.
17948         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
17950 1998-09-10  Jeffrey A Law  (law@cygnus.com)
17952         * Make-lang.in (GCJ): Define before using.
17954 1998-09-09  Jeffrey A Law  (law@cygnus.com)
17956         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
17957         losing due to namespace pollution in GNU getopt.h
17959 1998-09-09  Tom Tromey  <tromey@cygnus.com>
17961         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
17962         (java.all.cross): Likewise.
17963         (java.rest.encap): Likewise.
17965 1998-09-08  Jeffrey A Law  (law@cygnus.com)
17967         * gjavah.c (print_class_decls): Fix thinko in arglist
17968         * jcv-io.c (find_classfile): Similarly.
17970 1998-09-07  Jeffrey A Law  (law@cygnus.com)
17972         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
17974 1998-09-05  Tom Tromey  <tromey@cygnus.com>
17976         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
17977         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
17978         * Makefile.in (PARSE_C): New macro.
17979         (PARSE_H): Likewise.
17980         (PARSE_SCAN_C): Likewise.
17981         ($(PARSE_C)): Target renamed from parse.c.
17982         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
17983         (clean): Remove parse-scan.c as well.
17984         (parse.o): Depend on $(PARSE_C).
17986 1998-09-05  Anthony Green  <green@cygnus.com>
17988         * README, license.terms: Removed.
17990         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
17991         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
17992         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
17993         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
17994         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
17995         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
17996         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
17997         and Java trademark attribution.
17999 1998-09-04  Tom Tromey  <tromey@cygnus.com>
18001         * Makefile.in: Use gcjh, not gjavah.
18002         * config-lang.in (stagestuff): Use gcjh, not gjavah.
18003         * Make-lang.in: Changed gjavah to gcjh everywhere.
18005 1998-09-03  Per Bothner  <bothner@cygnus.com>
18007         * gjavah.c:  Support new -prepend -add -append flags.
18008         (print_method_info):  Method is not virtual if class is final.
18010 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18012         * jv-scan.c: Fixed copyright assignment.
18013         * keyword.gperf: Likewise.
18014         * keyword.h: Likewise.
18015         * lex.c: Fixed copyright assignment.
18016         (java_lex): Push unicode back when parsing '<'.
18017         * lex.h: Fixed copyright assignment.
18018         * parse-scan.y: Likewise.
18019         * parse.h: Fixed copyright assignment.
18020         (build_debugable_stmt, complete_for_loop): New function prototypes.
18021         * parse.y: Fixed copyright assignment.
18022         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18023         size_zero_node when completing a loop with no exit condition.
18024         (for_statement_nsi:): Define action.
18025         (for_init:, for_update:): Return size_zero_node when empty.
18026         (declare_local_variables): Call build_debugable_stmt.
18027         (build_debugable_stmt): New function.
18028         (build_loop_body): Build debugable statement around loop
18029         condition part.
18030         (complete_loop_body): Take into account the debugable statement
18031         around the EXIT_EXPR.
18032         (complete_loop_body): New function.
18033         (patch_exit_expr): Fixed condition inversion.
18035 1998-09-02  Tom Tromey  <tromey@cygnus.com>
18037         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18038         name of thread define.
18039         * jvspec.c (THREAD_NAME): New macro.
18040         (GCLIB): Likewise.
18041         (THREADLIB): Likewise.
18042         (lang_specific_driver): Recognize attempt to link with thread
18043         library or gc library.  Recognize -ljava on command line so it
18044         isn't linked against more than once.
18046 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18048         * parse-scan.y (report_main_declaration): Name of the class
18049         containing `main' can be a qualified name.
18051 1998-08-31  Tom Tromey  <tromey@cygnus.com>
18053         * config-lang.in: Changed gjavac to gjc everywhere.
18054         * Make-lang.in: Changed gjavac to gjc everywhere.
18056 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18058         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18059         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18060         and install the files.
18061         * Makefile.in (JAVA_OBJS_LITE): New variable.
18062         (compiler:): Now include jv-scan as a dependency.
18063         (../jv-scan$(exeext), parse-scan.c): New targets.
18064         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18065         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18066         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18067         check for errors even if parse_only.
18068         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18069         defined.
18070         (yylex): New function. Uses java_lex body.
18071         (java_lex): Removed commented out statement. Remove local variable
18072         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18073         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18074         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18075         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18076         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18077         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18078         where appropriate.
18079         (java_lex_error): Empty if JC1_LITE is defined.
18080         (java_get_line_col): Return 0 if JC1_LITE is defined.
18081         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18082         SET_MODIFIER_CTX): Moved into the section containing the macros
18083         conditionally defined by JC1_LITE.
18084         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18085         argument if JC1_LITE is defined.
18086         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18087         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18088         is defined.
18089         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18090         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18091         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18092         to different values according to JC1_LITE.
18093         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18094         declared if JC1_LITE set.
18095         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18096         defined if JC1_LITE not set.
18097         (struct parser_ctx): Reorganized and skip the jc1 front end part
18098         if JC1_LITE set.
18099         (java_layout_classes): New function definition.
18100         (java_push_parser_context, java_init_lex, yyparse, yylex,
18101         yyerror): Prototype always declared. All other static function
18102         prototypes declared only if JC1_LITE is not set.
18103         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18104         declared in parse.h.
18105         (java_layout_classes): New function.
18106         (java_complete_expand_methods): No longer layout the class here.
18107         * parse-scan.y: New file.
18108         * jv-scan.c: New file.
18110 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18112         * gjavah.c (main): Handle -friend option.
18113         (friend_specs): New global.
18114         (generate_access): Handle friend_specs.
18115         (process_file): Likewise.
18116         (MAX_FRIENDS): New macro.
18117         (friend_count): New global.
18118         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18119         Changed all callers.
18121 1998-08-24  Per Bothner  <bothner@cygnus.com>
18123         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18124         (main):  Handle processing all the entries of a named .zip archive.
18125         * jcf-io.c (jcf_trim_old_input):  New function.
18126         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18128 1998-08-24  Per Bothner  <bothner@cygnus.com>
18130         * lang.c (flag_assume_compiled):  Make default be on.
18132 1998-08-21  Per Bothner  <bothner@cygnus.com>
18134         * jcf-dump.c:  Add bunches of flags to control output more.
18135         (process_class):  New function;  support printing more than one class.
18136         (main): Support new --print-main and --javap flags.
18137         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18138         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18140 1998-08-20  Per Bothner  <bothner@cygnus.com>
18142         Change mangling of dispatch table to match C++ vtable (w/thunks).
18143         * class.c (build_dtable_decl), java-tree.h:  New function.
18144         (make_class_data):  Call it.
18145         * decl.c (init_decl_processing):  Likewise.
18147 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18149         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18150         soft_anewarray; adjust args passed.
18151         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18152         match _Jv_NewObjectArray.
18154 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18156         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18157         * expr.c (loopup_label): Call create_label_decl.
18158         (create_label_decl): New function.
18159         (java_lang_expand_expr): Call expand_start_bindings with argument
18160         set to zero.
18161         * java-tree.h Added space after PROTO in function declarations
18162         when necessary.
18163         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18164         (create_label_decl, push_labeled_block): New function
18165         declarations.
18166         * lex.c (label_id): Initialize.
18167         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18168         switch.
18169         * parse.h Added space after PROTO in function declarations when
18170         necessary.
18171         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18172         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18173         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18174         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18175         macros.
18176         (struct parser_ctxt): New fields current_loop,
18177         current_labeled_block.
18178         (build_if_else_statement, patch_if_else_statement,
18179         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18180         generate_labeled_block, complete_labeled_statement,
18181         build_bc_statement, patch_bc_statement, patch_loop_statement,
18182         build_new_loop, build_loop_body, complete_loop_body): New function
18183         declarations.
18184         * parse.y (java_warning_count): New global variable.
18185         (label_id): New static variable.
18186         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18187         (block:): Return size_zero_node when block is empty.
18188         (empty_statement:): Return size_zero_node.
18189         (statement:): Implement supplemental action when for_statement: is
18190         reduced.
18191         (label_decl:): New rule.
18192         (labeled_statement:): Rewritten using label_decl. Actions
18193         implemented.
18194         (labeled_statement_nsi:): Likewise.
18195         (if_then_statement): Actions implemented.
18196         (while_expression): New rule.
18197         (while_statement:): Rewritten using while_expression. Actions
18198         implemented.
18199         (while_statement_nsi:): Likewise.
18200         (do_statement_begin:): New rule.
18201         (do_statement:): Rewritten using do_statement_begin. Actions
18202         implemented.
18203         (for_statement:): Rewritten using for_begin. Actions implemented.
18204         (for_statement_nsi:): Likewise.
18205         (for_header:, for_begin:): New rules.
18206         (for_init:): Actions implemented.
18207         (statement_expression_list:, break_statement:,
18208         continue_statement:): Likewise.
18209         (yyerror): Count number of issued warning(s).
18210         (java_report_errors): Report error(s) and/or warning(s).
18211         (java_complete_class): Use build_java_argument_signature to
18212         recompute completed method signature.
18213         (java_check_regular_methods): New locals method_wfl and aflags.
18214         Use method_wfl instead of lookup_cl during error reports. Fixed
18215         indentation and modified some error messages. Use
18216         lang_printable_name in method instead of the DECL_NAME. New code
18217         to issue warnings on methods not overriding corresponding methods
18218         private to a different package.
18219         (java_method_add_stmt): Call add_stmt_to_compound.
18220         (add_stmt_to_compound): New function.
18221         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18222         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18223         (build_if_else_statement, patch_if_else_statement,
18224         build_labeled_block, generate_labeled_block,
18225         complete_labeled_statement, build_new_loop, build_loop_body,
18226         complete_loop_body, patch_loop_statement, build_bc_statement,
18227         patch_bc_statement, patch_exit_expr): New functions.
18228         * typeck.c (build_java_signature): Build argument signature before
18229         enclosing it in between parenthesis.
18231 1998-08-17  Warren Levy  <warrenl@cygnus.com>
18233         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18234         (JAVA_OBJS): Added reminder comment
18236 1998-08-13  Nick Clifton  <nickc@cygnus.com>
18238         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18239         be interpreted as a long long.
18241 1998-08-13  Warren Levy  <warrenl@cygnus.com>
18243         * decl.c (init_decl_processing): Use _Jv_InitClass, not
18244         soft_initialise_class.  Use _Jv_NewMultiArray, not
18245         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
18246         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
18247         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
18248         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18250 1998-08-12  Per Bothner  <bothner@cygnus.com>
18252         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18253         length_identifier_node):  New global tree node constants.
18254         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
18255         Replace uses by super_identifier_node etc.
18256         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
18258         * parse.y (resolve_field_access):  Don't special-case ".length" if
18259         flag_emit_class_files.
18260         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
18261         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
18262         and ARRAY.length.
18264 1998-08-11  Per Bothner  <bothner@cygnus.com>
18266         * decl.c (init_decl_processing): Remove unused method_type_node fields.
18267         * class.c (make_method_value):  Remove init for removed fields.
18269         * class.c (layout_class):  Use build_java_argument_signature.
18270         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
18272         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
18273         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
18274         (build_java_signature):  Don't use push_java_argument_signature.
18276         * typeck.c (lookup_argument_method):  New function.
18277         * parse.y (java_check_regular_methods):  Use lookup_argument_method
18278         instead of lookup_java_method2 followed by lookup_java_method.
18280         * parse.y (check_method_redefinition):  Minor optimization.
18282         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
18283         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18285 1998-08-10  Tom Tromey  <tromey@cygnus.com>
18287         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18288         c-pragma.o.
18290         * gjavah.c (java_float_finite): Use K&R-style definition.
18291         (java_double_finite): Likewise.
18292         (generate_access): Now returns void.  Changed all callers.
18293         (last_access_generated): Removed.
18294         (process_file): Only make a single pass over the .class file.
18296 1998-07-29  Per Bothner  <bothner@cygnus.com>
18298         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
18299         for compatibility for G++ (with -fvtable-thunks).
18300         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
18302         * gjavah.c (process_file):  Use public inheritance for super-class.
18304 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18306         * lex.c (java_init_lex): Initialize ctxp->package.
18307         * parse.h (struct parser_ctxt): package and package_len replaced
18308         by tree package, an identifier node. Field method_decl_list is
18309         gone. Fixed comments.
18310         (lookup_field_wrapper, merge_qualified_name, not_accessible,
18311         class_in_current_package): New function prototypes.
18312         * parse.y (array_type:): Set class loaded flag on primitive type
18313         arrays.
18314         (package_declaration:): Assign ctxp->package to the
18315         identifier node.
18316         (method_invocation:): Handle invocation of method qualified by
18317         `super'.
18318         (single_type_import_declaration:): Removed ambiguity check.
18319         (java_pop_parser_context): New local variable `next'. Reset and
18320         set IMPORT_CLASSFILE_NAME flags on current and previous import
18321         list.
18322         (java_accstring_lookup): Use new local macro COPY_RETURN.
18323         (lookup_field_wrapper): New function.
18324         (parser_qualified_classname): Use merge_qualified_name.
18325         (parser_check_super_interface): Broaden error message.
18326         (do_resolve_class): Check for qualified class name in the current
18327         compilation unit if appropriate.
18328         (process_imports): Check for already defined classes.
18329         (check_pkg_class_access): Got rid of call to
18330         get_access_flags_from_decl.
18331         (java_complete_expand_methods): Call safe_layout_class based on
18332         the current class size.
18333         (make_qualified_primary): Build a WFL qualification on primary if
18334         none exists.
18335         (merge_qualified_name): New function.
18336         (make_qualified_name): Use merge_qualified_name.
18337         (resolve_expression_name): Use safe_lookup_field.
18338         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18339         (resolve_qualified_expression_name): Likewise. Check on resolved
18340         element accessibility.
18341         (not_accessible_p, class_in_current_package): New functions.
18342         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18343         (patch_method_invocation_stmt): Merged common pieces. Check
18344         accessibility of invoked method.
18345         (check_for_static_method_reference): Add returned type in error
18346         message.
18347         (invocation_mode): Get rid of bogus check on PRIVATE methods.
18348         (refine_accessible_methods_list): Merged two conditions in test.
18349         (java_complete_class): Sanity check on stabilize_ref gone.
18350         * zextract.c (read_zip_archive): Cast lseek second argument to long.
18352 1998-07-28  Per Bothner  <bothner@cygnus.com>
18354         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
18356 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18358         * gjavah.c (F_NAN): Removed.
18359         (F_NAN_MASK): New macro.
18360         (F_POSITIVE_INFINITY): Removed.
18361         (F_NEGATIVE_INFINITY): Likewise.
18362         (java_float_finite): Rewrote.
18363         (D_NAN_MASK): Renamed.
18364         (java_double_finite): Rewrote.
18365         (D_POSITIVE_INFINITY): Removed.
18366         (D_NEGATIVE_INFINITY): Likewise.
18368         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18369         If verbose, print underlying representation of value in hex.
18371 1998-07-24  Per Bothner  <bothner@cygnus.com>
18373         * buffer.h, buffer.c:  New files.
18374         * Makefile.in (JAVA_OBJS):  Add buffer.o.
18376         Support locals variables and writing their debug entries to .class.
18377         * jcf-write.c:  Simplify some by user new buffer type.
18378         (vode_buffer_grow):  Removed.
18379         (struct localvar_info):  New type.
18380         (localsvars, localvartable):  New buffers.
18381         (localvar_alloc, localvar_free):  New functions.
18382         (generate_bytecode_insns):  Handle local variables.
18383         (generate_classfile):  Write LocalVariableTable attribute.
18385 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18387         * jcf-io.c (open_in_zip): Check the zipfile magic number.
18388         * zipfile.h (ZIPMAGIC): New macro.
18390 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18392         * Makefile.in (gjavah.o): Updated dependencies.
18393         (jcf-dump.o): Likewise.
18394         (all.indirect): Use ../gjavah.
18395         (../gjavah$(exeext)): Likewise.
18396         (clean): Don't remove gjavah.
18397         (clean): Remove parse.c, not java/parse.c.
18398         * Make-lang.in (java): Added gjavah.
18399         (gjavah$(exeext)): New target.
18400         (GJAVAH_SOURCES): New macro.
18401         (java.all.build): Added gjavah.
18402         (java.all.cross): Likewise.
18403         (java.rest.encap): Likewise.
18404         * config-lang.in (compilers, stagestuff): Added gjavah.
18406 1998-07-23  Tom Tromey  <tromey@cygnus.com>
18408         * gjavah.c (java_float_finite): New function.
18409         (java_double_finite): Likewise.
18410         (F_POSITIVE_INFINITY): New macro.
18411         (F_NEGATIVE_INFINITY): Likewise.
18412         (F_NAN): Likewise.
18413         (D_POSITIVE_INFINITY): Likewise.
18414         (D_NEGATIVE_INFINITY): Likewise.
18415         (D_NAN): Likewise.
18416         (print_field_info): Use java_float_finite and java_double_finite.
18418 1998-07-23  Per Bothner  <bothner@cygnus.com>
18420         * parse.y (method_header):  Name "this" implicit argument.
18422 1998-07-22  Per Bothner  <bothner@cygnus.com>
18424         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
18425         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
18426         (put_linenumber):  New function.
18427         (generate_bytecode_insns, generate_classfile):  Write line numbers.
18429 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18431         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
18432         (lookup_name, build_known_method_ref, build_class_init,
18433         build_invokevirtual, invoke_build_dtable, match_java_method,
18434         build_field_ref, pushdecl_force_head, build_java_binop,
18435         binary_numeric_promotion, build_decl_no_layout,
18436         build_java_arrayaccess, build_newarray, build_anewarray,
18437         build_java_array_length_access, build_java_arraynull_check): New
18438         extern function prototypes.
18439         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18440         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
18441         java-tree.h.
18442         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
18443         to NULL
18444         * jcf.h (jcf_out_of_synch): New extern function prototype.
18445         * parse.h: Static/global function implemented in parse.y
18446         prototyped and declarations moved at the end of the file.
18447         (DECL_P): Check that the argument isn't null.
18448         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18449         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
18450         (QUAL_DECL_TYPE): New macro.
18451         (PARAMS): Macro definition removed.
18452         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
18453         (return_statement:): Call build_return.
18454         (field_access:): Call make_qualified_primary in sub rule.
18455         (method_invocation:): Build method invocation and call
18456         make_qualified_primary when processing primaries.
18457         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
18458         get_type_from_signature.
18459         (java_check_regular_method): Extra integer 0 argument when calling
18460         lookup_java_method2.
18461         (lookup_java_interface_method2): Extra method DECL argument when
18462         calling lookup_java_interface_method2.
18463         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
18464         COMPOUND_EXPR node.
18465         (java_complete_expand_method): Layout current class iff not
18466         already done. Don't process interface's methods.
18467         (java_complete_expand_method): Use super class only if it
18468         exists. Use current class otherwise.
18469         (make_qualified_primary): New function.
18470         (resolve_expression_name): Process qualified expression or
18471         expression from primary the same way.
18472         (resolve_expression_name): Two last arguments to
18473         resolve_field_access are now NULL_TREEs.
18474         (resolve_field_access): New variable is_static. Local field must
18475         be DECLs. is_static computed on field DECLs only. Append code in
18476         where_found to the field access if necessary. Use QUAL_DECL_TYPE
18477         to initialize field_type.
18478         (resolve_qualified_expression_name): New local variable,
18479         previous_call_static and is_static. Handle primaries with function
18480         calls, casts, array references and `this'. `super' now handled as
18481         `(super_class)this'. Use is_static to clarify boolean expressions.
18482         Added code to handle case where a proper handle is required to
18483         access a field. Use QUAL_DECL_TYPE where applicable.
18484         (maybe_access_field): New function.
18485         (patch_method_invocation_stmt): New arguments primary, where,
18486         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
18487         deleted. Use `where' as a type to search from if specified. Check
18488         for static method reference where forbidden. Append primary or
18489         current_this to the argument list if not calling constructor nor
18490         static methods.
18491         (check_for_static_method_reference): New function.
18492         (patch_invoke): Layout the class on which new is done if
18493         necessary.
18494         (lookup_method_invoke): Changed format to report errors on
18495         methods.
18496         (qualify_ambiguous_name): New local variable this_found. Now
18497         handle things from primaries. Method call are considered
18498         expression names.
18499         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
18500         changed into NULLs.
18501         (not_initialized_as_it_should_p): Comply with the new DECL_P.
18502         (java_complete_tree): New case fo RETURN_EXPR. Process function
18503         call arguments in separate function.
18504         (complete_function_arguments): New function.
18505         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
18506         anymore.
18507         (patch_assignment): Take the return function slot into account as
18508         a RHS. Distinguish assignment from a return.
18509         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
18510         when checking methods in interfaces.
18511         (resolve_type_during_patch): NULL argument to unresolve_type_p
18512         instead of NULL_TREE.
18513         (patch_newarray): Fixed typo in comment.
18514         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
18515         (build_return, patch_return): New functions.
18516         * typeck.c (lookup_java_constructor): Fixed typo in comment.
18518 1998-07-21  Per Bothner  <bothner@cygnus.com>
18520         * constants.c (find_name_and_type_constant, find_fieldref_index,
18521         find_methodref_index):  New methods.
18522         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
18523         just return given method.  Also, rename to build_known_method_ref.
18524         (expand_invoke):  Rename call to build_invoke_non_interface.
18525         * java-tree.h, parse.h:  Update prototype.
18526         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
18527         (such as expand_expr_stmt) if flag_emit_class_files.
18528         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
18529         STACK_TARGET, IGNORE_TARGET):  New macros.
18530         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
18531         (generate_bytecode_insn):  New function to generate method's bytecode.
18532         (generate_classfile):  Node generate Code attribute for a method.
18533         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
18534         push_long_const, field_op, adjust_typed_op, maybe_wide):
18535         New functions used by generate_bytecode_insn.
18537         * typeck.c (signature_include_return):  Remove variable.
18538         (push_java_argument_signature, build_java_argument_signature):  New.
18539         (build_java_signature):  Use push_java_argument_signature.
18540         * parse.y:  Use build_java_argument_signature instead of fiddling
18541         with signature_include_return.
18543 1998-07-17  Tom Tromey  <tromey@cygnus.com>
18545         * gjavah.c (print_c_decl): Always generate JArray<>* for array
18546         types.
18548         * Makefile.in (all.indirect): Added gjavah$(exeext).
18549         (gjavah$(exeext)): Added $(exeext).
18550         (clean): Likewise.
18552 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18554         * class.c (layout_class): Call to java_layout_parsed_class replace
18555         by safe_layout_class.
18556         * expr.c (build_java_array_length_access): Removed static storage
18557         class in the function definition.
18558         (build_java_arraynull_check): Likewise.
18559         Also fixed typos in two comments.
18560         * lex.c (java_init_lex): Initialize static global kw_length.
18561         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
18562         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
18563         java_lex_error.
18564         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
18565         * parse.h (resolve_no_layout): New static function declaration.
18566         (get_identifier_in_static): Declaration removed.
18567         (java_layout_parsed_class): Function name declaration changed to
18568         safe_layout_class.
18569         (build_newarray_node, patch_newarray, resolve_type_during_patch,
18570         not_initialized_as_it_should_p, build_this): New static function
18571         declarations.
18572         (pushdecl_force_head, build_java_binop, int_fits_type_p,
18573         binary_numeric_promotion, stabilize_reference,
18574         build_decl_no_layout, build_java_arrayaccess): Extern function
18575         declarations moved into their own section.
18576         (build_newarray, build_anewarray, build_java_array_length_access,
18577         build_java_arraynull_check): New extern function declarations.
18578         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
18579         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
18580         fake tree codes.
18581         (CALL_CONSTRUCTOR_P): New macro.
18582         * parse.y (kw_length): New static global tree node.
18583         (return_statement): Tagged <node>.
18584         (RETURN_TK): Tagged <operator>.
18585         (variable_declarator_id:): Build variable declaration with an
18586         empty initialization value if a syntax error was found in the
18587         initialization part of the variable declaration.
18588         (statement_without_trailing_substatement:): return_statement: now
18589         uses the default rule.
18590         (return_statement:): Temporarily fixed to return NULL_TREE.
18591         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
18592         (class_instance_creation_expression:): Class creation rules now
18593         call build_method_invocation upon reduction.
18594         (array_creation_expression:): Rules call build_newarray_node upon
18595         reduction.
18596         (dim_exprs:): Build a list of dimension expressions.
18597         (dim_expr:): Store location of the OSB_TK in the dimension
18598         expression node.
18599         (method_invocation:): Added a new error rule.
18600         (build_unresolved_array_type): WFL argument may also be an array
18601         on a primitive type. Name of the argument changed to reflect this.
18602         (method_declarator): Insert argument type at the beginning of the
18603         argument type list and later reverse the list.
18604         (unresolved_type_p): Argument 'returned' may be optionally
18605         NULL_TREE.
18606         (java_layout_class_from_source): Function renamed
18607         safe_layout_class.
18608         (resolve_and_layout): Now call resolve_no_layout and
18609         safe_layout_class.
18610         (resolve_no_layout): New function.
18611         (purify_type_name): New function.
18612         (complete_class_report_errors): Call purify_type_name during error
18613         report on a type not found.
18614         (process_imports): error_found local variable doesn't need to be
18615         initialized to zero.
18616         (declare_local_variables): New local type_wfl. Fixed typo in error
18617         message. type_wfl assigned to unresolved type and used to register
18618         incomplete type. Build a WFL around the variable initialization
18619         statement so that debug info can be generated on it.
18620         (source_start_java_method): Reverse argument list after they've
18621         been processed.
18622         (current_this): New static global variable.
18623         (java_complete_expand_methods): Set current_this when appropriate.
18624         (resolve_expression_name): Build correct static and non static
18625         field access bearing a simple name.
18626         (resolve_field_access): Resolve the length field of arrays. Handle
18627         f.m() cases.
18628         (patch_method_invocation_stmt): Set the type of the method
18629         invocation to error_mark_node. This value is later overridden by a
18630         valid type, if any. Don't handle qualified constructor invocation
18631         as qualified method invocation. Call lookup_method_invoke with its
18632         new flag. It's no longer necessary to access the selected method
18633         as the value of a tree list. Handle constructor invocation.
18634         (patch_invoke): Reverse argument list when invoking non interface
18635         methods. Insert call to new as the first argument of the
18636         constructor.
18637         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
18638         defined within a final class. Return INVOKE_STATIC if the invoked
18639         method is a constructor.
18640         (lookup_method_invoke): New lc argument is a flag to indicate a
18641         constructor lookup. Now handle constructor lookup. Choose the most
18642         specific method in case several were matching the invocation
18643         requirements. Return a method decl instead of a tree list featuring
18644         one single method decl element.
18645         (refine_accessible_methods_list): New lc flag argument to
18646         indicate that a constructor is being looked up.
18647         (not_initialized_as_it_should_p): New function.
18648         (java_complete_tree): Now process fake tree codes
18649         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
18650         save_expr on resolved function call arguments. Case on
18651         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
18652         (patch_assignment): LHS can be a field access expression. When
18653         dealing with reference, lhs_type is the promoted type of the
18654         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
18655         applicable.
18656         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18657         (patch_binop): Use not_initialized_as_it_should_p where
18658         applicable.
18659         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18660         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
18661         where applicable.
18662         (resolve_type_during_patch): New function.
18663         (patch_cast): Call resolve_type_during_patch to resolve type and
18664         report error accordingly.
18665         (patch_array_ref): Use not_initialized_as_it_should_p where
18666         applicable. Array base expression is saved before being
18667         used. Promote the type of an array elements if it contains non
18668         builtin types.
18669         (build_newarray_node, patch_newarray, build_this): New functions.
18671 1998-07-16  Tom Tromey  <tromey@cygnus.com>
18673         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
18674         increment it in `for' statement.
18675         (print_field_info): If number is inf or nan, don't print it.
18676         (print_method_info): If method name is `delete', just ignore it.
18677         (print_c_decl): Special-case jstringArray.
18679         * gjavah.c (help): New function.
18680         (no_argument): New function.
18681         (usage): Changed text.
18682         (main): Rewrote argument handling.  Now handles -v, --help,
18683         --version.
18684         (version): New function.
18685         (found_error): New global.
18686         (main): Return found_error.
18687         (generate_access): Set found_error.
18688         (print_c_decl): Likewise.
18690 1998-07-15  Tom Tromey  <tromey@cygnus.com>
18692         * gjavah.c (print_c_decl): Don't print "," when examining field.
18693         Skip type name when looking at "[L" types.
18694         (process_file): Now static.
18695         (generate_access): Now returns int.
18696         (last_access_generated): New global.
18697         (process_file): Clear last_access_generated; make multiple passes
18698         over the class.
18699         (print_field_info): Just return if generate_access returns true.
18700         (print_method_info): Likewise.  Also, allow <init> functions to
18701         pass through.
18702         (print_c_decl): Added is_init argument.  Print constructors
18703         properly.
18704         (print_cxx_classname): Use UTF8_GET to extract characters from
18705         string.
18706         (print_base_classname): New function.
18707         (print_class_decls): New function.
18708         (process_file): Use it.
18709         (utf8_cmp): New function.
18711 1998-07-13  Nick Clifton  <nickc@cygnus.com>
18713         * lang-options.h: Format changed to match changes in gcc/toplev.c
18714         to implement a --help option.
18716 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
18718         * decl.c (init_decl_processing): Revert change to dtable_type.
18720 1998-07-09  Per Bothner  <bothner@cygnus.com>
18722         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
18724 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
18726         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
18728         * lang.c (lang_init): Default flag_exceptions to 1, without
18729         checking to see if it's 2 first.
18731 1998-07-08  Jeffrey A Law  (law@cygnus.com)
18733         * constants.c: Include "system.h".
18734         * decl.c: Likewise.
18735         * lang.c (flag_new_exceptions): Get via extern now.
18736         (lang_init_options): New functions.  Turn on flag_new_exceptions.
18738 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18740         * lex.c (java_lex): Return 0 when we see an invalid character in
18741         the input.
18743         * lex.c (java_read_char): Specify extra argument when calling
18744         java_lex_error.
18745         (java_read_unicode, java_parse_end_comment,
18746         java_parse_escape_sequence): Likewise,
18747         (java_lex): Specify extra argument when calling
18748         java_lex_error. Test that IDs are beginning with a legal character
18749         for IDs. Handle invalid characters with an error message and a
18750         call to java_lex_error.
18751         (java_lex_error): Adjust column position by new argument
18752         `forward'. Issue an error even if in the middle of reporting an
18753         other error.
18755 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
18757         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
18758         we don't explicitly put a null pointer when we're copying it.
18760 1998-07-07  Tom Tromey  <tromey@cygnus.com>
18762         * gjavah.c (print_cxx_classname): New function.
18763         (super_class_name): Likewise.
18764         (print_super_fields): Removed.
18765         (in_super): Removed.
18766         (print_field_info): Never generate #defines.
18767         (print_c_decl): Changed generated types to match JNI.  No longer
18768         print class name before method name.
18769         (print_method_info): Print "static" before static methods.
18770         Print "virtual" before non-final methods.
18771         (usage): Use exit(1), not exit(-1).
18772         (main): Likewise.
18773         (print_field_info): Use %.17g to print a double.
18774         (last_access): New globals.
18775         (process_file): Initialize last_access.
18776         (usage): Now static.
18777         (ACC_VISIBILITY): New define.
18778         (generate_access): New function.
18779         (print_field_info): Call it.
18780         (print_method_info): Likewise.  Also, generate information for all
18781         methods, not just native methods.  Return void.
18782         (print_c_decl): Return void.
18783         (print_field_info): Return void.
18785 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18787         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
18788         processing the jc1 grammar file. Prefix bison functions and
18789         variables with java_.
18790         (parse.c): Dependencies on parse.h and lex.h
18791         * expr.c (build_java_arrayaccess): Function now global.
18792         * java-tree.h: Comment reorganized to carry on previous
18793         classification effort.
18794         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
18795         RESOLVE_TYPE_NAME_P): New flags on WFLs.
18796         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
18797         java_parse (new prefix java_ generated by bison).
18798         (java_layout_parsed_class, java_register_parsed_class): Function
18799         call removed.
18800         (yyparse): Removed unnecessary call to init_outgoing_cpool.
18801         * lex.c (static tree wfl_op): Variable deleted.
18802         (java_init_lex): Initialize kw_super and kw_this. Initialize more
18803         ctxp fields to NULL_TREE.
18804         (java_lex): No longer create WFL for operators. Filename caching
18805         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
18806         created as STRING_CST and later expanded. Removed extra argument
18807         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
18808         and SUPER.
18809         (build_wfl_node): Removed code in comments.
18810         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
18811         store token and location data in the current bison token.
18812         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
18813         static/extern function declaration at the beginning of the file.
18814         (struct qualification): Data structure definition deleted.
18815         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
18816         (qualify_ambiguous_name): Function declaration modified. Function
18817         now returns nothing.
18818         (build_array_ref, patch_array_ref, make_qualified_name,
18819         resolve_qualified_expression_name, maybe_generate_clinit,
18820         resolve_field_access): New static function declarations.
18821         (build_java_arrayaccess): New extern function declaration.
18822         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
18823         (CALL_EXPR_PRIMARY): Macro deleted.
18824         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
18825         (struct parser_ctxt): Field initialized_final
18826         removed. non_static_initialized, static_initialized: New fields.
18827         * parse.y (static tree kw_super, static tree kw_this): New global
18828         static.
18829         (%union): tree wfl field of operator member replaced by int
18830         location. WFLs are non longer created for operators.
18831         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
18832         (qualified_name:): Now calls make_qualified_name to build the
18833         identifier.
18834         (type_declaration:): Consider generating <clinit> when class
18835         parsing completed.
18836         (variable_declarator:): Directly build an assignment node when the
18837         variable is initialized when declared.
18838         (this_or_super:): Build a WFL and set current location when THIS
18839         or SUPER are parsed.
18840         (expression_statement:): Wrap statement around a WFL.
18841         (primary_no_new_array:): Fixed typo. Changed value returned by
18842         THIS_TK because of its new type (temporary).
18843         (dim_exprs:): Temporary fix because of OSB_TK's new type.
18844         (field_access:): Build qualified name with SUPER.
18845         (method_invocation:): Fixed returned value because of SUPER's new
18846         type.
18847         (array_access:): Use OSB_TK location information.
18848         (post_increment_expression:, post_decrement_expression:,
18849         unary_expression:, pre_increment_expression:,
18850         pre_decrement_expression:, unary_expression_not_plus_minus:,
18851         cast_expression:, multiplicative_expression:,
18852         additive_expression:, shift_expression:, relational_expression:,
18853         equality_expression:, and_expression:, exclusive_or_expression:,
18854         inclusive_or_expression:, conditional_and_expression:,
18855         conditional_or_expression:, assignment:): Use new location/token
18856         information available on operators.
18857         (create_class): Set super_decl_type to NULL_TREE when processing
18858         java.lang.Object.
18859         (register_fields): Field initialization is now a MODIFY_EXPR
18860         node. Chain initialization code to the matching lists (according
18861         to the field declaration modifiers).
18862         (maybe_generate_clinit): New function.
18863         (method_header): Don't set method's DECL_NAME to a WFL when adding
18864         methods to java.lang.Object.
18865         (resolve_and_layout): Now can return NULL_TREE if the type
18866         resolution fails. Otherwise, return the class DECL instead of its
18867         TYPE.
18868         (check_method_redefinition): Don't patch method DECL_NAME if it
18869         belongs to java.lang.Object.
18870         (process_imports): Simply assign error_found to the value returned
18871         by check_pkg_class_access.
18872         (declare_local_variables): Don't use their init statements (if
18873         any) when parsing error were previously found. Reuse MODIFY_EXPR
18874         build during parsing as an init statement.
18875         (java_method_add_stmt): Now return the current method body.
18876         (java_layout_parsed_class, java_register_parsed_class): Functions
18877         removed.
18878         (java_complete_expand_methods): Initialize the constant pool on a
18879         per class basis. Layout the classes before expanding their method
18880         bodies. Don't try expand artificial constructor code if error were
18881         found. Make the classes data and register them if no error were
18882         found.
18883         (java_complete_expand_method): Retrieve an artificial constructor
18884         argument list before entering its body. Assign the top block to
18885         the artificial constructor function body and set types of declared
18886         blocks and compound statements to void. Walk method body if not an
18887         artificial constructor.
18888         (make_qualified_name, cut_identifier_in_qualified): New functions.
18889         (resolve_expression_name): Fixed comments. Save/restore the
18890         current class CLASS_LOADED_P flag value. Build non qualified
18891         static field access and handle qualified expression names.
18892         (resolve_field_access, resolve_qualified_expression_name): New
18893         functions.
18894         (patch_method_invocation_stmt): Use the new expression resolution
18895         scheme, calling resolve_field_access when the function call is
18896         resolved as an expression.
18897         (qualify_ambiguous_name): Function rewritten to work on qualified
18898         expression produced by make_qualified_name.
18899         (java_complete_tree): Promote type when function's argument are
18900         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
18901         the assignment to discover further errors if RHS is a expression
18902         name that fails to evaluate. Declare LHS initialized even though
18903         the assignment failed. Don't use the location variable and removed
18904         extra argument in patch function calls. Now handle the ARRAY_REF
18905         case and build internal string representation when STRING_CSTs are
18906         walked.
18907         (build_method_invocation): Don't wrap function call around a WFL.
18908         (build_assignment): Likewise. Use the operator location
18909         information.
18910         (patch_assignment): Handle array access LHSs. Handle error
18911         provenance, resulting in a better error report.
18912         (build_binop): Use op_location from operator as binop location
18913         information.
18914         (build_unaryop, build_incdec, build_cast): Likewise.
18915         (patch_binop): Extract location information from the node. Fixed
18916         typo in error message.
18917         (patch_unary_op): Extract location information from the node.
18918         (build_array_ref, patch_array_ref): New functions.
18920 1998-07-01  Tom Tromey  <tromey@cygnus.com>
18922         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
18923         match _Jv_IsInstanceOf.
18924         * decl.c (init_decl_processing): Use _Jv_NewArray, not
18925         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
18927 1998-06-30  Tom Tromey  <tromey@cygnus.com>
18929         * decl.c (init_decl_processing): Functions are now named
18930         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
18932 1998-06-29  Per Bothner  <bothner@cygnus.com>
18934         * java-tree.h (load_class):  Add prototype.
18935         * class.c (is_compiled_class):  Add missing arg to load_class.
18936         * expr.c (expand_java_NEW):  Call load_class.
18937         * parse.y (process_import):  Removed bogus use of void return value.
18939 1998-06-25  Per Bothner  <bothner@cygnus.com>
18941         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
18942         Function name is "_Jv_Throw" instead of "soft_athrow".
18943         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
18944         Function name is "_Jv_AllocObject" instead of "soft_new".
18945         Takes an extra parameter (object size).
18946         * expr.c:  Update calls.
18948 1998-06-24  Per Bothner  <bothner@cygnus.com>
18950         * lex.c (java_get_line_col):  Handle end-of-file.
18951         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
18953 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
18955         * lang.c (lang_init): Make -fexceptions the default.
18956         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
18957         exception handling is not turned on.
18959 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
18961         * lang.c (flag_new_exceptions): Make this this default.
18962         * decl.c (end_java_method): Call emit_handlers.
18963         * except.c (method_init_exceptions): Set language code and version.
18964         (expand_start_java_handler): Enable exception, and call
18965         expand_eh_region_start.
18966         (expand_end_java_handler): Enable exception, and set up catch blocks.
18967         (emit_handlers): New routine to generate the saved handlers.
18968         * java-except.h (emit_handlers): Add prototype.
18970 1998-06-12  Per Bothner  <bothner@cygnus.com>
18972         We used to have three different representations of the constant pool:
18973         the CPool structure, the tree_constant_pool, and the constructures
18974         used to build the Class object (which may need class and string
18975         constants) in compiled code.  None were appropriate for compiling
18976         to .class files, so I did a major overhaul.
18978         First, the tree_constant_pool array was removed.  Things were
18979         modified to the CPool structure in the JCF could be used.
18980         Second, a "capacity" field was added to the CPool, and functions
18981         written to search for a matching constant, adding one if not found.
18982         The code that generated the Class object was changed to use a CPool.
18983         The actual TREE_LISTs used to build the CONSTRUCTORs used for
18984         the static Class object are now only in build_constants_constructor.
18985         Finally, I wrote code which can generate a .class file (including its
18986         constant pool) from the RECORD_TYPE of a class.  This is a big step
18987         on the way to compiling Java source into .class files.
18989         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
18990         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
18992         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
18993         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
18994         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
18995         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
18996         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
18997         (lang_type):  Removed constant_pool field.
18998         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
18999         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19000         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
19001         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19003         * constants.c (current_constant_pool_tags, current_constant_pool_data,
19004         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19005         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
19006         (set_constant_entry, find_constant1, find_constant2,
19007         find_class_constant, count_constant_pool_bytes, write_constant_pool,
19008         find_utf8_constant, find_class_or_string_constant):  New functions.
19010         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
19011         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
19012         (give_name_to_class, get_class_constant):  Likewise.
19013         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
19014         (get_name_and_type_constant, get_ref_constant):  Removed.
19015         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
19016         * parse.y:  Don't save/restore tree_constant_pool.
19017         * verify.c (verify_jvm_instructions):  Update for new approach.
19018         * expr.c (expand_invoke, expand_java_field_op): Likewise.
19020         * lang-options.h:  Added -femit-class-file, -femit-class-files.
19021         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
19022         (lang_f_options):  Added "emit-class-file(s)".
19024         * expr.c (build_java_arrayaccess):  Generate more efficient array
19025         bounds checking, by using unsigned compare.
19027         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
19029 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19031         * parse.h: New comment on the handling of unresolved type
19032         identifiers. JDEPs are now part of the jdep_code enum.
19033         (typedef struct jdep): Now use enum jdep_code or int, depending on
19034         availability. Both are narrowed down to an 8 bits bitfield.
19035         (CALL_EXPR_PRIMARY): Fixed comment.
19037 1998-06-10  Tom Tromey  <tromey@cygnus.com>
19039         * Make-lang.in (java): Added gjavac and jvgenmain.
19040         (java.start.encap): Depend on gjavac.
19041         (java.rest.encap): Depend on jvgenmain.
19043         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19044         (JAVA_CROSS_NAME): Likewise.
19045         (java.all.build): Depend on jvgenmain and gjavac.
19046         (java.all.cross): Depend on jvgenmain and gjavac-cross.
19047         (jvgenmain$(exeext)): New target.
19048         (java.install-common): Wrote.
19049         * config-lang.in (compilers, stagestuff): Added gjavac and
19050         jvgenmain.
19052 1998-06-10  Dave Brolley  <brolley@cygnus.com>
19054         * lang.c (lang_decode_option): New argc/argv interface.
19056 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19058         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19059         * decl.c (build_decl_no_layout): New function.
19060         * expr.c (java_lang_expand_expr): Layout declarations found in
19061         blocks before they're pushed.
19062         * jcf-parse.c (load_class): Save current line when parsing class
19063         file.
19064         (parse_source_file): Register class before expanding their
19065         methods.
19066         * lang.c (put_decl_node): Produce `null' when `void *' is
19067         processed.
19068         * lex.c (static tree wfl_op): New static global, for error report
19069         on casts.
19070         (java_init_lex): wfl_operator and wfl_op initialized
19071         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19072         parsed.
19073         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19074         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19075         build_unresolved_array_type): New static function definitions.
19076         (build_decl_no_layout): New extern function declared.
19077         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19078         faulty modifier exists.
19079         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19080         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19081         (UNARY_PLUS_EXPR): New fake operator.
19082         (struct parser_ctxt): New field osb_number.
19083         * parse.y (static tree wfl_operator): New static WFL for operator
19084         bound error messages.
19085         (DECR_TK, INCR_TK): Moved.
19086         (OP_TK): Tagged <operator>.
19087         (array_type:): Now call build_unresolved_array_type.
19088         (dim_expr:): Count the number of '[' seen.
19089         (post_increment_expression, post_decrement_expression,
19090         pre_increment_expression, pre_decrement_expression,
19091         unary_expression_not_plus_minus, unary_expression:): Actions are
19092         now building the corresponding unary expressions.
19093         (cast_expression:): Actions are now building cast expressions.
19094         (build_unresolved_array_type): New function.
19095         (create_interface): Reset the number of declared interfaces.
19096         (create_class): Likewise.
19097         (method_header): Methods declared within the scope of an interface
19098         are now implicitly set public and abstract.
19099         (java_complete_class): Variable's and parameter's type are patched
19100         with a promoted type.
19101         (declare_local_variables): Resolved non builtin types are promoted
19102         before being used to build a variable decl. Removed type patch
19103         posted on variable initialization statement.
19104         (source_start_java_method): Use build_decl_no_layout to build the
19105         decl of a parameter of incomplete type.
19106         (java_register_parsed_class): Process interfaces too. Call
19107         rest_of_decl_compilation on each processed class declarations.
19108         (java_complete_expand_methods): Don't attempt to expand things in
19109         interfaces.
19110         (java_complete_tree): Process CONVERT_EXPR, even though it always
19111         has a type. Propagate error_mark_node to node's type too. Promote
19112         method's call argument type and return error_mark_node if
19113         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19114         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19115         handle unary operator nodes.
19116         (build_assignment): Added comment.
19117         (print_int_node): New function.
19118         (patch_assignment): New second argument. New error handling. Use
19119         print_int_node. Handle references. Use can_cast_to_p to issue
19120         different error message according to the context and check upon
19121         the initialization of the RHS.
19122         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19123         (operator_string): Handle more operators.
19124         (patch_binop): No longer use a function static
19125         wfl_operator. Improved error message on shift distance.
19126         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19127         patch_cast): New functions.
19129 1998-06-05  Per Bothner  <bothner@cygnus.com>
19131         * jvspec.c:  New file.
19132         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19134         * java-tree.h (identifier_subst):  Add declaration.
19136 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19138         * jvgenmain.c (main): Generate call to JvRunMain.
19140         * class.c (make_class_data): Push value for "sync_info" field.
19141         * decl.c (init_decl_processing): Push "sync_info" field.
19143 1998-06-03  Per Bothner  <bothner@cygnus.com>
19145         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19146         Java (source) name, not signature.
19147         Set TYPE_ALIGN to (at least) that of element_type.
19149 1998-06-02  Per Bothner  <bothner@cygnus.com>
19151         * class.c:  Moved classname-mangling-rekated code to ...
19152         * mangle.c:  ... this new file.
19153         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19154         * Makefile.in:  Update for above changes.
19156 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19158         * expr.c (truthvalue_conversion): Convert integer and floating
19159         point value to their truth value.
19160         * lex.c (java_lex): Handle the `null' literal.
19161         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19162         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19163         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19164         New macros.
19166         * parse.y: Reorganization/documentation on token declaration.
19167         (binop_lookup[]): New added new tree codes.
19168         (relational_expression): Build corresponding binary operators.
19169         (equality_expression, conditional_and_expression,
19170         conditional_or_expression): Likewise.
19171         (java_complete_class): Fix crash in debug message.
19172         (java_complete_tree): Check initialization of method call
19173         arguments. Further bogus node evaluation to detect more error
19174         during assignments. Handles more binary operators.
19175         (patch_assignment): Use DECL_P.
19176         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19177         code.
19178         (operator_string): Handle more case. Compacted source.
19179         (patch_binop): Changed function comment. Checking for
19180         uninitialized first operand takes the compound assignment into
19181         account and uses DECL_P. Checking for uninitialized second operand
19182         delayed to routine's end. Use macros to issue type bound error
19183         messages and issue messages on both operands if their types are
19184         different. Force fixed type into node. Handle all binary
19185         operators.
19187 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19189         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19190         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19191         build operator node and return tokens.
19192         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19193         * parse.h (java_complete_tree): Changed returned type in prototype.
19194         (build_method_invocation, build_assignment, patch_assignment,
19195         patch_binop): New static function declarations.
19196         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19197         BUILD_EXPR_WFL): New macros.
19198         * parse.y (enum tree_code binop_lookup[]): New static for token to
19199         TREE_CODE lookup.
19200         (%union): Parser union has new sub-structure `operator'.
19201         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19202         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19203         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19204         ASSIGN_ANY_TK): Tokens tagged `operator'.
19205         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19206         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19207         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19208         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19209         (assignment_operator:): Rule tagged `operator'.
19210         (expression_statement:): Re-installed default rule.
19211         (method_invocation:): Sub rules call build_method_invocation.
19212         (postfix_expression:): Don't attempt to resolve name here. Just
19213         return an ID.
19214         (multiplicative_expression:): Sub-rules build corresponding binop
19215         expression node.
19216         (additive_expression:, shift_expression:, and_expression:,
19217         exclusive_or_expression:, inclusive_or_expression:): Likewise.
19218         (assignment:): Sub rule invoke build_assignment.
19219         (assignment_operator:): Default rules on sub rules.
19220         (force_error): Added documentation on this variable.
19221         (declare_local_variables): Build initialization calling
19222         build_assignment.
19223         (expand_start_java_method): Removed unused rtx declaration. Mark
19224         arguments as already initialized.
19225         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19226         (java_complete_expand_methods): Don't process next method if
19227         completion of the previous one triggered errors.
19228         (java_complete_expand_method): Call source_end_java_method if no
19229         error were found during completion.
19230         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19231         locals declaratilon. Handle names found within a class. Return
19232         error_mark_node when things aren't found.
19233         (patch_method_invocation_stmt): Return error_mark_node on failures.
19234         (patch_invoke): Removed unused local. Return the correct node.
19235         (java_complete_tree): Now returns a value. The BLOCK section binds
19236         local identifiers and the type of a BLOCK is now void. Assign the
19237         result of operand completion on COMPOUND_EXPR. Assign the
19238         encapsulated node of a WFL to the result of its completion, except
19239         when the node is an identifier. Now handle MODIFY_EXPR and several
19240         binary operators. Return error_mark_node on errors.
19241         (build_method_invocation, build_assignment, patch_assignment,
19242         build_binop, operator_string, patch_binop): New functions.
19243         * typeck.c (binary_numeric_promotion): New function.
19245 1998-05-21  Per Bothner  <bothner@cygnus.com>
19247         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
19248         Replace most uses of ident_subst by identifier_subst.
19250         * class.c (push_class_static_dummy_field):  Removed function.
19251         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
19252         instead of looking got "class" static field.  Create that decl here.
19253         (class_identifier_node):  Removed;  no longer needed.
19254         (init_class_processing):  Don't init class_identifier_node.
19255         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
19256         Do nreverse 0 times (instead of twice) for Object and Class.
19257         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19259 1998-05-20  Per Bothner  <bothner@cygnus.com>
19261         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
19262         while initializing linenumber_count and linenumber_table.
19263         Do it before init_function_start (which calls emit_line_note).
19264         * expr.c (expand_byte_code):  Don't need to clear lineno here.
19266 1998-05-18  Tom Tromey  <tromey@cygnus.com>
19268         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19269         then mangle number as _N_.
19271         * class.c (mangle_class_field): New function.
19272         (build_class_ref): Set assembler name of class reference using
19273         mangle_class_field.
19274         (push_class_static_dummy_field): Likewise.
19276 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
19278         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19279         of assigning to TREE_CODE.  The latter method exploits a feature
19280         of GCC that is not ANSI compliant.
19282 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19284         * decl.c (pushdecl_force_head): New function.
19285         (pushlevel): Removed conditional printf.
19286         (complete_start_java_method): Don't enter local variable scope if
19287         function is compiled from source code.
19288         * expr.c: parse.h now included
19289         (java_lang_expand_expr): New function.
19290         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19291         printf. Terminate buffer when doing directories.
19292         * jcf-parse.c (parse_source_file): Call lang_init_source before
19293         parsing and before code generation.
19294         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19295         use printf if the macro is defined.
19296         * lang.c (lang_init): Install lang_expand_expr hook on
19297         java_lang_expand_expr.
19298         (java_dummy_print): New function.
19299         (lang_init_source): New function.
19300         * lex.c (java_lex): Remember location of an opening brace at the
19301         second nesting level.
19302         (java_is_eol): Unget character seen after a CR if it is EOF.
19303         * parse.h: Now includes lex.h
19304         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19305         printf if the macro is defined.
19306         (expand_start_java_method, build_expr_block, enter_block,
19307         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19308         New static function declarations.
19309         (pushdecl_force_head): New extern function declaration.
19310         (INCOMPLETE_TYPE_P): New macro.
19311         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19312         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19313         BLOCK_EXPR_ORIGIN): New macros.
19314         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19315         DECL_SOURCE_LINE_LAST): New macros.
19316         (struct parser_ctxt): Removed field current_method_decl, redundant
19317         with the field current_function_decl. Added fields
19318         first_ccb_indent1 and pending_block.
19319         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19320         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19321         tagged <node>
19322         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19323         (compilation_unit:): Cosmetic on sub rule.
19324         (type_declaration:): Cosmetic on sub rules. Added an error rule.
19325         (variable_initializer:): Installed default rule on expression:.
19326         (method_declaration:): method_header: starts a new
19327         method. method_body: installs the function body, absorbs blocks
19328         emitted for temporary variable scopings, pops function's body block
19329         and merges function's last statement lineno in DECL_SOURCE_LINE.
19330         (method_body:): Installed default rules.
19331         (block:): Call enter_block when an opening brace is seen.  Absorb
19332         scoping blocks and call exit_block when a closing brace is seen.
19333         (block_statement:): Cosmetic changes.
19334         (method_invocation:): Create WFL around CALL_EXPR node.
19335         (patch_stage): Added comment around definition.
19336         (method_header): Try to use first_ccb_indent1 as the first line of
19337         the method, so BP debug info are emitted at the first opening
19338         brace of the function. If the function has no body, use the
19339         location of the function's name. Override currently defined method
19340         name with the matching WFL so we can point redefinition errors
19341         using the location where the function's name was declared.
19342         (check_abstract_method_header): Interprets DECL_NAME as an
19343         identifier or as a WFL, accordingly.
19344         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19345         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19346         location and name information out of it and reinstall DECL_NAME to
19347         its original identifier node value.
19348         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19349         function's source code).
19350         (read_import_dir): Test the value returned by find_class and issue
19351         a fatal accordingly.
19352         (declare_local_variables): Push a new block for the scope of the
19353         new variable(s) if code has been already generated at that nesting
19354         level. Pinpoint redefinition errors using the variable id
19355         WFLs. Generate initialization code if necessary. If the variable
19356         type is incomplete, register a patch on its decl.
19357         (source_start_java_method): Rewritten. Define a new block for the
19358         function's parameters. Build parameter decl out of function's
19359         arguments and register them for a patch if their types are
19360         incomplete.
19361         (expand_start_java_method): Includes the part of
19362         source_start_java_method that was pushing the parameter decls and
19363         completing the method start code.
19364         (source_end_java_method): Removed call the expand_end_bindings and
19365         poplevel (already taken care of). Reinstall function's arguments
19366         and get function's last line of code before calling
19367         expand_function_end.
19368         (java_method_add_stmt): New comment before the function's
19369         code. Complement the second operand of the current COMPOUND_EXPR
19370         if necessary.
19371         (java_complete_expand_methods): Don't generate debug info on line
19372         zero when expanding a generated constructor.
19373         (java_complete_expand_method): Set start and end line numbers for
19374         a artificially generated constructor to one and manually call
19375         enter_block and exit_block when defining it. For all methods:
19376         expand function's start calling the new expand_start_java_method
19377         and invoke java_complete_tree on the effective method's body, if
19378         any.
19379         (resolve_expression_name): Now use lookup_name_in_blocks to search
19380         local variable decls and print out an error when variables are
19381         undefined.
19382         (patch_method_invocation_stmt): Inserted comment before the
19383         function's code.
19384         (lookup_method_invoke): Chain method's arguments using chainon
19385         with the current arg list as a second argument. Inserted missing
19386         IDENTIFIER_POINTER when reporting an error on methods not found.
19387         (refine_accessible_methods_list): Don't retain constructors.
19388         (patch_arguments): Function removed.
19389         (java_complete_tree): Inserted comment before the function's
19390         code. New case for BLOCKs. Moved the WFL case a bit
19391         further. Complete function's arguments.
19392         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19393         maybe_absorb_scoping_blocks): New functions.
19395 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19397         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19398         previously set.
19399         * jcf-parse.c (parse_source_file, java_error_count): New forward
19400         and extern declarations.
19401         (java_parse_abort_on_error): Macro moved.
19402         (jcf_parse_source): fatal called if fopen fails. Now calls
19403         parse_source_file.
19404         (parse_source_file): New parse_only parameter. Reflects the
19405         elimination of the second pass.
19406         (yyparse): parse_source_file called with argument set to 0.
19407         * jcf.h (JCF_ZERO): Sets java_source to zero.
19408         * lex.c (java_init_lex): pass argument is gone. Function modified
19409         to be called once during the analysis of a file.
19410         (java_unget_unicode): Fixed typo in fatal message.
19411         (java_get_line_col): Likewise.
19412         (java_lval): Likewise. String literals no longer built during
19413         second pass.
19414         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
19415         account.
19416         * parse.h (MODIFIER_WFL): New macro.
19417         (parse_check_super, parser_check_super_interface): Now return int.
19418         (parser_chain_incomplete_item, not_builtin_p,
19419         complete_method_decl): Declarations removed.
19420         (build_method_invocation_stmt, build_invoke): Renamed using the
19421         `patch' instead of `build'
19422         (register-incomplete_type, obtain_incomplete_type,
19423         java_complete_tree, java_complete_expand_method,
19424         unresolved_type_p, create_jdep_list): New function declarations.
19425         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
19426         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
19427         (jdep): New typedef on new struct _jdep.
19428         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
19429         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
19430         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
19431         JDEP_RESOLVED_P): New macros.
19432         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
19433         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
19434         JDEP_VARIABLE): New enum values and jdep kinds.
19435         (jdeplist): New typedef on struct _jdeplist.
19436         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
19437         macros.
19438         (CALL_EXPR_PRIMARY): New macro.
19439         (struct parser_ctxt): Fields java_pass, current_method_decl,
19440         method_decl_list deleted. New field jdeplist.
19441         (INCOMPLETE_P): Macro deleted.
19442         * parse.y (single_type_import_declaration:): Removed pass switch.
19443         (type_import_on_demand_declaration): Likewise.
19444         (field_declaration:): Removed pass switch on all sub rules.
19445         (class_declaration:): Call the complete_class_decl removed on
19446         class_body rules.
19447         (method_declaration:): Removed second pass switch. No longer chain
19448         methods decl when method_header reduced.
19449         (method_header:): Sub rules no longer depend on pass switch.
19450         (method_declarator:): Likewise.
19451         (method_body:): Likewise.
19452         (abstract_method_declaration:): Likewise.
19453         (block_statement:): Likewise.
19454         (local_variable_declaration:): Likewise.
19455         (argument_list:): Likewise.
19456         (method_invocation:): Likewise. Call to build_method_invocation_stmt
19457         removed. Partial CLASS_EXPR tree node built instead.
19458         (postfix_expression:): Removed pass switch on all sub rules.
19459         (java_pop_parser_context): Free classd_list content.
19460         (yyerror): Call obstrack_grow0 to finalize error message.
19461         (check_class_interface_creation): Comment modified to reflect new
19462         returned value meaning. Removed second pass switch. Return 1 if an
19463         error was found, 0 otherwise. Adjust pointer on filename if a
19464         leading path separator was found.
19465         (maybe_create_class_interface_decl): Removed first pass switch
19466         when linking the class decl to the class_list. Install a new
19467         jdep_list for the class.
19468         (add_superinterfaces): List of unresolved interfaces is
19469         gone. Unresolved interfaces are directly added to the current
19470         dependencies list.
19471         (create_interface): Second pass shortcut removed.
19472         ctpx->modifier_ctx access through MODIFIER_WFL.
19473         (create_class): Second pass shortcut removed. Call to
19474         register_incomplete_type replaces the call to
19475         parser_chain_incomplete_item.
19476         (complete_class_decl): Function removed.
19477         (duplicate_declaration_error): New way of retrieving redeclared
19478         item type.
19479         (register_fields): Call to lookup_modifier_cl replaced by
19480         MODIFIER_WFL. New way of handling unresolved type, using
19481         unresolved_type_p and obtain_incomplete_type.
19482         register_incomplete_type replaces call to parser_chain_incomplete_item.
19483         (patch_stage): New static global variable.
19484         (method_header): New way of handling unresolved type, using
19485         unresolved_type_p and obtain_incomplete_type. patch_stage used to
19486         indicates that the method decl needs to be patched.
19487         (check_abstract_method_header): Call to lookup_modifier_cl
19488         replaced by MODIFIER_WFL.
19489         (method_declarator): Incomplete argument type are registered
19490         calling register_incomplete_type. Patch on the declared method is
19491         issued in that case.
19492         (unresolved_type_p): New function.
19493         (parser_check_super_interface): New comment to reflect function's
19494         modified returned type (int). Function and has a new argument
19495         this_wfl. Call to parse_error_context uses this_wfl instead of
19496         relying on lookup_cl.
19497         (parser_check_super): Comment reflects function's new returned
19498         type (int). Function returns nonzero value on error.
19499         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
19500         register_incomplete_type, jdep_resolve_class): New functions to
19501         handle incomplete types in declarations.
19502         (java_complete_class): Rewritten to work with the new incomplete
19503         type handling scheme.
19504         (complete_class_report_errors): Likewise.
19505         (complete_method_decl): Removed: it jobs is now handled by
19506         java_complete_class.
19507         (do_resolve_class): Class loaded in not already loaded and not
19508         found in Java source code.
19509         (java_check_regular_methods, java_check_abstract_methods): Don't
19510         call complete_method_decl anymore.
19511         (lookup_modifier_cl, not_builtin_p): Functions deleted.
19512         (read_import_dir): Got rid of the pass number dependency.
19513         (declare_local_variables): New handling of unresolved types (patch
19514         issued).
19515         (source_start_java_method): New parameter level. Function called
19516         with level set to 1 when argument types are potentially
19517         unresolved.  Called to complete the job with level set to 2 once
19518         types are complete.
19519         (source_end_java_method): Call to permanent_allocation
19520         removed. Waiting to be replaced by a more suitable obstack
19521         management.
19522         (java_complete_expand_methods, java_complete_expand_method,
19523         java_expand_finals): New functions.
19524         (build_method_invocation_stmt): Renamed
19525         patch_method_invocation_stmt. Extracts function call expression
19526         (wfl) and arguments (args) from CALL_EXPR tree operands.
19527         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
19528         call. Patch the function and argument operand of the CALL_EXPR
19529         tree argument.
19530         (patch_argument, java_complete_tree): New functions.
19532 1998-04-20  Per Bothner  <bothner@cygnus.com>
19534         Recover from missing fields and methods (i.e. error instead of fatal).
19535         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
19536         * expr.c (expand_invoke):  Recover from missing method.
19537         (expand_java_field_op):  Recover from missing field.
19538         Inline references to java.lang.{Integer,Char,...}.TYPE.
19539         * typeck.c (get_type_from_signature), java-tree.h:  New function.
19540         * class.c (add_method):  Use get_type_from_signature.
19541         (build_class_ref):  Handle a class that was not found.
19542         * typeck.c (convert):  Handle conversion to pointers (for convenience).
19543         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
19544         instead of lookup_field to handle missing fields.
19546         * jcf-parse.c (process_zip_dir):  Set java_source.
19548 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
19550         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
19552 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19554         * jcf-parse.c (load_class): Don't change input_filename before
19555         calling jcf_parse_source (but still do it before calling
19556         jcf_parse).
19557         (jcf_parse_source): Assign input_filename after having saved the
19558         parser context.
19559         * lex.c (java_init_lex): Chain a WFL node to the import on demand
19560         list. ctxp->modifier_ctx zeroed according to its new
19561         definition. ctxp->filename initialized. Removed
19562         JAVA_MODIFIER_CTX_UNMARK.
19563         (java_unget_unicode): Update the character based column position.
19564         (java_allocate_new_line): ref_count not used anymore. Always free
19565         ctxp->p_line. Initialize c_line->char_col to 0.
19566         (java_get_unicode): Update the character based column position.
19567         (java_lex): Use ctxp->elc to store current position in source
19568         file, at the beginning of the parsed token. Set modifier_ctx entry
19569         corresponding to the parse modifier to a WFL node. Return a WFL
19570         node when an identifier is parsed.
19571         (java_lex_error): Now uses ctxp->elc to store current position in
19572         source.
19573         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
19574         * lex.h (build_wfl_node): New function definitions.
19575         (struct java_line): ref_count and next fields are gone. New field
19576         char_col.
19577         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19578         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
19579         (JAVA_COLUMN_DELTA): New macro.
19580         (java_lc): New typedef on new struct _java_lc.
19581         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
19582         (parse_error_context, parse_warning_context): Changed prototypes.
19583         (java_get_line_col): Added as an available global function.
19584         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
19585         (IC_DECL): Replaced by macro IC_TYPE
19586         (DEPEND_WFL): New macro.
19587         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
19588         wrong modifier.
19589         (exit_java_complete_class): Removed a commented out statement.
19590         (struct parser_ctxt): Added comments on fields. modifier_ctx is
19591         now an array of tree nodes. Deleted fields line_list and
19592         e_line. New field elc, to replace e_line.
19593         * parse.y (array_type:): Build WFL node.
19594         (qualified_name:): Build a single WFL node out of two. Retain
19595         the location information of the first node in the resulting node.
19596         (package_declaration:): Use package name as a WFL node
19597         (single_type_import_declaration:): Use imported name as a WFL node.
19598         (type_import_on_demand_declaration:): Use root of the imported
19599         packages as a WFL node.
19600         (field_declaration:): Removed unused local variable cl.
19601         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
19602         (yyerror): New static elc. Removed static error_line, error_pos.
19603         New local code_from_source. Save ctxp->elc into elc at the first
19604         pass. Call java_get_line_col to get a string of the line where
19605         the error occurred.
19606         (debug_line): Removed static function.
19607         (parse_error_context, parse_warning_context): Parameter cl is now
19608         a WFL node. Use its value to initialize ctxp->elc.
19609         (redefinition_error): Parameter cl is now a WFL node.
19610         (parse_add_interface): New parameter wfl. No longer call
19611         lookup_cl, use wfl instead.
19612         (check_class_interface_creation): Parameter cl is now a WFL node.
19613         (maybe_create_class_interface_decl): Likewise.
19614         (add_superinterfaces): New function.
19615         (create_interface): Removed local cl, node, super_decl,
19616         super_decl_type.  Function now uses id as a WFL node. Better
19617         warning/error report on obsolete or forbidden mix of
19618         modifiers. Now calls add_superinterfaces to register interfaces.
19619         (create_class): Removed local cl, node. Local variable id is used
19620         as a WFL node. Better error report on forbidden modifier
19621         mix. Uses add_superinterfaces to register interfaces.
19622         (find_field): Argument cl is now a WFL node. Now store the WFL
19623         node of a fields that needs to be checked for their
19624         initialization.
19625         (method_header): Local variable node non longer used. Local
19626         variable id replaces cl.
19627         (check_modifiers_consistency): Local variable cl is now a WFL
19628         node.
19629         (method_declarator): Local variable cl replaced by parameter id.
19630         (parser_qualified_name): Now uses parameter name as a WFL node.
19631         (parser_check_super_interface): New parameter wfl, for achieve
19632         greater accuracy during error reports.
19633         (parser_chain_incomplete_item): New parameter named location. Used,
19634         along the decl, to construct the incomplete item node.
19635         (java_complete_class): resolve_class now uses WFL node extracted
19636         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
19637         where appropriate.
19638         (complete_method_decl): Unresolved function's argument types are WFL.
19639         (resolve_class): Parameter cl is now a WFL node.
19640         (resolve_and_layout): Likewise.
19641         (do_resolve_class): Likewise. Try first to use cl and then do the
19642         lookup on the decl when calling check_pkg_class_access.
19643         (complete_class_report_errors): Use IC_TYPE in place of
19644         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
19645         instead of doing a lookup over the decl.
19646         (java_check_final): Use WFL info from field tree list.
19647         (lookup_cl): Rewritten and returns a statically defined WFL node.
19648         (lookup_modifier_cl): Now uses information from WFL nodes.
19649         (process_imports): Likewise.
19650         (read_import_dir): name and cl arguments replaced by a single WFL
19651         node. Function modified accordingly.
19652         (find_in_imports_on_demand): Now uses WFL node.
19653         (check_pkg_class_access): cl argument is now a WFL node.
19654         (declare_local_variables): Fixed to use WFL nodes.
19655         (resolve_expression_name): Likewise.
19656         (build_method_invocation_stmt): name_combo argument renamed
19657         wfl. Function modified to use WFL nodes.
19658         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
19659         (lookup_method_invoke): cl is now a WFL node. Added missing
19660         IDENTIFIER_POINTER to class type decl name.
19662 1998-04-14  Dave Brolley  <brolley@cygnus.com>
19664         * lang.c (init_parse): Now returns char* containing the filename.
19666 1998-04-10  Per Bothner  <bothner@cygnus.com>
19668         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
19670         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
19671         * class.c (make_class_data):  If flag_assume_compiled, initial class
19672         state is CSTATE_PREPARED; make superclass and interfaces direct
19673         references, rather than constant pool indexes.
19675 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19677         * parser.y: Include flags.h. Removed debug variable pl.
19678         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
19679         (block:): Likewise.
19680         (labeled_statement_nsi:): Generate debug info when reducing
19681         expression_statement:.
19682         (check_pkg_class_access): get_access_flags_from_decl invocation
19683         fixed for new CLASS_* flags location.
19684         (source_end_java_method): Save/restore parser context when
19685         entering/leaving this routine. Restore lineno to its right value
19686         before calling expand_end_bindings.
19687         (build_method_invocation_stmt): build_invoke called with the
19688         current line information.
19689         (build_invoke): New argument cl. Wrap the function call around a
19690         wfl node.
19691         (refine_accessible_methods_list): Changed comment, removed
19692         unnecessary code.
19693         * parse.h: Fixed typo in comments.
19694         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
19695         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
19696         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
19697         parser_ccb_indent.
19698         * lex.c (java_lex): Record the last closing curly bracket of a
19699         function.
19700         * jcf-parse.c (jcf_parse_source): Now calls
19701         java_check_methods. Clarified comment, fixed typo.
19703 1998-04-09  Dave Brolley  <brolley@cygnus.com>
19705         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
19706         (finish_parse): Expose for non USE_CPPLIB builds.
19708 1998-04-08  Jeffrey A Law  (law@cygnus.com)
19710         * lang.c (lang_print_xnode): New function.
19712 1998-04-03  Per Bothner  <bothner@cygnus.com>
19714         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
19715         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
19716         used to build a class's dispatch table.
19717         (make_class_data):  Generate dispatch table if flag_assume_compiled.
19718         Set dtable of class object to address of class_dtable_decl.
19720         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
19721         be volatile and have side effects - generates better code.
19723         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
19724         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
19726         * expr.c (expand_invoke):  If class is final, method is
19727         effectively final, so can call it directly.
19729         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
19731         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
19733 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19735         * parse.y (build_method_invocation_stmt): Removed extra argument
19736         to build_invoke.
19738 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19740         * expr.c (dtable_indent): Now static global.
19741         (expand_invoke): Now call invoke_build_dtable and
19742         build_invokevirtual.
19743         (invoke_build_dtable, build_invokevirtual): New functions.
19744         * jcf-io.c (find_class): Defer issuing a warning by setting
19745         jcf->outofsynch to 1.
19746         * jcf-parse.c (jcf_out_of_synch): New function.
19747         (load_class): Test this_jcf.outofsynch flag and call
19748         jcf_out_of_synch accordingly.
19749         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
19750         comment indentation.
19751         * lex.c (java_get_unicode): Fixed code indentation.
19752         (java_lex): Create string literal. Fixed typo. Removed several
19753         premature obstack_free.
19754         * parse.h: New enums for name resolution and invocation mode.
19755         (struct qualification): New data structure.
19756         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
19757         (do_resolve_class, build_method_invocation_stmt,
19758         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
19759         debug_line, identical_subpath_p, invocation_mode,
19760         refine_accessible_methods_list, build_invoke,
19761         lookup_method_invoke): New functions declared.
19762         (build_invokevirtual, invoke_build_dtable, match_java_method,
19763         build_field_ref, jcf_out_of_synch): New references to external
19764         functions.
19765         (struct parse_ctxt): Removed artificial_constructor field.
19766         * parse.y: (array_type:): Type defined for this rule.
19767         (class_type:): Installed default rule for interface_type:.
19768         (array_type:): Now build Java array type.
19769         (qualified_name:): Now use obstack_grow0.
19770         (method_declaration:): Skip the artificial constructor added to
19771         the list, if any.
19772         (abstract_method_declaration:): Execute the code only during pass 1.
19773         (block:): Installed default rule in block_statements:.
19774         (block_statement:): Add the statement to the method during pass 2.
19775         (statement_expression): Installed default rule for
19776         method_invocation:.
19777         (argument_list:): Added code to build the argument list.
19778         (method_invocation:): Added call to create the method invocation
19779         node.
19780         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
19781         (debug_line): New function for debug.
19782         (complete_class_decl): No longer do something during pass 1.
19783         (method_header): Use BUILD_PTR_FROM_NAME.
19784         (parser_qualified_classname): Use obstack_grow0. Removed bogus
19785         obstack_free.
19786         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
19787         function's main comment.
19788         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
19789         classes.
19790         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
19791         (resolve_class): Now works with arrays.
19792         (do_resolve_class, resolve_and_layout): New functions.
19793         (java_check_regular_methods): Reverse method list before and after
19794         having processed it. No longer set ctxp->artificial_constructor.
19795         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
19796         accordingly. Fixed typo in issued error message. Now use
19797         obstack_grow0.
19798         (find_in_imports_on_demand): Now use obstack_grow0.
19799         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
19800         (source_end_java_method): Call expand_expr_stmt instead of
19801         expand_expr. Calls it before calling expand_function_end.
19802         (java_method_add_stmt): Do nothing if errors were found during
19803         parsing.
19804         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
19805         (build_method_invocation_stmt, build_invoke, invocation_mode,
19806         lookup_method_invoke, refine_accessible_methods_list,
19807         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
19808         New functions.
19809         * typeck.c (build_java_signature): Properly end method signature
19810         if return type skipped.
19811         (match_java_method): New function.
19813 1998-03-16  Per Bothner  <bothner@cygnus.com>
19815         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
19817 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19819         * expr.c (build_invoke_non_interface): New function.
19820         (methods_ident, ncode_ident): Now static globals.
19821         (expand_invoke): Use build_invoke_non_interface.
19822         * java-tree.h (struct lang_decl): New field function_decl_body.
19823         (DECL_FUNCTION_BODY): New macro.
19824         * jcf-parse.c (jcf_parse_source): Deeper check before setting
19825         CLASS_FROM_SOURCE_P.
19826         (parse_source_file): Fixed typos. Call java_layout_parsed_class
19827         before starting pass 2. Call to java_generate_parsed_class replaced
19828         by java_register_parsed_class.
19829         * lex.c: Fixed typo in header. Some line width related formating.
19830         * lex.h: Some line width related formating.
19831         * parse.h (source_end_java_method, resolve_expression_name,
19832         complete_class_decl, maybe_create_class_interface_decl,
19833         check_class_interface_creation): New static function declarations.
19834         (java_layout_parsed_class, java_method_add_stmt): New function
19835         declarations.
19836         (struct parser_ctxt): Field mark_class_generate removed. New
19837         fields class_list and artificial_constructor.
19838         * parse.y: Fixed typo in header.
19839         (class_declaration:): Call complete_class_decl when class body
19840         parsed.
19841         (method_declaration:): Call source_end_java_method in pass 2 when
19842         the method body is defined.
19843         (postfix_expression:): Do expression name resolution on sub-rule
19844         name during pass 2.
19845         (create_class, create_interface): Merged common pieces.
19846         (check_class_interface_creation, maybe_create_class_interface_decl):
19847         New functions.
19848         (complete_class_decl): New function.
19849         (register_fields): Fixed line width related typo.
19850         (method_header): Correctly skip first argument when fixing
19851         argument line. Changed the loop.
19852         (java_check_circular_reference): Now use ctxp->class_list.
19853         (java_complete_class): Removed start/stop marking.
19854         (java_check_regular_methods): Now takes a class decl as an
19855         argument.  Add default constructor if none were encountered.
19856         (java_check_methods): Now use ctxp->class_list. Changed call to
19857         java_check_regular_methods.
19858         (source_start_java_method): Set DECL_ARG_TYPE for each function
19859         arguments.
19860         (source_end_java_method, java_method_add_stmt): New functions.
19861         (java_generate_parsed_class): No longer exists.
19862         (java_layout_parsed_class, java_register_parsed_class): New functions.
19863         (resolve_expression_name): New function.
19865 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19867         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
19868         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
19869         until pass initializations are done. Call read_import_dir with
19870         pass set to 0.
19871         * parse.h: (lookup_modifier_cl): New function declared.
19872         (INTERFACE_FIELD_MODIFIERS): New macro.
19873         (OBSOLETE_MODIFIER_WARNING): New macro.
19874         * parse.y: (register_fields): Class type and current field name in
19875         local variables. Check modifier(s) if adding field(s) to an interface.
19876         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
19877         and report errors using the faulty modifier line context.
19878         (lookup_modifier_cl): New function.
19879         (read_import_dir): Detect and report default import processing
19880         failure.
19882 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
19884         Add a pair of -fassume-compiled/-fno-assume-compiled options.
19885         * class.c (is_compiled_class): Return 1 after making sure it
19886         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
19887         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
19888         * java-tree.h (flag_assume_compiled): Add decl.
19889         * lang.c (lang_f_options): Add the flag.
19890         (flag_assume_compiled): Add decl, default to 0.
19892 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19894         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
19895         (is_compiled_class): Likewise.
19896         (layout_class): Likewise.
19897         (layout_class): Detect and lay out classes defined in source code.
19898         (interface_of_p, add_interface_do, may_add_interface): New
19899         function.
19900         (add_interface): Now use add_interface_do.
19901         (add_method_1): New function.
19902         (add_method): Now use add_method_1.
19903         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
19904         (complete_start_java_method): New function.
19905         (start_java_mehod): Now call complete_start_java_method.
19906         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
19907         (expand_invoke): Likewise and fixed typo.
19908         *gjava.c: (print_super_field): Use new argument to find_class
19909         DO_CLASS_FILE.
19910         (main): Likewise.
19911         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
19912         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
19913         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
19914         IDENTIFIER_NODE.
19915         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
19916         (add_method_1, push_class): New prototypes.
19917         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
19918         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
19919         directory where the class was found.
19920         (find_class): New argument DO_CLASS_FILE. Function find_class
19921         modified accordingly.
19922         *jcf-parse.c: (fix_class_path): New function.
19923         (load_class): Use new VERBOSE argument. load_class now finds and
19924         loads/parses .class/.java files. Save read_state of current_jcf
19925         if necessary.
19926         (java_parser_abort_on_error): New macro.
19927         (jcf_parse_source, parse_source_file): New function.
19928         (jcf_parse): Fixed typo.
19929         (yyparse): Call parse_source_file () only.
19930         (process_zip_dir): Fixed typo, fix zdir->filename_length when
19931         writing the real class name back in the zip directory entry.
19932         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
19933         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
19934         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
19935         (find_class): Prototype fixed.
19936         *lex.c: Added 1998 time stamp.
19937         Removed all static global variables, moved into the parser
19938         context data structure.. Now include unistd.h if SEEK_SET not
19939         defined.
19940         (java_init_lex): Rewritten.
19941         (java_sneak_unicode): Modified current unicode access in current line.
19942         (java_unget_unicode): Likewise.
19943         (java_allocate_new_line): New allocation management.
19944         (java_read_char): Modified access and storage of unget_utf8_value.
19945         New way of processing current unicode.
19946         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
19947         (java_get_unicode): Now use the parser context.
19948         (java_lineterminator): Likewise.
19949         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
19950         of the reentrant parser implementation. Function now use the
19951         parser context data structure and java_lval. Fixed production of
19952         the float and double constant "out of range" error message. Fixed
19953         obstack use. Return integer value when hitting a modifier. Now
19954         return type for TRUE, FALSE and other predefined types. Return
19955         identifier as a TREE_LIST list containing the current line context
19956         as the TREE_VALUE sub-node.
19957         (java_unicode_2_utf8): Fixed typo in declaration.
19958         (java_lex_error): Now use the parser context data structure.
19959         *lex.h: Added 1998 time stamp.
19960         (struct java_line): New fields ref_count and next.
19961         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19962         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
19963         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
19964         *parse.h: Added 1998 time stamp.
19965         (java_parse_source_file): Renamed from parse_source_file.
19966         (YYERROR_NOW, YYNOT_TWICE): Fixed.
19967         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
19968         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
19969         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
19970         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
19971         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
19972         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
19973         (struct parser_ctxt): New data structure to keep the parser context.
19974         *parse.y: Added 1998 time stamp, got rid of static global variables.
19975         (java_error_count, ctxp): New global variables.
19976         (%union): New value field.
19977         (numeric_type, integral_type): Rules removed.
19978         (primitive_type): Rule defined to handle integral, float, double and
19979         boolean types.
19980         (qualified_name, package_declaration,
19981         single_type_import_declaration, type_import_on_demand_declaration,
19982         modifiers, class_declaration, super, interfaces,
19983         interface_type_list, class_body, field_declaration,
19984         field_declaration, variable_declarators, variable_declarator,
19985         variable_declarator_id, method_declaration, method_header,
19986         formal_parameter_list, formal_parameter, method_body, block,
19987         static, interface_declaration, extends_interfaces,
19988         abstract_method_declaration, local_variable_declarators): Rules now
19989         define actions.
19990         (force_error, do_warning): New global statics.
19991         (push_parser_context, parser_context_save_global,
19992         parser_context_restore_global, pop_parser_context): New functions.
19993         (yyerror): Now uses the global parser context. Fixed use of obstack.
19994         (parse_error, parse_error_context, parse_warning_context,
19995         java_accstring_lookup, redefinition_error, check_modifiers,
19996         parser_add_interface, create_interface, create_class, find_field,
19997         duplicate_declaration_error, register_fields, method_header,
19998         check_modifiers_consistency, check_abstract_method_header,
19999         method_declarator, parser_qualified_classname,
20000         parser_check_super_interface, parser_check_super,
20001         parser_chain_incomplete_item, java_check_circular_reference,
20002         layout_class_from_source, java_complete_class,
20003         complete_method_decl, resolve_class, complete_class_report_errors,
20004         java_check_final, check_method_redefinition,
20005         java_check_regular_methods, java_check_abstract_methods,
20006         java_check_methods, lookup_java_interface_method2,
20007         lookup_java_method2, lookup_cl, find_name_in_single_imports,
20008         process_imports, find_in_imports, read_import_entry,
20009         read_import_dir, find_in_imports_on_demand,
20010         check_pkg_class_access, not_builtin_p, declare_local_variables,
20011         source_start_java_method, java_generate_parsed_class): New
20012         functions.
20013         *typeck.c: (signature_include_return): New global variable.
20014         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20015         to add the function returned type in the signature.
20017 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
20019         * jcf-io.c (open_in_zip): Use strncmp and LEN.
20021 1998-01-29  Dave Brolley  <brolley@cygnus.com>
20023         * Make-lang.in (java.info): Added.
20024         (java.install-info): Added
20026 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
20028         * Makefile.in (clean): Also remove java/parse.c.
20030 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
20032         Add a pair of -fbounds-check/-fno-bounds-check options.
20033         * lang.c (lang_decode_option): Add code to grok arguments.
20034         (flag_bounds_check): Add decl.
20035         (lang_f_options): New array w/ the option in it.
20036         * java-tree.h (flag_bounds_check): Add decl.
20037         * lang-options.h: New file.
20038         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20039         of a static macro value.
20040         (JAVA_ARRAY_EXCEPTION): Delete macro.
20042 1998-01-23  Per Bothner  <bothner@cygnus.com>
20044         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
20045         * expr.c (build_anewarray):  Add missing promote_type.
20047 1998-01-22  Per Bothner  <bothner@cygnus.com>
20049         Add array types with known length to optimize bounds checking.
20050         * typeck.c (build_java_array_type):  Take length parameter.
20051         (java_array_type_length, build_prim_array_type):  New functions.
20052         * java-tree.h:  Update for new functions.
20053         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20054         * class.c:  Use build_prim_array_type.
20055         * expr.c (can_widen_reference_to):  Handle known-length array types.
20056         (verify_jvm_instructions):  Keep track of integer push instructions
20057         followed by newarray/anewarray, so we can build known-length arrays.
20058         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
20059         (java_array_data_offset):  New function.
20060         (build_java_array_length_access):  New function.  Optimize if constant.
20061         (build_java_arrayaccess):  Constant fold bounds check.
20062         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
20063         (build_newarray, build_anewarray):  New functions.
20064         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20065         * verify.c (merge_types):  Handle known-lengh array types.
20067 1998-01-19  Per Bothner  <bothner@cygnus.com>
20069         * expr.c (expand_byte_code):  Fix performace bug, which caused
20070         searching linenumber_table to be linear rather than constant.
20072 1997-12-12  Per Bothner  <bothner@cygnus.com>
20074         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20076         * decl.c, java-tree.h (soft_fmod_node):  New global.
20077         * decl.c (init_decl_processing):  Define __builtin_fmod.
20078         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20079         using __builtin_fmod.
20081 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20083         * keyword.h: New file, output of keyword.gperf as processed by
20084         gperf.
20085         * lex.c (java_lex_init): Initialize java_error_flag.
20086         * parse.c (YYERROR_NOW): Uses java_error_flag.
20087         * parse.y: New static java_error_flag. Useless definition of
20088         buffer_error gone.
20089         * parse.y (java_error): Portable error recovery using
20090         java_error_flag (not yet completely tuned).
20092 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20094         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20096 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20098         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20099         (parse.c, lex.c, keyword.h): New rules for Java source code
20100         front-end.
20101         * parse.c: Renamed into jcf-parse.c.
20102         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20103         * keyword.gperf: New file, Java keywords.
20104         * parse.y: New file, Java language grammar.
20105         * parse.h: New file, Java language grammar definitions.
20106         * lex.c: New file, Java language lexer.
20107         * lex.h: New file, Java language lexer definitions.
20109 1997-12-03  Per Bothner  <bothner@cygnus.com>
20111         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20112         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20113         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20114         * expr.c (expand_java_field_op):  Check for invalid assignment
20115         to final field.
20117         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20119 1997-10-27  Per Bothner  <bothner@cygnus.com>
20121         * verify.c (verify_jvm_instructions):  When processing a handler,
20122         attempt to set the current_subr to the right value.
20123         (More complicated code combines Sep 17 and Oct 22 versions.)
20125 1997-10-24  Per Bothner  <bothner@cygnus.com>
20127         * class.c (push_class):  Figure out (guess) name of source file.
20128         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20129         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20130         (parse_class_file):  Change return type from int to void.
20131         Call debug_start_source_file/debug_end_source_file.
20133         * expr.c (build_java_binop):  Fix masking 2nd operand.
20134         * decl.c (init_decl_processing):  Set sizetype first.
20136 1997-10-22  Per Bothner  <bothner@cygnus.com>
20138         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20139         (Revert Sep 17 change.)
20141 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20143         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20144         .class extension in their name and fix thing so we don't process
20145         them parse_zip_file_entries().
20146         (parse_zip_file_entries): Cleaned unused local variables.
20148 1997-10-20  Per Bothner  <bothner@cygnus.com>
20150         * expr.c (can_widen_reference_to):  Allows equal array element types.
20151         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20152         * jcf-dump.c (RET):  Get (and print) index.
20154         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20155         Promote element type to POINTER_TYPE.
20157 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20159         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20160         find_in_current_zip, jcf_figure_file_type): Moved from
20161         jcf-reader.c to parse.c.
20162         * zextract.c: (read_zip_archive): takes file_comment_length possible
20163         field into account.
20165 1997-10-20  Per Bothner  <bothner@cygnus.com>
20167         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20169         * verify.c (merge_types):  Handle array types even better ...
20171 1997-10-17  Per Bothner  <bothner@cygnus.com>
20173         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20175         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20176         * class.c (make_class_data):  Don't build fields_decl if no fields.
20177         When building fields_decl, skip if DECL_ARTIFICIAL.
20179         * expr.c (java_stack_swap):  Update stack_type_map.
20180         * verify.c (merge_types):  Handle array types better.
20182 1997-10-15  Per Bothner  <bothner@cygnus.com>
20184         * class.c (add_field):  Don't promote short integral fields to
20185         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20186         * expr.c (push_value):  Promote and convert short integral values.
20188         * decl.c, java-tree.h (integer_two_node):  New constant node.
20189         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20191 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20193         * class.c (append_gpp_mangled_type): Use function argument
20194         unpromoted type to generate mangled name.
20196 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20198         * constants.c (build_constant_data_ref): Now uses current_class
20199         instead of main_class.
20200         (build_constants_constructor): Now uses current_class instead of
20201         main_class.
20202         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20203         of the global variable SeepZipFiles done here.
20204         * zextract.c (read_zip_archive): extra_field optional field taken
20205         into account while computing the position of the class file in the
20206         archive.
20207         * verify.c (verify_jvm_instructions): Use current_jcf to search
20208         the constant pool.
20209         * parse.c (load_class): First search for the class to load in the
20210         current zip file. Saves current_jcf (restored before returning
20211         from that function). Don't call JCF_FINISH in the class was found
20212         in the current ZIP file.
20213         (jcf_parse): If the class was found in the current ZIP file, save
20214         its tree_constant_pool (for later reuse).
20215         (parse_class_file): New function. Process each method defined in
20216         the current class and record the class as to be later registered.
20217         (yyparse): Rewritten. Figure the type of the current file and switch
20218         accordingly.
20219         * lang.c: New global variable current_jcf.
20220         (lang_init): Removed compiling_from_source test (done later, in
20221         yyparse). Removed call the jcf_parse ().
20222         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20223         (typedef struct JCF): New fields seen_in_zip (to mark a class found
20224         in the current ZIP file) and zip_offset (offset to the class data in
20225         the current zip file).
20226         * jcf-reader.c: zipfile.h included.
20227         localToFile: New ZipFileCache static global variable
20228         (parse_zip_file_entries): New function. Browse the current ZIP
20229         file directory and process each class found.
20230         (process_zip_dir): New function. Register each class found in the
20231         ZIP file directory. The class aren't parsed but a valid JCF is
20232         link to each of them.
20233         (find_in_current_zip): New function. Search for a class in the
20234         current ZIP file directory. If found, prepare the class so that it
20235         can be loaded.
20236         (jcf_figure_file_type): New function. Examine the file structure
20237         to figure a class file, a ZIP file. If none of these categories are
20238         matched, a source file is assumed.
20239         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20240         SeenZipFile: New global variable.
20241         (open_in_zip): Use zipmember's length to accelerate the search for
20242         a member. If zipmember was NULL and zip file successfully read,
20243         return 0.
20244         * java-tree.h: New global variable current_jcf declared.  Added
20245         declaration for current_constant_pool_tags, current_constant_pool_data,
20246         current_constant_pool_length, current_constant_pool_data_ref.
20247         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20248         store the JCF of classes seen in a zip file) and tree *constant_pool
20249         (to save a loaded class constant pool). current_class declared here.
20250         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20251         retrieve method_ref_constant.
20252         (PUSHC): java_push_constant_from_pool now uses current_jcf.
20253         (OBJECT): get_class_constant now uses current_jcf.
20254         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20255         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20256         (expand_invoke): Now uses current_class instead of main_class
20257         (build_class_init): Now uses current_class instead of main_class
20258         * class.c: New static global variable registered_class.
20259         (register_class): New function.
20260         (emit_register_class): Modified to use registered_class instead of
20261         main_class
20262         (is_compiled_class): Now take into account class seen in the archive.
20264 1997-10-06  Per Bothner  <bothner@cygnus.com>
20266         * except.h:  Renamed to: java-except.h.
20267         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
20268         * except.c:  Add semi-working (commented out) implementation.
20270         * expr.c (expand_iinc):  Add needed flush_quick_stack.
20271         * parse.c (set_source_filename):  New function.
20272         (give_name_to_class):  Set input_filename from package.classname.java.
20274         * jcf-io.c (find_class):  Don't look first in ".".
20276 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20278         * zextract.c (read_zip_archive): Now takes into account the
20279         extra_field field.
20280         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20282 1997-09-20  Per Bothner  <bothner@cygnus.com>
20284         * constants.c, java-tree.h (build_internal_class_name):  New function.
20285         (alloc_class_constant):  Re-implement using build_internal_class_name.
20286         * class.c (make_class_data):  Likewise.
20287         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
20289 1997-09-17  Per Bothner  <bothner@cygnus.com>
20291         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
20292         to NULL before pushing an exception handler target.
20294         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
20295         (java_stack_swap, java_stack_dup):  Re-write to be safe from
20296         clobbering registers.
20297         (build_class_init):  New function.
20299 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20301         * typeck.c (build_java_array_type): Temporary use
20302         permanent_obstack to create the array 'length' field.
20303         * expr.c (lookup_label): Temporay use permanent_obstack to create
20304         label if not found.
20305         * class.c (push_super_field): Tempory use permanent_obstack.
20307 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20309         * typeck.c (type_for_mode): Now handles double_type_node and
20310         float_type_node.
20311         * verify.c (verify_jvm_instructions): The instruction following
20312         the wide bytecode is checked. OPCODE_ret added to the list of
20313         wide.
20315 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20317         * class.c (make_class): Temporary use permanent_obstack. Set the
20318         class CLASS_P field to 1.
20319         (push_class): Temporary use permanent_obstack.
20320         (set_super_info): Temporary use permanent_obstack.
20321         (add_method): Temporary use permanent_obstack, set
20322         METHOD_TRANSIENT().
20323         (add_field): Temporary use permanent_obstack. Sets
20324         FIELD_VOLATILE() and FIELD_TRANSIENT().
20325         (build_class_ref): Temporary use permanent_obstack if the class
20326         isn't compiled.
20327         (build_static_field_ref): Temporary use permanent_obstack when
20328         creating field's rtl.
20329         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20330         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20331         and fields. Function finalized, as far as flag handling.
20332         (push_class_static_dummy_field): Temporary use permanent_obstack.
20333         (emit_register_class): Force generation of class registration at
20334         -O3 or deeper.
20335         * decl.c (end_java_method): Call permanent_allocation() before
20336         returning.
20337         * expr.c (can_widen_reference_to): Added comment to interface
20338         handling, fixed typo.
20339         (lookup_field): Now uses CLASS_P() to correct FIXME
20340         (expand_invoke): Verification on public && !static &&
20341         !abstract moved into soft_lookupinterfacemethod (kaffe).
20342         Use Object class dtable if objectref is an array when expanding
20343         invokeinterface.
20344         (java_push_constant_from_pool): Temporary use permanent_obstack
20345         for CONSTANT_string
20346         * parse.c (get_ref_constant): Temporary use permanent_obstack to
20347         create constant references.
20348         (get_constant): Temporary use permanent_obstack to create constant.
20349         (load_class): Temporary use permanent_obstack to load class.
20350         (jcf_parse): Temporary use permanent_obstack to perform class
20351         layout.
20352         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20353         (build_java_signature): Temporary use permanent_obstack.
20354         * verify.c: (verify_jvm_instruction): removed unnecessary verification
20355         on ACC_SUPER flag.
20356         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20357         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20358         (CLASS_P): Defined
20360 1997-09-11  Per Bothner  <bothner@cygnus.com>
20362         * class.c (append_gpp_mangled_type):  Fix typo.
20363         (emit_register_class):  Use main_class to get class object, rather
20364         than looking for no-longer-existing static decl starting with _CL.
20365         * typeck.c (parse_signature_type):  Promote array element type
20366         if it is a RECORD_TYPE.
20368 1997-09-10  Per Bothner  <bothner@cygnus.com>
20370         * class.c (push_class_static_dummy_field):  New function.
20371         (mangle_static_field):  New. Do G++-style mangling of static fields.
20372         (layout_class):  Mandle static fields here, not in add_field.
20373         (build_class_ref):  The class object is now a dummy static field.
20374         * decl.c (find_local_variable):  Look for best, instead of first match.
20375         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
20376         (build_java_athrow):  Don't check here if exception is Throwable.
20377         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
20378         (TYPE_USED):  Removed.  No longer used ...
20379         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
20380         * verify.c (push_pending_label):  New function.
20381         (push_pending_block):  Renamed to check_pending_block.
20382         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
20383         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
20384         re-checking possible handlers) after a store (less wasted work).
20385         Check for null handler (finally) before calling add_handler.
20386         Various changes to (finally?) correctly handle try/finally.
20388 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
20390         * class.c: Include stdio.h.
20392 1997-09-04  Per Bothner  <bothner@cygnus.com>
20394         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20395         to make sure class is initialized before static/special invoke.
20397         * verify.c (verify_jvm_instructions):  On a store instruction,
20398         call find_local_variable to force pre-allocation of decl and rtx.
20399         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
20401 1997-09-03  Per Bothner  <bothner@cygnus.com>
20403         * class.c (build_class_ref):   Strip off "promoted_" if need be.
20404         (make_field_value): Call build_java_signature when needed.
20405         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
20406         * expr.c (build_java_athrow):  Don't push_value of exception.
20407         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
20408         match specification of [fd]cmp[lg] for NaNs.
20409         (expand_byte_code):  Add support for exception handler ranges.
20410         * except.c:  Add skeleton for EH code-generation.
20411         * verify.c (merge_types):  Treat all promoted integral types as equal.
20412         * constants.c (build_constants_constructor):  To force creation of
20413         current_constant_pool_data_ref, call build_constant_data_ref.
20415         * javaop.def (lload):  Fix typo.
20416         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
20418 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
20420         * parse.c: Don't include function.h.
20422 1997-08-27  Per Bothner  <bothner@cygnus.com>
20424         * except.[ch]:  New files.
20425         * Makefile.in (JAVA_OBJS):  Add except.o
20426         * expr.c:  Temporary warning about unimplemented exceptions.
20427         * verify.c:  Verify exception handlers.
20429         * jcf-dump.c (disassemble_method):  Print exception table.
20431 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20433         * expr.c (verify_jvm_instructions): Started a thorough
20434         verification of invoke* bytecodes.
20435         (expand_byte_code): flush quick stack if PC is the target of a
20436         branch.  and undef RET (conflicting with config/i386/i386.h).
20437         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
20438         used.
20439         (expand_invoke): Now handles invokeinterface and do more
20440         verification according to the bytecode.
20441         (lookup_field): Don't try to load the class if processing
20442         dtable_type.
20443         (can_widen_reference_to): Now handles interfaces.
20444         * decl.c (init_decl_processing): New global variable
20445         soft_lookupinterfacemethod_node, declared in java-tree.h.
20446         Call set_super_info on string_type_node.
20447         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
20448         defined.
20449         * class.c (set_super_info): Fills the CLASS_* flags according to
20450         access_flags.
20451         (get_access_flags_from_decl): Handles all class flags.
20453 1997-08-26  Per Bothner  <bothner@cygnus.com>
20455         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
20456         * parse.c (yyparse):  Check for abstract method, and missing code.
20457         * expr.c (expand_byte_code):  Change interface.
20458         * lang.c (put_decl_node):  Print promoted types prettier.
20459         * verify.c (verify_jvm_instruction):  Change interface.
20460         Partial support for scanning exception table.
20461         For load instructions, handle promoted integral types.
20463 1997-08-21  Per Bothner  <bothner@cygnus.com>
20465         * verify.c:  New file, with contents moved from expr.c.
20466         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
20467         * typeck.c (is_array_type_p):  Moved here from expr.c.
20468         * java-tree.h:  Add some now-needed function declarations.
20469         * Makefile.in (JAVA_OBJS): Added verify.o.
20471 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20473         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20474         METHOD_ABSTRACT flag.
20476         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
20477         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
20478         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
20480         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20481         variables.
20482         (start_java_method): Hook for SYNCHRONIZED methods.
20484         * expr.c (build_java_jsr, build_java_ret): New functions
20485         (JSR,PRE): New macros
20486         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
20487         (verify_jvm_instructions): tableswitch, lookupswitch,
20488         monitorenter, monitorexit, goto_w: verified.
20489         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
20490         (build_java_monitor): New function.
20491         (MONITOR_OPERATION): Modified to call build_java_monitor()
20492         (verify_jvm_instructions): Started a thorough verification of
20493         invoke* bytecodes.
20495 1997-08-19  Per Bothner  <bothner@cygnus.com>
20497         Support verification of jsr/ret subroutines (used for try/finally).
20498         * decl.c (return_address_type_node):  New type node.
20499         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
20500         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
20501         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
20502         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
20503         TYPE_USED):  New macros for special types in type_map.
20505         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
20506         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
20507         BCODE_JUMP_TARGET.
20508         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
20510         * expr.c (can_widen_reference_to):  New function.
20511         (pop_type):  Use it.
20512         (merge_type_state):  Support handling start of subroutine.
20513         (push_pending_block):  Return char* error message, instead of calling
20514         fatal on an error.  Also handle subroutines.
20515         (verify_jvm_instructions):  Handle errors from push_poending_block.
20516         Support jsr and ret instructions.
20518 1997-08-19  Per Bothner  <bothner@cygnus.com>
20520         * jcf-io.c (find_classfile):  Fix thinko.
20521         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
20523 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
20525         * Makefile.in (BISON): Remove.
20527 1997-08-07  Per Bothner  <bothner@cygnus.com>
20529         * Makefile.in:  Convert to autoconf.
20530         * config-lang.in (outputs):  Added java/Makefile.
20532         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20533         Rename cc1java to jc1.
20535         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
20536         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
20538         * class.c (class_depth):  Do load_class if needed.
20540         Mostly better verification.
20541         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
20542         (init_decl_processing):  Change return type of soft_checkcast.
20543         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
20544         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
20545         lang_print_error):  New functions.
20546         (lang_init):  Set global hook print_error_function to lang_print_error.
20547         * expr.c:  In the type_map ptr_type_node is only used for null now.
20548         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
20549         (merge_types):  Dererence pointer to record types before comparing.
20550         (decode_newarray_type, merge_types):  On error just return NULL.
20551         (build_java_binop):  Add preliminary implementation (with warning)
20552         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
20553         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
20554         (expand_compare, expand_java_goto, expand_java_call):  Don't
20555         push_pending_block, since that only makes sense when verifying.
20556         (merge_type_state):  Different return codes.
20557         (push_pending_block):  A block may need to be verified more than once.
20558         (expand_byte_code):  Warn about unused code at code generation time.
20559         (verify_jvm_instruction):  Changed logic, since code may need to be
20560         re-verified if type-state has changed.  Also, better error handling.
20561         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
20562         Improve newarray, anewarray, ?aload, athrow,
20563         * java-tree.h (LABEL_CHANGED):  New macro.
20565 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20567         * decl.c (soft_athrow_node): New global variable initialized.
20568         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
20569         * typeck.c (convert): Added support for REAL_TYPE.
20570         (convert_to_char): New function.
20571         (convert): Handle CHAR_TYPE.
20572         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
20573         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
20574         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
20575         promoted type.
20576         (verify_jvm_instructions): Added break a the end of bogus unop: label.
20577         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
20578         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
20579         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
20580         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
20581         to Use The Right Things.
20582         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
20583         compatible with INT. BOOLEAN is made equivalent to BYTE.
20584         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
20585         OPCODE_ifnonnull): Now supported.
20586         (build_java_athrow): New function.
20588 1997-08-04  Per Bothner  <bothner@cygnus.com>
20590         Rename method name <init> to match G++ (and fix mangling).
20591         * class.c (layout_class):  Replace method name of <init> by class name.
20592         (make_method_value):  Do inverse renaming of constructor from <init>.
20593         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
20594         * typeck.c (lookup_java_constructor):  New function.
20595         * expr.c (expand_invoke):  If method_name is <init>, call
20596         lookup_java_constructor to find constructor.
20598         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
20600 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20602         * parse.c (get_class_constant): Modified to handle array "classes"
20603         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
20604         wide type.
20605         (convert): Modified to handle real type.
20606         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
20607         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
20608         variables declared.
20609         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
20610         soft_multianewarray, soft_newarray_node, soft_throw_node): New
20611         global variables initialized.
20612         (find_local_variable): Handles the case of a pointer
20613         (end_java_method): Restore the use of one more scope
20614         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
20615         build_java_array_length_access, expand_java_arrayload,
20616         expand_java_arraystore, expand_java_array_length,
20617         expand_java_multianewarray, expand_java_anewarray,
20618         build_java_check_indexed_type, is_array_type_p,
20619         build_java_throw_out_of_bound_exception): New functions.
20620         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
20621         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
20622         OPCODE_<t>aload): Implemented code for verification.
20623         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
20624         ARRAY_NEW_MULTI): Macro defined.
20625         (CONVERT): Modified to invoke convert().
20626         (case OPCODE_aload2): Fixed index typo from 2 to 1.
20628 1997-07-31  Per Bothner  <bothner@cygnus.com>
20630         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
20631         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
20632         (make_class_data):  Field name needs '/' as package prefix.
20633         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
20635 1997-07-25  Per Bothner  <bothner@cygnus.com>
20637         Implement debug information for local variables.
20638         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
20639         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
20640         DECL_LOCAL_SLOT_CHAIN):  New macros.
20641         (struct lang_decl_var):  New type.
20642         * parse.c (give_name_to_locals):  Move to decl.c.
20643         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
20644         (start_java_method):  Re-write parameter handling.
20645         (pending_local_decls):  New global variable.
20646         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
20647         (find_local_variable):  Accept pc so we can skips decls not in range.
20648         (struct binding_level):  Add end_pc field.
20649         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
20650         (various):  Change so current pc gets passed to find_local_variable.
20652         * decl.c (init_decl_processing):  Re-arrange fields in
20653         class_type_node and and method_type_node to match kaffe 0.9.1.
20654         * class.c (make_method_value, make_class_data):  Update
20655         initializations to match.
20657 1997-07-16  Per Bothner  <bothner@cygnus.com>
20659         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
20660         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
20661         (push_super_field):  New function.
20662         (make_class_data):  Handle inheritance of class static initializer.
20663         (layout_class):  New name mangling.
20664         * constants.c (build_constant_data_ref):  Init type of data array
20665         to a one-element array.
20666         (build_constants_constructor):  Set DECL_SIZE from complete array type.
20667         * decl.c:  Rename class_type, object_type etc to class_type_node,
20668         object_type_node etc.  Make former inherit from latter.
20669         * expr.c (expand_invoke):  Add cast of function address.
20670         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
20671         * parse.c (yyparse):  Don't call layout_class here.
20672         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
20674 1997-06-14  Per Bothner  <bothner@cygnus.com>
20676         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
20677         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
20678         (alloc_class_constant):  New.
20679         * expr.c (expand_invoke):  Make sure method's class is initialized.
20680         * class.c (interits_from_p, emit_register_class):  New functions.
20681         * parse.c (yyparse):  Call emit_register_class.
20683 1997-06-09  Per Bothner  <bothner@cygnus.com>
20685         * constants.c:  New file, to handle constant pool.
20686         * Makefile.in (JAVA_OBJS):  Add constants.o.
20687         * decl.c (init_decl_processing):  Update, fix, finish various structs.
20688         (pushdecl_top_level):  New.
20689         * parse.c (layout_class):  Moved to class.c.
20690         * expr.c (java_push_constant_from_pool):  New function.
20691         * class.c (build_class_ref):  Make work fully
20692         (make_class_data):  Emit super-class, constant pool, interface vector.
20694 1997-06-03  Per Bothner  <bothner@cygnus.com>
20696         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
20697         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
20698         * class.c (class_depth):  New function.
20699         (lookup_named_class):  Replaced by new function lookup_class.
20700         * decl.c (object_type_node, string_type_node):  New.
20701         Remove various types that we no longer need.
20702         * expr.c (verify_jvm_instructions):  New separate verifier pass.
20703         (push_type, pop_type):  New functions for verifier.
20704         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
20705         (expand_byte_code):  Simplify, since we assume already verified.
20706         (expand_invoke):  Now mostly works.
20707         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
20708         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
20709         * parse.c:  Wait to allocate class object until we know its name.
20710         (layout_class):  Calculate DECL_VINDEX for each virtual method.
20711         * typeck.c (get_array_type):  Rename to ...
20712         (build_java_array_type):  ... and provide working implementation.
20713         (build_java_signature):  New function - build Java signature of type.
20714         (set_java_signature):  New function - cache signature with type.
20715         (lookup_java_method):  New function.
20717 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
20719         * class.c (ident_subst):  Take extra SUFFIX parameter.
20720         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
20721         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
20722         (build_class_ref):  Actually implement.
20723         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
20724         * decl.c (builtin_function):  New.
20725         (init_decl_processing):  Update for current Kaffe.  Declare some
20726         builtin Kaffe functions.
20727         * expr.c (build_address_of):  New.
20728         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
20729         Renamed (from expand_java_new etc), and added working implementations.
20730         (build_field_ref):  Now also handle static fields.
20731         (expand_invoke):  Implement invokestatic, and start implement rest.
20732         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
20733         * javaop.def:  Rename invokevirt -> invokevirtual.
20734         * lang.c (use_handles):  Removed.
20735         * parse.c:  Add support for ConstantValue attribute.
20736         Handle nested loading of a class.  (JPOOL_UTF):  New.
20738 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
20740         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
20742 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
20744         * Make-lang.in (java.install-man):  New empty rule.
20745         * typeck.c (set_local_type):  New function.
20746         * expr.c (STORE_INTERNAL):  Call find_local_variable,
20747         not find_stack_slot.  Call set_local_type.
20749 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
20751         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
20752         and building RECORD_TYPE CONSTRUCTORs.
20753         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
20755         * lang.c (use_handles):  Change the default to 0.
20756         * decl.c:  Define and build class_type, field_type, utf8const_type.
20757         * class.c (make_class_data, make_field_value,
20758         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
20759         hashUtf8String, strLengthUtf8, mangled_classname:
20760         Functions to build reflective data structures.
20761         * parse.c (yyparse):  Call make_class_data.
20763         * jcf-io.c (open_class, find_classfile):  New functions.
20764         * jcf-dump.c:  Support reading classfile from explicitly-named
20765         class file (without CLASSPATH searching).
20767 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
20769         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
20770         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
20771         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
20772         (get_constant):  Now trivial for CONSTANT_Utf8.
20774         * jcf.h:  Make NEW_CPOOL the default.
20775         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
20777 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
20779         New directory.