2007-05-30 H.J. Lu <hongjiu.lu@intel.com>
[official-gcc.git] / gcc / java / ChangeLog
blob7bfa288ec5f6982b3ac85a301712bd0283a17920
1 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
3         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
4         (print_constant): Likewise.
6 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
8         * expr.c (build_java_binop): Use unsigned_type_for instead of
9         java_unsigned_type.
10         * java-tree.h (java_unsigned_type): Remove.
11         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
12         * typeck.c (java_unsigned_type): Remove.
14 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
16         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
17         instead of checking GIMPLE_STMT_P in chain_next.
19 2007-04-06  Colin Walters  <walters@redhat.com>
21         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
22         * jcf-io.c (open_class): Copy 'filename'.
24 2007-04-03  Andrew Haley  <aph@redhat.com>
26         * jvgenmain.c (main): Change main to use class$, not class$$.
27         (do_mangle_classname): Likewise.
28         * class.c (hide): New function.
29         (add_field): Hide everything that shouldn't be visible outside a
30         DSO.
31         (build_static_class_ref): Likewise.
32         (build_classdollar_field): Likewise.
33         (make_class_data): Likewise.
34         (layout_class_method): Likewise.
35         * expr.c (special_method_p): New function.
37         * class.c (push_class): Don't bogusly guess the source filename.
38         * jcf-parse.c (give_name_to_class): Don't set input_location from
39         DECL_ARTIFICIAL decls.
41 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
43         * typeck.c (java_signed_or_unsigned_type): Removed.
44         (java_signed_type): use get_signed_or_unsigned_type instead of
45         java_signed_or_unsigned_type.
46         (java_unsigned_type): Ditto.
47         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
48         * java-tree.h (java_signed_or_unsigned_type): Removed.
50 2007-03-26  Tom Tromey  <tromey@redhat.com>
52         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
53         (java.maintainer-clean): Likewise.
54         (java.install-man): Likewise.
55         (.INTERMEDIATE): Removed grmiregistry.pod.
56         (grmiregistry.pod): Removed.
57         * gcj.texi (Invoking gcjh): Removed.
58         (Invoking gjnih): Likewise.
59         (Invoking grmiregistry): Likewise.
60         (direntry): Updated.
61         (Top): Likewise.
62         (which-gcj): Removed.
64 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
66         * Make-lang.in: Add install-pdf target as copied from
67         automake v1.10 rules.
69 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
71         * gcj.texi: Standardize title page.
73 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
75         * class.c: Fix a comment typo.
77 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
78             Brooks Moses  <brooks.moses@codesourcery.com>
79             Lee Millward  <lee.millward@codesourcery.com>
81         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
82         of build3.
83         (BUILD_MONITOR_EXIT): Likewise.
85         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
86         (java_gimplify_modify_expr): Likewise.
88         * class.c (cache_this_class_ref): Use build_call_expr.
89         (build_static_field_ref): Likewise.
90         (emit_indirect_register_classes): Likewise.
91         (emit_register_classes): Likewise.
93         * resource.c (write_resource_constructor): Use build_call_expr.
95         * builtins.c (builtin_creator_function): Change interpretation of
96         the second parameter to be the whole CALL_EXPR instead of the arglist.
97         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
98         (min_builtin): Likewise.
99         (abs_builtin): Likewise.
100         (java_build_function_call_expr): Likewise.
101         (convert_real): Likewise.
102         (UNMARSHAL3): Likewise.
103         (UNMARSHAL4): Likewise.
104         (UNMARSHAL5): Likewise.
105         (build_arglist_for_builtin): Delete.  Fix callers to use
106         build_call_expr instead.
107         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
108         accessors.
109         (compareAndSwapInt_builtin): Likewise.
110         (compareAndSwapLong_builtin): Likewise.
111         (compareAndSwapObject_builtin): Likewise.
112         (putVolatile_builtin): Likewise.
113         (getVolatile_builtin): Likewise.
114         (VMSupportsCS8_builtin): Likewise.
115         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
116         instead of arglist.
118         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
119         (build_java_throw_out_of_bounds_exception): Likewise.
120         (java_check_reference): Likewise.
121         (build_java_arraystore_check): Likewise.
122         (build_newarray): Likewise.
123         (build_anewarray): Likewise.
124         (expand_java_multinewarray): Use build_call_list instead of build3.
125         (build_java_monitor): Use build_call_nary instead of build3.
126         (java_create_object): Likewise.
127         (expand_java_NEW): Likewise.
128         (build_instanceof): Likewise.
129         (expand_java_CHECKCAST): Likewise.
130         (build_java_soft_divmod): Likewise.
131         (build_java_binop): Likewise.
132         (build_field_ref): Likewise.
133         (build_class_init): Likewise.
134         (rewrite_arglist_getcaller): Use build_call_expr.
135         (build_invokeinterface):  Use build_call_nary instead of build3.
136         (expand_invoke): Use build_call_list instead of build3.
137         (build_jni_stub): Use build_call_nary, build_call_list, or
138         build_call_expr instead of build3.
139         (expand_java_field_op): Use build_call_expr instead of build3.
140         (force_evaluation_order): Use new CALL_EXPR accessors.
142         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
144 2007-02-15  David Daney  <ddaney@avtrex.com>
146         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
147         (java.maintainer-clean):Add gc-analyze.1.
148         (.INTERMEDIATE): Add gc-analyze.pod.
149         (gc-analyze.pod): New rule.
150         (java.install-man): Install gc-analyze.1
151         * gcj.texi: Add new section for the gc-analyze program.
153 2007-02-07  Andrew Haley  <aph@redhat.com>
155         * class.c (uncache_this_class_ref): New.
156         * expr.c (build_jni_stub): Initialize the class.
157         (expand_byte_code): Call uncache_this_class_ref after generating
158         code.
160 2007-02-06  Tom Tromey  <tromey@redhat.com>
162         PR java/30714:
163         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
165 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
167         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
169 2007-02-02  Andrew Haley  <aph@redhat.com>
171         * expr.c (expand_byte_code): Call cache_this_class_ref() and
172         cache_cpool_data_ref().
173         Set TYPE_CPOOL_DATA_REF.
174         (cache_cpool_data_ref): New function.
175         * constants.c (build_ref_from_constant_pool): Remove special-case
176         code for flag_indirect_classes.
177         (build_constant_data_ref): Move special-case code for
178         flag_indirect_classes here from build_ref_from_constant_pool.
179         * decl.c (finish_method): Move class initialization from here to
180         cache_this_class_ref.
181         * class.c (cache_this_class_ref): New function.
182         (build_class_ref): Use this_classdollar for the ouput class.
184 2007-02-02  David Daney  <ddaney@avtrex.com>
186         * class.c (is_compiled_class): Move check to avoid reloading
187         current class.
188         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
189         already set.
191 2007-02-01  Andrew Haley  <aph@redhat.com>
193         PR java/30641
194         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
196 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
198         * class.c, jcf-parse.c: Fix comment typos.
200 2007-01-30  Tom Tromey  <tromey@redhat.com>
202         * gcj.texi (Strings): Fix documentation for JvNewString.
204 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
206         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
207         typos.
209 2007-01-30  Ben Elliston  <bje@au.ibm.com>
211         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
213 2007-01-29  Tom Tromey  <tromey@redhat.com>
215         PR java/30607:
216         * jvspec.c (lang_specific_driver): Handle separate -I argument.
217         * lang.opt (-I): Add 'Separate'.
219 2007-01-29  Andrew Haley  <aph@redhat.com>
221         * class.c (add_method_1): Mark fndecl as external unless we are
222         compiling it into this object file.
224 2007-01-24  Andrew Haley  <aph@redhat.com>
226         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
227         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
229 2007-01-22  Andrew Haley  <aph@redhat.com>
231         * builtins.c (VMSupportsCS8_builtin): New function.
233 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
235         PR java/30454
236         * jcf-io.c (opendir_in_zip): Close the file
237         and free zipf before returning after an error.
239 2007-01-16  Tom Tromey  <tromey@redhat.com>
241         * java-tree.def: Added copyright header.
243 2007-01-15  Tom Tromey  <tromey@redhat.com>
245         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
246         case.
247         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
248         Removed case.
249         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
250         (EXPR_WFL_NODE): Likewise.
251         (EXPR_WFL_LINECOL): Likewise.
252         (EXPR_WFL_FILENAME): Likewise.
253         (EXPR_WFL_LINENO): Likewise.
254         (build_expr_wfl, expr_add_location): Don't declare.
255         (build_unknown_wfl): Removed.
256         (EXPR_WFL_FILENAME_NODE): Removed.
257         (EXPR_WFL_COLNO): Removed.
258         (EXPR_WFL_SET_LINECOL): Removed.
259         (DECL_FUNCTION_WFL): Removed.
260         (DECL_FIELD_FINAL_WFL): Removed.
261         (struct lang_decl_func) <wfl>: Removed field.
262         <called_constructor>: Likewise.
263         <inner_access>: Likewise.
264         (struct lang_decl_var) <wfl>: Removed field.
265         (DECL_CONSTRUCTOR_CALLS): Removed.
266         (DECL_FUNCTION_ACCESS_DECL): Likewise.
267         (DECL_FUNCTION_INNER_ACCESS): Likewise.
268         (DECL_SPECIFIC_COUNT): Likewise.
269         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
270         * expr.c (build_expr_wfl): Removed.
271         (expr_add_location): Likewise.
273 2007-01-12  Tom Tromey  <tromey@redhat.com>
275         * jcf-dump.c (main): Updated call to find_class.
276         * lang.c (java_init): Removed dead code.
277         * jcf-parse.c (read_class): Don't use java_source field.  Removed
278         dead code.
279         (parse_zip_file_entries): Don't use java_source field.
280         (process_zip_dir): Likewise.
281         (jcf_parse): Removed dead code.
282         (java_parse_file): Likewise.
283         (read_class): Updated call to find_class.
284         * jcf-io.c (find_class): Don't use java_source field.  Removed
285         'source_ok' argument, .java logic.
286         * jcf.h (JCF) <java_source>: Removed field.
287         (JCF_ZERO): Updated.    (find_class): Updated.
288         * decl.c: Removed dead code.
289         * class.c: Removed dead code.
291 2007-01-11  Tom Tromey  <tromey@redhat.com>
293         * typeck.c (convert): Don't use flag_emit_class_files.
294         * lang.c (java_post_options): Don't use flag_emit_class_files.
295         (java_handle_option): Don't use flag_extraneous_semicolon or
296         flag_redundant.
297         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
298         flag_emit_class_files.
299         (load_class): Likewise.
300         * java-tree.h (flag_emit_class_files): Don't declare.
301         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
302         (flag_extraneous_semicolon): Don't declare.
303         (flag_not_overriding): Likewise.
304         (flag_static_local_jdk1_1): Likewise.
305         (flag_redundant): Likewise.
306         * expr.c (build_newarray): Don't use flag_emit_class_files.
307         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
308         flag_emit_class_files.
309         (build_class_ref): Likewise.
310         * builtins.c (check_for_builtin): Don't use
311         flag_emit_class_files.
313 2007-01-10  Tom Tromey  <tromey@redhat.com>
315         * lang.c (java_can_use_bit_fields_p): Removed.
316         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
318 2007-01-09  Andrew Haley  <aph@redhat.com>
320         * expr.c (build_java_arrayaccess): Rewrite to generate array
321         access in canonical form.
322         (expand_java_arraystore): Use build_fold_addr_expr() on address of
323         array access.
325 2007-01-03  Andrew Haley  <aph@redhat.com>
327         PR java/28754
328         * expr.c (expand_java_field_op): If we're initializing a field's
329         declaring interface we should not also initialize the class
330         context in which it was referenced.
332 2007-01-02  Tom Tromey  <tromey@redhat.com>
334         * java-tree.h (compiling_from_source, current_encoding,
335         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
336         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
337         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
338         JTI_WFL_OPERATOR): Removed
339         (finit_identifier_node, instinit_identifier_node,
340         length_identifier_node, super_identifier_node,
341         continue_identifier_node, access0_identifier_node, wfl_operator):
342         Removed.
343         (cyclic_inheritance_report,
344         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
345         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
346         DECL_FIXED_CONSTRUCTOR_P): Removed.
347         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
348         Removed.
349         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
350         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
351         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
352         import_list, import_demand_list>: Removed.
353         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
354         cxx_keyword_p): Removed.
355         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
356         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
357         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
358         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
359         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
360         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
361         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
362         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
363         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
364         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
365         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
366         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
367         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
368         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
369         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
370         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
371         java_parse_abort_on_error, extract_field_decl): Removed.
372         (finput): Declare.
373         * lang.c: (compiling_from_source, current_encoding): Removed.
374         (java_handle_option): Ignore -fencoding.
375         * parse.h: Don't include lex.h.
376         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
377         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
378         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
379         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
380         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
381         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
382         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
383         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
384         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
385         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
386         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
387         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
388         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
389         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
390         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
391         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
392         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
393         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
394         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
395         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
396         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
397         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
398         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
399         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
400         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
401         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
402         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
403         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
404         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
405         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
406         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
407         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
408         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
409         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
410         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
411         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
412         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
413         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
414         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
415         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
416         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
417         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
418         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
419         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
420         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
421         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
422         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
423         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
424         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
425         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
426         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
427         SET_CPC_STATIC_INITIALIZER_STMT,
428         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
429         java_complete_class, java_check_circular_reference,
430         java_fix_constructors, java_layout_classes, java_reorder_fields,
431         java_method_add_stmt, java_get_line_col, reset_report,
432         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
433         java_finish_classes, ctxp, ctxp_for_generation,
434         ctxp_for_generation_last): Removed.
435         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
436         * mangle.c (utf8_cmp): New function.
437         (cxx_keywords): New global.
438         (cxx_keyword_p): New function.
439         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
440         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
441         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
442         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
443         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
444         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
445         * Make-lang.in (java.srcextra): Do nothing.
446         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
447         (JAVA_OBJS): Don't mention deleted files.
448         (java.mostlyclean): Likewise.
449         (java.clean): Likewise.
450         (JAVA_LEX_C): Removed.
451         (buffer.o, check-init.o, parse.o): Remove unused targets.
452         (typeck.o): Updated.
453         * jcf-parse.c (read_class): Comment out unused code.
454         (java_layout_seen_class_methods): New function.
455         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
456         Removed.
457         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
458         (init_jcf_parse): Removed.
459         * config-lang.in (gtfiles): Remove deleted files.
460         * decl.c (java_init_decl_processing): Don't initialize
461         finit_identifier_node, instinit_identifier_node,
462         length_identifier_node, super_identifier_node,
463         continue_identifier_node, access0_identifier_node.  Don't call
464         init_jcf_parse.
465         * class.c (cyclic_inheritance_report): New global.
466         (add_method_1): Don't use
467         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
468         (maybe_layout_super_class): Comment out code.
469         (safe_layout_class): New function.
470         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
471         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
472         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
473         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
474         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
475         (java_gimplify_case_expr): Removed.
476         (java_gimplify_default_expr): Likewise.
477         (java_gimplify_new_array_init): Likewise.
478         * parse.y: Removed.
479         * keyword.gperf, keyword.h: Removed.
480         * chartables.h: Removed.
481         * check-init.c: Removed.
482         * buffer.c, buffer.h: Removed.
483         * convert.h: Removed.
484         * gen-table.pl: Removed.
485         * lex.c, lex.h: Removed.
487 2007-01-02  Andrew Haley  <aph@redhat.com>
489         * expr.c (expand_java_arraystore): Make sure we perform a bounds
490         check at runtime before we perform a type check.
492 2006-12-19  Andrew Haley  <aph@redhat.com>
494         * decl.c: Bump minor BC ABI version.
496 2006-12-13  Gary Benson  <gbenson@redhat.com>
498         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
500 2006-12-12  Tom Tromey  <tromey@redhat.com>
502         * lang-specs.h: Pass -M options to jc1.
503         * jcf-depend.c (jcf_dependency_add_file): Don't emit
504         dependencies.
506 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
508         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
510 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
512         * lang-specs.h: Pass '%U'-based options as separate arguments.
514 2006-12-05  Tom Tromey  <tromey@redhat.com>
516         PR java/29495:
517         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
518         classes as well.
519         * class.c (add_field): Handle ACC_SYNTHETIC.
520         (add_method_1): Likewise.  Handle bridge and varargs.
521         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
522         annotation.
523         (set_class_decl_access_flags): Handle synthetic and annotation.
524         * java-tree.h (METHOD_BRIDGE): New macro.
525         (METHOD_VARARGS): Likewise.
526         (TYPE_SYNTHETIC): Likewise.
527         (TYPE_ANNOTATION): Likewise.
528         (lang_type): New fields 'synthetic' and 'annotation'.
529         (lang_decl_func): New fields 'varargs' and 'bridge'.
531 2006-12-04  Andrew Haley  <aph@redhat.com>
533         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
534         there's no map.
536 2006-11-29  Gary Benson  <gbenson@redhat.com>
538         * expr.c (rewrite_arglist_getcaller): Reorder.
540 2006-11-29  Andrew Haley  <aph@redhat.com>
542         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
543         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
545 2006-11-23  Andrew Haley  <aph@redhat.com>
547         * expr.c (rewrite_arglist_getcaller): New.
548         (rewrite_arglist_getclass): Fix indentation.
549         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
550         gnu.classpath.VMStackWalker.getCallingClassLoader().
551         * builtins.c (initialize_builtins): Remove duplicate def'n of
552         __sync_synchronize.
553         Add __builtin_return_address.
555 2006-11-22  Andrew Haley  <aph@redhat.com>
557         * jcf-reader.c (get_attribute): Mark attr_type unused.
559         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
561 2007-01-08  Richard Guenther  <rguenther@suse.de>
563         * lex.c (do_java_lex): Use build_int_cst_wide_type.
564         * jcf-parse.c (get_constant): Likewise.
566 2006-11-12  Jan Hubicka  <jh@suse.cz>
568         * resource.c (compile_resource_data): Update for new varpool names.
569         * java/class.c (build_utf8_ref): Likewise.
571 2006-11-12  David Daney  <ddaney@avtrex.com>
573         PR java/29805
574         * typeck.c (build_java_array_type): Increase buffer sizes.
576 2006-11-11  Richard Guenther  <rguenther@suse.de>
578         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
579         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
581 2006-11-06  Andrew Haley  <aph@redhat.com>
583         * java-tree.h (CONSTANT_LazyFlag): New.
584         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
585         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
586         reflection_data.
587         (handle_constant): Return 0 for dummy cpool entries.
588         Handle constants of kind Class.
589         Handle constants of kind NameAndType.
590         (handle_enclosingmethod_attribute): New.
591         (handle_signature_attribute): New.
592         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
593         (HANDLE_SIGNATURE_ATTRIBUTE): New.
594         (handle_constant): Use unmangle_classname()rather than calling
595         identifier_subst() directly.
597 2006-11-02  Andrew Haley  <aph@redhat.com>
599         * java-tree.h (FIELD_ENUM): New.
600         (lang_decl_var.field_enum): New.
601         (lang_type.enum_class): New.
602         (CLASS_ENUM): New.
603         * class.c (set_class_decl_access_flags): Handle enum types.
604         (add_field): Handle enum fields.
605         (get_access_flags_from_decl): Likewise.
607         * class.c (make_class_data): Put reflection_data into rodata.
609 2006-11-01  Andrew Haley  <aph@redhat.com>
611         * jcf-parse.c (field_offsets, bit_obstack): New variables.
612         (jcf_parse): Write end marker to annotation_data.
613         (java_parse_file): Create field_offsets bitmap.  Destroy it.
614         (annotation_grow, annotation_rewrite_byte) 
615         (annotation_rewrite_short, annotation_rewrite_int) 
616         (annotation_read_short, annotation_write_byte) 
617         (annotation_write_short, annotation_write_int) 
618         (handle_long_constant, handle_constant, handle_element_value) 
619         (handle_annotation, handle_annotations) 
620         (handle_annotation_attribute, rewrite_reflection_indexes) 
621         (handle_member_annotations, handle_parameter_annotations) 
622         (handle_default_annotation): New functions.
623         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
624         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
625         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
626         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
627         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
628         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
629         (TYPE_REFLECTION_DATA): New.
630         (TYPE_REFLECTION_DATASIZE): New.
631         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
632         an enum.
633         * jcf-reader.c (get_attribute): Pass field/method index and
634         attribute type to get_attribute().
635         * constants.c (find_class_or_string_constant): Make nonstatic.
636         (cpool_for_class): Likewise.
637         (build_constants_constructor): Separate string and scalar types.
638         * class.c (make_class_data): Generate field_indexes permutation.
639         Pass it to rewrite_reflection_indexes().
640         (make_class_data): Generate constructor for reflection_data field.
642 2006-10-20  Tom Tromey  <tromey@redhat.com>
644         * gcj.texi (Top): Don't mention jv-scan.
645         (Invoking gcj): Likewise.
646         (Invoking gcjh): Likewise.
647         (Invoking gjnih): Likewise.
648         (Invoking gij): Likewise.
649         (Invoking gcj-dbtool): Likewise.
650         (Invoking jv-scan): Removed.
651         * parse-scan.y: Removed.
652         * jv-scan.c: Removed.
653         * config-lang.in (stagestuff): Don't mention jv-scan.
654         * Make-lang.in (java): Removed jv-scan.
655         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
656         (JVSCAN_OBJS): Removed.
657         (jv-scan$(exeext)): Likewise.
658         (JAVA_MANFILES): Removed jv-scan.1.
659         (java.uninstall): Don't mention jv-scan.
660         (java.mostlyclean): Likewise.
661         (java.maintainer-clean): Likewise.
662         (.INTERMEDIATE): Likewise.
663         (java/jv-scan.o): Removed.
664         (jv-scan.pod): Likewise.
665         (java.srcextra): Don't mention parse-scan.c.
666         (java.mostlyclean): Likewise.
667         (java/parse-scan.c): Removed.
668         (java/parse-scan.o-warn): Removed.
669         (java/parse-scan.o): Removed.
671 2006-10-20  Tom Tromey  <tromey@redhat.com>
673         * lang.c (java_handle_option): Don't use
674         jcf_write_base_directory.
675         * jcf.h (jcf_write_base_directory): Removed.
676         * parse.y (java_expand_classes): Don't call write_classfile.
677         * config-lang.in (gtfiles): Removed jcf-write.c.
678         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
679         (java/jcf-write.o): Removed.
680         * jcf-parse.c (parse_class_file): Don't call write_classfile.
681         * java-tree.h (write_classfile): Removed declaration.
682         * jcf-write.c: Removed.
684 2006-10-20  Tom Tromey  <tromey@redhat.com>
686         * Make-lang.in (java): Removed gjnih, gcjh.
687         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
688         (GCJH_OBJS): Removed.
689         (GJNIH_OBJS): Likewise.
690         (gjnih$(exeext)): Likewise.
691         (gcjh$(exeext)): Likewise.
692         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
693         (java.install-common): Don't special case gcjh.
694         (java.uninstall): Don't mention gcjh, gjnih.
695         (java.mostlyclean): Likewise.
696         (java.maintainer-clean): Likewise.
697         (.INTERMEDIATE): Likewise.
698         (gcjh.pod): Removed.
699         (gjnih.pod): Likewise.
700         (GCJH_TARGET_INSTALL_NAME): Removed.
701         (java/gjavah-jni.o): Removed.
702         (java/gjavah.o): Likewise.
703         * config-lang.in (stagestuff): Removed gjnih, gcjh.
704         * gjavah.c: Removed.
706 2006-10-17  Tom Tromey  <tromey@redhat.com>
708         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
709         "string" case.
711 2006-10-17  Tom Tromey  <tromey@redhat.com>
713         * jvgenmain.c (main): Handle -findirect-dispatch.
714         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
715         jvgenmain.
717 2006-10-06  Andrew Haley  <aph@redhat.com>
719         * builtins.c (compareAndSwapInt_builtin): Check that we really do
720         have a compare_and_swap builtin.
721         (compareAndSwapLong_builtin): Likewise.
722         (compareAndSwapObject_builtin): Likewise.
724 2006-10-04  Andrew Haley  <aph@redhat.com>
726         * builtins.c (java_builtins): Add compareAndSwapInt,
727         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
728         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
729         putObjectVolatile, getObjectVolatile, getIntVolatile,
730         getLongVolatile, getLong.
731         (UNMARSHAL3): New macro.
732         (UNMARSHAL4): Likewise.
733         (UNMARSHAL5): Likewise.
734         (build_arglist_for_builtin): New function.
735         (build_addr_sum, build_check_this): New functions.
736         (putObject_builtin. compareAndSwapInt_builtin,
737         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
738         putVolatile_builtin, getVolatile_builtin): New builtins.
740 2006-06-08  Andrew Haley  <aph@redhat.com>
742         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
743         get_symbol_table_index().
744         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
745         private method.
746         (build_known_method_ref): New arg: special.  Pass it to
747         get_symbol_table_index.
748         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
749         the method list.
750         (build_invokevirtual): New arg: special.  Pass it to
751         get_symbol_table_index.
752         (expand_invoke): New variable: special.
753         Pass it to maybe_rewrite_invocation().
754         Pass it to build_known_method_ref().
755         * class.c (build_symbol_entry): Add new arg: special.  Use it to
756         build the symbol table conbstructor.
757         (emit_symbol_table): Extract SPECIAL from the method list and pass
758         it to build_symbol_entry().
759         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
760         special accordingly.
762 2006-09-08  Andrew Haley  <aph@redhat.com>
764         * class.c (layout_class_method): Use build_java_signature, not
765         build_java_argument_signature.  Use lookup_java_method, not
766         lookup_argument_method.
768 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
769             Bryce McKinlay  <bryce@mckinlay.net.nz>
771         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
773 2006-07-18  Tom Tromey  <tromey@redhat.com>
775         * lang.opt: Added missing -W options.
777 2006-07-12  Tom Tromey  <tromey@redhat.com>
779         PR java/28329:
780         * lang-specs.h: Pass '%U'-based options as separate arguments.
781         Use -faux-classpath.
782         * lang.c (java_handle_option): Handle OPT_faux_classpath.
783         * lang.opt (faux-classpath): New option.
785 2006-07-07  Tom Tromey  <tromey@redhat.com>
787         * class.c (make_class_data): Set value for reflection_data field.
788         * decl.c (java_init_decl_processing): Add reflection_data field.
790 2006-07-07  Tom Tromey  <tromey@redhat.com>
792         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
793         earlier.
794         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
796 2006-07-07  Andrew Haley  <aph@redhat.com>
798         * jcf-parse.c (set_source_filename): Don't check for
799         CLASS_FROM_CURRENTLY_COMPILED_P.
800         Remove // comments.
802 2006-07-07  Andrew Haley  <aph@redhat.com>
804         * java-tree.h (java_read_sourcefilenames): Declare.
805         * lang.c (java_handle_option): Call java_read_sourcefilenames().
806         * lang.opt (fsource-filename): New opt.
807         * lang-specs.h: Add -fsource-filename.
808         * jcf-parse.c (num_files, filenames): New variables.
809         (reverse, cmpstringp, java_read_sourcefilenames,
810         find_sourcefile): New.
811         (set_source_filename): Call find_sourcefile to find the real name
812         of a source file.
814 2006-06-27  Tom Tromey  <tromey@redhat.com>
816         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
817         Signature, LocalVariableTypeTable, annotation attributes.
818         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
819         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
820         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
821         (HANDLE_METHOD): Likewise.
822         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
823         (print_annotation): New function.
824         (print_element_value): Likewise.
825         (indent): Likewise.
826         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
827         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
828         (print_parameter_annotations): New function.
829         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
830         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
831         Likewise.
832         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
833         (print_annotations): New function.
835 2006-06-23  Tom Tromey  <tromey@redhat.com>
837         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
838         emitting class files, always use 1.5.
839         * gcj.texi (Input Options): Document -fsource.
840         (Code Generation): Document -ftarget.
842 2006-06-21  Tom Tromey  <tromey@redhat.com>
844         PR java/28089:
845         * expr.c (expand_java_field_op): Initialize field's declaring
846         class.
848 2006-06-20  Tom Tromey  <tromey@redhat.com>
850         * expr.c (push_value): Always flush quick stack.
852 2006-06-19  Tom Tromey  <tromey@redhat.com>
854         * expr.c (push_value): Also flush quick stack if value is a
855         component_ref.
857 2006-06-19  Tom Tromey  <tromey@redhat.com>
859         * expr.c (push_value): Flush quick stack if value has side
860         effects.
862 2006-06-13  Tom Tromey  <tromey@redhat.com>
864         * class.c (is_compiled_class): Explicitly check for current
865         class.
867 2006-06-09  Tom Tromey  <tromey@redhat.com>
869         * gjavah.c (decompile_method): Don't decompile a static field
870         accessor method.
872 2006-06-06  Tom Tromey  <tromey@redhat.com>
874         * lang-specs.h <jc1>: Add .jar file to command line if
875         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
877 2006-06-05  Tom Tromey  <tromey@redhat.com>
879         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
880         synthetic, enum, annotation.
881         * jcf.h (ACC_BRIDGE): New macro.
882         (ACC_VARARGS): Likewise.
883         (ACC_SYNTHETIC): Likewise.
884         (ACC_ENUM): Likewise.
885         (ACC_ANNOTATION): Likewise.
887 2006-06-04  Tom Tromey  <tromey@redhat.com>
889         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
890         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
891         and -ftarget.
892         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
893         when needed.  Handle classpath-setting.
894         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
895         * lang-specs.h: Rewrote.
897 2006-06-04  Tom Tromey  <tromey@redhat.com>
899         * jcf-io.c (find_class): Set source_ok to 0.
900         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
901         (parse_class_file): Don't call java_mark_class_local.
902         (java_parse_file): Skip .java files.  Call java_mark_class_local
903         before lowering any code.
904         (parse_zip_file_entries): Don't call duplicate_class_warning
905         here.
906         (process_zip_dir): ... call it here.
907         * class.c (add_field): Don't mark field external if it is being
908         compiled into this object.
909         (make_class_data): Handle situation where class_dtable_decl is
910         created before Class is compiled.
911         (is_compiled_class): Don't assume files in zip are compiled into
912         this object.
913         (layout_class_method): Don't mark method external if it is being
914         compiled into this object.
916 2006-06-04  Tom Tromey  <tromey@redhat.com>
918         * jcf-path.c (jcf_path_compute): New function.
919         * jcf.h (jcf_path_compute): Declare.
921 2006-10-23 Rafael Avila de Espindola  <rafael.espindola@gmail.com>
923         * decl.c: Include langhooks.h.
924         (builtin_function): Remove.
925         (java_init_decl_processing): Replace calls to builtin_function
926         with add_builtin_function.
927         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
928         (java/decl.o): Depend on langhooks.h.
929         * java-tree.h (builtin_function): Remove.
931 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
933         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
935 2006-09-12  Tom Tromey  <tromey@redhat.com>
937         * expr.c (push_value): Always flush quick stack.
939 2006-09-12  Tom Tromey  <tromey@redhat.com>
941         PR java/29013:
942         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
943         the push of the called method's return result.
945 2006-09-12  Tom Tromey  <tromey@redhat.com>
947         * jvspec.c (lang_specific_driver): Read spec file even if
948         -fsyntax-only.
950 2006-09-12  Tom Tromey  <tromey@redhat.com>
952         PR java/28754:
953         * expr.c (expand_java_field_op): Initialize field's declaring
954         interface if necessary.
956 2006-09-12  Tom Tromey  <tromey@redhat.com>
958         PR java/28892:
959         * expr.c (expand_java_field_op): No error for assignments not in
960         class initializer or constructor.
962 2006-08-22  Andrew Haley  <aph@redhat.com>
964         * decl.c (java_add_stmt): Give the statement list a type.
966 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
967             Bryce McKinlay  <bryce@mckinlay.net.nz>
969         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
971 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
973         PR java/8923
974         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
975         or '--' is used with a constant operand.
976         (java_complete_lhs): When processing a '++' or '--' expression,
977         don't call java_complete_tree but java_complete_lhs, so that a
978         static final variable operand is never replaced by its value. This
979         avoids an ICE later on.
980         (patch_unaryop): Fixed typo in comment.
982 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
984         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
986 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
988         * builtins.c (check_for_builtin): If a builtin could result in a
989         direct call being generated, don't use it if flag_indirect_dispatch
990         is set.
992 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
994         * gcj.texi (Invocation): Corrections for Invocation API example.
996 2006-07-04  Andrew Haley  <aph@redhat.com>
998         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
999         entry.
1001 2006-06-21  Andrew Haley  <aph@redhat.com>
1003         * java-tree.h (update_aliases): Remove
1004         * expr.c (expand_iinc): Remove call to update_aliases().
1005         (STORE_INTERNAL): Likewise.
1006         * decl.c (update_aliases, initialize_local_variable) 
1007         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1009 2006-06-19  Andrew Haley  <aph@redhat.com>
1011         PR java/1305
1012         PR java/27908
1013         * expr.c (java_modify_addr_for_volatile): New function.
1014         (expand_java_field_op): Handle volatile fields.
1015         * java-gimplify.c (java_gimplify_component_ref): Call
1016         java_modify_addr_for_volatile to give the field_ref the correct
1017         volatile type.
1018         (java_gimplify_modify_expr): Likewise.
1019         * java-tree.h (java_modify_addr_for_volatile): New decl.
1021 2006-06-17  Karl Berry  <karl@gnu.org>
1023         * gcj.texi (@dircategory): Use "Software development" instead
1024         of "Programming", following the Free Software Directory.
1026 2006-06-16  Andrew Haley  <aph@redhat.com>
1028         * class.c (make_class_data): When using flag_indirect_classes,
1029         don't initialize the vtable of Class instances.
1031 2006-06-09  Andrew Haley  <aph@redhat.com>
1033         PR java/1305
1034         PR java/27908
1035         * builtins.c (initialize_builtins): Add __sync_synchronize().
1036         * class.c (add_field): Mark volatile fields.
1037         * java-gimplify.c (java_gimplify_expr): Call new functions to
1038         handle self-modifying exprs and COMPONENT_REFs.
1039         (java_gimplify_component_ref): New.
1040         (java_gimplify_modify_expr): Add handling for volatiles.
1042 2006-06-08  Tom Tromey  <tromey@redhat.com>
1044         * gcj.texi (libgcj Runtime Properties): Document
1045         gnu.gcj.user.realname.
1047 2006-06-08  Andrew Haley  <aph@redhat.com>
1049         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1050         get_symbol_table_index().
1051         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1052         private method.
1053         (build_known_method_ref): New arg: special.  Pass it to
1054         get_symbol_table_index.
1055         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1056         the method list.
1057         (build_invokevirtual): New arg: special.  Pass it to
1058         get_symbol_table_index.
1059         (expand_invoke): New variable: special.
1060         Pass it to maybe_rewrite_invocation().
1061         Pass it to build_known_method_ref().
1062         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1063         build the symbol table conbstructor.
1064         (emit_symbol_table): Extract SPECIAL from the method list and pass
1065         it to build_symbol_entry().
1066         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1067         special accordingly.
1069 2006-06-06  David Daney  <ddaney@avtrex.com>
1071         * gcj.texi (libgcj Runtime Properties): Document
1072         gnu.gcj.runtime.NameFinder.show_raw and
1073         gnu.gcj.runtime.NameFinder.remove_unknown.
1075 2006-06-06  Tom Tromey  <tromey@redhat.com>
1077         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1078         synthetic, enum, annotation.
1079         * jcf.h (ACC_BRIDGE): New macro.
1080         (ACC_VARARGS): Likewise.
1081         (ACC_SYNTHETIC): Likewise.
1082         (ACC_ENUM): Likewise.
1083         (ACC_ANNOTATION): Likewise.
1085 2006-06-06  Mike Stump  <mrs@apple.com>
1087         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1088         installing during build.
1090 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
1092         * gcj.texi (Extensions): Document the new gcj-dbtool-based
1093         classname-to-library resolution mechanism.
1094         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1095         mechanism deprecated.
1096         (libgcj Runtime Properties): Document
1097         gnu.gcj.runtime.VMClassLoader.library_control's new default.
1099 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
1101         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1102         bit wide type.
1103         (jword): Define to uint64 on 64-bit arches.
1104         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1106 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
1108         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1109         typos.
1111 2006-05-26  Tom Tromey  <tromey@redhat.com>
1113         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1114         * verify-glue.c (vfy_class_type): New function.
1115         * verify-impl.c (check_constant): Allow 'ldc class'.
1116         * verify.h (vfy_class_type): Declare.
1118 2006-05-25  Andrew Haley  <aph@redhat.com>
1120         PR java/27756
1121         * decl.c (maybe_pushlevels): When variable ranges are non-nested
1122         update all lifetimes, not just the first one.
1124 2006-05-24  Tom Tromey  <tromey@redhat.com>
1126         * java-tree.h: Fixed flag documentation.
1128 2006-05-24  Tom Tromey  <tromey@redhat.com>
1130         PR libgcj/27729:
1131         * jcf.h (ACC_INVISIBLE): Changed value.
1133 2006-05-24  Andrew Haley  <aph@redhat.com>
1135         PR java/27754
1136         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1137         COMPOUND_EXPR.
1139 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1141         * lang.opt (femit-class-file): Remove VarExists.
1143 2006-05-16  Tom Tromey  <tromey@redhat.com>
1145         * verify-impl.c (verify_instructions_0) <op_return>: Special case
1146         for Object.<init>.
1148 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1150         PR driver/26885
1151         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1152         $(GCC_OBJS).
1154 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1156         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1157         (java/expr.o): Replace target.h with $(TARGET_H).
1158         (java/parse.o): Likewise.
1160 2006-05-10  Andrew Haley  <aph@redhat.com>
1162         * class.c (emit_indirect_register_classes): Fix comment.
1164 2006-05-04  Tom Tromey  <tromey@redhat.com>
1166         * java-tree.h (uses_jv_markobj_p): Declare.
1167         * class.c (uses_jv_markobj_p): Removed.
1168         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1169         (get_boehm_type_descriptor): Use it.
1170         (uses_jv_markobj_p): Moved from class.c.  Return bool.
1172 2006-05-04  Tom Tromey  <tromey@redhat.com>
1174         * java-tree.def (THIS_EXPR): Now a tcc_expression.
1176 2006-05-04  Andrew Haley  <aph@redhat.com>
1178         * class.c (make_field_value): Always build_address_of fdecl if
1179         there is an initializer.
1181 2006-05-03  Andrew Haley  <aph@redhat.com>
1183         PR libgcj/27352
1184         * expr.c (maybe_rewrite_invocation): New function.
1185         (rewrite_arglist_getclass): Likewise.
1186         (rules): New.
1187         (expand_invoke): Call maybe_rewrite_invocation.
1188         * parse.y (patch_invoke): Likewise.
1189         * java-tree.h: (maybe_rewrite_invocation): New function.
1191 2006-04-21  Andrew Haley  <aph@redhat.com>
1193         * lang.c (java_init): Handle flag_indirect_classes.
1194         * jvgenmain.c: Use "class$$" instead of "class$".
1195         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1196         DECLs.
1197         (mangle_class_field): Special case "class$$" as well as "class$".
1198         * constants.c (build_ref_from_constant_pool): If
1199         flag_indirect_classes, generate a ref into the heap.
1200         * decl.c (constants_field_decl_node,
1201         constants_data_field_decl_node): New.
1202         * class.c (build_static_class_ref): New.
1203         (build_classdollar_field): Factor out from build_class_ref().
1204         (make_field_value): Handle static fields in heap.
1205         (make_class_data): Make sure we get a static ref to class.
1206         Make class initializer const if flag_indirect_classes.
1207         (register_class): Build a class_ref for initialization if
1208         flag_indirect_classes.
1209         (emit_indirect_register_classes): New.
1211 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1213         * expr.c, gjavah.c: Fix comment typos.
1215 2006-04-03  Andrew Haley  <aph@redhat.com>
1217         PR java/26858
1218         * expr.c (build_field_ref): Don't check the field offset if
1219         flag_syntax_only.
1221 2006-03-30  Andrew Haley  <aph@redhat.com>
1223         PR java/26858
1224         * lang.c (java_attribute_table): New.
1225         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1226         * expr.c (build_field_ref): Add a null pointer check for all
1227         fields of offset > 4k.  Don't do so for accesses via the this
1228         pointer, which we know can never be null.
1229         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1230         methods nonnull.
1232 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1234         * Make-lang.in: Rename docdir to gcc_docdir.
1236 2006-03-30  Tom Tromey  <tromey@redhat.com>
1238         PR java/26042:
1239         * parse.y (java_reorder_fields): Reset superclass field's size as
1240         well.
1242 2006-03-28  Tom Tromey  <tromey@redhat.com>
1244         PR java/26390:
1245         * parse.y (find_most_specific_methods_list): Added 'class'
1246         argument.
1247         (lookup_method_invoke): Updated.
1249 2006-03-15  Tom Tromey  <tromey@redhat.com>
1251         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1252         non-static method calls.
1254 2006-03-15  David Daney  <ddaney@avtrex.com>
1256         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1257         declaration.
1259 2006-03-15  David Daney  <ddaney@avtrex.com>
1261         * lang.opt (-freduced-reflection): New option.
1262         * lang.c (java_post_options): Generate an error if
1263         -freduced-reflection used with -fjni or -findirect-dispatch.
1264         * java-tree.h (flag_reduced_reflection): Declare new variable.
1265         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1266         if bitmap overflows and flag_reduced_reflection set.
1267         * class.c (uses_jv_markobj_p): New function.
1268         (make_class_data): Moved generation of vtable to before
1269         reflection data, generate less reflection data if
1270         flag_reduced_reflection set.
1271         * gcj.texi: Document -freduced-reflection.
1273 2006-03-15  Tom Tromey  <tromey@redhat.com>
1275         PR java/26638:
1276         * class.c (get_interface_method_index): Don't put <clinit> into
1277         interface table.
1279 2006-03-15  Tom Tromey  <tromey@redhat.com>
1281         * parse.y (analyze_clinit_body): Ignore empty statements.
1283 2006-03-08  David Daney  <ddaney@avtrex.com>
1285         * gcj.texi: Document -static-libgcj option.
1287 2006-02-20  Andrew Haley  <aph@redhat.com>
1289         * jcf-parse.c (parse_class_file): Set input_location from
1290         current_class.
1292 2006-02-15  Andrew Haley  <aph@redhat.com>
1294         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1295         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1296         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1298 2006-02-09  Andrew Haley  <aph@redhat.com>
1300         PR java/26192
1301         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1302         in their superclass.
1304         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1305         array types.
1306         
1307 2006-02-08  Tom Tromey  <tromey@redhat.com>
1309         PR java/22578:
1310         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1311         * builtins.c (convert_real): New function.
1312         (java_builtins): Handle Float.intBitsToFloat,
1313         Float.floatToRawIntBits, Double.longBitsToDouble,
1314         Double.doubleToRawLongBits.
1316 2006-02-07  Andrew Haley  <aph@redhat.com>
1318         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1319         class other than the one in which we expected to find it, ignore
1320         the result.
1322         PR java/25535
1323         * constants.c (build_constants_constructor): move initializer into
1324         first halfword on a 64-bit big-endian machine.
1326 2006-02-04  Tom Tromey  <tromey@redhat.com>
1328         PR java/25676:
1329         * builtins.c (max_builtin): Skip floating point 'max'.
1330         (min_builtin): Skip floating point 'min'.
1331         (check_for_builtin): Never return NULL_TREE.
1333 2006-02-04  Tom Tromey  <tromey@redhat.com>
1335         PR java/26097:
1336         * expr.c (push_type): Avoid side effect in gcc_assert.
1338 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1340         * decl.c (java_init_decl_processing): Create char_type_node as a
1341         regular INTEGER_TYPE node.
1342         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1343         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1344         test for char_type_node and promoted_char_type_node as special
1345         instances of INTEGER_TYPE tree codes.
1346         (promote_type,build_java_signature): Likewise.
1347         * jcf-write.c (adjust_typed_op): Likewise.
1348         * mangle.c (mangle_type): Likewise.
1349         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1350         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1352 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1354         * expr.c (java_stack_swap): Revert gcc_assert patch.
1356 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1358         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1359         * typeck.c: Likewise.
1360         * verify-impl.c: Likewise.
1361         * class.c: Likewise.
1362         * decl.c: Likewise.
1363         * jcf-parse.c: Likewise.
1364         * constants.c: Likewise.
1365         * check-init.c: Likewise.
1366         * jcf-write.c: Likewise.
1367         * verify-glue.c: Likewise.
1368         * mangle.c: Likewise.
1369         * expr.c: Likewise.
1370         * lang.c: Likewise.
1371         * boehm.c: Likewise.
1373 2006-02-01  Jan Hubicka  <jh@suse.cz>
1375         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1376         * lang.c (java_init_options): Set no_unit_at_a_time_default.
1378 2006-01-30  Andrew Haley  <aph@redhat.com>
1380         PR java/21428
1381         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1383 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1385         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1386         Update copyright notice dates.
1388 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1390         * jvspec.c (lang_specific_spec_functions): Remove.
1392 2006-01-06  Tom Tromey  <tromey@redhat.com>
1394         * gcj.texi (Arrays): Added more documentation for
1395         JvNewObjectArray.
1396         (Primitive types): Correct information about primitive classes.
1397         (Reference types): New node.
1398         (Index): New node.
1400 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
1402         * jcf-parse.c (set_source_filename): Set the decl source location
1403         even when returning early.
1405 2005-12-15  Tom Tromey  <tromey@redhat.com>
1406             Andrew Haley  <aph@redhat.com>
1408         PR java/25429
1409         * parse.y (resolve_expression_name): Don't generate accessor
1410         methods for constant fields.
1412 2005-12-13  Andrew Haley  <aph@redhat.com>
1414         PR java/25366
1415         PR java/25368
1416         * class.c (maybe_layout_super_class): Update current_class before
1417         calling do_resolve_class.
1419 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
1421         PR java/25330
1422         * jcf-write.c (write_classfile): Use PID in temporary class
1423         file. Save/restore errno when reporting error.
1425 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1427         PR java/9861
1428         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1429         to bare_function_type and including the return type
1430         * builtins.c (initialize_builtins) : Change builtin mangled name
1431         constants to conform to new mangling scheme
1433 2005-12-08  Andrew Haley  <aph@redhat.com>
1435         PR libgcj/25265
1436         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1437         (soft_abstractmethod_node): New.
1438         * expr.c (build_field_ref): Add in-line check for missing field.
1439         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1441 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1443         * Make-lang.in (java.all.build, java.install-normal): Remove.
1445 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1447         * Make-lang.in: Remove all dependencies on s-gtype, except for
1448         gt-java-parse.h.
1450 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
1452         * class.c (build_utf8_ref, emit_register_classes): Use
1453         switch_to_section and get_section.
1455 2005-12-06  Tom Tromey  <tromey@redhat.com>
1457         PR java/25283:
1458         * parse.y (patch_new_array_init): Revert previous patch.
1459         (lookup_method_invoke): Use size-less array type when creating an
1460         anonymous constructor.
1462 2005-12-05  Tom Tromey  <tromey@redhat.com>
1464         * parse.y (patch_new_array_init): Don't set length on array.
1466 2005-12-02  Richard Guenther  <rguenther@suse.de>
1468         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1469         buildN instead of build.
1470         * class.c (finish_class): Likewise.
1471         * expr.c (java_create_object): Likewise.
1473 2005-11-28  Tom Tromey  <tromey@redhat.com>
1475         PR java/18278:
1476         * expr.c (build_jni_stub): Unwrap the return value.
1477         * java-tree.h (soft_unwrapjni_node): New define.
1478         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1479         * decl.c (java_init_decl_processing): Initialize
1480         soft_unwrapjni_node.
1482 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
1484         * gcj.texi (gij options): Add -Xss documentation.
1486 2005-11-08  Wil Mahan  <wmahan@gmail.com>
1488         PR java/23617
1489         * zextract.c (read_zip_archive): Fix out of memory error when
1490         reading jar files with zip-style comments.
1492 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
1494         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1495         formats.
1496         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1498 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1499             Wil Mahan <wmahan@gmail.com>
1501         PR java/23620
1502         * class.c (make_class): Create empty binfo here.
1503         (set_super_info): Only create binfo if we have superclasses.
1505 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
1507         PR java/24127
1508         * parse.y (method_header): Make the result of the rule a NULL_TREE
1509         when a parsing error occurs.
1511 2005-09-29  Tom Tromey  <tromey@redhat.com>
1513         PR java/24120:
1514         * jcf-io.c (memoized_dirlist_hash): New function.
1515         (caching_stat): Use it.
1517 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
1519         PR java/21418
1520         * class.c (inherits_from_p): Try to lay out super class
1521         if it is not already laid out.
1522         (maybe_layout_super_class): Handle the case where SUPER_CLASS
1523         is a NULL_TREE.
1525 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
1527         * builtins.c (max_builtin, min_builtin, abs_builtin,
1528         java_build_function_call_expr): Use fold_buildN.
1529         * class.c (layout_class_method): Likewise.
1530         * expr.c (java_truthvalue_conversion, build_java_jsr,
1531         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1532         build_java_binop, build_field_ref, expand_compare,
1533         build_known_method_ref, build_invokevirtual,
1534         process_jvm_instruction): Likewise.
1535         * parse.y (patch_binop, patch_exit_expr): Likewise.
1536         * typeck.c (convert_ieee_real_to_integer): Likewise.
1537         (convert): Don't call fold after convert_ieee_real_to_integer.
1539 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
1541         PR java/23891
1542         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1543         the newly created type. Set import lists here, not in create_class.
1544         (jdep_resolve_class): Set current_class.
1545         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
1546         the current package context, not ctxp->package.
1547         (cicp_cache): Removed.
1548         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
1549         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
1550         * java-tree.h (TYPE_PACKAGE): New macro.
1551         (struct lang_type): New member 'package'.
1553 2005-09-09  Andrew Haley  <aph@redhat.com>
1555         PR libgcj/23182 
1556         * expr.c (pop_type_0): If the expected type is object or ptr
1557         (i.e. void*), return the type of the object we just popped from
1558         the stack.
1560 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
1562         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1563         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1565 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
1567         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
1568         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
1569         typos.  Follow spelling conventions.
1571 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
1573         PR java/23431
1574         * typeck.c (lookup_do): Look up interfaces for the original class,
1575         not the base class.
1576         * parse.y (java_check_regular_methods): Fix diagnostic message for
1577         more restrictive overriding of a method from an interface.
1579 2005-08-16  Tom Tromey  <tromey@redhat.com>
1581         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1582         class' initial state.
1584 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1586         PR java/22113
1587         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1588         `literal_token' for large numeric input tokens.
1590 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1592         PR java/19870
1593         * parse.y (nested_field_access_p): Rename to nested_member_access_p
1594         and expand to handle method accesses across nested classes.
1595         (build_outer_method_access_method): Rename to
1596         build_nested_method_access_method.  Minor adjustments to comments.
1597         (resolve_expression_name): Use the newly-renamed
1598         nested_member_access_p method.
1599         (resolve_qualified_expression_name): Likewise.
1600         (patch_method_invocation): Also consider static methods for access
1601         method generation.  Minor adjustments to comments.
1602         (maybe_use_access_method): Use the more general
1603         nested_memeber_access_p to determine access across nested class
1604         boundaries.  Allow THIS_ARG to be NULL (for static methods).
1606 2005-08-15  Tom Tromey  <tromey@redhat.com>
1608         PR java/23300.
1609         * expr.c (build_field_ref): Don't generate otable reference when
1610         DECL_FIELD_OFFSET is 0.
1611         * class.c (maybe_layout_super_class): Pass outer class to
1612         do_resolve_class.
1614 2005-08-15  Tom Tromey  <tromey@redhat.com>
1616         * java-tree.h (LABEL_IN_SUBR): Removed.
1617         (LABEL_IN_SUBR): Likewise.
1618         (LABEL_IS_SUBR_START): Likewise.
1619         (LABEL_SUBR_START): Likewise.
1620         (LABEL_SUBR_CONTEXT): Likewise.
1621         (LABEL_CHANGED): Likewise.
1622         (LABEL_RETURN_LABEL): Likewise.
1623         (LABEL_RETURN_TYPE_STATE): Likewise.
1624         (LABEL_RETURN_LABELS): Likewise.
1625         (RETURN_MAP_ADJUSTED): Likewise.
1626         (LABEL_PENDING_CHAIN): Likewise.
1628 2005-08-15  Tom Tromey  <tromey@redhat.com>
1630         * Make-lang.in (JAVA_OBJS): Removed verify.o
1631         (java/verify.o): Removed.
1632         * verify.c: Removed.
1633         * lang.c (flag_new_verifier): Removed.
1634         (java_post_options): Updated.
1635         * java-tree.h (flag_new_verifier): Removed.
1636         (verify_jvm_instructions): Removed.
1637         * expr.c (pop_type_0): Assume flag_new_verifier is true.
1638         (build_java_check_indexed_type): Likewise.
1639         (expand_java_arraystore): Likewise.
1640         (expand_java_arrayload): Likewise.
1641         (pop_arguments): Likewise.
1642         (expand_byte_code): Likewise.
1643         (process_jvm_instruction): Likewise.
1645 2005-08-10  Andrew Haley  <aph@redhat.com>
1647         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1648         type mismatches to make legal GIMPLE.
1650 2005-08-10  Robin Green <greenrd@greenrd.org>
1652         PR java/23230:
1653         * parse.y (maybe_use_access_method): Generalize check from
1654         java.lang.Object to any superclass of current_class
1656 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1658         * class.c (build_class_ref): Wrap the primary class type in a
1659         NOP_EXPR.
1660         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1661         primary class type from the NOP_EXPR in which it was placed.
1663 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
1665         * expr.c (expand_load_internal): Fix missing parens in
1666         predicate.
1668 2005-07-28  Andrew Haley  <aph@redhat.com>
1670         * expr.c (expand_load_internal): Convert to destination type.
1672 2005-07-22  Manfred Hollstein  <mh@suse.com>
1674         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1675         (check_constant): Likewise.
1676         (check_wide_constant): Likewise.
1678 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
1680         Make CONSTRUCTOR use VEC to store initializers.
1681         * check-init.c (check_init): Update to cope with VEC in
1682         CONSTRUCTOR_ELTS.
1683         * class.c (make_field_value, make_method_value, get_dispatch_table,
1684         make_class_data, emit_symbol_table, emit_catch_table,
1685         emit_assertion_table): Use build_constructor_from_list instead of
1686         build_constructor.
1687         * constants.c (build_constants_constructor): Likewise.
1688         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
1689         VEC in CONSTRUCTOR_ELTS.
1690         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
1691         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
1692         of a TREE_LIST.
1693         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
1694         CONSTRUCTOR_ELTS.
1695         * parse.y (build_new_array_init): Use build_constructor_from_list
1696         instead of build_constructor.
1697         (patch_new_array_init): Update to cope with VEC in
1698         CONSTRUCTOR_ELTS.
1699         (array_constructor_check_entry): Likewise.
1701 2005-07-12  Tom Tromey  <tromey@redhat.com>
1703         * jvspec.c (lang_specific_driver): Put filelist_filename first on
1704         command line.
1706 2005-07-12  Tom Tromey  <tromey@redhat.com>
1708         PR java/19674:
1709         * parse-scan.y (interface_member_declaration): Added
1710         empty_statement.
1712 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
1713         
1714         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
1715         (LABEL_PENDING_CHAIN): Ditto.
1716         (LABEL_PC): Ditto.
1717         (DECL_BIT_INDEX): Ditto.        
1719 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1721         PR java/18119
1722         * parse.y (inner_class_accessible): New function. Logic moved from
1723         check_inner_class_access.
1724         (check_inner_class_access): Use inner_class_accessible.
1725         (resolve_inner_class): Simplify arguments. Create circularity hash
1726         here. Keep looking for classes if we found one that was inaccessible. 
1727         Return the inaccessible class only if there is no other match.
1728         (do_resolve_class): Update for new resolve_inner_class arguments.
1729         Don't create circularity_hash here.
1731 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1733         PR java/21045
1734         * parse.y (add_exception_to_throws): New function.
1735         (purge_unchecked_exceptions): Removed.
1736         (get_constructor_super): Renamed from verify_constructor_super. Now
1737         returns the super constructor after verification.
1738         (java_complete_expand_method): Don't use purge_unchecked_exceptions
1739         or save/restore the exception list.
1740         (check_thrown_exceptions): Add uncaught exceptions in anonymous
1741         class initializers and constructors to the throws clause of the method. 
1743 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
1745         PR java/19674
1746         * parse.y (interface_member_declaration): Allow empty statements in
1747         interface declarations.
1749 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
1751         * Makefile.in (parse.o): Adjust dependencies.
1752         * parse.y: Include tree-dump.h.
1754 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
1756         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
1757         flag for quoting.
1759 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
1761         * parse.y (issue_warning_error_from_context): Call
1762         pp_output_formatted_text to be able to get the buffer.
1764 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
1766         * parse.y (issue_warning_error_from_context): Update for the
1767         renaming of pp_format_text to pp_format.
1769 2005-06-28  Paul Brook  <paul@codesourcery.com>
1771         * decl.c (java_init_decl_processing): Call
1772         default_init_unwind_resume_libfunc.
1774 2005-06-27  Tom Tromey  <tromey@redhat.com>
1776         PR java/21540, PR java/13788:
1777         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
1778         fold_constant_for_init.
1779         (patch_binop): Added 'folding' argument.  Updated all callers.
1780         (patch_unaryop) <NOP_EXPR>: New case.
1781         (fold_constant_for_init) <NOP_EXPR>: Likewise.
1782         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
1784 2005-06-25  Jan Hubicka  <jh@suse.cz>
1786         * builtins.c (define_builtin): Accept new flags parameter.
1787         (initialize_builtins): Mark the builtins const and nothrow accordingly.
1789 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
1791         * all files: Update FSF address in copyright headers.
1793 2005-06-24  Tom Tromey  <tromey@redhat.com>
1795         * verify-impl.c (verify_instructions_0): Correctly handle
1796         situation where PC falls off end.
1798 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
1800         PR java/20697
1801         * parse.y (find_most_specific_methods_list): Remove special case for
1802         inner classes.
1804 2005-06-15  Tom Tromey  <tromey@redhat.com>
1806         PR libgcj/21906:
1807         * class.c (make_method_value): Use soft_abstractmethod_node for
1808         abstract method.
1809         * java-tree.h (soft_abstractmethod_node): New define.
1810         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
1811         * decl.c (java_init_decl_processing): Initialize
1812         soft_abstractmethod_node.
1814 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
1816         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
1818 2005-06-13  Per Bothner  <per@bothner.com>
1820         * expr.c (int highest_label_pc_this_method,
1821         start_label_pc_this_method): New globals.
1822         (lookup_label): Add start_label_pc_this_method to pc for label, and
1823         update highest_label_pc_this_method.  This prevents conflicts between
1824         labels from different methods.
1825         * java-tree.h: Declare new globals.
1826         * jcf-parse.c (parse_class_file): If needed bump
1827         start_label_pc_this_method and reset highest_label_pc_this_method.
1829 2005-06-13  Tom Tromey  <tromey@redhat.com>
1831         PR java/21844:
1832         * parse.y (nested_field_access_p): Handle case where outer field
1833         is inherited by enclosing class.
1835 2005-06-12  Per Bothner  <per@bothner.com>
1837         * class.c (inherits_from_p): Do load_class if needed.
1839 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1841         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
1842         * java-tree.h (parse_error_context): Move...
1843         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
1844         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
1845         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
1847 2005-06-08  Roger Sayle  <roger@eyesopen.com>
1849         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
1851 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
1853         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
1854         msgid for argument name.
1855         * gjavah.c (error): Likewise.
1856         * java-tree.h (parse_error_context): Likewise.
1857         * parse.y (parse_error_context, parse_warning_context,
1858         issue_warning_error_from_context): Likewise.
1860 2005-06-01  Tom Tromey  <tromey@redhat.com>
1862         PR java/21722:
1863         * class.c (build_static_field_ref): Don't fold constant fields if
1864         current class is from a .class file and we're using indirect
1865         dispatch.
1867 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1869         * java/verify-glue.c: Don't include errors.h and include toplev.h.
1870         * java/Make-lang.in: Updates dependencies.
1872 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
1874         PR java/19870.
1875         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
1876         NESTED_FIELD_ACCESS_IDENTIFIER_P.
1877         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
1878         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
1879         * jcf-write.c (generate_classfile): Use
1880         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1881         OUTER_FIELD_ACCESS_IDENTIFIER_P.
1882         * parse.y (build_outer_field_access): Rename to
1883         build_nested_field_access. Support static fields and outer-to-inner
1884         class accesses.
1885         (outer_field_access_p): Rename to nested_field_access_p. Support
1886         static fields and generalise to outer-to-inner class and sibling
1887         inner class accesses.
1888         (outer_field_expanded_access_p): Rename to
1889         nested_field_expanded_access_p and support static fields.
1890         (outer_field_access_fix): Rename to nested_field_access_fix and
1891         support static fields.
1892         (build_outer_field_access_expr): Rename to
1893         build_nested_field_access_expr and support static fields.
1894         (build_outer_field_access_methods): Rename to
1895         build_nested_field_access_methods and support static fields. For
1896         static fields, generate accessors without class instance parameters.
1897         (build_outer_field_access_method): Rename to
1898         build_nested_field_access_method and support static fields.
1899         (build_outer_method_access_method): Use
1900         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1901         OUTER_FIELD_ACCESS_IDENTIFIER_P.
1902         (resolve_expression_name): Consider static field accesses across
1903         nested classes.
1904         (resolve_qualified_expression_name): Likewise.
1905         (java_complete_lhs): Use nested_field_access_fix instead of
1906         outer_field_access_fix.
1907         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
1908         Use nested_field_expanded_access_p instead of
1909         outer_field_expanded_access_p. Use nested_field_access_fix instead
1910         of outer_field_access_fix.
1911         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
1912         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
1914 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
1916         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
1917         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
1918         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
1919         MINOR_BINARYCOMPAT_ABI_VERSION): New.
1920         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
1921         (parse_version): Calculate version ID using new method. Use bit-flags
1922         for flag_indirect_dispatch and flag_bootstrap_classes.
1924 2005-05-25  Richard Henderson  <rth@redhat.com>
1926         PR libgcj/21692
1927         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
1928         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
1929         DECL_CONTEXT; avoid pushdecl_top_level.
1930         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
1931         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
1932         (layout_class_method): Likewise.
1933         * decl.c (java_mark_cni_decl_local): New.
1934         (java_mark_class_local): Use it.
1935         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
1936         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
1937         (struct lang_decl_func): Add local_cni;
1938         (struct lang_decl_var): Add class_field, vtable.
1939         (java_mangle_decl): Declare.
1940         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
1941         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
1942         (mangle_obstack_1): New.
1943         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
1944         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
1945         lhd_set_decl_assembler_name for things that don't need mangling.
1946         (mangle_class_field): Rename from java_mangle_class_field, make
1947         static, don't call init_mangling or finish_mangling.
1948         (mangle_vtable): Similarly.
1949         (mangle_local_cni_method_decl): New.
1950         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
1951         gcc_assert, and MANGLE_RAW_STRING.
1952         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
1954 2005-05-25  DJ Delorie  <dj@redhat.com>
1956         * class.c (set_constant_value): Move warning control from if() to
1957         warning(OPT_*).
1959 2005-05-24  Richard Henderson  <rth@redhat.com>
1961         * builtins.c (define_builtin): Don't call make_decl_rtl.
1962         * constants.c (build_constant_data_ref): Likewise.
1963         * class.c (build_utf8_ref): Likewise.
1964         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
1965         (get_dispatch_table, layout_class_method): Likewise.
1966         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
1967         by hand.
1968         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
1969         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
1970         to determine if we need a non-zero address.
1971         * decl.c (builtin_function): Don't call make_decl_rtl.
1972         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
1973         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
1974         * resource.c (compile_resource_data): Likewise.
1975         * parse.y (resolve_field_access): Re-word comment to avoid
1976         building DECL_RTL.
1978 2005-05-24  Richard Henderson  <rth@redhat.com>
1980         * class.c (registered_class): Take it out of class_roots; turn into
1981         a vec of trees.
1982         (register_class): Make static.  Don't duplicate decl node.  Use
1983         VEC_safe_push.
1984         (emit_register_classes): Use VEC_iterate.  Use output_constant
1985         instead of assemble_integer.  Don't call mark_decl_referenced
1986         directly.
1987         * java-tree.h (register_class): Remove decl.
1989 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
1991         PR java/17845
1993         * parse.y (register_package, package_list): Remove.
1994         (package_declaration): Do not call register_package.
1995         (do_resolve_class): Do not use package_list.
1997 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
1999         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2000         unused variable.
2002 2005-05-15  Tom Tromey  <tromey@redhat.com>
2004         PR java/21519:
2005         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2006         NOTE_PUSH.
2008 2005-05-12  Aaron Luchko <aluchko@redhat.com>
2010         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2012 2005-05-11  Tom Tromey  <tromey@redhat.com>
2014         * gcj.texi (Code Generation): Document -fbootstrap-classes.
2015         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2016         (parse_version): Use it.
2017         * lang.opt (-fbootstrap-classes): New option.
2019 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
2021         PR java/21436
2022         * class.c (maybe_layout_super_class): Look for imports in this_class.
2023         * parse.h (ctxp_for_generation_last): New.
2024         (do_resolve_class): Add a parameter.
2025         * parse.y (ctxp_for_generation_last): New.
2026         (java_pop_parser_context): Add at end of list.
2027         (find_in_imports, find_in_imports_on_demand): Look in ctxp
2028         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2029         the given type are NULL.
2030         (do_resolve_class): Look into the imports of the new second parameter.
2031         Adjust recursive calls.
2032         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2033         calls to do_resolve_class.
2034         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2035         (java_complete_class): Do not do that here.
2037 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
2039         PR java/20309
2040         * Make-lang.in (java): Add gjnih.
2041         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2042         (GJNIH_OBJS): New variable.
2043         (gjnih$(exeext)): New target.
2044         (JAVA_MANFILES): Add gjnih.1.
2045         (java.uninstall): Add gjnih.1.
2046         (java.mostlyclean): Add gjnih.
2047         (java.maintainer-clean): Add gjnih.1.
2048         (java/gjavah-jni.o): New target.
2049         (.INTERMEDIATE): Add gjnih.pod.
2050         (gjnih.pod): New target.
2051         * config-lang.in (stagestuff): Add gjnih.
2052         * gcj.texi (Top): Add gjnih node.
2053         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2054         -bootclasspath options.
2055         (Invoking gjnih): New node.
2056         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2057         (TOOLNAME): New macro.
2058         (error): Replace hard-coded gcjh with TOOLNAME.
2059         (process_file): Likewise.
2060         (usage): Likewise.
2061         (version): Likewise.
2062         (help): Likewise.  Add help output for -force, -old, -trace and -J
2063         options.
2064         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2065         (options): Add force, old, trace and J fields.
2066         (main): Handle -force, -old, -trace and -J options.
2068 2005-05-03  Tom Tromey  <tromey@redhat.com>
2070         PR java/21245:
2071         * gjavah.c (main): Unlink output file on error.
2073 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
2075         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2076         copyright.
2078 2005-04-29  Tom Tromey  <tromey@redhat.com>
2080         * expr.c (build_jni_stub): Updated for change to build_block.
2082 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
2084         * expr.c (force_evaluation_order): Declare 'saved' earlier.
2086 2005-04-28  Andrew Haley  <aph@redhat.com>
2088         PR java/19285
2089         * java-tree.h (soft_resolvepoolentry_node): New.
2090         (alloc_constant_fieldref): Declare.
2091         * expr.c (expand_java_field_op): Don't call class_init for
2092         accesses to static fields with indirect dispatch.
2093         * builtins.c (initialize_builtins): Add "__builtin_expect".
2094         * decl.c (soft_resolvepoolentry_node): New variable.
2095         (java_init_decl_processing): Create a decl for
2096         "_Jv_ResolvePoolEntry".
2097         * class.c (build_fieldref_cache_entry): New function.
2098         (build_static_field_ref): Rewrite for indirect dispatch.
2099         * constants.c (find_name_and_type_constant_tree): New function.
2100         (alloc_constant_fieldref): Likewise.
2101         (build_constants_constructor): Handle CONSTANT_Fieldref and
2102         CONSTANT_NameAndType.
2104         PR java/21115
2105         * expr.c (force_evaluation_order): Convert outgoing args smaller
2106         than integer.
2108 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
2110         * gcj.texi (libgcj Runtime Properties): Remove obsolete
2111         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
2112         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2114 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2116         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2117         to `unlock_stream' with `unlock_std_streams'.
2119 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
2121         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2122         instead of just expr.h.
2124 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2126         * gjavah.c (main): Unlock the stdio streams.
2127         * jcf-dump.c (main): Likewise.
2128         * jv-scan.c (main): Likewise.
2129         * jvgenmain.c (main): Likewise.
2131 2005-04-23  DJ Delorie  <dj@redhat.com>
2133         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2134         parse.y: Adjust warning() callers.
2136 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
2138         * gcj.texi (Object fields): Change "Integer" to "Int" in example
2139         contructor.
2141 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2143         * gcj.texi: Fix typos and bogus example.
2145 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
2147         * except.c: Fix a comment typo.
2149 2005-04-19  Julian Brown  <julian@codesourcery.com>
2151         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2152         indirect dispatch with PIC.
2154 2005-04-18  Andrew Haley  <aph@redhat.com>
2156         * java-except.h (struct eh_range.handler): Remove unused field.
2157         (handle_nested_ranges): Remove function declaration.
2158         (sanity_check_exception_range): Add function declaration.       
2159         * verify.c (verify_jvm_instructions): Remove call to
2160         handle_nested_ranges.
2161         * verify-glue.c (verify_jvm_instructions_new): Call
2162         sanity_check_exception_range.
2163         * except.c (link_handler, eh_range_freelist, link_handler,
2164         handle_nested_ranges): Remove.
2165         (add_handler): Rewrite.
2166         (sanity_check_exception_range): New function.
2167         (print_ranges): New function.
2169 2005-04-13  Julian Brown  <julian@codesourcery.com>
2171         * decl.c (finish_method): Give methods once-only linkage.
2173 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
2175         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2177 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2179         * java-tree.h: Don't use PARAMS().
2181 2005-04-07  Per Bothner  <per@bothner.com>
2183         * class.c (push_class): By default, suppress debug output.
2184         (finish_class): Enable debug output for classes we're emitting.
2186 2005-04-07  Andrew Haley  <aph@redhat.com>
2188         * gcj.texi: Correct gcj-dbtool instructions.
2190 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
2192         * gcj.texi: Fix a typo.
2193         * lang.c: Fix a comment typo.
2195 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
2197         * gcj.texi (Invoking gij): Add descriptions of new -X options.
2198         Mention recognized-and-ignored compatibility options.
2199         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2200         JvFree.
2201         (About CNI): Add Memory allocation section.
2203 2005-04-01  Tom Tromey  <tromey@redhat.com>
2205         * decl.c (java_init_decl_processing): Fix types of
2206         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2207         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2208         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2210 2005-03-31  Jan Hubicka  <jh@suse.cz>
2212         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2213         * class.c: Include cgraph.h
2214         (make_local_functoin_alias): Mark aslias as needed.
2215         * resource.c: Include cgraph.h
2216         (compile_resource_data): Go via cgraph interface.
2218 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2220         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2222 2005-03-30  Tom Tromey  <tromey@redhat.com>
2224         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2225         inner_class_info_index==0 or outer_class_info_index==0.
2227 2005-03-29  Tom Tromey  <tromey@redhat.com>
2229         * gcj.texi (libgcj Runtime Properties): Document
2230         gnu.gcj.runtime.endorsed.dirs.
2232 2005-03-24  Anthony Green  <green@redhat.com>
2234         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2235         'gcj-dbtool -p'.
2237 2005-03-23  Tom Tromey  <tromey@redhat.com>
2239         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2240         (parse_version): Use it.
2242 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2244         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2246 2005-03-18  Andrew Haley  <aph@redhat.com>
2248         PR java/20522
2249         * decl.c (update_aliases): Don't update variables that are about
2250         to die.
2251         (maybe_poplevels): Add comment.
2253 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2255         PR java/20502
2256         * jcf-parse.c (duplicate_class_warning): New function.
2257         (java_parse_file): Call duplicate_class_warning if 
2258         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2259         (parse_zip_file_entries): Likewise. Also set
2260         CLASS_FROM_CURRENTLY_COMPILED_P.
2262 2005-03-16  Andrew Haley  <aph@redhat.com>
2264         * expr.c (expand_java_arrayload): Don't generate a
2265         NullPointerException based on the type of the node.
2266         (build_java_array_length_access): Likewise.
2268 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2270         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2272 2005-03-11  Tom Tromey  <tromey@redhat.com>
2274         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2275         (libgcj Runtime Properties): Document the default .db.
2277 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2279         PR java/20312
2280         * parse.y (checks_throws_clauses): Check exceptions list even when
2281         the base class does not come from a source file being compiled.
2282         (java_complete_lhs): Remove unused variable 'wfl'.
2284 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2286         PR java/20338
2287         * decl.c (finish_method): Emit _Jv_InitClass for private static
2288         methods inside inner classes as well.
2290 2005-03-08  Julian Brown  <julian@codesourcery.com>
2291         * Revert patch from 2005-03-08 for causing bootstrap failure on
2292         ppc-darwin.
2294 2005-03-08  Julian Brown  <julian@codesourcery.com>
2296         * decl.c (finish_method): Give methods once-only linkage.
2298 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2300         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2302 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2304         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2305         can_widen_reference_to if the C++ ABI is in use.
2306         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2307         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2308         type_isresolved, init_state, set_pc, state_get_pc,
2309         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2310         (verify_fail): Report the current PC from the verifier context.
2311         (free_state): Remove #if 0 block to enable this function.
2312         (free_verifier_context): Call free_state on state_list iterator
2313         values before freeing them.
2314         * expr.c (pop_type_0): Pop correct type for error message when stack
2315         contains a multi-word type.
2317 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2319         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2320         for known NULL array length access.
2322 2005-03-07  Tom Tromey  <tromey@redhat.com>
2324         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2326 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2328         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2329         typeck.c: Update copyright.
2331 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2333         Remove xref code.
2334         * xref.c, xref.h: Remove file.
2335         * Make-lang.in (java/xref.o): Remove.
2336         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2337         * lang.c (flag_emit_xref): Remove definition.
2338         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2339         * typeck.c (convert): Remove use of do_not_fold.
2340         * parse.y (do_not_fold): Remove definition.
2341         (parser grammar): Remove xref code.
2342         (maybe_create_class_interface_decl, create_class): Likewise.
2343         (register_fields, method_header, finish_method_declaration): Likewise.
2344         (declare_local_variables, source_end_java_method): Likewise.
2345         (java_complete_expand_classes): Do not set do_not_fold.
2346         (java_complete_expand_method): Remove xref code.
2347         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2348         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2349         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2350         (patch_synchronized_statement, patch_throw_statement): Likewise.
2351         (maybe_build_class_init_for_field): Likewise.
2353 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2355         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2356         instead of IS_NON_TYPE_CODE_CLASS.
2358 2005-03-04  Andrew Haley  <aph@redhat.com>
2360         PR java/18362
2361         * class.c (set_method_index): Don't set method_index if it is
2362         NULL_TREE.
2363         (layout_class_method): Don't complain about "non-static method foo
2364         overrides static method" in the case of indirect dispatch.
2366 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2368         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2369         warning.
2370         * Make-lang.in: Don't elide warnings in jcf-io.c.
2372 2005-03-01  Per Bothner  <per@bothner.com>
2374         PR java/8608
2375         * check-init.c (wfl): Remove static.
2376         (final_assign_error, check_init): Replace calls to parse_error_context
2377         by plain error.
2378         (check_init): Save, set, and restore input_location for each exp.
2380 2005-03-01  Per Bothner  <per@bothner.com>
2382         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2383         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2384         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2386 2005-03-01  Per Bothner  <per@bothner.com>
2388         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2390 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2392         PR libgcj/16923
2393         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2394         JvVMOption.
2396 2005-02-22  Tom Tromey  <tromey@redhat.com>
2398         PR java/20056:
2399         * verify-impl.c (EITHER): New define.
2400         (types_compatible): Handle it.
2401         (check_field_constant): Use it.
2403 2005-02-18  Tom Tromey  <tromey@redhat.com>
2405         PR java/20056:
2406         * verify-impl.c (types_equal): Fixed test.
2408         PR java/20056:
2409         * verify-glue.c (vfy_class_has_field): New function.
2410         * verify.h (vfy_class_has_field): Declare.
2411         * verify-impl.c (check_field_constant): Added 'putfield'
2412         argument.
2413         (verify_instructions_0): Updated.
2414         (types_equal): New function.
2416 2005-02-14  Tom Tromey  <tromey@redhat.com>
2418         PR java/19921:
2419         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2420         stack effect of multianewarray.
2422 2005-02-14  Andrew Haley  <aph@redhat.com>
2424         PR java/19907
2425         * expr.c (expand_byte_code): Call promote_arguments().
2426         (promote_arguments): New function.
2427         * decl.c (check_local_unnamed_variable): Remove special case for
2428         new verifier.
2429         (find_local_variable): Promote all boolean types to int
2430         when searching for local variable decls.
2432 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
2434         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2435         parse-scan.y: Update copyright.
2437 2005-02-11  Per Bothner  <per@bothner.com>
2439         PR java/15543
2440         * parse-scan.y (input_location): Remove variable.
2441         (main_input_filename): New - replaces input_filename, which isn't
2442         settable if USE_MAPPED_LOCATION.
2443         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2444         so we don't reference input_location or wfl_operator in that case.
2445         * jv-scan.c (expand_location): Remove - no longer used.
2446         (main): Set main_input_filename rather than input_filename.
2448 2005-02-09  Richard Henderson  <rth@redhat.com>
2450         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2451         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2453 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
2455         * expr.c (add_type_assertion): Use the proper enumeration type,
2456         since this is what htab_find_slot() is expecting.
2458 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2460         * gcj.texi: Update copyright dates.
2462 2005-02-02  Tom Tromey  <tromey@redhat.com>
2464         * gcj.texi (libgcj Runtime Properties): Default library_control
2465         to 'cache'.
2467 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
2469         PR java/15543
2470         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2471         (modifiers) when square brackets are present in a declaration for
2472         a final paramter.
2473         * jv-scan.c (main): Set input_filename and input_line.
2475 2005-02-01  Tom Tromey  <tromey@redhat.com>
2477         PR java/19742:
2478         * gjavah.c (get_field_name): Don't override name for JNI header.
2480 2005-02-01  Roger Sayle  <roger@eyesopen.com>
2482         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2483         of unsigned types using iushr and lushr JVM bytecodes.
2485 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2487         PR java/19738
2488         * gjavah.c (jni_print_float): Do not emit floating-point
2489         initialiser for a static final field.
2490         (jni_print_double): Likewise.
2492 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
2494         Revert:
2495         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2496         * gjavah.c (print_field_info): Mark static data members of
2497         floating-point type with "__extension__".
2499 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2501         * gjavah.c (print_field_info): Mark static data members of
2502         floating-point type with "__extension__".
2504 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2506         PR java/9157
2507         * parse.y (build_string_concatenation): Remove redundant if.
2508         (patch_conditional_expr): Attempt to patch_string() the condition
2509         of a ?: as well, in addition to its other operands.
2511 2005-01-25  Tom Tromey  <tromey@redhat.com>
2513         * Make-lang.in (java/java-tree-inline.o): Removed.
2515 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
2517         PR java/19070
2518         * parse.y (patch_binop): Allow comparisons against NULL only
2519         if the other operand is of a reference type.
2521 2005-01-24  Tom Tromey  <tromey@redhat.com>
2523         * java-tree.h (gcj_abi_version): Declare.
2524         * class.c (make_class_data): Push gcj_abi_version into "next"
2525         field.  Renamed field.
2526         * decl.c (gcj_abi_version): New global.
2527         (parse_version): New function.
2528         (java_init_decl_processing): Call it.  Renamed 'next' field.
2529         Include version.h.
2530         (GCJ_BINARYCOMPAT_ADDITION): New define.
2532 2005-01-24  Roger Sayle  <roger@eyesopen.com>
2534         PR java/19295
2535         * jcf-write.c (generate_bytecode_insns): Conversions between
2536         integer types of the same precision shouldn't generate widening
2537         or narrowing conversion bytecodes.
2539 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
2541         * java-except.h, java-tree.h: Remove unused prototypes.
2543 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
2545         PR java/18091:
2546         * jcf-write.c (perform_relocations): Don't call memcpy if source
2547         and destination are the same.
2549 2005-01-17  Tom Tromey  <tromey@redhat.com>
2551         * verify-impl.c (get_short): Sign extend.
2552         (get_int): Likewise.
2554 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
2556         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2557         with TYPE_SIZE.
2559 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2561         * verify.c: Revert to the version before the BC-ABI merge.
2563 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2565         PR java/19277
2566         * check-init.c (check_init): Take care of references that do not
2567         have an explicit final variable declaration (e.g. array length
2568         access) for pre/post in/de-crement operators.
2570 2005-01-08  Mark Wielaard  <mark@klomp.org>
2572         * parse.y (process_imports): Allocate (and free) original_name only
2573         when not already defined.
2574         * jcf-parse.c (read_class): Free results of find_class() and
2575         lrealpath().
2576         (java_parse_file): Keep pointer to head of file_list and free when
2577         done. Free result of lrealpath().
2579 2005-01-05  Tom Tromey  <tromey@redhat.com>
2581         * gcj.texi (Standard Properties): java.ext.dirs is now used.
2583 2004-12-20  Andrew Haley  <aph@redhat.com>
2585         * typeck.c: Use fold_convert for ints and booleans.
2587 2004-12-17  Andrew Haley  <aph@redhat.com>
2589         PR java/18931
2590         * typeck.c (convert): Use a CONVERT_EXPR when converting to
2591         BOOLEAN_TYPE or CHAR_TYPE.
2592         (convert_to_boolean, convert_to_char) : Remove.
2593         * convert.h (convert_to_boolean, convert_to_char) : Remove.
2594         * expr.c (expand_load_internal): Do type conversion if type is not
2595         as required.
2597 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
2599         PR target/18459
2600         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2601         Update comment.
2603 2004-12-07  Andrew Haley  <aph@redhat.com>
2605         PR java/18811:
2606         * jcf-parse.c (load_class): Remove sanity test for missing inner
2607         class file.
2609 2004-12-06  Tom Tromey  <tromey@redhat.com>
2611         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
2612         (java.uninstall): Likewise.
2613         (java.maintainer-clean): Likewise.
2614         (.INTERMEDIATE): Likewise.
2615         (java.install-man): Likewise.
2616         (gcj-dbtool.pod): New target.
2617         * gcj.texi (Code Generation): Document -findirect-dispatch.
2618         (libgcj Runtime Properties): Document
2619         gnu.gcj.precompiled.db.path.
2620         (Top): Link to "Invoking gcj-dbtool".
2622 2004-12-06  Tom Tromey  <tromey@redhat.com>
2624         PR java/14853:
2625         * java-tree.h (extract_field_decl): Declare.
2626         * parse.y (extract_field_decl): Renamed from
2627         strip_out_static_field_access_decl.  No longer static.
2628         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
2630 2004-12-03  Tom Tromey  <tromey@redhat.com>
2632         * lang.c (flag_new_verifier): Define.
2633         (java_post_options): Set flag_new_verifier if indirect dispatch
2634         is being used.
2635         * lang.opt (fnew-verifier): Removed.
2637 2004-12-03  Tom Tromey  <tromey@redhat.com>
2639         PR bootstrap/14614:
2640         * Make-lang.in (java.install-common): Only install transformed
2641         gcjh if gcj-cross exists.
2643 2004-12-03  Andrew Haley  <aph@redhat.com>
2645         PR java/18812
2646         * except.c (link_handler): Patch 'outer' field of siblings of the
2647         range we're demoting.
2649 2004-12-03  Andrew Haley  <aph@redhat.com>
2651         PR java/18697
2652         * class.c (layout_class_method): Don't fail to override a method
2653         simply because it has DECL_ARTIFICIAL set.
2655 2004-12-02  Tom Tromey  <tromey@redhat.com>
2657         PR java/16675:
2658         * parse.y (craft_constructor): Special case null_pointer_node.
2660 2004-12-02  Tom Tromey  <tromey@redhat.com>
2662         PR java/18741:
2663         * java-gimplify.c (java_gimplify_expr): Don't call
2664         SET_EXPR_LOCATION unless wrapped tree is an expression.
2666 2004-11-27  Per Bothner  <per@bothner.com>
2668         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
2669         Fix fencepost error in 'i', which got executed one too many times.
2670         Also, fold memcpy into explicit loop, as originally intended.
2671         Also, free temporary 'buf' which otherwise leaks.
2673 2004-11-27  Per Bothner  <per@bothner.com>
2675         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2676         local static variables if not USE_MAPPED_LOCATION.
2678 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2680         * class.c, decl.c, expr.c: Fix comment typos.
2682 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
2684         PR java/18305
2685         * decl.c (end_java_method): Call
2686         attach_init_test_initialization_flags on all the init_decls.
2687         * parse.y (attach_init_test_initialization_flags): Move to ...
2688         * expr.c (attach_init_test_initialization_flags): here and
2689         support BIND_EXPR also.
2690         * java-tree.h (attach_init_test_initialization_flags): Prototype.
2691         * jcf-parse.c (parse_class_file): Don't disable class init
2692         optimization.
2694 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2696         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
2697         in diagnostics.
2699 2004-11-24  Richard Henderson  <rth@redhat.com>
2701         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
2702         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2704 2004-11-24  Tom Tromey  <tromey@redhat.com>
2706         * verify.c (defer_merging): Don't use C++-style comment.
2707         * verify.h (java_opcode): Added java_opcode_end.
2708         * class.c (build_class_ref): Remove C++ comment and old FIXME.
2710         * verify-impl.c (vfy_push_type): Removed bogus "return".
2711         (initialize_stack): Use vfy_alloc and vfy_free.
2712         (verify_instructions_0): Likewise.
2714         * Merged gcj-abi-2-dev-branch to trunk.
2716 2004-11-24  Andrew Haley  <aph@redhat.com>
2718         * jcf-parse.c (parse_class_file): Set file_start_location.
2720 2004-11-10  Tom Tromey  <tromey@redhat.com>
2722         * class.c (make_field_value): Don't call build_static_field_ref.
2723         (build_static_field_ref): Don't emit direct references when using
2724         indirect dispatch.
2726         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
2727         -verbose:class into man page synopsis.
2729 2004-11-09  Tom Tromey  <tromey@redhat.com>
2731         * expr.c (build_java_arraystore_check): Still generate check if
2732         element type is itself an array.
2734 2004-11-08  Tom Tromey  <tromey@redhat.com>
2736         * java-tree.h (soft_check_assignment_node): Removed.
2737         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
2738         * decl.c (java_init_decl_processing): Don't initialize
2739         soft_check_assignment_node.
2741 2004-11-05  Tom Tromey  <tromey@redhat.com>
2743         * class.c (layout_class_methods): Don't add Miranda methods when
2744         using indirect dispatch.
2746 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
2748         * class.c (make_class_data): Call emit_assertion_table to set the
2749         'assertion_table' field.
2750         (build_signature_for_libgcj): Move here from expr.c.
2751         (add_assertion_table_entry): New function. Callback for assertion
2752         hashtable traversal.
2753         (emit_assertion_table): New. Take class argument, and generate
2754         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
2755         * decl.c (init_decl_processing): Define assertion_entry_type record.
2756         Push 'assertion_table' class field instead of 'verify'.
2757         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
2758         (type_assertion_hash): Include 'assertion_code' in hash.
2759         (add_type_assertion): Rewritten. Take class and assertion_code
2760         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
2761         (can_widen_reference_to): Use new add_type_assertion() arguments.
2762         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
2763         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
2764         (verify_identifier_node): Removed.
2765         (assertion_entry_type, assertion_table_type): New.
2766         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
2767         assertion code definitions.
2768         (struct type_assertion): Add assertion_code. Rename 'source_type' and
2769         'target_type' to 'op1' and 'op2'.
2770         (add_type_assertion): Declare.
2771         (lang_printable_name_wls): Remove unused definition.
2772         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
2773         to emit runtime assertion.
2774         (vfy_note_stack_type): Clean up non-C90 declarations.
2775         (vfy_note_local_type): Likewise.
2776         * verify.h (vfy_is_assignable_from): Declare.
2777         * verify-impl.c (is_assignable_from_slow): Remove unused function.
2778         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
2779         instead of is_assignable_from_slow().
2780         (types_compatible): Reinstate ref_compatible() call.
2782 2004-11-04  Tom Tromey  <tromey@redhat.com>
2784         * class.c (build_static_field_ref): Reverted previous patch.
2786         * class.c (build_static_field_ref): Don't emit direct references
2787         when using indirect dispatch.
2789 2004-11-03  Tom Tromey  <tromey@redhat.com>
2791         * expr.c (expand_java_arrayload): Set lhs_type_node.
2792         (expand_java_arraystore): Set rhs_type_node.
2794 2004-11-02  Tom Tromey  <tromey@redhat.com>
2796         * jcf-parse.c (compute_class_name): Use filename length from zip
2797         directory, not strlen.
2799         * expr.c (expand_invoke): Mark new interface methods as abstract.
2801 2004-11-01  Tom Tromey  <tromey@redhat.com>
2803         * verify-impl.c (push_jump): Removed check for uninitialized
2804         objects.
2805         (push_exception_jump): Likewise.
2806         (handle_ret_insn): Likewise.
2807         (handle_jsr_insn): Likewise.
2808         (state_check_no_uninitialized_objects): Removed.
2810         * decl.c (check_local_unnamed_variable): Recognize
2811         promoted-to-int parameters when using the new verifier.
2812         * expr.c (expand_java_arraystore): Explicitly request array type
2813         when using new verifier.
2814         (expand_java_arrayload): Likewise.
2815         (invoke_build_dtable): Don't pass object_type_node as
2816         expression argument to build_java_indirect_ref.
2817         (build_java_check_indexed_type): Do nothing.
2818         (build_java_arraystore_check): Handle case where array doesn't
2819         have array type.
2820         (build_java_array_length_access): Likewise.
2821         (expand_invoke): Handle case where interface overrides a method
2822         from Object.
2823         (pop_type_0): Always succeed for reference types.
2824         (process_jvm_instruction): Don't pop a value in a dead
2825         exception handler.
2826         (pop_arguments): Convert arguments to correct types.
2828 2004-10-29  Andrew Haley  <aph@redhat.com>
2830         * jcf-parse.c (give_name_to_class): Remove line that was
2831         incorrectly merged.
2833 2004-10-29  Andrew Haley  <aph@redhat.com>
2835         * jcf-parse.c (set_source_filename): Add code to build new sfname.
2837 2004-10-20  Andrew Haley  <aph@redhat.com>
2839         * decl.c (end_java_method): Don't expand if flag_syntax_only.
2841 2004-10-26  Tom Tromey  <tromey@redhat.com>
2843         * verify.h (vfy_notify_verified): Removed.
2844         * verify-glue.c (vfy_notify_verified): Removed.
2846 2004-10-26  Tom Tromey  <tromey@redhat.com>
2848         * verify-impl.c (debug_print_state): Declare `i' before code.
2849         (merge_types): Modify `t' when it is null_type.
2851 2004-10-26  Tom Tromey  <tromey@redhat.com>
2853         * verify-impl.c (type_print): Renamed from print.  Now static and
2854         takes an argument.
2855         (debug_print_state): Use type_print.
2857 2004-10-25  Tom Tromey  <tromey@redhat.com>
2859         * expr.c (build_invokeinterface): Compute correct offset for
2860         index into interface methods.
2862 2004-10-20  Tom Tromey  <tromey@redhat.com>
2864         * java-tree.h (verify_jvm_instructions_new): Declare.
2866         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
2867         command line.
2869         * verify-impl.c (verify_instructions): Correctly handle wide
2870         types on the stack.
2871         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
2872         (vfy_get_component_type): Strip pointer types.
2873         (vfy_find_class): Use get_type_from_signature.  Strip pointer
2874         types.
2875         Include java-except.h.
2877 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
2879         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
2880         vfy_push_type_t, set_variable, add_new_state, merge_into,
2881         handle_jsr_insn, branch_prepass, check_class_constant,
2882         check_wide_constant, get_one_type, compute_static_types,
2883         verify_instructions_0): Clean up C99 declarations after statements.
2885 2004-10-20  Tom Tromey  <tromey@redhat.com>
2887         * verify-impl.c (merge_refs): Compare reference against iterator,
2888         not ref2.
2890         * verify-glue.c (vfy_tag): Mask off resolved flag.
2892 2004-10-19  Tom Tromey  <tromey@redhat.com>
2894         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
2895         (init_state_with_stack): Initialize `this_type' in state.
2896         (verify_method): Use debug_print.
2897         * verify-glue.c (vfy_is_primitive): Removed debugging print.
2898         (vfy_note_stack_depth): Reverted last patch.
2899         (vfy_note_stack_type): Note pointer to Object, not Object.
2900         (vfy_note_local_type): Likewise.
2902         * verify.h (vfy_note_instruction_seen): Declare.
2903         * verify-glue.c (verify_jvm_instructions_new): Set
2904         BCODE_EXCEPTION_TARGET on target instruction.
2905         (vfy_note_instruction_seen): New function.
2906         * verify-impl.c (FLAG_INSN_SEEN): New define.
2907         (verify_instructions_0): Set flag on instruction.  Save state for
2908         PC=0 later.
2909         (verify_instructions): Call vfy_note_instruction_seen.
2911         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
2912         (verify_jvm_instructions_new): Call method_init_exceptions,
2913         add_handler, and handle_nested_ranges.
2914         * verify-impl.c (verify_method): Return 1 on success.
2915         (verify_instructions_0): Save the state at PC=0.
2917         * verify-impl.c (init_type_from_class): Set is_resolved and
2918         ref_next on new ref_intersection.
2919         (init_type_from_string): Likewise.
2921 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
2923         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
2924         if flag_new_verifier is set.
2925         * java-tree.h (flag_new_verifier): Declare.
2926         * lang.opt (fnew-verifier): New option.
2927         * verify-impl.c: Work around namespace pollution by undef'ing
2928         'current_class'.
2929         (struct verifier_context): Make 'bytecode' const.
2930         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
2931         (types_compatible): For the BC-ABI, always consider reference types
2932         compatible.
2933         (check_class_constant): Use vfr->current_class.
2934         (check_constant): Likewise.
2935         (check_wide_constant): Likewise.
2936         (check_field_constant): Check for 'L' at start of type name.
2937         (get_one_type): Return pointer instead of type. Set type result in
2938         caller via passed type pointer.
2939         (compute_argument_types): Update to use new get_one_type arguments.
2940         (compute_return_type): Likewise.
2941         (make_verifier_context): New. Allocate and initialize 'vfr'.
2942         (free_verifier_context): New. Free 'vfr' and its contents.
2943         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
2944         and free_verifier_context.
2946 2004-10-15  Tom Tromey  <tromey@redhat.com>
2948         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
2949         * verify.h (vfy_fail): Fixed formatting.
2951         * verify-impl.c (vfr): Fixed comment formatting.
2952         (collapse_type): New function.
2953         (verify_instructions): Notify compiler about type map.
2954         * verify.h (vfy_note_stack_depth): Updated.
2955         (vfy_note_stack_type): Likewise.
2956         (vfy_note_local_type): Likewise.
2957         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
2958         Declare.
2959         * verify-glue.c (vfy_note_stack_depth): Correctly size type
2960         state.  Added `method' argument.
2961         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
2962         argument.
2963         (vfy_note_local_type): New function.
2964         (vfy_unsuitable_type): Likewise.
2965         (vfy_return_address_type): Likewise.
2966         (vfy_null_type): Likewise.
2968         * verify.h (VFY_IN_GCC): Removed.
2969         (VFY_WANT_TYPEMAP): Removed.
2970         * verify-impl.c (verify_instructions_0): Removed useless "\".
2971         (struct state) <next>: Uncomment.
2973 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
2975         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
2976         C-style.
2978 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2980         * Make-lang.in (verify.o): Re-enabled this target.
2981         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
2982         (vfy_get_interface): Likewise.
2983         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
2984         * verify.h (verify_jvm_instructions_new): Declare.
2985         * verify-impl.c (free_state): Temporarily comment out unused
2986         function.
2988 2004-10-06  Tom Tromey  <tromey@redhat.com>
2990         * java-tree.h (JV_STATE_READ): New enum value.
2992 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2994         * verify.h: New file.
2996 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
2998         * verify-impl.c, verify-glue.c, verify.h: New files.
2999         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3001 2004-09-24  Andrew Haley  <aph@redhat.com>
3003         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3004         for a slot if it's of pointer type.
3006 2004-09-14  Tom Tromey  <tromey@redhat.com>
3008         * class.c (make_class_data): Correctly initialize "state" field.
3009         Initialize "engine" field.
3010         * decl.c (java_init_decl_processing): Add "engine" field.
3012 2004-09-10  Andrew Haley  <aph@redhat.com>
3014         PR java/12760
3015         * expr.c (build_invokeinterface): Use fast method for interface
3016         dispatch.
3017         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3018         JTI_ITABLE_PTR_TYPE.
3019         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
3020         (emit_symbol_table): Add new arg, element_size.
3021         * decl.c (java_init_decl_processing): Initialize Class.itable.
3022         * class.c (GEN_TABLE): New macro.
3023         (gen_indirect_dispatch_tables): Use it.  Add itable.
3024         (make_class_data): Add new arg for emit_symbol_table().
3025         Emit itable.
3026         (add_miranda_methods): Make sure search_class has been parsed.
3027         (emit_symbol_table): Add new arg, element_size.
3029 2004-09-06  Andrew Haley  <aph@redhat.com>
3031         * verify.c (merge_types): Return Object for all merges of
3032         interfaces.
3033         * expr.c (add_type_assertion): Don't generate assertions when
3034         source type is array of Object.
3036 2004-09-03  Andrew Haley  <aph@redhat.com>
3038         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3040         * lang.c (java_post_options): Force flag_verify_invocations if
3041         we're not using indirect dispatch.
3043         * expr.c (pop_type_0): Move test for interfaces before call to
3044         can_widen_reference_to().
3045         (build_signature_for_libgcj): Remove generation of canonical array
3046         type.
3047         (add_type_assertion): Canonicalize both arrays.
3048         Don't assert that type X can be assigned to Object.
3049         Don't assert that type X an be assigned to type X.
3050         Don't assert that Object can be assigned to type X.
3051         (can_widen_reference_to): Warn whenever we generate an assertion.
3052         (process_jvm_instruction): Use throwable_type_node for the type of
3053         an exception class.
3055 2004-09-01  Andrew Haley  <aph@redhat.com>
3057         * decl.c (java_init_decl_processing): Change
3058         verify_identifier_node to "__verify".
3059         * expr.c (add_type_assertion): Use verify_identifier_node for name.
3060         * java-tree.h (verify_identifier_node): Change to "__verify".
3062         * expr.c (build_signature_for_libgcj): New function.
3063         (add_type_assertion): Use it to construct signatures for
3064         source_type and target_type.
3066 2004-08-27  Andrew Haley  <aph@redhat.com>
3068         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3069         (verify_identifier_node): New.
3070         (TYPE_VERIFY_METHOD): New.
3071         (struct type_assertion): New type.
3072         * expr.c (type_assertion_eq): New function.
3073         (type_assertion_hash): New function.
3074         (add_type_assertion): New function.
3075         (can_widen_reference_to): Call add_type_assertion().
3076         * decl.c (java_init_decl_processing): Add verify_identifier_node.
3077         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3078         (finish_class): Output TYPE_VERIFY_METHOD (type).
3080         * decl.c (end_java_method): Nullify unused fields.
3082 2004-08-17  Andrew Haley  <aph@redhat.com>
3084         * verify.c (defer_merging): Quieten.
3085         * jcf-parse.c (load_class): Only try to open a class file if it's
3086         java.lang.Object or if it's part of the current compilation.
3087         Check that the class we just tried to load is the class we just
3088         loaded.  Quieten.
3089         (java_parse_file): Set flag_verify_invocations off if we're
3090         compiling from .class.
3091         (parse_zip_file_entries): Abort if we try to read a dummy class.
3092         * expr.c (can_widen_reference_to): Quieten.
3093         (build_invokevirtual): Abort if we try to invokevirtual an
3094         interface.
3095         (expand_invoke): Don't build a non-interface call to an interface.
3096         (build_instanceof): Don't do premature optimization if
3097         flag_verify_invocations is not set.
3098         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3099         from superclass.
3100         (build_static_field_ref): Add correct type conversion for
3101         field_address.
3102         (add_miranda_methods): Disable generation of Miranda methods for
3103         dummy classes.
3104         (layout_class_method): Don't complain about non-static method
3105         overrides static method with dummy classes.
3107 2004-08-13  Tom Tromey  <tromey@redhat.com>
3109         * class.c (build_static_field_ref): Re-enable atable lookups for
3110         static fields.
3112         * parse.y (strip_out_static_field_access_decl): Indentation fix.
3114 2004-08-11  Tom Tromey  <tromey@redhat.com>
3116         * gcj.texi (libgcj Runtime Properties): Document new properties.
3118 2004-08-06  Andrew Haley  <aph@redhat.com>
3120         * jcf-parse.c (load_class): Check that we really have loaded the
3121         class we're looking for.
3123 2004-07-19  Andrew Haley  <aph@redhat.com>
3125         * verify.c (verify_jvm_instructions): Comment change only.
3127         * typeck.c (build_java_array_type): Add size field to array name.
3129         * java-tree.h (LOCAL_SLOT_P): New.
3130         (update_aliases): Add PC argument.
3131         (pushdecl_function_level): New function.
3133         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3134         MODIFY_EXPR, and SAVE_EXPR.
3135         (java_gimplify_modify_expr): New function.
3137         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3138         (expand_iinc): Pass PC to update_aliases().
3139         (STORE_INTERNAL): Likewise.
3140         (process_jvm_instruction): Likewise.
3142         * decl.c (base_decl_map): New variable.
3143         (uniq): New variable.
3144         (update_aliases): Rewrite with more thorough checking.
3145         (debug_variable_p): New function.
3146         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3147         (check_local_named_variable): Delete whole function.
3148         (initialize_local_variable): New function.
3149         (check_local_unnamed_variable): Add checks and comments.
3150         (find_local_variable): Rewrite.
3151         (java_replace_reference): New function.
3152         (function_binding_level): New variable.
3153         (pushdecl_function_level): New function.
3154         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3155         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3156         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3157         function_binding_level.
3158         (end_java_method): Null unused fields to save memory.
3160 2004-06-29  Andrew Haley  <aph@redhat.com>
3162         * except.c (expand_start_java_handler): Push a new binding level.
3163         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3164         register_exception_range() to register where we'll do it.
3165         (expand_end_java_handler): Remove old bogus code.  Replace with
3166         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3167         the top of the expression we're curently building.
3168         (maybe_end_try): Delete.
3169         * decl.c (binding_level.exception_range): New field.
3170         (clear_binding_level): Add field exception_range.  Reformat.
3171         (poplevel): Call expand_end_java_handler().
3172         (poplevel): Call java_add_stmt only if functionbody is false.
3173         (maybe_poplevels): Don't call maybe_end_try() from here.
3174         (end_java_method): Clear no longer used trees in function decl.
3175         (register_exception_range): New function.
3176         * java-tree.h (register_exception_range, struct eh_range): Declare.
3178 2004-06-22  Andrew Haley  <aph@redhat.com>
3180         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3181         the otable.
3182         * check-init.c (get_variable_decl): Teach check-init about
3183         FIELD_DECLs addressed via the otable.
3184         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3185         CLASS_PARSED_P.
3187 2004-05-28  Andrew Haley  <aph@redhat.com>
3189         * jcf-parse.c (load_class): Don't try to read a class that we've
3190         already read.
3192         * expr.c (build_invokeinterface): Use the old-fashioned way of
3193         doing indirect dispatch: look up interfaces by name.
3194         * java-tree.h (enum java_tree_index): Add
3195         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3196         * decl.c (java_init_decl_processing): Add
3197         soft_lookupinterfacemethodbyname_node.
3199         * gjavah.c (print_method_info): Final methods have vtable entries,
3200         so gjavah needs to output them.
3201         * class.c (layout_class_method): Generate vtable entries for final
3202         methods.
3203         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3204         dispatch, even if a method is final.
3206 2004-05-25  Andrew Haley  <aph@redhat.com>
3208         * class.c (build_symbol_entry): Convert the names of constructors
3209         to init_identifier_node when generating an entry for the indirect
3210         dispatch table.
3212         * expr.c (build_known_method_ref): Generate indirect calls for
3213         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3215 2004-05-24  Andrew Haley  <aph@redhat.com>
3217         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3218         atable element is of the right type.
3220         * class.c (build_static_field_ref): Cast pointer to correct type
3221         for field.
3223 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3225         * Merged with HEAD as of 20040514. Diff against
3226         gcj-abi-2-merge-20040514.
3228 2004-04-16  Andrew Haley  <aph@redhat.com>
3230         * verify.c (check_pending_block): Disable subroutine checks.
3231         (defer_merging): New function.
3232         (merge_types): If types are dummy, use defer_merging to combine them.
3233         (verify_jvm_instructions): If invocation is invokeinterface and
3234         target is dummy, assume target really is an interface.
3236         * parse.y (patch_invoke): Break out call to java_create_object.
3238         * lang.c (flag_verify_invocations): New.
3240         * jcf-parse.c (load_class): If we've already failed to load a
3241         class, don't try again.
3242         (load_class): If we can't find a .class file, don't fail, but emit
3243         a warning.
3244         (parse_class_file): Don't act on dummy methods.
3246         * java-tree.h (flag_verify_invocations): New.
3247         (TYPE_DUMMY): New.
3248         (lang_type.dummy_class): New field.
3249         (java_create_object): New function.
3250         (METHOD_DUMMY): New.
3252         * expr.c (build_field_ref): Widen field offset.
3253         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3254         that each of its elements is compatible with the one we're
3255         popping.
3256         (pop_type_0): Issue a warning to say that we need to generate a
3257         runtime check.
3258         (java_create_object): New function.
3259         (build_field_ref): Only generate hard refs if we're not using
3260         indirect dispatch.
3261         (expand_java_field_op): If we're using !verify_invocations and we
3262         see a missing field, generate a decl for it.
3264         (expand_invoke): If a class doesn't have the method we seek and
3265         we're using !flag_verify_invocations, generate a decl for the
3266         method now.
3268         (build_known_method_ref): Always use indirect dispatch via the
3269         atable for static methods.
3271         (expand_java_NEW): Break out object creation into new function,
3272         java_create_object.
3274         (can_widen_reference_to): Issue a warning to say that we need to
3275         generate a runtime check.
3277         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3278         (make_method_value): Also use index for interfaces.
3279         (make_class_data): Skip dummy field for inherited data.
3280         Don't build method array for dummy methods.
3281         Set size_in_byte to -1 when using inirect dispatch
3282         Don't build a hard class ref if we don't have a hard ref to our
3283         superclass, or if we're using inirect dispatch.
3284         Null out dispatch tables.
3286         (layout_class_method): Don't complain about non-static method
3287         overrides static method is method is artificial.
3289         (build_static_field_ref): Disable atable references to static
3290         fields for the time being.
3292         (layout_class_methods): Check for CLASS_INTERFACE as
3293         well as CLASS_ABSTRACT.
3295 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3297         * class.c (make_class_data): Don't check flag_inline_functions.
3298         * lang.c (flag_really_inline): Remove unused flag.
3299         (java_handle_option): Don't set it here.  Remove special handling
3300         of flag_inline_functions for Java.
3301         (java_init): Don't set flag_inline_trees here.  Already done...
3302         (java_post_options): ...here.  Don't clear flag_inline_functions.
3304 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3306         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3307         (java_gimplify_exit_block_expr): New function.
3308         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3309         LABELED_BLOCK_EXPR.
3310         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3311         (EXIT_BLOCK_EXPR): Likewise.
3312         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3313         (LABELED_BLOCK_BODY): Likewise.
3314         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3315         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3316         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3317         TREE_OPERAND.
3318         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3319         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3320         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3321         second operand of EXIT_BLOCK_EXPR.
3322         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3323         TREE_OPERAND.
3324         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3326 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3328         * xref.h (xref_flag_value): Remove.
3329         (xref_set_data, xref_get_data): Likewise.
3330         (xref_set_current_fp): Likewise.
3331         (XREF_NONE): Likewise.
3332         (XREF_GET_DATA): Likewise.
3333         * xref.c (xref_flag_value): Remove.
3334         (xref_set_data, xref_get_data): Likewise.
3335         (xref_set_current_fp): Likewise.
3337 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3339         * gjavah.c (output_directory): Make static.
3340         (temp_directory): Likewise.
3342 2004-11-15  Tom Tromey  <tromey@redhat.com>
3344         * decl.c (instn_ptr_type_node): Removed.
3345         (lineNumbers_ptr_type_node): Removed.
3346         (jint_type): Removed.
3347         (jint_ptr_type): Removed.
3349 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3351         PR java/15576
3352         * check-init.c (check_init): Ignore DECL_EXPR.
3353         * expr.c (always_initialize_class_p): Reenable.
3354         (build_class_init): Use a variable to store the decl.  Also use
3355         boolean_false_node instead of integer_zero_node.
3356         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3357         to the block.
3359 2004-11-08  Tom Tromey  <tromey@redhat.com>
3361         PR java/16843:
3362         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3363         generating a JNI header.
3364         (print_field_info): Handle JNI headers.
3365         (jni_print_float): Likewise.
3366         (jni_print_double): Likewise.
3368 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
3370         * decl.c (end_java_method): Remove duplicated code.
3372 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
3373             Gerald Pfeifer  <gerald@pfeifer.com>
3375         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3376         as well.
3378 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
3380         PR java/17265
3381         * class.c: Reinstate 2004-08-18 patch.
3382         (make_local_function_alias): Don't create an alias for extern (native)
3383         functions.
3385 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3387         PR java/17265
3388         * class.c (make_local_function_alias): Revert 2004-08-18 change.
3389         (make_method_value): Likewise.
3391 2004-10-21  Andrew Haley  <aph@redhat.com>
3393         PR java/18091:
3394         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3396 2004-10-20  Andrew Haley  <aph@redhat.com>
3398         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3399         Remove duplicated code block.
3401 2004-10-18  Steven Bosscher  <stevenb@suse.de>
3403         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3404         New rules to work around old Bison warnings.
3406 2004-10-17  Steven Bosscher  <stevenb@suse.de>
3408         * class.c (ident_subst): Always alloca buffer.
3409         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3410         opcode after including javaop.def.
3411         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3412         conditional expression that exits, to avoid warnings.
3413         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3414         a user of an extension.
3415         * win32-host.c: Move check down to have non-empty file when
3416         WIN32 is not defined.
3418         * Make-lang.in (java-warn): Add STRICT_WARN.
3419         (java/jcf-io.o-warn): Don't have Werror for this file.
3420         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3422 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
3424         * expr.c (expr_add_location): Move declaration to before all
3425         statements.
3426         * parse.y (java_expand_classes): Ditto.
3427         * lex.c (java_peek_unicode): Ditto.
3429 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3431         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3432         if possible, else convert `foo' to 'foo'.
3433         * class.c: Likewise.
3434         * decl.c: Likewise.
3435         * expr.c: Likewise.
3436         * jcf-io.c: Likewise.
3437         * jcf-parse.c: Likewise.
3438         * lang.c: Likewise.
3439         * lex.c: Likewise.
3440         * parse.h: Likewise.
3442 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3444         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3445         rename parameter 'msg' to 'msgid' in function declaration.
3446         (issue_warning_error_from_context): Likewise.
3447         (yyerror): Rename parameter 'msg' to 'msgid'.
3448         (all over): Use new quoting style for diagnostics.
3450 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
3452         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3453         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3454         Update copyright.
3456 2004-10-14  Matt Austern  <austern@apple.com>
3458         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3459         pointer_set_t* now.
3461 2004-10-13  Tom Tromey  <tromey@redhat.com>
3463         PR java/15578:
3464         * lang.opt (--extdirs): Document.
3465         * jvspec.c (lang_specific_driver): Recognize -encoding and
3466         -extdirs.
3468 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
3470         * parse.y (issue_warning_error_from_context): Use va_list *
3471         instead of va_list parameter.
3472         (parse_error_context): Update call.
3473         (parse_warning_context): Likewise.
3475 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
3477         * parse.y, parse-scan.y: Add list of diagnostic messages to
3478         insulate translation template from version of yacc/bison used
3479         to compile the grammar.
3481 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
3483         Prepare for %q, %< and %> in diagnostic message strings.
3484         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3485         Name second parameter 'msgid'.
3486         * parse.y: Additionally include pretty-print.h and diagnostic.h.
3487         (issue_warning_error_from_context): Use pretty-printer functions
3488         instead of vsprintf for constructing formatted messages. Rename
3489         parameter 'msg' to 'msgid'.
3490         (parse_error_context): Rename parameter 'msg' to 'msgid'.
3491         (parse_warning_context): Likewise.
3493 2004-10-05  Andrew Haley  <aph@redhat.com>
3495         PR java/17779
3496         * jcf-parse.c (parse_zip_file_entries): If a class has a
3497         superclass and a TYPE_SIZE of zero, lay it out.
3499 2004-09-30  Andrew Haley  <aph@redhat.com>
3501         PR java/17733
3502         * jcf-parse.c (compute_class_name): Rewrite.
3504 2004-10-01  Jan Hubicka  <jh@suse.cz>
3506         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3508 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3510         * lex.c: Fix a comment typo.
3512 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3514         * java-tree.h: Fix a comment typo.
3516 2004-09-30  Per Bothner  <per@bothner.com>
3518         Simplify lexer.  Implement --enable-mapped-location support.
3519         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
3520         (parse_source_file_1): Pass filename as extra parameter, so we can call
3521         linemap_add and set input_location here, rather than in both callers.
3522         (read_class): Pass copied filename to parse_source_file_1.
3523         Don't initialize wfl_operator - only needed for source compilation.
3524         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
3525         * lex.h:  Remove a bunch of debugging macros.
3526         * lex.h (struct_java_line, struct java_error):  Remove types.
3527         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
3528         (struct java_lc_s):  Remove prev_col field.
3529         (struct java_lexer):  New fields next_unicode, next_columns, and
3530         avail_unicode.  New position field, and maybe token_start field.
3531         Don't need hit_eof field - use next_unicode == -1 instead.
3532         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
3533         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
3534         * parse.h:  Various changes for USE_MAPPED_LOCATION.
3535         (EXPR_WFL_EMIT_LINE_NOTE): XXX
3536         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3537         (struct parser_ctxt):  New file_start_location field.
3538         Remove p_line, c_line fields since we no longer save lines.
3539         Remove elc, lineno, and current_jcf fields - no longer used.
3540         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
3541         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3542         source_location and is probably not needed anymore anyway.
3543         Use new expr_add_Location function.
3544         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
3545         (java_pop_parser_context):  Minor cleanup.
3546         (java_parser_context_save_global, java_parser_context_restore_global,
3547         java_pop_parser_context):  Save/restore input_location as a unit.
3548         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
3549         a source_location instead of a wfl context node.
3550         (check_class_interface_creation):  input_filename is not addressable.
3551         (create_artificial_method):  Calling java_parser_context_save_global
3552         and java_parser_context_restore_global is overkill.  Instead,
3553         temporarily set input_location from class decl.
3554         (java_layout_seen_class_methods): Set input_location from method decl.
3555         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
3556         (finish_loop_body):  Likewise.
3557         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
3558         (java_sprint_unicode):  Take a character, not index in line.
3559         (java_sneak_uncode):  Replaced by java_peek_unicode.
3560         (java_unget_unicode):  No longer used.
3561         (java_allocate_new_line. java_store_unicode):  Removed, since we
3562         no longer remember "lines".
3563         (java_new_lexer):  Update for new data structures.
3564         (java_read_char):  Move unget_value checking to java_read_unicode.
3565         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
3566         efficient functions that are used directly when lexing.
3567         (java_read_unicode_collapsing_terminators):  No longer needed.
3568         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
3569         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
3570         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
3571         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
3572         combine switch branches, and test for common token kinds earlier.
3573         (java_lex_error):  Rewrite.
3574         * jv-scan.c (expand_location): New function, copied from tree.c.
3575         (main): Set ctxp->filename instead of setting input_filename directly.
3577 2004-09-30  Per Bothner  <per@bothner.com>
3579         More cleanup for --enable-mapped-location.
3580         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
3581         input_location here.  Instead do it in give_name_to_class.
3582         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
3583         * expr.c (expand_byte_code): Call linemap_line_start.
3584         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
3585         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
3586         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
3587         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
3588         to USE_MAPPED_LOCATION case.
3590         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
3591         * jcf-parse.c (java_parse_file): Don't set input_filename.
3592         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
3593         Create a list of TRANSLATION_UNIT_DECL.
3594         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
3595         reason is so we can set a DECL_SOURCE_LOCATION for each file.
3596         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
3597         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
3598         (file_start_location):  New static.
3599         (set_source_filename):  Avoid extra access to input_filename macro.
3600         Concatenate new name with class's package prefix.
3601         (set_source_filename, give_name_to_class): Update.
3602         (give_name_to_class):  Set class's "line 0" input_location here.
3603         (parse_class_file):  Set input_location as a unit.
3605         * jcf-parse.c (load_class): Sanity test if missing inner class file.
3607 2004-09-29  Per Bothner  <per@bothner.com>
3609         * java-tree.h:  Redefine some macros and add some declaration
3610         to handle the USE_MAPPED_LOCATION case.
3611         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
3612         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
3613         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
3614         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
3616         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
3617         * decl.c (finish_method, java_add_stmt): Likewise.
3618         * java-gimplify.c (java-gimplify.c):  Likewise.
3619         * jcf-write.c (generate_bytecode_insns):  Likewise.
3620         * lang.c (java_post_options): Likewise - call linemap_add.
3622 2004-09-29  Andrew Haley  <aph@redhat.com>
3624         PR java/17007
3625         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
3626         result of TRUNC_MOD_EXPR.
3627         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
3628         * decl.c (java_init_decl_processing): Mark
3629         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
3631 2004-09-28  Tom Tromey  <tromey@redhat.com>
3633         PR java/15710:
3634         * class.c (add_miranda_methods): Load superinterface if not
3635         already loaded.
3637 2004-09-28  Andrew Haley  <aph@redhat.com>
3639         PR java/17586
3640         * jcf-parse.c (load_class): Don't try to read a class that we've
3641         already read.
3643 2004-09-28  Andrew Haley  <aph@redhat.com>
3645         * jcf-parse.c (load_class): Back out previous broken patch.
3647 2004-09-28  Andrew Haley  <aph@redhat.com>
3649         PR java/17586
3650         * jcf-parse.c (load_class): Don't try to read a class that we've
3651         already read.
3652         Check that we really did read the right class.
3654 2004-09-25  Tom Tromey  <tromey@redhat.com>
3656         PR java/17500:
3657         * parse.y (create_artificial_method): Use add_method_1.
3659 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
3661         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3662         comment typos.
3663         * gcj.texi: Fix typos.
3665 2004-09-24  Tom Tromey  <tromey@redhat.com>
3667         PR java/15656:
3668         * parse.y (class_instance_creation_expression): Set `$$' to NULL
3669         in error parts of rule.
3670         (unary_expression): Don't call error_if_numeric_overflow when $1
3671         is NULL.
3673 2004-09-24  Tom Tromey  <tromey@redhat.com>
3675         PR java/16789:
3676         * parse.y (resolve_qualified_expression_name): Set
3677         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
3678         * expr.c (force_evaluation_order): Check for empty argument list
3679         after stripping COMPOUND_EXPR.
3681 2004-09-23  Andrew Haley  <aph@redhat.com>
3683         PR java/16927:
3684         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
3685         COND_EXPRs.
3687 2004-09-23  Tom Tromey  <tromey@redhat.com>
3689         PR java/17329:
3690         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
3691         where operand is null.
3693 2004-09-23  Tom Tromey  <tromey@redhat.com>
3695         PR java/17380:
3696         * parse.y (not_accessible_p): Allow access to protected members
3697         even when class is not static.
3699 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
3701         * Make-lang.in: Revert the gcc-none.o change.
3703 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3705         * parse.y (patch_anonymous_class): VEC_space returns true if there
3706         is space.
3708 2004-09-21  Matt Austern  <austern@apple.com>
3710         Fix bootstrap.
3711         * gjavah.c (free_method_name_list): Fix function definition so
3712         it's a proper C prototype.
3714 2004-09-21  Tom Tromey  <tromey@redhat.com>
3716         PR java/17575:
3717         * gjavah.c (free_method_name_list): New method.
3718         (main): Call it.
3720 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3721             Zack Weinberg  <zack@codesourcery.com>
3723         * java-tree.def: Use tree_code_class enumeration constants
3724         instead of code letters.
3725         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
3726         new tree-class enumeration constants.
3728 2004-09-13  Tom Tromey  <tromey@redhat.com>
3730         PR java/17216:
3731         * class.c (layout_class_method): Put synthetic methods into the
3732         vtable.
3734 2004-09-11  Andrew Pinski  <apinski@apple.com>
3736         * Make-lang.in (java/ggc-none.c): Change dependency
3737         for ggc.h into $(GGC_H).
3739 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3741         * Make-lang.in (java/win32-host.o): Add dependency on
3742         coretypes.h.
3743         * win32-host.c: Add includes for coretypes.h, jcf.h
3745 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3747         * Make-lang.in (GCJH_OBJS): Change dependency from
3748         ggc-none.o to java/ggc-none.o
3749         (JCFDUMP_OBJS): Likewise.
3750         (java/ggc-none.o): New target.
3752 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3754         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
3755         * class.c (build_utf8_ref, build_static_field_ref,
3756         make_field_value, make_method_value, get_dispatch_table,
3757         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3758         * constants.c (get_tag_node, build_ref_from_constant_pool,
3759         build_constants_constructor): Likewise.
3760         * decl.c (java_init_decl_processing): Likewise.
3761         * expr.c (build_java_array_length_access, build_newarray,
3762         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3763         build_java_binop, build_field_ref, expand_java_add_case,
3764         expand_java_call, build_known_method_ref, build_invokevirtual,
3765         build_invokeinterface, build_jni_stub): Likewise.
3766         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3767         * jcf-parse.c (get_constant): Likewise.
3768         * lex.c (do_java_lex): Likewise.
3769         * parse.y (patch_binop, patch_unaryop, patch_cast,
3770         build_newarray_node, patch_newarray): Likewise.
3771         * resource.c (compile_resource_data): Likewise.
3772         * typeck.c (build_prim_array_type): Likewise.
3774 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3776         * decl.c (java_init_decl_processing): Adjust
3777         initialize_sizetypes call.
3779 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3781         * jv-scan.c (fancy_abort): Add.
3783 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
3785         * expr.c (build_java_arrayaccess): Use convert to change
3786         len's type.
3788 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
3790         * class.c (make_local_function_alias): Allocate extra space for 'L'
3791         in name buffer. Reported by Thomas Neumann.
3793 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3795         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
3796         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
3797         * lex.c (do_java_lex): Adjust.
3798         (error_if_numeric_overflow): Likewise.
3800 2004-08-18  Andrew Pinski  <apinski@apple.com>
3802         * class.c (make_local_function_alias): Only make a new decl if we
3803         support alias attribute on all decls.
3805 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
3807         * class.c (make_local_function_alias): New function. Create local
3808         alias for public method DECL.
3809         (make_method_value): Use make_local_function_alias.
3810         * parse.y (craft_constructor): Don't special-case anonymous classes.
3811         Always set ctor_name to init_identifier_node.
3812         (lookup_method_invoke): Call layout_class_method when creating
3813         anonymous class constructor.
3815 2004-08-18  Richard Henderson  <rth@redhat.com>
3817         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
3818         default case.  Treat '<' similarly.  Update for
3819         is_gimple_formal_tmp_var name change.
3821 2004-08-17  Andrew Haley  <aph@redhat.com>
3823         * lang.c (lang_printable_name): Obey verbose flag.
3824         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
3825         lang_printable_name().
3826         (verify_constructor_circularity, get_printable_method_name,
3827         check_abstract_method_definitions, java_check_regular_methods,
3828         java_check_abstract_methods, check_inner_class_access,
3829         fix_constructors, patch_method_invocation, patch_return):
3830         Likewise.
3831         * expr.c (pop_type_0): Likewise.
3833         * java-tree.h (lang_printable_name_wls): Delete.
3835 2004-08-16  Tom Tromey  <tromey@redhat.com>
3837         PR java/8473:
3838         * parse.y (primary): Changed for initialized and uninitialized
3839         array creations.
3840         (array_access): Handle array_creation_initialized.
3841         (array_creation_expression): Split into
3842         array_creation_initialized and array_creation_uninitialized.
3844 2004-08-16  Andrew Haley  <aph@redhat.com>
3846         * jcf-write.c (find_constant_index): Canonicalize NaNs when
3847         generating bytecode.
3849 2004-08-16  Elliot Lee <sopwith@redhat.com>
3851         PR java/9677
3852         * jcf-parse.c (java_parse_file): Handle filenames with embedded
3853         spaces, and quoted filelists.
3855 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3857         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
3858         * class.c (build_utf8_ref, build_static_field_ref,
3859         make_field_value, make_method_value, get_dispatch_table,
3860         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3861         * constants.c (get_tag_node,  build_ref_from_constant_pool,
3862         build_constants_constructor): Likewise.
3863         * decl.c (java_init_decl_processing): Likewise.
3864         * expr.c (build_java_array_length_access, build_newarray,
3865         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3866         build_java_binop, build_field_ref, expand_java_add_case,
3867         expand_java_call, build_known_method_ref, build_invokevirtual,
3868         build_invokeinterface, build_jni_stub): Likewise.
3869         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3870         * jcf-parse.c (get_constant): Likewise.
3871         * lex.c (do_java_lex): Likewise.
3872         * parse.y (patch_binop, patch_unaryop, patch_cast,
3873         build_null_of_type, patch_newarray): Likewise.
3874         * resource.c (compile_resource_data): Likewise.
3875         * typeck.c (build_prim_array_type): Likewise.
3877 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
3879         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
3880         Don't create BLOCK here or call java_gimplify_block.
3882 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3884         * java-tree.h (flag_deprecated): Removed.
3885         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
3886         * parse.y (check_deprecation): Check warn_deprecated instead of
3887         flag_deprecated.
3889 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
3891         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
3892         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
3893         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
3894         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
3895         flag_force_classes_archive_check, flag_optimize_sci,
3896         flag_indirect_dispatch): Remove explicit declarations.
3897         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
3898         final comment.
3900 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
3902         PR bootstrap/14893
3903         * Make-lang.in (java.install-man): Install from either build
3904         tree or source tree, whichever has the file first.
3906 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
3908         * jcf-parse.c (get_constant): Adjust force_fit_type call.
3909         * lex.h (SET_LVAL_NODE_TYPE): Remove.
3910         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
3911         (do_java_lex): Likewise. Adjust force_fit_type call.
3913 2004-08-04  Roger Sayle  <roger@eyesopen.com>
3914             Andrew Haley  <aph@redhat.com>
3916         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
3917         checking trees as they're being built.
3918         (convert): Call convert_ieee_real_to_integer if we're
3919         converting a constant, even if we're writing a class file.
3921 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
3923         PR java/16701
3924         * parse.y (fold_constant_for_init): Call resolve_field_access with
3925         correct current_class context.
3927 2004-08-01  Roger Sayle  <roger@eyesopen.com>
3929         * decl.c (update_aliases, initialize_local_variable): Replace calls
3930         to build with calls to buildN.
3931         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
3932         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
3933         * parse.h (BUILD_THROW): Likewise.
3934         * parse.y (switch_expression, synchronized_statement,
3935         catch_clause_parameter, array_creation_expression,
3936         conditional_expression, make_qualified_name,
3937         resolve_qualified_expression_name, patch_method_invocation,
3938         patch_invoke, build_method_invocation, build_new_invocation,
3939         build_assignment, patch_assignment, build_binop, patch_binop,
3940         build_string_concatenation, build_incdec, patch_unaryop,
3941         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
3942         patch_return, build_if_else_statement, build_labeled_block,
3943         build_new_loop, build_loop_body, build_bc_statement,
3944         build_assertion, encapsulate_with_try_catch, build_try_statement,
3945         build_try_finally_statement, patch_synchronized_statement,
3946         emit_test_initialization): Likewise, replace build with buildN.
3948 2004-07-28  Eric Christopher  <echristo@redhat.com>
3950         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3951         (java_unsafe_for_reeval): Ditto.
3953 2004-07-26    <hp@bitrange.com>
3955         * parse.y (build_super_invocation): Adjust declaration order to
3956         avoid declaration after statement.
3958 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
3960         * decl.c: Rename all identifiers named `class' to `cl'.
3962 2004-07-25  Richard Henderson  <rth@redhat.com>
3964         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
3966 2004-07-23  Mike Stump  <mrs@apple.com>
3968         * boehm.c (set_bit): Improve type safety wrt unsignedness.
3969         * gjavah.c (throwable_p, decode_signature_piece,
3970         print_full_cxx_name, print_include, add_namelet, add_class_decl,
3971         process_file): Likewise.
3972         * jcf-dump.c (main): Likewise.
3973         * jcf-io.c (read_zip_member): Likewise.
3974         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
3975         give_name_to_class, get_class_constant): Likewise.
3976         * jcf-write.c (find_constant_wide, push_long_const,
3977         generate_classfile): Likewise.
3978         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
3979         * parse.y (read_import_dir): Likewise.
3980         * typeck.c (parse_signature_type): Likewise.
3981         * verify.c (verify_jvm_instructions): Likewise.
3982         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
3984 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3986         * Make-lang.in: Replace rmic and rmiregistry references with
3987         grmic and grmiregistry.
3988         * gcj.texi: Likewise.
3990 2004-07-20  Andrew Haley  <aph@redhat.com>
3992         PR java/16431.
3993         * verify.c (verify_jvm_instructions): Comment change only.
3995         * typeck.c (build_java_array_type): Add size field to array name.
3997         * java-tree.h (LOCAL_SLOT_P): New.
3998         (update_aliases): Add PC argument.
3999         (pushdecl_function_level): New function.
4001         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4002         MODIFY_EXPR, and SAVE_EXPR.
4003         (java_gimplify_modify_expr): New function.
4005         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4006         (expand_iinc): Pass PC to update_aliases().
4007         (STORE_INTERNAL): Likewise.
4008         (process_jvm_instruction): Likewise.
4010         * decl.c (base_decl_map): New variable.
4011         (uniq): New variable.
4012         (update_aliases): Rewrite with more thorough checking.
4013         (debug_variable_p): New function.
4014         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4015         (check_local_named_variable): Delete whole function.
4016         (initialize_local_variable): New function.
4017         (check_local_unnamed_variable): Add checks and comments.
4018         (find_local_variable): Rewrite.
4019         (java_replace_reference): New function.
4020         (function_binding_level): New variable.
4021         (pushdecl_function_level): New function.
4022         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4023         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4024         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4025         function_binding_level.
4026         (end_java_method): Null unused fields to save memory.
4028 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4030         * class.c (add_interface_do): Remove.
4031         (set_super_info, interface_of_p, maybe_add_interface,
4032         add_interface, make_class_data, layout_class,
4033         add_miranda_methods): Adjust BINFO accessors and addition.
4034         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4035         accessors.
4036         * jcf-write.c (generate_classfile): Likewise.
4037         * parse.y (patch_anonymous_class, check_inner_circular_reference,
4038         check_circular_reference, java_complete_class,
4039         check_abstract_method_definitions,
4040         java_check_abstract_method_definitions,
4041         check_interface_throws_clauses, java_check_abstract_methods,
4042         lookup_java_interface_method2,
4043         find_applicable_accessible_methods_list): Adjust BINFO accessors
4044         and addition.
4045         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4047 2004-07-18  Roger Sayle  <roger@eyesopen.com>
4049         * builtins.c (max_builtin, min_builtin,
4050         java_build_function_call_expr): Replace calls to build with buildN.
4051         * class.c (build_class_ref, build_static_field_ref,
4052         get_dispatch_table, make_class_data, layout_class_method): Likewise.
4053         * constants.c (build_ref_from_constant_pool): Likewise.
4054         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4055         add_stmt_to_compound): Likewise.
4056         * except.c (build_exception_object_ref, expand_end_java_handler):
4057         Likewise.
4058         * java-gimplify.c (java_gimplify_case_expr,
4059         java_gimplify_default_expr, java_gimplify_block,
4060         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4061         * jcf-write.c (generate_bytecode_insns): Likewise.
4062         * typeck.c (convert_ieee_real_to_integer): Likewise.
4064 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4066         * java-tree.h (builtin_function): Declare.
4068 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4070         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4071         abuse restore_line_number_status.
4073 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
4075         g++/15861
4076         * jcf-parse.c (java_emit_static_constructor): Specify default
4077         priority.
4079 2004-07-13  Per Bothner  <per@bothner.com>
4081         * java-tree.h (all_class_filename):  Remove useless macro.
4082         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
4083         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
4084         * parse.y (java_parser_context_restore_global):  Replace
4085         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4086         * jcf-parse.c (read_class, java_parse_file):  Likewise.
4088 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
4090         PR java/16474
4091         gjavah.c (print_field_info): Emit constant only if field is static.
4093 2004-07-11  Roger Sayle  <roger@eyesopen.com>
4095         * expr.c (java_truthvalue_conversion, flush_quick_stack,
4096         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4097         build_java_ret, build_java_throw_out_of_bounds_exception,
4098         build_java_array_length_access, java_check_reference,
4099         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4100         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4101         expand_java_arrayload, build_java_monitor, expand_java_return,
4102         expand_load_internal, expand_java_NEW, build_get_class,
4103         build_instanceof, expand_java_CHECKCAST, expand_iinc,
4104         build_java_soft_divmod, build_java_binop, build_field_ref,
4105         expand_compare, expand_java_goto, expand_java_switch,
4106         expand_java_add_case, build_class_init, build_known_method_ref,
4107         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4108         expand_invoke, build_jni_stub, expand_java_field_op,
4109         java_expand_expr, expand_byte_code, STORE_INTERNAL,
4110         force_evaluation_order, emit_init_test_initialization): Convert
4111         calls to "build" into calls to the prefered "buildN" functions.
4113 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4115         * java-tree.h (set_block): Remove.
4116         * lang.c (java_clear_binding_stack): New.
4117         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4118         * decl.c (struct binding_level): Remove this_block.
4119         (clear_binding_level): Likewise.
4120         (poplevel): Don't handle this_block.
4121         (set_block): Remove.
4123 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
4125         * class.c (common_enclosing_context_p): Remove statement with no
4126         side-effects.
4128 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4130         PR java/8618
4131         * parse.y (create_anonymous_class): Remove 'location' argument. Use
4132         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4133         (craft_constructor): Inherit access flags for implicit constructor
4134         from the enclosing class.
4135         (create_class): Fix comment typo.
4136         (resolve_qualified_expression_name): Pass type of qualifier to
4137         not_accessible_p, not the type in which target field was found.
4138         (not_accessible_p): Handle inner classes. Expand protected
4139         qualifier-subtype check to enclosing instances, but don't apply this
4140         check to static members. Allow protected access to inner classes
4141         of a subtype. Allow private access within common enclosing context.
4142         (build_super_invocation): Get WFL line number info from current
4143         class decl.
4144         (build_incomplete_class_ref): Update for new create_anonymous_class
4145         signature.
4146         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4147         common_enclosing_instance_p.
4148         * class.c (common_enclosing_context_p): New. Determine if types
4149         share a common enclosing context, even across static contexts.
4150         (common_enclosing_instance_p): Renamed from
4151         common_enclosing_context_p. Determines if types share a common
4152         non-static enclosing instance.
4153         * java-tree.h (common_enclosing_instance_p): Declare.
4154         * jcf-write.c (get_method_access_flags): New. Surpress private flag
4155         for inner class constructors.
4156         (generate_classfile): Use get_method_access_flags.
4158 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4160         * class.c (interface_of_p): Check for null TYPE_BINFO.
4162 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
4164         * class.c (make_class): Do not create binfo here.
4165         (set_super_info): Create it here.
4166         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4168 2004-07-08  Richard Henderson  <rth@redhat.com>
4170         * expr.c (case_identity, get_primitive_array_vtable,
4171         java_expand_expr, emit_init_test_initialization): Remove.
4172         * java-tree.h (java_expand_expr): Remove.
4173         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4175 2004-07-07  Per Bothner  <per@bothner.com>
4177         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
4178         get internal error due to mismatched types.
4180         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4182         * gcj.texi (Linking):   New node.  Document -lgij usage.
4184 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4186         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4187         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4188         * java/class.c (set_super_info, class_depth, interface_of_p,
4189         maybe_add_interface, add_interface, make_class_data,
4190         layout_class, add_miranda_methods): Adjust BINFO macros.
4191         * expr.c (can_widen_reference_to, lookup_field): Likewise.
4192         * jcf-write.c (generate_classfile): Likewise.
4193         * parse.y (patch_anonymous_class,
4194         check_inner_circular_reference, check_circular_reference,
4195         java_complete_class, check_abstract_method_definitions,
4196         java_check_abstract_method_definitions,
4197         check_interface_throws_clauses, java_check_abstract_methods,
4198         lookup_java_interface_method2,
4199         find_applicable_accessible_methods_list): Likewise.
4200         * typeck.c (find_method_in_interface): Likewise.
4201         * verify.c (merge_types): Likewise.
4203 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4205         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4206         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4208 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4210         * class.c (make_class): Use make_tree_binfo.
4211         (set_super_info, add_interface_do): Likewise.
4212         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4214 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4216         * verify.c: Correct array element access formatting thinko.
4218 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4220         * verify.c: Insert a short blurb at the start referring to the JVMS.
4221         (merge_type_state): Remove redundant nested if statement.
4222         (verify_jvm_instructions): Ensure current_subr is initialised to
4223         NULL_TREE.
4224         Minor formatting fixes all over the place.
4226 2004-07-02  Richard Henderson  <rth@redhat.com>
4228         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4230 2004-07-01  Richard Henderson  <rth@redhat.com>
4232         * class.c (registerClass_libfunc): Remove.
4233         (init_class_processing): Don't set it.
4234         (emit_register_classes): Take list_p parameter.  Fill it in
4235         with _Jv_RegisterClass calls.
4236         * decl.c (java_init_decl_processing): Don't call
4237         init_resource_processing.
4238         * jcf-parse.c (java_emit_static_constructor): New.
4239         (java_parse_file): Call it.
4240         * resource.c (registerResource_libfunc): Remove.
4241         (init_resource_processing): Remove.
4242         (write_resource_constructor): Take list_p parameter.  Fill it in
4243         with _Jv_RegisterResource calls.
4244         * java-tree.h: Update prototypes.
4246 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4248         PR java/1262
4249         * class.c (layout_class_method): Do not override package-private
4250         method if its in a different package.
4251         (split_qualified_name): Move here from parse.y. Rename from
4252         breakdown_qualified. Add comment.
4253         (in_same_package): Move here from parse.y. Add comment.
4254         * java-tree.h (break_down_qualified, in_same_package): Declare.
4255         (in_same_package): Likewise.
4256         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4257         Callers updated.
4259 2004-06-29  Andrew Haley  <aph@redhat.com>
4261         * except.c (expand_start_java_handler): Push a new binding level.
4262         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4263         register_exception_range() to register where we'll do it.
4264         (expand_end_java_handler): Remove old bogus code.  Replace with
4265         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4266         the top of the expression we're curently building.
4267         (maybe_end_try): Delete.
4268         * decl.c (binding_level.exception_range): New field.
4269         (clear_binding_level): Add field exception_range.  Reformat.
4270         (poplevel): Call expand_end_java_handler().
4271         (poplevel): Call java_add_stmt only if functionbody is false.
4272         (maybe_poplevels): Don't call maybe_end_try() from here.
4273         (end_java_method): Clear no longer used trees in function decl.
4274         (register_exception_range): New function.
4275         * java-tree.h (register_exception_range, struct eh_range): Declare.
4277 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4279         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4281 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4283         Formatting fixes.
4284         * expr.c (class_has_finalize_method): Fix method name indentation.
4285         (expand_java_call): Remove K&R style parameter declaration.
4286         (expand_invoke): Fix statement indentation.
4287         (expand_java_field_op): Likewise.
4288         * parse-scan.y: Fix typo.
4289         (reset_report): Fix method name indentation.
4290         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4291         line. Fix typos.
4292         * verify.c (verify_jvm_instructions): Document parameters, insert
4293         page break.
4294         * lang.c (lang_init_source): Fix method name indentation.
4295         * class.c (common_enclosing_context_p): Likewise.
4296         (emit_symbol_table): Fix parameter list indentation.
4297         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4298         parameter declaration.
4299         * constants.c: Fix copyright notice indentation.
4300         * typeck.c (find_method_in_superclasses): Fix parameter list
4301         indentation.
4302         (find_method_in_interfaces): Likewise.
4303         * zextract.c (makelong): Fix method name indentation.
4305 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4307         PR java/15715.
4308         * parse.y (create_interface): Set correct access modifiers for
4309         interfaces.
4310         * jcf-write.c (get_classfile_modifiers): New function.
4311         (generate_classfile): Use get_classfile_modifiers, not
4312         get_access_flags.
4314 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4316         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4317         dependency to current parser context, not NULL_TREE, for top-level
4318         classes.
4319         (jdep_resolve_class): Enable member access check for all inner
4320         class dependencies.
4322 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4324         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4325         load_class.
4327 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4329         PR java/15734
4330         * expr.c (expand_java_field_op): Ensure that target class for static
4331         field access has been loaded.
4333 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4334             Ranjit Mathew  <rmathew@hotmail.com>
4336         PR java/1207, java/16178
4337         * jcf-parse.c (load_class): Return immediately if passed a type decl
4338         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4339         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4340         before calling load_class.
4341         (qualify_and_find): Likewise.
4342         (find_in_imports_on_demand): Likewise.
4343         (find_applicable_accessible_methods_list): Likewise.
4345 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4347         * parse.y (java_layout_seen_class_methods): Don't call load_class
4348         on class defined by source parser.
4350 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4352         * parse.y (set_nested_class_simple_name_value): Removed.
4353         (java_complete_expand_class): Remove calls to
4354         set_nested_class_simple_name_value.
4356 2004-06-22  Andrew Haley  <aph@redhat.com>
4357             Ranjit Mathew  <rmathew@hotmail.com>
4359         Fixes PR java/16113.
4360         * decl.c (force_poplevels): Remove call to expand_end_bindings.
4362 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
4364         * parse.y (create_class): Correct diagnostic message about
4365         java.lang.Object extending anything else.
4367 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4369         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4370         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4371         * constants.c (build_ref_from_constant_pool): Likewise.
4372         * expr.c (build_java_array_length_access): Likewise.
4373         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4374         (invoke_build_dtable, build_invokevirtual): Likewise.
4375         (build_invokeinterface, java_expand_expr): Likewise.
4376         (emit_init_test_initialization): Likewise.
4377         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4378         * parse.y (make_qualifed_name, build_array_ref): Likewise.
4380 2004-06-21  Andrew Haley  <aph@redhat.com>
4382         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4383         block.
4385 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4387         * jcf.h (struct JCF): Change java_source, right_zip and finished
4388         to unsigned int.
4389         * lex.h (struct java_lexer): Change hit_eof, read_anything,
4390         byte_swap and use_fallback to unsigned int.
4391         * parse.h (struct _jdep): Change flag0 to unsigned int.
4393 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
4395         Fixes PR java/13948
4396         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4397         before trying to lay out its methods.
4398         * jcf-parse.c (read_class): Track parsed files using canonical paths
4399         obtained via lrealpath from libiberty.
4400         (java_parse_file): Likewise.
4401         (parse_source_file_1): Rename formal parameter to reflect its
4402         modified purpose. Minor formatting fix.
4404 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4406         * class.c (emit_register_classes): Make the function uninlinable,
4407         do not set current_function_cannot_inline.
4408         * resource.c (write_resource_constructor): Do not reset
4409         flag_inline_functions around rest_of_compilation.
4411 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
4413         PR java/15769
4414         * expr.c (java_truthvalue_conversion): Handle
4415         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4416         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4417         i.e. return the expression.
4419 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
4421         * gjavah.c: Include version.h
4423 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
4425         * jcf-write.c (generate_bytecode_conditional): Correct handling
4426         of unordered conditionals. Add comment.
4428 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
4429             Per Bothner  <per@bothner.com>
4431         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4432         local variable was initialised upon declaration.
4433         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4434         variable was final and initialised upon declaration.
4435         * check-init.c (check_final_reassigned): Give error only if a blank
4436         final is not definitely unassigned or if an initialised final is
4437         reassigned.
4438         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4439         assignment expressions. Remove case MODIFY_EXPR, label do_default.
4440         (check_init): Perform initialised-variable-removing-optimisation
4441         only on non-final local variables.
4443 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4445         * jcf-write.c (generate_bytecode_conditional): Handle binops
4446         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4447         and LTGT_EXPR.
4448         (generate_bytecode_insns): Likewise.
4450 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4452         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4453         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4455 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4457         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4458         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4460 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4462         * decl.c (struct binding_level): Add GTY marker. Compile
4463         binding_depth unconditionally.
4464         (current_binding_level, free_binding_level, global_binding_level):
4465         Likewise.
4466         (clear_binding_level): Unconditionally set binding_depth.
4467         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4469 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4471         * lex.c (java_new_lexer): Set 'encoding'.
4472         (java_read_char): Improve error message for unrecognized characters.
4473         * lex.h (struct java_lexer): New field 'encoding'.
4475 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4477         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4479 2004-05-21  Mark Wielaard  <mark@klomp.org>
4481         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4482         extern.
4484 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
4486         * typeck.c: Remove non-printable character 160.
4488 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
4490         * check-init.c: Correct minor typos.
4492 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4494         * Make-lang.in, expr.c, java-gimplify.c: Rename
4495         tree-simple.[ch] to tree-gimple.[ch].
4497 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
4499         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4501 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4503         Merge from tree-ssa-20020619-branch.  See
4504         ChangeLog.tree-ssa for details.
4506         * Make-lang.in, builtins.c, check-init.c, class.c,
4507         constants.c, decl.c, except.c, expr.c, java-except.h,
4508         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4509         lang.c, lang.opt, parse.y, resource.c: Merged.
4510         * java-gimplify.c: New file.
4512 2004-05-10  Andrew Haley  <aph@redhat.com>
4514         * parse.y (create_class): Set TYPE_VFIELD.
4515         * decl.c (java_init_decl_processing): Likewise.
4517         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4518         * class.c (make_method_value): Replace DECL_VINDEX with call to
4519         get_method_index().
4520         (get_dispatch_vector): Likewise.
4521         (layout_class_method): Likewise.
4522         Replace set of DECL_VINDEX with call to set_method_index().
4523         (set_method_index): New function.
4524         (get_method_index): New function.
4525         * java-tree.h (set_method_index): New function decl.
4526         (get_method_index): New function decl.
4528 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
4530         * parse.y (check_pkg_class_access): Add new argument
4531         and use it when cl is NULL to call lookup_cl on it.
4532         (parser_check_super_interface): Do not call lookup_cl.
4533         Pass this_decl to check_pkg_class_access and NULL
4534         instead of lookup_cl.
4535         (parser_check_super): Update for change in
4536         check_pkg_class_access.
4537         (do_resolve_class): Likewise.
4538         (process_imports): Likewise.
4539         (find_in_imports_on_demand): Likewise.
4540         (resolve_qualified_expression_name): Likewise.
4542 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
4544         Fixes PR java/9685, PR java/15073
4545         * parse.y (accessibility_string): New method.
4546         (not_accessible_field_error): Use accessibility_string()
4547         instead of java_accstring_lookup().
4548         (resolve_qualified_expression_name): Check with
4549         check_pkg_class_access() before allowing access using
4550         qualified names.
4551         Fix comment typo.
4552         Use check_pkg_class_access() instead of not_accessible_p()
4553         for unqualified types.
4554         (not_accessible_p): Use DECL_CONTEXT (member) instead of
4555         REFERENCE for package-private access checking.
4556         (patch_method_invocation): Use accessibility_string() instead
4557         of java_accstring_lookup().
4559 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
4561         Fixes PR java/15133
4562         * gjavah.c (struct method_name): Add member is_native.
4563         (overloaded_jni_method_exists_p): Match candidate method only if
4564         it is native.
4565         (print_method_info): Initialise is_native flag from the method's
4566         access flags.
4568 2004-04-30  Roger Sayle  <roger@eyesopen.com>
4570         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4571         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4573 2004-04-22  Roger Sayle  <roger@eyesopen.com>
4575         * resource.c (write_resource_constructor): Guard call to possibly
4576         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4578 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
4580         * class.c (make_class_data): Add new field aux_info.
4581         * decl.c (java_init_decl_processing): Push type and decl for
4582         `aux_info'.
4584 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
4586         * expr.c (expand_java_NEW): Don't use size argument for
4587         _Jv_AllocObject calls.
4588         * parse.y (patch_invoke): Likewise.
4590 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4592         * expr.c (build_invokeinterface): Remove unused variables to
4593         fix warnings.
4595 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4597         * class.c (get_interface_method_index): New function. Return dispatch
4598         index for interface method.
4599         (make_method_value): For interface methods, set index field to
4600         iface dispatch index, not DECL_VINDEX.
4601         * expr.c (build_invokeinterface): Use get_interface_method_index.
4603 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4605         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4607 2004-03-31  Andrew Haley  <aph@redhat.com>
4609         PR java/14104
4610         * jcf-io.c (opendir_in_zip): Tidy up error handling.
4612 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
4614         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4615         form of GTY markers.
4617 2004-03-25  Marcus Meissner  <meissner@suse.de>
4619         PR java/14689:
4620         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4622 2004-03-23  Tom Tromey  <tromey@redhat.com>
4624         PR java/14315:
4625         * jcf-write.c (make_class_file_name): Don't report if mkdir
4626         failed with EEXIST.
4628 2004-03-23  Tom Tromey  <tromey@redhat.com>
4630         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4632 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
4634         * class.c, gjavah.c, lang.c: Fix comment typos.
4635         * gcj.texi: Fix typos.
4637 2004-03-19  Per Bothner  <per@bothner.com>
4639         * gcj.texi (Code Generation):  Document new flags and assert defaults.
4641         * class.c (assume_compiled_node_struct):  Rename type to
4642         class_flag_node_struct, as it is now also used for enable_assertions.
4643         Rename assume_compiled_node typedef.  Rename excludep field to value.
4644         (find_assume_compiled_node):  Rename function to find_class_flag_node.
4645         Minor optimization - avoid needless strlen.
4646         (add_assume_compiled):  Some tweaking and optimization.
4647         Rename and generalize to add_class_flag takem an extra parameter.
4648         (add_assume_compled):  New just calls add_class_flag.
4649         (add_enable_assert, enable_assertions):  New functions.
4650         (enable_assert_tree):  New static.
4651         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
4652         * lang.opt (fenable-assertions, fenable-assertions=,
4653         fdisable-assertions, fdisable-assertions=):  New options.
4654         * lang.c (java_handle_option):  Handle new options.
4655         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
4656         class in an interface - create helper class nested in outer interface.
4657         (build_assertion):  Short-circuit if enable_assertions is false.
4659 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4661         * java-tree.h: Changes throughout to add checking to macros
4662         and numerous whitespace changes.
4663         (VAR_OR_FIELD_CHECK): New macro.
4664         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
4665         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
4667 2004-03-16  Per Bothner  <per@bothner.com>
4669         * jcf-jump.c (options):  New --print-constants option.
4670         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
4672         * jcf-dump.c (flag_print_constant_pool):  Default to off.
4673         (print_constant_terse_with_index):  New helper function.
4674         (various places):  Check flag_print_constant_pool where missing.
4675         (main):  If verbose set flag_print_constant_pool.
4676         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
4678 2004-03-15  Andrew Haley  <aph@redhat.com>
4680         PR java/14581
4681         * parse.y (java_complete_lhs): Check that final variable has an
4682         initializer.
4684 2004-03-12  Andrew Haley  <aph@redhat.com>
4686         PR java/14551
4687         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
4688         conversion.
4690 2004-02-29  Roger Sayle  <roger@eyesopen.com>
4692         * jcf-parse.c (java_parse_file): Handle the case that input_filename
4693         is NULL.
4695 2004-02-27  Per Bothner  <per@bothner.com>
4697         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
4698         suggestion:  Use build_incomplete_class_ref.
4699         This fixes PR java/13508, java/11714.
4701 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
4703         * java/parse.h: Update copyright.
4705 2004-02-26  Andrew Haley  <aph@redhat.com>
4707         PR java/14231:
4708         * parse.y (check_interface_throws_clauses): Check for
4709         !METHOD_INVISIBLE (iface_method).
4710         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
4711         well as CLASS_ABSTRACT.
4713 2004-02-25  Per Bothner  <per@bothner.com>
4715         * parse.y (build_assertion):  If we're in an inner class, create the
4716         class$ helper routine in the outer class.
4718 2004-02-19  Richard Henderson  <rth@redhat.com>
4720         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
4722 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
4724         * Make-lang.in (java.install-man): Add extra dependencies.
4726 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
4728         * Make-lang.in: Install man pages under the same names
4729         (possibly transformed) as the program they document.
4731 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
4733         * gjavah.c: Include "intl.h".
4734         (error): New function.
4735         (main): Call gcc_init_libintl.
4736         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
4737         print_stub_or_jni, process_file, main): Use error rather than
4738         fprintf.
4739         (print_method_info, usage, help, version, main): Mark strings for
4740         translation with _.  Avoid splitting up sentences.  Send
4741         information messages to stdout.
4742         * jcf-dump.c: Include "intl.h".
4743         (main): Call gcc_init_libintl.
4744         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
4745         Mark error, usage and version messages for translation with _.
4746         Avoid splitting up sentences.
4747         * jv-scan.c: Include "intl.h".
4748         (fatal_error, warning): Change parameter s to msgid.  Translate
4749         messages.
4750         (main): Call gcc_init_libintl.
4751         (usage, help, version): Mark error, usage and version messages for
4752         translation with _.  Avoid splitting up sentences.
4753         * jvgenmain.c: Include "intl.h".
4754         (main): Call gcc_init_libintl.
4755         (usage, main): Mark error messages for translation with _.
4756         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
4757         JVGENMAIN_OBJS): Add intl.o.
4758         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
4759         java/jvgenmain.o): Update dependencies.
4761 2004-02-08  Per Bothner  <per@bothner.com>
4763         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
4764         class don't use not_accessible_field_error, which can get confused.
4766 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
4768         Make-lang.in (po-generated):  Delete.
4770 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
4772         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
4773         Depend on target.h.
4774         * decl.c: Include target.h.
4775         (start_java_method): Replace PROMOTE_PROTOTYPES with
4776         targetm.calls.promote_prototypes.
4777         * expr.c: Include target.h.
4778         (pop_arguments): Replace PROMOTE_PROTOTYPES with
4779         targetm.calls.promote_prototypes.
4780         * parse.y: Include target.h.
4781         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
4782         with targetm.calls.promote_prototypes.
4784 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
4786         * typeck.c: Update copyright.
4788 2004-02-02  Tom Tromey  <tromey@redhat.com>
4790         * decl.c (java_init_decl_processing): Remove duplicate
4791         gnu/gcj/RawData.
4793 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
4795         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
4797 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
4799         * expr.c (build_field_ref): Move variable
4800         definition up.
4802 2004-01-28  Andrew Haley  <aph@redhat.com>
4804         * expr.c (build_field_ref): Widen field offset.
4806 2004-01-27  Andrew Haley  <aph@redhat.com>
4808         java/13273
4809         * parse.y (check_interface_throws_clauses): Make sure class_decl
4810         has been loaded.
4812 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
4814         PR java/13733
4815         * parse.y (patch_assignment): Don't modify lhs_type for
4816         reference assignments.
4818 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4820         * Make-lang.in: Replace $(docdir) with doc.
4821         (java.info, java.srcinfo, java.man, java.srcman): New rules.
4822         (java.install-man): Revamp rule.
4824 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4826         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
4827         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
4828         instead of deferred backquote.
4830 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
4832         * typeck.c (find_method_in_interfaces): Move variable
4833         definition up.
4835 2004-01-16  Andrew Haley  <aph@redhat.com>
4837         PR java/13273:
4838         * typeck.c (shallow_find_method): New.
4839         (find_method_in_superclasses): New.
4840         (find_method_in_interfaces): New.
4841         (lookup_do): Rewrite.
4842         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
4844         * jcf-parse.c (read_class): Save and restore output_class.
4845         * decl.c (java_expand_body): Set output_class from fndecl.
4847 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
4849         * class.c (gen_indirect_dispatch_tables): Fix string length
4850         calculations.
4852 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
4854         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
4855         (java.srcextra): Copy above back to source directory if requested.
4856         (po-generated): Delete reference to $(parsedir).
4857         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
4858         Use implicit rule.
4860 2004-01-14  Jan Hubicka  <jh@suse.cz>
4862         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
4863         estimation.
4865 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
4867         * java-tree.h (java_expand_expr): Change prototype.
4868         * expr.c (java_expand_expr): Add alt_rtl parameter.
4870 2004-01-09  Andrew Haley  <aph@redhat.com>
4872         PR java/12755:
4873         * parse.y (java_fix_constructors):  Set output_class.
4874         (java_reorder_fields): Likewise.
4875         (java_layout_classes): Likewise.
4876         (java_expand_classes): Generate indirect dispatch tables.
4877         (java_expand_classes): Set output_class.
4878         (java_finish_classes): Likewise.
4879         * lang.c (java_init): Turn on always_initialize_class_p if we're
4880         using indirect dis[atch.
4881         (java_decl_ok_for_sibcall): Use output_class, not current_class.
4882         (java_get_callee_fndecl): Use class local atable.
4883         * jcf-parse.c
4884         (always_initialize_class_p): Decl moved to java-tree.h.
4885         (HANDLE_CLASS_INFO): Set output_class.
4886         (read_class): Likewise.
4887         (parse_class_file): Call gen_indirect_dispatch_tables.
4888         (parse_zip_file_entries): Set output_class.
4889         (java_parse_file): Set output_class.  Don't emit symbol tables.
4890         * java-tree.h (output_class): New.
4891         Remove global declarations for otable, atable, and ctable.
4892         (always_initialize_class_p): moved here from decl.c.
4893         (DECL_OWNER): New.
4894         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
4895         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
4896         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
4897         (struct lang_type): Add otable_methods, otable_decl,
4898         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
4899         ctable_decl, catch_classes, type_to_runtime_map.
4900         * expr.c (build_field_ref): Make otable, atable, and ctable class
4901         local rather than global.
4902         (build_known_method_ref): Likewise.
4903         (build_invokeinterface): Likewise.
4904         (java_expand_expr): Pass runtime type (rather than actual type) to
4905         expand_start_catch.
4906         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
4907         this class.  Look up each class in that map to delete duplicates.
4908         (expand_end_java_handler): Pass runtime type (rather than actual
4909         type) to expand_start_catch.
4910         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
4911         (do_nothing): New.
4912         (java_init_decl_processing): Rearrange things.  Remove global
4913         declarations of otable, atable, and ctable.
4914         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
4915         (java_expand_body): Set output_class.
4916         * constants.c (build_constant_data_ref): Use output_class, not
4917         current_class.
4918         (alloc_name_constant): Likewise.
4919         * class.c (gen_indirect_dispatch_tables): New.
4920         (build_class_ref): Generate hard reference to superclass, even if
4921         using indirect dispatch.
4922         (build_static_field_ref): Use class local atable.
4923         (make_class_data): Generate hard reference to superclass, even if
4924         using indirect dispatch.
4925         Generate symbolic references to interfaces when using indirect
4926         dispatch.
4927         (make_class_data): Emit otable, atable, and ctable.
4928         Make otable, atable, and ctable class local rather than global.
4929         (emit_catch_table): Make otable, atable, and ctable class local
4930         rather than global.
4932 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
4934         * parse.y (catch_clause_parameter): Fix typo.
4936         PR java/13404
4937         * parse.y: (catch_clause_parameter): Return early if $3, aka
4938         formal_parameter, is null.
4940 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
4942         * class.c: Remove uses of "register" specifier in
4943         declarations of arguments and local variables.
4944         * decl.c: Likewise.
4945         * expr.c: Likewise.
4946         * gjavah.c: Likewise.
4947         * jcf-dump.c: Likewise.
4948         * jcf-io.c: Likewise.
4949         * jcf-parse.c: Likewise.
4950         * jcf-write.c: Likewise.
4951         * keyword.h: Likewise.
4952         * parse.y: Likewise.
4953         * typeck.c: Likewise.
4954         * verify.c: Likewise.
4956 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
4958         * Make-lang.in (GCJ_CROSS_NAME): Delete.
4959         (java.install_common, java.install-man): Adjust for above.
4960         (java.uninstall): Likewise.
4962 2003-12-03  Michael Koch  <konqueror@gmx.de>
4964         * class.c (make_class_data):
4965         Push field value to 'hack_signers' instead of 'signers'.
4966         * decl.c (java_init_decl_processing):
4967         Push field 'hack_signers' instead of 'signers'.
4969 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
4971         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
4972         including iconv.h.
4974 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
4976         PR java/12374:
4977         * parse.y (qualify_ambiguous_name): Remove lots of broken
4978         field access processing - there's no need to do that here,
4979         because we have resolve_field_access.  Remove
4980         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
4981         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
4982         used.
4984 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
4986         Fix PR java/13237
4987         * parse.y (java_complete_lhs): Save location prior to patching
4988         CALL_EXPR.
4990 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
4992         PR java/12548
4993         * resource.c (write_resource_constructor): Append
4994         "_resource" to constructor identifier name.
4996 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
4998         Fix PR java/13183.
4999         * constants.c (cpool_for_class): New function.
5000         (outgoing_cpool): Remove global variable.
5001         (alloc_name_constant): Use cpool_for_class.
5002         (build_constants_constructor): Likewise.
5003         * decl.c (java_expand_body): Set current_class.
5004         * java-tree.h (outgoing_cpool) Remove declaration.
5005         (init_outgoing_cpool): Likewise.
5006         * jcf-parse.c (init_outgoing_cpool): Remove function.
5007         (parse_class_file): Don't call init_outgoing_cpool.
5008         * parse.y (java_complete_expand_methods): Don't call
5009         init_outgoing_cpool.  Don't save outgoing_cpool.
5010         (java_expand_classes): Don't restore outgoing_cpool.
5011         (java_finish_classes): Likewise.
5013 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
5015         * Make-lang.in: (java.install-common) Add
5016         symlink for $(target_noncanonical)-gcjh for
5017         native builds.
5019 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5021         * Make-lang.in (java.extraclean): Delete.
5023 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5025         * Make-lang.in (check-java): Add.
5027 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
5029         Fix PR java/13024.
5030         * except.c (prepare_eh_table_type): Allocate variable-sized
5031         buffer `buf' with alloca.
5033 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5035         Fix PR java/12857.
5037         decl.c (java_init_decl_processing): Don't initialize
5038         class_not_found_type_node, no_class_def_found_type_node.
5040         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5041         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5042         (class_not_found_type_node, no_class_def_found_type_node):
5043         Don't define.
5045         parse.y (build_dot_class_method_invocation): Add this_class
5046         argument.  Qualify method invocations to a different class.
5047         (create_new_parser_context): Initialize saved_data_ctx to 0.
5048         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5049         (build_dot_class_method): Don't load classes.  Register
5050         incomplete types.
5051         (build_incomplete_class_ref): Special cases for interfaces
5052         and inner classes.  Move build_dot_class_method call to here...
5053         (patch_incomplete_class_ref): ...from here.  Pass current_class
5054         to build_dot_class_method_invocation.
5055         (build_assertion): Pass class_type to
5056         build_dot_class_method_invocation.
5057         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5059 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5061         Fix PR java/12739.
5062         * java-tree.h (BLOCK_EMPTY_P): Define.
5063         * parse.y (java_complete_lhs): Check for empty blocks
5064         in TRY_FINALLY_EXPR case.
5066 2003-11-17  Andrew Haley  <aph@redhat.com>
5068         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5069         (struct lang_decl_var:freed): New variable.
5070         * decl.c (poplevel): Mark local vars that have gone out of scope.
5071         (push_jvm_slot): Don't use the RTL of a var that has gone out of
5072         scope.
5074 2003-11-16  Jason Merrill  <jason@redhat.com>
5076         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5077         and TAGS files that include them for each front end.
5079 2003-11-15  Tom Tromey  <tromey@redhat.com>
5081         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5083 2003-11-12  Jason Merrill  <jason@redhat.com>
5085         PR optimization/12547
5086         * lang.c (java_tree_inlining_walk_subtrees): Just walk
5087         BLOCK_EXPR_BODY directly.
5089 2003-11-12  Andrew Haley  <aph@redhat.com>
5091         PR java/11045
5092         * parse.y (fold_constant_for_init): Check that we really do have a
5093         constant.
5095         PR java/11533
5096         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5097         init_test_decls being inlined.
5099         PR java/12890:
5100         * parse.y (do_resolve_class): Check return value from
5101         breakdown_qualified().
5103 2003-11-11  Tom Tromey  <tromey@redhat.com>
5105         PR java/12915:
5106         * parse.y (merge_string_cste): Handle case where we have a
5107         pointer that happens to be zero, not null_pointer_node.
5109 2003-11-10  Tom Tromey  <tromey@redhat.com>
5111         * jcf-parse.c (classify_zip_file): Correctly compare
5112         filename_length against length of manifest file's name.
5114 2003-11-08  Tom Tromey  <tromey@redhat.com>
5116         PR java/12894:
5117         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5119 2003-11-06  Andrew Haley  <aph@redhat.com>
5121         * expr.c (java_stack_swap): Make sure destination stack slots are
5122         of the correct type.
5124 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
5126         * Make-lang.in (dvi): Move targets to $(docobjdir).
5127         (gcj.dvi): Simplify rule and adjust target.
5128         (gcj.info): Simplify rule.
5129         (gcj.pod): New intermediate rule.
5130         (gcjh.pod): Likewise.
5131         (jv-scan.pod): Likewise.
5132         (jcf-dump.pod): Likewise.
5133         (gij.pod): Likewise.
5134         (jv-convert.pod): Likewise.
5135         (rmic.pod): Likewise.
5136         (rmiregistry.pod): Likewise.
5137         (gcj.1): Delete.
5138         (gcjh.1): Delete.
5139         (jv-scan.1): Delete.
5140         (jcf-dump.1): Delete.
5141         (gij.1): Delete.
5142         (jv-convert.1): Delete.
5143         (rmic.1): Delete.
5144         (rmiregistry.1): Delete.
5146 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
5148         Fixes PR java/12866.
5149         * parse.y (resolve_qualified_expression_name): Move test
5150         for outer field access methods from here...
5151         (check_thrown_exceptions) ...to here.
5153 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
5155         * .cvsignore: Delete.
5157 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
5159         * verify.c (verify_jvm_instructions): Don't warn about legal
5160         eh binding regions generated for example by jdk 1.4.1.
5162 2003-10-24  David S. Miller  <davem@redhat.com>
5164         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5166 2003-10-22  Andrew Haley  <aph@redhat.com>
5168         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5169         (java_get_callee_fndecl): New.
5171         * jcf-parse.c (java_parse_file): Call emit_catch_table().
5173         * java-tree.h (ctable_decl): New.
5174         (catch_classes):  New.
5175         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5177         * decl.c (java_init_decl_processing): Add catch_class_type.
5178         Add ctable_decl.
5179         Add catch_classes field.
5181         * class.c (build_indirect_class_ref): Break out from
5182         build_class_ref.
5183         (make_field_value): Check flag_indirect_dispatch.
5184         (make_class_data): Ditto.
5185         Tidy uses of PUSH_FIELD_VALUE.
5186         Add field catch_classes.
5187         (make_catch_class_record): New.
5189         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5191 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5193         * jcf-write.c: Follow spelling conventions.
5194         * parse.y: Likewise.
5196 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5198         * ChangeLog: Fix typos.
5199         * expr.c: Fix comment typos.
5200         * jcf-write.c: Likewise.
5201         * lang.c: Likewise.
5202         * lex.c: Likewise.
5203         * mangle.c: Likewise.
5204         * parse-scan.y: Likewise.
5205         * parse.y: Likewise.
5207 2003-10-22  Tom Tromey  <tromey@redhat.com>
5209         * expr.c (expand_byte_code): Only warn about dead bytecode when
5210         extra_warnings is set.
5212 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5214         Fix for PR java/12586.
5215         * mangle.c (find_compression_record_match): Don't iterate through
5216         package namespace elements unless they all match compression_table
5217         entries.
5219 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5221         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5222         (generate-manpages): Likewise.
5223         (java.maintainer-clean): Likewise.
5224         (gcj.info): Likewise.
5225         (gcj.1): Likewise.
5226         (gcjh.1): Likewise.
5227         (jv-scan.1): Likewise.
5228         (jcf-dump.1): Likewise.
5229         (gij.1): Likewise.
5230         (jv-convert.1): Likewise.
5231         (rmic.1): Likewise.
5232         (rmiregistry.1): Likewise.
5233         (java.install-man): Likewise.
5234         (parse-scan.o): Move and define complete compile line.
5235         (parse.o): Likewise.
5236         (jcf-tree-inline.o): Move.
5238 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5240         * Make-lang.in (info): Update dependencies.
5241         (java.install-info): Remove.
5242         ($(srcdir)/java/gcj.info): Replace with ...
5243         ($(docobjdir)/gcj.info): ... this.
5245 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5247         * Make-lang.in: Replace uses of $(target_alias) with
5248         $(target_noncanonical).
5250 2003-10-09  Tom Tromey  <tromey@redhat.com>
5252         * decl.c (java_init_decl_processing): Declare signers field.
5253         * class.c (make_class_data): Set signers field.
5255 2003-10-09  Jason Merrill  <jason@redhat.com>
5257         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5258         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5259         POINTER_TYPE.
5261 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5263         * Make-lang.in (java.info): Replace with ...
5264         (info): ... this.
5265         (java.dvi): Replace with ...
5266         (dvi): ... this.
5267         (java.generated-manpages): Replace with ...
5269 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5271         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5273 2003-10-01  Andrew Haley  <aph@redhat.com>
5275         * jcf-parse.c (java_parse_file): Write otable and atable.
5276         * java-tree.h (atable_methods): New.
5277         (atable_decl): New.
5278         (atable_syms_decl): New.
5279         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5280         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5281         (symbol_*type): Rename method_symbol* to symbol*type.
5282         (emit_offset_symbol_table): Delete.
5283         (emit_symbol_table): New.
5284         (get_symbol_table_index): New.
5285         (atable_type): New.
5286         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5287         (build_known_method_ref): Likewise.
5288         (get_symbol_table_index): Rename from get_offset_table_index.
5289         Parameterize to allow re-use by differing types of symbol table.
5290         (build_invokevirtual): Pass table to get_offset_table_index.
5291         * decl.c (java_init_decl_processing): Push types and decls for
5292         atable and atable_syyms.
5293         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5294         (make_class_data): Add new fields atable and atable_syms.
5295         (emit_symbol_table): Rename from emit_offset_symbol_table.
5296         Parameterize to allow re-use by different types of symbol table.
5297         (build_symbol_entry): Renamed from build_method_symbols_entry.
5299 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5301         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5302         semantics for SAVE_EXPR, by caching the result in a temporary.
5304 2003-09-28  Richard Henderson  <rth@redhat.com>
5306         * check-init.c (check_init): Save and restore input_location
5307         instead of file and line separately.
5308         * decl.c (java_expand_body): Likewise.
5309         * jcf-write.c (generate_bytecode_insns): Likewise.
5310         * parse.y (safe_layout_class): Likewise.
5311         * jcf-parse.c (read_class, parse_class_file): Likewise.
5312         (java_parse_file): Use %H for warning locator.
5314 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5316         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5317         with void-type branches instead of using a COMPOUND_EXPR.
5319 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5321         * decl.c (java_optimize_inline, dump_function): Remove.
5322         * java-tree.h (java_optimize_inline): Remove declaration.
5323         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5324         * parse.y (source_end_java_method, java_expand_classes):
5325         Likewise.  Remove dead code.
5327 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5329         * lang.c (java_init_options): Set flag_evaluation_order.
5330         * expr.c (force_evaluation_order): Don't attempt to force
5331         evaluation order of binary operations using save_expr.
5332         * parse.y (java_complete_lhs): No longer need to call
5333         force_evaluation_order when constructing binary operators.
5335 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5336             Bryce McKinlay  <bryce@mckinlay.net.nz>
5338         PR java/1333:
5339         * parse.y (not_accessible_field_error): New function.
5340         (resolve_expression_name): Check field access permissions.
5341         (resolve_qualified_expression_name): Use
5342         not_accessible_field_error.
5343         (resolve_qualified_expression_name): Likewise.
5345 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5347         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5349 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5351         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5352         with equal operands without side-effects.
5354 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5356         * decl.c (java_init_decl_processing): Don't emit otable decls
5357         if flag_indirect_dispatch is not set.
5359 2003-09-21  Richard Henderson  <rth@redhat.com>
5361         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5362         resource.c: Revert.
5364 2003-09-21  Richard Henderson  <rth@redhat.com>
5366         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5367         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5369 2003-09-20  Richard Henderson  <rth@redhat.com>
5371         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5373 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5375         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5376         * check-init.c (check_init): Likewise.
5378 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5380         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5382 2003-09-16  Andrew Haley  <aph@redhat.com>
5384         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5386 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
5388         Fixes PR java/9577
5389         * mangle.c (find_compression_record_match): Skip
5390         over a "6JArray" (the array template mangled string)
5391         IDENTIFIER_NODE.
5392         (mangle_array_type): Correct minor typo.
5393         (atms): Move definition to the beginning.
5395 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
5397         * class.c (add_miranda_methods): Ensure super-interfaces are laid
5398         out. Fix for PR java/12254.
5400 2003-09-11  Richard Henderson  <rth@redhat.com>
5402         * parse.y (source_end_java_method): Update for new
5403         cgraph_finalize_function argument.
5405 2003-09-09  Richard Henderson  <rth@redhat.com>
5407         * parse.y (source_end_java_method): Update call to
5408         cgraph_finalize_function.
5410 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
5412         * decl.c (java_expand_body): New function.
5413         * expr.c (build_class_init): Set DECL_IGNORED_P.
5414         * java-tree.h (start_complete_expand_method,
5415         java_expand_body): Declare.
5416         * jcf-parse.c (cgraph.h): Include.
5417         (java_parse_file): Handle flag_unit_at_a_time.
5418         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5419         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5420         (java_estimate_num_insns): Use walk_tree_without_duplicates.
5421         (java_start_inlining): New function.
5422         * parse.h (java_finish_classes): Declare.
5423         * parse.y: Include cgraph.h.
5424         (block): Don't special-case empty block production.
5425         (craft_constructor): Set DECL_INLINE.
5426         (source_end_java_method): Handle flag_unit_at_a_time.
5427         Replace inline code with call to java_expand_body.
5428         (start_complete_expand_method): Remove static modifier.
5429         (java_expand_method_bodies): Patch function tree for
5430         class initialization and/or synchronization as needed.
5431         Don't begin RTL expansion yet.
5432         (java_expand_classes): Check flag_unit_at_a_time before
5433         calling finish_class.
5434         (java_finish_classes): New function.
5435         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5436         (patch_assignment): Set DECL_CONTEXT on temporary variable.
5437         (emit_test_initialization): Set DECL_IGNORED_P.
5439 2003-09-03  Roger Sayle  <roger@eyesopen.com>
5441         * builtins.c (enum builtin_type): Delete unused enumeration.
5442         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5444 2003-08-28  Tom Tromey  <tromey@redhat.com>
5446         * gcj.texi (Extensions): Document gcjlib URLs.
5448 2003-08-20  Tom Tromey  <tromey@redhat.com>
5450         * gcj.texi (Extensions): Added xref.
5451         (libgcj Runtime Properties): Document
5452         gnu.gcj.runtime.VMClassLoader.library_control.
5454 2003-08-20  Andrew Haley  <aph@redhat.com>
5456         * except.c (prepare_eh_table_type): Use new encoding for exception
5457         handlers when using -fno-assume-compiled.
5459 2003-08-13  Tom Tromey  <tromey@redhat.com>
5461         * gcj.texi (Invoking gij): Document -X and -?.
5463 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
5465         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5466         GCJH_OBJS, JCFDUMP_OBJS
5467         * win32-host.c: Removed the unnecessary and broken dependency
5468         on jcf.h
5470 2003-08-11  Tom Tromey  <tromey@redhat.com>
5472         * parse.y (java_check_regular_methods): Typo fixes.  Call
5473         check_interface_throws_clauses.  Use
5474         check_concrete_throws_clauses.
5475         (check_interface_throws_clauses): New function.
5476         (check_concrete_throws_clauses): New function.
5477         (hack_is_accessible_p): New function.
5478         (find_most_specific_methods_list): Added FIXME.
5479         * typeck.c (lookup_do): Use `flags' argument to decide what to
5480         do.  Reimplemented.
5481         (lookup_argument_method_generic): New function.
5482         (lookup_argument_method2): Removed.
5483         * jcf.h (ACC_INVISIBLE): New define.
5484         * jcf-write.c (generate_classfile): Skip invisible methods.
5485         * class.c (add_miranda_methods): New function.
5486         (layout_class_methods): Use it.
5487         (get_access_flags_from_decl): Use ACC_INVISIBLE.
5488         * java-tree.h (METHOD_INVISIBLE): New define.
5489         (lang_decl_func) [invisible]: New field.
5490         (lookup_argument_method_generic): Declare.
5491         (SEARCH_INTERFACE): New define.
5492         (SEARCH_SUPER): Likewise.
5493         (SEARCH_ONLY_INTERFACE): Likewise.
5494         (SEARCH_VISIBLE): Likewise.
5495         (lookup_argument_method2): Removed declaration.
5497 2003-08-05  Tom Tromey  <tromey@redhat.com>
5499         Fix for PR java/11600:
5500         * parse.y (java_complete_lhs): See whether we're calling a method
5501         on an array.
5502         (check_thrown_exceptions): Added `is_array_call' argument;
5503         fixed `clone' checking; updated all callers.
5505 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
5507         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5509 2003-08-03  Tom Tromey  <tromey@redhat.com>
5511         * java-tree.h (METHOD_TRANSIENT): Removed.
5512         * decl.c (pushdecl): Removed some dead code.
5513         * class.c (get_access_flags_from_decl): Can't have transient
5514         method.
5515         (add_method_1): Can't have a transient method.
5517 2003-07-28  Andreas Jaeger  <aj@suse.de>
5519         * jvspec.c: Convert to ISO C90 prototypes.
5521 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5523         * decl.c (force_poplevels): Fix warning call.
5525 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5527         * expr.c (expand_java_field_op): Don't use xxx_with_decl
5528         (expand_java_field_op): Likewise.
5529         * class.c (layout_class_method): Likewise
5530         (emit_register_classes): Likewise.
5531         * decl.c (pushdecl): Likewise.
5532         (poplevel): Likewise.
5533         (force_poplevels): Likewise.
5534         (give_name_to_locals): Likewise.
5535         * check-init.c (check_for_initialization): Likewise.
5537 2003-07-24  Jason Merrill  <jason@redhat.com>
5539         * java-tree.h: Move boolean_type_node et al to the back end.
5541 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5543         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5544         casts.
5546 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
5548         * lang.opt: Don't show -MD_ and -MDD_.
5550 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
5552         * lang-options.h: Remove.
5553         * lang.opt: Add help text.
5555 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
5557         * expr.c: Remove the last argument to expand_assignment().
5559 2003-07-09  Jan Hubicka  <jh@suse.cz>
5561         * java-tree.h (DECL_NUM_STMTS): Rename to...
5562         (DECL_ESTIMATED_INSNS): ... this.
5563         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
5564         New static functions.
5565         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
5566         * parser.y (add_stmt_to_compound): Do not account statements.
5568 2003-07-08  Mark Wielaard  <mark@klomp.org>
5570         * gcj.texi: CNI now expands to Compiled Native Interface.
5572 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5574         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5576 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5578         * expr.c (expand_byte_code): Adjist emit_line_note call.
5580 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
5582         * lang.c (java_handle_option): Don't handle filenames.
5584 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
5586         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5587         DIR_SEPARATOR.
5588         Use FILENAME_CMP.
5589         * jcf-write.c: Don't default-define DIR_SEPARATOR.
5590         * jcf.h: Delete COMPARE_FILENAMES definition.
5592 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
5594         * lang.c (java_init_options): Update prototype.
5596 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
5598         * decl.c (poplevel): Adjust define_label call.
5600 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
5602         * gjavah.c (flag_jni): Make non-static.
5603         * parse-scan.y (ctxp): Make non-static.
5605         * class.c (build_method_symbols_entry)
5606         * expr.c (get_offset_table_index)
5607         * jcf-parse.c (jcf_parse):
5608         Mark the definition static, matching the forward declaration.
5610 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
5612         * lang.c (java_handle_option): Don't check for missing arguments.
5614 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
5616         * class.c (push_class): Use a location_t to save place.
5617         (emit_register_classes): Set input_location. Adjust
5618         expand_function_end call.
5619         * resource.c (write_resource_constructor): Likewise.
5620         * decl.c (end_java_method): Adjust expand_function_end call.
5621         * parse.y (source_end_java_method): Likewise.
5623 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
5625         * lang.c (java_handle_option): Likewise.
5627 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
5629         * lang.c (java_handle_option): Special-casing of optional
5630         joined arguments no longer needed.
5631         * lang.opt: Update switches that take optional argument.
5633 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5635         * lang.opt: Declare Java.
5636         * lang.c (java_init_options): Update.
5638 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5640         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5642 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5644         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
5645         * lang.c (java_handle_option): -MD and -MMD have an underscore.
5646         * lang.opt: -MD and -MMD have an underscore.
5648 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
5650         * class.c (emit_register_classes): Adjust init_function_start
5651         call.
5652         * decl.c (complete_start_java_method): Likewise.
5653         * resource.c (write_resource_constructor): Likewise.
5655 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5657         * Make-lang.in: Update to use options.c and options.h.
5658         * lang.c: Include options.h not j-options.h.
5659         (java_handle_option): Abort on unrecognized option.
5660         (java_init_options): Request Java switches.
5662 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
5664         * Make-lang.in: Handle mostlyclean.
5666 2003-06-11  Tom Tromey  <tromey@redhat.com>
5668         * lang.c (java_handle_option): Update dependency_tracking for
5669         OPT_MF case.
5671         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5672         empty argument.
5674 2003-06-10  Andrew Haley  <aph@redhat.com>
5676         * resource.c (write_resource_constructor): Use expand_expr to
5677         generate the address of the label attached to a resource.
5678         * Make-lang.in (java/resource.o): Add expr.h
5680 2003-06-10  Andrew Haley  <aph@redhat.com>
5682         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
5683         (java_decl_ok_for_sibcall): New.
5685 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
5687         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
5688         (java/j-options.c, java/j-options.h): New.
5689         * java-tree.h (resource_name, compile_resource_file,
5690         compile_resource_data): Constify.
5691         * jcf-write.c (jcf_write_base_directory): Similarly.
5692         * jcf.h (jcf_write_base_directory): Similarly.
5693         * lang.c: Include j-options.h.
5694         (cl_options_count, cl_options, string_option, java_decode_option,
5695         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
5696         process_option_with_no): Remove.
5697         (resource_name): Constify.
5698         (LANG_HOOKS_HANDLE_OPTION): Override.
5699         (java_handle_option): New.
5700         (java_init): Don't call jcf_path_init.
5701         (java_init_options): Call jcf_path_init.
5702         * lang.opt: New.
5703         * resource.c (compile_resource_data, compile_resource_file): Constify.
5705 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
5707         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
5708         (struct lang_decl_func): Add last_line field.
5709         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
5710         DECL_SOURCE_LINE_LAST): Remove.
5711         * parse.y (missing_return_error, finish_method_declaration,
5712         lookup_cl, start_artificial_method_body, source_end_java_method,
5713         start_complete_expand_method): Adjust.
5715 2003-06-08  Tom Tromey  <tromey@redhat.com>
5717         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
5718         fno-assume-compiled.
5720 2003-06-08  Roger Sayle  <roger@eyesopen.com>
5722         * builtins.c (define_builtin_type, builtin_types): Delete.
5723         (define_builtin): Rewritten to take just the built-in code,
5724         the function's name, type and fallback library function name.
5725         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
5726         (initialize_builtins): Overhaul to define the GCC builtins
5727         used by gcj manually, providing the Java run-time's
5728         implementations as the fallback library function.
5730 2003-06-08  Anthony Green  <green@redhat.com>
5732         * parse.y (patch_cast): Fix conversions from floating-point to
5733         integral types.
5735 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
5737         * Make-lang.in: Update.
5738         * lang.c: Include opts.h. Define cl_options_count and cl_options.
5740 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
5742         * lang.c (java_init_options): Update.
5744 2003-06-05  Jan Hubicka  <jh@suse.cz>
5746         * Make-lang.in:  Add support for stageprofile and stagefeedback
5748 2003-05-31  Roger Sayle  <roger@eyesopen.com>
5750         * lang.c (java_init_options): Prescribe wrap-around two's
5751         complement arithmetic overflow by setting flag_wrapv.
5753 2003-05-29  Roger Sayle  <roger@eyesopen.com>
5755         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
5756         (builtin_record): Add an additional builtin_code field to
5757         record which GCC built-in corresponds to the Java function.
5758         (java_builtins):  Add new entries for atan, atan2, exp, log,
5759         pow and tan.
5760         (max_builtin, min_builtin, abs_builtin): Perform constant
5761         folding on the resulting tree.
5762         (java_build_function_call_expr): Likewise, perform constant
5763         folding on the resulting tree.
5764         (initialize_builtins): The NULL creators are now allowed in
5765         the java_builtins table, which is now terminated by an entry
5766         with builtin_code == END_BUILTINS.
5767         (check_for_builtin): Likewise.  If the matching creator is
5768         NULL, construct the call using java_build_function_call_expr
5769         directly with the decl for the corresponding builtin_code.
5771 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5773         * win32-host.c: Normalize copyright boilerplate.
5775 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5777         * parse.y (print_int_node): Use string concatentation on
5778         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
5779         function calls into one.
5781 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
5783         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
5784         fatal_io_error with calls to fatal_error; add ": %m" to the end of
5785         all the affected error messages.
5787 2003-05-13  Richard Henderson  <rth@redhat.com>
5789         * class.c (layout_class_method): Set DECL_EXTERNAL.
5790         * decl.c (java_mark_decl_local, java_mark_class_local): New.
5791         * java-tree.h (java_mark_class_local): Declare.
5792         * jcf-parse.c (parse_class_file): Use it.
5793         * parse.y (java_expand_classes): Likewise.
5795 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
5797         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
5798         * lex.h: #include input.h.
5799         * jv-scan.c (input_filename): Remove.
5801 2003-05-02  Tom Tromey  <tromey@redhat.com>
5803         PR java/10491:
5804         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5805         (handle_inner_classes): New function.
5807 2003-05-01  Tom Tromey  <tromey@redhat.com>
5809         PR java/10459:
5810         * parse.y (finish_for_loop): Do nothing if update expression is a
5811         EXPR_WFL_NODE wrapping nothing.
5812         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
5814 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
5816         * lex.h (input_lineno): Remove declaration.
5817         * parse-scan.y: #include input.h.
5818         (input_filename): Remove declaration.
5819         (input_location): Add definition.
5820         (input_line): Remove definition.
5822 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
5824         * lex.h (lineno): Rename to ...
5825         (input_line): ... here
5826         * parse-scan.y (lineno): Rename to ...
5827         (input_line): ... here.
5828         (reset_report): Rename lineno to input_line.
5829         * check-init.c (check_init): Likewise.
5830         * class.c (push_class): Likewise.
5831         * decl.c (complete_start_java_method, end_java_method): Likewise.
5832         * expr.c (expand_byte_code): Likewise.
5833         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
5834         * jcf-write.c (generate_bytecode_insns): Likewise.
5835         * lex.c (java_init_lex, java_allocate_new_line,
5836         do_java_lex): Likewise.
5837         * parse.h (YYNOT_TWICE): Likewise.
5838         * parse.y (empty_statement, expression_statement,
5839         java_pop_parser_context, java_parser_context_save_global,
5840         yyerror, register_fields, method_header, safe_layout_class,
5841         find_in_imports_on_demand, create_artificial_method,
5842         source_end_java_method, start_complete_expand_method,
5843         build_thisn_assign, java_complete_lhs,
5844         maybe_absorb_scoping_block): Likewise.
5846 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
5848         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
5849         '/' when computing java source filename
5851 2003-04-13  Tom Tromey  <tromey@redhat.com>
5853         * gjavah.c (print_c_decl): Indentation fix.
5855 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
5857         * class.c (make_field_value, make_method_value, get_dispatch_table)
5858         (make_class_data, emit_offset_symbol_table)
5859         * constants.c (build_constants_constructor)
5860         * java-tree.h (START_RECORD_CONSTRUCTOR)
5861         * parse.y (maybe_build_array_element_wfl):
5862         Use build_constructor.
5864 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
5866         PR java/10253:
5867         * parse.y (string_convert_int_cst): Always use at least one digit
5868         in string conversion. Remove ASCII dependence.
5869         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
5871 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
5873         * Make-lang.in: added win32-host.c
5874         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
5875         resolves to open() on non-Win32 platforms and
5876         Win32-specific jcf_open_exact_case() on Win32
5877         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
5878         when trying .java and .class files
5879         * win32-host.c: added to repository. Defines
5880         Win32-specific jcf_open_exact_case()
5882 2003-04-10  Andrew Haley  <aph@redhat.com>
5884         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
5885         (maybe_free_localvar): Renamed from localvar_free.
5886         Add new arg, really.
5887         (generate_bytecode_insns): Set new variable, jsrs.
5888         Only free local vars if no jsr insns have been emittted.
5889         Call maybe_free_localvar, not localvar_free.
5891 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5893         * gcj.texi: Remove @ at start of file.
5895 2003-03-25  Tom Tromey  <tromey@redhat.com>
5897         * parse.y (create_interface): Call CHECK_DEPRECATED.
5899 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
5901         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
5903 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
5905         * javaop.h (jfloat, jdouble): Make them structures mirroring
5906         the bit fields of IEEE float and double respectively.
5907         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
5908         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
5909         (union Word, union DWord): Delete.
5910         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
5912         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
5913         D_NAN_MASK): Delete.
5914         (jni_print_float, jni_print_double): New.  Generate
5915         hexadecimal floating constants.
5916         (print_field_info): Use jni_print_float/double.
5918         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
5919         finite floating point numbers for output; special case
5920         non-finite floats.
5922 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
5924         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
5925         Replace 0 and 1 with true and false in return statements.
5927 2003-03-19  Tom Tromey  <tromey@redhat.com>
5929         * lex.c (do_java_lex): Renamed from java_lex.
5930         (java_lex): New function.
5931         Include timevar.h.
5933 2003-03-13  Tom Tromey  <tromey@redhat.com>
5935         * parse.y (resolve_inner_class): Error if qualifier is a primitive
5936         type.
5938 2003-03-04  Andrew Haley  <aph@redhat.com>
5940         * gjavah.c (is_first_data_member): New global variable.
5941         (print_c_decl): If it's the first data member, align it as the
5942         superclass.
5943         (process_file): Set is_first_data_member.
5945 2003-03-11  Tom Tromey  <tromey@redhat.com>
5947         * parse.y (resolve_field_access): Initialize class if field is
5948         found in another static field.
5949         * expr.c (build_class_init): Don't optimize out initialization of
5950         implemented interface.
5952 2003-03-11  Andrew Haley  <aph@redhat.com>
5954         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
5955         warning.
5957 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
5959         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
5960         and DIR_SEPARATOR_2 for a target.
5961         Correct minor typos.
5963         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
5964         and DIR_SEPARATOR_2 for a target into account.
5966 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
5968         * lang.c (java_init): Update prototype, move code to java_post_options.
5969         (java_post_options): Similarly.
5971 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
5973         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
5974         compare file name components depending on the case-sensitivity
5975         or otherwise of the host file system.
5977         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
5978         "strcmp" to compare file name components.
5979         Use IS_DIR_SEPARATOR instead of comparing directly against
5980         DIR_SEPARATOR.
5981         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
5982         comparing directly against DIR_SEPARATOR.
5984 2003-03-04  Tom Tromey  <tromey@redhat.com>
5986         * Make-lang.in (java.tags): New target.
5988 2003-03-01  Roger Sayle  <roger@eyesopen.com>
5990         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
5991         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
5993 2003-03-01  Tom Tromey  <tromey@redhat.com>
5995         * parse.y (jdep_resolve_class): Only check deprecation if we found
5996         a decl.
5998 2003-02-28  Tom Tromey  <tromey@redhat.com>
6000         PR java/9695:
6001         * class.c (maybe_layout_super_class): Always pass a WFL to
6002         do_resolve_class.
6003         * parse.y (do_resolve_class): Updated comment to explain
6004         parameters.
6006 2003-02-26  Tom Tromey  <tromey@redhat.com>
6008         * jcf-write.c (generate_classfile): Check whether class is
6009         deprecated before writing attribute count.
6011 2003-02-25  Roger Sayle  <roger@eyesopen.com>
6013         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6014         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6016 2003-02-23  Tom Tromey  <tromey@redhat.com>
6018         * lang-options.h: Added -Wdeprecated.
6019         * gcj.texi (Warnings): Document -Wdeprecated.
6020         * java-tree.h (flag_deprecated): Declare.
6021         * lang.c (lang_W_options): Added deprecated.
6022         (flag_deprecated): New global.
6023         * chartables.h: Rebuilt.
6024         * gen-table.pl (process_one): Look at whitespace.
6025         (print_tables): Define LETTER_SPACE, LETTER_MASK.
6026         * parse.h (CLEAR_DEPRECATED): New macro.
6027         (CHECK_DEPRECATED_NO_RESET): New macro.
6028         * jcf-parse.c (handle_deprecated): New function.
6029         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6030         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6031         * parse.y (resolve_type_during_patch): Check deprecation.
6032         (jdep_resolve_class): Likewise.
6033         (process_imports): Likewise.
6034         (resolve_expression_name): Likewise.
6035         (check_deprecation): Strip arrays from decl.  Check
6036         flag_deprecated.
6037         (patch_method_invocation): Also check the particular constructor
6038         for deprecation.
6039         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6040         * jcf-write.c (append_deprecated_attribute): New function.
6041         (generate_classfile): Generate deprecated attribute when
6042         appropriate.
6043         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
6044         (java_lex) [case '*']: Simplify logic.
6045         (java_start_char_p): Use LETTER_MASK.
6046         (java_part_char_p): Likewise.
6047         (java_space_char_p): New function.
6049 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
6051         Change base class access representation.
6052         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6053         (add_interface_do): Likewise.
6055 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
6057         * decl.c (java_init_decl_processing): Change
6058         soft_lookupjnimethod_node to reflect the change in
6059         signature of _Jv_LookupJNIMethod in libjava/jni.cc
6060         * expr.c (build_jni_stub): Calculate and pass the size
6061         on the stack of the arguments to a JNI function. Use
6062         new target macro MODIFY_JNI_METHOD_CALL to allow a
6063         target to modify the call to a JNI method.
6065 2003-02-08  Roger Sayle  <roger@eyesopen.com>
6067         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6068         instead of basename to avoid compiler warnings on Tru64.
6070 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6072         * gcj.texi: Update to GFDL 1.2.
6074 2003-01-31  Andrew Haley  <aph@redhat.com>
6076         * parse.y (java_expand_classes): Scan the whole class list looking
6077         for access methods that haven't yet been expanded.
6079 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6081         Fix for java/4269:
6083         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6084         to fix bootstrap on sparc-unknown-netbsdelf1.5.
6085         * jcf-parse.c: Likewise.
6087 2003-01-31  Mark Wielaard  <mark@klomp.org>
6089         * gjavah.c (throwable_p): Allocate 1 more byte for string.
6091 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
6093         * class.c (make_class): Use BINFO_ELTS.
6094         (set_super_info): Likewse.
6095         (add_interface_do): Likewise.
6097 2003-01-30  Tom Tromey  <tromey@redhat.com>
6099         * jcf-parse.c (read_class): Update identifier's class value if it
6100         changed during parsing.
6102 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
6104         * Make-lang.in (po-generated): Find the targets in $(parsedir).
6105         Propagate change to all other rules as required.
6106         (java/parse-scan.o): Add explicit dependency on
6107         $(parsedir)/java/parse-scan.c .
6109 2003-01-29  Tom Tromey  <tromey@redhat.com>
6111         * parse.y (patch_assignment): Only transform the rhs of an
6112         assignment when compiling to native.
6114 2003-01-28  Tom Tromey  <tromey@redhat.com>
6116         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6118 2003-01-28  Tom Tromey  <tromey@redhat.com>
6120         * lex.c (java_lex): Don't include UEOF as part of token.
6121         (java_read_unicode): Error if \u sequence prematurely terminated.
6123 2003-01-27  Tom Tromey  <tromey@redhat.com>
6125         * parse.y (java_check_regular_methods): Check for construct after
6126         checking types in throws clause.
6128 2003-01-24  Tom Tromey  <tromey@redhat.com>
6130         * class.c (build_static_field_ref): Only a String or numeric field
6131         can fold to a constant.
6133 2003-01-23  Tom Tromey  <tromey@redhat.com>
6135         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6136         file name in resource buffer.
6138 2003-01-23  Tom Tromey  <tromey@redhat.com>
6140         * expr.c (build_known_method_ref): Use method's context to find
6141         method table index.
6143 2003-01-23  Tom Tromey  <tromey@redhat.com>
6145         * constants.c (set_constant_entry): Allocated cleared memory.
6147 2003-01-22  Tom Tromey  <tromey@redhat.com>
6149         * java-tree.h: Don't use PARAMS.
6150         * resource.c: Add prototypes for all functions.
6151         (write_resource_constructor): Use `const char *' to avoid
6152         warning.
6154 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
6156         * jcf-parse.c (process_zip_dir): Remove unused variable.
6158 2003-01-22  Tom Tromey  <tromey@redhat.com>
6160         * expr.c (build_invokeinterface): Abort if method's context is not
6161         an interface.
6163 2003-01-22  Tom Tromey  <tromey@redhat.com>
6165         * gcj.texi (Input and output files): Mention non-class entries.
6166         * decl.c (java_init_decl_processing): Call
6167         init_resource_processing.
6168         * java-tree.h (compile_resource_data, write_resource_constructor,
6169         compile_resource_file, init_resource_processing): Declare.
6170         * config-lang.in (gtfiles): Added resource.c.
6171         * Make-lang.in (gt-java-resource.h): New target.
6172         (JAVA_OBJS): Added resource.o.
6173         (java/resource.o): New target.
6174         * resource.c: New file.
6175         * class.c (compile_resource_file): Moved to resource.c.
6176         (registerResource_libfunc): Likewise.
6177         (utf8_decl_list): Mark with GTY; now static.
6178         * jcf-parse.c (classify_zip_file): New function.
6179         (parse_zip_file_entries): Use it; compile .properties files.
6180         (process_zip_dir): Use classify_zip_file and compute_class_name.
6181         Don't write class name into zip directory.
6182         (java_parse_file): Call write_resource_constructor.
6183         (compute_class_name): New function.
6184         * jcf-io.c (read_zip_member): Reindented.
6186 2003-01-21  Tom Tromey  <tromey@redhat.com>
6188         * class.c (supers_all_compiled): New function.
6189         (make_class_data): Use it.
6191 2003-01-21  Tom Tromey  <tromey@redhat.com>
6193         * parse.y (method_header): Native method can't be strictfp.
6194         No method can be transient or volatile.
6196 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6198         Make-lang.in (jvspec.o-warn): Add -Wno-error.
6200 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6202         * check-init.c: Fix comment typos.
6203         * class.c: Likewise.
6204         * constants.c: Likewise.
6205         * decl.c: Likewise.
6206         * except.c: Likewise.
6207         * expr.c: Likewise.
6208         * java-except.h: Likewise.
6209         * java-tree.h: Likewise.
6210         * javaop.h: Likewise.
6211         * jcf-dump.c: Likewise.
6212         * jcf-io.c: Likewise.
6213         * jcf-parse.c: Likewise.
6214         * jcf-write.c: Likewise.
6215         * lang.c: Likewise.
6216         * mangle.c: Likewise.
6217         * typeck.c: Likewise.
6218         * verify.c: Likewise.
6220 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6222         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6223         * jcf-write.c: Include "tm_p.h".
6225 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6227         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6229 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6231         * builtins.c (java_build_function_call_expr): Renamed from
6232         build_function_call_expr.  All callers changed.
6234         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6235         * jcf-parse.c: Include tm_p.h.
6237         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6238         warning.
6240 2003-01-14  Tom Tromey  <tromey@redhat.com>
6242         * class.c (make_class_data): Check that super is compiled before
6243         building class reference to it.
6245 2003-01-14  Andrew Haley  <aph@redhat.com>
6247         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6248         varargs function -- correct.
6250 2003-01-14  Andrew Haley  <aph@redhat.com>
6252         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6254 2003-01-14  Andrew Haley  <aph@redhat.com>
6256         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6257         varargs function -- correct.
6259         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6260         temporary if the RHS is a reference.
6262 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6264         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6265         * keyword.h: Regenerated.
6267         * All Files: Convert to ISO C style function definitions.
6269 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6271         * parse.y (check_pkg_class_access): ANSIfy definition.
6273 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6275         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6276         xmalloc et al.
6278         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6280 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6282         Merge from pch-branch:
6284         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6286         * Make-lang.in (java/gjavah.o): Update dependencies.
6287         * gjavah.c: Include ggc.h.
6289         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6291         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6292         (JCFDUMP_OBJS): Add ggc-none.o.
6293         (java/jcf-dump.o): Depend on GGC_H.
6294         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6295         CPool substructures.
6296         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6297         * jcf-dump.c: Include ggc.h.
6299         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6301         * jcf.h (union cpool_entry): New.
6302         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6303         an array of unions.
6304         (struct JCF): Use gengtype to mark.
6305         (CPOOL_UINT): Update for new cpool_entry type.
6306         (CPOOL_USHORT1): Likewise.
6307         (CPOOL_USHORT2): Likewise.
6308         (CPOOL_FINISH): Use GC to free cpool subfields.
6309         * parse.h (struct parser_ctxt): Mark field current_jcf.
6310         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6311         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6312         (main_jcf): Use gengtype to mark.
6313         (ggc_mark_jcf): Delete.
6314         (get_constant): Update for new cpool_entry type.
6315         (give_name_to_class): Likewise.
6316         (get_class_constant): Likewise.
6317         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6318         (java_parse_file): Use GGC to allocate struct JCF.
6319         (init_jcf_parse): Don't call ggc_add_root.
6320         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6321         cpool_entry type.
6322         * java-tree.h (current_jcf): Use gengtype to mark.
6323         (CPOOL_UTF): Update for new cpool_entry type.
6324         (outgoing_cpool): Use gengtype to mark.
6325         (struct lang_type): GC struct JCF and struct CPool.
6326         * config-lang.in (gtfiles): Add jcf.h.
6327         * constants.c (find_tree_constant): New.
6328         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6329         for new cpool_entry type.
6330         (find_constant1): Update for new cpool_entry type.
6331         (find_constant2): Likewise.
6332         (find_utf8_constant): Use find_tree_constant.
6333         (find_class_or_string_constant): Remove unnecessary cast to jword.
6334         Update for new cpool_entry type.
6335         (count_constant_pool_bytes): Update for new cpool_entry type.
6336         (write_constant_pool): Likewise.
6337         (alloc_name_constant): Use find_tree_constant.
6338         (build_constants_constructor): Update for new cpool_entry type.
6340         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6342         * parse.y (mark_parser_ctxt): Delete.
6343         (goal): Don't use ggc_add_root.
6344         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6345         (java_pop_parser_context): Let GC free parser_ctxt.
6346         (java_parser_context_resume): Likewise.
6347         * parse.h (struct parser_ctxt): Use gengtype to mark.
6348         (ctxp): Likewise.
6349         (ctxp_for_generation): Likewise.
6350         * lex.h (struct java_lc_s): Mark for gengtype.
6351         (java_lexer): Rearrange for gengtype.
6352         * config-lang.in (gtfiles): Add lex.h, parse.h.
6354 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6356         * All Files: Remove PARAMS macro.
6358         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6359         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6360         `__STDC__' macros.
6362         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6363         VA_CLOSE.
6365 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6367         * Make-lang.in (java.install-common, java.uninstall,
6368         java.install-info, java.install-man): Prepend $(DESTDIR)
6369         to destination paths in all (un)installation commands.
6370         (java.install-common): Rewrite $(LN) command to support
6371         DESTDIR with "ln" as well as with "ln -s".
6373 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6375         * java-tree.h: Protect against multiple inclusion.
6377 2003-01-07  Tom Tromey  <tromey@redhat.com>
6379         * class.c (add_assume_compiled): Don't adjust parent if we're
6380         already at the root of tree.
6382 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6384         * lang.c (dump_compound_expr): Prototype.
6386 2003-01-03  Tom Tromey  <tromey@redhat.com>
6388         Fix for PR java/8712:
6389         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6390         when simply checking against `null'.
6392 2003-01-03  Tom Tromey  <tromey@redhat.com>
6394         * gcj.texi (Standard Properties): Document http.proxyHost and
6395         http.proxyPort.
6397         * gcj.texi (GNU Classpath Properties): Document new properties.
6399 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6401         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6402         java/lang-options.h, java/mangle.c, java/mangle_name.c,
6403         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6405 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6407         * Make-lang.in, boehm.c, buffer.c,
6408           buffer.h, builtins.c, class.c,
6409           config-lang.in, constants.c,
6410           convert.h, decl.c, except.c,
6411           expr.c, java-except.h,
6412           java-tree.h, javaop.def,
6413           jcf-parse.c, jcf-write.c,
6414           jv-scan.c, jvgenmain.c,
6415           jvspec.c, keyword.gperf,
6416           keyword.h, lang-options.h,
6417           lang-specs.h, lang.c, lex.c,
6418           lex.h, mangle.c, mangle_name.c,
6419           parse-scan.y, parse.h, parse.y,
6420           typeck.c, verify.c, xref.c,
6421           xref.h: Replace "GNU CC" with
6422           "GCC" in the copyright header.
6424         * check-init.c, gjavah.c, javaop.h,
6425           jcf-depend.c, jcf-dump.c, jcf-io.c,
6426           jcf-path.c, jcf-reader.c, jcf.h,
6427           zextract.c, zipfile.h: These files are
6428           "part of GCC". Also say "GCC" not "GNU CC".
6430 2002-12-30  DJ Delorie  <dj@redhat.com>
6432         * Make-lang.in: Protect against texi2pod/pod2man failing.
6434 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
6436         * gcj.texi: Use @copying.
6438 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6440         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6441         print_cxx_classname.
6442         (print_cxx_classname): Add add_scope parameter.
6443         (print_class_decls): Do not emit a semicolon after the extern
6444         "Java" block.
6445         (process_file): Adjust calls to print_cxx_classname.
6447 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6449         * gcj.texi: Include Cover Texts in man page.
6451 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
6453         * class.c (build_static_field_ref): Check FIELD_FINAL.
6455         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6456         instead of current_constant_pool_data_ref.
6457         * java-tree.h (current_constant_pool_data_ref): Undefine.
6458         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6459         * jcf-parse.c (init_outgoing_cpool): Don't initialize
6460         current_constant_pool_data_ref.
6462         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6463         not build_internal_class_name.
6465         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6466         Use it when class ref isn't certain to be compiled.
6468 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6470         * gcj.texi: Include gcc-common.texi.
6471         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6472         $(srcdir)/doc/include/gcc-common.texi.
6474 2002-12-22  Anthony Green  <green@redhat.com>
6476         * gcj.texi (Limitations): Add note about org.xml.sax and
6477         org.w3c.dom.
6479 2002-12-20  Tom Tromey  <tromey@redhat.com>
6481         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6482         where minimum case value is Integer.MIN_VALUE.
6483         Fixes PR java/8955.
6485 2002-12-18  Andrew Haley  <aph@redhat.com>
6487         * parse.y (patch_invoke): Force evaluation order when `check' is
6488         set.  For PR libgcj/8945.
6490 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
6492         * gcj.texi: Change version number to 3.4.
6494 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
6495         Andrew Haley <aph@redhat.com>
6497         * parse.y (source_end_java_method): Remove custom encoding of line
6498         numbers for a function decl before passing it to the back end.
6500 2002-12-03  Andrew Haley  <aph@redhat.com>
6502         * class.c (make_class_data): New field, "chain".
6503         * decl.c (java_init_decl_processing): Likewise.
6505 2002-12-02  Tom Tromey  <tromey@redhat.com>
6507         For PR java/8740:
6508         * parse.y (do_resolve_class): Handle qualified name via
6509         recursion.
6511 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6513         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6514         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6515         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6516         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6517         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6518         Include coretypes.h and tm.h.
6519         * Make-lang.in: Update dependencies.
6521 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6523         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6525 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6527         * jcf-reader.c: Don't expand JCF_readu4 inside the
6528         expansion of JCF_SKIP.
6530 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6532         * jcf-reader.c: Don't expand JCF_readu4 inside the
6533         expansion of JCF_SKIP.
6535 2002-11-22  Tom Tromey  <tromey@redhat.com>
6537         * parse.y (patch_binop): Cast right hand side of shift expression
6538         to `int'.  Fixes PR java/8676.
6540 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
6541             Andrew Haley <aph@redhat.com>
6543         * gcc/java/jcf-write.c (write_classfile): Remove target
6544         class file, if it exists, before renaming the temporary
6545         class file to it.
6547 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6549         * jvspec.c (lang_specific_spec_functions): New.
6551 2002-11-18  Tom Tromey  <tromey@redhat.com>
6553         Fix for PR java/7912:
6554         * expr.c (can_widen_reference_to): Allow cast of array to
6555         Cloneable or Serializable.
6556         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
6557         (java_io_serializable_identifier_node): Likewise.
6558         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
6559         (valid_ref_assignconv_cast_p): Use new identifier nodes.
6560         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
6561         java_io_serializable.
6562         * decl.c (java_init_decl_processing): Initialize
6563         java_lang_cloneable_identifier_node and
6564         java_io_serializable_identifier_node.
6565         (java_lang_cloneable_identifier_node): New global.
6566         (java_io_serializable_identifier_node): Likewise.
6568 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
6570         * buffer.c: Remove unnecessary casts.
6571         * check-init.c: Likewise.
6572         * class.c: Likewise.
6573         * constants.c: Likewise.
6574         * decl.c: Likewise.
6575         * except.c: Likewise.
6576         * gjavah.c: Likewise.
6577         * jcf-io.c: Likewise.
6578         * jcf-parse.c: Likewise.
6579         * jcf-path.c: Likewise.
6580         * jvspec.c: Likewise.
6581         * lang.c: Likewise.
6582         * lex.c: Likewise.
6583         * verify.c: Likewise.
6585 2002-11-06  Tom Tromey  <tromey@redhat.com>
6587         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6588         a JNI header.
6590 2002-11-05  Tom Tromey  <tromey@redhat.com>
6592         Fix for PR java/6388.
6593         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
6594         * java-tree.h (enum java_tree_index): New values
6595         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
6596         (decimal_int_max, decimal_long_max): New defines.
6597         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
6598         (error_if_numeric_overflow): Rewrote range checking.
6599         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
6600         decimal_long_max.
6602 2002-11-02  Tom Tromey  <tromey@redhat.com>
6604         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6606         * class.c (make_method_value): Put class name, not signature, into
6607         `throws' field.  For PR java/8415.
6609 2002-10-24  Tom Tromey  <tromey@redhat.com>
6611         * gcj.texi (Invoking gij): Document --showversion.
6612         (Standard Properties): java.library.path now set.
6614 2002-10-23  Tom Tromey  <tromey@redhat.com>
6616         * gjavah.c (decode_signature_piece): In JNI mode, print
6617         `jobjectArray' when array depth is nonzero.
6618         Fixes PR java/8296.
6620 2002-10-15  Andrew Haley  <aph@redhat.com>
6622         * parse.y (patch_invoke): Call force_evaluation_order on a static
6623         arg list.
6624         (resolve_qualified_expression_name): Call force_evaluation_order
6625         on a arg list that is part of a Qualified Expression Name.
6627         * lang.c (dump_compound_expr): New.
6628         (java_dump_tree): New.
6630 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
6632         * gcj.texi: Added item describing the GCJ runtime property
6633         "gnu.gcj.progname".
6635 2002-10-15  Richard Henderson  <rth@redhat.com>
6637         * jcf-parse.c (get_constant): Fix type warning.
6639 2002-10-15  Andrew Haley  <aph@redhat.com>
6641         * java-tree.h (java_inlining_merge_static_initializers): Declare.
6642         (java_inlining_map_static_initializers): Declare.
6644 2002-10-14  Andrew Haley  <aph@redhat.com>
6646         * tree-inline.c (remap_block): All local class initialization
6647         flags go in the outermost scope.
6648         (expand_call_inline): Call java_inlining_map_static_initializers.
6649         (expand_call_inline): Call java_inlining_merge_static_initializers.
6650         * java/lang.c (merge_init_test_initialization): New.
6651         (java_inlining_merge_static_initializers): New.
6652         (inline_init_test_initialization): New.
6653         (java_inlining_map_static_initializers): New.
6655 2002-10-11  Mark Wielaard  <mark@klomp.org>
6657         * gcj.texi (Compatibility): Add Limitations and Extensions section.
6659 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6661         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6663 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6665         * parse.y (merge_string_cste): Add parentheses around & within |.
6667 2002-10-08  Tom Tromey  <tromey@redhat.com>
6669         * parse.y (variable_declarator_id): Simplify error path for
6670         array declarator error.  For PR java/8003.
6672 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
6674         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6675         bug_report_url.
6677 2002-10-08  Andrew Haley  <aph@redhat.com>
6679         * parse.y (attach_init_test_initialization_flags): Check for
6680         error_mark_node.
6682 2002-10-07  Anthony Green  <green@redhat.com>
6684         * parse.y (merge_string_cste): Fix bug in string concatenation.
6686 2002-10-03  Michael Koch  <konqueror@gmx.de>
6688         * gcj.texi (Standard properties):
6689         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
6691 2002-10-02  Roger Sayle  <roger@eyesopen.com>
6693         PR optimization/6627
6694         * lang.c (java_init): If storing the vbit in function
6695         pointers, ensure that force_align_functions_log is atleast
6696         one to aid compatability with g++ vtables.
6698 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
6700         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
6701         foul of type-based aliasing.
6703 2002-09-30  Anthony Green  <green@redhat.com>
6705         * gcj.texi (Invoking jv-scan): Fix texinfo.
6707 2002-09-28  Anthony Green  <green@redhat.com>
6709         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
6710         (Code Generation): Add -fno-assert documentation.
6711         * jv-scan.c (flag_assert): New global.
6712         (options): Add assert option.
6713         (help): Add --no-assert documentation.
6714         * parse-scan.y (flag_assert): New global.
6715         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
6716         (flag_assert): New global.
6717         * java-tree.h (flag_assert): New global.
6718         * lex.c (java_lex): Obey flag_assert.
6719         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
6720         calling cc1.
6722 2002-09-26  Andrew Haley  <aph@redhat.com>
6724         * expr.c (build_java_array_length_access): Check for null pointer.
6725         * expr.c (expand_java_arrayload): Likewise.
6727 2002-09-21  Richard Henderson  <rth@redhat.com>
6729         * jcf-parse.c (get_constant): Decode from IEEE no matter
6730         what the target format.
6732 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
6734         * ChangeLog: Follow spelling conventions.
6735         * class.c: Likewise.
6736         * decl.c: Likewise.
6737         * expr.c: Likewise.
6738         * gjavah.c: Likewise.
6739         * java-tree.h: Likewise.
6740         * jcf-dump.c: Likewise.
6741         * jcf-parse.c: Likewise.
6742         * jvspec.c: Likewise.
6743         * lang.c: Likewise.
6744         * mangle.c: Likewise.
6745         * parse.y: Likewise.
6747 2002-09-17  Tom Tromey  <tromey@redhat.com>
6749         * lex.c (java_read_unicode_collapsing_terminators): Handle case
6750         where \r appears at EOF.  Fixes PR java/7950.
6752 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6754         * jvspec.c (lang_specific_driver): Remove unused variable.
6756 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
6758         * java-tree.h (union lang_tree_node): Add chain_next option.
6760 2002-09-16  Richard Henderson  <rth@redhat.com>
6762         * jcf-parse.c (get_constant): Runtime check for IEEE format;
6763         use new real.h interface.
6764         * jcf-write.c (find_constant_index): Use new real.h interface.
6765         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
6767 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
6769         * lang.c: Follow spelling conventions.
6771 2002-09-11  Per Bothner  <per@bothner.com>
6773         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
6774         constant to the type of the field.
6775         (java_complete_tree):  Remove now-redundant code.
6777         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
6779 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
6781         For PR java/5794:
6782         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
6783         return label if a ret instruction for the jsr has been reached.
6785 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
6787         * parse.y (DIR_SEPARATOR): Don't define.
6788         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
6790 2002-08-28  Andrew Haley  <aph@redhat.com>
6792         * verify.c (verify_jvm_instructions): Allow exception handler
6793         inside code that is being protected, but generate a warning.
6794         * except.c (link_handler): Initialize `expanded' in new eh_range.
6795         (binding_depth, is_class_level, current_pc): Declare extern.
6797 2002-09-01  Mark Wielaard <mark@klomp.org>
6799         * gcj.texi: Add chapter about system properties.
6800         Fixed some typos.
6802 2002-08-26  Tom Tromey  <tromey@redhat.com>
6804         * parse.y (try_builtin_assignconv): Allow narrowing primitive
6805         conversion if RHS_TYPE is byte, short, or char.
6807 2002-08-22  Tom Tromey  <tromey@redhat.com>
6809         * gcj.texi (Invoking gij): Document -cp and -classpath.
6811 2002-08-21  Tom Tromey  <tromey@redhat.com>
6813         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
6814         $(prefix)/share.  For PR libgcj/7633.
6816         For PR java/6005 and PR java/7611:
6817         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
6818         (java_can_use_bit_fields_p): New function.
6820 2002-08-16  Tom Tromey  <tromey@redhat.com>
6822         * gcj.texi (Class Initialization): Mention class initialization of
6823         arrays.
6825 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
6827         * Make-lang.in (java-tree-inline.o): New.
6828         (JAVA_OBJS): Add java-tree-inline.o.
6829         * parse.y (source_end_java_method): Call java_optimize_inline.
6830         (java_expand_method_bodies): Save method's tree in
6831         DECL_SAVED_TREE.
6832         (add_stmt_to_compound): Keep track of the number of statments.
6833         * lang.c (java_init): Enable flag_inline_trees.
6834         (java_post_options): If flag_inline_functions is on, enable
6835         flag_inline_trees instread.
6836         (decl_constant_value): New.
6837         (java_tree_inlining_walk_subtrees): New.
6838         * java-tree.h (DECL_NUM_STMTS): New macro.
6839         (java_optimize_inline): Declare.
6840         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
6841         Handle a LABEL_EXPR.
6842         * decl.c (build_result_decl): If we already have a DECL_RESULT
6843         don't make another.
6844         (dump_function): New.
6845         (java_optimize_inline): New.
6846         (dump_function): New.
6848 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
6850         For PR java/7483:
6851         * parse.y (build_assertion): Invert return from
6852         desiredAssertionStatus.
6854 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6856         * jcf-write.c (get_access_flags): Return correct access flags for
6857         private and protected inner classes.
6859 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6861         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
6863 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
6865         * mangle_name.c: Don't include obstack.h twice.
6866         * xref.c: Don't include obstack.h.
6868 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
6870         * class.c: (permanent_obstack): Delete declaration.
6871         * constants.c: (permanent_obstack): Delete declaration.
6872         * except.c: (permanent_obstack): Delete declaration.
6873         * expr.c: (permanent_obstack): Delete declaration.
6874         * jcf-parse.c: (permanent_obstack): Delete declaration.
6875         (saveable_obstack): Delete declaration.
6876         * parse.h: (permanent_obstack): Delete declaration.
6877         * typeck.c: (permanent_obstack): Delete declaration.
6879 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6881         * gcj.texi (version-gcc): Increase to 3.3.
6883 2002-07-22  Tom Tromey  <tromey@redhat.com>
6885         * lex.c (java_lex): Check for `e' or `E' after 0.
6887 2002-07-21  Richard Henderson  <rth@redhat.com>
6889         * lang.c (java_unsafe_for_reeval): New.
6890         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
6892 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
6894         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
6895         (jcf_path_init): Use GET_ENVIRONMENT.
6897 2002-07-10  Roger Sayle  <roger@eyesopen.com>
6898             Zack Weinberg <zack@codesourcery.com>
6900         * builtins.c (initialize_builtins): Remove defines that
6901         handled C/C++ specific junk hereby removed from builtins.def.
6903 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
6905         * lang.c (java_post_options): Update prototype.
6907 2002-07-05  Roger Sayle  <roger@eyesopen.com>
6909         * builtins.c (initialize_builtins): Ignore the additional
6910         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
6911         the builtins.def file.
6913 2002-07-01  Tom Tromey  <tromey@redhat.com>
6915         For PR libgcj/7073:
6916         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
6917         specially.
6919 2002-07-01  Roger Sayle  <roger@eyesopen.com>
6921         * java/decl.c (builtin_function): Accept additional parameter.
6922         (java_init_decl_processing): Pass an additional NULL_TREE
6923         argument to builtin_function.
6925 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
6927         * gcj.texi: Fixed gcj invocation example so that it compiles.
6929 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6931         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
6932         * parse.y (mark_parser_ctxt): Likewise.
6933         (check_modifiers, declare_local_variables): Avoid incorrect
6934         hardcoded constant 10.
6936         * lex.c (java_read_char): Avoid "comparison is always true"
6937         warning.
6939 2002-06-25  Andreas Schwab  <schwab@suse.de>
6941         * expr.c (JSR): Avoid undefined operation on PC.
6943 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6945         * decl.c (clear_binding_level): Const-ify.
6947 2002-06-13  Akim Demaille  <akim@epita.fr>
6949         * parse.y (class_declaration, interface_declaration): Make sure
6950         all their rules have an action, in order to avoid meaningless `$$
6951         = $1' and their type clashes.
6953 2002-06-11  Tom Tromey  <tromey@redhat.com>
6955         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
6956         * parse-scan.y (statement_without_trailing_substatement): Added
6957         assert_statement.
6958         (assert_statement): New rule.
6959         * java-tree.h (struct lang_type) [assertions]: New field.
6960         (TYPE_USES_ASSERTIONS): New macro.
6961         (CLASS_USES_ASSERTIONS): Likewise.
6962         (FIELD_SYNTHETIC): New define.
6963         * lex.c (java_lval;): Added ASSERT_TK.
6964         * parse.y (ASSERT_TK): Added.
6965         (statement_without_trailing_substatement): Added assert_statement.
6966         (assert_statement): New rule.
6967         (build_assertion): New function.
6968         (maybe_generate_pre_expand_clinit): Create and initialize
6969         $assertionsDisabled.
6970         (lookup_package_type): Removed decl.
6971         * keyword.h: Rebuilt.
6972         * keyword.gperf (assert): New token.
6974 2002-06-10  Akim Demaille  <akim@epita.fr>
6976         * parse.y (interface_type_list, class_member_declaration)
6977         (unary_expression_not_plus_minus): Remove duplicate %type.
6978         Whitespace changes.
6980 2002-06-09  Tom Tromey  <tromey@redhat.com>
6982         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
6984         * parse.y (method_header): Give error message in all cases.
6985         Fixes PR java/6865.
6987 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6989         Don't use RTL inlining. Fix for PR java/6820.
6990         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
6991         (flag_really_inline): New.
6992         (java_decode_option): Set flag_really_inline if -finline-functions
6993         is seen.
6994         (java_post_options): New function. Turn off inlining unless
6995         flag_really_inline is set.
6997 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6999         * gjavah.c (throwable_p): Accept argument as either a classname or
7000         signature fragment. Create null-terminated classname string for super
7001         when calling itself recursively.
7002         (decode_signature_piece): Skip first character from class name
7003         signature when calling throwable_p.
7005 2002-06-08  H.J. Lu  (hjl@gnu.org)
7007         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7009 2002-06-04  Tom Tromey  <tromey@redhat.com>
7011         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7013 2002-06-04  Michael Koch  <konqueror@gmx.de>
7015         * gcj.texi (Input Options): Fixed typo.
7017 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
7019         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7020         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7021         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7022         and all now-pointless local variables.  Rename other local
7023         variables to reflect their not being handles.
7025         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7026         #if JCF_USE_STDIO blocks.
7028         * parse.y: Add missing semicolon at end of rule.
7030 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7032         * check-init.c (attach_initialized_static_class): Delete, unused.
7033         * parse.y: Use htab_t instead of struct hashtable, update
7034         all uses.
7035         * java-tree.h: Include hashtab.h instead of hash.h.
7036         (struct lang_decl_func): Use htab_t, set up for gengtype.
7037         (struct init_test_hash_entry): Delete.
7038         (struct treetreehash_entry): New.
7039         (java_treetreehash_find): New
7040         (java_treetreehash_new): New prototype.
7041         (java_treetreehash_create): New prototype.
7042         (java_mark_tree): Delete prototype.
7043         (java_hash_hash_tree_node): Delete prototype.
7044         (java_hash_compare_tree_node): Delete prototype.
7045         (attach_initialized_static_class): Delete prototype.
7046         * expr.c (build_class_init): Update to use java_treetreehash
7047         functions.
7048         (java_expand_expr): Update to use htab_t.
7049         (emit_init_test_initialization): Likewise.
7050         * decl.c (java_mark_tree): Delete.
7051         * class.c (init_test_hash_newfunc): Delete.
7052         (java_hash_hash_tree_node): Delete.
7053         (java_hash_compare_tree_node): Delete.
7054         (add_method_1): Update to use java_treetreehash functions.
7055         (JAVA_TREEHASHHASH_H): New macro.
7056         (java_treetreehash_hash): New function.
7057         (java_treetreehash_compare): New function.
7058         (java_treetreehash_find): New function.
7059         (java_treetreehash_new): New function.
7060         (java_treetreehash_create): New function.
7061         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7063         * Make-lang.in (java/parse.o): Depend on debug.h.
7064         * java-tree.h (struct lang_identifier): Use gengtype.
7065         (union lang_tree_node): New.
7066         (struct lang_decl_func): Use gengtype.
7067         (struct lang_decl_var): Likewise.
7068         (struct lang_decl): Likewise.
7069         * parse.y: Include debug.h.
7070         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7072         * lang.c (struct language_function): New dummy structure.
7074         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7075         descriminator for DECL_LANG_SPECIFIC.
7076         (struct lang_decl_func): Rename from struct lang_decl.
7077         (enum lang_decl_desc): New.
7078         (struct lang_decl): Make it a union.  Update all the accessor macros.
7079         (struct lang_type): Use gengtype.
7080         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7081         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7082         are now the same size.
7083         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7084         use discriminator to mark DECL_LANG_SPECIFIC.
7086         * Make-lang.in (gt-java-builtins.h): New rule.
7087         (java/builtins.o): Add dependency on gt-<filename>.h.
7088         * builtins.c: Use gengtype for roots.
7089         (union string_or_tree): Use gengtype.
7090         (struct builtin_record): Use gengtype.
7091         * config-lang.in (gtfiles): Add builtins.c.
7093         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7094         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7095         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7096         gt-java-parse.h, gtype-java.h): Add rules to generate.
7097         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7098         (class.o): Add dependency on gt-*.h.
7099         (constants.o): Likewise.
7100         (decl.o): Likewise.
7101         (expr.o): Likewise.
7102         (jcf-parse.o): Likewise.
7103         (jcf-write.o): Likewise.
7104         (lang.o): Likewise.
7105         * config-lang.in (gtfiles): New.
7106         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7107         * constants.c: Replace uses of ggc_add_* with GTY markers.
7108         Include gt-*.h.
7109         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7110         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7111         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7112         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7113         Include gt-*.h.
7114         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7115         Include gt-*.h.
7116         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7117         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
7118         gt-*.h.
7119         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7120         Include gtype-java.h.
7122 2002-06-02  Tom Tromey  <tromey@redhat.com>
7124         Fix for PR java/5913:
7125         * parse.y (patch_binop): Call patch_string on op1.
7127 2002-06-02  Tom Tromey  <tromey@redhat.com>
7129         Fix for PR java/1343, PR java/6336:
7130         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7131         formatting.  Changed return type.
7132         (anonymous_class_counter): Moved to top of file.
7133         (maybe_make_nested_class_name): Append number to class name for
7134         function-local classes.
7136 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7138         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7139         * Make-lang.in: Update dependency lists.
7141 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
7143         * gjavah.c (throwable_p): Do not free the name of the class after
7144         passing it to find_class.
7145         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7146         * jcf-io.c (dirent.h): Include it.
7147         (fnmatch.h): Likewise.
7148         (compare_path): New function.
7149         (java_or_class_file): Likewise.
7150         (memoized_dirlist_entry): New type.
7151         (memoized_dirlist_lookup_eq): New function.
7152         (memoized_dirlists): New variable.
7153         (caching_stat): New function.
7154         (memoized_class_lookup_eq): New function.
7155         (memoized_class_lookups): Likewise.
7156         (find_class): Use memoized_class_lookups and caching_stat.
7157         * jcf.h (JCF_USE_SCANDIR): Define.
7158         * parse.y (java_expand_classes): Write the class files in reverse
7159         order.
7161 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7163         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7165 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
7167         * jcf-write.c (write_classfile): Unlink the temporary file if it
7168         cannot be renamed.  Use concat to build up the name of the
7169         temporary file.
7171 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
7173         * jcf-write.c (write_classfile): Write the file to a
7174         temporary file and then rename it.
7176 2002-05-07  Tom Tromey  <tromey@redhat.com>
7178         * gjavah.c (throwable_p): Use xstrdup, not strdup.
7180         Fix for PR java/1200:
7181         * gjavah.c (throwable_p): New function.
7182         (decode_signature_piece): Use it.  A `WeakReference' isn't the
7183         same as a `jweak'.
7184         Include hashtab.h.
7185         (gcjh_streq): New function.
7187 2002-05-07  Andreas Jaeger  <aj@suse.de>
7189         * parse.y (finish_for_loop): Fix if statement.
7191 2002-05-06  Tom Tromey  <tromey@redhat.com>
7193         Fix for PR java/5941:
7194         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7195         loop update expression.
7196         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7197         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7199 2002-05-04  Mark Wielaard  <mark@klomp.org>
7201         For PR java/6519:
7202         * parse.y (build_string_concatenation): Return just op1 only when op2
7203         is null and op1 is a STRING_CST, otherwise always construct a
7204         StringBuffer.
7206 2002-04-27  Tom Tromey  <tromey@redhat.com>
7208         For PR java/6382:
7209         * parse.y (string_convert_int_cst): New function.
7210         (merge_string_cste): Use it.
7212 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7214         * java-tree.h (java_parse_file): Update.
7215         (java_set_yydebug): Remove.
7216         * jcf-parse.c (yydebug): Remove.
7217         (java_set_yydebug): Die.
7218         (java_parse_file): Update.
7219         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7221 2002-04-24  Tom Tromey  <tromey@redhat.com>
7223         For PR java/6425:
7224         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7225         EXPR_WFL_QUALIFICATION of qual_wfl.
7227 2002-04-23  Per Bothner  <per@bothner.com>
7229         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7230         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7231         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7233 2002-04-23  Tom Tromey  <tromey@redhat.com>
7235         For PR java/6314:
7236         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7237         recognize `-fcompile-resource='.
7238         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7239         a bit.
7241 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7243         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7244         paths. Fixes PR java/2791.
7246 2002-04-19  Andrew Haley  <aph@redhat.com>
7248         * jcf-write.c (push_long_const): lo, hi: New variables.
7249         Use rshift_double to extract the high part of a 64-bit long.
7250         Use WORD_TO_INT to extract the low part.
7252         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7253         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7254         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7256 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7258         * typeck.c (incomplete_type_error): Remove.
7260 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7262         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7263         for hash synchronization.
7264         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7265         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7266         class_type_node.
7268 2002-04-16  Mark Wielaard  <mark@klomp.org>
7270         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7271         negative zero.
7273 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7275         Fix for PR java/6294:
7276         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7277         interfaces.
7279 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7281         Fix for PR java/6085:
7282         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7283         to get enclosing "this" argument for inner-class constructor
7284         invocation. Pass correct arguments to build_access_to_thisn.
7286 2002-04-10  Andreas Jaeger  <aj@suse.de>
7288         * gcj.texi (Input Options): Fix extdirs patch.
7290 2002-04-10  Anthony Green  <green@redhat.com>
7292         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7294 2002-04-09  Anthony Green  <green@redhat.com>
7296         * gcj.texi (Input Options): Add --extdirs documentation.
7297         * jcf-dump.c (OPT_extdirs): New macro.
7298         (options): Add extdirs option.
7299         (help): Describe --extdirs.
7300         (main): Handle OPT_extdirs.
7301         * gjavah.c (OPT_extdirs): New macro.
7302         (options): Add extdirs option.
7303         (help): Describe --extdirs.
7304         (main): Handle OPT_extdirs.
7305         * jcf-path.c (jcf_path_init): Add extdirs support.
7306         (jcf_path_extdirs_arg): New function.
7307         (extensions): New variable to hold extensions path entries.
7308         * jvspec.c: Remove -fextdirs= when compiling main().
7309         * lang.c (java_decode_option): Handle -fextdirs=.
7310         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7311         * Make-lang.in: Compile jcf-path with version info for use in
7312         identifying the appropriate libgcj.jar.
7314 2002-04-08  Tom Tromey  <tromey@redhat.com>
7316         For PR libgcj/5303:
7317         * .cvsignore: Added rmic.1 and rmiregistry.1.
7318         * gcj.texi (Top): Link to new nodes.
7319         (Invoking rmic): New node.
7320         (Invoking rmiregistry): Likewise.
7321         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7322         rmiregistry.1.
7323         (java.maintainer-clean): Likewise.
7324         ($(srcdir)/java/rmic.1): New target.
7325         ($(srcdir)/java/rmiregistry.1): Likewise.
7326         (java.install-man): Handle rmic.1 and rmiregistry.1.
7328 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7330         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7331         Add note about handling uncaught exceptions. Add an exception handler
7332         to example.
7334 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7336         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7337         after using it to patch CALL_EXPR.
7339 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7341         * gcj.texi (Invocation): Document CNI invocation API.
7343 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7345         * expr.c (truthvalue_conversion): Rename.  Update.
7346         (expand_compare): Update.
7347         * java-tree.h (java_truthvalue_conversion): New.
7348         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7350 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7352         * java-tree.h (java_mark_addressable): New.
7353         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7354         * typeck.c (mark_addressable): Rename, update.
7356 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7358         * expr.c (build_java_binop): Update.
7359         * java-tree.h (java_signed_type, java_unsigned_type,
7360         java_signed_or_unsigned_type): Update.
7361         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7362         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7363         * parse.y (patch_binop): Update.
7364         * typeck.c (signed_or_unsigned_type, unsigned_type,
7365         signed_type): Update.
7367 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7369         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7370         (java_dummy_print): Remove.
7371         (lang_print_error): Rename.  Exit early if inhibiting output.
7372         (inhibit_error_printing_function): New.
7373         (java_init): Don't set hook.
7374         (lang_init_source): Use new boolean.
7376 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7378         * parse.y (do_resolve_class): Fix infinite recursion.
7380 2002-03-29  Tom Tromey  <tromey@redhat.com>
7382         * parse.y (check_inner_circular_reference): Ignore incomplete
7383         types.
7385 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7387         * Make-lang.in (builtins.o): Update.
7388         * boehm.c (get_boehm_type_descriptor): Update.
7389         * builtins.c: Include langhooks.h.
7390         * decl.c (java_init_decl_processing): Update.
7391         * java-tree.h (java_type_for_mode, java_type_for_size): New.
7392         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7393         Redefine.
7394         * typeck.c (type_for_mode, type_for_size): Update.
7396 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7398         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7400 2002-03-28  Tom Tromey  <tromey@redhat.com>
7402         * except.c (expand_end_java_handler): If the handler type is NULL,
7403         use java.lang.Throwable.  Fixes PR java/5986.
7405 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7407         Fix for PR java/4715:
7408         * jcf-parse.c (parse_source_file_3): New function.
7409         (read_class): Call it.
7410         (java_parse_file): Likewise.
7412 2002-03-28  Jan Hubicka  <jh@suse.cz>
7414         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7416 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7418         * parse.y (resolve_package): Initialize "decl".
7419         (lookup_package_type): Remove unused function.
7421 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7423         Fix for PR java/5993:
7424         * parse.y (resolve_package): Return the decl if resolution was
7425         successful. Don't special case "java.lang" and "java.lang.reflect"
7426         packages. Set type_name to the merged identifier.
7427         (resolved_qualified_expression_name): Print error using "name" if
7428         resolve_package returns NULL_TREE.
7430 2002-03-27  Tom Tromey  <tromey@redhat.com>
7432         * expr.c (expand_invoke): Don't generate null pointer check if
7433         we're calling <init>.
7435 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7437         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7438         fix prototype.
7439         * java-tree.h (java_lang_expand_expr): Similarly.
7440         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7441         (java_init): Don't set hook.
7443 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7445         Fix for PR java/5850:
7446         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7447         context if field was not found in the current scope.
7448         * expr.c (lookup_field): Don't look in enclosing contexts.
7450 2002-03-26  Tom Tromey  <tromey@redhat.com>
7452         Fix for PR java/5942:
7453         * parse.y (init_src_parse): Added sanity check.
7454         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7455         elements, not 11.
7457 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7459         * decl.c (lang_mark_tree): Rename java_mark_tree.
7460         * java-tree.h (java_mark_tree): New.
7461         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7463 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
7465         * lex.c: Change java_perform_atof to take normal parameters
7466         instead of a pointer to a parameter block.  Call it directly
7467         from java_lex.
7469 2002-03-22  Mark Wielaard  <mark@klomp.org>
7471         Fix for PR java/5368:
7472         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7473         when printing error message.
7475 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7477         * decl.c (maybe_build_cleanup): Remove.
7479 2002-03-22  Tom Tromey  <tromey@redhat.com>
7481         Andrew Haley  <aph@cambridge.redhat.com>
7483         * expr.c (build_field_ref): Don't build a check if the field is a
7484         member of `this'.
7486 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
7488         Fix for PR java/6026:
7489         * lex.c (java_lex): Fix parsing of consecutive floats.
7491 2002-03-21  Tom Tromey  <tromey@redhat.com>
7493         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7494         class.
7496 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7498         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7499         insert_block, getdecls, kept_level_p, global_bindings_p): New.
7501 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7503         * gcj.texi: @code{gcj} becomes @command{gcj}.
7504         @code{gcc} becomes @command{gcc}.
7505         GcjRaw changed to gnu.gcc.RawData.
7507 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7509         * decl.c (start_java_method): Use new hook.
7510         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7511         (java_init): Remove old hook.
7513 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7515         * builtins.c (define_builtin): Do nothing if `type' is null.
7516         Fixes PR java/5876.
7518 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7520         * parse.y (parser_check_super_interface): Fix error message
7521         grammar/order.
7523 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7525         * jcf-parse.c (get_constant): Delete unused variables.
7527 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7529         * java-tree.h (java_parse_file): New.
7530         * jcf-parse.c (yyparse): Rename java_parse_file.
7531         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7533 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7535         * parse.y (craft_constructor): Return the constructor decl.
7536         (java_expand_classes): Update comments.
7537         (lookup_method_invoke): Call fix_constructors immediately for
7538         anonymous class. Fixes PR java/5935.
7540 2002-03-15  Anthony Green  <green@redhat.com>
7542         * jcf-parse.c (yyparse): Don't emit class registration
7543         constructor when compiling resource files.
7545 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7547         * lang.c (java_tree_code_type, java_tree_code_length,
7548         tree_code_name): Delete.
7549         (tree_code_type, tree_code_length, tree_code_name): Define.
7550         (java_init): Don't try to copy into the various tree_code
7551         arrays.
7553 2002-03-12  Tom Tromey  <tromey@redhat.com>
7555         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7556         UTF-8, not UCS-2.  Fixes PR java/5923.
7558         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7559         a call_expr wrapped in a convert.  Fixes PR java/5848.
7561 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7563         * jcf-write.c (write_classfile): Improve error strings.
7565 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7567         * lex.c: Adjust comments to GNU standards.
7569 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7571         Fix for PR java/5902:
7572         * lex.c (java_lex): Fix parsing of literals.
7574 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7576         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
7577         to prevent it getting evaluated twice in the store checking case.
7578         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
7579         examining OBJECT.
7581 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7583         * decl.c (java_init_decl_processing): Make sure class_type_node
7584         alignment is not less than 64 bits if hash synchronization is enabled.
7586 2002-03-08  Per Bothner  <per@bothner.com>
7588         * parse.y (java_complete_lhs):  Check if patch_assignment
7589         returned an error-mark.
7591         * parse.y (try_builtin_assignconv):  Don't special-case zero.
7593 2002-03-08  Per Bothner  <per@bothner.com>
7595         Fix for PR java/5812.
7596         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
7597         here instead of in JSR macro.  Likewise with load_type_state call.
7598         Do the latter on if the return_pc has been verified (the jsr returns).
7599         (JSR):  Now just call build_java_jsr.
7601 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
7603         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7604         (java.install-common): Link native driver to
7605         JAVA_TARGET_INSTALL_NAME.
7607 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
7609         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7610         * builtins.c(sin_builtin): Likewise
7611         * builtins.c(sqrt_builtin): Likewise
7613 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
7615         * java/expr.c, java/jcf-parse.c, java/lex.c:
7616         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
7617         REAL_ARITHMETIC blocks unconditional.  Delete some further
7618         #ifdef blocks predicated on REAL_ARITHMETIC.
7620 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7622         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
7623         explicit sizeof/sizeof.
7624         * decl.c (java_init_decl_processing): Likewise.
7625         * jcf-parse.c (init_jcf_parse): Likewise.
7626         * parse.y (init_src_parse): Likewise.
7628 2002-03-02  Per Bothner  <per@bothner.com>
7630         Make --CLASSPATH by a synonym for --classpath and -classpath.
7631         Implement --bootclasspath.
7632         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
7633         (classpath_l):  Remove.
7634         (jcf_path_CLASSPATH_arg):  Remove.
7635         (jcf_path_bootclasspath_arg):  New function.
7636         (jcf_path_seal):  Simplify accordingly.
7638         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
7639         (jcf_path_CLASSPATH):  Remove declaration.
7640         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
7641         (lang_specific_driver):  Translate -bootclasspath.
7642         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
7643         * lang.c (decode_lang_options):  Do jcf_path_init first.
7644         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
7645         * gjavah.c:  Also handle --bootclasspath.
7646         Handle --CLASSPATH as a synonum for --classpath.
7647         * jcf-dump.c: Likewise.
7649         "." is not part of system path, but is the default for --classpath.
7650         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
7651         (jcf_path_seal):  Add "." if no CLASSPATH specified.
7653         * gcj.texi:  Document changes.
7655 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7657         * expr.c (build_java_arraystore_check): Fix formatting.
7659 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7661         Fix for PR java/5758, java/5632:
7662         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
7663         inner-class separator too.
7664         * parse.y (do_resolve_class): New local `decl_result.'
7665         Progressively build a name for what can have been loaded.
7667 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7669         * expr.c (java_array_data_offset): Removed function.
7670         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
7671         (build_java_array_length_access): Obtain "length" value using a
7672         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
7673         (build_java_arrayaccess): Correct comment. Access "data" using a
7674         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
7675         (build_java_arraystore_check): New function.
7676         (expand_java_arraystore): Use build_java_arraystore_check.
7677         * parse.y (patch_assignment): Simplify code to insert a store check
7678         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
7679         * check-init.c (check_init): Update to reflect that an array length
7680         access is now a COMPONENT_REF.
7681         * gcj.texi (Code Generation): Improve documentation of
7682         -fno-bounds-check. Add documentation for -fno-store-check.
7683         * java-tree.h (flag_store_check): Declare.
7684         (build_java_arraystore_check): Declare.
7685         * lang.c (flag_store_check): Initialize to 1.
7686         (lang_f_options): Add store-check option.
7687         * jvspec.c: Don't pass store-check option to jvgenmain.
7688         * lang-options.h: Add help string for -fno-store-check.
7690 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
7692         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
7693         * java-tree.h (java_dup_lang_specific_decl): New.
7694         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7696 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
7698         * builtins.c, decl.c: Delete traditional-mode-related code
7699         copied from the C front end but not used, or used only to
7700         permit the compiler to link.
7702 2002-02-22  Tom Tromey  <tromey@redhat.com>
7704         Fix for PR java/2369:
7705         * jvspec.c (verify_class_name): New function.
7706         (lang_specific_driver): Call it.
7707         (JAVA_START_CHAR_P): New macro.
7708         (JAVA_PART_CHAR_P): Likewise.
7710 2002-02-22  Per Bothner  <per@bothner.com>
7712         * class.c:  Change vtable to be more compatible with g++ v3 abi.
7713         (get_dispatch_table):  Prepend offset-to-top (always 0) and
7714         type_info pointer (currently unimplemented hence NULL) to vtable.
7715         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
7716         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
7717         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
7718         (build_dtable_decl):  Add declarations for new fields.
7720 2002-02-20  Per Bothner  <per@bothner.com>
7722         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
7723         to finit$ (otherwise generate_bytecode_insns drops it). However, we
7724         don't need to set it on the COMPOUND_EXPR - the caller does that.
7726 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7728         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
7729         `--CLASSPATH' becomes `--classpath.'
7730         * gjavah.c: Likewise.
7731         * jcf-dump.c: Likewise.
7732         * lang-options.h: Likewise.
7733         * lang.c: Likewise.
7734         * jcf-path.c: Updated comment.
7735         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
7736         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
7737         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
7738         (jcf_path_CLASSPATH_arg): Ditto.
7739         (classpath_u): Updated leading comment.
7741 2002-02-20  Per Bothner  <per@bothner.com>
7743         * builtins.c (check_for_builtin):  New function.
7744         (build_call_or_builtin):  Remove.
7745         * java-tree.h:  Update accordingly.
7746         * expr.c (expand_invoke):  Use build + check_for_builtin instead
7747         of build_call_or_builtin.
7748         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
7749         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
7750         flag (which had caused jcf-write to incorrectly emit invokevirtual).
7752 2002-02-17  Tom Tromey  <tromey@redhat.com>
7754         * java-tree.h (TYPE_STRICTFP): New macro.
7755         (struct lang_type) [strictfp]: New field.
7756         (CLASS_STRICTFP): New macro.
7757         (METHOD_STRICTFP): New macro.
7758         (struct lang_decl) [strictfp]: New field.
7759         * parse.y (method_header): Disallow strictfp constructor or
7760         abstract method.
7761         (STRICT_TK): Move before MODIFIER_TK.
7762         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
7763         (METHOD_MODIFIERS): Likewise.
7764         (INTERFACE_MODIFIERS): Likewise.
7765         * jcf-write.c (get_access_flags): Likewise.
7766         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
7767         (add_method_1): Likewise.
7768         (get_access_flags_from_decl): Likewise.
7769         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
7770         recognize strictfp flag.
7771         * jcf.h (ACC_STRICT): New define.
7773 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
7775         * class.c(build_utf8_ref): Move declaration of decl_size
7777 2002-02-07  Tom Tromey  <tromey@redhat.com>
7779         * gcj.texi (Input Options): --CLASSPATH does not suppress system
7780         path.
7782 2002-02-04  Anthony Green  <green@redhat.com>
7784         * class.c (build_utf8_ref): Put UTF-8 constants into merged
7785         sections if available.
7787 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7789         * parse.y (java_expand_classes): Fix typo in static field loop.
7791 2002-02-02  Richard Henderson  <rth@redhat.com>
7793         * class.c (add_field): Mark static fields external.
7794         (build_class_ref): Remove redundant set.
7795         * parse.y (java_expand_classes): Mark static fields of classes
7796         to be compiled as local.
7797         * jcf-parse.c (parse_class_file): Likewise.
7799 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7801         * gcj.texi (About CNI): New node.
7803 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7805         PR java/5080
7806         * jcf-parse.c : Check for HAVE_LOCALE_H before using
7807         setlocale() with LC_CTYPE as a parameter.
7808         * jv-scan.c: Same.
7810 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
7812         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7813         Follow GNU Coding Standards for --version.
7815 2002-01-28  Tom Tromey  <tromey@redhat.com>
7817         * expr.c (build_jni_stub): Ensure storage for `meth' is
7818         generated.
7819         * parse.y (java_complete_expand_methods): Set
7820         current_function_decl before building JNI stub.
7822 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
7824         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
7825         BUILT_IN_SQRTF.
7827 2002-01-22  Tom Tromey  <tromey@redhat.com>
7829         * decl.c (java_init_decl_processing): Use add_predefined_file.
7830         Predefine RawData.java.
7831         (predef_filenames): Removed.
7832         (java_init_decl_processing): Don't register predef_filenames.
7833         * jcf-parse.c (add_predefined_file): New function.
7834         (predefined_filename_p): Rewrote.
7835         (predefined_filename_p): No longer static.
7836         * decl.c (java_init_decl_processing): Call initialize_builtins.
7837         * Make-lang.in (JAVA_OBJS): Added builtins.o.
7838         (java/builtins.o): New target.
7839         * builtins.c: New file.
7840         * parse.y (patch_invoke): Use build_call_or_builtin.
7841         * java-tree.h (build_call_or_builtin): Declare.
7842         (initialize_builtins): Declare.
7843         (java_set_exception_lang_code): Removed unused declaration.
7844         (PREDEF_FILENAMES_SIZE): Removed.
7845         (java_tree_index): Added JTI_PREDEF_FILENAMES.
7846         (predef_filenames): New define.
7847         (add_predefined_file): Declare.
7848         (predefined_filename_p): Declare.
7849         * expr.c (expand_invoke): Use build_call_or_builtin.
7851 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7853         * parse.y (patch_switch_statement): Fix format specifier.
7855 2002-01-16  Tom Tromey  <tromey@redhat.com>
7857         More for PR java/5365:
7858         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
7859         default.
7860         (process_file): Generate include for
7861         java.lang.UnsupportedOperationExceptions.
7863 2002-01-15  Andreas Jaeger  <aj@suse.de>
7865         * .cvsignore: Add man pages.
7867 2002-01-15  Tom Tromey  <tromey@redhat.com>
7869         Fix for PR java/5365:
7870         * gjavah.c (process_file): Turn class name into a file name.
7872 2002-01-14  Matthias Klose  <doko@debian.org>
7874         * gcj.texi: Fix whitespace and formatting errors in the
7875         synopsis of the man pages. Update copyright.
7877 2002-01-14  Tom Tromey  <tromey@redhat.com>
7879         For PR libgcj/5303:
7880         * Make-lang.in (java.install-man): Handle jv-convert man page.
7881         (java.generated-manpages): Added jv-convert.1.
7882         (java.uninstall): Remove jv-convert.1.
7883         (java.maintainer-clean): Likewise.
7884         ($(srcdir)/java/jv-convert.1): New target.
7885         * gcj.texi (Top): Link to jv-convert node.
7886         (Individual utilities): Likewise.
7887         (Invoking jv-convert): New node.
7889 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
7890             Martin Kahlert  <martin.kahlert@infineon.com>
7892         * jcf-parse.c (get_constant): Don't swap lo/hi for big
7893         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
7895 2002-01-03  Graham Stott  <grahams@redhat.com>
7897         * class.c (compile_resource_file): Update copyright date.
7898         Constify filename parameter.
7899         (java-tree.h): Update copyright date.
7900         (compile_resource_file): Constify filename parameter.
7902 2002-01-03  Graham Stott  <grahams@redhat.com>
7904         * gcc/jcf-parse.c: Update copyright date.
7905         (yyparse): Constify resource_filename.
7907 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7909         * parse.y (src_parse_roots): Don't needlessly zero init.
7911 2001-12-31  Tom Tromey  <tromey@redhat.com>
7913         * parse.y (dump_java_tree): New function.
7914         (source_end_java_method): Call it.
7915         (end_class_declaration): Likewise.
7916         * lang.c (java_decode_option): Call dump_switch_p.
7918 2001-12-28  Tom Tromey  <tromey@redhat.com>
7920         * gen-table.pl: Don't process characters after \uffff.  Added
7921         comment pointing to input file.
7923 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7925         * gen-table.pl: Const-ify output.  Document the location of a
7926         suitable unicode input file.
7928         * chartables.h: Regenerate.
7930 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7932         * chartables.h: Const-ify.
7933         * gjavah.c (options): Likewise.
7934         * jcf-dump.c (options): Likewise.
7935         * jv-scan.c (options): Likewise.
7936         * lex.c (java_start_char_p, java_part_char_p): Likewise.
7937         * parse.y (binop_lookup): Likewise.
7939 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7941         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
7942         the static arrays that are output.
7943         * jvspec.c (jvgenmain_spec): Make static.
7944         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
7945         * keyword.h: Regenerate.
7946         * lang.c (string_option, process_option_with_no, lang_f_options,
7947         lang_W_options): Const-ify.
7948         * lex.c (java_lex): Likewise.
7950 2001-12-21  Richard Henderson  <rth@redhat.com>
7952         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
7953         (get_boehm_type_descriptor): ... here.  Arrange for the
7954         TREE_TYPE to get set properly.
7956 2001-12-21  Richard Henderson  <rth@redhat.com>
7958         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
7959         only if the target requires collect2.
7961         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
7963 2001-12-20  Tom Tromey  <tromey@redhat.com>
7965         For PR java/4509:
7966         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
7967         CAN_COMPLETE_NORMALLY for the node.
7968         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
7969         generate code for second branch if first branch can't complete
7970         normally.
7971         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
7972         the loop head if the loop body can't complete normally.
7974 2001-12-20  Tom Tromey  <tromey@redhat.com>
7976         For PR java/4766:
7977         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
7978         case where `finally' clause can't complete normally.
7980 2001-12-20  Tom Tromey  <tromey@redhat.com>
7982         Fixes PR java/5057:
7983         * parse.y (analyze_clinit_body): Added this_class parameter.
7984         Check for more cases where we must keep <clinit>.
7985         (maybe_yank_clinit): Cleaned up flow control.
7987 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7989         * decl.c (java_init_decl_processing): Don't initialize
7990         finit_leg_identifier_node.
7991         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
7992         (finit_leg_identifier_node): Remove.
7993         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
7995 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7997         * mangle.c (mangle_member_name): Don't special-case for
7998         NO_DOLLAR_IN_LABEL.
7999         * mangle_name.c (unicode_mangling_length): Likewise.
8000         (append_unicode_mangled_name): Likewise.
8001         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8002         code.
8004 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8006         * expr.c (build_java_array_length_access): Don't force null pointer
8007         check unless flag_check_references is set.
8009 2001-12-20  Tom Tromey  <tromey@redhat.com>
8011         Fix for PR java/3417:
8012         * parse.y (patch_assignment): Added special processing for
8013         `return'.
8014         (patch_return): Don't convert booleans to integers, and don't
8015         special-case `null'.
8017 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8019         * config-lang.in (diff_excludes): Remove.
8021 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8023         * gcj.texi: Update link to GCC manual.
8025 2001-12-17  Tom Tromey  <tromey@redhat.com>
8027         * parse.y (link_nested_class_to_enclosing): Removed useless
8028         statement.
8030 2001-12-16  Tom Tromey  <tromey@redhat.com>
8032         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8033         Fixes PR java/5088.
8035 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8037         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8038         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8039         spelling errors.
8041 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8043         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8045 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8047         * decl.c (java_init_decl_processing): Build otable_type correctly.
8048         otable_decl is an otable_type.
8050 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8052         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8053         otable_type, otable_ptr_type, method_symbol_type,
8054         method_symbols_array_type, method_symbols_array_ptr_type): New
8055         field/global tree definitions.
8056         (flag_indirect_dispatch): New flag.
8057         * decl.c (java_init_decl_processing): Initialize new otable and
8058         otable_syms type nodes and decls. Add new field "index" to
8059         method_type_node.
8060         * class.c (build_method_symbols_entry): New function.
8061         (make_method_value): Set "index" to to method's vtable index for
8062         virtual methods when indirect-dispatch is not used.
8063         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8064         and set vtable_method_count to -1. Set otable and otable_syms field
8065         if indirect-dispatch is used and there was something to put in them.
8066         (build_method_symbols_entry): New function.
8067         (emit_offset_symbol_table): New function.
8068         * expr.c (get_offset_table_index): New function.
8069         (build_invokevirtual): Build array reference to otable at the index
8070         returned by get_offset_table_index, and use the result as the vtable
8071         offset.
8072         (build_invokeinterface): Similar.
8073         * jcf-parse.c (yyparse): If indirect-dispatch, call
8074         emit_offset_symbol_table at the end of compilation, after all classes
8075         have been generated.
8076         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8077         * lang.c (flag_indirect_dispatch): Define.
8078         (lang_f_options): Add indirect-dispatch flag.
8080 2001-12-14  Matthias Klose  <doko@debian.org>
8082         * gcj.texi: Markup for man page generation. Document missing
8083         options printed by <tool> --help.
8084         Terminate description of gij's -ms option with a dot.
8085         * Make-lang.in ($(srcdir)/java/*.1): New targets.
8086         (java.generated-manpages java.install-man, java.uninstall,
8087         java-maintainer-clean) Updated.
8089 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
8091         * class.c (get_dispatch_table): Fix java vtable layout
8092         for TARGET_VTABLE_USES_DESCRIPTORS.
8093         * decl.c (java_init_decl_processing): Initialize
8094         alloc_no_finalizer_node, finalize_identifier_node.
8095         * expr.c (class_has_finalize_method): New function.
8096         (expand_java_NEW): Generate calls for finalizer-free allocation.
8097         (build_invokevirtual): Fix java vtable layout for
8098         TARGET_VTABLE_USES_DESCRIPTORS.
8099         * java-tree.h (enum java_tree_index): New entries:
8100         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8101         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8102         (class_has_finalize_method): declare.
8103         (HAS_FINALIZER_P): New macro.
8104         * parse.y (patch_invoke): Generate calls for finalizer-free
8105         allocation.
8107 2001-12-12  Matthias Klose  <doko@debian.org>
8109         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8110         whitespace at end of line.
8112 2001-12-11  Tom Tromey  <tromey@redhat.com>
8114         * lex.c (java_init_lex): Define wfl_to_string as
8115         gnu.gcj.runtime.StringBuffer unless generating bytecode.
8117 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
8119         * class.c (make_method_value): Use null_pointer_node to
8120         represent empty exception table.
8122 2001-12-10  Tom Tromey  <tromey@redhat.com>
8124         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8126 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
8128         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8130 2001-12-09  Per Bothner  <per@bothner.com>
8132         * check-init.c (current_switch_has_default):  New static field.
8133         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
8134         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
8135         DEFAULT_EXPR seen, simulate a default alternative that copies state.
8137 2001-12-09  Tom Tromey  <tromey@redhat.com>
8139         * check-init.c (check_init): Don't allow pre- or post- increment
8140         or decrement of final variable.
8141         (final_assign_error): Minor error message rewording.
8143 2001-12-08  Tom Tromey  <tromey@redhat.com>
8145         * java-tree.h: Fixed typo.
8147         * gjavah.c (decompile_method): Don't decompile to `return this'
8148         for static methods.
8150         * gjavah.c (cxx_keywords): Re-sorted.
8151         * lex.c (cxx_keywords): Re-sorted.
8153         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8154         else.
8156         * gjavah.c (print_namelet): Clear subnamelets.
8157         (HANDLE_METHOD): Set `method_printed' earlier.
8159 2001-12-07  Tom Tromey  <tromey@redhat.com>
8161         * lang.c (lang_f_options): Added
8162         optimize-static-class-initialization.
8163         (java_decode_option): Removed special case.
8165 2001-12-07  Per Bothner  <per@bothner.com>
8167         * check-init.c (check_init):  Fix typo freeing memory twice.
8169 2001-12-05  Per Bothner  <per@bothner.com>
8171         Restore support for static class initialization optimization.
8172         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8173         * check-init.c (check_int):  At end of BLOCK handle initialization
8174         blocks, which used to be done in java_complete_expand_method but did
8175         not handle the case where check_for_initialization might allocate
8176         more than a word of bits.
8177         * decl.c (lang_make_tree):  The smic field is now a tree.
8178         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
8179         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
8181         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
8183         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8184         Change from a hash table to a list.
8185         (struct_lang_decl):  Change field 'smic' to match.
8186         * class.c (add_method_1):  Initialize
8187         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8188         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
8189         (java_expand_method_bodies): -here, since 'smic' is now a list.
8190         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
8192         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
8194         * class.c (java_hash_compare_tree_node):  Fix casts.
8196 2001-12-04  Per Bothner  <per@bothner.com>
8198         * check-init.c:   Handle definite unassignment to finals in addition
8199         to definite assignment.
8200         (loop_current_locals):  New field.
8201         (num_current_locals, int start_current_locals, num_current_words):
8202         Make static.
8203         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
8204         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8205         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
8206         (get_variable_decl, check_final_reassigned):  New functions.
8207         (check_init, check_bool_init):  Modify as needed for checking finals.
8208         (check_for_initialization):  Take extra parameter and return void.
8209         Do extra start-up logic to check final fields for assignment.
8210         * parse.y (check_static_final_variable_assignment_flag,
8211         reset_static_final_variable_assignment_flag, check_final_assignment,
8212         check_final_variable_local_assignment_flag,
8213         reset_final_variable_indirect_assignment_flag,
8214         reset_final_variable_global_assignment_flag):  Remove functions.
8215         (java_complete_expand_methods, outer_field_access_fix,
8216         patch_assignment): Remove no-longer used logic.
8217         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8218         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8220         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8221         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8222         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8224         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8226         * java-tree.h (DECL FINAL):  New bit-field.
8227         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8228         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8229         (DECL_INIT_CALLS_THIS):  New macro.
8230         (struct lang_decl):  New bit-field init_calls_this.
8231         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8232         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8233         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8234         use it for both local variables and final fields.
8235         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8236         and local_final.
8237         (struct lang_type):  Remove hfv bit-field.
8238         (check_for_initialization):  Change to return void.
8240         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8241         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8242         * check-init.c (final_assign_error):  New helper function.
8243         (check_final_reassigned, check_init):  Use it.
8244         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8246         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8247         bit-fields to unsigned.
8249 2001-12-03  Per Bothner  <per@bothner.com>
8251         * parse.y (patch_binop):  Minor constant folding.
8253         * parse.y (build_current_thisn):  Shorter 'buffer'.
8255 2001-12-03  Per Bothner  <per@bothner.com>
8257         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8258         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8259         * jcf-write.c (generate_bytecode_insns):  Remove support for
8260         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8261         * check-init.c (check_init):  Likewise.
8263 2001-12-03  Per Bothner  <per@bothner.com>
8265         * verify.c (subroutine_nesting):  New function.
8266         (verify_jvm_instructions):  Use it to fix logic for checking that
8267         we're done with the current subroutine.
8269         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8270         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8272 2001-12-03  Per Bothner  <per@bothner.com>
8274         * jcf.h:  Fix obvious typo in comment.
8275         * typeck.c (build_null_signature):  Add comment.
8277 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8279         * expr.c: Remove leading capital from diagnostic messages, as
8280         per GNU coding standards.
8281         * jcf-io.c: Similarly.
8282         * jcf-parse.c: Similarly.
8283         * jv-scan.c: Similarly.
8284         * jvspec.c: Similarly.
8285         * mangle.c: Similarly.
8287 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8288             Alexandre Petit-Bianco  <apbianco@redhat.com>
8290         * expr.c (build_java_arrayaccess): Call save_expr on array for
8291         correct evaluation order, modified comment, fixed indentation.
8292         * parse.y: (patch_assignment): Correctly extract the array base
8293         from the tree generate by build_java_arrayaccess, added comments.
8294         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8295         Fixes PR java/3096, PR java/3803, PR java/3965.
8297 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8299         * expr.c (expand_byte_code): Remove trailing periods from messages.
8300         * jcf-parse.c (load_class, jcf_parse): Similarly.
8301         * jcf-write.c (generate_classfile): Similarly.
8302         * lex.c (java_lex): Similarly.
8304 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8306         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8308 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8310         * Make-lang.in (java.generated-manpages): New dummy target.
8312 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8314         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8315         ASM_FINAL_SPEC.
8316         (lang_specific_pre_link): Use set_input to set input_filename.
8317         Append `main' here.
8318         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8319         (main): Fix definition.
8320         Strip `main' from classname.
8321         Fixes PR java/227.
8323 2001-11-18  Roger Sayle <roger@eyesopen.com>
8325         * parse.h (java_expand_switch): Remove old prototype.
8327 2001-11-18  Tom Tromey  <tromey@redhat.com>
8329         Fix for PR java/1401:
8330         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8331         arg0 is null.
8332         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8333         correctly.
8335 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8337         * lang.c (finish_parse): Rename to java_finish.
8338         (LANG_HOOKS_FINISH, java_finish): New.
8340 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8342         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8343         * java-tree.h: New prototype.
8344         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8346 2001-11-13  Tom Tromey  <tromey@redhat.com>
8348         * gjavah.c (method_signature): New global.
8349         (HANDLE_METHOD): Set it.
8350         (decompile_return_statement): New function.
8351         (decompile_method): Use it.
8352         (print_method_info): Removed `synth' argument.
8354 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8356         * java-tree.h (java_set_yydebug): New.
8357         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8358         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8359         (print_lang_decl, print_lang_type, print_lang_identifier,
8360         print_lang_statistics, lang_print_xnode): Remove.
8362 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8364         * jcf-parse.c (init_lex): Remove.
8365         * lang.c (language_string, lang_identify): Remove.
8366         (struct lang_hooks): Constify.
8367         (LANG_HOOKS_NAME): Override.
8368         (init_parse): Update.
8370 2001-11-08  Andreas Franck  <afranck@gmx.de>
8372         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8373         program_transform_name the way suggested by autoconf.
8374         (java.install-common): Also transform auxiliary program names with
8375         program_transform_name.
8377 2001-11-08  Tom Tromey  <tromey@cygnus.com>
8379         * parse.y (trap_overflow_corner_case): New rule.
8380         (unary_expression): Use it.
8381         * lex.c (java_init_lex): Don't set minus_seen.
8382         (yylex): Don't use minus_seen.  Communicate overflow to parser for
8383         it to handle.
8384         (error_if_numeric_overflow): New function.
8385         * parse.h (minus_seen): Removed field.
8386         (JAVA_RADIX10_FLAG): New define.
8388 2001-11-07  Tom Tromey  <tromey@redhat.com>
8390         Patch for PR java/1414:
8391         * parse.y (case_label_list): New global.
8392         (goal): Register case_label_list with GC.
8393         (java_complete_lhs): Save new case on case_label_list.
8394         (patch_switch_statement): Check for duplicate case labels.
8396 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8398         * parse.y (patch_assignment): Removed unused third argument.
8399         (java_complete_lhs): Removed unused third argument to patch_assignment.
8401 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8403         * lang.c: Include langhooks-def.h.
8404         * Make-lang.in: Update.
8406 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8408         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8410 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8412         * mangle.c (find_compression_record_match): Don't match compression
8413         records for package name elements unless they occur at the start of
8414         the name. Fix for PR java/4717.
8416 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8418         * expr.c (expand_java_field_op): Don't special-case references to
8419         java.lang.PRIMTYPE.TYPE.
8420         (build_primtype_type_ref): Removed.
8421         * java-tree.h (build_primtype_type_ref): Remove prototype.
8422         * parse.y (maybe_build_primttype_type_ref): Removed.
8423         (complete_function_arguments): Don't special-case references to
8424         java.lang.PRIMTYPE.TYPE.
8425         (patch_assignment): Likewise.
8426         (array_constructor_check_entry): Likewise.
8428 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8430         * mangle.c (static tree compression_table): Fixed leading comment.
8431         * parse.h (struct parser_ctxt): Fixed field comment.
8432         * parse.y (check_pkg_class_access): New prototype, fixed leading
8433         comment, new parameter used to emit error only if passed as true.
8434         (parse_check_super): Pass extra argument to check_pkg_class_access.
8435         (do_resolve_class): Likewise.
8436         (process_imports): Likewise.
8437         (read_import_dir): Fixed indentation.
8438         (find_in_imports_on_demand): New local class_type_name. Local
8439         node_to_use deleted. while loop changed into for loop. Report
8440         multiple definition only for accessible classes. Improved error
8441         message.
8442         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8443         assigned to parameter list, fixed indentation. while loop changed
8444         into for loop, restore TREE_CHAIN on local `tem' before the next
8445         iteration.
8447 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8449         * lang.c (lang_get_alias_set): Deleted.
8451 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8453         * gjavah.c (jni_print_char): Fix thinko in last change.
8455         * gjavah.c (jni_print_char, decode_signature_piece): Use
8456         safe-ctype macros and/or fold extra calls into fewer ones.
8457         * lex.c (java_read_unicode, java_lex): Likewise.
8458         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8459         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8460         * mangle_name.c (append_unicode_mangled_name,
8461         unicode_mangling_length): Likewise.
8463 2001-10-17  Richard Henderson  <rth@redhat.com>
8465         * Make-lang.in (java/lang.o): Depend on langhooks.h.
8467 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8469         * lang.c (langhooks.h): Included.
8470         (LANG_HOOKS_INIT): Redefined.
8471         (LANG_HOOKS_INIT_OPTIONS): Likewise.
8472         (LANG_HOOKS_DECODE_OPTION): Likewise.
8473         (struct lang_hooks lang_hooks): New initialization.
8475 2001-10-11  Per Bothner  <per@bothner.com>
8477         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
8478         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8479         The former is simpler, and jcf-write.c handles it better.
8480         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
8481         or WITH_CLEANUP_EXPR.
8482         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
8483         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8485         * parse.y (patch_if_else_statement):  If the condition is constant,
8486         optimize away the test.
8488 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8490         * parse.y (patch_cast): Call patch_string on the first operand of
8491         the incoming node, update it if necessary. Fixes PR java/4510.
8493 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8495         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8496         when name qualifier matches a package name.
8498 2001-10-08  Tom Tromey  <tromey@redhat.com>
8500         Fix for PR java/4489:
8501         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8502         force a new label when computing `body_block'.
8504 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8506         * jcf-io.c (format_uint): Const-ify.
8507         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8508         * lex.c (java_get_line_col): Likewise.
8509         * parse.y (build_incdec): Likewise.
8511 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8513         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8514         a NULL enclosing context if appropriate. Fixes PR java/4466.
8516 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8518         * parse.y (patch_assignment): Use lvalue's original TYPE when
8519         building the final COMPOUND_EXPR.
8520         (try_reference_assignconv): Fixed leading comment.
8522 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8524         * parse.y (check_final_variable_indirect_assignment): For
8525         COMPOUND_EXPR, return only if finals were found initialized
8526         properly, if not, keep on checking.
8527         (check_final_variable_global_assignment_flag): New local
8528         error_found, set when appropriate and used to decide whether to
8529         report uninitialized finals. Fixed typo in comment.
8531 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8533         * decl.c (init_decl_processing): Fixed typo in predef_filenames
8534         last three initializations. Fixes PR java/4360.
8536 2001-09-21  Richard Henderson  <rth@redhat.com>
8538         * class.c (get_dispatch_table): Handle function descriptors.
8539         (build_dtable_decl): Likewise.
8540         * expr.c (build_invokevirtual): Likewise.
8542 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8544         * parse.y (patch_method_invocation): Build class initialization
8545         when static finals are used to qualify method invocation.
8546         Fixes PR java/4366.
8548 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
8550         * parse.h: (WFL_STRIP_BRACKET): Re-written using
8551         build_type_name_from_array_name.
8552         (STRING_STRIP_BRACKETS): New macro.
8553         * parse.y (build_type_name_from_array_name): New function.
8554         (array_creation_expression:): Accumulate []s instead of [s.
8555         (cast_expression:): Accumulate []s instead of [s after cast type
8556         name.
8557         (build_array_from_name): Local string deleted, use
8558         build_type_name_from_array_name.
8559         (build_unresolved_array_type): Accumulate []s instead of [s after
8560         type name.
8561         (register_fields): Fixed comment.
8562         (resolve_class): Local name, base deleted, new locals tname and
8563         array_dims. Use build_type_name_from_array_name. Use array_dims to
8564         build array type.
8565         (purify_type_name): Use STRING_STRIP_BRACKETS.
8567 2001-09-18  Andreas Jaeger  <aj@suse.de>
8569         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8570         * jv-scan.c: Likewise.
8572 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8574         * parse.y (patch_method_invocation): Inner class creation context
8575         check not enforced within constructors. Fixes PR java/1873.
8577 2001-09-16  Tom Tromey  <tromey@redhat.com>
8579         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8580         NOTE_PUSH for single-case push.  Fixes PR java/4189.
8582 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8584         * java-tree.h (TYPE_IMPORT_LIST): New macro.
8585         (TYPE_IMPORT_DEMAND_LIST): Likewise.
8586         (struct lang_type): New fields import_list and import_demand_list.
8587         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
8588         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
8589         (do_resolve_class): New local saved_enclosing_type, initialized,
8590         passed as parameter to find_in_imports and find_in_imports_on_demand.
8591         (find_in_imports): Added paramater enclosing_type, use its
8592         TYPE_IMPORT_LIST when applicable.
8593         (find_in_imports_on_demand): Added parameter enclosing_type, use
8594         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
8595         declaration and initialization.
8596         (fold_constant_for_init): Switch/restore current_class to the
8597         appropriate context.
8599 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
8601         * verify.c (verify_jvm_instructions): Fix typo.
8603 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8605         * expr.c (expand_invoke): Const-ification.
8606         * parse.y (patch_method_invocation): Likewise.
8608 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8610         * gjavah.c (cxx_keywords): Const-ification.
8611         * keyword.gperf (java_keyword): Likewise.
8612         * lang.c (java_tree_code_name): Likewise.
8613         * lex.c (cxx_keywords): Likewise.
8614         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
8616 2001-09-11  Richard Henderson  <rth@redhat.com>
8618         * parse.h (ctxp_for_generation): Mark extern.
8620 2001-09-10  Richard Henderson  <rth@redhat.com>
8622         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8624 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8626         * typeck.c (java_array_type_length, build_prim_array_type):
8627         Represent empty arrays by NULL index.
8629 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
8631         * java-tree.h (compile_resource_file): Grouped with other prototypes.
8632         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8634 2001-09-06  Anthony Green  <green@redhat.com>
8636         * class.c (O_BINARY): Define if necessary.
8637         (registerResource_libfunc): Declare.
8638         (init_class_processing): Initilize registerResource_libfunc.
8639         (compile_resource_file): New function.
8640         * java-tree.h (resource_name): Declare.
8641         (compile_resource_file): Declare.
8642         * jcf-parse.c (yyparse): Handle compiling java resource files.
8643         * lang.c (java_decode_option): Handle -fcompile-resource option.
8644         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
8645         resource files.
8646         * gcj.texi (Code Generation): Add documentation for -R flag.
8648 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
8650         * jcf-write.c (generate_classfile): Issue an error in case of
8651         field/initial value mismatch.
8652         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
8653         being initialized and we're generating bytecode.
8654         (java_complete_lhs): In MODIFY_EXPR section: added comments,
8655         set DECL_INITIAL properly when appropriate.
8656         Fixes PR java/4230
8657         Fixes PR java/4204
8659 2001-09-01  Per Bothner  <per@bothner.com>
8661         * parse.y (maybe_yank_clinit):  A field without an initializer is not
8662         relevant.  All initializers except static final and constant require
8663         <clinit>, regardless of flag_emit_class_files.
8665 2001-08-31  Per Bothner  <per@bothner.com>
8667         * class.c (set_constant_value):  When not emitting class files, then a
8668         String ConstantValue is a utf8const_ptr_type.
8670 2001-08-30  Per Bothner  <per@bothner.com>
8672         * jcf-write.c (generate_classfile):  Check that field is primitive
8673         or string before emitting ConstantValue attribute.
8675 2001-08-30  Per Bothner  <per@bothner.com>
8677         * parse.y (resolve_qualified_expression_name):  If creating a
8678         COMPOUND_EXPR, set it's type correctly.
8680 2001-08-30  Per Bothner  <per@bothner.com>
8682         * jcf-io.c (open_class):  Set filename field.
8684         * jcf-parse,c (parse_class_file):  Set current_function_decl
8685         for better error message when Code attribute is missing.
8687         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
8688         better diagnostics, especially for constructors.
8690 2001-08-30  Per Bothner  <per@bothner.com>
8692         * jcf-write.c (generate_classfile):  Don't write ConstantValue
8693         attribute if field is not final, for compatibility with jdk.
8695         * jcf-write.c (generate_classfile):  Convert ConstantValue values
8696         to correct type.  Work-around for front-end bug.
8697         * class.c (set_constant_value):  Error if constant has wrong type.
8699 2001-08-30  Per Bothner  <per@bothner.com>
8701         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
8702         "Double" are printed at verbosity 1.
8704         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
8706         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
8708 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
8710         * parse.y (patch_assignment): Don't verify final re-assignment here.
8711         (java_complete_lhs): Verify assignments to finals calling
8712         patch_assignment. Verify re-assignments to finals before calling
8713         patch_assignment.
8715 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
8717         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
8718         Fixes PR java/1413
8720 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8722         * lex.c (java_lex): new local found_hex_digits. Set and then used
8723         in test to reject invalid hexadecimal numbers.
8724         * parse.y (java_complete_tree): Prevent unwanted cast with
8725         initialized floating point finals.
8726         (patch_binop): Emit a warning when detecting a division by zero,
8727         mark result not constant, don't simplify non integer division.
8729 2001-08-28  Per Bothner  <per@bothner.com>
8731         * jcf-write.c  (generate_bytecode_insns):  For increments and
8732         decrements just recurse to push constant.  Improvement on Mark's patch.
8734 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
8736         * jcf-write.c (generate_bytecode_insns): Generate an integer to
8737         real conversion for increments and decrements of reals.
8739 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8741         * parse.y (resolve_qualified_expression_name): Handle unresolved
8742         qualified expressions, prevent numerical qualifiers, fixed typo.
8743         Fixes PR java/4141
8745 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8747         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
8748         don't report anything but deprecated class when marked so. Handle
8749         VAR_DECL.
8750         (patch_method_invocation): Check deprecation on methods and types.
8751         (patch_binop): code becomes an enum tree_code, added default: to
8752         switch to handle that. Detect division by zero, try to fold and
8753         return before using a subroutine.
8755 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
8757         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
8758         file smaller than 4 bytes.
8759         * parse.y (check_inner_circular_reference): New function.
8760         (check_circular_reference): Likewise.
8761         (array_initializer:): Accept {,}.
8762         (java_check_circular_reference): Rewritten using
8763         check_circular_reference and check_inner_circular_reference.
8764         (java_complete_expand_method): Unconditionally save and restore
8765         the unpurged exception list.
8766         (build_dot_class_method_invocation): Unmangle signature parameter.
8768 2001-08-21  Tom Tromey  <tromey@redhat.com>
8770         * decl.c (init_decl_processing): Add `throws' field to method
8771         descriptor.
8772         * class.c (make_method_value): Compute `throws' field for method.
8774 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8776         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
8777         circularity is detected.
8778         (ctors_unchecked_throws_clause_p): Fixed leading comment.
8780 2001-08-17  Richard Henderson  <rth@redhat.com>
8782         * class.c (emit_register_classes): Add align parameter to
8783         call to assemble_integer.
8785 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
8787         * jcf-parse.c (load_class): New locals saved and class_loaded. If
8788         loading a class_or_name fails, try considering an innerclass name
8789         and load the enclosing context.
8790         * parse.y (resolve_inner_class): New function.
8791         (find_as_inner_class): Added leading comment.
8792         (register_incomplete_type): Keep the current context as enclosing
8793         context for JDEP_FIELD dependencies.
8794         (do_resolve_class): Locals new_class_decl and super initialized to
8795         NULL. Call resolve_inner_class, explore the enclosing context
8796         superclass if necessary.
8797         Fixes PR java/4007
8799 2001-08-16  Tom Tromey  <tromey@redhat.com>
8801         * jcf-dump.c (main): Updated for change to jcf_path_seal.
8802         * gjavah.c (main): Updated for change to jcf_path_seal.
8803         * lang.c (version_flag): New global.
8804         (java_decode_option): Recognize `-version'.
8805         (java_init): Update for change to jcf_path_seal.
8806         * jcf.h (jcf_path_seal): Added `print' argument.
8807         * jcf-path.c (jcf_path_seal): Added `print' argument.
8809 2001-08-13  Zack Weinberg  <zackw@panix.com>
8811         * Make-lang.in (java/decl.o): Update dependencies.
8812         * decl.c: Include libfuncs.h, don't include toplev.h.
8814 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8816         * decl.c (init_decl_processing): exception_type_node,
8817         class_not_found_type_node, and no_class_def_found_type_node
8818         initialized. predef_filenames augmented accordingly.
8819         instinit_identifier_node initialized.
8820         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
8821         * java-tree.h (enum java_tree_index): New entries
8822         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
8823         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
8824         (exception_type_node): New macro.
8825         (class_not_found_type_node): Likewise.
8826         (no_class_def_found_type_node): Likewise.
8827         (instinit_identifier_node): Likewise.
8828         (PREDEF_FILENAMES_SIZE): Adjusted.
8829         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
8830         (struct lang_type): Fixed typo in bitfield name.
8831         (DECL_INSTINIT_P): New macro.
8832         (ID_INSTINIT_P): Likewise.
8833         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
8834         attribute.
8835         * parse.y (encapsulate_with_try_catch): New function.
8836         (generate_instinit): Likewise.
8837         (build_instinit_invocation): Likewise.
8838         (ctors_unchecked_throws_clause_p): Likewise.
8839         (add_instance_initializer): Deleted.
8840         (build_instance_initializer): Likewise.
8841         (in_instance_initializer): Likewise.
8842         (check_method_redefinition): instinit$ not to be verified.
8843         (java_complete_expand_methods): Generate instinit$, simplified code.
8844         (build_dot_class_method): Eliminated unnecessary locals. Use
8845         encapsulate_with_try_catch, removed unnecessary code.
8846         (fix_constructors): New local iii. Use build_instinit_invocation.
8847         (patch_method_invocation): Added comment.
8848         (maybe_use_access_method): Don't consider instinit$.
8849         (find_applicable_accessible_methods_list): Shorten the search for
8850         instinit$ too.
8851         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
8852         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
8853         (patch_throw_statement): Likewise. Fixed typo.
8855 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
8857         Revert:
8858         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8859         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8860         ASM_FINAL_SPEC.
8861         (lang_specific_pre_link): Use set_input to set input_filename.
8862         Append `main' here.
8863         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8864         (main): Fix definition.
8865         Strip `main' from classname.
8866         Fixes PR java/227.
8868 2001-08-11  Zack Weinberg  <zackw@panix.com>
8870         * lex.h: Don't include setjmp.h.  Don't define
8871         SET_FLOAT_HANDLER or prototype set_float_handler.
8873 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8875         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
8876         `poplevel' in the right order.
8878 2001-08-09  Richard Henderson  <rth@redhat.com>
8880         * Make-lang.in (class.o): Depend on TARGET_H.
8881         * class.c (emit_register_classes): Use target hooks instead of
8882         assemble_constructor and assemble_destructor.
8884 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
8886         * check-init.c (flags.h): Include
8887         (check_init): Don't report uninitialized static class
8888         initialization flags, don't free bit index when doing static class
8889         initialization optimization.
8890         (check_for_initialization): Return type changed to `unsigned int.'
8891         (attach_initialized_static_class): New function.
8892         * class.c (add_method_1): Create the initialized static class
8893         table if necessary.
8894         (finish_class): Always emit deferred inline methods.
8895         * decl.c (emit_init_test_initialization): Moved to expr.c
8896         (complete_start_java_method): Don't traverse
8897         DECL_FUNCTION_INIT_TEST_TABLE.
8898         (lang_mark_tree): Mark hash tables in function decls.
8899         * expr.c (emit_init_test_initialization): Moved from decl.c.
8900         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
8901         initialization flag, set DECL_CONTEXT and
8902         LOCAL_CLASS_INITIALIZATION_FLAG.
8903         (java_lang_expand_expr): Emit initialization code for static class
8904         initialized flags when entering block, if necessary.
8905         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
8906         * java-tree.h (flag_optimize_sci): New global variable declaration.
8907         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
8908         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
8909         (LOCAL_FINAL_P): Fixed typo in comment.
8910         (FINAL_VARIABLE_P): Likewise.
8911         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
8912         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
8913         (struct lang_decl): New fields `ict', `smic' and `cif.'
8914         (check_for_initialization): New returned value for global.
8915         (attach_initialized_static_class): New global function.
8916         (STATIC_CLASS_INIT_OPT_P): New macro.
8917         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
8918         * lang.c (java_decode_option): Handle
8919         `-fno-optimize-static-class-initialization'
8920         * parse.y (start_complete_expand_method): New function.
8921         (java_expand_method_bodies): Likewise.
8922         (attach_init_test_initialization_flags): Likewise.
8923         (adjust_init_test_initialization): Likewise.
8924         (emit_test_initialization): Likewise.
8925         (java_complete_expand_methods): Nullify abstract and native method
8926         bodies.
8927         (java_complete_expand_method): New locals `fbody', `block_body'
8928         and `exception_copy.' Reorganized: directly return on empty method
8929         bodies, call `start_complete_expand_method', remember definitely
8930         initialized static class in function, don't expand method bodies.
8931         (java_expand_classes): Call `java_expand_method_bodies' before
8932         `finish_class' when compiling to native.
8933         (resolve_expression_name): Use `orig' after building outer class
8934         field access.
8935         (patch_invoke): Remember static method invocations.
8937 2001-08-06  Richard Henderson  <rth@redhat.com>
8939         * class.c (emit_register_classes): Pass a symbol_ref and priority
8940         to assemble_constructor.
8942 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
8944         * java-tree.h (all_class_filename): New macro.
8945         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
8946         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
8947         newly created IDENTIFIER_NODE to `all_class_filename.'
8949 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
8951         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
8952         Use ggc_add_tree_root to register roots.
8954 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8956         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
8957         second operand calling check_init.
8958         * decl.c (complete_start_java_method): Swaped second and third
8959         arguments while creating WITH_CLEANUP_EXPR node.
8960         * jcf-write.c (generate_bytecode_insns): Use second operand
8961         instead of third when handling WITH_CLEANUP_EXPR.
8962         * parse.y (java_complete_lhs): Expand second operand of
8963         WITH_CLEANUP_EXPR nodes.
8964         (patch_synchronized_statement): Swaped second and third arguments
8965         while creating WITH_CLEANUP_EXPR node.
8967 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8969         * parse.y (create_interface): Avoid cyclic inheritance report when
8970         syntax error encountered during class definition.
8971         Fixes PR java/2956
8973 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8975         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8976         ASM_FINAL_SPEC.
8977         (lang_specific_pre_link): Use set_input to set input_filename.
8978         Append `main' here.
8979         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8980         (main): Fix definition.
8981         Strip `main' from classname.
8982         Fixes PR java/227.
8984 2001-07-18  Tom Tromey  <tromey@redhat.com>
8986         For PR java/2812:
8987         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
8988         * lex.c (java_new_lexer): Use ICONV_CONST.
8989         (java_read_char): Likewise.
8990         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
8991         (jv-scan$(exeext)): Likewise.
8993 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8995         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
8996         * parse.y (check_class_interface_creation): Allow `private' if the
8997         enclosing is not an interface.
8998         (create_interface): Interface tagged public if the enclosing
8999         context is an interface.
9000         (create_class): Class tagged public if the enclosing context
9001         is an interface.
9002         Fixes PR java/2959
9004 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9006         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9007         Fixes PR java/2665
9009 2001-07-14  Tim Josling  <tej@melbpc.org.au>
9011         * check-init.c (check_init): Remove references to EXPON_EXPR.
9013 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9015         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9016         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9017         Fixes PR java/3602
9019 2001-07-13  Tom Tromey  <tromey@redhat.com>
9021         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9022         invocation.
9024 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9026         * parse.y (patch_method_invocation): Don't override primary if one
9027         is already provided, but let this$<n> be built. Fixed comment.
9029 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9031         * parse.y (empty_statement:): Report empty statement error only
9032         when found at class declaration level.
9033         Fixes PR java/3635
9035 2001-07-12  Tom Tromey  <tromey@redhat.com>
9037         * expr.c (expand_load_internal): New function.
9038         (LOAD_INTERNAL): Use it.
9040 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
9042         * parse.y (verify_constructor_super): Compare anonymous class ctor
9043         args with `valid_method_invocation_conversion_p.'
9044         Fixes PR java/3285
9046 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9048         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9049         `-fsyntax-only.' Fixes PR java/3248
9051 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9053         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9055 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9057         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9058         current function is static. Fixes PR java/1970
9060 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9062         * parse.y (patch_method_invocation): Add enclosing context to ctor
9063         calls if necessary. Fixes PR java/2953
9065 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9067         * parse.y (resolve_package): Abort if qualified expression member
9068         isn't right.
9069         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9070         Fixes PR java/1391
9072 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
9074         * verify.c: Don't use // comments.
9076 2001-07-05  Tom Tromey  <tromey@redhat.com>
9078         * lang.c (flag_assume_compiled): Removed.
9079         * java-tree.h (flag_assume_compiled): Removed.
9080         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9081         -fhash-synchronization, -fuse-divide-subroutine,
9082         -fcheck-references, -femit-class-file, -femit-class-files,
9083         -fassume-compiled.  Updated --encoding information.  Changed
9084         -foutput-class-dir to `-d'.
9086 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
9088         * jcf-parse.c (parse_class_file): Add lineno parameter to
9089         debug_start_source_file call.
9091 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9093         * gcj.texi: Use gpl.texi.
9094         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9095         dependencies and use doc/include in search path.
9097 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
9099         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9100         `this'.  If so, don't build instance initializers.
9102 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9104         * parse.y (resolve_expression_name): Improved error message for
9105         inner class cases. Fixes PR java/1958
9107 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
9109         * lang.c: #include diagnostic.h
9110         (lang_print_error): Add a `diagnostic_context *' parameter.
9111         (java_dummy_print): Likewise.
9112         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9114 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9116         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9117         * jcf.h (typedef struct JCF): New bitfield `finished.'
9118         (JCF_FINISH): Set `finished.'
9119         (JCF_ZERO): Reset `finished.'
9120         Fixes PR java/2633
9122 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9124         * parse.y (class_body_declaration:): Don't install empty instance
9125         initializers.
9126         Fixes PR java/1314
9128 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9130         * class.c (set_super_info): Call `set_class_decl_access_flags.'
9131         (set_class_decl_access_flags): New function.
9132         * java-tree.h (set_class_decl_access_flags): New prototype.
9133         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9134         (parse_class_file): New local `decl_max_locals.' Take wide types
9135         into account to compute DECL_MAX_LOCALS.
9136         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9137         imports on demand.
9139 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
9141         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9143 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9145         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9146         * parse.y (do_resolve_class): Moved comments out to leading comment
9147         section. Removed local `start', New local `_ht' and
9148         `circularity_hash.'  Record `enclosing' in hash table and search
9149         it to detect circularity.  Use `enclosing' as an argument to
9150         `lookup_cl.' Free the hash table when done.
9152 2001-06-19  Tom Tromey  <tromey@redhat.com>
9154         * lex.c (java_read_char): Disallow invalid and overlong
9155         sequences.  Fixes PR java/2319.
9157 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
9159         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9161 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9163         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9164         arguments accordingly.
9166 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9168         * gcj.texi: Move contents to just after title page.
9170 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
9172         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9173         builtin type.
9174         (patch_incomplete_class_ref): Build the class ref, build the class
9175         init if necessary, complete the tree.
9176         Fixes PR java/2605
9178 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9180         * parse.y (lookup_field_wrapper): Test `name' code.
9181         (resolve_qualified_expression_name): Test `qual_wfl' code.
9182         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9183         handle `qual_wfl' by code.
9184         (maybe_build_primttype_type_ref): Test `wfl' code.
9186 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9188         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9189         fdl.texi.
9190         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
9191         the dvi file in the java directory.
9193 2001-05-25  Sam TH  <sam@uchicago.edu>
9195         * gen-table.pl javaop.h jcf.h lex.h,
9196         parse.h: Fix header include guards.
9198 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
9200         * jv-scan.c (version): Update copyright year.
9202 2001-05-21  Per Bothner  <per@bothner.com>
9204         * jcf-parse.c (read_class):  If class is from .class or .zip file
9205         and it's already been read, don't push/pop parser context.
9207 2001-05-18  Per Bothner  <per@bothner.com>
9209         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9210         command line so the jvgenmain-generated main program comes first.
9212 2001-05-15  Tom Tromey  <tromey@redhat.com>
9214         * class.c (build_utf8_ref): Don't generate identifier based on
9215         utf8const contents.
9217 2001-05-12  Richard Henderson  <rth@redhat.com>
9219         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9220         * expr.c (java_lang_expand_expr): Expand it.
9221         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9222         calling build_exception_object_ref.
9223         * parse.y (catch_clause_parameter): Likewise.
9224         (build_dot_class_method): Likewise.
9225         (try_reference_assignconv): Likewise.
9226         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9227         * jcf-write.c (generate_bytecode_insns): Likewise.
9229 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9231         * parse.y (build_unresolved_array_type): Set
9232         EXPR_WFL_QUALIFICATION on the newly created wfl.
9233         Fixes PR java/2538. Fixes PR java/2535.
9235 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9237         * parse.y (fix_constructors): Removed unnecessary assignment to
9238         local. Moved assignment to `this$<n>', fixed comments and
9239         indentation.
9240         (build_wfl_wrap): Fixed indentation.
9241         Fixes PR java/2598, java/2579 and java/2658.
9243 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9245         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9246         check for byte swap.
9248 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9250         * expr.c (build_class_init): Move MODIFY_EXPR
9251         outside of COND_EXPR.  Remove variable `call'.
9253 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9255         * decl.c: NULL_PTR -> NULL.
9256         * jcf-write.c: Likewise.
9258 2001-05-01  Tom Tromey  <tromey@redhat.com>
9260         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9261         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9262         * gcj.texi: Updated copyright text.  Include fdl.texi.
9263         (Top): Link to new node.
9265 2001-05-01  Per Bothner  <per@bothner.com>
9267         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9269 2001-05-01  Per Bothner  <per@bothner.com>
9271         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9272         import_list contains the name, not the TREE_PURPOSE.
9274 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9276         * jcf-io.c (read_zip_member): Cast to long in comparison with
9277         signed value.
9279         * jvspec.c (lang_specific_driver): Initialize variables.
9281         * mangle.c (find_compression_record_match): Likewise.
9283         * typeck.c (build_null_signature): Provide static prototype.  Mark
9284         parameter with ATTRIBUTE_UNUSED.
9286         * verify.c (verify_jvm_instructions): Initialize variable.
9288 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9290         * parse.y (do_resolve_class): Check for cyclic inheritance during
9291         inner class resolution.
9293 2001-04-27  Per Bothner  <per@bothner.com>
9295         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9296         while iterating, since that could cause gc to lose stuff.
9298 2001-04-26  Per Bothner  <per@bothner.com>
9300         Fix method search wrt scope of inner classes to match JLS2.
9301         * typeck.c (build_null_signature):  New static function.
9302         (has_method):  New function.  Uses build_null_signature and lookup_do.
9303         * java-tree.h (has_method):  New declaration.
9304         * parse.y (find_applicable_accessible_methods_list):  Do not search
9305         context of inner classes here.
9306         (patch_method_invocation):  Search scope, ie. current and outer clases,
9307         for method matching simple name, to find class.
9309 2001-04-26  Per Bothner  <per@bothner.com>
9311         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9312         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9314         * constants.c (find_methodref_with_class_index):  New function.
9315         (find_methodref_index):  Use find_methodref_with_class_index.
9316         * java-tree.h (find_methodref_with_class_index):  New declaration.
9317         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9318         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9319         If context changed from interface to class, don't use invokeinterface.
9321 2001-04-25  Per Bothner  <per@bothner.com>
9323         * verify.c (verify_jvm_instructions):  For field instructions,
9324         check that field index is valid.  For invoke instructions, check that
9325         method index is valid.
9327 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9329         * config-lang.in (target_libs): Copy from $libgcj_saved.
9331 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9333         * decl.c (init_decl_processing): Add new class "protectionDomain"
9334         field.
9335         * class.c (make_class_data): Set initial value for "protectionDomain".
9337 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9339         * jvspec.c (lang_specific_driver): Fix memory allocation
9340         deficit, by using concat in lieu of xmalloc/sprintf.
9342 2001-04-20  Per Bothner  <per@bothner.com>
9344         Fixes to compile multiple .class files at once.
9345         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9346         * java-tree.h (CLASS_PARSED_P):  New macro.
9347         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9348         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9349         (read_class):  Avoid some code duplication.
9350         Don't call JCF_FINISH for a .class file - might be needed later.
9351         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9352         rather than CLASS_LOADED_P, since latter implies class laid out.
9353         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9354         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9356 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9358         * Make-lang.in (java/boehm.o): Depend on toplev.h.
9360         * boehm.c: Include toplev.h.
9362 2001-04-06  Tom Tromey  <tromey@redhat.com>
9363             Alexandre Petit-Bianco  <apbianco@redhat.com>
9365         Fix for PR gcj/1404 and PR gcj/2332:
9366         * parse.y (build_array_from_name): If we use the type_wfl then
9367         accumulate dimensions from the original type as well.
9368         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9370 2001-04-06  Tom Tromey  <tromey@redhat.com>
9372         * parse.y (analyze_clinit_body): Return true if the second operand
9373         of a METHOD_EXPR is nonzero.
9375 2001-04-06  Tom Tromey  <tromey@redhat.com>
9377         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9378         directory.
9379         ($(srcdir)/java/parse.c): Likewise.
9381 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9383         * gcj.texi: Use `which-gcj' instead of `which-g77.'
9384         (version-gcc): Initialized.
9385         (which-gcj): Likewise.
9387 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9389         * java-tree.h (struct lang_decl): New macro
9390         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9391         * parse.y (build_instance_initializer): New function.
9392         (add_instance_initializer): Use it.
9393         (java_fix_constructors): Set `current_class' before fix pass.
9394         (fix_constructors): Just return if already fixed. Move `super()'
9395         invocation ahead. Use `build_instance_initializer.'
9396         Fixes PR java/1315.
9398 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9400         * parse.y (resolve_qualified_expression_name): Pass field's
9401         DECL_CONTEXT to `not_accessible_p.'
9402         (not_accessible_p): Changed parameters order in `inherits_from_p'
9403         invocation.
9405 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
9407         * lang-options.h: Add flag_check_references.
9409 2001-04-04  Per Bothner  <per@bothner.com>
9411         * java-tree.h (CONSTANT_VALUE_P):  New macro.
9412         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
9413         * parse.y (maybe_build_class_init_for_field):  New static function.
9414         (resolve_expression_name, resolve_field_access):  Use
9415         maybe_build_class_init_for_field instead of build_class_init
9416         This does not do the init if the field is compile-time-constant.
9417         (resolve_field_access):  Simplify.
9419         * parse.y (fold_constant_for_init):  Merge test into switch.
9421 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
9423         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9424         on gansidecl.h.
9425         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9427 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
9429         * expr.c (pop_type_0): Save the result of the first
9430         lang_printable_name call in a scratch buffer, so it
9431         won't be clobbered by the second call.
9433 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9435         * parse-scan.y (array_type:): Rewritten.
9436         (type_declaration:): `empty_statement' replaces `SC_TK.'
9437         (class_member_declaration:): `empty statement' added.
9438         (method_body:): Simplified.
9439         (static_initializer:): Likewise.
9440         (primary_no_new_array:): Use `type_literals.'
9441         (type_literals:): New rule.
9442         (dims:): Set and update `bracket_count.'
9443         Fixes PR java/1074. Fixes PR java/2412.
9445 2001-03-28  Hans Boehm  <boehm@acm.org>
9447         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9448         (get_boehm_type_descriptor): Set type on returned value to be a
9449         pointer length integer.
9451 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9453         * expr.c (pop_type_0): Call `concat' rather than building the
9454         string manually.
9455         (pop_type): Add format specifier in call to `error'.
9457         * parse.y (patch_method_invocation): Avoid casting away
9458         const-ness.
9460 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
9462         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9464 2001-03-28  Richard Henderson  <rth@redhat.com>
9466         IA-64 ABI Exception Handling:
9467         * Make-lang.in (except.o): Don't depend on eh-common.h.
9468         * check-init.c (check_init): Handle EXC_PTR_EXPR.
9469         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9470         [soft_exceptioninfo_call_node]: Remove.
9471         [eh_personality_libfunc, lang_eh_runtime_type]: New.
9472         (end_java_method): No emit_handlers.
9473         * except.c (java_set_exception_lang_code): Remove.
9474         (method_init_exceptions): Don't call it.
9475         (prepare_eh_table_type): No CATCH_ALL_TYPE.
9476         (build_exception_object_ref): New.
9477         (expand_end_java_handler): Update for except.h name changes.
9478         (emit_handlers, expand_resume_after_catch): Remove.
9479         * expr.c (java_lang_expand_expr): Update for except.h name changes.
9480         (process_jvm_instruction): Use build_exception_object_ref.
9481         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9482         (soft_exceptioninfo_call_node): Remove.
9483         (build_exception_object_ref): Declare.
9484         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9485         soft_exceptioninfo_call_node.  Move processing ...
9486         [EXC_PTR_EXPR]: ... here.
9487         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9488         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9489         (source_end_java_method): No java_set_exception_lang_code or
9490         emit_handlers.
9491         (build_dot_class_method): Use build_exception_object_ref.
9492         (try_reference_assignconv): Check EXC_PTR_EXPR not
9493         soft_exceptioninfo_call_node.
9495 2001-03-28  Richard Henderson  <rth@redhat.com>
9497         * java-tree.h (throw_node): Define as a single member of
9498         java_global_trees instead of a separate array.
9499         (JTI_THROW_NODE): New.
9500         * decl.c (throw_node): Don't declare.
9501         (init_decl_processing): Init a scalar throw_node.
9502         Don't register it for gc.
9503         * check-init.c (check_init): Reference scalar throw_node.
9504         * expr.c (build_java_athrow): Likewise.
9505         * jcf-write.c (generate_bytecode_insns): Likewise.
9506         * parse.h (BUILD_THROW): Likewise.
9508 2001-03-28  Richard Henderson  <rth@redhat.com>
9510         * decl.c (end_java_method): Do not save and restore
9511         flag_non_call_exceptions.
9512         * parse.y (source_end_java_method): Likewise.
9513         * lang.c (flag_exceptions): Don't declare.
9514         (java_init_options): Set flag_non_call_exceptions.  Set
9515         flag_exceptions here ...
9516         (java_init): ... not here.
9518 2001-03-27  Richard Henderson  <rth@redhat.com>
9520         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9521         exceptions_via_longjmp.
9523         * lang.c (flag_new_exceptions): Don't declare it.
9524         (java_init_options): Or set it.
9526 2001-03-27  Richard Henderson  <rth@redhat.com>
9528         * decl.c (end_java_method): Rename asynchronous_exceptions to
9529         flag_non_call_exceptions.
9530         * parse.y (source_end_java_method): Likewise.
9532 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9534         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9536 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9538         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9540 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9542         * parse.y (find_as_inner_class): Follow current package
9543         indications not to mistakingly load an unrelated class.
9545 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9547         * constants.c (PUTN): Use memcpy, not bcopy.
9549         * lex.c (java_read_char): Use memmove, not bcopy.
9551         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9553 2001-03-23  Per Bothner  <per@bothner.com>
9555         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
9556         macro for better error pin-pointing.
9557         * java-tree.h:  Fix typo in comment.
9559         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
9560         Don't include jsr/goto in exception range.
9561         Check if start and end of exception range are the same (also TRY_EXPR).
9562         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
9563         However, do emit the following goto even if try_block is empty.
9564         Defer freeing exception_decl until after the finalizer, to make
9565         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
9567         * parse.y (java_complete_lhs):  If the try-clause is empty, just
9568         return the finally-clause and vice versa.
9570 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9572         * gcj.texi (Input Options): documented the check for attribute
9573         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
9574         * java-tree.h (flag_force_classes_archive_check): Declared extern.
9575         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
9576         (jcf_parse): Check for the right classes archive if necessary.
9577         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
9578         (jcf_parse_fields): Fixed indentation.
9579         * jcf-write.c (append_gcj_attribute): New function.
9580         (generate_classfile): Compute the attribute count, invoke
9581         `append_gcj_attribute'.
9582         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
9583         turned into bit-fields. New bit-field `right_zip.'
9584         (JCF_ZERO): Set `right_zip' to zero.
9585         * lang-options.h (-fforce-classes-archive-check): Added flag.
9586         * lang.c (flag_force_classes_archive_check): New flag.
9587         (lang_f_options): New entry `force-classes-archive-check.'
9588         Fixes PR java/1213.
9590 2001-02-07  Andrew Haley  <aph@redhat.com>
9592         * gcj.texi (Configure-time Options): Add -fcheck-references.
9593         * expr.c (build_java_indirect_ref): New function.
9594         (java_check_reference): New function.
9595         (build_java_array_length_access): Use build_java_indirect_ref to
9596         check for null references.
9597         (build_java_arrayaccess): Likewise.
9598         (build_get_class): Likewise.
9599         (build_field_ref): Likewise.
9600         (invoke_build_dtable): Likewise.
9601         (build_invokeinterface): Likewise.
9602         * lang.c (lang_f_options): Add flag_check_references.
9603         * jvspec.c (jvgenmain_spec): Add flag_check_references.
9604         * java-tree.h (flag_check_references): New variable.
9605         * lang.c (flag_check_references): Likewise.
9606         * parse.y (patch_invoke): Use java_check_reference.
9607         (patch_assignment): Allow for extra nesting in
9608         _Jv_CheckArrayStore.
9610 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
9612         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9613         * lex.c (cxx_keywords): Likewise.
9615 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9617         * parse.y (qualify_ambiguous_name): Broaden `length'
9618         recognition. Help MODIFY_EXPR be resolved as expression names.
9619         Fixes PR java/2066. Fixes PR java/2400.
9621 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
9623         * gjavah.c (process_file): Mark interface definitions with
9624         "__attribute__ ((java_interface))".
9626 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9628         * class.c (layout_class): Fixed push_super_field's second
9629         argument. Fixes PR java/2333.
9630         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
9631         too early to lay innerclasses out.
9633 2001-03-20  Tom Tromey  <tromey@redhat.com>
9634             Alexandre Petit-Bianco <apbianco@redhat.com>
9636         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
9637         inside an array reference. Insertion of the array store check
9638         rewritten. Fixes PR java/2299.
9640 2001-03-20  Tom Tromey  <tromey@redhat.com>
9642         * lex.c (java_read_unicode): Only accept leading `u's.
9644 2001-03-20  Tom Tromey  <tromey@redhat.com>
9646         * jcf-parse.c (read_class): Initialize `class'.
9648 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9650         * jcf_parse.c (jcf_parse): Eliminate unused variable.
9652 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9654         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
9655         (layout_class): Likewise.
9656         (layout_class_method): Likewise.
9657         (emit_register_classes): Likewise.
9658         * decl.c (builtin_function): Likewise.
9659         (give_name_to_locals): Likewise.
9661 2001-03-19  Per Bothner  <per@bothner.com>
9663         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
9664         before trying to load an inner class.
9666         Fixes to process to command-line .class files in two passes.
9667         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
9668         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
9669         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
9670         * class.c (is_compiled_class):  Fix for renamed flag.
9671         * parse.y (maybe_create_class_interface_decl):  Likewise.
9672         * jcf-parse.c (yyparse):  Also set if compiling .class files.
9673         * jcf-parse.c (read_class);  Read current_class.
9674         (jcf_parse):  Make static.
9675         (load_inner_classes):  New function, with code moved from jcf_parse,
9676         because we need to inner classes after the command-line files are read.
9677         (yyparse):  Set finput to NULL when it doesn't need to be closed.
9678         Reduce use of main_jcf (basically only for archive) and
9679         use finput instead of main_jcf->read_state.
9680         Inline jcf_figure_file_type into yyparse.
9681         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
9682         Defer load_inner_classes and parse_class_file to a second pass,
9683         after we've correctly mapped command-line .clas fiels to classes.
9684         (jcf_figure_file_type):  Removed.
9685         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
9686         (JCF_ZERO):  Also clear zipd field.
9687         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
9689 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9691         * jcf-parse.c (yyparse): Change ch from char * to char.
9693 2001-03-19  Per Bothner  <per@bothner.com>
9695         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
9696         Add constructed filelist-file at end, following -xjava.  Thus any .o
9697         and library files are not affected by the -xjava.  Also wrap
9698         explicit @FILE with -xjava and -xnone.
9700 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
9702         * class.c (build_static_field_ref): Call make_decl_rtl() after
9703         setting the DECL_EXTERNAL flag.
9705 2001-03-17  Per Bothner  <per@bothner.com>
9707         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
9709         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
9710         when result is is needed (target is STACK_TARGET).
9712         * parse.h (JDEP_SOLV):  Removed.
9713         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
9715         * parse.y (incomplete_class_list): Removed.
9716         (obtain_incomplete_type): Don't use or set incomplete_class_list.
9717         It doesn't work if resolve_class changes the name of an array type
9718         that is on the list and then someone else looks for the modified name.
9719         Also, seems liable to break when compiling multiple source files at
9720         once.  So the simplest is to just remove incomplete_class_list -
9721         it is only a minor space win and it is not even clear it saves time.
9723         * parse.y (resolve_class):  Remove unneeded promote_type.
9725 2001-03-15  Per Bothner  <per@bothner.com>
9727         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
9728         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
9729         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
9730         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
9732         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
9733         * parse.y (java_expand_classes):  Likewise.
9735         * parse.y (expand_start_java_method):  Was only called once and had a
9736         misleading name, so inline in caller java_complete_expand_method.
9737         (enter_a_block):  Likewise inline in enter_block and remove.
9739         Remove junk from when gcc/java was created (by copying from C/C++).
9740         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
9741         (struct binding_level):  Remove fields keep, keep_if_subblocks,
9742         more_cleanups_ok, have_cleanups (which have never been used).
9743         (pushlevel, poplevel):  Remove related useless code.
9745         * class.c (make_class_data):  The class_dtable_decl (i.e. the
9746         vtable for Class) should be external, except when compiling Class.
9748         * jvspec.c (lang_specific_driver):  Fix -C handling.
9749         Check -save-temps to see if temp @FILE should be deleted.
9750         Follow-up to/fix for February 16 patch.
9752         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
9753         (type_stack_dup):  Remove no-longer neded error check.
9755 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
9757         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
9758         to 'for_pointer'. If this type is for a pointer (argument) mangling,
9759         don't surround the element with 'N..E' if the type name is
9760         unqualified.
9762 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9764         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
9765         DECL_RTL_SET_P, etc.
9766         (make_method_value): Likewise.
9767         (get_dispatch_table): Likewise.
9769         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9771 2001-03-07  Tom Tromey  <tromey@redhat.com>
9773         * config-lang.in (lang_requires): Define.
9775 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
9777         * typeck.c (convert): Check flag_unsafe_math_optimizations,
9778         not flag_fast_math.
9780 2001-03-05  Per Bothner  <per@bothner.com>
9782         Fix a problem where rest_of_decl_compilation applied to
9783         class_dtable_decl causes problems because it was done too early,
9784         before output file was opened.
9785         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
9786         * class.c (class_dtable_decl):  Add macro - element of class_roots.
9787         (make_class_data):  Define class_dtable_decl.
9788         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
9790 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9792         * java/class.c, java/decl.c, java/java-tree.h: Replace all
9793         uses of 'boolean' with 'bool'.
9795 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9797         * lang-specs.h: Add zero initializer for cpp_spec field to all
9798         array elements.
9800 2001-02-16  Per Bothner  <per@bothner.com>
9802         Handle compiling multiple input files at once, and @FILE syntax.
9803         * gcj.texi:  Updated documentation to match.
9804         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
9805         * jcf-parse.c (parse_source_file):  Split into ...
9806         (parse_source_file_1):  New function - and:
9807         (parse_source_file_2):  New function.
9808         (yyparse):  On -ffilelist-file, open and scan named file.
9809         On first pass over files, only do parse_source_file_1.
9810         A new second pass calls parse_source_file_2 for each file to compile.
9811         (init_jcf_parse):  Call init_src_parse.
9812         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
9813         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
9814         as multiple input file combined in one compilation.
9815         * lang-options.h:  Add -ffilelist-file
9816         * lang.c (flag_filelist_file):  New flag variable.
9817         (lang_f_options):  Handle -ffilelist-file.
9818         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
9819         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
9820         gclass_list - use global fields of src_parse_roots instead.
9821         * parse.y (src_parse_roots):  New array.
9822         (incomplete_class_list, gclass_list):  New macros.
9823         (push_parser_context, java_pop_parser_context,
9824         java_parser_context_resume):  Don't fiddle with deleted fields.
9825         (various):  Use incomplete_class gclass_list and global macros
9826         instead of parse_ctxt fields - the lists are global.
9827         (init_src_parse):  New function.
9829 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9831         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
9833 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9835         * parse.y (check_inner_class_access): Moved declaration of local
9836         `enclosing_decl_type' to the right location.
9838 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
9840         * parse.y (parser_check_super_interface): Don't call
9841         check_pkg_class_access for an inner interface.
9842         (parser_check_super): Don't call check_pkg_class_access for inner
9843         class.
9844         (do_resolve_class): Simplify enclosing type loop. Don't call
9845         check_pkg_class_access if CL and DECL are not set.
9846         (find_in_imports_on_demand): Set DECL if class_type needed to be
9847         loaded. Don't call check_pkg_class_access for an inner class.
9848         (check_inner_class_access): Rewritten to implement member access
9849         rules as per spec 6.6.1.
9850         (check_pkg_class_access): Handle the empty package correctly.
9851         (in_same_package): New function. Determine if two classes are in the
9852         same package.
9854 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
9856         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
9857         method into array types.
9858         * parse.y (patch_method_invocation): Bypass access check on clone call
9859         to array instance.
9861 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9863         * expr.c (build_instanceof): Check for arrays when trying fold to
9864         false.
9866 2001-02-15  Jim Meyering  <meyering@lucent.com>
9868         * Make-lang.in (java.install-common): Depend on `installdirs'.
9869         (java.install-info): Likewise.
9871 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
9873         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
9875 2001-02-14  Tom Tromey  <tromey@redhat.com>
9876             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9878         Fix for PR java/1261.
9879         * typeck.c (build_java_array_type): Add public `clone' method to
9880         arrays.
9881         * parse.y (resolve_qualified_expression_name): Use current_class
9882         when checking for inaccessibility.
9883         (patch_method_invocation): Fixed error message when accessibility
9884         denied.  Added `from_super' argument.
9886 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
9888         * parse.y (resolve_class): Don't build a fake decl. Use the one
9889         already built.
9890         * typeck.c (build_java_array_type): Build and assign decl to array
9891         type.
9893 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
9895         * parse.y (not_accessible_p): Changed leading comment. Added extra
9896         `where' argument. Use it to enforce protected access rules.
9897         (resolve_qualified_expression_name): Added extra argument to
9898         not_accessible_p.
9899         (patch_method_invocation): Use argument `primary' to provide
9900         not_accessible_p with an extra argument.
9901         (lookup_method_invoke): Added extra argument to not_accessible_p.
9902         (search_applicable_method_list): Likewise.
9904 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9906         * parse.y (resolve_qualified_expression_name): Try to resolve as
9907         an inner class access only if `decl' is a TYPE_DECL.
9909 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9911         * decl.c (classdollar_identifier_node): Initialize.
9912         * java-tree.h (enum java_tree_index): New entry
9913         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
9914         (classdollar_identifier_node): New macro.
9915         (ID_CLASSDOLLAR_P): Likewise.
9916         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
9917         (build_dot_class_method_invocation): Likewise.
9918         (find_applicable_accessible_methods_list): `class$' can't be
9919         inherited.
9921 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
9923         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
9925 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9927         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
9928         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
9929         gone.
9931 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9933         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
9934         outside of the `__U' sequence too.
9935         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
9936         sequence too.
9938 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9940         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
9942 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9944         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
9945         (JVGENMAIN_OBJS): Likewise.
9946         * java-tree.h (append_gpp_mangled_name): New prototype.
9947         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
9948         Removed cast calling `gcc_add_root.'
9949         * jvgenmain.c (mangle_obstack): New global, initialized.
9950         (main): Use it.
9951         (do_mangle_class): Constify local `ptr.'
9952         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
9953         append_gpp_mangle_name and update `count' if necessary.
9954         Use `mangle_obstack.'
9955         * mangle.c (append_unicode_mangled_name): Removed.
9956         (append_gpp_mangled_name): Likewise.
9957         (unicode_mangling_length): Likewise.
9958         (mangle_member_name): Return type set to `void.'
9959         (mangle_field_decl): Don't append `U' in escaped names.
9960         (mangle_method_decl): Likewise.
9961         (mangle_member_name): Just use `append_gpp_mangled_name.'
9962         * mangle_name.c: New file.
9964 2001-02-07  Per Bothner  <per@bothner.com>
9966         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
9968         * check-init.c (check_init):  Don't call done_alternative after
9969         processing loop code, as a LOOP_EXPR never terminates normally.
9971 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9973         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
9975 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9977         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
9978         DECLs.
9980 2001-02-06  Tom Tromey  <tromey@redhat.com>
9982         * lex.c (java_new_lexer): Longer error message.
9984 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
9985             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9987         * typeck.c (build_prim_array_type): Added leading comment.
9988         (build_java_array_type): Moved locals out of
9989         block. Always create the `data' field, fixed alignment to match
9990         C++.
9992 2001-02-04  Tom Tromey  <tromey@redhat.com>
9994         * expr.c (java_lang_expand_expr): Don't bother recomputing
9995         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
9996         Fixes PR java/1866.
9998 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10000         * parse.y (process_imports): Save the original name of the import
10001         for better error report.
10003 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
10005         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10006         of macros used when compiling jvspec.c.
10007         * jvspec.c (lang_specific_driver): Link with the shared
10008         libgcc by default.
10010 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10012         * check-init.c (check_init): Call internal_error instead of fatal.
10013         * expr.c (java_lang_expand_expr): Likewise.
10014         * jcf-parse.c (get_constant): Likewise.
10015         * mangle.c (java_mangle_decl): Likewise.
10016         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10017         (operator_string): Likewise.
10018         * check-init.c (check_init): Call abort instead of fatal.
10019         * class.c (build_class_ref): Likewise.
10020         * constants.c (write_constant_pool): Likewise.
10021         * decl.c (start_java_method): Likewise.
10022         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10023         (java_stack_dup, encode_newarray_type): Likewise.
10024         (build_java_array_length_access): Likewise.
10025         (build_java_check_indexed_type, expand_java_pushc): Likewise.
10026         (build_java_soft_divmod, build_invokeinterface): Likewise.
10027         * java-tree.h (INNER_CLASS_P): Likewise.
10028         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10029         (give_name_to_class, get_class_constant): Likewise.
10030         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10031         (find_constant_index, generate_bytecode_conditional): Likewise.
10032         (generate_bytecode_insns, perform_relocations): Likewise.
10033         * lex.c (java_unget_unicode, java_lex): Likewise.
10034         * mangle.c (mangle_type, mangle_record_type): Likewise.
10035         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10036         (finish_mangling): Likewise.
10037         * parse.h (MARK_FINAL_PARMS): Likewise.
10038         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10039         (obtain_incomplete_type, java_complete_class): Likewise.
10040         (java_check_regular_methods, java_complete_expand_method): Likewise.
10041         (cut_identifier_in_qualified, check_deprecation): Likewise.
10042         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10043         (java_complete_lhs, lookup_name_in_blocks): Likewise.
10044         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10045         * typeck.c (set_local_type, parse_signature_type): Likewise.
10046         (parse_signature_string, build_java_signature): Likewise;
10047         (set_java_signature): Likewise.
10048         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10049         * class.c (add_method): Call fatal_error instead of fatal.
10050         (build_static_field_ref): Likewise.
10051         * expr.c (build_known_method_ref, expand_invoke): Likewise.
10052         * jcf-parse.c (get_constant, jcf_parse): Likewise.
10053         * lex.c (java_new_new_lexer): Likewise.
10054         * jv-scan.c (main): Likewise.
10055         (fatal_error): Renamed from fatal.
10056         * jcf-parse.c (yyparse): Call fatal_io_error instead of
10057         pfatal_with_name.
10058         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10059         (yyparse): Likewise.
10060         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10061         * lex.c (java_get_line_col): Likewise.
10062         * jcf-parse.c (load_class): Make errors non-fatal.
10063         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10065 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
10067         * jvgenmain.c (class_mangling_suffix): Remove unused string.
10068         (error): Remove unused function.
10069         (main): Don't use "__attribute__ alias" on generated class symbol.
10071 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10073         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10074         argument.
10075         * parse.y (finish_method_declaration): Code accounting for WFLed
10076         method DECL_NAMEs deleted.
10077         (check_abstract_method_definitions): Likewise.
10078         (resolve_type_during_patch): Layout resolved type.
10079         * typeck.c (lookup_do): Removed unused local.
10081 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
10083         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10084         * decl.c (init_decl_processing): Use integer_minus_one_node, not
10085         integer_negative_one_node.
10086         * expr.c (build_java_binop): Likewise.
10088 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
10090         * zextract.c (read_zip_archive): Read file_offset before writing
10091         zipd and consequently clobbering the header contents.
10093 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10095         * Make-lang.in: Remove all dependencies on defaults.h.
10096         * decl.c: Don't include defaults.h.
10097         * expr.c: Likewise.
10098         * parse.y: Likewise.
10100 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10102         * ChangeLog (2001-01-21): Fixed typo.
10103         * class.c (layout_class_method): Code accounting for WFLed
10104         method DECL_NAMEs deleted.
10105         * constant.c (find_methodref_index): Likewise.
10106         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10107         * java-tree.h (DECL_FUNCTION_WFL): New macro.
10108         (struct lang_decl): New field `wfl'.
10109         (java_get_real_method_name): Prototype deleted.
10110         * mangle.c (mangle_method_decl): Code accounting for WFLed
10111         method DECL_NAMEs deleted.
10112         * parse.h (GET_METHOD_NAME): Macro deleted.
10113         * parse.y (reset_method_name): Deleted.
10114         (method_header): Set DECL_FUNCTION_WFL.
10115         (check_abstract_method_header): Code accounting for WFLed method
10116         DECL_NAMEs deleted.
10117         (java_get_real_method_name): Deleted.
10118         (check_method_redefinition): Code accounting for WFLed method
10119         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10120         (java_check_regular_methods): Likewise.
10121         (java_check_abstract_methods): Likewise.
10122         (java_expand_classes): Don't call `reset_method_name.'
10123         (search_applicable_method_list): Use DECL_NAMEs instead of
10124         GET_METHOD_NAME.
10125         * typeck.c (lookup_do): Code accounting for WFLed method
10126         DECL_NAMEs deleted.
10128 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
10130         * lex.c (java_read_char): Check for EOF from getc first.
10132 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10134         * class.c (layout_class): Don't lay the superclass out if it's
10135         already being laid out.
10136         * jcf-parse.c (handle_innerclass_attribute): New function.
10137         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10138         handle_innerclasses_attribute.
10139         (jcf_parse): Don't load an innerclasses if it's already being
10140         laid out.
10141         * jcf-write.c (append_innerclass_attribute_entry): Static
10142         `anonymous_name' and its initialization deleted. `ocii' and `ini'
10143         to be zero for anonymous classes.
10145 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10147         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10148         necessary.
10149         * jcf-parse.c (set_source_filename): Use
10150         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10152 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10154         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10155         gets a unique asm name.
10157 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10159         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10160         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10161         if necessary.
10162         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10163         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10164         * parse.y (lookup_package_type_and_set_next): Deleted.
10165         (resolve_package): Removed unnecessary code.
10166         (find_applicable_accessible_methods_list): `finit$' can't be
10167         inherited.
10168         * verify.c (pop_argument_types): Added missing prototype.
10170 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
10172         * config-lang.in: Disable java by default.
10174 2001-01-23  Tom Tromey  <tromey@redhat.com>
10176         * gcj.texi (Copying): New node.
10177         Added copyright information.
10179 2001-01-21  Per Bothner  <per@bothner.com>
10181         Various fixes to allow compiling a compressed .jar/.zip archive.
10182         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
10183         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
10184         (struct ZipDirectory):  New field zipf points to owning ZipFile.
10185         * jcf.h (struct ZipDirectory):  Add forward declaration.
10186         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
10187         Remove seen_in_zip and zip_offset fields.
10188         (JCF_SEEN_IN_ZIP):  New macro.
10189         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
10190         * jcf-io.c:  Change all ZipFileCache to ZipFile.
10191         (read_zip_member):  New function.
10192         (open_in_zip):  Call read_zip_member.
10193         * jcf-parse.c (find_in_current_zip):  Remove function.
10194         (read_class):  Merge in find_in_current_zip functionality.
10195         Call read_zip_member if needed.
10196         (parse_zip_file_entries):  Use read_zip_member.
10197         (process_zip_dir):  Update for removed and added JCF fields.
10198         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
10200 2001-01-21  Per Bothner  <per@bothner.com>
10202         Minor optimization of static ggc roots.
10203         * jcf-parse.c (parse_roots):  New static field.
10204         (current_field, current_method, current_file_list):  Replace by macros
10205         naming fields of parse_roots.
10206         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
10207         * class.c (class_roots):  New static field.
10208         (registered_class, fields_ident, info_ident, class_list):
10209         New macros naming fields of parse_roots.
10210         (build_static_field_ref):  Don't register roots here.
10211         (layout_class):  Static field list replaced by macro class_list.
10212         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10213         Initialize fields_ident and info_ident here.
10215 2001-01-21  Per Bothner  <per@bothner.com>
10217         * jcf-parse.c (ggc_mark_jcf):  New function.
10218         (init_jcf_parse):  Register current_jcf as ggc root.
10220 2001-01-21  Per Bothner  <per@bothner.com>
10222         * lang.c (put_decl_node):  Print method's name.
10224 2001-01-21  Per Bothner  <per@bothner.com>
10226         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10227         (verify_jvm_instructions):  Use it, for better error messages on loads.
10229 2001-01-21  Per Bothner  <per@bothner.com>
10231         * verify.c (merge_type_state):  Still may have to merge even if
10232         LABEL_VERIFIED (label).
10234 2001-01-21  Per Bothner  <per@bothner.com>
10236         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10237         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10239 2001-01-19  Per Bothner  <per@bothner.com>
10241         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10242         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10244 2001-01-18  Per Bothner  <per@bothner.com>
10246         * gcj.texi (Input Options): Mention .java files.
10248 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10250         * lang-options.h (-Wunsupported-jdk11): Removed.
10251         * lang.c (flag_not_overriding): Deleted.
10252         (flag_static_local_jdk1_1): Likewise.
10253         (lang_W_options): Removed "unsupported-jdk11" entry.
10254         * parse.y (java_check_methods): Removed dead code.
10256 2001-01-17  Tom Tromey  <tromey@redhat.com>
10258         Changes suggested by Per Bothner:
10259         * gcj.texi (Input Options): Don't mention input files.
10260         (Code Generation): Updated --main information.
10261         (Invoking jcf-dump): Mention that --javap is incomplete.
10262         From Alexandre Petit-Bianco:
10263         (Warnings): Don't mention -Wunsupported-jdk11.
10264         My stuff:
10265         (Compatibility): Mention JDK 1.2-ness of libraries.
10266         (Resources): Mention resources used when writing gcj.
10268 2001-01-17  Tom Tromey  <tromey@redhat.com>
10270         * gcj.texi: New file.
10271         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10272         (java.info): Depend on gcj.info.
10273         (java/gcj.dvi): New target.
10274         (java.dvi): Depend on gcj.dvi.
10275         (java.install-info): Wrote.
10277 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10279         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10280         having called make_decl_rtl.
10282 2001-01-14  Per Bothner  <per@bothner.com>
10284         Various patches to emit better messages on verification errors.
10285         * expr.c (push_type_0):  Return error indication on stack overflow,
10286         instead of callinfg fatal.
10287         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10288         (pop_type_0):  Return detailed error message (in a char** argument).
10289         (pop_type):  If pop_type_0 fails, print error message.
10290         (pop_argument_types):  Moved to verify.c.
10291         * verify.c (pop_argument_types):  Moved from expr.c.
10292         Return a (possible) error message, rather than void.
10293         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10294         (verify_jvm_instruction):  Use new macros, improving error messages.
10295         For case OPCODE_astore use object_ptr_type_node.
10296         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10297         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10299         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10300         constant, return body without wrapper.  (Improves constant folding.)
10301         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10303 2001-01-13  Per Bothner  <per@bothner.com>
10305         * expr.c (expand_java_field_op):  Assigning to a final field outside
10306         an initializer does not violate JVM spec, so should be warning, not
10307         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10309 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10311         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10312         to 2001.
10314 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10316         * parse.y (resolve_expression_name): Permit instance variables from
10317         enclosing context in super constructor call.
10318         (resolve_qualified_expression_name): Permit enclosing class's qualified
10319         "this" in super constructor call.
10321 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10323         * class.c (build_utf8_ref): Remove last argument in call to
10324         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10325         (build_class_ref): Likewise.
10326         (build_static_field_ref): Likewise.
10327         (get_dispatch_table): Likewise.
10328         (layout_class_method): Likewise.
10329         (emit_register_classes): Likewise.
10330         * constants.c (build_constant_data_ref): Likewise.
10331         * decl.c (builtin_function): Likewise.
10332         (create_primitive_vtable): Likewise.
10333         * expr.c (build_known_method_def): Likewise.
10334         (build_jni_stub): Likewise.
10335         (java_lang_expand_expr): Likewise.
10337 2001-01-10  Tom Tromey  <tromey@redhat.com>
10339         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10341 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10343         * java-tree.h (lang_printable_name_wls): New prototype.
10344         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10345         rather than `current_class' to print type name. Don't prepend type
10346         names when printing constructor names.
10347         (lang_printable_name_wls): New function.
10348         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10349         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10350         * parse.y (patch_method_invocation): Message tuned for constructors.
10351         (not_accessible_p): Grant `private' access from within
10352         enclosing contexts.
10354 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10356         All files with updated copyright when applicable.
10357         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10358         * class.c (mangle_class_field): Function removed.
10359         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10360         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10361         (build_class_ref): Call `java_mangle_class_field' instead of
10362         `mangle_class_field.'
10363         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10364         (layout_class): Call `java_mangle_decl' instead of
10365         `mangle_static_field.'
10366         (cxx_keywords): Initialized static array moved to `lex.c.'
10367         (layout_class_method): Changed leading comment. Simplified to
10368         call `java_mangle_decl.' Local `ptr' moved in for loop body.
10369         * decl.c (lang_mark_tree): Mark field `package_list.'
10370         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10371         (struct lang_type): New field `package_list.'
10372         (unicode_mangling_length): Prototype removed.
10373         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10374         emit_unicode_mangled_name): Likewise.
10375         (cxx_keyword_p): New prototype.
10376         (java_mangle_decl, java_mangle_class_field,
10377         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10378         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10379         `build_expr_wfl.'
10380         * jvgenmain.c (main_method_prefix): Global variable removed.
10381         (main_method_suffix): Likewise.
10382         (do_mangle_classname): New function.
10383         (main): Call it. Format changed to accommodate new mangling scheme.
10384         * lex.c: (utf8_cmp): Conditionally prototyped.
10385         (cxx_keywords): Moved from class.c, conditionally defined.
10386         (utf8_cmp, cxx_keyword_p): Likewise.
10387         * mangle.c (obstack.h, ggc.h): Included.
10388         (mangle_field_decl): New function.
10389         (mangle_method_decl, mangle_type, mangle_pointer_type,
10390         mangle_array_type, mangle_record_type,
10391         find_compression_pointer_match, find_compression_array_match,
10392         find_compression_record_match,
10393         find_compression_array_template_match, set_type_package_list,
10394         entry_match_pointer_p, emit_compression_string, init_mangling,
10395         finish_mangling, compression_table_add, mangle_member_name): Likewise.
10396         (mangle_obstack): New global.
10397         (MANGLE_RAW_STRING): New macro.
10398         (unicode_mangling_length): Turned static.
10399         (append_unicode_mangled_name): Renamed from
10400         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
10401         replaces `obstack', removed from the parameter list.
10402         (append_gpp_mangled_name): Turned static. `mangle_obstack'
10403         replaces parameter `obstack', removed from the parameter list. Call
10404         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10405         (append_gpp_mangled_classtype): Removed.
10406         (compression_table, compression_next): New static variables.
10407         * parse.y (temporary_obstack): Extern declaration removed.
10409 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10411         * parse.y (patch_binop): Compute missing type in error situations.
10413 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10415         * class.c (make_class_data): Push initial value for "arrayclass".
10416         * decl.c (init_decl_processing): Add new class field "arrayclass".
10418 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10420         From patha@softlab.ericsson.se:
10421         * parse.y (switch_label): Use build, not build1, to construct
10422         DEFAULT_EXPR.
10424 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10426         * lang.c (lang_decode_option): Change -MA to -MP.
10427         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10428         Update to new prototype; do quote targets.
10429         (jcf_dependency_write): Update.
10431 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
10433         Shorten primitive array allocation path:
10434         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10435         to create new primitive arrays.
10436         * expr.c (build_newarray): If generating native code, call
10437         soft_newarray_node with a reference to the primitive TYPE identifier
10438         instead of type_value.
10440 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
10442         Fix for PRs gcj/312 and gcj/253:
10443         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10444         dest if they arn't already.
10445         * class.c (layout_class): Call maybe_layout_super_class on
10446         superinterfaces also, but only if compiling from bytecode.
10448         Fix for PR gcj/373:
10449         * parse.y (create_class): Set ACC_STATIC if class is declared in an
10450         interface.
10452 2000-12-15  Tom Tromey  <tromey@redhat.com>
10454         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10455         set.
10457 2000-12-14  Andrew Haley  <aph@redhat.com>
10459         * boehm.c (mark_reference_fields): Change test to correctly detect
10460         bitmap overflow.
10462 2000-12-15  Andreas Jaeger  <aj@suse.de>
10464         * config-lang.in (lang_dirs): Added.
10466 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10468         * parse.y (end_artificial_method_body): Fixed undefined behavior.
10469         Credits go to rth for finding it.
10471 2000-12-13  Mike Stump  <mrs@wrs.com>
10473         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10475 2000-11-07  Tom Tromey  <tromey@cygnus.com>
10477         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10478         * lex.c (java_ignorable_control_p): Removed.
10479         (java_letter_or_digit_p): Removed.
10480         (java_start_char_p): New function.
10481         (java_read_char): Return `int', not `unicode_t'.  Changed
10482         callers.
10483         (java_read_unicode): Likewise.
10484         (java_read_unicode_collapsing_terminators): Likewise.
10485         (java_get_unicode): Likewise.
10486         (java_new_lexer): Initialize hit_eof.
10487         (java_parse_end_comment): Take `int' argument.
10488         (java_parse_doc_section): Likewise.
10489         (java_parse_escape_sequence): Don't allow backlash-newline.
10490         Return `int'.
10491         * lex.h (JAVA_DIGIT_P): Removed.
10492         (_JAVA_LETTER_OR_DIGIT_P): Removed.
10493         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10494         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10495         (JAVA_PART_CHAR_P): New macro.
10496         (UEOF): Now -1.
10497         (JAVA_CHAR_ERROR): Now -2.
10498         (java_lexer): New field `hit_eof'.
10499         * chartables.h: New file.
10500         * gen-table.pl: new file.
10502 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10503             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10505         * parse.y (java_complete_lhs): Only allow compound assignment of
10506         reference type if type is String.
10508 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10510         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10511         jcf-path.c: Likewise.
10513 2000-12-09  Anthony Green  <green@redhat.com>
10515         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10516         filestart and filename_length as int values.
10518 2000-12-07  Mo DeJong  <mdejong@redhat.com>
10520         * jcf-io.c (find_class): Correct the logic that tests to see if a
10521         .java file is newer than its .class file. The compiler was
10522         incorrectly printing a warning when file mod times were equal.
10524 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
10526         * jvgenmain.c: Use ISPRINT not isascii.
10528 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10530         * parse.y (end_artificial_method_body): Fixed typo.
10532 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10534         * parse.y (patch_method_invocation): Pick the correct enclosing
10535         context when creating inner class instances.
10536         Fixes gcj/332.
10538 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
10540         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10541         Update copyright year to 2000.
10543 2000-11-23  Anthony Green  <green@redhat.com>
10545         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10546         Move current_file_list out of yyparse and make it static.
10548         * expr.c: Declare quick_stack and tree_list_free_list as static
10549         (init_expr_processing): Register quick_stack and
10550         tree_list_free_list roots.
10552 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10554         * parse.y (build_outer_field_access): New local `decl_ctx', use
10555         it. Check for field's context and current class immediate outer
10556         context inheritance.
10557         (outer_field_access_p): Consider fields inherited from the last
10558         enclosing context.
10559         (build_access_to_thisn): Stop at the last enclosing context if
10560         necessary.
10561         Fixes gcj/367.
10563 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
10565         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10567 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
10569         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10570         scratch buffer.
10572 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10574         * jv-scan.c (help): Document --complexity.
10575         (options): Added --complexity.
10576         (flag_complexity): New global.
10577         (main): Call `report'.
10578         * parse-scan.y (complexity): New global.
10579         (if_then_statement, if_then_else_statement,
10580         if_then_else_statement_nsi, switch_block_statement_group,
10581         while_expression, do_statement, for_begin, continue_statement,
10582         throw_statement, catch_clause, finally, method_invocation,
10583         conditional_and_expression, conditional_or_expression,
10584         conditional_expression): Update complexity.
10585         (reset_report): Reset complexity.
10586         (report): New function.
10588 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10590         * lex.c (yylex): Added STRICT_TK case.
10591         * parse.y (STRICT_TK): Added.
10592         * parse-scan.y (STRICT_TK): Added.
10593         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
10594         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
10595         file.
10596         * keyword.h: Rebuilt.
10597         * keyword.gperf (strictfp): Added.
10599 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10601         * lex.c (yylex): Recognize floating point constants with leading
10602         0.
10604 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10606         * java-tree.h (cyclic_inheritance_report): Constify.
10607         * parse.y (cyclic_inheritance_report): Likewise.
10609 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10611         * parse.y (goal): Remove call to ggc_add_string_root.
10613 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10615         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10616         Create string in scratch buffer, then pass to build_string.
10618 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10620         * parse.y (issue_warning_error_from_context): Add
10621         ATTRIBUTE_PRINTF.
10623 2000-11-11  Anthony Green  <green@redhat.com>
10625         * jcf-parse.c (process_zip_dir): Add finput parameter.
10626         (jcf_figure_file_type): Call process_zip_dir with appropriate
10627         argument.
10629 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10631         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10632         * jcf-parse.c (jcf_figure_file_type): Likewise.
10634 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10636         * parse.y (create_new_parser_context): Use memset () instead of
10637         bzero ().
10639 2000-11-08  Tom Tromey  <tromey@cygnus.com>
10641         * gjavah.c (process_file): Only include gcj/cni.h when generating
10642         CNI stubs.
10644 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10646         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
10647         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
10648         instead of bzero ().
10650 2000-11-05  Tom Tromey  <tromey@cygnus.com>
10652         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
10653         * lex.c (IS_ZERO): New define.
10654         (java_perform_atof): Error on floating point underflow.
10656 2000-11-04  Tom Tromey  <tromey@cygnus.com>
10658         * lex.c (java_parse_escape_sequence): Only read two octal
10659         characters if the first one is greater than 3.  Don't allow
10660         "octal" numbers to include the digits 8 or 9.
10662 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10664         * Make-lang.in (java.distdir): Remove.
10666 2000-11-03  Tom Tromey  <tromey@cygnus.com>
10668         * Make-lang.in (java.dvi): New target.
10669         Partial fix for PR other/567.
10671         * lang-options.h: Mention -Wout-of-date.
10672         * jcf-dump.c (flag_newer): New global.
10673         * gjavah.c (flag_newer): New global.
10674         * jcf-io.c (find_class): Only warn when flag_newer set.
10675         * lang.c (flag_newer): New global.
10676         (struct string_option): New declaration.
10677         (lang_W_options): New global.
10678         (process_option_with_no): New function.
10679         (lang_decode_option): Use it.
10681         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
10682         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
10683         `$'.
10685         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
10686         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
10687         * lex.c (java_read_unicode): Removed `term_context' argument.
10688         Recognize any number of `u' in `\u'.
10689         (java_read_unicode_collapsing_terminators): New function.
10690         (java_get_unicode): Use it.
10691         (java_lineterminator): Removed.
10692         (yylex): Produce error if character literal is newline or single
10693         quote.  Return if eof found in middle of `//' comment.  EOF in
10694         `//' comment is only an error if pedantic.
10695         (java_ignorable_control_p): New function.
10696         (java_parse_end_comment): Return if eof found in middle of
10697         comment.
10698         Include flags.h.
10699         * jv-scan.c (pedantic): New global.
10701 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10703         * parse.y (outer_field_access_p): Inherited fields aren't
10704         consider outer fields.
10705         (maybe_build_thisn_access_method): Use
10706         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
10707         (resolve_expression_name): Trigger an error if a static field
10708         is being accessed as an outer field.
10710 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10712         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
10713         Fixes gcj/365.
10715 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10717         * Make-lang.in: Move all build rules here from Makefile.in,
10718         adapt to new context.  Wrap all rules that change the current
10719         directory in parentheses.  Expunge all references to $(P).
10720         When one command depends on another and they're run all at
10721         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10722         all object-file generation rules.  Delete obsolete variables.
10724         * Makefile.in: Delete.
10725         * config-lang.in: Delete outputs= line.
10727 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10729         * parse.y (patch_method_invocation): NULLify this_arg when already
10730         inserted.
10731         (maybe_use_access_method): Handle call to methods unrelated to the
10732         current class. Fixed comment.
10733         Fixes gcj/361.
10735 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10737         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
10738         scope.
10740 2000-10-24  Tom Tromey  <tromey@cygnus.com>
10742         * lex.c (java_new_lexer): Initialize new fields.  Work around
10743         broken iconv() implementations.
10744         (java_read_char): Swap bytes if required.  Use fallback decoder if
10745         required.
10746         (byteswap_init, need_byteswap): New globals.
10747         (java_destroy_lexer): Only close iconv handle if it is in use.
10748         * lex.h (java_lexer): New fields read_anything, byte_swap,
10749         use_fallback.
10750         Made out_buffer unsigned.
10752 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10754         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
10755         where an enclosing context can be set on the jdep.
10756         (do_resolve_class): Fixed identation.
10758 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10760         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
10762         * jcf-reader.c (peek_attribute, skip_attribute): Only define
10763         when requested.
10765         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
10767         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
10769 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10771         * jcf-write.c (OP1): Update `last_bc'.
10772         (struct jcf_block): Fixed indentation and typo in comments.  New
10773         field `last_bc'.
10774         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
10775         follows `monitorenter'.
10776         * parse.y (patch_synchronized_statement): New local `tmp'. Call
10777         `patch_string'.
10778         Fixes gcj/232.
10780 2000-10-16  Tom Tromey  <tromey@cygnus.com>
10782         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
10783         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
10784         * lang-options.h: Added -MA, -MT, -MF..
10785         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
10786         (DEPEND_TARGET_SET): New macro.
10787         (DEPEND_FILE_ALREADY_SET): Likewise.
10788         (init_parse): Handle new flags.
10789         * jcf.h (jcf_dependency_print_dummies): Declare.
10790         * Make-lang.in (s-java): Added mkdeps.o.
10791         * Makefile.in (BACKEND): Added mkdeps.o.
10792         (../gcjh$(exeext)): Added mkdeps.o.
10793         (../jcf-dump$(exeext)): Added mkdeps.o.
10794         * jcf-depend.c: Include mkdeps.h.
10795         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
10796         add_entry): Removed.
10797         (jcf_dependency_reset): Rewrote.
10798         (dependencies): New global.
10799         (jcf_dependency_set_target): Rewrote.
10800         (jcf_dependency_add_target): Likewise.
10801         (jcf_dependency_add_file): Likewise.
10802         (munge): Removed.
10803         (print_ents): Removed.
10804         (jcf_dependency_write): Rewrote.
10805         (print_dummies): New global.
10806         (jcf_dependency_print_dummies): New function
10807         (jcf_dependency_write): Call deps_dummy_targets if required.
10809 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10811         * gjavah.c (add_class_decl): Removed unused variables `tname',
10812         `tlen' and `name_index'.
10813         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
10814         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
10815         in `wfl_operator' with value.
10816         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
10817         (jcf_figure_file_type): Fixed identation.
10818         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
10819         * parse.y (analyze_clinit_body): New function.
10820         (static_initializer:): Reset `current_static_block'.
10821         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
10822         `wfl_operator' with new value.
10823         (lookup_cl): Use EXPR_WFL_FILENAME.
10824         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
10825         analyze_clinit_body.
10826         (build_outer_field_access): Access to this$<n> built from
10827         current_class, not its outer context.
10828         (build_access_to_thisn): Fixed leading comment. Tidied things up.
10829         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
10830         (patch_method_invocation): Use `is_static_flag' when already
10831         initialized.
10832         (patch_newarray): Removed assignment in ternary operator.
10834 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10836         * except.c (free_eh_ranges): Don't free `whole_range'.
10838 2000-10-15  Anthony Green  <green@redhat.com>
10840         * decl.c (init_decl_processing): Call init_class_processing before
10841         anything else.
10843 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10845         * check-init.c (check_init): Fixed leading comment. Use
10846         LOCAL_FINAL_P.
10847         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10848         (give_name_to_locals): Likewise.
10849         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
10850         fields in lang_decl_var.
10851         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
10852         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
10853         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
10854         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
10855         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
10856         (LOCAL_FINAL): Rewritten.
10857         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
10858         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
10859         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
10860         `init_final' fields.
10861         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
10862         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
10863         (TYPE_HAS_FINAL_VARIABLE): New macro.
10864         (struct lang_type): Added `afv' field.
10865         * parse.y (check_static_final_variable_assignment_flag): New function.
10866         (reset_static_final_variable_assignment_flag): Likewise.
10867         (check_final_variable_local_assignment_flag): Likewise.
10868         (reset_final_variable_local_assignment_flag): Likewise.
10869         (check_final_variable_indirect_assignment): Likewise.
10870         (check_final_variable_global_assignment_flag): Likewise.
10871         (add_inner_class_fields): Use LOCAL_FINAL_P.
10872         (register_fields): Handle local finals and final variables.
10873         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
10874         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10875         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10876         on local finals.
10877         (java_complete_expand_methods): Loop to set
10878         TYPE_HAS_FINAL_VARIABLE. Call
10879         `reset_final_variable_local_assignment_flag' and
10880         `check_final_variable_local_assignment_flag' accordingly before
10881         and after constructor expansion. Call
10882         `reset_static_final_variable_assignment_flag'
10883         before expanding <clinit> and after call
10884         `check_static_final_variable_assignment_flag' if the
10885         current_class isn't an interface. After all methods have been
10886         expanded, call `check_final_variable_global_assignment_flag' and
10887         `check_static_final_variable_assignment_flag' if the current class
10888         is an interface.
10889         (maybe_yank_clinit): Fixed typo in comment.
10890         (build_outer_field_access_methods): Removed old sanity check. Use
10891         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10892         Don't create access methods for finals.
10893         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
10894         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
10895         existing DECL_INIT has been processed.
10896         (java_complete_lhs): Likewise.
10897         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
10898         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
10899         logic.
10900         (patch_assignment): Use LOCAL_FINAL_P.
10901         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
10902         DECL_INITIAL is nullified.
10903         Fixes gcj/163.
10905 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10907         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
10909         * Makefile.in (parse.c, parse-scan.c): Likewise.
10911 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10913         * class.c (temporary_obstack): Remove.
10914         (make_class): Don't mess with obstascks.
10915         (push_class): Likewise.
10916         (set_super_info): Likewise.
10917         (add_method_1): Likewise.
10918         (add_method): Likewise.
10919         (add_field): Likewise.
10920         (build_utf8_ref): Likewise.
10921         (build_class_ref): Likewise.
10922         (build_static_field_ref): Likewise.
10923         (finish_class): Likewise.
10924         (push_super_field): Likewise.
10925         (layout_class): Likewise.
10926         (layout_class_methods): Likewise.
10927         (init_class_processing): Likewise.
10928         * constants.c (get_tag_node): Likewise.
10929         (build_constant_data_ref): Likewise.
10930         * decl.c (ggc_p): Remove.
10931         (copy_lang_decl): Use ggc_alloc.
10932         (complete_start_java_method): Don't mess with obstacks.
10933         (start_java_method): Likewise.
10934         (end_java_method): Likewise.
10935         * except.c (link_handler): Use xmalloc.
10936         (free_eh_ranges): New function.
10937         (method_init_exceptions): Use it.
10938         (add_handler): Use xmalloc.
10939         (expand_start_java_handler): Don't mess with obstacks.
10940         (prepare_eh_table_type): Likewise.
10941         (expand_end_java_handler): Likewise.
10942         * expr.c (push_value): Likewise.
10943         (create_label_decl): Likewise.
10944         (build_jni_stub): Likewise.
10945         (java_lang_expand_expr): Likewise.
10946         (note_instructions): Use xrealloc.
10947         (java_push_constant_from_pool): Don't mess with obstacks.
10948         (process_jvm_instruction): Likewise.
10949         * java-tree.h (cyclic_inheritance_report): Remove duplicate
10950         declaration.
10951         * jcf-parse.c (get_constant): Don't mess with obstacks.
10952         (read_class): Likewise.
10953         (jcf_parse): Likewise.
10954         * lex.c (expression_obstack): Remove.
10955         (java_lex): Don't use obstack_free.
10956         * parse.h (exit_java_complete_class): Don't mess with obstacks.
10957         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
10958         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
10959         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
10960         * parse.y (gaol): Add more GC roots.
10961         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
10962         (lookup_field_wrapper): Likewise.
10963         (obtain_incomplete_type): Don't mess with obstacks.
10964         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
10965         macros.
10966         (craft_constructor): Don't mess with obstacks.
10967         (safe_layout_class): Likewise.
10968         (java_complete_class): Likewise.
10969         (source_end_java_method): Likewise.
10970         (build_outer_field_access_methods): Likewise.
10971         (build_outer_method_access_method): Likewise.
10972         (maybe_build_thisn_access_method): Likewise.
10973         (build_dot_class_method_invocation): Likewise.
10974         (java_complete_tree): Likewise.
10975         (java_complete_lhs): Likewise.
10976         (do_merge_string_cste): Likewise.
10977         (patch_string_cst): Likewise.
10978         (array_constructor_check_entry): Likewise.
10979         * typeck.c (build_java_array_type): Likewise.
10980         (parse_signature_string): Likewise.
10981         (build_java_signature): Likewise.
10983 2000-10-12  Tom Tromey  <tromey@cygnus.com>
10985         Fix for PR gcj/356:
10986         * gjavah.c (add_class_decl): Don't special-case inner classes.
10987         (add_namelet): Likewise.
10989 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
10991         * java-tree.h: Constify current_encoding.
10992         * lang.c: Constify current_encoding.
10994 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
10996         * jvgenmain.c (class_mangling_suffix): Omit `.'.
10997         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
10999 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11001         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11002         patch. Fixes gcj/340.
11004 2000-10-10  Tom Tromey  <tromey@cygnus.com>
11006         * lex.c (java_new_lexer): Initialize out_first and out_last
11007         fields.
11008         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11010 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11012         * parse.y (pop_current_osb): New function.
11013         (array_type:): Use `dims:', changed actions
11014         accordingly. Suggested by Anthony Green.
11015         (array_creation_expression:): Used pop_current_osb.
11016         (cast_expression:): Likewise.
11017         (search_applicable_method_list): Fixed indentation.
11019 2000-10-08  Anthony Green  <green@redhat.com>
11021         * parse.y (array_type_literal): Remove production.
11022         (type_literals): Refer to array_type, not array_type_literal.
11024 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11026         Patch contributed by Corey Minyard.
11027         * decl.c (check_local_named_variable): New function.
11028         (tree check_local_unnamed_variable): Likewise.
11029         (find_local_variable): Splitted. Call check_local_{un}named_variable.
11031 2000-10-07  Anthony Green  <green@redhat.com>
11033         * class.c (layout_class): Handle case where superclass can't be
11034         layed out yet.
11036 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11038         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11039         gperf.
11041 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11043         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11044         * jvgenmain.c (class_mangling_prefix): Removed.
11045         (class_mangling_suffix): New global.
11046         (main): Use it.
11047         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11048         `$'.
11049         (print_method_info): Handle overrides for static and final
11050         methods.
11051         (process_file): Generate declaration for class object field.
11052         * class.c (cxx_keywords): New array.
11053         (utf8_cmp): New function.
11054         (cxx_keyword_p): New function.
11055         (layout_class_method): Mangle C++ keywords by appending `$'.
11056         (mangle_field): New function.
11057         (mangle_class_field): Use mangle_field.  Mangle class name as
11058         `class$'.
11059         (mangle_static_field): Use mangle_field.
11061 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11063         * decl.c (find_local_variable): Removed uncessary type check and
11064         fixed range check typo. From Corey Minyard.
11066 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11068         * decl.c (give_name_to_locals): New local `code_offset'. Call
11069         `maybe_adjust_start_pc'.
11070         * expr.c (note_instructions): New function.
11071         (expand_byte_code): Don't collect insn starts here.
11072         (peek_opcode_at_pc): New function.
11073         (maybe_adjust_start_pc): Likewise.
11074         * java-tree.h (maybe_adjust_start_pc): Declare.
11075         (note_instructions): Likewise.
11076         * jcf-parse.c (parse_class_file): Call `note_instructions'.
11078 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11080         * parse.y (field_access:): Fixed indentation.
11081         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11083 2000-09-07  Tom Tromey  <tromey@cygnus.com>
11085         Fix for PR gcj/307:
11086         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11087         JPRIMITIVE_TYPE_P, for arithmetic operators.
11088         (patch_method_invocation): Indentation fix.
11089         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
11090         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11091         (do_unary_numeric_promotion): Cleaned up code.
11092         (valid_cast_to_p): Handle boolean correctly.
11094 2000-09-27  Tom Tromey  <tromey@cygnus.com>
11096         * lex.c (java_read_unicode): Reset bs_count when finished with
11097         `\u' sequence.
11099 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11101         Convert to GC.
11102         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11103         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11104         (typeck.o): Depend on ggc.h.
11105         * class.c (add_method_1): Use GC functions for allocation.
11106         (init_class_processing): Register roots.
11107         * decl.c (ggc_p): Set to 1.
11108         (pending_local_decls): Make it static.
11109         (push_jvm_slot): Use GC functions for allocation.
11110         (init_decl_processing): Register roots.
11111         (give_name_to_locals): Use GC functions for allocation.
11112         (lang_mark_tree): New function.
11113         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11114         functions for allocation.
11115         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11116         * lex.c (java_lex): Use build_string, rather than replicating it
11117         inline.
11118         * parse.y (goal): Add more roots.
11119         (mark_parser_ctxt): New function.
11120         * typeck.c: Include ggc.h.
11122 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11124         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11125         contains something else than MODIFY_EXPR.
11127 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
11129         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11130         * Makefile.in (parse.o): Depend on ggc.h.
11131         (class.o): Likewise.
11132         (constants.o): Likewise.
11133         (decl.o): Likewise.
11134         (expr.o): Likewise.
11135         (jcf-parse.o): Likewise.
11136         (jcf-write.o): Likewise.
11137         (mangle.o): Likewise.
11138         * class.c: Include ggc.h.
11139         (build_static_field_ref): Register GC roots.
11140         (layout_class): Likewise.
11141         (init_class_processing): Likewise.
11142         * constants.c: Include ggc.h.
11143         (current_constant_pool_data_ref): Remove.
11144         (tag_nodes): Move it to ...
11145         (get_tag_node): ... here.  Register GC roots.
11146         * decl.c: Include ggc.h.  Remove many global tree definitions.
11147         (throw_node): Define.
11148         (java_global_trees): Likewise.
11149         (predef_filenames): Make the size a constant.
11150         (init_decl_processing): Adjust accordingly.
11151         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
11152         * expr.c: Include ggc.h.
11153         (init_expr_processing): Register GC roots.
11154         (build_invokeinterface): Likewise.
11155         * java-tree.h: Replace extern tree declarations with macros.
11156         (java_global_trees): New variable.
11157         (java_tree_index): New enumeration.
11158         (init_jcf_parse): Declare.
11159         * jcf-parse.c: Include ggc.h.
11160         (current_class): Remove declaration.
11161         (main_class): Likewise.
11162         (all_class_list): Likewise.
11163         (predefined_filename_p): Adjust for constant size of
11164         predef_filenames.
11165         (init_jcf_parse): New function.
11166         * jcf-write.c: Include ggc.h.
11167         (generate_classfile): Register GC roots.
11168         (append_synthetic_attribute): Likewise.
11169         (append_innerclass_attribute_entry): Likewise.
11170         * lang.c: Include ggc.h.
11171         (lang_print_error): Register GC roots.
11172         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11173         with macros.
11174         * parse.y: Include ggc.h.
11175         (wfl_operator): Remove.
11176         (goal): Register GC roots.
11177         (java_pop_parser_context): Adjust for new field names.
11178         (java_parser_context_save_global): Likewse.
11179         (java_parser_context_restore_global): Likewise.
11180         (java_parser_context_suspend): Likewise.
11181         (java_parser_context_resume): Likewise.
11182         (verify_constructor_circularity): Register GC roots.
11183         (lookup_cl): Likewise.
11184         (java_reorder_fields): Likewise.
11185         (build_current_this): Likewise.
11186         (class_in_current_package): Likewise.
11187         (argument_types_convertible): Likewise.
11188         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11190 2000-09-14  Tom Tromey  <tromey@cygnus.com>
11192         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11194 2000-09-13  Tom Tromey  <tromey@cygnus.com>
11196         * jcf-parse.c: Include <locale.h>.
11197         * jv-scan.c: Include <locale.h>.
11199 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11201         * expr.c (pop_type_0): Return `Object' if trying to merge two
11202         interface types.
11203         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11204         interface types; `Object' is always a valid supertype.
11206 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11208         Fix for PR gcj/33:
11209         * jv-scan.c (help): Document --encoding.
11210         (options): Added `encoding' entry.
11211         (OPT_ENCODING): New define.
11212         (main): Handle --encoding.
11213         Include <langinfo.h> if nl_langinfo exists.
11214         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11215         --encoding.
11216         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11217         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11218         argument.  Use nl_langinfo to determine default encoding.
11219         * java-tree.h (current_encoding): Declare.
11220         * parse.y (java_parser_context_restore_global): Don't restore
11221         `finput'.
11222         (java_parser_context_save_global): Don't set `finput' field.
11223         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11224         if required.
11225         * lang.c (current_encoding): New global.
11226         (lang_decode_option): Recognize `-fencoding='.
11227         (finish_parse): Don't close finput.
11228         * parse.h (struct parser_ctxt): Removed `finput' and
11229         `unget_utf8_value' fields.  Added `lexer' field.
11230         (java_init_lex): Fixed declaration.
11231         * lex.c (java_new_lexer): New function.
11232         (java_destroy_lexer): Likewise.
11233         (java_read_char): Added `lex' argument.  Handle iconv case.
11234         (java_read_unicode): Added `lex' argument.  Count backslashes in
11235         lexer structure.
11236         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11237         `lexer' field in ctxp.
11238         (BAD_UTF8_VALUE): Removed.
11239         (java_lex): Handle seeing UEOF in the middle of a string literal.
11240         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11241         (java_lexer): New structure.
11242         (UNGETC): Removed.
11243         (GETC): Removed.
11244         (DEFAULT_ENCODING): New define.
11245         (java_destroy_lexer): Declare.
11247 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11249         Fix for PR gcj/343:
11250         * lex.c (java_init_lex): Initialize java_io_serializable.
11251         * parse.y (java_io_serializable): New global.
11252         (valid_ref_assignconv_cast_p): An array can be cast to
11253         serializable.
11255 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11257         * decl.c, expr.c: Include defaults.h if not already included.
11258         Don't define the *_TYPE_SIZE macros.
11260 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11262         * typeck.c (build_java_array_type): Correct first parameter
11263         in ADJUST_FIELD_ALIGN invocation.
11265 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11267         * lang-specs.h: Also recognize `-femit-class-files'.
11269 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11271         * verify.c (merge_types): Load the types to merge if necessary.
11273 2000-09-02  Anthony Green  <green@redhat.com>
11275         * jcf-io.c: Include zlib.h.
11276         (open_in_zip): Read compressed class file archives.
11277         * zipfile.h (ZipDirectory): Add uncompressed_size and
11278         compression_method fields.
11279         * zextract.c (read_zip_archive): Collect file compression info.
11281 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11283         * parse.y (do_resolve_class): Also explore superclasses of
11284         intermediate enclosing contexts when searching for inner classes.
11286 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11288         * parse.y (variable_declarator_id:): Better error message.
11289         (expression_statement:): Use YYNOT_TWICE.
11290         (cast_expression:): Likewise.
11291         (assignment:): Likewise.
11293 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11295         * parse.y (do_merge_string_cste): New locals. Create new
11296         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11298 2000-08-07  Hans Boehm  <boehm@acm.org>
11300         * boehm.c (mark_reference_fields): Set marking bits for all words in
11301         a multiple-word record.
11302         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11303         java.lang.Class.
11305 2000-08-31  Mike Stump  <mrs@wrs.com>
11307         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11308         jcf-dump$(exeext)): Make parallel safe.
11310 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11312         * jcf-parse.c (set_source_filename): Constify a char *.
11313         * jcf-write.c (append_innerclasses_attribute,
11314         make_class_file_name): Constify a char *.  Don't recycle a
11315         variable for an unrelated purpose.
11316         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11317         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11319 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11321         * expr.c (can_widen_reference_to): Fixed indentation.
11322         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11323         * parse.y: `finit$' replaces `$finit$' in comments.
11324         (try_builtin_assignconv): Fixed leading comment.
11326 2000-08-25  Greg McGary  <greg@mcgary.org>
11328         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11330 2000-08-24  Greg McGary  <greg@mcgary.org>
11332         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11333         * parse.y (BINOP_LOOKUP): Likewise.
11335 2000-08-22  Andrew Haley  <aph@cygnus.com>
11337         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11338         sign extending. Fixes gcj/321.
11339         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11340         combining to make a jlong. Fixes gcj/321.
11342 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11344         * lang-specs.h: Do not process -o or run the assembler if
11345         -fsyntax-only.
11347 2000-08-16  Andrew Haley  <aph@cygnus.com>
11349         * typeck.c (build_java_array_type): Rewrite code to do array
11350         alignment.  Take into account back-end macros when aligning array
11351         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11352         user to set alignment. Fixes gcj/252 and 160.
11354 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11356         * parse.y (check_abstract_method_definitions): Now return `int'.
11357         Check implemented interfaces.  Fixes PR gcj/305.
11359         * parse.y (patch_switch_statement): Disallow `long' in switch
11360         expressions.  Fixes PR gcj/310.
11362 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11364         * decl.c (finit_leg_identifier_node): New global.
11365         (init_decl_processing): Use `finit$' to initialize
11366         finit_identifier_node. Use `$finit$' to initialize
11367         finit_leg_identifier_node.
11368         * expr.c (expand_java_field_op): Use ID_FINIT_P.
11369         * java-tree.h (finit_identifier_node): Changed attached comment.
11370         (finit_leg_identifier_node): New declaration.
11371         (ID_FINIT_P): Take finit_identifier_node and
11372         finit_leg_identifier_node into account. This is a backward
11373         compatibility hack.
11375 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11377         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11378         Jan 6 2000 patch.
11379         (generate_bytecode_insns): Check `nargs' before emitting it.
11380         * verify.c (merge_type_state): Fixed typo.
11381         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11382         generate_bytecode_{conditional,insns}.
11384 2000-08-13  Anthony Green  <green@redhat.com>
11386         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11387         for -pg builds).
11389 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11391         * class.c (maybe_layout_super_class): Fixed indentation.
11392         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11393         (java_check_methods): New function declaration.
11394         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11395         instead of `str_ptr'.
11396         * jcf-write.c (generate_bytecode_insns): Emit number the of args
11397         of a `invokeinterface' at the right time.
11398         * parse.h (WFL_STRIP_BRACKET): New macro.
11399         (SET_TYPE_FOR_RESOLUTION): Use it.
11400         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11401         (check_class_interface_creation): Don't check for cross package
11402         innerclass name clashes.
11403         (method_header): Behave properly if MDECL is `error_mark_node'.
11404         (method_declarator): Return `error_mark_node' if bogus current
11405         class.
11406         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11407         (resolve_and_layout): New local `decl_type', set and used. Call
11408         java_check_methods.
11409         (java_check_methods): New method.
11410         (java_layout_classes): Use it.
11411         (resolve_qualified_expression_name): No EH check necessary in
11412         access$<n>.
11413         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11414         `case' statement.
11415         (patch_assignment): Set DECL_INITIAL on integral final local.
11417 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11419         * java-tree.h (flag_extraneous_semicolon): New extern.
11420         * lang-options.h: (-Wextraneous-semicolon): New option.
11421         * lang.c (flag_redundant): Fixed typo in leading comment.
11422         (flag_extraneous_semicolon): New global.
11423         (lang_decode_option): Set `flag_extraneous_semicolon' when
11424         -Wall. Decode `-Wextraneous-semicolon'.
11425         * parse.y (type_declaration:): Removed `SC_TK' hack, added
11426         `empty_statement' rule.
11427         (class_body_declaration): Likewise.
11428         (method_body:): Accept `;' as a method body.
11429         (static_initializer:): Removed `SC_TK' hack.
11430         (constructor_block_end:): Likewise.
11431         (empty_statement:): Report deprecated empty declaration. Fixes
11432         gcj/295
11434 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11436         * parse.y (build_dot_class_method_invocation): Changed parameter
11437         name to `type'. Build signature from `type' and convert it to a
11438         STRING_CST if it's an array.
11439         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11440         to use `ref_type' directly.
11442 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
11444         * lang-options.h: Added a comma after the last element to avoid
11445         syntax errors when other languages define additional options.
11447 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11449         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11450         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11451         (jc1): Link with $(BACKEND).
11452         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11454 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11456         * jvspec.c: Adjust type of second argument to
11457         lang_specific_driver, and update code as necessary.
11459         * class.c (build_dtable_decl): Initialize dummy.
11461 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11463         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11464         method bodies not to rule out discarding `<clinit>'; don't use
11465         <clinit> to initialize static fields with constant initializers.
11467 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11469         * gjavah.c (print_method_info): Added `synth' parameter. Skip
11470         synthetic methods.
11471         (method_synthetic): New global.
11472         (HANDLE_METHOD): Recognize synthetic method and tell
11473         `print_method_info' about it.
11474         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11475         processing a synthetic method.
11476         * jcf-reader.c (skip_attribute): New function.
11477         ( skip_attribute): Likewise.
11479 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11481         * parse.y (build_outer_field_access): Fixed comments.
11482         (fix_constructors): Emit the initialization of this$<n> before
11483         calling $finit$.
11484         (resolve_qualified_expression_name): Build an access to `decl' if
11485         necessary.
11487 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11489         * parse-scan.y (curent_class): Non longer const.
11490         (inner_qualifier, inner_qualifier_length): Deleted.
11491         (current_class_length): New global.
11492         (bracket_count): Fixed typo in leading comment.
11493         (anonymous_count): New global.
11494         (class_instance_creation_expression:): Handle anonymous classes.
11495         (anonymous_class_creation:): New rule.
11496         (push_class_context): Rewritten.
11497         (pop_class_context): Likewise.
11498         (INNER_QUALIFIER): Macro deleted.
11499         (report_class_declaration): call `push_class_context' when
11500         entering the function. `fprintf' format modified not to use
11501         INNER_QUALIFIER.
11502         (report_class_declaration): Assign `package_name' and
11503         `current_class' to NULL separately.
11505 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11507         * expr.c (build_invokeinterface): Call layout_class_methods on
11508         target interface.
11510 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11511             Anthony Green  <green@cygnus.com>
11512             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11514         * class.c (make_class_data): Create vtable for abstract classes.
11515         (get_dispatch_table): Changed to cope with abstract classes.
11517 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11519         * parse.y (patch_method_invocation): Don't reverse the argument
11520         list when dealing with anonymous class constructors. Fixed typo in
11521         comment.
11523 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11525         * parse.y (build_alias_initializer_parameter_list): Reverse
11526         crafted list when building aliases for anonymous class
11527         constructors.
11529 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11531         * parse.y (jdep_resolve_class): Don't bother checking potential
11532         innerclass access if `decl' is NULL.
11533         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11534         WFL.
11536 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11538         * parse.c: Remove (again.)
11540 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11542         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11543         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
11544         outside the `if' statement, alias to innerclass removed, `decl'
11545         used to mark the class complete.
11547 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11549         * parse.y (simple_name:): Fixed typo in error message.
11551 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11553         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11554         or its first operand can be error marks.
11556 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11558         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11559         * parse.y (method_header): Likewise.
11561 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11563         * parse.y (process_imports): Consider that one might be trying to
11564         import an innerclass. Fixes gcj/254
11566 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11568         * parse.y (find_as_inner_class): Handle the case where the
11569         enclosing context of an innerclass has been loaded as bytecode.
11571 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11573         * parse.y (simple_name:): Reject `$' in type names.
11574         (resolve_type_during_patch): Use `type' as a second
11575         argument to resolve_no_layout. Fixes gcj/257.
11577 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
11579         * parse.y (find_most_specific_methods_list): Select the only
11580         non-abstract method even if max has been set.
11581         Fixes gcj/285, gcj/298.
11583 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
11585         * lang-specs.h: Added %(jc1) to java compiler options.
11587 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11589         * .cvsignore: New file.
11591 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11593         * parse.y (not_accessible_p): Access granted to innerclasses
11594         (indirectly) extending the reference type. Fixes gcj/249.
11596 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11598         * parse.y (patch_method_invocation): Fixed comment.
11599         (maybe_use_access_method): Build this$<n>s to the context of the
11600         target method, or a type that extends it. Fixes gcj/242.
11602 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11604         * parse.c: Remove.
11606 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11608         * parse.y (fold_constant_for_init): Avoid bullish conversion.
11610 2000-07-13  Tom Tromey  <tromey@cygnus.com>
11612         * lang-specs.h: Added %{I*}.
11614 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11616         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11618 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11620         * parse-scan.c: Remove.
11622 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11624         * class.c (set_super_info): Handled protected inner classes.
11625         (common_enclosing_context_p): Bail early if arguments aren't both
11626         inner classes.
11627         (get_access_flags_from_decl): Handle private and protected inner
11628         classes.
11629         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
11630         (CLASS_PROTECTED): Likewise.
11631         (struct lang_type): New bitfield `poic'.
11632         * parse.y (jdep_resolve_class): Call check_inner_class_access on
11633         inner classes only.
11634         (check_inner_class_access): Renamed arguments, added
11635         comments. Handles protected inner classes (fixes gcj/225)
11636         (not_accessible_p): Fixed comments. Avoid handling inner classes.
11638 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11640         * parse.y (resolve_qualified_expression_name): Verify qualified
11641         access to `this'. Fixes gcj/239.
11643 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11645         * jcf-write.c (generate_classfile): Don't install ConstantValue
11646         for null pointers.
11648 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11650         * parse.y (resolve_qualified_expression_name): Handle inner class
11651         access. Fixes gcj/256.
11653 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11655         * jcf-write.c (generate_classfile): Properly install the
11656         ConstantValue attribute and the initial value constant pool index
11657         on string constants.
11658         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
11659         class files.
11661 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11663         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
11664         construct.
11665         * parse.y (find_as_inner_class): Fixed typo.
11666         (do_resolve_class): Explore enclosing contexts when searching for
11667         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
11668         (check_inner_class_access): Check `decl' which can be null in case
11669         of previous errors.
11671 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11673         * java-tree.h (java_debug_context): Declared `extern'.
11674         (safe_layout_class): Likewise.
11675         * parse.y (resolve_field_access): Field must be `static' in order
11676         to be replaced by its initial value. Added comments.
11677         (find_applicable_accessible_methods_list): Fixed typo.
11678         (find_most_specific_methods_list): Methods found in innerclasses
11679         take over methods founds in the enclosing contexts.
11680         (java_complete_tree): Loosen restrictions on the type of DECLs
11681         that can be replaced by their initialization values.
11682         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
11684 2000-07-05  Tom Tromey  <tromey@cygnus.com>
11686         * Make-lang.in (PARSE_DIR): New macro.
11687         (PARSE_RELDIR): Likewise.
11688         (PARSE_C): Likewise.
11689         (PARSE_SCAN_C): Likewise.
11690         ($(PARSE_C)): New target.
11691         ($(PARSE_SCAN_C)): Likewise.
11692         (SET_BISON): New macro.
11693         (BISONFLAGS): Likewise.
11694         (JAVABISONFLAGS): Likewise.
11696 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
11698         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
11699         argument on the first pass for CNI as well as JNI.
11700         (print_method_info): Set up method name on the first pass only.
11702 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11704         * parse.y (parser_qualified_classname): Removed parameter
11705         `is_static'.
11706         (create_interface): Removed first passed parameter to
11707         parser_qualified_classname.
11708         (create_class): Likewise. Don't install alias on static
11709         innerclasses. Fixes gcj/275.
11711 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11713         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
11714         debugable statement with empty_stmt_node. Fixes gcj/272
11716 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11718         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
11719         gcj/271.
11721 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11723         * jcf-write.c (push_long_const): Appropriately cast short negative
11724         constant to jword.
11726 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11728         * parse.y (verify_constructor_super): Use loop variable
11729         `m_arg_type' initialized with `mdecl_arg_type'.
11731 2000-06-29  Tom Tromey  <tromey@cygnus.com>
11733         * parse.y (resolve_field_access): Handle case where `type_found'
11734         is NULL.
11736 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11738         * expr.c (lookup_field): The same field can be found through two
11739         different interface. Don't declare it ambiguous in that case.
11741 2000-06-27  Tom Tromey  <tromey@cygnus.com>
11743         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
11744         follows \r, then unget it at a lower level.
11746 2000-06-26  Tom Tromey  <tromey@cygnus.com>
11748         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
11749         java_complete_tree.
11751 2000-06-25  Tom Tromey  <tromey@cygnus.com>
11753         * parse.y (for_statement): Wrap expression in a WFL if it is a
11754         constant.  For PR gcj/268.
11756 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11758         * parse.y (do_resolve_class): Minor optimiztion in the package
11759         list search. Removed unnecessary test and return statement.
11760         (valid_ref_assignconv_cast_p): Order of arguments to
11761         enclosing_context_p fixed.
11763 2000-06-24  Tom Tromey  <tromey@cygnus.com>
11765         * expr.c (lookup_field): Print error and return error_mark_node if
11766         field reference is ambiguous.
11768         * parse.y (check_abstract_method_definitions): Also check if
11769         `other_method' is abstract.
11771 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11773         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
11774         classes.
11775         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
11776         (struct lang_type): New field `pic'.
11777         (CLASS_PRIVATE): New macro.
11778         * parse.y (check_inner_class_access): New function.
11779         (jdep_resolve_class): Call it.
11781 2000-06-23  Tom Tromey  <tromey@cygnus.com>
11783         * parse.y (patch_incomplete_class_ref): Initialize the returned
11784         class.  For PR gcj/260.
11786 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11788         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
11790 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11792         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11793         Java specific checks.
11794         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
11795         screened by DECL_P.
11796         * java-tree.def (CASE_EXPR): Marked 'e'.
11797         (DEFAULT_EXPR): Likewise.
11798         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
11799         screened by DECL_P.
11800         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11801         Java specific checks.
11802         (generate_bytecode_insns): Test try_block for BLOCK before using
11803         BLOCK_EXPR_BODY.
11804         * parse.y (build_wfl_wrap): Added `location' argument. Set
11805         EXPR_WFL_LINECOL accordingly.
11806         (dim_expr:): Wrap constants with WFLs.
11807         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
11808         (resolve_package): Check for `stmt' not being a BLOCK before
11809         building a debuggable statement with it.
11810         (make_qualified_primary): Added extra parameter to build_wfl_wrap
11811         invocation.
11812         (resolve_field_access): Make sure `decl' is a DECL before treating
11813         it as such.
11814         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
11815         IDENTIFIER_NODE before treating it as such.
11816         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
11817         treating it as such.
11818         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
11819         to be applied only on non array types.
11821 2000-06-16  Per Bothner  <per@bothner.com>
11823         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
11824         define in terms of DECL_RESULT, as that fails when --enable-checking.
11826 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11828         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
11829         types the same in comparison.
11830         (CHECK_OP): Add static prototype.
11832 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11834         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
11835         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
11836         * parse.c: Rebuilt.
11838 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11840         * decl.c (create_primitive_vtable): Prototype.
11842         * jcf-write.c (generate_bytecode_insns): Initialize variable
11843         `saved_context'.
11845         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
11847 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11849         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
11850         to track searched classes, and do not search the same class more than
11851         once. Call find_applicable_accessible_methods_list on immediate
11852         superclass, instead of search_applicable_method_list on all ancestors.
11853         Fix for PR gcj/238.
11855 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11857         * parse.y (register_fields): Permit static fields in inner classes
11858         if they are final. Fix for PR gcj/255.
11860 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11862         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
11863         * parse.y (find_in_imports): Returned type changed to void,
11864         leading comment fixed.
11865         (register_package): New function.
11866         (qualify_and_find): Likewise.
11867         (package_declaration:): Use `register_package'.
11868         (single_type_import_declaration:): Removed local variable
11869         `node'. Added missing `;' for consistency.
11870         (type_import_on_demand_declaration:): Use `chainon' to link new
11871         entries.
11872         (lookup_field_wrapper): Lookup local variables defined in outer
11873         contexts first.
11874         (java_complete_class): Don't reverse the list of imported on demand.
11875         (do_resolve_class): Reorganized. Removed local variable
11876         `original_name'. Call `qualify_and_find' with the current package
11877         name, invoke `find_in_imports_on_demand' right after. Call
11878         `qualify_and_find' with the packages we've seen so far. Fixed
11879         operations numbering in comments.
11880         (java_expand_class): Don't reverse `package_list'.
11881         (find_most_specific_methods_list): New local variables `abstract'
11882         and `candidates'. Use them to pick the right method.
11884 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
11886         * parse.y (check_modifiers_consistency): Don't subtract out
11887         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
11889 2000-06-04  Philipp Thomas  <pthomas@suse.de>
11891         * Makefile.in (INTLLIBS): New.
11892         (LIBS): Add above.
11893         (DEPLIBS): Ditto.
11895 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11897         * class.c (get_dispatch_table): Build the vtable dummy entry list
11898         element with a null purpose. Fixed leading comment.
11899         (build_dtable_decl): Build an accurate dtable type when appropriate
11900         and use it.
11902 2000-06-02  Richard Henderson  <rth@cygnus.com>
11904         * lang.c (lang_get_alias_set): New.
11906 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11908         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
11909         before using it as the accessed field.
11911 2000-05-31  Tom Tromey  <tromey@cygnus.com>
11913         * java-tree.h (boolean_array_vtable, byte_array_vtable,
11914         char_array_vtable, short_array_vtable, int_array_vtable,
11915         long_array_vtable, float_array_vtable, double_array_vtable):
11916         Declare.
11917         * expr.c (get_primitive_array_vtable): New function.
11918         (create_primitive_vtable): New function.
11919         (java_lang_expand_expr): Enable code to statically generate
11920         arrays.
11921         * decl.c (init_decl_processing): Create primitive vtables.
11922         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
11923         short_array_vtable, int_array_vtable, long_array_vtable,
11924         float_array_vtable, double_array_vtable): Define.
11926 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
11928         * java/parse.y (find_applicable_accessible_methods_list):
11929         Don't add an uninitialized value to the list.
11931 2000-05-25  Tom Tromey  <tromey@cygnus.com>
11933         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
11934         when trying to see if field's class should be initialized.  Always
11935         initialize field's declaring class, not qualified class.
11936         For PR gcj/162.
11938         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
11939         `wfl_operator', to maybe_build_primttype_type_ref.
11940         Fixes PR gcj/235.
11942 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
11944         * parse.y (patch_method_invocation): Don't try to lookup methods
11945         in primitive types.
11947 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11949         * parse.y (resolve_field_access): Call the appropriate <clinit>
11950         before accessing the length of a static array. Craft a decl for
11951         the field while its time. Fixes PR gcj/129.
11953 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11955         * parse.y (resolve_package): Correctly set `*next' (was off by
11956         one.)
11957         (resolve_qualified_expression_name): Fixed comment.
11959 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11961         * jcf-parse.c (jcf_parse_source): Reset current_class and
11962         current_function_decl to NULL before parsing a new file.
11964 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11966         * parse.y (block_end:): If the collected block doesn't feature a
11967         statement, insert an empty statement.
11969 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11971         * parse.y (maybe_yank_clinit): New function.
11972         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
11973         end of the list of methods belonging to a class.
11974         (java_complete_expand_method): Check whether <clinit> is really
11975         necessary and expand it accordingly.
11977 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11979         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
11980         processed by the method's switch statement.
11982 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11984         * java-tree.h: Added init state enum.
11985         * decl.c (emit_init_test_initialization): Initialize class
11986         initialization check variable by looking at class' state.
11988 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11990         * java-tree.h (build_instanceof): Declare.
11991         (build_get_class): Declare.
11992         * parse.y (patch_binop): Use build_instanceof.
11993         * expr.c (build_instanceof): New function.  If class is final,
11994         don't make a function call.
11995         (expand_java_INSTANCEOF): Use it.
11996         (build_get_class): New function.
11998 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
12000         * jcf-write.c (generate_classfile): Scan the source_file for
12001         slashes with the right pointer variable.
12003 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
12005         * lang.c (lang_decode_option): Update -Wunused flags by calling
12006         set_Wunused.
12007         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12009 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12011         * check_init.c (check_init): Constify local char *.
12012         * class.c (push_class): Constify local char *.
12013         * java_tree.h: Update prototypes.
12014         * jcf-io.c (open_class): Constify filename parameter and
12015         return value.
12016         (find_class): Remove redundant string copy.  Cast return from
12017         open_class.
12018         * jcf-parse.c (read_class, parse_class_file, yyparse):
12019         Constify local char *.
12020         * jcf-write.c (generate_bytecode_insns, generate_classfile):
12021         Constify local char *.
12022         * jcf.h (JCF): Constify filename and classname.
12023         (JCF_FINISH): Cast args to FREE to char * when appropriate.
12024         * lang.c (init_parse): Constify parameter and return value.
12025         * lex.c (java_get_line_col): Constify filename parameter.
12026         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
12027         * parse.y (java_parser_context_suspend,
12028         issue_warning_error_from_context, safe_layout_class): Constify
12029         local char *.
12030         * parse.c: Regenerate.
12032 2000-05-08  Tom Tromey  <tromey@cygnus.com>
12034         * expr.c (build_jni_stub): Cache the result of
12035         _Jv_LookupJNIMethod.
12037 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12039         * decl.c (predef_filenames_size): Now 7.
12040         (predef_filenames): New seventh entry.
12042 2000-05-04  Tom Tromey  <tromey@cygnus.com>
12044         * boehm.c (mark_reference_fields): Don't mark RawData fields.
12045         Keep track of when we've seen a reference field after a
12046         non-reference field.
12047         (get_boehm_type_descriptor): Handle case where we see
12048         non-reference fields but no trailing reference field.
12049         * decl.c (rawdata_ptr_type_node): Define.
12050         (init_decl_processing): Initialize rawdata_ptr_type_node.
12051         * java-tree.h (rawdata_ptr_type_node): Declare.
12053 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12055         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12056         specifiers in calls to fprintf.
12058 2000-05-03  Andrew Haley  <aph@cygnus.com>
12060         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12062         * javaop.h (WORD_TO_INT): New function.
12063         (IMMEDIATE_s4): Use WORD_TO_INT.
12064         * jcf.h (JPOOL_INT): Ditto.
12066         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12067         separator.
12069 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12071         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12072         on native function.
12073         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12074         JNI methods.
12075         * expr.c (build_jni_stub): New function.
12076         * lang-specs.h: -fjni and -femit-class-file are incompatible.
12077         * parse.c: Rebuilt.
12078         * parse.y (java_complete_expand_methods): Expand a native method
12079         and call build_jni_stub if -fjni given.
12080         * lang-options.h: Document -fjni.
12081         * lang.c (flag_jni): New global.
12082         (lang_f_options): Added `jni' entry.
12083         * java-tree.h (soft_lookupjnimethod_node,
12084         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12085         Declare.
12086         (flag_jni): Declare.
12087         (build_jni_stub): Declare.
12088         (struct lang_decl): Added `native' flag.
12089         (METHOD_NATIVE): Redefined to use `native' field of lang specific
12090         structure.
12091         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12092         soft_jnipopsystemframe_node): New globals.
12093         (init_decl_processing): Set them.  _Jv_InitClass only takes one
12094         argument.
12096         * java-tree.def: Put into `C' mode.
12098 2000-04-27  Tom Tromey  <tromey@cygnus.com>
12100         Fix for PR gcj/2:
12101         * expr.c (expand_invoke): Generate check to see if object pointer
12102         is null in nonvirtual invocation case.
12103         * java-tree.h (soft_nullpointer_node): Declare.
12104         * decl.c (soft_nullpointer_node): New global.
12105         (init_decl_processing): Initialize soft_nullpointer_node.
12106         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12107         or `private' methods.
12108         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12110 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12112         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12113         from <clinit>
12115 2000-04-26  Tom Tromey  <tromey@cygnus.com>
12117         * zextract.c (find_zip_file_start): New function.
12118         (read_zip_archive): Use it.
12120 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12122         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12124 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12126         * class.c (common_enclosing_context_p): New function.
12127         * java-tree.h (common_enclosing_context_p): Added prototype.
12128         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12129         classes sharing an outer context with the current instance.
12130         * parse.y (build_access_to_thisn): Fixed leading comment.
12131         (verify_constructor_super): New local `supper_inner'. Skip
12132         enclosing context argument in the case of inner class constructors.
12133         (patch_method_invocation): Insert proper context as second
12134         parameter to pure inner class constructor super invocations.
12136 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12138         * parse.y (end_class_declaration): Reset the interface number
12139         counter.
12141 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12143         * parse.y (source_start_java_method): Deleted unnecessary code.
12144         (patch_method_invocation): Fixed comment.
12146 2000-04-24  Robert Lipe <robertlipe@usa.net>
12148         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12150 2000-04-23  Tom Tromey  <tromey@cygnus.com>
12152         * boehm.c (mark_reference_fields): Use int_byte_position.
12154 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12156         * boehm.c (mark_reference_fields): Only call byte_position on
12157         non-static fields.
12159 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12161         * boehm.c (mark_reference_fields): Added `last_view_index'
12162         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
12164 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
12166         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12167         * parse.y (check_class_interface_creation): Fixed comments. Select
12168         permitted modifiers for (inner) interfaces. Changed error message
12169         to report rejected modifiers used with local classes.
12171 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12173         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12174         of directly inherited type considered in scope.
12175         * parse.y (do_resolve_class): Search inherited classes for inner
12176         classes.
12178 2000-04-20  Tom Tromey  <tromey@cygnus.com>
12180         * parse.y (not_accessible_p): Use member's class, not current
12181         class, when doing inheritance check for protected reference.
12182         Fixes PR gcj/124.
12184 2000-04-20  Jason Schroeder  <shrode@subnature.com>
12186         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12188 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12190         * parse.y (lookup_field_wrapper): Search for final local aliases.
12191         (resolve_expression_name): Let lookup_field_wrapper search for
12192         final local aliases. Force the value of `name' if one is found.
12193         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12194         an expression name. Fixed comments.
12196 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12198         * parse.y (yyerror): `msg' can be null, don't use it in that case.
12200 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12202         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12204 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12206         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12208 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12210         PR gcj/211:
12211         * gjavah.c (utf8_cmp): Changed return value.
12212         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12213         result.
12214         (cxx_keywords): New global.
12215         (get_field_name): Handle new result of cxx_keyword_subst.
12216         (print_method_info): Likewise.
12218 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12220         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12221         with a newline, for CNI.
12222         (print_stub_or_jni): Print a space or newline before method name for
12223         CNI as well as JNI.
12224         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12225         (process_file): Include gcj/cni.h if generating CNI stubs.
12227 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12229         * gjavah.c (decompile_method): Use print_field_name.
12230         Fixes PR gcj/205.
12232 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12234         * parse.y (java_expand_classes): Reverse the package list once.
12235         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12236         reduction.
12237         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12238         the `==' and `!=' operators.
12240 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12242         * jcf-write.c (generate_bytecode_insns): At invocation time,
12243         always relate an interface method to the type of its selector.
12245 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12247         Fix for PR gcj/2:
12248         * expr.c (expand_invoke): Generate check to see if object pointer
12249         is null in nonvirtual invocation case.
12250         * java-tree.h (soft_nullpointer_node): Declare.
12251         * decl.c (soft_nullpointer_node): New global.
12252         (init_decl_processing): Initialize soft_nullpointer_node.
12253         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12254         or `private' methods.
12255         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12257 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12259         Fix for PR gcj/140:
12260         * parse.y (check_final_assignment): Recognize assignments to the
12261         `length' field of an array when generating class files.
12263 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12265         * class.c (decl_hash): Prototype removed.
12266         (decl_compare): Likewise.
12268 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12270         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12271         * parse.y (check_modifiers_consistency): Check for final/volatile
12272         clash.  Fixes PR gcj/164.
12274 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12276         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12277         made global.
12278         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12279         global.
12280         (add_method_1): Use `java_hash_hash_tree_node' and
12281         `java_hash_compare_tree_node'.
12282         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12283         (java_hash_compare_tree_node): Likewise.
12284         * parse.y (find_applicable_accessible_methods_list): Create,
12285         delete and use a hash table to remember already searched interfaces.
12287 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12289         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12290         with latest entry.
12292 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12294         * boehm.c (mark_reference_fields, set_bit): Prototype.
12295         (set_bit): Un-ANSI-fy definition.
12297         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12298         Prototype.
12300         * decl.c (emit_init_test_initialization): Likewise.
12302         * gjavah.c (jni_print_char): Likewise.
12304         * parse.y (create_new_parser_context): Likewise.
12306 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12308         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12309         patch missing hunk. Fixed indentation.
12311 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12313         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12314         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12316 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12318         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12319         when negative *before* using it as an array index.
12320         * ChangeLog: Fixed typo.
12322 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12324         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12325         to 0 when it reaches -1.
12327 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12329         * jcf-parse.c (get_constant): Properly cast `num' during the
12330         invocation of `add_double'.
12331         * jcf-write.c (push_long_const): Properly cast `lo' before
12332         comparing it to short bounds.
12333         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12334         `interface_body:' is reduced after the current interface is
12335         pushed.
12337 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12339         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12340         Java-specific `-f' option.
12342 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12344         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12345         Adjust order of making types.
12346         Make bitsize_*_node values.
12348 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12350         * class.c (make_field_value): Use byte_position.
12351         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12352         (java_array_data_offset): Likewise.
12353         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12354         bzero call.
12356 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12358         * parse.y (check_abstract_method_definitions): New local
12359         `end_type_reached'. Make sure we also consider `end_type'.
12360         (java_check_abstract_method_definitions): Make sure we eventually
12361         consider `java.lang.Object'.
12362         (maybe_use_access_method): Don't use access method if not in the
12363         context of a pure inner class or if the method's context is right.
12364         (find_applicable_accessible_methods_list): New static flag
12365         `object_done'. Don't search abstract classes as interfaces. Fixed
12366         indentation. Fixed the `java.lang.Object' only search. Search
12367         class interface(s) first, then fully search enclosing contexts.
12368         (find_most_specific_methods_list): Pick the closest candidate when
12369         they're all abstract.
12371 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12373         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12374         properly initialize `finished_label'. Don't emit gotos for empty
12375         try statements.
12377 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12379         * except.c (emit_handlers): Clear catch_clauses_last.
12381 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12383         * parse.y (check_method_types_complete): New function.
12384         (create_class): Reset anonymous class counter only when seeing an
12385         non inner classe.
12386         (java_complete_class): JDEP_METHOD: Don't recompute signature
12387         if incomplete.
12389 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12391         * class.c (build_static_ref): Fixed indentation in comment.
12392         * java-tree.def (TRY_EXPR): Fixed typo in name.
12393         (CLASS_LITERAL): Likewise.
12394         * java-tree.h: (TYPE_DOT_CLASS): New macro.
12395         (struct lang_type): New field `dot_class'.
12396         * jcf-write.c (generate_bytecode_insns): Fixed error message.
12397         (generate_classfile): Method `class$' is synthetic.
12398         * parse.y (build_do_class_method): New function.
12399         (build_dot_class_method_invocation): Likewise.
12400         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12401         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12402         (qualify_ambiguous_name): Likewise.
12403         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12404         (build_try_statement): Fixed leading comment.
12406 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12408         * class.c (make_field_value): Properly handle sizes.
12409         (get_dispatch_vector): Use tree_low_cst and host_integerp.
12410         (layout_class_method): Count using trees.
12411         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12412         * expr.c (java_array_data_offset): Use int_bit_position.
12413         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12414         (build_invokevirtual): Use tree_low_cst and do computations with trees.
12416 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12418         * lang.c (flag_hash_synchronization): New global.
12419         (lang_f_options): Added `hash-synchronization'.
12420         * lang-options.h: Mention -fhash-synchronization.
12421         * java-tree.h (flag_hash_synchronization): Declare.
12422         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12423         hash table synchronization is disabled.
12424         * decl.c (init_decl_processing): Only push `sync_info' value when
12425         hash table synchronization is disabled.
12426         * class.c (make_class_data): Only push `sync_info' field when hash
12427         table synchronization is disabled.  Removed dead code.
12429 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12431         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12433 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12435         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12436         classes.
12437         * parse.y (patch_method_invocation): Handle anonymous classes
12438         creation in static context.
12440 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12442         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12443         * parse.y (resolve_qualified_expression_name): Use it.
12444         (patch_method_invocation): Likewise.
12446 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12448         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12449         depending on the type of dependency which dictates what the
12450         current class is.
12451         (unresolved_type_p): Resolved types limited to the current class.
12453 2000-03-15  Tom Tromey  <tromey@cygnus.com>
12455         * decl.c (init_decl_processing): Set type of `sync_info' to be
12456         pointer to Object.
12458         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12459         Correctly compute bit number for current slot.  Zero `high' and
12460         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
12461         mark_reference_fields.
12462         (mark_reference_fields): New function.
12464 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12466         * parse.y (register_incomplete_type): Fixed initialization of
12467         JDEP_ENCLOSING.
12469 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12471         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12472         static globals.
12473         (push_class_context, pop_class_context): New function.
12474         (class_body:): Call pop_class_context.
12475         (interface_body:): Likewise.
12476         (INNER_QUALIFIER): New macro.
12477         (report_class_declaration): Changed output format and use
12478         INNER_QUALIFIER. Call push_class_context.
12480 2000-02-14  Andrew Haley  <aph@cygnus.com>
12482         * check-init.c (check_init): Add new cases for unary and binary
12483         tree nodes.
12485 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12487         * parse.y (resolve_package): Set `next' once a type name has been
12488         progressively discovered.
12489         (resolve_qualified_expression_name): Propagate resolution only if
12490         there are remaining qualifiers. Take into account `q' might have
12491         been cleared after re-qualification.
12492         * parse.y (patch_method_invocation): New local `resolved'.
12493         Section dealing with qualified expression rewritten to use
12494         resolve_field_access.
12496 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12498         * parse.h (PUSH_CPC): Fixed indentation.
12499         (DEBUG_CPC): New macro.
12500         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12501         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12502         * parse.y (class_body_declaration:): Use
12503         SET_CPC_INSTANCE_INITIALIZER_STMT.
12504         (method_declaration:): Check for null current_function_decl.
12505         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12506         (java_parser_context_pop_initialized_field): Better handling of
12507         empty lists.
12508         (maybe_make_nested_class_name): Mark nested class name as
12509         qualified when necessary.
12510         (end_class_declaration): Don't call java_parse_context_resume when
12511         one or more error occurred.
12512         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12513         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12514         SET_CPC_INITIALIZER_STMT.
12515         (method_header): Check for inner classes declaring static methods.
12516         (resolve_qualified_expression_name): Handle situation where `this'
12517         is implied.
12519 2000-03-13  Hans Boehm <boehm@acm.org>
12521         * typeck.c (build_prim_array_type): Correctly set the high word too.
12523 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12525         * parse.y (java_complete_expand_methods): Leave <clinit> out of
12526         ordinary methods.
12527         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12528         list of methods for interfaces.
12530 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12532         * parse.y (qualify_ambiguous_name): Properly handle expressions
12533         using `null'.
12535 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12537         * parse.y (check_final_assignment): Extended to process
12538         COMPOUND_EXPR.
12539         (patch_assignment): Have check_final_assignment called only once.
12541 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12543         * java-tree.h (IS_INIT_CHECKED): New flag.
12544         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
12545         * parse.y (patch_string): Call force_evaluation_order on the
12546         completed string concatenation tree.
12547         * expr.c (force_evaluation_order): Call force_evaluation_order on
12548         function's arguments too.
12550 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12552         * decl.c (emit_init_test_initialization): Mark KEY as unused.
12553         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12554         (build_anewarray): Likewise.
12555         * parse.y (patch_newarray): Likewise.
12556         * parse.c: Regenerated.
12558 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
12560         * decl.c (init_decl_processing): Added new class fields `depth',
12561         `ancestors', and `idt' to class_type_node. Use
12562         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
12563         * class.c (make_class_data): Push initial values for new fields.
12564         * java-tree.h: Updated prototype for `build_invokeinterface'.
12565         * expr.c (build_invokeinterface): Changed parameters to accept
12566         `method' tree. Calculate index of `method' in its declaring
12567         interface. Build call to _Jv_LookupInterfaceMethodIdx.
12568         (expand_invoke): Call `build_invokeinterface' with new parameters.
12569         * parse.y (patch_invoke): Call `build_invokeinterface' with new
12570         parameters.
12572 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
12574         * typeck.c (lookup_do): Search superinterfaces first
12575         when looking up an interface method. From Godmar Back
12576         <gback@cs.utah.edu>
12578 2000-03-06  Tom Tromey  <tromey@cygnus.com>
12580         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12582 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12584         * java-tree.h (lookup_argument_method2): Declared.
12585         (safe_layout_class): Prototype moved from parse.h.
12586         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
12587         * parse.y (java_check_regular_methods): Local `super_class' gone.
12588         Call lookup_argument_method2 instead of lookup_argument_method.
12589         Perform modifier match for methods found declared in implemented
12590         interfaces. Fixed indentation problem. Overriding/hiding error
12591         report to take place only for methods found in classes.
12592         * typeck.c (lookup_argument_method): Changed leading
12593         comment. Re-written by calling lookup_do.
12594         (lookup_argument_method2): New function.
12595         (lookup_java_method): Re-written by calling lookup_do.
12596         (lookup_do): New function.
12598 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12600         * check-init.c (check_init): Removed dead code. Handle (blank)
12601         final variables.
12602         * parse.y (declare_local_variables): New local `final_p', set it
12603         and use it to initialize LOCAL_FINAL.
12604         (check_final_assignment): Only check FIELD_DECLs.
12606 2000-02-17  Tom Tromey  <tromey@cygnus.com>
12608         * Makefile.in (JAVA_OBJS): Added boehm.o.
12609         (boehm.o): New target.
12610         * Make-lang.in (JAVA_SRCS): Added boehm.c.
12611         * java-tree.h (flag_use_boehm_gc): Declare.
12612         (get_boehm_type_descriptor): Declare.
12613         * lang.c (lang_f_options): Added `use-boehm-gc'.
12614         (flag_use_boehm_gc): New global.
12615         * lang-options.h: Added -fuse-boehm-gc.
12616         * boehm.c: New file.
12617         * class.c (get_dispatch_table): If class uses a Boehm type
12618         descriptor, put it in the vtable.
12619         (make_class_data): Removed dead code.
12621 2000-03-03  Per Bothner  <per@bothner.com>
12623         * decl.c (init_decl_processing):  Initialize sizetype properly.
12625 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12627         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
12628         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
12629         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12630         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
12631         (jcf_parse): New local `current'. Load innerclasses seen in outer
12632         context being processed.
12633         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12634         * jcf-write.c (append_innerclasses_attribute): New function.
12635         (append_innerclasses_attribute_entry): Likewise.
12636         (get_access_flags): Handle static classes. Set anonymous and local
12637         classes to be private.
12638         (generate_classfile): Attribute count adjusted. Call
12639         append_innerclasses_attribute.
12640         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
12641         PURE_INNER_CLASS_TYPE_P.
12642         * parse.y (parser_qualified_classname): New parameter `is_static',
12643         produce non qualified name accordingly.
12644         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
12645         (create_interface): Added argument to parser_qualified_classname.
12646         (create_class): Added argument to parser_qualified_classname. Setup
12647         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
12648         (add_inner_class_fields): Fixed indentation.
12649         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
12650         (method_declarator): Fixed typo in comment.
12651         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
12652         (build_current_thisn): Likewise.
12653         (patch_method_invocation): Likewise.
12655 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12657         * decl.c (current_function_decl): Move to toplev.c.
12659 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12661         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
12662         (DECL_BIT_INDEX): Use underlying representation.
12663         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
12665 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12667         * expr.c (build_java_ret): Pass proper type to size_binop.
12669 2000-02-25  Anthony Green  <green@cygnus.com>
12671         * expr.c (build_class_init): Mark the decl to be ignored by
12672         check_init.
12673         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
12674         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
12675         * class.c (init_test_hash_newfunc): New function.
12676         (decl_hash): New function.
12677         (decl_compare): New function.
12678         * decl.c (emit_init_test_initialization): New function.
12679         (complete_start_java_method): Traverse the init test hashtable,
12680         calling emit_init_test_initialization.
12681         (always_initialize_class_p): Define.
12682         * expr.c (build_class_init): Use initialization tests when
12683         emitting class initialization code.
12684         (always_initialize_class_p): Declare.
12685         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
12686         1.
12687         * java-tree.h: Include hash.h.
12688         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
12689         (struct lang_decl): Add init_test_table field.
12690         (init_test_hash_entry): Define.
12692 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12694         * gjavah.c (main): Avoid using `argi' to report unimplemented
12695         options.
12697 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12699         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12700         initialize locals to avoid warnings. Local `exception_type' moved
12701         into if statement.
12703 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12705         * parse.y (resolve_expression_name): Use `orig' as a second
12706         argument to resolve_field_access.
12707         (resolve_field_access): Removed unnecessary code when dealing with
12708         static fields.
12710 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12712         * class.c (push_super_field): Don't push the field twice.
12713         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
12714         * parse.h (java_reorder_fields): Prototyped.
12715         * parse.y (java_reorder_fields): New function.
12716         (java_layout_class): Simplified not to worry about re-ordering.
12718 2000-02-23  Tom Tromey  <tromey@cygnus.com>
12720         * gjavah.c (print_name): In JNI case, correctly quote string.
12721         (print_method_info): Don't handle overrides in JNI mode.
12723 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12725         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
12726         value type set to `boolean_type_node'.
12728 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12730         * jcf-dump.c (main): Test for correct condition after
12731         output file creation.
12733 2000-02-19  Anthony Green  <green@cygnus.com>
12735         * jcf-depend.c (add_entry): Fix test for first list entry.
12737 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12739         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
12740         * constants.c (build_constants_constructor): Likewise.
12742 2000-02-19  Anthony Green  <green@cygnus.com>
12744         * jcf-depend.c (add_entry): Add entries to the end of the list.
12746 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
12748         * decl.c (INT_TYPE_SIZE): Define if necessary.
12749         (expand_java_return): Handle the case of a native integer smaller
12750         than a JVM integer.
12752 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12754         * gjavah.c (help): Use GCCBUGURL.
12755         * jv-scan.c (help): Likewise.
12756         * jcf-dump.c (help): Likewise.
12758 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12760         * jcf-write.c (generate_bytecode_insns): Don't generate empty
12761         `finally' clauses.
12763 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12765         * jcf-parse.c (load_class): Call `fatal' if no file containing
12766         the target class are found.
12768 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
12770         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
12771         lex.c, lex.h, and PARSE_H to...
12772         (parse.o, parse-scan.o): ...here, respectively.
12774         * lex.c: Split out code that may trigger SIGFPE from yylex()
12775         to its own function.
12776         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
12778 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12780         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
12782 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12784         * parse.y (outer_field_access_p): Stop in time when outer contexts
12785         are exhausted.
12786         (resolve_qualified_expression_name): Properly qualify *everything*
12787         after a package.type to be resoled as expression names.
12788         (find_applicable_accessible_methods_list): Save/restore `class' to
12789         isolate it from a possible outer context search.
12791 2000-02-15  Tom Tromey  <tromey@cygnus.com>
12793         * gjavah.c (jni_print_char): New function.
12794         (print_full_cxx_name): Use it.
12795         (decode_signature_piece): Likewise.
12796         (print_cxx_classname): Likewise.
12798 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12800         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
12801         version.o.
12802         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
12804         * gjavah.c: Include version.h.
12806         * jcf-dump.c: Likewise.
12808         * jv-scan.c: Likewise.
12810 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12812         * parse.y (outer_field_access_fix): First parameter now a tree
12813         node. Check for assignment to final. First argument to
12814         build_outer_field_access_fix modified to accommodate prototype.
12815         (build_outer_field_access): Don't check for assignment to final
12816         here.
12817         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
12818         possibly returned by outer_field_access_fix. Changed
12819         outer_field_access_fix's first argument.
12820         (check_final_assignment): $finit$'s context is OK.
12821         (patch_unaryop): Use node instead of its line/column value when
12822         calling outer_field_access_fix.
12824 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12826         * parse.y (interface_declaration:): No longer tagged
12827         <node>. Re-installed default action.
12828         (class_member_declaration:): Handle inner interfaces.
12829         (interface_member_declaration): Handle inner interfaces and
12830         classes.
12831         (create_interface): Push error if one seen. Suspend parsing
12832         context when processing an inner interface.
12833         (register_fields): Inner class static field limitations not to
12834         apply to inner interfaces.
12836 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12838         * jcf-parse.c (load_class): Update `java_error_count' when a
12839         class' file can't be found.
12840         (parse.y): Avoid (byte)code generation when errors seen.
12842 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12844         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
12845         decodes a valid node.
12846         (patch_binop): Handle TRUNC_DIV_EXPR.
12848 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12850         * parse.y (resolve_package): New local `acc'. Try to progressively
12851         build and guess a package and type name.
12853 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12855         * parse.y (find_applicable_accessible_methods_list): Load and
12856         layout the search class if necessary.
12857         (java_complete_tree): Keep to original type of the folded initial
12858         value.
12860 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12862         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
12863         Generate error message if circularity is detected. New static
12864         local `list'.
12865         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
12866         * jcf-write.c (generate_bytecode_insns): Very simply handle
12867         SAVE_EXPR.
12868         * parse.y (java_check_circular_reference): Use
12869         `cyclic_inheritance_report' during report, if necessary.
12870         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
12871         walking NEW_ARRAY_INIT twice.
12873 2000-02-09  Tom Tromey  <tromey@cygnus.com>
12875         * parse.y (check_class_interface_creation): Allow inner classes to
12876         be `private' or `protected', check modifiers' consistency. Prevent
12877         block local classes from bearing any modifiers.
12879 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12881         * except.c (check_start_handlers): Re-add prototype lost in last
12882         patch.
12883         (maybe_start_try): Remove excess argument to `check_start_handlers'.
12885 2000-02-09  Andrew Haley  <aph@cygnus.com>
12887         * decl.c (clear_binding_level): Remove excess initializer.
12888         (maybe_poplevels): Remove unused variable.
12889         (force_poplevels): Ditto.
12890         (struct binding_level): Add comment.
12892 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12894         * jcf-write.c (generate_classfile): Don't consider
12895         pre-initialization with reference value (use <clinit> instead.)
12896         * parse.y (java_fix_constructors): No generated constructor for
12897         interfaces.
12898         (build_outer_field_access): Removed debug message.
12899         (outer_field_expanded_access_p): Adapted to bytecode generation.
12900         (build_outer_field_access_method): Use fix_method_argument_names.
12901         (build_outer_method_access_method): Fixed indentation. Added
12902         comment. Handle access method generation for static and also void
12903         methods.
12904         (build_access_to_thisn): Inserted debug message.
12905         (maybe_build_thisn_access_method): Use fix_method_argument_names.
12906         (resolve_qualified_expression_name): Fixed comment.
12907         (not_accessible_p): Adapted to bytecode generation. Added comment.
12908         (patch_method_invocation): Added comment.
12909         (maybe_use_access_method): Fixed leading comment. Handle static
12910         methods.
12911         (java_complete_lhs): Don't shortcut handling of initialized upon
12912         declaration String type static fields when generating bytecode.
12913         (patch_unaryop): Handle outer field access when generating
12914         bytecode.
12916 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12918         * java-tree.h (FIELD_THISN): New macro.
12919         * jcf-write.c (append_synthetic_attribute): New function.
12920         (generate_classfile): Set "Synthetic" attribute on this$<n>,
12921         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
12922         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
12923         this$<n> fields.
12924         (build_outer_field_access): Turned on access functions usage and
12925         generation when compiling to bytecode.
12926         (maybe_use_access_method): Likewise.
12928 2000-01-25  Andrew Haley  <aph@cygnus.com>
12930         * java-except.h (struct eh_range): Add `expanded' field.
12931         (maybe_start_try): Add end_pc arg.
12932         (maybe_end_try): Ditto.
12933         * java-tree.h (force_poplevels): new function.
12934         * expr.c (expand_byte_code): Don't call maybe_start_try or
12935         maybe_end_try.
12936         * except.c (add_handler): Reset expanded.
12937         (expand_start_java_handler): Set expanded.
12938         (check_start_handlers): Don't expand a start handler that's
12939         already been expanded.
12940         (maybe_start_try): Add end_pc arg.  Only expand a handler which
12941         ends after end_pc.
12942         (expand_end_java_handler): call force_poplevels.
12943         (force_poplevels): new function.
12944         * decl.c (binding_level): Add start_pc of binding level.
12945         (maybe_pushlevels): Call maybe_start_try when pushing binding
12946         levels.
12947         (maybe_poplevels): Call maybe_end_try when popping binding levels.
12948         (LARGEST_PC): Define.
12949         (clear_binding_level): Use LARGEST_PC.
12951         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
12952         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
12953         (binding_depth, is_class_level, current_pc): new variables.
12954         (struct binding_level): ditto.
12955         (indent): new function.
12956         (push_jvm_slot): add debugging info.
12957         (maybe_pushlevels): ditto.
12958         (maybe_poplevels): ditto.
12959         (pushlevel): ditto.
12960         (poplevel): ditto.
12961         (start_java_method): ditto.
12962         (give_name_to_locals): comment only.
12963         * except.c (binding_depth, is_class_level, current_pc):
12964         new variables.
12965         (expand_start_java_handler): add debugging info.
12966         (expand_end_java_handler): ditto.
12968 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12970         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
12971         (print_name_for_stub_or_jni, process_file): Constify a char*.
12973 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12975         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
12977 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12979         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
12980         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
12981         defined to be 1.
12983 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12985         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
12986         * java-tree.h (TYPE_II_STMT_LIST): New macro.
12987         (struct lang_type): New field `ii_block'.
12988         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
12989         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
12990         * parse.h (struct parser_ctxt): New field `instance_initializers'.
12991         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
12992         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
12993         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
12994         macros.
12995         * parse.y (add_instance_initializer): New function.
12996         (in_instance_initializer): New static global.
12997         (class_body_declaration:): Link instance initializer block.
12998         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
12999         (array_creation_expression:): Remove unused local.
13000         (java_parser_context_push_initialized_field): Fixed leading
13001         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13002         CPC_INSTANCE_INITIALIZER_LIST.
13003         (java_parser_context_pop_initialized_field): Likewise.
13004         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13005         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13006         CPC_INITIALIZER_STMT.
13007         (fix_constructors): New local `class_type'. Use it. Call
13008         add_instance_initializer.
13009         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13010         (patch_return): Forbid return in instance initializers.
13011         (patch_throw_statement): Enforce exception handling in the context
13012         of instance initializers.
13014 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13016         * Make-lang.in (java.mostlyclean): Remove executables in
13017         `mostlyclean'.
13019 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13021         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13022         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13023         (java_float_finite): Convert to use union Word from javaop.h.
13024         (java_double_finite): Convert to use union DWord from javaop.h.
13026 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13028         * gjavah.c (options): Added `jni' entry.
13029         (help): Document -jni.
13030         (flag_jni): New global.
13031         (process_file): Handle JNI output.  Don't print text from
13032         -prepend, -add, etc, when generating stubs.  Only remove `.class'
13033         suffix if it actually exists.
13034         (main): Create a `.c' file when run with `--jni --stubs'.  Create
13035         correct output file name with `--jni'.
13036         (print_include): Mangle header name differently in JNI case.
13037         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13038         method list.
13039         (print_method_info): Handle JNI case.  Put signature info into
13040         method name.  Handle case when STREAM is NULL.
13041         (print_name_for_stub_or_jni): New function.
13042         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
13043         (print_cxx_classname): Handle JNI.
13044         (print_full_cxx_name): Likewise.
13045         (decode_signature_piece): Likewise.
13046         (overloaded_jni_method_exists_p): New function.
13047         (struct method_name): Added `signature' and `sig_length' fields.
13048         (HANDLE_END_FIELD): Do nothing in JNI mode.
13050 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13052         * jv-scan.c: Include version.c, <getopt.h>.
13053         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13054         (options): New array.
13055         (usage): New function.
13056         (version): New function.
13057         (main): Use getopt_long to parse command line.
13058         * jcf-dump.c: Include version.c, <getopt.h>.
13059         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13060         OPT_JAVAP): New macros.
13061         (options): New array.
13062         (usage): Return `void'.  Changed message.
13063         (help): New function.
13064         (version): New function.
13065         (main): Use getopt_long_only to parse command line.
13066         * gjavah.c: Include <getopt.h>.
13067         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13068         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13069         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13070         (options): New array.
13071         (java_no_argument): Removed.
13072         (help): Updated with missing options.
13073         (main): Use getopt_long_only to parse command line.
13074         (usage): Changed message.
13076 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13078         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13079         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13080         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13081         * parse.y (array_creation_expression:): Handle anonymous arrays.
13082         (build_array_from_name): Don't set `ret_name' if null.
13083         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13084         (qualify_ambiguous_name): Likewise.
13085         (java_complete_expand_class): Likewise.
13087 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13089         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13090         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13091         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13092         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13093         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13094         AIPL_FUNCTION_COMPLETED_INVOCATION.
13095         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13096         AIPL_FUNCTION_INVOCATION_READY.
13097         (AIPL_FUNCTION_DECLARATION): New enum entry.
13098         * parse.y (reorder_static_initialized): New function.
13099         (java_parser_context_pop_initialized_field): Use it.
13100         (add_inner_class_fields): Use
13101         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13102         augmented. Install marker after last alias initializer, if any.
13103         (generate_finit): Fixed typo. Don't try to retain only the used
13104         fields.
13105         (method_header): Compute and set DECL_FUNCTION_NAP.
13106         (method_declarator): Fixed comment. Insert alias initializer in
13107         parameter list.
13108         (build_alias_initializer_parameter_list): Fixed leading
13109         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13110         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13111         (java_complete_expand_class): Code to retain only used aliases
13112         removed.
13113         (java_complete_expand_methods): New local `first_decl'. Generate
13114         $finit$ first, then expand the constructors, regular methods and
13115         <clinit>.
13116         (java_complete_expand_method): Don't report error on missing
13117         return statement if previously detected bogus.
13118         (fix_constructors): Don't patch constructor parameters list.
13119         (patch_method_invocation): Use new AIPL enum values. Reverse
13120         alias initializer list for anonymous classes.
13122 2000-01-30  Anthony Green  <green@redhat.com>
13124         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13125         determine how many stack slots to pop.
13127 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13129         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13130         error handling/recovery.
13131         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13133 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13135         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13136         FIELD_LOCAL_ALIAS_USED): New macros.
13137         (DECL_FUNCTION_NAP): New macro.
13138         (struct lang_decl): New field `nap'.
13139         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13140         (struct lang_type): New fields `finit_stmt_list' and
13141         `clinit_stmt_list'.
13142         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13143         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13144         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13145         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13146         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13147         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13148         (BUILD_THROW): Macro line separator re-indented.
13149         * parse.y (end_class_declaration): New function.
13150         (maybe_generate_pre_expand_clinit): New name for
13151         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13152         pre-expand static fields.
13153         (maybe_generate_clinit): Function deleted.
13154         (check_for_static_method_reference): Prototype's parameter list
13155         indented.
13156         (generate_finit): New name for maybe_generate_finit. Changed
13157         leading comment. Function rewritten to use
13158         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13159         (build_alias_initializer_parameter_list): New function.
13160         (java_parser_context_pop_initialized_field): Likewise.
13161         (add_inner_class_fields): Likewise.
13162         (type_declaration:): Call end_class_declaration.
13163         (class_member_declaration:): Likewise.
13164         (formal_parameter_list:): Fixed typos.
13165         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13166         element. Improved error handling.
13167         (block_statement:): Call end_class_declaration.
13168         (anonymous_class_creation:): Likewise.
13169         (create_anonymous_class): Fixed comments.
13170         (create_class): Call add_inner_class_fields.
13171         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13172         (method_header): Use MARK_FINAL_PARMS.
13173         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13174         (method_declarator): Propagate final argument flag.
13175         (craft_constructor): New local `artificial'. Call
13176         build_alias_initializer_parameter_list. Use
13177         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13178         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13179         necessary.
13180         (complete_expand_class): Get rid of unused outer context local
13181         alias fields.
13182         (java_complete_expand_methods): Fixed leading
13183         comment. Generate/pre-expand <clinit> first. Changed method
13184         expansion order to regular, $finit$, constructors, <clinit>.
13185         (java_complete_expand_method): Set current_function_decl.
13186         (fix_constructors): Fix constructor parameter list to account for
13187         outer context local alias initializers.
13188         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13189         (resolve_expression_name): Lookup outer context local aliases. New
13190         local `access', use it.
13191         (patch_method_invocation): Patch inner class ctor invocation with
13192         outer context local aliases initialization values. $finit$
13193         invocation patching now includes things generated with
13194         build_alias_initializer_parameter_list.
13195         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13196         (build_super_invocation): Likewise.
13197         (patch_assignment): Changed comment.
13199 2000-01-27  Andrew Haley  <aph@cygnus.com>
13201         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13202         (emit_if): Ditto.
13203         (emit_jsr): Ditto.
13205 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13207         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13208         concatenation.
13209         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13211         * parse.y (register_fields): Don't pass a format specifier to
13212         OBSOLETE_MODIFIER_WARNING.
13213         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13214         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13215         specifier.
13216         (check_modifiers): Change function into a macro.
13217         (check_class_interface_creation): Pass a literal format string.
13219 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13221         * buffer.h: PROTO -> PARAMS.
13222         * check-init.c: Likewise.
13223         * class.c: Likewise.
13224         * constants.c: Likewise.
13225         * convert.h: Likewise.
13226         * decl.c: Likewise.
13227         * except.c: Likewise.
13228         * expr.c: Likewise.
13229         * gjavah.c: Likewise.
13230         * java-except.h: Likewise.
13231         * java-tree.h: Likewise.
13232         * jcf-depend.c: Likewise.
13233         * jcf-dump.c: Likewise.
13234         * jcf-parse.c: Likewise.
13235         * jcf-path.c: Likewise.
13236         * jcf-reader.c: Likewise.
13237         * jcf-write.c: Likewise.
13238         * jcf.h: Likewise.
13239         * jv-scan.c: Likewise.
13240         * jvgenmain.c: Likewise.
13241         * jvspec.c: Likewise.
13242         * lang.c: Likewise.
13243         * lex.c: Likewise.
13244         * lex.h: Likewise.
13245         * parse-scan.y: Likewise.
13246         * parse.h: Likewise.
13247         * parse.y: Likewise.
13248         * typeck.c: Likewise.
13249         * verify.c: Likewise.
13250         * xref.c: Likewise.
13251         * xref.h: Likewise.
13252         * zextract.c: Likewise.
13253         * zipfile.h: Likewise.
13255 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13257         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13258         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13259         * constants.c (build_constant_data_ref): Check for cached
13260         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13261         in TYPE_CPOOL_DATE_REF.
13262         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13263         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13264         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13265         (LOCAL_FINAL): New macro.
13266         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13267         constant pool -- don't try to reuse.
13268         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13269         TYPE_LANG_SPECIFIC.
13270         (find_in_current_zip): Use TYPE_JCF.
13271         * parse.h (java_check_final): Prototype removed.
13272         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13273         (maybe_create_class_interface_decl,
13274         check_class_interface_creation): Likewise.
13275         (java_expand_finals): Function removed.
13276         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13277         (block_statement:): Fixed comment.
13278         (anonymous_class_creation:): Likewise.
13279         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13280         argument patch.
13281         (check_class_interface_creation): Loosened error report on (inner)
13282         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13283         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13284         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13285         argument patch.
13286         (create_interface): Likewise.
13287         (anonymous_class_counter): New static global.
13288         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13289         patch. Fixed comments.
13290         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13291         anonymous_class_counter when declaring a toplevel class.
13292         (craft_constructor): Fixed constructor name when handling
13293         anonymous classes. Anonymous class constructors to feature hidden
13294         this$<n> parameter.
13295         (java_fix_constructors): Added comment.
13296         (java_check_final): Function removed.
13297         (java_complete_expand_methods): Fixed comment. Don't generate
13298         class data, save its outgoing constant pool instead.
13299         (verify_constructor_super): Skip anonymous class constructor
13300         hidden this$<n> parameter.
13301         (java_expand_classes): New local `saved_ctxp'. Removed call to
13302         java_expand_finals and java_check_final. Expand anonymous class
13303         constructors. Generate class data.
13304         (build_super_invocation): Skip anonymous class hidden this$<n>
13305         parameter.
13306         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13307         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13308         (set_java_signature): Likewise.
13310 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13312         * gjavah.c: Delete ACC_VISIBILITY define.
13313         * jcf.h: Add ACC_VISIBILITY define.
13314         * parse.y: final: rule tagged <value>.
13315         (java_check_regular_methods): Use ACC_VISIBILITY define for
13316         default package access check.
13317         (local_variable_declaration_statement): Use final: rule.
13319 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13321         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13322         (final:): New rule.
13324 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13326         * gjavah.c (print_field_info): Allow non-static final fields.
13328 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13330         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13331         * parse.y (patch_anonymous_class): New function.
13332         (create_anonymous_class): Register incomplete type when the
13333         class/interface to extends/implement isn't known yet.
13334         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13335         (verify_constructor_super): Tuned error message.
13337 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13339         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13340         (ANONYMOUS_CLASS_P): New macro.
13341         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13342         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13343         * parse.y (create_class): Added leading argument.
13344         (maybe_create_class_interface_decl,
13345         check_class_interface_creation): Likewise.
13346         (craft_constructor): New function.
13347         (verify_constructor_super): Added argument in prototype.
13348         (class_declaration:): Inserted leading argument.
13349         (for_begin:): Use FOR_LOOP_P.
13350         (anonymous_class_creation): Create WFL of the anonymous class to
13351         instantiate. Call build_new_invocation. Added comments.
13352         (check_class_interface_creation): Handle parameter `anonymous' in
13353         verbose mode class creation announce.
13354         (link_nested_class_to_enclosing): Exclude anonymous classes.
13355         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13356         anonymous class, even though they appear to have an enclosing
13357         context.
13358         (create_interface): Pass extra argument to
13359         check_class_interface_creation.
13360         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13361         (create_class): Call check_class_interface_creation and
13362         maybe_create_class_interface_decl with extra new argument. Don't
13363         add private this$<n> to anonymous classes.
13364         (method_declarator): Insert hidden this$<n> to anonymous class
13365         constructors.
13366         (java_fix_constructors): Deleted code creating default
13367         constructor. Call craft_constructor instead.
13368         (java_check_regular_methods): Set `saw_constructor' to 1 for
13369         anonymous classes.
13370         (fix_constructors): Pass extra argument to verify_constructor_super.
13371         (verify_constructor_super): New local `sdecl', use it. Search for
13372         matching constructor (possibly featuring arguments) in super
13373         class.
13374         (lookup_method_invoke): Craft constructor according to arguments
13375         list when dealing with anonymous class constructors.
13376         (build_super_invocation): Pass arguments to anonymous class super
13377         constructors.
13378         (search_loop): Use FOR_LOOP_P.
13379         (labeled_block_contains_loop_p): Likewise.
13381 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13383         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13384         (enclosing_context_p): New function.
13385         (get_access_flags_from_decl): Handle CLASS_STATIC.
13386         (maybe_layout_super_class): Extra first argument passed to
13387         do_resolve_class.
13388         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13389         ID_INIT_P.
13390         * decl.c (access0_identifier_node): New global.
13391         (init_decl_processing): access0_identifier_node initialized.
13392         (pushdecl): Set DECL_CONTEXT only on non type decls.
13393         * expr.c (lookup_field): Lookup inner class fields in enclosing
13394         contexts.
13395         (expand_invoke): Use ID_INIT_P.
13396         (expand_java_field_op): Use DECL_CLINIT_P.
13397         * java-tree.def (CLASS_LITERAL): New tree code.
13398         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13399         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13400         (struct lang_decl): New field `inner_access'.
13401         (enclosing_context_p): Prototyped.
13402         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13403         ID_CLINIT_P): New macros.
13404         (CLASS_STATIC): New macro.
13405         (CLASS_ACCESS0_GENERATED_P): New macro.
13406         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13407         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13408         INNER_CLASS_P): New macros.
13409         (DECL_INNER_CLASS_LIST): New macro.
13410         * jcf-parse.c (yyparse): Avoid the use of ANSI string
13411         concatenation.
13412         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13413         the shift value to int. Fixed typo in comment.
13414         * lex.c (inst_id, wpv_id): Initialize.
13415         * mangle.c (unicode_mangling_length): Take `$' into account.
13416         * parse.h (DRECOVER, RECOVER): Terminate properly.
13417         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13418         (typedef struct _jdep): New field `enclosing'.
13419         (JDEP_ENCLOSING): New macro.
13420         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13421         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13422         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13423         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13424         GET_ENCLOSING_CPC_CONTEXT): New macros.
13425         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13426         (do_resolve_class): Added extra argument in prototype.
13427         * parse.y (resolve_class): Added extra argument in prototype.
13428         (maybe_create_class_interface_decl): Likewise.
13429         (maybe_use_access_method, build_wfl_wrap): New functions.
13430         (java_complete_expand_classes, java_complete_expand_class):
13431         Likewise.
13432         (java_parser_context_push_initialized_field,
13433         java_parser_context_suspend, java_parser_context_resume):
13434         Likewise.
13435         (maybe_make_nested_class_name, make_nested_class_name,
13436         set_nested_class_simple_name_value,
13437         link_nested_class_to_enclosing, find_as_inner_class,
13438         find_as_inner_class_do, check_inner_class_redefinition,
13439         build_thisn_assign, build_current_thisn, build_access_to_thisn,
13440         maybe_build_thisn_access_method, build_outer_field_access,
13441         build_outer_field_access_methods, build_outer_field_access_expr,
13442         build_outer_method_access_method, build_new_access_id,
13443         build_outer_field_access_method, outer_field_access_p,
13444         outer_field_expanded_access_p, outer_field_access_fix,
13445         build_incomplete_class_ref, patch_incomplete_class_ref,
13446         create_anonymous_class): Likewise.
13447         (inst_id, wpv_id): New static global variables.
13448         (synchronized:): New rule, tagged <node>.
13449         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13450         rules.
13451         (anonymous_class_creation:): New rule, tagged <node>.
13452         (NEW_TK): Tagged <node>.
13453         (type_literals, array_type_literal): New rules, tagged <node>.
13454         (class_declaration:): Removed action when reducing by class_body:
13455         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13456         using GET_CPC in sub-rules.
13457         (class_member_declaration): Handle inner classes.
13458         (method_declaration): When reducing method_header:, reset
13459         current_function_decl when appropriate.
13460         (method_declarator:): Set the number of formal parameter to 0 for
13461         method declared without arguments.
13462         (constructor_declarator:): Likewise.
13463         (static_initializer:): List of elements kept in a list.
13464         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13465         use of the keyword `static' for type declarations.
13466         (block_statement:): Handle inner class declarations.
13467         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13468         type qualified `this'.
13469         (class_instance_creation_expression): Use anonymous_class_creation:
13470         to handle inner class instances creation. Handle qualified `new'.
13471         (something_dot_new): Added appropriate actions.
13472         (create_new_parser_context): New function.
13473         (java_push_parser_context, java_parser_context_save_global,
13474         java_parser_context_suspend): Use create_new_parser_context.
13475         (check_modifiers): Changed leading comment.
13476         (check_class_interface_creation): Handle interclasses.
13477         (add_superinterfaces): Fixed comment.
13478         (create_interface): Build qualified name from the raw_name instead
13479         of its matching WFL. Push the initialized fields list. raw_name added
13480         as an extra argument to maybe_create_class_interface_decl.
13481         (create_class): Build qualified name from the raw_name instead of
13482         its matching WFL. Removed assignment to current_parsed_class_un.
13483         Call PUSH_ERROR before returning an error. Suspend the current
13484         parser context when processing an inner class. Push the
13485         initialized fields list. raw_name added as an extra argument to
13486         maybe_create_class_interface_decl. Add the private this$<n>
13487         field.
13488         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13489         (register_fields): Get the class type from GET_CPC and handle
13490         previous errors.  Added code to handle the creation of static
13491         fields in inner classes. Initialized fields initialization
13492         statements kept in a list of lists.
13493         (maybe_generate_finit): Initialized fields initialization
13494         statements kept in a list of lists. Use GET_CPC.
13495         (maybe_generate_clinit): Likewise.
13496         (method_header): Use GET_CPC and GET_CPC_UN.
13497         (parser_qualified_classname): Handle inner classes.
13498         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13499         (java_fix_constructors): Hide pointer to enclosing context
13500         instance in constructor list when dealing with inner classes.
13501         (jdep_resolve_class): Call resolve_class with extra first argument
13502         JDEP_ENCLOSING.
13503         (resolve_class): Add enclosing context as a first extra argument
13504         to do_resolve_class.
13505         (do_resolve_class): Call find_as_inner_class. Handle WFLs
13506         properly.
13507         (resolve_no_layout): Extra argument added to resolve_class
13508         invocation.
13509         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13510         (java_get_real_method_name): Use GET_CPC_UN.
13511         (check_abstract_method_definitions): Use DECL_CLINIT_P.
13512         (java_check_abstract_methods): Handle static method declared in
13513         inner classes by an error.
13514         (java_check_regular_methods): Use DECL_CLINIT_P.
13515         (source_start_java_method): Also set DECL_MAX_LOCALS.
13516         (create_artificial_method): Call java_parser_context_save_global
13517         and java_parser_context_restore_global instead of saving/restoring
13518         the context by hand.
13519         (expand_start_java_method): Improved verbose mode message.
13520         (java_complete_expand_methods): Fixed leading comment. Use
13521         DECL_CLINIT_P.
13522         (fix_constructors): Added assignment to this$<n> if necessary.
13523         (java_expand_classes): Call java_complete_expand_classes instead
13524         of java_complete_expand_methods.
13525         (make_qualified_primary): Simplified.
13526         (merge_qualified_name): Optimized for missing left or right parts.
13527         (resolve_expression_name): Handle access to outer class fields from
13528         interclasses.
13529         (resolve_qualified_expression_name): New macro
13530         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13531         classes. Report error on non appropriate qualification of
13532         `new'. Handle qualified `this'.
13533         (not_accessible_p): Allow access to outer class private fields from
13534         inner classes.
13535         (patch_method_invocation): Handle method invocations through
13536         access methods and inner class constructor invocations.
13537         (find_applicable_accessible_methods_list): Search enclosing
13538         contexts of an inner class.
13539         (search_applicable_methods_list): Fixed typo.
13540         (argument_types_convertible): Handle inner class constructors'
13541         hidden outer context reference argument.
13542         (qualify_ambiguous_name): Handle qualified `this'.
13543         (java_complete_lhs): Handle use of field accessed through
13544         artificial access methods in various cases of assignments. Handle
13545         CLASS_LITERAL node.
13546         (check_final_assignment): Use DECL_CLINIT_P.
13547         (valid_ref_assignconv_cast_p): Handle the destination being an
13548         enclosing context of the source.
13549         (patch_unaryop): Handle use of field accessed through artificial
13550         access methods.
13551         (patch_return): Use DECL_CLINIT_P.
13552         (patch_throw_statement): Use DECL_CLINIT_P.
13553         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
13554         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
13555         ID_INIT_P.
13557 2000-01-16  Anthony Green  <green@cygnus.com>
13559         * parse.y (build_string_concatenation): Only use
13560         StringBuffer(String) shortcut if String arg is constant.
13562 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13564         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13565         the shift value to int. Fixed typo in comment.
13567 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
13569         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13570         * jcf-write.c: Likewise.
13571         * parse.y: Likewise.
13572         * parse.c: Regenerate.
13574 2000-01-09  Anthony Green  <green@cygnus.com>
13576         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13577         bytecodes in the correct order.
13579 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13581         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13583 2000-01-06  Anthony Green  <green@cygnus.com>
13585         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13586         before building constant array decl.
13588 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13590         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
13591         method invocation and typo in conditional expression.
13592         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
13593         the appropriate NOTE_POP.
13594         * parse.y (patch_binop): Shift value mask to feature the right
13595         type.
13597 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13599         * class.c (assume_compiled, assume_compiled_node): Add static
13600         prototype.
13601         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13603         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13605         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13607         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13608         to `__modifier' to avoid stringifying it.
13610         * parse.y (verify_constructor_circularity): Don't call a variadic
13611         function with a non-literal format string.
13612         (java_check_abstract_methods): Move unreachable code inside
13613         `continue' statement.
13614         (lookup_method_invoke): Call xstrdup, not strdup.
13616         * expr.c (expand_java_field_op): Avoid the use of ANSI string
13617         concatenation.
13619         * jcf-parse.c (yyparse): Likewise.
13621         * jv-scan.c (main): Likewise.
13623 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13625         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
13626         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13627         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
13628         concatenation.
13630         * parse.y (synchronized, variable_redefinition_error,
13631         check_class_interface_creation, create_interface, create_class,
13632         method_header, finish_method_declaration,
13633         check_modifiers_consistency, method_declarator,
13634         complete_class_report_errors, check_abstract_method_definitions,
13635         java_check_regular_methods, check_throws_clauses,
13636         java_check_abstract_methods, read_import_dir,
13637         check_pkg_class_access, declare_local_variables, fix_constructors,
13638         cut_identifier_in_qualified, resolve_expression_name,
13639         resolve_qualified_expression_name, patch_method_invocation,
13640         java_complete_lhs, patch_assignment, try_builtin_assignconv,
13641         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
13642         patch_exit_expr, patch_exit_expr, patch_switch_statement,
13643         patch_try_statement, patch_synchronized_statement,
13644         patch_throw_statement, check_thrown_exceptions,
13645         patch_conditional_expr): Likewise.
13647 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13649         * Makefile.in (LIBDEPS): Added gcc's errors.o
13650         (../jcf-dump$(exeext):): Link with gcc's errors.o
13651         (../gcjh$(exeext):): Likewise.
13652         * expr.c (expand_java_NEW): Layout the entire target type instead of
13653         laying out its methods only.
13654         (lookup_field): Layout the class after having loaded it.
13655         * java-tree.h (java_debug_context): Declared.
13656         * jcf-io.c (toplev.h): Included.
13657         (find_class): Removed assignment to jcf's outofsynch
13658         field. Force source file to be read if newer than its matching
13659         class file. Tweaked debug messages.
13660         * jcf-parse.c (jcf_out_of_synch): Deleted.
13661         (read_class): Call to jcf_out_of_synch removed.
13662         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
13663         (jcf_out_of_synch): Prototype deleted.
13664         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
13665         `deprecated' and `class_err': integer turned into bit-fields.
13666         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
13667         * parse.y (package_list): New global.
13668         (package_declaration:): Record newly parsed package name.
13669         (extra_ctxp_pushed_p): Static global deleted.
13670         (java_parser_context_save_global): Create buffer context for the
13671         purpose of saving globals, if necessary.
13672         (java_parser_context_restore_global): Pop context pushed for the
13673         purpose of saving globals, if necessary.
13674         (java_debug_context_do): New prototype and function.
13675         (java_debug_context): Likewise.
13676         (do_resolve_class): Use already parsed package names to qualify
13677         and lookup class candidate.
13678         (java_pre_expand_clinit): Removed unnecessary local variable.
13680 1999-12-17  Tom Tromey  <tromey@cygnus.com>
13682         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
13683         fixes PR gcj/119.
13684         (process_file): Use `\n\' at end of each line in string.
13686 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13688         * expr.c (expand_invoke): Layout the loaded class before
13689         attempting to use it.
13690         (expand_java_field_op): Allow final field assignments to take
13691         place in $finit$.
13692         * typeck.c (convert): Return error_mark_node if expr is null.
13694 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13696         * class.c (class_depth): Return -1 if the class doesn't load
13697         properly.
13698         * expr.c (can_widen_reference_to): Check for errors during depth
13699         computation and return 0 accordingly.
13700         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
13701         create default constructors and add an other error check.
13702         * parse.h (java_fix_constructors): Prototyped.
13703         * parse.y (java_pre_expand_clinit): Likewise.
13704         (build_super_invocation): Re-prototyped to feature one argument.
13705         (java_check_circular_reference): Directly use `current'.
13706         (java_fix_constructors): New function.
13707         (java_check_regular_methods): Don't create default constructors
13708         here, but abort if none were found.
13709         (java_complete_expand_methods): Pre-process <clinit> calling
13710         java_pre_expand_clinit.
13711         (java_pre_expand_clinit): New function.
13712         (fix_constructors): build_super_invocation invoked with the
13713         current method declaration as an argument.
13714         (build_super_invocation): Use the context of the processed method
13715         decl argument instead of current_class.
13716         * typeck.c (lookup_java_method): Take WFLs in method names into
13717         account.
13719 1999-12-14  Per Bothner  <per@bothner.com>
13721         * class.c (make_class_data): flag_keep_inline_functions to keep
13722         private methods in the method array.
13724 1999-12-15  Anthony Green  <green@cygnus.com>
13726         * check-init.c (check_init): Take into account both types of
13727         `throw's when checking for uninitialized variables.
13729 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13731         * parse.y (java_complete_lhs): Force conversion of array
13732         dimensions to int_type_node, that's what runtime's ABI expects.
13734 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13736         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
13737         operand of a WFL, until the Java front-end gets fixed with regard
13738         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
13740 1999-12-10  Andrew Haley  <aph@cygnus.com>
13742         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
13743         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
13744         expr.c (build_java_athrow): Add support for sjlj-exceptions.
13745         java-tree.h: Ditto.
13746         jcf-write.c: Ditto.
13748 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13750         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13751         before calling expand_eh_region_start and expand_start_all_catch.
13752         * except.c (expand_start_java_handler): Switch to permanent
13753         obstack before calling expand_eh_region_start.
13754         (expand_end_java_handler): Switch to permanent obstack before
13755         calling expand_start_all_catch.
13757 1999-12-5  Anthony Green  <green@cygnus.com>
13759         * decl.c (init_decl_processing): Mark throw_node as a noreturn
13760         function with side effects.
13761         (init_decl_processing): Mark all memory allocating DECLs with
13762         DECL_IS_MALLOC.
13764 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13766         * except.c (expand_end_java_handler): Call
13767         expand_resume_after_catch and end_catch_handler.
13769 1999-11-30  Anthony Green  <green@cygnus.com>
13771         * verify.c (verify_jvm_instructions): Create new return label
13772         chain if non existent (don't rely on the verified state of the jsr
13773         target.)
13775 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13777         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
13778         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
13780         * parse.y (patch_assignment): Removed bogus final class test on
13781         lhs when checking on whether to emit an ArrayStoreException runtime
13782         check.
13783         * expr.c (expand_java_arraystore): Likewise.
13785 1999-11-28 Anthony Green <green@cygnus.com>
13787         * decl.c (find_local_variable): Reuse single slot decls when
13788           appropriate.
13790 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13792         * jcf-parse.c (saw_java_source): Global variable removed.
13793         (read_class): Don't use `saw_java_source'. Added extra braces.
13794         (yyparse): Code setting `saw_java_source' removed.
13796 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
13798         * except.c (emit_handlers): Zero catch_clauses after emitting them.
13800 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13802         * verify.c (merge_type_state): Non verified subroutines being
13803         considered more than once to trigger passive type merge.
13805 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13807         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
13808         in case of error. Error message tuned.
13810 1999-11-21  Anthony Green  <green@cygnus.com>
13812         * constants.c (find_methodref_index): Unwrap method names before
13813         inserting them in the constant pool.
13815         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
13817         * class.c (assume_compiled_node): New typedef.
13818         (assume_compiled_tree): New static data.
13819         (find_assume_compiled_node): New function.
13820         (add_assume_compiled): New function.
13821         (assume_compiled): New function.
13822         * class.c (make_class_data): Use assume_compiled.
13823         (is_compiled_class): Use assume_compiled.
13825         * java-tree.h (add_assume_compiled): Declare.
13827         * lang.c (lang_decode_option): Parse new options.
13829 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13831         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
13832         int_type_node: that's what `_Jv_AllocObject' expects.
13834 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13836         * parse.y (lookup_method_invoke): Use lang_printable_name to
13837         reliably build the type name during error report. Fixes PR gcj/97.
13839 1999-11-09  Tom Tromey  <tromey@cygnus.com>
13841         * jcf-path.c: Include <sys/stat.h>.
13842         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
13843         (DIR_UP): New macro.
13845 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13847         * parse.y (source_end_java_method): Resume permanent allocation,
13848         reversing Apr 27 1998 patch.
13849         (patch_string_cst): Pop obstacks after having pushed the permanent
13850         ones.
13852 1999-11-05  Tom Tromey  <tromey@cygnus.com>
13854         * class.c (finish_class): Emit inlined methods if any native
13855         methods exist in the class.  Fixes PR gcj/85.
13857 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13859         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
13860         (qualify_ambiguous_name): Likewise.
13862 1999-11-03  Godmar Back <gback@cs.utah.edu>
13864         * typeck.c: (lookup_java_method):  search all inherited
13865         interfaces when looking up interface method.
13867 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13869         * parse.y (method_header:): Issue error message for rule `type
13870         error'.
13871         (synchronized:): Error report when not using synchronized.
13873 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13875         * parse.y (resolve_qualified_expression_name): Prevent `this' from
13876         being used before the superclass constructor has been called.
13877         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
13878         instead of `CALL_THIS_CONSTRUCTOR_P'.
13880 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
13882         * check-init.c: Fix typo in comment.
13884 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13886         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
13887         and final method.
13889 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13891         * parse.y (expression_statement:): Call function to report
13892         improper invocation of a constructor.
13893         (parse_ctor_invocation_error): New function.
13895 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
13897         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
13898         remember_end_note.
13900 1999-10-21  Tom Tromey  <tromey@cygnus.com>
13902         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
13903         in generated `main'.
13905 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13907         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
13908         (qualify_ambiguous_name): Likewise.
13910 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13912         * parse.y (java_complete_tree): fold_constant_for_init to work on
13913         permanent_obstack.
13914         (java_complete_lhs): Likewise.
13915         (array_constructor_check_entry): Complete an initializer element
13916         on permanent_obstack.
13918 1999-10-19  Tom Tromey  <tromey@cygnus.com>
13920         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
13921         From Mike Moreton <mike@pillim.demon.co.uk>.
13923 1999-10-15  Greg McGary  <gkm@gnu.org>
13925         * java-tree.h (flag_bounds_check): Remove extern decl.
13926         * lang.c (flag_bounds_check): Remove global variable.
13927         (lang_f_options): Remove "bounds-check" entry.
13928         (lang_init_options): Default flag_bounds_check to "on".
13930 1999-10-14  Tom Tromey  <tromey@cygnus.com>
13932         * jvgenmain.c (usage): New function.
13933         (main): Use it.  Also, handle `-D' options.
13934         * jvspec.c (lang_specific_driver): Recognize -D.
13935         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
13937         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
13939 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13941         * jcf-dump.c (print_constant, disassemble_method): Don't call a
13942         variadic function with a non-literal format string.
13944         * parse-scan.y (report_main_declaration): Likewise.
13946         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
13948         * parse.y (read_import_dir, patch_assignment, patch_binop,
13949         patch_array_ref): Likewise.
13951         * typeck.c (build_java_array_type): Likewise.
13953         * verify.c (verify_jvm_instructions): Likewise.
13955 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13957         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
13959 1999-10-07  Anthony Green  <green@cygnus.com>
13961         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
13962         where CHECK_PUT may fail for valid reasons.
13964         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
13965         UNSAFE_PUTN): New macros.
13967 1999-10-04  Tom Tromey  <tromey@cygnus.com>
13969         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
13970         well.  Fixes Java PR gcj/59.
13971         * parse-scan.y (yyerror): Report errors.
13973 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
13975         * decl.c (insert_block): Remove unconditional `abort'.
13977 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
13979         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
13980         FUNCTION_CODE now of type int.  All callers changed.
13981         Set the builtin's DECL_BUILT_IN_CLASS.
13983 1999-09-23  Tom Tromey  <tromey@cygnus.com>
13985         * jvspec.c (lang_specific_driver): Don't read spec file if
13986         -fsyntax-only given.
13988 1999-09-22  Tom Tromey  <tromey@cygnus.com>
13990         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
13992         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
13993         (WORDS_TO_LONG): Likewise.
13994         (WORDS_TO_DOUBLE): Likewise.
13996 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13998         * jcf-write.c (RELOCATION_VALUE_0): New macro.
13999         (RELOCATION_VALUE_1): Likewise.
14000         (emit_iinc, emit_reloc, push_constant1, push_constant2,
14001         push_in_const, push_long_const): Prototyped.
14002         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14003         (push_constant2): Likewise.
14004         (push_int_const): Cast find_constant1's integer arguments to `jword'.
14005         (find_constant_wide): Cast find_constant2's integer arguments to
14006         `jword'.
14007         (find_constant_index): Cast find_constant2's and find_constant2's
14008         integer arguments to `jword'.
14009         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14010         (emit_switch_reloc): Use RELOCATION_VALUE_0.
14011         (emit_if): Use RELOCATION_VALUE_1.
14012         (emit_goto): Likewise.
14013         (emit_jsr): Likewise.
14014         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14015         argument to push_long_const to HOST_WIDE_INT.
14017 1999-09-15  Andreas Schwab  <schwab@suse.de>
14019         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14021 1999-09-20  Nick Clifton  <nickc@cygnus.com>
14023         * lang.c (lang_decode_option): Extend comment.
14025 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14027         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14028         instead of fndecl.
14030 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14032         * gjavah.c (get_field_name, print_method_info, print_include,
14033         add_namelet): Use xmalloc, not malloc.
14035         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
14036         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14037         NULL pointer.
14039         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14041         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14043         * jcf-path.c (add_entry): Likewise.
14045         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14047         * jv-scan.c (xmalloc): Remove definition.
14049         * jvgenmain.c (xmalloc): Likewise.
14051         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14053         * lex.c (java_store_unicode): Use xrealloc, not realloc.
14055         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
14056         concat, not xmalloc/sprintf.
14057         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14058         (xstrdup): Remove definition.
14060         * parse.y (duplicate_declaration_error_p,
14061         constructor_circularity_msg, verify_constructor_circularity,
14062         check_abstract_method_definitions, java_check_regular_methods,
14063         java_check_abstract_methods, patch_method_invocation,
14064         check_for_static_method_reference, patch_assignment, patch_binop,
14065         patch_cast, array_constructor_check_entry, patch_return,
14066         patch_conditional_expr): Use xstrdup, not strdup.
14068         * zextract.c (ALLOC): Use xmalloc, not malloc.
14070 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14072         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14074         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
14075         (do_spec, lang_specific_pre_link, lang_specific_driver,
14076         input_filename, input_filename_length): Don't declare.
14077         (main_class_name, jvgenmain_spec, lang_specific_driver):
14078         Constify a char*.
14079         (lang_specific_driver): All calls to the function pointer
14080         parameter now explicitly call `fatal'.
14082 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14084         * parse.y (find_applicable_accessible_methods_list): Search
14085         abstract classes as interfaces.
14087 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14089         * class.c (finish_class): We're now outside a valid method
14090         declaration. Tell the rest of gcc so.
14092 1999-09-08  Bruce Korb  autogen@linuxbox.com
14094         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14096 1999-09-07  Tom Tromey  <tromey@cygnus.com>
14098         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14099         java-array.h.
14100         (decode_signature_piece): Don't emit "::" in JArray<>.
14101         (print_namelet): Only print trailing `;' when printing a class.
14103 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
14105         * java-tree.h: Delete declarations for all tree nodes now moved to
14106         global_trees.
14107         * decl.c: Delete their definitions.
14109 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
14111         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14112         * Makefile.in (OBJS): Add ggc-callbacks.o.
14113         (OBJDEPS): Likewise.
14115 1999-09-03  Tom Tromey  <tromey@cygnus.com>
14117         * parse.y (strip_out_static_field_access_decl): Return operand if
14118         it satisfies JDECL_P.
14120 1999-09-02  Tom Tromey  <tromey@cygnus.com>
14122         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14123         Handle nested arrays, like `[[I'.
14125 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14127         * class.c (finish_class): Remove unused parameter, all callers
14128         changed.
14130         * expr.c (build_java_athrow): Change return type to void.
14131         (java_lang_expand_expr): Make sure each case in switch returns a
14132         value.
14134         * java-tree.h (finish_class): Fix prototype to take void args.
14136         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14137         (main): Issue return from main, not exit.
14139         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14141         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14143         * jv-scan.c (main): Issue return from main, not exit.
14145         * parse.y (check_abstract_method_definitions,
14146         java_check_abstract_method_definitions): Add static prototypes.
14147         (java_complete_expand_methods): Fix call to `finish_class'.
14149         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14150         and `prevpc'.
14152 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14154         * lang.c (language_string): Constify.
14156 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14158         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14159         Remove hacks for stuff which comes from libiberty.
14161         * Make-lang.in: Likewise.
14163 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
14165         * Makefile.in (xref.o): Depend on xref.c explicitly.
14167 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14169         * java-tree.h (lang_printable_name): Constify a char*.
14171         * lang.c (lang_printable_name): Likewise.
14173 1999-08-27  Jeffrey A Law  (law@cygnus.com)
14175         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14176         comments in C code.
14178 1999-08-26  Tom Tromey  <tromey@cygnus.com>
14180         * gjavah.c (print_cxx_classname): Print "::" before qualified
14181         name.
14183 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14185         * parse.y (lookup_cl): Changed leading comment. Now does its best
14186         to set the column number.
14187         (qualify_ambiguous_name): Take WFL wrappers into account.
14189 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
14191         * verify.c (verify_jvm_instructions): Don't check instruction
14192         validity beyond end of method.
14194 1999-08-25  Tom Tromey  <tromey@cygnus.com>
14196         * jvspec.c (lang_specific_driver): Correctly handle --help again.
14198 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14200         * gjavah.c (print_name, print_base_classname, utf8_cmp,
14201         cxx_keyword_subst, generate_access, name_is_method_p,
14202         get_field_name, print_field_name, super_class_name, print_include,
14203         decode_signature_piece, print_class_decls, usage, help,
14204         java_no_argument, version, add_namelet, print_namelet): Add static
14205         prototype.
14206         (print_base_classname, utf8_cmp, cxx_keyword_subst,
14207         name_is_method_p): Constify a char*.
14208         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14209         Provide a final else clause in an if-else-if.
14210         (print_field_info): Add missing final arg in function call to
14211         `print_field_name'.
14212         (print_method_info, decompile_method, decode_signature_piece,
14213         print_c_decl, print_full_cxx_name, print_stub,
14214         print_mangled_classname, super_class_name, print_include,
14215         add_namelet, add_class_decl, print_class_decls, process_file,
14216         help): Constify a char*.
14218         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14219         push_int_const, find_constant_wide, find_constant_index,
14220         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14221         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14222         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14223         emit_if, emit_goto, emit_jsr, call_cleanups,
14224         make_class_file_name): Add static prototypes.
14225         (generate_bytecode_return, generate_bytecode_insns): Pass a
14226         NULL_PTR, not a NULL_TREE.
14228         * jv-scan.c: Include "jcf.h".
14229         (main): Declare using DEFUN macro.
14231         * jvspec.c (find_spec_file, lang_specific_pre_link,
14232         lang_specific_driver): Add prototypes.
14233         (find_spec_file): Constify a char*.
14235         * keyword.gperf (hash, java_keyword): Add prototypes.
14237         * lang.c (lang_print_error): Add static prototype.
14238         (lang_init): Prefer memcpy over bcopy to avoid casts.
14240         * lex.c (yylex): Add static prototype.
14242         * parse-scan.y: Include "lex.c" earlier.
14244         * parse.h: Remove redundant declaration for `yylex'.
14246         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14247         labeled_block_contains_loop_p): Add static prototypes.
14248         (not_accessible_p): Make static to match prototype.
14250         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14252 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14254         * parse.y (check_method_redefinition): Changed leading comment.
14255         (check_abstract_method_definitions): New function.
14256         (java_check_abstract_method_definitions): New function.
14257         (java_check_regular_methods): Call it.
14258         (verify_constructor_super): Fixed indentation.
14259         (lookup_method_invoke): Likewise.
14261 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14263         * parse.y (method_header): Return a null pointer if the current
14264         class node is null.
14265         (finish_method_declaration): Return if the current function decl
14266         is null.
14267         (source_start_java_method): Likewise.
14268         (java_method_add_stmt): Likewise.
14270 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14272         * class.c (emit_register_class): Removed unnecessary call to
14273         start_sequence.
14274         * parse.y (labeled_block_contains_loop_p): Removed unused local
14275         variable.
14277 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14279         * parse.y (java_refold): Added prototype.
14281 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14283         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14284         (java_stabilize_reference): Removed unnecessary `else'.
14285         (java_complete_lhs): Set flag to remember boolean. Call
14286         java_refold. Added comments.
14287         (java_decl_equiv): New function.
14288         (binop_compound_p): Likewise.
14289         (java_refold): Likewise.
14290         (patch_unaryop): Striped static field access assigned to decl and
14291         op. Changed promotion scheme for ++/-- operators.
14292         (search_loop): New function.
14293         (labeled_block_contains_loop_p): Likewise.
14294         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14295         comment.
14296         (patch_bc_statement): Call search_loop. Fixed comment.
14298 1999-08-14  Anthony Green  <green@cygnus.com>
14300         * expr.c (java_lang_expand_expr): Mark static array data as
14301         referenced.
14303 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14305         * jvgenmain.c (main): NUL-terminate name_obstack.
14307 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14309         * check-init.c (check_bool2_init, done_alternative): Add static
14310         prototypes.
14312         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14313         (add_method, build_utf8_ref, build_class_ref,
14314         append_gpp_mangled_type, layout_class_method): Constify a char*.
14316         * decl.c (push_promoted_type, make_binding_level): Add static
14317         prototypes.
14318         (push_promoted_type, pushdecl): Constify a char*.
14320         * except.c (find_handler_in_range, link_handler,
14321         check_start_handlers): Add static prototypes.
14323         * expr.c (process_jvm_instruction): Constify a char*.
14325         * gjavah.c (main): Constify a char*.
14327         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14328         Constify a char*.
14330         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14331         static prototypes.
14332         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14333         munge, print_ents): Constify a char*.
14335         * jcf-dump.c (disassemble_method): Constify a char*.
14336         (print_constant_pool, print_exception_table): Add static prototypes.
14337         (print_constant, print_exception_table, main, disassemble_method):
14338         Constify a char*.
14340         * jcf-io.c (find_classfile, find_class): Likewise.
14342         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14343         (set_source_filename, predefined_filename_p): Add static prototypes.
14344         (set_source_filename, get_constant, get_class_constant,
14345         find_in_current_zip): Constify a char*.
14347         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14348         static prototypes.
14349         (add_entry, add_path, jcf_path_classpath_arg,
14350         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14352         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14353         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14354         jcf_parse_one_method, jcf_parse_methods,
14355         jcf_parse_final_attributes): Add static prototypes.
14356         (get_attribute): Constify a char*.
14358         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14359         jcf_dependency_add_target, jcf_path_classpath_arg,
14360         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14362         * jv-scan.c (main): Constify a char*.
14363         (gcc_obstack_init): Add prototype arguments.
14365         * jvgenmain.c (gcc_obstack_init): Likewise.
14366         (main): Constify a char*.
14368         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14369         static prototypes.
14370         (put_decl_string, lang_print_error): Constify a char*.
14371         (lang_init): Remove redundant extern prototype.
14373         * mangle.c (emit_unicode_mangled_name): Constify a char*.
14375         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14376         Add static prototypes.
14377         (get_type_from_signature): Constify a char*.
14379         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14380         Add static prototypes.
14381         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14382         (verify_jvm_instructions): Constify a char*.
14384         * xref.c (xref_flag_value): Likewise.
14386         * xref.h (xref_flag_value): Likewise.
14388         * zextract.c (makeword, makelong): Add static prototypes.
14389         (makeword, makelong): Constify a uch*.
14391 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14393         * lang.c (java_dummy_print): Constify a char*.
14394         (lang_print_error): Likewise.
14395         (lang_init): Remove redundant prototype for `print_error_function'.
14396         (lang_init_source): Likewise.
14397         (lang_identify): Constify a char*.
14399 1999-08-09  Tom Tromey  <tromey@cygnus.com>
14401         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14402         (WORDS_TO_LONG): Likewise.
14403         (WORDS_TO_DOUBLE): Likewise.
14405 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14407         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14409         * expr.c (java_stack_pop, java_array_data_offset,
14410         build_java_throw_out_of_bounds_exception, case_identity,
14411         build_java_check_indexed_type): Add static prototypes.
14412         (linenumber_table, expand_invoke, expand_java_field_op,
14413         build_primtype_type_ref, expand_byte_code): Constify a char*.
14415         * java-tree.h (build_primtype_type_ref, linenumber_table):
14416         Constify a char*.
14417         (java_lang_expand_expr): Add prototype.
14419         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
14420         `java_lang_expand_expr'.
14422         * lex.c (java_lex_error): Constify a char*.
14423         (java_get_unicode, java_read_char, java_allocate_new_line,
14424         java_unget_unicode, java_sneak_unicode): Prototype.
14426         * parse-scan.y (current_class, package_name, method_declarator,
14427         report_class_declaration, yyerror): Constify a char*.
14429         * parse.h (java_report_errors): Prototype.
14430         (yyerror): Constify a char*.
14432         * parse.y (classitf_redefinition_error, check_modifiers,
14433         parse_jdk1_1_error, lookup_package_type,
14434         lookup_package_type_and_set_next, get_printable_method_name,
14435         purify_type_name): Constify a char*.
14436         (build_super_invocation, maybe_generate_finit,
14437         verify_constructor_super, parser_add_interface,
14438         add_superinterfaces, jdep_resolve_class, note_possible_classname,
14439         java_complete_expand_methods, java_expand_finals,
14440         cut_identifier_in_qualified, java_stabilize_reference,
14441         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14442         merge_string_cste): Prototype.
14443         (single_type_import_declaration, yyerror,
14444         variable_redefinition_error, build_array_from_name,
14445         build_unresolved_array_type, check_class_interface_creation,
14446         resolve_class, complete_class_report_errors,
14447         note_possible_classname, read_import_dir,
14448         find_in_imports_on_demand, resolve_package, fix_constructors,
14449         check_deprecation, lookup_method_invoke,
14450         maybe_build_primttype_type_ref, array_constructor_check_entry):
14451         Constify a char*.
14452         (java_complete_expand_methods, java_expand_finals): Make static.
14453         (convert_narrow): Remove static prototype.
14455 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
14457         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14459 1999-08-02  Richard Henderson  <rth@cygnus.com>
14461         * decl.c: Include defaults.h instead of expr.h.
14462         * parse.y: Likewise.
14464 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
14466         * java/decl.c (start_java_method): Change all uses of
14467         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14468         Ensure expr.h is included.
14469         * java/expr.c (pop_arguments): Ditto.
14470         * java/parse.y (expand_start_java_method): Ditto.
14472 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14474         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14476 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
14478         * decl.c: Include "function.h".
14479         * except.c: Likewise.
14480         * parse.y: Likewise.
14481         * Makefile.in: Update dependencies.
14483 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14485         * expr.c (build_java_soft_divmod): Provide a default case in switch.
14486         (java_lang_expand_expr): Mark parameters `target', `tmode' and
14487         `modifier' with ATTRIBUTE_UNUSED.
14489         * gjavah.c (process_file): Add braces around ambiguous `else'.
14491         * jcf-dump.c (print_access_flags, localvar_free): Change return
14492         type to void.
14494         * parse.y (java_complete_expand_method): Initialize variable
14495         `exception_copy'.
14496         (resolve_qualified_expression_name): Likewise for `field_decl'.
14497         (patch_method_invocation): Likewise for `class_to_search'.
14498         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14499         (patch_assignment): Likewise for `lhs_type'.
14501         * verify.c (verify_jvm_instructions): Remove unused variable
14502         `caller'.
14504 1999-07-25  Richard Henderson  <rth@cygnus.com>
14506         * decl.c (va_list_type_node): New.
14508 1999-07-25  Anthony Green  <green@cygnus.com>
14510         * gjavah.c (print_stub): New function.
14511         (METHOD_IS_NATIVE): New macro.
14512         (print_mangled_classname): Make static.
14513         (HANDLE_END_FIELD): Don't emit fields during stub generation.
14514         (process_file): Perform stub generation.
14515         (HANDLE_METHOD): Don't emit class decls during stub
14516         generation.
14517         (HANDLE_END_METHOD): Take into account stub generation.
14518         (print_method_info): Handle stub generation.
14519         (print_stub): New function.
14520         (print_cxx_classname): Make signature consistant with others.
14521         (help): Describe -stubs option.
14522         (main): Create stub file.
14523         (version): Use version.c.
14524         (print_full_cxx_name): New function.
14525         (print_c_decl): Use print_full_cxx_name.
14527 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14529         * check-init.c (check_init): Handle MAX_EXPR.
14531 1999-07-15  Andrew Haley  <aph@cygnus.com>
14533         * lang.c (flag_use_divide_subroutine): New variable.
14534         * typeck.c: (convert_ieee_real_to_integer): Bounds check
14535         fp-to-integer conversion.
14536         (convert): Call convert_ieee_real_to_integer when flag_fast_math
14537         is not set.
14539         * expr.c (build_java_soft_divmod): New function.
14540         (build_java_binop): Call build_java_soft_divmod if
14541         flag_use_divide_subroutine is set.
14542         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14543         soft_lrem_node: new builtin functions.
14544         (init_decl_processing) Initialize the new builtins.
14545         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14546         soft_lrem_node: new builtin functions.
14547         (build_java_soft_divmod): New function.
14548         * parse.y: Call build_java_soft_divmod if
14549         flag_use_divide_subroutine is set.
14550         * parse.c: Rebuilt.
14552         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
14553         a --specs= arg) even if not linking.
14554         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
14555         -fuse-divide-subroutine
14557 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14559         * parse.y (resolve_and_layout): Check methods only once.
14560         (resolve_qualified_expression_name): Verify thrown exceptions
14561         compatibility.
14562         (check_thrown_exceptions): Reject exceptions thrown in
14563         initializer. Error message tuned.
14565 1999-07-14  Andrew Haley  <aph@cygnus.com>
14567         * expr.c (expand_expr): Do not return the last statement in a
14568         block as the block's value.
14570 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14572         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14573         CALL_EXPR, to avoid order of evaluation changes.
14575 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14577         * parse.y (qualify_ambiguous_name): Do not use
14578         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14580 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14582         * check-init.c (check_init): Handle MAX_EXPR.
14583         * expr.c (force_evaluation_order): Force method call arguments to
14584         be evaluated in left-to-right order.
14585         * parse.y (qualify_ambiguous_name): Loop again to qualify
14586         NEW_ARRAY_EXPR properly.
14588 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14590         * parse.y (patch_invoke): Resolve unresolved invoked method
14591         returned type.
14592         (qualify_ambiguous_name): STRING_CST to qualify expression for
14593         type name resolution.
14595 1999-06-24  Andrew Haley  <aph@cygnus.com>
14597         * class.c (finish_class): Whenever a deferred method is
14598         output, rescan the list of methods to see if a new candidate for
14599         output can be found.
14601 1999-06-28  Tom Tromey  <tromey@cygnus.com>
14603         * jvspec.c (lang_specific_driver): Recognize --help.
14605 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14607         * parse.y (resolve_package): Fixed bogus return statement.
14608         (patch_method_invocation): Resolve method invocation beginning with
14609         a package name qualifier.
14611 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14613         * Make-lang.in (java.stage1): Depend on stage1-start.
14614         (java.stage2): Likewise for stage2-start.
14615         (java.stage3): Likewise for stage3-start.
14616         (java.stage4): Likewise for stage4-start.
14618 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14620         * parse.y (java_complete_lhs): When doing cross referencing, don't
14621         try to keep file location on a WFL expanded as a CALL_EXPR.
14623 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14625         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
14626         compiling to class file a void method with an empty method body.
14627         As a side effect, the bytecode backend will generate the
14628         appropriate `return' instruction.
14630 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14632         * parse.y (lookup_package_type_and_set_next): New function prototype.
14633         (resolve_package): Search current and imported packages.
14634         (lookup_package_type_and_set_next): New function.
14636 1999-06-22  Andrew Haley  <aph@cygnus.com>
14638         * verify.c (verify_jvm_instructions): Check for pending blocks
14639         before invalid PC test and opcode switch, not after.
14641 1999-06-21  Andrew Haley  <aph@cygnus.com>
14643         * except.c (find_handler_in_range): The upper limit for exception
14644         ranges is exclusive, not inclusive: (start <= pc < end).
14645         (link_handler): find child pointer which points to outer by
14646         searching sibling list: previous code incorrectly assumed that
14647         outer->outer->first_child must point to outer.
14648         * verify.c (verify_jvm_instructions): FIXME added to code for
14649         `athrow'.
14650         (verify_jvm_instructions): Do not assume that the last block
14651         processed in a subroutine is a block which ends with a `ret'
14652         instruction.  With some control flows it is possible that the last
14653         block ends with an `athrow'.
14655 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14657         * parse.y (qualify_ambiguous_name): Reorganized the post
14658         evaluation of non WFL leading expression nodes.
14660 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14662         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14663         CONVERT_EXPR.
14665 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14667         * parse.y (qualify_ambiguous_name): Handle qualified expression
14668         beginning with a STRING_CST.
14670 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14672         * parse.y (register_fields): Set DECL_INITIAL on both
14673         pre-initialized static and public fields.
14674         (resolve_field_access): Static field access expressions to always
14675         use pointer types.
14676         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
14677         qualification. CONVERT_EXPR to be resolved as an expression name.
14678         (java_complete_lhs): Identify and access qualified final
14679         initialized field in switch statement case expression.
14680         (fold_constant_for_init): Pre-initialized field decl constant to
14681         be folded.
14683 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14685         * parse.y (note_possible_classname): Mark returned node with
14686         QUALIFIED_P only if the original class name contained a '/'.
14688 1999-06-05  Anthony Green  <green@cygnus.com>
14690         * Make-lang.in (gcjh): More parallel build fixes.
14692 1999-06-03  Mike Stump  <mrs@wrs.com>
14694         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
14696 1999-06-02  Anthony Green  <green@cygnus.com>
14698         * except.c (link_handler): Chain exception handlers in order.
14700 1999-06-02  Anthony Green  <green@cygnus.com>
14702         * expr.c (expand_byte_code): Fill unreachable bytecode regions
14703         with nops and process as usual in order to always set correct EH
14704         ranges.  Emit detailed warnings about unreachable bytecodes.
14706 1999-06-02  Anthony Green  <green@cygnus.com>
14708         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
14709         constant.
14711 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14713         * parse.y (lookup_field_wrapper): Unified returned value to NULL
14714           or the searched field decl.
14716 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14718         * parse.y (fold_constant_for_init): Convert numerical constant
14719         values to the type of the assigned field.
14721 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14723         * expr.c (lookup_field): Relaxed the test on class loading error
14724         detection.
14725         * parse.y (fold_constant_for_init): Enabeled old code.
14727 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14729         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
14730         decide the validity of the cast of a java.lang.Cloneable reference
14731         to an array.
14732         (patch_conditional_expr): Fixed first argument passed to
14733         binary_numeric_promotion.
14735 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14737         * parse.y (qualify_ambiguous_name): Take into account that a
14738         CONVERT_EXPR might specify a type as a WFL.
14740 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14742         * parse.y (patch_assignment): Save the rhs before using it as an
14743         argument to _Jv_CheckArrayStore.
14745 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14747         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
14749 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14751         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
14752         floating point literal only when the exponent indicator has been
14753         parsed.
14755 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14757         * parse.y (formal_parameter:): Construct argument tree list
14758         element even if a yet unsupported final parameter was encountered.
14760 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14762         * parse.y (finish_method_declaration): Issue errors for native or
14763         abstract methods declared with a method body, as well as for non
14764         native or non abstract methods with no method body.
14766 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14768         * class.c (build_utf8_ref): Initialize variable `field'.
14770         * decl.c (init_decl_processing): Initialize variable `field'.
14772         * expr.c (build_known_method_ref): Mark parameters `method_type',
14773         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
14774         (process_jvm_instruction): Likewise for parameter `length'.
14776         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
14777         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
14778         ATTRIBUTE_UNUSED.
14780         * parse.y (maybe_generate_clinit): Remove unused variable
14781         `has_non_primitive_fields'.
14782         (find_in_imports_on_demand): Initialize variables `node_to_use'
14783         and `cl'.
14784         (patch_binop): Likewise for variable `prom_type'.
14785         (patch_unaryop): Likewise for variable `prom_type'.
14787         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
14789         * xref.c (xref_table): Add missing initializer.
14791 1999-05-14  Tom Tromey  <tromey@cygnus.com>
14793         * java-except.h (struct eh_range): Removed unused `next' member.
14794         * verify.c (verify_jvm_instructions): Call check_nested_ranges
14795         after adding all exception handlers.  Sort exception ranges in
14796         order of start PC.
14797         (struct pc_index): New structure.
14798         (start_pc_cmp): New function.
14799         * except.c (add_handler): Return `void'.  Don't call link_handler;
14800         instead construct an ordinary linked list and do range
14801         coalescing.
14802         (check_nested_ranges): New function.
14803         (link_handler): Changed interface to allow merging of eh_ranges.
14804         Split overlapping ranges.  Return `void'.
14806 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14808         * parse.y (constructor_block_end:): New rule, tagged <node>.
14809         (constructor_body:): Use `constructor_block_end' instead of
14810         `block_end'.
14812 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14814         * parse.y (statement_nsi:): Pop `for' statement block.
14815         (java_complete_lhs): Labeled blocks containing no statement are
14816         marked as completing normally.
14818 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14820         * xref.c (xref_set_current_fp): New function, defined.
14821         * xref.h (xref_set_current_fp): New function, prototyped.
14823 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14825         * check-init.c (check_init): Take into account that
14826         LABELED_BLOCK_STMT can be empty.
14828 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14830         * parse.y (java_check_regular_methods): Warning check on not
14831         overriding methods with default access in other packages does not
14832         apply to `<clinit>'.
14833         (java_complete_lhs): If block body is an empty_stmt_node, replace
14834         it by NULL_TREE. This prevents gcc from generating an irrelevant
14835         warning.
14837 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14839         * check-init.c (check_init): Removed code accepting to see things
14840         falling through default:, when doing xrefs.
14841         * java-tree.h (do_not_fold): New global variable, declared.
14842         * parse.y (do_not_fold): New global variable, defined.
14843         (java_complete_expand_method): Set `do_not_fold' to the value of
14844         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
14845         and reinstall them after them have been purged; do not check for
14846         initializations; do not issue missing return errors.
14847         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
14848         when doing xrefs.
14849         (patch_binop): Skip the fold part when doing xrefs.
14850         (build_string_concatenation): Skip the concatenation part when
14851         doing xrefs.
14852         (patch_synchronized_statement): Do not generate a try-finally when
14853         doing xrefs.
14854         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
14855         and keep the location where the throw was seen.
14856         * typeck.c (convert): When `do_not_fold' is set, do not attempt
14857         any treatment on the converted node an simply return a NOP_EXPR of
14858         the targeted type.
14859         * xref.c (xref_get_data): New function, defined.
14860         * xref.h (xref_get_data): New function, declared.
14861         (XREF_GET_DATA): Use xref_get_data.
14863 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14865         * gjavah.c (print_include): Cast the result of `strlen' to int
14866         when comparing against a signed value.
14867         (add_namelet): Likewise.
14869 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14871         * expr.c (expand_invoke): Mark parameter `nargs' with
14872         ATTRIBUTE_UNUSED.
14873         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
14875         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
14876         ATTRIBUTE_UNUSED.
14878         * jcf-reader.c (get_attribute): Cast a value to long
14879         when comparing against a signed expression.  Likewise.
14881         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
14882         HOST_BITS_PER_CHAR.
14884 1999-05-11  Andrew Haley  <aph@cygnus.com>
14886         * parse.y (source_end_java_method): If the current method contains
14887         any exception handlers, force asynchronous_exceptions: this is
14888         necessary because signal handlers in libjava may throw exceptions.
14889         * decl.c (end_java_method): Ditto.
14891 1999-05-11  Tom Tromey  <tromey@cygnus.com>
14893         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
14894         flags.
14895         * jvspec.c (THREAD_NAME): Removed.
14896         (GC_NAME): Likewise.
14897         (MATHLIB): Likewise.
14898         (WITHLIBC): Likewise.
14899         (GCLIB): Likewise.
14900         (THREADLIB): Likewise.
14901         (MATH_LIBRARY): Likewise.
14902         (lang_specific_driver): Don't add `-l' options to command line.
14903         Instead, add a single --specs option.  Recognize `-L' options and
14904         use them to search for spec file.
14905         (find_spec_file): New function.
14906         (SPEC_FILE): New define.
14908 1999-05-11  Dave Brolley  <brolley@cygnus.com>
14910         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
14911         cpplib-enabled build.
14913 1999-05-05  Per Bothner  <bothner@cygnus.com>
14915         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
14916         temporarily zero it while calling rest_of_decl_compilation.
14918         * java-tree.h (string_ptr_type_node):  Add declaration.
14919         * decl.c:  Define and initialize string_ptr_type_node.
14920         * parse.y (patch_string_cst):  Use string_ptr_type_node.
14922         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
14923         * parse.y (for_statement):  Now unconditionally exit_block.
14924         (finish_labeled_statement):  No longer exit_block if for-loop.
14925         (patch_loop_statement):  Check harder if the loop is already labeled.
14927         * parse.y (patch_initialized_static_field):  Removed function.
14928         (maybe_generate_clinit):  Removed special handling for interfaces.
14929         (java_complete_expand_methods):  Do a preliminary java_complete_tree
14930         on <clinit> to determine if it can be removed.
14931         (java_complete_expand_method):  Remove special handling for <clinit>.
14932         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
14933         optimize if we get back empty_stmt_node.
14934         For MODIFY_EXPR, re-do checking of static initializers.
14935         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
14936         For VAR_DECL, pass correct context.
14938         * verify.c (verify_jvm_instructions):  Better error messages.
14940 1999-05-03  Tom Tromey  <tromey@cygnus.com>
14942         * parse-scan.y (interface_declaration): Call
14943         report_class_declaration for interfaces.
14945 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
14947         * Makefile.in: Remove -v from bison command lines.
14949 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14951         * check-init.c (check_init): Exclude a case of error when doing
14952         xrefs.
14953         * class.c (layout_class_method): Don't generate the error message
14954         twice when compiling from source.
14955         * lang-options.h: Added `-Wredundant-modifers' and
14956         `-Wunusupported-jdk11' flags and help text.
14957         * lang.c (lang_decode_option): Added support for
14958         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
14959         flag_static_local_jdk11 and flag_redundant set accordingly.
14960         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
14961         * parse.h (EXPR_WFL_ADD_COL): New macro.
14962         (DECL_END_SOURCE_LINE): Likewise.
14963         (DECL_INHERITED_SOURCE_LINE): Likewise.
14964         * parse.y (static_ref_err): New function, prototyped.
14965         (CCB_TK): Now tagged <operator>.
14966         (class_body:): Remember the location of the closing '}' of a class
14967         definition when doing xrefs.
14968         (block:): Likewise.
14969         (block_end:): Likewise.
14970         (create_class): Remember the location of the inherited class
14971         identifier when doing xrefs.
14972         (register_fields): Added test on first operand of `init' before
14973         testing it TREE_CODE.
14974         (method_header): Store the location of the class identifier in the
14975         class decl when doing xrefs.
14976         (finish_method_declaration): Don't combine first/last method line
14977         when doing xref.
14978         (java_check_regular_methods): Warning check on not overriding
14979         methods with default access on other packages move before check on
14980         static methods. Initialization of `aflags' also moved up.
14981         (resolve_expression_name): Call static_ref_err to report the error.
14982         (static_ref_err): New function, implemented.
14983         (resolve_field_access): Returned simplified static field access
14984         when doing xrefs.
14985         (resolve_qualified_expression_name): Check for illegal use of
14986         static fields in a non static context. Call static_ref_err to
14987         report error in various places.
14988         (java_complete_tree): Do not fold initialized static fields when
14989         doing xrefs.
14990         (java_complete_lhs): Likewise.
14992 1999-04-29  Anthony Green  <green@cygnus.com>
14994         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
14995         create internal labels.
14996         (lookup_label): Ditto.
14998 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15000         * class.c (layout_class_method): Generate <clinit>'s rtl for
15001         interfaces.
15002         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15003         for interfaces' <clinit>.
15004         * expr.c (lookup_field): Search for fields in interfaces.
15005         (expand_invoke): Fixed indentation.
15006         (expand_java_field_op): Likewise. Use IS_CLINIT.
15007         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15008         (IS_CLINIT): New macro.
15009         * parse.y (type_declaration:): Call maybe_generate_clinit after an
15010         interface was parsed.
15011         (maybe_generate_clinit): Don't generate if the current class is an
15012         interface with only fields of primitive types.
15013         (reset_method_name): Use IS_CLINIT.
15014         (java_complete_expand_method): Expand <clinit> when it exists for
15015         interfaces. Use IS_CLINIT.
15016         (resolve_expression_name): Use DECL_CONTEXT instead of
15017         current_class to build static field references.
15018         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15019         ARRAY_REF when doing xreferencing.
15020         (check_final_assignment): Fixed typo in leading comment. Use
15021         IS_CLINIT.
15022         (patch_array_ref): Don't fully expand array references when
15023         xreferencing.
15024         (patch_return): Use IS_CLINIT.
15025         (patch_throw_statement): Likewise.
15027 1999-04-22  Tom Tromey  <tromey@cygnus.com>
15029         * Make-lang.in (JAVA_SRCS): Added check-init.c.
15031 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15033         * decl.c (predef_filenames, predef_filenames_size): New globals
15034         (init_decl_processing): predef_filenames and predef_filenames_size
15035         initialized.
15036         * java-tree.h (predef_filenames, predef_filenames_size): Declared
15037         extern.
15038         * jcf-parse.c (predefined_filename_p): New function.
15039         (yyparse): Check that files on the command line are specified only
15040         once and issue a warning otherwise.
15041         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15042         * parse.y (source_end_java_method): Nullify NOP method bodies, to
15043         avoid a gcc warning with -W -Wall turned on.
15044         (java_expand_classes): Abort if errors were encountered.
15045         (java_complete_lhs): If the cross reference flag is set, wrap
15046         field DECL node around a WFL when resolving expression name.
15048 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15050         * lang.c (lang_decode_option): Fixed returned value when parsing
15051         `-fxref=...' and `-Wall'.
15052         * parse.y (source_end_java_method): Do not generate code when
15053         flag_emit_xref is set.
15054         (resolve_expression_name): Do not build static field access when
15055         flag_emit_xref is set.
15056         (resolve_field_access): No special treatment on `length' when
15057         flag_emit_xref is set. Do not build qualified static field access
15058         when flag_emit_xref is set.
15059         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15060         when flag_emit_xref is set.
15061         (patch_assignment): Do not generate array store runtime check when
15062         flag_emit_xref is set.
15063         * xref.c (xref_flag_value): Fixed function declaration
15064         indentation.
15065         (xset_set_data): New function.
15066         * xref.h (xref_set_data): Added prototype for new function.
15067         (typedef struct xref_flag_table): New field data.
15068         (XREF_GET_DATA): New macro.
15070 1999-04-19  Tom Tromey  <tromey@cygnus.com>
15072         * xref.h (enum): Removed trailing comma.
15074         * parse.y (resolve_qualified_expression_name): Added missing
15075         `break'.
15077 1999-04-15  Anthony Green  <green@cygnus.com>
15079         * gjavah.c: New prototypes for java_float_finite and
15080         java_double_finite.
15082 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15084         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15085         references.
15087 1999-04-06  Jeffrey A Law  (law@cygnus.com)
15089         * Makefile.in (TREE_H): Add tree-check.h.
15090         (RTL_H): Add genrtl.h.
15092 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15094         * parse.y (patch_assignment): Added ArrayStoreException runtime
15095         check.
15097 1999-04-06  Per Bothner  <bothner@cygnus.com>
15099         * expr.c (pop_type_0):  New function.
15100         (pop_type):  Use pop_type_0.
15101         * java-tree.h (pop_type_0):  New declaration.
15102         * verify.c (verify_jvm_instructions):  Check return instructions.
15104         * parse.y (patch_binop):  Don't fold if non-constant and emiting
15105         class files.
15107 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15109         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15111         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
15112         (main_jcf): Don't define.
15113         (process_file): Don't set `main_jcf'.
15115         * java-tree.h (main_jcf): Don't declare.
15117         * jcf-parse.c (main_jcf): Add static definition.
15119         * lang.c (main_jcf): Don't define.
15121 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15123         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15125         * decl.c (copy_lang_decl): Likewise for `bcopy'.
15127         * jcf-depend.c: Include "config.h", not <config.h>.
15129         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15130         `bcopy' to PTR.
15132         * jcf-path.c: Include "config.h", not <config.h>.
15134         * lex.c: Don't include various system header files.
15135         (java_init_lex): Cast the argument of `bzero' to PTR
15137         * parse-scan.y (java_push_parser_context): Likewise.
15139         * parse.y (java_push_parser_context): Likewise.
15140         (patch_bc_statement): Match format specifier to variable argument.
15142         * xref.c: Don't include <stdio.h>.
15144 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15146         * parse.y (struct parser_ctxt *ctxp): Now global.
15147         (declare_local_variables): Use WFL compound value for the
15148         declaration source line value, when doing cross-referencing.
15150 1999-03-31  Tom Tromey  <tromey@cygnus.com>
15152         * gjavah.c (print_field_info): Allow constants of other types.
15153         (print_include): Generate include when new name is proper prefix
15154         of already printed name.
15155         (add_namelet): Likewise.
15156         (cxx_keyword_subst): New function.
15157         (print_method_info): Use it.
15158         (print_field_name): New function.
15159         (get_field_name): New function.
15160         (print_field_info): Use get_field_name and print_field_name.
15162 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15164         * Makefile.in (keyword.h): Generate using gperf language 'C', not
15165         'KR-C', so gperf uses the `const' keyword on strings.
15167         * keyword.gperf (java_keyword): Const-ify a char*.
15169 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15171         * parse.y (patch_bc_statement): Fixed identation and a bogus
15172         `printf' format.
15174 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15176         * parse.y (patch_assignment): Allow static variables in other
15177         classes to be assigned.
15179 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15181         * class.c (maybe_add_interface): Remove unused variable
15182         `interface_binfo'.
15183         (make_class_data): Use = for assignment, not ==.  Likewise.
15184         (emit_register_classes): Remove unused variable `decl'.
15186         * lex.c: Fix comment so as not to contain an embedded `/*'.
15188         * verify.c (verify_jvm_instructions): Remove unused variable
15189         `self_type'.
15191 1999-03-27  Per Bothner  <bothner@cygnus.com>
15193         * parse.y (complete_loop_body):  Rename to finish_loop_body.
15194         (complete_labeled_statement):  Rename to finish_labeled_statement.
15195         (complete_for_loop):  Rename to finish_for_loop.
15196         (complete_method_declaration):  Rename to finish_method_declaration.
15198         * java-tree.h (continue_identifier_node):  New global node.
15199         * decl.c:  Define and initialize continue_identifier_node.
15200         * parse.y (generate_labeled_block):  Remove - no longer needed.
15201         (build_loop_body):  Use continue_identifier_node for continue block.
15202         (finish_labeled_statement):  Also do pop_labeled_block actions.
15203         (java_complete_lhs):  POP_LOOP even if error.
15204         (build_labeled_block):  Special handling for continue_identifier_node.
15205         (patch_loop_statement):  Re-organize.
15206         (patch_bc_statement):  Re-write.
15208 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15210         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15211         using a WFL compound value.
15212         * parse.y (xref.h): Include.
15213         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15214         WFL compound value.
15215         (register_fields): Set WFL compound value to lineno if doing
15216         xrefs.
15217         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15218         is set.
15219         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15220         * xref.h (expand_xref): Prototype renamed from xref_generate.
15222 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15224         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15225         (GET_CURRENT_BLOCK): New macro.
15226         * parse.y (current_static_block): New global variable.
15227         (method_body:): Define action.
15228         (complete_method_declaration): Set current_function_decl to NULL
15229         when work on the current method is done.
15230         (declare_local_variables): Use GET_CURRENT_BLOCK.
15231         (java_method_add_stmt): Likewise.
15232         (java_complete_expand_method): Disable the use of `this' when
15233         expanding <clinit>.
15234         (enter_a_block): If no current method exist, use
15235         current_static_block to link static initializer blocks.
15236         (exit_block): Rewritten to use current_static_block when no current
15237         method decl exists.
15238         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15239         (patch_return): Forbid the use of `return' in static initializers.
15240         (patch_throw_statement): Fixed indentation. Issue specific error
15241         for uncaught thrown checked exception in static initializer
15242         blocks. Removed FIXME.
15244 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15246         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15247         Link gcj from gcc.o.
15249 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15251         * parse.y (find_applicable_accessible_methods_list): When dealing
15252         with interface: ensure that a given interface or java.lang.Object
15253         are searched only once.
15255 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15257         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15259         * jcf-dump.c (print_access_flags): Add braces around if-else.
15261         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15262         COMBINE_INPUTS.
15264         * lex.c (build_wfl_node): Add static prototype.
15266         * lex.h (build_wfl_node): Remove static prototype.
15268         * parse.y: Include lex.c early enough to declare everything needed.
15269         Ensure calls to `build_wfl_node' pass the proper arguments.
15270         (create_class): Remove unused variable `super_decl'.
15271         (get_printable_method_name): Initialize variable `name'.
15273 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15275         * Changelog: Fixed 1999-03-22 typos.
15276         * lang.c (lang_decode_option): Fixed typo in error string in the
15277         XARG section.
15279 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15281         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15282         (xref.o): New rule.
15283         * java-tree.h (flag_emit_xref): Declared extern.
15284         * lang.c (xref.h): Included.
15285         (flag_emit_xref): New global variable.
15286         (lang_decode_option): Added support for -fxref.
15287         * xref.c: Created.
15288         * xref.h: Likewise.
15290 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15292         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15293         linked with.
15295 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15297         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15298         $(srcdir)/../system.h and $(JAVA_TREE_H).
15299         (jcf-io.o): Depend on $(JAVA_TREE_H).
15300         (mangle.o): Likewise.
15302         * check-init.c (check_cond_init): Add static prototype.
15304         * class.c (build_java_method_type, hashUtf8String,
15305         make_field_value, get_dispatch_vector, get_dispatch_table,
15306         append_gpp_mangled_type, mangle_static_field): Likewise.
15307         (strLengthUtf8): Hide unused definition.
15308         (hashUtf8String): Const-ify.
15309         (make_field_value): Un-ANSI-fy.
15311         * constants.c: Move inclusion of jcf.h above java-tree.h.
15312         (set_constant_entry, find_class_or_string_constant,
15313         find_name_and_type_constant, get_tag_node,
15314         build_constant_data_ref): Add static prototype.
15316         * decl.c (push_jvm_slot, builtin_function,
15317         lookup_name_current_level): Likewise.
15318         (builtin_function): Const-ify.
15320         * except.c (expand_start_java_handler, expand_end_java_handler):
15321         Add static prototype.
15323         * expr.c (flush_quick_stack, push_value, pop_value,
15324         java_stack_swap, java_stack_dup, build_java_athrow,
15325         build_java_jsr, build_java_ret, expand_java_multianewarray,
15326         expand_java_arraystore, expand_java_arrayload,
15327         expand_java_array_length, build_java_monitor, expand_java_pushc,
15328         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15329         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15330         expand_compare, expand_test, expand_cond, expand_java_goto,
15331         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15332         expand_java_field_op, java_push_constant_from_pool): Likewise.
15334         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15335         (build_java_arraynull_check): Mark parameters `node' and `type'
15336         with ATTRIBUTE_UNUSED.
15337         (note_label): Likewise for parameter `current_pc'.
15338         (expand_java_call, expand_java_ret): Hide unused definition.
15340         * java-tree.h (make_class, build_constants_constructor,
15341         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15342         init_outgoing_cpool, register_class, emit_register_classes,
15343         java_layout_seen_class_methods): Prototype.
15344         (unicode_mangling_length): Const-ify.
15345         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15346         emit_unicode_mangled_name, format_int, format_uint,
15347         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15348         jcf_print_utf8_replace, open_class): Prototype.
15350         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15351         <stdio.h>.  Include tree.h/java-tree.h.
15352         (utf8_equal_string usage, process_class): Add static prototype.
15353         (open_class): Don't prototype this here.
15354         (utf8_equal_string): Match arguments to format specifiers.
15355         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15356         TABLE_SWITCH, disassemble_method): Likewise.
15358         * jcf-io.c: Include tree.h/java-tree.h.
15359         (open_class, find_classfile, jcf_print_utf8,
15360         jcf_print_utf8_replace): Const-ify.
15362         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15363         parse_class_file): Add static prototype.
15364         (find_in_current_zip): Match definition to existing static
15365         prototype.
15367         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15368         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15369         finish_jcf_block, define_jcf_label, get_jcf_label_here,
15370         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15371         write_chunks, adjust_typed_op, generate_bytecode_conditional,
15372         generate_bytecode_return, perform_relocations, init_jcf_state,
15373         init_jcf_method, release_jcf_state, generate_classfile):
15374         Add static prototype.
15375         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15376         (make_class_file_name): Const-ify.
15378         * jcf.h (find_classfile): Const-ify.
15380         * jv-scan.c (reset_report): Remove prototype.
15382         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15383         (error): Rewrite to allow varargs.
15385         * lang.c (lang_f_options): Const-ify.
15387         * lex.c (java_parse_escape_sequence): Add static prototype.
15388         (java_allocate_new_line): Match definition to existing static
15389         prototype.
15391         * mangle.c Include tree.h/java-tree.h.
15392         (unicode_mangling_length, emit_unicode_mangled_name,
15393         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15395         * parse.h (jdep_code): Remove trailing comma in enumeration.
15396         (java_get_line_col): Move prototype outside of !JC1_LITE test.
15397         (reset_report): Add prototype.
15399         * verify.c (push_pending_label, merge_types): Add static
15400         prototypes.
15402         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15404 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15406         * parse.y (find_applicable_accessible_methods_list): Extend the
15407         search to superinterfaces when relevant.
15408         (search_applicable_methods_list): New function.
15410 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15412         * class.c (unmangle_classname): Implemented stricter testing
15413         before setting the QUALIFIED_P flag on an identifier.
15415 1999-03-16  Per Bothner  <bothner@cygnus.com>
15417         * parse.y (java_complete_lhs):  Call force_evaluation_order
15418         after patch_newarray.
15419         (patch_binop):  Don't call fold if there are side effects.
15421 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15423         * parse.y (java_stabilize_reference): Use save_expr instead of
15424         building a SAVE_EXPR node.
15425         (java_complete_lhs): Patch the resulting string of the `+='
15426         operator (if necessary) and complete the RHS after having built
15427         the cast.
15429 1999-03-15  Per Bothner  <bothner@cygnus.com>
15431         * class.c (make_class):  Don't set CLASS_P here (because
15432         this function is also called by build_java_array_type).
15433         (push_class):  Set CLASS_P here instead.
15434         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
15436         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
15437         context.  If the context is class, perfer "super" over "synchronized".
15438         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
15440         * parse.y (create_class):  Don't call parser_check_super here;
15441         it is not robust.  Always wait until later.
15443         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
15444         match what JDK 1.2 does), but don't set ACC_PUBLIC.
15446 1999-03-13  Per Bothner  <bothner@cygnus.com>
15448         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
15449         * lex.h (UNGETC):  Change misleading macro.
15451 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15453         * parse.y (java_stabilize_reference): Return NODE when patching a
15454         COMPOUND_EXPR.
15455         (java_complete_lhs): Put parenthesis around truth values.
15457 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15459         * class.c (layout_class_method): Don't make rtl for interface
15460         methods.
15461         * parse.h (GET_TYPE_NAME): New macro.
15462         * parse.y (if_then_statement:): Fixed indentation.
15463         (if_then_else_statement:): Likewise.
15464         (for_statement:): Fixed spacing.
15465         (try_statement:): Fixed indentation.
15466         (create_interface): Don't force interfaces to be abstract.
15467         (method_header): Abstract methods are OK in interfaces.
15468         (declare_local_variables): Fixed typo in comment.
15469         (java_complete_expand_method): Fixed indentation.
15470         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15471         non accessible fields.
15472         (java_stabilize_reference): New function.
15473         (java_complete_lhs): Fixed indentation. Use
15474         java_stabilize_reference in compound assignment. Insert the
15475         cast. If not processing `+' fix string constants before processing
15476         binop.
15478 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15480         * constants.c (find_class_or_string_constant): Cast variable `j'
15481         to a `jword' when comparing against one.
15483         * expr.c (java_lang_expand_expr): Remove unused variables
15484         `has_finally_p' and `op0'.
15486         * gjavah.c (print_field_info): Cast a value to jint when comparing
15487         against one.  Likewise for a jlong.
15488         (add_namelet): Likewise cast a `sizeof' to an int when comparing
15489         against a signed quantity.
15491         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15492         (print_signature): Don't needlessly dereference variable `str'
15494         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15495         `max_locals' with ATTRIBUTE_UNUSED.
15496         (jcf_parse_class): Likewise for variable `index'.
15498         * parse.h (reverse_jdep_list): Remove static prototype.
15500         * parse.y (build_jump_to_finally): Remove prototype and definition.
15501         (reverse_jdep_list): Add static prototype.
15503         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15504         `assignment' and `expr_decl'.
15506         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15508 1999-03-12  Andrew Haley  <aph@cygnus.com>
15510         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15511         we'll need a directory separator and a null character.
15513 1999-03-10  Per Bothner  <bothner@cygnus.com>
15515         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
15517 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15519         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15520         interfaces.
15522 1999-03-05  Per Bothner  <bothner@cygnus.com>
15524         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
15526         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
15528         * class.c (layout_class_method):  A static method in a base class
15529         is never overridden, so treat it like it doesn't exist.
15530         However, do complain about private non-static method overriding
15531         public static method.
15533         * parse.y:  Don't set unused INITIALIZED_P flag.
15534         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
15536         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
15537         (build_array_from_name):  Re-order &index[string] to &string[index].
15539         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
15540         error_mark (it might catch more errors, but it is more likely to lose).
15542 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15544         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15545         (parse-scan.o): Depend on toplev.h.
15547         * class.c (make_method_value): Add prototype.  Make it static.
15548         Remove unused second argument, caller changed.
15550         * expr.c (java_lang_expand_expr): Remove unused variable
15551         `return_label'.
15553         * java-tree.h: Don't prototype find_in_current_zip.
15554         Add prototypes for verify_constant_pool, start_java_method,
15555         end_java_method, give_name_to_locals, expand_byte_code,
15556         open_in_zip, set_constant_value, find_constant1, find_constant2,
15557         find_utf8_constant, find_string_constant, find_class_constant,
15558         find_fieldref_index, find_methodref_index, write_constant_pool,
15559         count_constant_pool_bytes and encode_newarray_type.
15561         * jcf-dump.c: Remove unused variable `LONG_temp'.
15563         * jcf-parse.c: Include parse.h.
15564         (jcf_parse_source): Remove unused parameter, all callers changed.
15565         (jcf_figure_file_type): Add static prototype.
15566         (find_in_current_zip): Likewise.  Also remove unused parameter,
15567         all callers changed.
15568         (read_class): Initialize variable `saved_pos'.
15570         * jcf-reader.c (jcf_parse_preamble): Mark variables
15571         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
15573         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
15574         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
15575         (java_parse_doc_section): Initialize variable `seen_star'.
15576         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
15577         (java_lex_error): Mark parameters `msg' and `forward' with
15578         ATTRIBUTE_UNUSED.
15579         (java_get_line_col): Mark parameters `filename' and `line' with
15580         ATTRIBUTE_UNUSED.
15582         * parse-scan.y: Include toplev.h.
15583         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
15585         * parse.h: use `struct JCF', not plain `JCF'.
15586         (java_parser_context_save_global, java_expand_classes
15587         java_parser_context_restore_global, java_parse): Add prototypes.
15589         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15590         `node'.
15592 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
15594         *  check-init.c (check_init):  COPYN takes word count, not bit count.
15596 1999-02-26  Per Bothner  <bothner@cygnus.com>
15598         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
15599         explicit build_decl.  (Avoids crash in reload when optimizing.)
15601 1999-02-25  Per Bothner  <bothner@cygnus.com>
15603         * decl.c (complete_start_java_method):  Handle synchronized method
15604         even when compiling from bytecode.
15606 1999-02-26  Tom Tromey  <tromey@cygnus.com>
15608         * gjavah.c (add_class_decl): Only generate `#include' if outer
15609         class is not the name of the class we are processing.  Correctly
15610         append `.h' in #include.
15611         (process_file): Clean up newlines around generated `#include's.
15612         (decode_signature_piece): Correctly handle inner classes.
15613         (struct include): New structure.
15614         (all_includes): New global.
15615         (print_include): New function.
15616         (add_class_decl): Use it.
15617         (process_file): Likewise.
15618         (add_class_decl): Generate include for java-array.h if array
15619         seen.
15620         (process_file): Don't generate java-array.h include.
15622         * gjavah.c (add_namelet): Check for standard package names here.
15623         (add_class_decl): Don't check for standard package names here.
15625 1999-02-25  Tom Tromey  <tromey@cygnus.com>
15627         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
15628         When reading a zip file, only use strncmp if both strings are
15629         bigger than the buffer length.  Initialize `k' when looping
15630         through zip file.
15632 1999-02-24  Tom Tromey  <tromey@cygnus.com>
15634         * gjavah.c (struct namelet): New structure.
15635         (add_namelet): New function.
15636         (print_namelet): New function.
15637         (print_class_decls): Use add_namelet and print_namelet to generate
15638         namespaces and not classes.
15639         (method_printed): New global.
15640         (HANDLE_END_METHOD): Examine method_printed.
15641         (print_method_info): Set method_printed when required.  Print
15642         error if function to be ignored is marked virtual.  Handle $finit$
15643         method.
15644         (METHOD_IS_FINAL): New macro.
15645         (print_field_info): Use it.
15646         (HANDLE_METHOD): Clear method_printed.
15647         (method_pass): New global.
15648         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
15649         (process_file): Do two passes over both fields and methods.
15650         (HANDLE_METHOD): Examine method_pass.
15651         (root): New global.
15652         (add_class_decl): New function.
15653         (print_class_decls): Don't scan over entire constant pool.
15655 1999-02-23  Tom Tromey  <tromey@cygnus.com>
15657         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15658         disable linking in that case.
15660 1999-02-20  Tom Tromey  <tromey@cygnus.com>
15662         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15663         not 0x1f.
15665 1999-02-21  Per Bothner  <bothner@cygnus.com>
15667         * decl.c (build_result_decl), java-tree.h:  New method.
15668         (complete_start_java_method):  Handle synchronized methods.
15669         Don't build DECL_RESULT here.  (Ordering dependency problem.)
15670         (start_java_method):  Call build_result_decl here instead  ...
15671         * parse.y (java_complete_expand_method):  ... and here.
15672         (expand_start_java_method): Don't call complete_start_java_method here.
15673         (java_complete_expand_method):  Call it here instead.
15674         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
15675         * java-tree.h:  ... here.
15677         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
15678         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
15679         for ARRAY_REF - it doesn't work when array bounds are checked.
15680         (patch_array_ref):  Handle it here instead.
15682         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
15684 1999-02-19  Per Bothner  <bothner@cygnus.com>
15686         Force left-to-right evaluation of binary operations etc.
15687         * expr.c (force_evaluation_order), java-tree.h:  New function.
15688         * parse.y (java_complete_lhs):  Pass binary operations, procedure
15689         calls, and ARRAY_REFs to force_evaluation_order.
15690         (various):  Set TREE_SIDE_EFFECTS more carefully.
15692         Tolerate random (non-UTF8) encoding in comments without complaining.
15693         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
15694         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
15696         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
15697         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
15699         * parse.y (java_complete_lhs):  Ignore an empty statement in a
15700         COMPOUND_EXPR.  Don't complain about empty statement after return.
15702 1999-02-19  Per Bothner  <bothner@cygnus.com>
15704         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
15705         in TREE_LIST - just chain the POINTER_TYPEs together.
15706         (resolve_class):  If type already resolved, return decl.
15707         After resolving, update TREE_TYPE(class_type), and name (if array).
15708         * parse.h (do_resolve_class), parse.y:  Make non-static.
15709         * class.c (maybe_layout_super_class):  Take this_class argument.
15710         Do do_resolve_class if necessary.
15711         (layout_class, layout_class_methods): Adjust calls appropriately.
15712         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15713         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
15714         * typeck.c (build_java_array_type):  Don't call layout_class.
15716 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15718         * parse.y (check_pkg_class_access): Allow private class access
15719         within the same package.
15720         (strip_out_static_field_access_decl): New function.
15721         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
15722         operator argument before testing its nature.
15724 1999-02-03  Per Bothner  <bothner@cygnus.com>
15726         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
15727         (TRY_EXPR):  Simplify - it no longer has a finally clause.
15728         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
15729         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15730         * expr.c (java_lang_expand_expr):  Likewise.
15731         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
15732         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
15733         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
15734         (build_try_statement):  Remove finally parameter and handling.
15735         (build_try_finally_statement):  New function.
15736         (patch_try_statement):   No longer need to support finally clause.
15737         (try_statement):  Update grammar action rules.
15738         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
15739         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15741 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
15743         * jcf-parse.c (get_constant): Add braces around computation of 'd'
15744         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
15746 1999-02-17  Andrew Haley  <aph@cygnus.com>
15748         * class.c (build_utf8_ref): Back out broken patch which was
15749         intended to to output signatures using '.' as a separator.
15751         * class.c (make_class_data): Output signatures using '.' as a
15752         separator, rather than '/'.
15753         (mangled_classname): Likewise.
15754         (make_field_value): Likewise.
15755         (make_method_value): Likewise.
15756         * constants.c (alloc_class_constant): Likewise.
15757         * expr.c (build_invokeinterface): Likewise.
15759 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15761         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
15762         of an ancient workaround.
15764 1999-02-10  Jeffrey A Law  (law@cygnus.com)
15766         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
15767         here anymore.
15769 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15771         * lex.c (yylex): Encode \0 as UTF8.
15773 1999-02-10  Tom Tromey  <tromey@cygnus.com>
15775         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
15776         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
15777         (libgcj_zip): Renamed.
15778         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
15779         LIBJAVA_ZIP_FILE.
15780         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
15782         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
15783         (GC_NAME): Renamed -lgc to -lgcjgc.
15785 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15787         * lex.c (java_lang_cloneable): Initialize.
15788         * parse.y (java_lang_cloneable): New static variable.
15789         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
15790         doing one more qualification round.
15791         (valid_ref_assignconv_cast_p): Reject null source or
15792         destination. Allow an array to be cast into java.lang.Cloneable.
15793         (patch_cast): Swapped two first arguments to first call to
15794         valid_ref_assignconv_cast_p.
15796 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15798         * parse.h: DECL_P renamed JDECL_P.
15799         * parse.y: DECL_P replaced by JDECL_P.
15800         (build_array_from_name): Always use pointer's type.
15801         (patch_bc_statement): Extra code to search continue target in a
15802         for loop. Fixed comments. Continue target is current loop when
15803         unlabeled.
15805 1999-02-05  Andrew Haley  <aph@cygnus.com>
15807         * class.c (make_class_data): The superclass of an interface should
15808         be null, not class Object.
15810         * lex.c (java_lex): Sign extend hex literals.
15812 1999-02-04  Andrew Haley  <aph@cygnus.com>
15814         * class.c (build_utf8_ref): Output signatures using '.' as a
15815         separator, rather than '/'.
15816         (make_class_data): Likewise.
15818 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
15820         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
15821         mkstemp.o.  Get them from libiberty now.
15823 1999-02-02  Jeffrey A Law  (law@cygnus.com)
15825         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
15827 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15829         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
15830         from libiberty.h
15832 1999-02-02  Per Bothner  <bothner@cygnus.com>
15834         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
15835         * jcf-write.c (generate_bytecode_return):  New function.
15836         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
15838         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
15839         generate special [fd]const_[01] instructions.
15841         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
15843         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
15844         handling OPCODE_lookupswitch or OPCODE_tableswitch.
15846 1999-02-01  Per Bothner  <bothner@cygnus.com>
15848         * parse.y (patch_method_invocation):  Handle calling static methods,
15849         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
15851         * parse.y (java_complete_lhs):  Don't complain about unreachable
15852         exit condition in a do-while statement.
15854 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15856         * lex.c (java_read_char): Fixed utf8 decoding.
15857         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
15858         range.
15859         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
15860         comments. Local variable `all_primitive' is gone. Broadened
15861         acceptance of `0' to floating point targets. `long' can now be
15862         widened to `double' or `float'.
15863         (valid_method_invocation_conversion_p): Added leading
15864         comment. Fixed tabulation.
15865         (build_string_concatenation): Optimize out left or right empty
15866         string constants.
15868 1999-01-28  Per Bothner  <bothner@cygnus.com>
15870         * jcf-write.c (localvar_alloc):  Only emit entry for
15871         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
15872         (generate_bytecode_insns):  Only call put_linenumber if
15873         debug_info_level > DINFO_LEVEL_NONE.
15874         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
15875         is specified, add -g1 (for compatibility wih javac).
15877 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
15879         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
15880         gjavah.o, check-init.o, jv-scan.o
15882 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15884         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
15886         * gjavah.c: Include config.h and system.h.
15888         * javaop.h (inline): Don't define, its handled by system.h.
15889         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
15890         from `inline' to `static inline'.
15892         * jcf.h (inline): Don't define, its handled by system.h.
15894         * lex.c (inline): Likewise.
15896 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
15898         * lang-specs.h: Map -Qn to -fno-ident.
15900 1999-01-29  Richard Henderson  <rth@cygnus.com>
15902         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
15904 1999-01-29  Tom Tromey  <tromey@cygnus.com>
15906         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
15907         then cast it to Object before calling `append' method.
15909 1999-01-28  Per Bothner  <bothner@cygnus.com>
15911         * check-init.c (check_bool2_init, check_bool_init, check_init):
15912         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
15913         * jcf-write.c (generate_bytecode_insns):  Likewise.
15915 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15917         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
15918         * parse.y (patch_cast): Allow a boolean to be cast into a
15919         boolean.
15921 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15923         * parse.y: (class_declaration:): Fixed indentation.
15924         (class_member_declaration:): Extra `;' after field declaration now
15925         accepted.
15926         (interface_declaration:): Removed debug messages in error reports.
15927         (patch_binop): Nodes created and returned inherit the orignal
15928         node's COMPOUND_ASSIGN_P flag value.
15929         (patch_cast): Fix cast from char to floating point.
15931 1999-01-25  Andrew Haley  <aph@cygnus.com>
15933         * except.c, java-except.h (expand_resume_after_catch): new
15934         function.
15935         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
15936         to branch back to main flow of control after a catch block.
15938 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15940         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
15941         $(srcdir)/../system.h.
15942         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
15943         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
15944         (jcf-write.o): Likewise.
15945         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15946         (mangle.o): Depend on $(srcdir)/../toplev.h.
15947         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15948         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15950         * class.c: Include output.h and parse.h.
15951         (mangled_classname): Add the `const' keyword to a char*.
15952         (find_named_method): Hide unused function definition.
15953         (build_utf8_ref): Change type of variable `c' to unsigned char.
15954         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
15955         (build_class_ref): Add the `const' keyword to a char*.
15956         (layout_class_method): Remove unused variable `buf'.
15958         * decl.c (find_local_variable): Remove unused variable `rtl'.
15959         (pushdecl): Likewise for variables `different_binding_level' and
15960         `oldglobal'.
15961         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
15962         (maybe_build_cleanup): Likewise for parameter `decl'.
15964         * except.c (expand_start_java_handler): Mark parameter `range'
15965         with ATTRIBUTE_UNUSED.
15967         * expr.c: Include except.h.
15968         (pop_type): Remove unused variable `i'.
15969         (pop_value): Likewise for variables `n_words' and `i'.
15970         (expand_java_arrayload): Likewise for variable `convert'.
15971         (java_lang_expand_expr): Likewise for variables `op0', `type',
15972         `mode', `unsignedp', `node' and `elements'.
15973         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
15974         `eh_ranges'.
15975         (process_jvm_instruction): Add a `const' qualifier to a char*.
15977         * gjavah.c (output_directory): Add the `const' keyword to a char*.
15978         (temp_directory): Likewise.
15979         (print_c_decl): Likewise.
15980         (print_method_info): Likewise.
15981         (decode_signature_piece): Likewise.
15982         (print_mangled_classname): Likewise.
15984         * java-except.h: Provide prototypes for maybe_start_try,
15985         maybe_end_try and add_handler.
15987         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
15988         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
15989         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
15990         init_expr_processing, push_super_field, init_class_processing,
15991         can_widen_reference_to, class_depth, verify_jvm_instructions,
15992         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
15993         set_local_type, merge_type_state, push_type, load_type_state,
15994         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
15995         emit_unicode_mangled_name): Add prototypes.
15997         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
15998         (print_signature_type): Use ISDIGIT, not isdigit.
15999         (print_signature): Remove unused variable `j'.
16001         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16002         int when comparing against one.
16004         * jcf-parse.c: Include toplev.h.
16006         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
16007         (localvar_free): Remove unused variable `i'.
16008         (generate_bytecode_conditional): Likewise for variable `kind'.
16010         * jv-scan.c: Include config.h and system.h.  Remove redundant
16011         OS header and gansidecl.h includes.
16012         (warning): Add the `const' keyword to a char*.  Also add
16013         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
16014         __STDC__, when determining whether to use ANSI-isms.
16015         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
16016         (xmalloc): Don't redundantly prototype here.
16017         (main): Remove unused parameter `envp'.  Also fix the arguments
16018         passed to function `fatal' to match the format specifier.
16020         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16022         * mangle.c: Include toplev.h.
16023         (emit_unicode_mangled_name): Declare parameter `len'.
16025         * parse.y (parse_warning_context): Add the `const' keyword to a
16026         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
16027         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16028         (issue_warning_error_from_context): Add the `const' keyword to
16029         a char*.
16030         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
16031         not `__STDC__' for whether to use ANSI-isms.
16033         * typeck.c (incomplete_type_error): Mark parameters `value' and
16034         `type' with ATTRIBUTE_UNUSED.
16035         (parse_signature_type): Use ISDIGIT, not isdigit.
16037         * verify.c (check_pending_block): Add the `const' keyword to a char*.
16038         (verify_jvm_instructions): Likewise.  Remove unused variables
16039         `field_name' and `default_val'.
16041         * zextract.c: Include config.h and system.h.  Remove redundant
16042         OS header includes.
16044         * zipfile.h: Prototype `read_zip_archive'.
16046 1999-01-21  Andrew Haley  <aph@cygnus.com>
16048         * typeck.c (convert): Allow conversions to void type: some
16049         optimizations in gcc do this.
16051 1999-01-21  Andrew Haley  <aph@cygnus.com>
16053         * typeck.c (convert_ieee_real_to_integer): New function.
16054         (convert): When not using fast-math and using hardware fp, convert
16055         an IEEE NaN to zero.
16057 1999-01-18  Andrew Haley  <aph@cygnus.com>
16059         * parse.y (patch_binop): Do a type conversion from signed to
16060         unsigned and then back to signed when a ">>>" is found.
16062 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16064         * java-tree.h: (check_for_initialization): Added prototype.
16065         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16066         * parse.y (do_resolve_class): Removed unused locals.
16067         (read_import_dir): Likewise.
16068         (resolve_qualified_expression_name): Array creation
16069         expressions are valid primary expressions.
16070         (qualify_ambiguous_name): Likewise.
16071         (patch_synchronized_statement): Removed unused local.
16073 1999-01-17  Jeffrey A Law  (law@cygnus.com)
16075         * Makefile.in (zextract.o): Add dependencies.
16077         * Makefile.in: Do not put ^Ls at the start of a line.
16079 1999-01-15  Per Bothner  <bothner@cygnus.com>
16081         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
16082         sub-type the result of the call that gets the exception value.
16084         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
16085         don't call finish_class.
16087         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
16088         clear found before continuing.
16090         * verify.c (verify_jvm_instructions):  On an array load, allow
16091         and handle top of stack to be TYPE_NULL.
16093         * gjavah.c (generate_access):  Translate Java package private or
16094         protected access to C++ public, but with a comment.
16096 1999-01-13  Andrew Haley  <aph@cygnus.com>
16098         * expr.c (generate_name): Name prefix changed to avoid clashes
16099         with assembler temp labels.
16101         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16102         MODIFY_EXPR.  Without this, code for the assignment may not be
16103         generated at all and the synchronized statement will read an
16104         uninitialized variable.
16106 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16108         * class.c (maybe_layout_super_class): Fixed returned value.
16109         * lex.c: Added 1999 to the copyright.
16110         (java_init_lex): Initialize java_lang_imported.
16111         * lex.h: Added 1999 to the copyright.
16112         * parse.h: Added 1999 to the copyright.
16113         (REGISTER_IMPORT): Fixed typo in trailing macro.
16114         (CURRENT_OSB): New macro.
16115         (struct parser_ctxt): New fields osb_depth, osb_limit.
16116         * parse.y (java_lang_id): New global variable.
16117         (type_import_on_demand_declaration): Don't import java.lang.* twice.
16118         (array_creation_expression:): Use CURRENT_OSB.
16119         (dims:): Uses a stack to keep track of array dimensions.
16120         (cast_expression:): Use CURRENT_OSB.
16121         (find_expr_with_wfl): Return NULL if node found doesn't meet the
16122         conditions.
16123         (register_fields): Fixed typos in comment.
16124         (check_method_redefinition): Fixed comment indentation.
16125         (java_check_regular_methods): Set saved found wfl to NULL after
16126         having reinstalled it in the previously found DECL_NAME.
16128 1999-01-10  Richard Henderson  <rth@cygnus.com>
16130         * gjavah.c (java_float_finite): Use a union to do type punning.
16131         (java_double_finite): Likewise.
16133 1999-01-09  Per Bothner  <bothner@cygnus.com>
16135         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
16136         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16137         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
16138         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
16139         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16140         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
16142 1999-01-08  Per Bothner  <bothner@cygnus.com>
16144         * check-init.c (check_init):  If compiling to native, we don't
16145         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
16147 1999-01-08  Tom Tromey  <tromey@cygnus.com>
16149         * parse-scan.y (variable_declarator_id): Set or increment
16150         bracket_count.
16151         (bracket_count): New global.
16152         (formal_parameter): Handle case where bracket pairs trail variable
16153         declarator id.
16155 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
16157         * jcf-parse.c (yyparse): variable len changed from a char to an
16158         int to prevent overflow.
16160 1999-01-06  Per Bothner  <bothner@cygnus.com>
16162         * java-tree.h:  Declare read_class.
16163         * jcf-parse.c (read_class):  New function.
16164         (load_class):  Now just call read_class.
16166         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
16167         * jcf-parse.c (parse_source_file):  Declare save_error_count,
16168         which is needed by java_parse_abort_on_error macro,
16169         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
16171         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
16172         constructor, if initializing a static field.
16173         (patch_new_array_init):  Set TREE_CONSTANT if it is.
16174         * expr.c (java_lang_expand_expr):  For a static array constructor
16175         of primitive elements, allocate the array itself statically.
16176         Disabled until we can set the vtable field statically.
16178         * check-init.c:  New file.  Checks for definite assignment.
16179         * Makefile.in (JAVA_OBJS):  Add check-init.o.
16180         * parse.y (java_complete_expand_method): Call check_for_initialization.
16181         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
16183 1999-01-06  Graham <grahams@rcp.co.uk>
16185         * parse.y : include system.h instead of including
16186         standard headers directly with the exception of <dirent.h>.
16188 1999-01-06  Per Bothner  <bothner@cygnus.com>
16190         * lex.h:  Moved static function declarations to lex.c,
16191         to shut up some -Wall warnings.
16192         * lex.c:  Static function declarations moved here.
16193         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
16195 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16197         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16199 1998-12-22  Per Bothner  <bothner@cygnus.com>
16201         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
16202         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
16204         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
16205         (localvar_alloc):  Change return type to void,
16206         (emit_unop):  Remove unused variable size.
16208         * jcf-write.c (struct jcf_block):  Add new union.
16209         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16210         (call_cleanups):  New functions.
16211         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16212         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16213         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16214         * lang.c (lang_init):  Call using_eh_for_cleanups.
16215         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16216         completing operands to patch_synchronized_statement.
16217         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16218         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16219         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16221 1998-12-20  John F. Carr  <jfc@mit.edu>
16223         * Make-lang.in: Comment out control-Ls; they upset some makes.
16225 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16227         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16228         consistently.
16230 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16232         * parse.y (DIR_SEPARATOR): New define.
16233         (check_class_interface_creation): Use it.
16235         * parse-scan.y (report_main_declaration): Recognize
16236         `java.lang.String' in argument to main.
16238 1998-12-16  Per Bothner  <bothner@cygnus.com>
16240         * parse.y (create_interface):  Remove bogus test.
16242 1998-12-16  Per Bothner  <bothner@cygnus.com>
16244         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16245         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16247 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16249         * parse-scan.y (qualified_name): Use correct sprintf format.
16251 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16253         * gjavah.c (print_field_info): Changed how most negative number is
16254         printed.
16256 1998-12-14  Per Bothner  <bothner@cygnus.com>
16258         * parse.y (fold_constant_for_init):  New function.
16259         (resolve_expression_name):  Don't replace static final
16260         constant-initialized fields by its value.
16261         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16262         not replace static final constant-initialized fields by their values.
16263         (register_fields):  If there is an initializer, set DECL_INITIAL and
16264         MODIFY_EXPR_FROM_INITIALIZATION_P.
16265         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16266         Only call patch_initialized_static_field if
16267         MODIFY_EXPR_FROM_INITIALIZATION_P.
16268         (patch_initialized_static_field):  If not valid constant, clear
16269         DECL_INITIAL.
16271         * parse.y (lookup_field_wrapper):  Fix thinko.
16273         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16274         set and restore global lineno.
16276 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16278         * gjavah.c (print_field_info): If value to print is the smallest
16279         value of its size, then print as hex to avoid later warnings from
16280         C++ compiler.
16282 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16284         * gjavah.c (decompile_method): Decompile `return null'.
16285         (process_file): Generate `#pragma interface'.
16286         (method_declared): New global.
16287         (print_method_info): Set it.
16288         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16289         (print_method_info): Handle abstract methods.
16291 1998-12-13  Per Bothner  <bothner@cygnus.com>
16293         * parse.y (patch_method_invocation):  If class_decl is null
16294         (e.g. an array type), use original type.
16296         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16297         errors about uncaught exception from clone (of array, specifically).
16299 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16301         * gjavah.c (decompile_method): Handle all types of `return'
16302         opcode.  Decompile `return this' and `return'.
16303         (method_access): New global.
16304         (print_method_info): Set it.
16305         (decompile_method): Don't decompile a synchronized method.
16307 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16309         * jcf-reader.c (jcf_parse_one_method): Recognize
16310         HANDLE_END_METHOD.
16311         * gjavah.c (HANDLE_END_METHOD): New macro.
16312         (HANDLE_CODE_ATTRIBUTE): New macro.
16313         (decompile_method): New function.
16314         (print_method_info): Don't print `;\n' at end of function decl.
16315         Include java-opcodes.h.
16316         (decompiled): New global.
16318 1998-12-12  Per Bothner  <bothner@cygnus.com>
16320         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16321         flag_emit_class_files.
16322         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16323         if flag_emit_class_files.
16324         * parse.y (java_complete_tree):  Pre-liminary support for
16325         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16327         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16328         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16330         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16332         * zipfile.h (opendir_in_zip):  New declaration.
16333         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16334         (opendir_in_zip):  New function, using code from open_in_zip.
16335         (open_in_zip):  Call opendir_in_zip.
16336         (find_class):  Remove no-longer-used do_class_file parameter,
16337         but add source_ok parameter.  Change logic so if we find a .java file,
16338         we don't look for .class in later classpath emtries.
16339         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16340         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16341         * gjavah.c: Update call to find_class.
16342         * jcf-dump.c:  Likewise.
16344         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16345         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16346         nothing if body is empty_stmt_node.
16347         Various little fixes so SP gets correctly adjusted.
16348         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16349         For CALL_EXPR, test if static first.
16350         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16351         such as the ones we create for Object and Class.
16352         Set and restore current_function_decl.
16353         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16354         (note_possible_classname):  New function.
16355         (read_import_entry):  Removed.  Merged with read_import_dir.
16356         (read_import_dir):  Don't call find_class - that only gives us
16357         the first classpath entry having the needed package.
16358         Use the struct buffer data structure from buffer.h.
16359         (read_import_dir, find_in_imports_on_demand):  The remembered
16360         class names now use '.' (not '/') as package separator.
16362         * parse.y (java_complete_expand_methods):  Call write_classfile
16363         here, and not in java_expand_classes (which only gets first class).
16365 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16367         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
16368         (register_fields):  If a static fields has an initializer, just
16369         chain it on ctxp->static_initialized, and handle later.
16370         (java_complete_expand_methods):  Force <clinit> first.
16371         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
16372         - it's already been completed.
16373         (patch_initialized_static_field):  New function.
16374         (java_complete_field):  Call it.
16376 1998-12-12  Per Bothner  <bothner@cygnus.com>
16378         * expr.c (encode_newarray_type, build_new_array):  New functions.
16379         * java-tree.h:  Declare build_new_array.
16380         * jcf-write.c (patch_newarray):  Use build_new_array.
16382         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
16383         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
16385         * parse.y (patch_new_array_init):  Re-organize.
16386         Now is passed the actual array (pointer) type of the value.
16387         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16388         (patch_array_constructor):  Removed - merged into patch_new_array_init.
16389         (java_complete_tree):  Update patch_new_array_init.
16391         * jcf-write.c (find_constant_index):  New function.
16392         (generate_bytecode_insns):  Use find_constant_index.
16393         (generate_classfile):  Use find_constant_index for ConstantValue.
16395 1998-12-11  Tom Tromey  <tromey@cygnus.com>
16397         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16398         * decl.c (init_decl_processing): Renamed dtable -> vtable.
16399         * class.c (make_class_data): Renamed dtable -> vtable, and
16400         dtable_method_count -> vtable_method_count.
16402 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16404         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16405         global variables, initialized.
16406         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16407         Declared new global variables.
16408         * lex.c (java_lex): Return long_zero_node, float_zero_node,
16409         double_zero_node, integer_zero_node upon direct matching.
16410         * parse.y (purify_type_name): Added function prototype.
16411         (duplicate_declaration_error_p): Consider new_type as potentially
16412         being a incomplete type. Use purify_type_name on type string.
16413         (method_header): saved_type: unused variable removed. Don't figure
16414         return type if method name is invalid.
16415         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16416         processed by patch_unaryop.
16417         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16418         increment/decrement node into its original type after binary
16419         numeric promotion on its operands.
16421 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16423         * parse.y (array_initializer:): Array init operand is NULL_TREE
16424         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16425         now an error. Fixed indentation problems.
16426         (patch_string): Handle error_mark_node as an argument.
16427         (patch_new_array_init): Fixed indentation problems.
16428         (array_constructor_check_entry): Removed check on null wfl_value.
16429         Return an error if wfl_value's walk returns an error.
16431 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16433         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16434         * lex.c (java_lex): Remember column position before advancing one
16435         token. Retain location information on OCB_TK.
16436         * lex.h (typedef struct java_lc): Added new field.
16437         * parse.h (GET_SKIP_TYPE): New macro.
16438         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16439         * parse.y (build_new_array_init, patch_new_array_init,
16440         patch_array_constructor, maybe_build_array_element_wfl,
16441         array_constructor_check_entry): New function prototypes.
16442         (switch_block:): Tagged <node>.
16443         (OCB_TK): Tagged <operator>.
16444         (array_initializer:): Installed actions.
16445         (variable_initializer): Build location information on element if
16446         necessary.
16447         (switch_statement:): Fixed indentation typo.
16448         (switch_block:): Redefined default action.
16449         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16450         (patch_assignment): Removed duplicate code.
16451         (maybe_build_array_element_wfl, build_new_array_init,
16452         patch_new_array_init, patch_array_constructor,
16453         array_constructor_check_entry): New functions.
16455 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16457         * parse.y (array_initializer): Tagged <node>.
16458         (variable_initializer:): Use default rule.
16459         (array_initializer:): Defined actions.
16460         (variable_initializers:): Likewise.
16461         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16462         non-static field accesses.
16463         (patch_invoke): Fixed indentation typo.
16464         (java_complete_tree): Likewise.
16465         (build_labeled_block): Changed leading comment. Generate an error
16466         in case of duplicate loop labels.
16467         (patch_conditional_expr): Patch results of string concatenation
16468         operations.
16470 1998-12-06  Per Bothner  <bothner@cygnus.com>
16472         * constants.c (find_methodref_index):  When the class is an interface,
16473         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16475         * decl.c (finit_identifier_node):  Use "$finit$", rather than
16476         "<finit>" (which Sun's verifier rejects).
16477         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
16478         (generate_field_initialization_code):  Removed.
16479         (fix_constructors)  Don't add call to $finit$ here (wrong order).
16480         (patch_method_invocation):  Add $finit$ call here.
16482         * java-tree.h (CALL_USING_SUPER):  New macro.
16483         * parse.y (patch_invoke):  Remove im local variable.
16484         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
16485         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
16486         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
16488         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
16490         * parse.y (java_complete_tree):  Don't complain about unreachable
16491         statement if it is empty_stmt_node.
16493         * jcf-write.c (find_constant_wide):  New function.
16494         (push_long_const):  Use find_constant_wide.
16496         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
16497         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
16498         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16499         Emit invokeinterface when calling an interface method.
16500         Emit invokespecial also when calling super or private methods.
16502         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
16504 1998-12-06  Per Bothner  <bothner@cygnus.com>
16506         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
16508 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16510         * java-tree.h (java_layout_seen_class_methods): New function
16511         prototype.
16512         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16513         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16514         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16515         * parse.y (method_declarator:): Defined action.
16516         (issue_warning_error_from_context): input_filename saved, set to
16517         the appropriate value and restored after java_error is called.
16518         (build_unresolved_array_type): Fixed comment.
16519         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16520         (method_header): Deal with return type the same way type are
16521         handled for fields and method's parameters and local variables
16522         types are handled.
16523         (check_method_redefinition): Removed extra CR.
16524         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16525         (java_layout_seen_class_methods): New function.
16526         (java_layout_classes): Call java_layout_seen_class_methods.
16528 1998-12-03  Per Bothner  <bothner@cygnus.com>
16530         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
16532 1998-12-03  Per Bothner  <bothner@cygnus.com>
16534         * jcf-dump.c (main):  Fix error message.
16535         * jcf-path.c (add_entry):  Style fix.
16537 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16539         * class.c (layout_class_method): Call build_java_argument_signature
16540         on constructors too.
16541         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16542         (patch_method_invocation): Define a primary when resolving an
16543         expression name. Augmented comment on code checking illegal `this'
16544         usage. Loosened it test by accepting NEW_CLASS_EXPR.
16546 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16548         * class.c (layout_class_method): Don't report error on non-static
16549         overriding static if the method is private.
16550         * java-tree.h (finish_class): Prototype added.
16551         * lex.c (java_get_line_col): Handle col argument -2 value.
16552         * parse.h: All static method declarations moved to parse.y.
16553         * parse.y: Now contains all static method declarations previously
16554         found in parse.h.
16555         (find_expr_with_wfl, missing_return_error,
16556         unreachable_stmt_error): New functions.
16557         (java_get_real_method_name): Identify constructors bearing class
16558         names in source code compiled classes only.
16559         (java_complete_expand_methods): Call missing_return_error.
16560         (invocation_mode): Private methods invoked as static methods.
16561         (java_complete_tree): Call unreachable_stmt_error.
16563 1998-12-01  Tom Tromey  <tromey@cygnus.com>
16565         * Makefile.in (+target): Removed.
16566         (+xmake_file): Likewise.
16567         (+tmake_file): Likewise.
16568         (.NOEXPORT): Removed duplicate.
16570 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16572         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16574         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
16576         * jvgenmain.c: Remove the xmalloc prototype, we get it from
16577         libiberty.h.  Provide an xmalloc definition.
16579         * jvspec.c: Remove the xmalloc prototype.
16581         * parse-scan.y: Include config.h and system.h.  Don't include
16582         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
16583         Provide an xstrdup definition.
16585 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
16587         * jcf-path.c (add_entry): Recognize ".jar" too.
16588         * lang-specs.h: Likewise.
16590 1998-11-26  Per Bothner  <bothner@cygnus.com>
16592         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
16593         soft_monitorenter_node, soft_monitorexit_node, throw_node.
16595         * jcf-write.c (generate_bytecode_insns):
16596         Handle pre/post-increment/decrement of long.
16598         * jcf-write.c (generate_bytecode_insns):
16599         Handle missing exception handler (finally for synchronized).
16601 1998-11-25  Per Bothner  <bothner@cygnus.com>
16603         * java-tree.h (end_params_node):  Declare global.
16604         * decl.c (end_params_node):  New global.
16605         (init_decl_processing, start_java_method):  Use end_params_node for
16606         end of list of parameter types.  Follows correct gcc conventions.
16607         * expr.c (pop_argument_types, pop_arguments):  Likewise.
16608         * lang.c (put_decl_node):  Likewise.
16609         * typeck.c (various places):  Likewise.
16610         * class.y (various places):  Likewise.
16611         * parse.y (various places):  Likewise.
16613         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
16614         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
16616         * class.c:  Add #include flags.h, remove no-longer needed declaration.
16618         * class.c (layout_class_method):  Remove commented-out code, re-format.
16619         Don't add vtable entry (or index) for private methods.
16620         * expr.c (expand_invoke):  A private method is implicitly final.
16621         * class.c (make_class_data):  If inlining or optimizing,
16622         skip private methods.
16624         * class.c (finish_class):  New function.  Calls existing methods,
16625         but alls emits deferred inline functions.
16626         * jcf-parse.c (parse_class_file):  Call finish_class.
16627         * parse.y (java_complete_expand_methods):  Likewise.
16629         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
16631         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
16633 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
16635         * jcf-write.c (generate_bytecode_conditional): Fix typo.
16637 1998-11-24  Per Bothner  <bothner@cygnus.com>
16639         * (generate_classfile): Always write class access flag with
16640         ACC_SUPER set.
16642 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16644         * class.c (maybe_layout_super_class): New function.
16645         (layout_class): Reorganized. Loop on class methods dispatched into
16646         a new function. Call maybe_layout_super_class.
16647         (layout_class_methods, layout_class_method): New functions.
16648         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
16649         class.
16650         (expand_invoke): Likewise.
16651         * java-tree.h (all_class_list): New global variable declared.
16652         (layout_class_methods, layout_class_method): New function
16653         prototypes.
16654         (LAYOUT_SEEN_CLASS_METHODS): New macro.
16655         * jcf-parse.c (all_class_list): New global variable.
16656         (load_class): Extended what class_or_name can be. Use parser
16657         context mechanism to save globals before calling jcf_parse.
16658         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
16659         is set on the file name.
16660         (jcf_parse): Layout class methods when Object is loaded, otherwise
16661         record class in all_class_list for delayed method layout.
16662         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
16663         * lang.c (put_decl_node): Decode <init> into the decl context
16664         class name.
16665         * lex.c (java_allocate_new_line): Use xmalloc.
16666         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
16667         pointers, not TREE_LIST elements.
16668         (struct parser_ctxt): Fixed comment indentations, added comments
16669         and reordered some fields.
16670         (java_check_methods): Function prototype removed.
16671         * parse.y (java_push_parser_context): Use xmalloc.
16672         (java_parser_context_restore_global): Pop extra pushed ctxp only
16673         when there's nothing next.
16674         (maybe_create_class_interface_decl): Fixed comment, add new
16675         created class decl to all_class_list.
16676         (method_header): Use GET_REAL_TYPE on argument's types.
16677         (method_declarator): Use GET_REAL_TYPE, change type to the real
16678         type in TREE_LIST dependency node. Build argument list with the
16679         real type.
16680         (create_jdep_list): Use xmalloc. Removed allocation error message.
16681         (obtain_incomplete_type): Fixed leading comment. Broadened
16682         incoming argument meaning.
16683         (register_incomplete_type): Use xmalloc. Removed allocation error
16684         message.
16685         (safe_layout_class): Fixed leading comment.
16686         (jdep_resolve_class): Reversed if statement condition and switch
16687         if and else bodies.
16688         (resolve_and_layout): Fixed leading comment. Broadened incoming
16689         argument meaning.
16690         (complete_class_report_errors): New local variable name, for
16691         clarity. purify_type_name used for all error cases.
16692         (java_get_real_method_name): Stricter check on constructors.
16693         (java_check_regular_methods): Reverse methods list only if not
16694         already laid out. Layout artificial constructor.
16695         (java_check_methods): Deleted.
16696         (source_start_java_method): Obtain incomplete type for patchable
16697         method arguments.
16698         (java_layout_classes): Fixed leading comment. Use
16699         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
16700         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
16701         before returning. Fixed comments.
16702         (java_expand_classes): Check for errors up front.
16703         (patch_method_invocation): Class to search is resolved and laid
16704         out.
16706 1998-11-24  Per Bothner  <bothner@cygnus.com>
16708         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
16710         * javaop.h (int8):  Removed - not used.
16711         (jbyte):  Redefine portably with correct signedness.
16713         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
16715         * jcf-write.c (generate_bytecode_insns):  Fix typo
16716         OPCODE_getstatic to OPCODE_getfield.
16718         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
16719         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
16720         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
16722 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16724         * jcf-parse.c (jcf_parse_source): Function returned type is
16725         void. Added prototype.
16726         (jcf_parse): Function returned type is void.
16727         (yyparse): Remove call to fclose on the last parsed file.
16729         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
16731 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16733         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
16734         (layout_class): Cope with methods featuring WFL in decl names.
16735         * decl.c (unqualified_object_id_node): New global variable,
16736         initialized.
16737         (build_decl_no_layout): Removed.
16738         * expr.c (build_primtype_type_ref): Handle Double.
16739         (java_lang_expand_expr): Fixed indentations.
16740         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
16741         (flag_wall, flag_redundant, flag_not_overriding,
16742         flag_static_local_jdk1_1, unqualified_object_id_node): Global
16743         variable declarations.
16744         (build_decl_no_layout): Removed prototype.
16745         (java_get_real_method_name): Added prototype.
16746         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
16747         (java_parse_abort_on_error): Macro now just returns.
16748         * jcf-parse.c (jcf_parse_source): Check fclose returned
16749         value. Call emit_register_classes if java_report_errors returns
16750         zero.
16751         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
16752         flag_static_local_jdk1_1): New integer flags.
16753         (lang_decode_option): New flags set here.
16754         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
16755         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
16756         the flag_redundant variable.
16757         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
16758         when parsing java.lang.Object class.
16759         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
16760         NULL_TREE to build.
16761         (resolve_qualified_expression_name): Fixed indentation.
16762         (patch_array_ref): Changed prototype.
16763         (not_initialized_as_it_should_p): Prototype removed.
16764         (java_report_errors): Added function prototype.
16765         * parse.y (formal_parameter:): Changed error message for not yet
16766         supported final parameters.
16767         (class_type_list:): Set both PURPOSE and VALUE of created
16768         TREE_LIST to be class_type.
16769         (primary_no_new_array:): Handle class literals on primitive types.
16770         (parse_warning_context): Reinstalled correct force_error and
16771         do_warning flags setups.
16772         (java_report_errors): Changed prototype. Return java_error_count
16773         value.
16774         (variable_redefinition_error): Consider treating variable type as
16775         a fake pointer.
16776         (create_interface): Warn about redundant abstract modifier if
16777         flag_redundant is set. Changed error message.
16778         (lookup_field_wrapper): Save/restore globals before/after looking
16779         up field.
16780         (duplicate_declaration_error_p): Consider treating declaration
16781         type as a fake pointer.
16782         (register_fields): Extract real type from dependency node. Check
16783         for duplicate field declaration after type adjustment. Use
16784         DECL_INITIAL to store static final initialized values.
16785         (method_header): Extract real function type from dependency node.
16786         (check_abstract_method_header): Use GET_METHOD_NAME.
16787         (obtain_incomplete_type): Layout fake pointer type.
16788         (safe_layout_class): Don't try to check for methods before layout.
16789         (java_complete_class): Don't check for correct throws clause
16790         elements inheritance here.
16791         (resolve_and_layout): Broadened name parameter meaning.
16792         (reset_method_name): Use GET_METHOD_NAME.
16793         (java_get_real_method_name): New function.
16794         (java_check_regular_methods): Don't check methods in
16795         java.lang.Object.  Verify lineage of throws clause elements. Use
16796         flag_no_overriding in warning report.
16797         (check_throws_clauses): Don't check if class was from
16798         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
16799         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
16800         (declare_local_variables): Use flag_static_local_jdk1_1 to report
16801         warning on unsupported final local variables. Use build_decl
16802         instead of build_decl_no_layout. Get real local variable type from
16803         dependency node.
16804         (source_start_java_method): Get real parameter type from
16805         dependency node. Call build_decl instead of build_decl_no_layout.
16806         (java_layout_classes): Reverse tree and layout type and class as
16807         required. Mark class as loaded when done.
16808         (resolve_field_access): Fixed indentation. Restricted condition
16809         leading to static field access code generation. Set field_type
16810         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
16811         (resolve_qualified_expression_name): Initialize type_found to
16812         null. Handle static field resolved during qualification. Fixed
16813         layout on non primitive field decl types.
16814         (not_accessible_p): Fixed typo in comment.
16815         (patch_method_invocation): Resolve and layout class to search from
16816         type.
16817         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
16818         layout non primitive type, if necessary. Make method node only to
16819         report errors.
16820         (find_applicable_accessible_methods_list): Consider WFL'ed method
16821         decl names. Fixed indentation.
16822         (argument_types_convertible): Resolve and layout target type if
16823         necessary.
16824         (java_complete_tree): Fixed indentation problems. Rewrote
16825         CALL_EXPR thrown exceptions check. Re-installed further processing
16826         of the assignment in certain cases.
16827         (patch_assignment): Call maybe_build_primttype_type_ref to perform
16828         inlining on class literals.
16829         (valid_builtin_assignconv_identity_widening_p): Cope with constant
16830         0 literal.
16831         (valid_method_invocation_conversion_p): Likewise.
16832         (patch_string): Temporary disable forbidden use of `this' in
16833         explicit constructor invocations when doing string concatenation
16834         within their scope.
16835         (patch_unaryop): Added comment. Reinstalled code to disable
16836         further check on assignment operation with cast expression RHS.
16837         (patch_switch_statement): Fixed indentation.
16838         (build_try_statement): Call build_decl instead of
16839         build_decl_no_layout.
16840         (patch_synchronized_statement): Likewise.
16841         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
16842         IS_UNCHECKED_EXPRESSION_P.
16843         (check_thrown_exceptions_do): Changed leading comment. Resolve and
16844         layout argument exception type.
16845         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
16846         of IS_UNCHECKED_EXPRESSION_P.
16848 1998-11-18  Anthony Green  <green@cygnus.com>
16850         * jcf-parse.c (yyparse): Open class file in binary mode.
16852 1998-11-15  Per Bothner  <bothner@cygnus.com>
16854         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
16856         * jcf-write.c (perform_relocations):  Move check out one loop.
16858 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
16860         * Make-lang.in: Fix reference to srcdir.
16861         * jv-scan.c: Add missing xmalloc prototype.
16862         * jvgenmain.c: Ditto.
16864 1998-11-15  Per Bothner  <bothner@cygnus.com>
16866         * decl.c (error_mark_node), java-tree.h:  New global.
16867         * parse.y:  Use empty_stmt_node instead of size_zero_node.
16868         (build_if_else_statement):  If missing else, use empty_stmt_node.
16870         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
16871         (java_complete_expand_method):  Complain if return is missing.
16872         (java_check_regular_methods):  Comment out incorrect error check.
16873         (not_accessible_p):  Fix incorrect handling of protected methods.
16874         (patch_method_invocation):  Pass correct context to not_accessible_p.
16875         (find_applicable_accessible_methods_list):  Likewise.
16876         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
16877         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
16878         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
16879         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
16881         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
16882         (push_int_const):  Remove reundant NOTE_PUSH.
16883         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
16884         (- case SWITCH_EXPR):  Fix code generation bug.
16885         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
16886         (generate_classfile):  More robust for abstract methods.
16888 1998-11-15  Anthony Green  <green@cygnus.com>
16890         * Makefile.in: jv-scan and jvgenmain all require libiberty.
16891         * Make-lang.in: Ditto.
16893         * jv-scan.c: Remove xmalloc and xstrdup definitions.
16894         * jvgenmain: Ditto.
16896 1998-11-15  Per Bothner  <bothner@cygnus.com>
16898         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
16900         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
16902 1998-11-14  Per Bothner  <bothner@cygnus.com>
16904         Allow uses of interface types to verify.  This is not really
16905         type-safe, but it matches what Sun does, and is OK as long as
16906         there are appropriate run-time checks.
16907         * verify.c (merge_types):  If merging two interface types,
16908         just set the result to java.lang.Object.
16909         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
16911 1998-11-13  Tom Tromey  <tromey@cygnus.com>
16913         * gjavah.c (main): Handle --output-class-directory argument.
16914         * jvspec.c (lang_specific_driver): Translate `-d' into
16915         -foutput-class-dir.
16916         * jcf.h (jcf_write_base_directory): Declare.
16917         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
16918         * lang-options.h: Mention -foutput-class-dir.
16919         * jcf-write.c (jcf_write_base_directory): New global.
16920         (make_class_file_name): Put generated .class file into `-d'
16921         directory, or into source directory if -d not given.  Function now
16922         static.
16923         (write_classfile): Free class file name.  Handle case where class
16924         file name is NULL.
16925         (DIR_SEPARATOR): New macro.
16926         Include <sys/stat.h>
16928         * Makefile.in (prefix): New macro.
16930 1998-11-12  Per Bothner  <bothner@cygnus.com>
16932         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
16933         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
16934         here (done in patch_invoke instead).
16935         (case_identity):  Moved here from parse.y.
16937         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
16938         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
16939         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
16940         so they can be efficiently scanned without recursion.
16941         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
16942         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
16943         in BLOCK iteratively, rather than recursively.
16945         * parse.y (do_unary_numeric_promotion):  New function.
16946         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
16948         * parse.y (patch_newarray):  Various fixes.
16950         Re-do handling of switch statements (for proper block scoping).
16951         * parse.y:  Add just a single block for the enture switch block,
16952         but don't create any "case blocks".
16953         (group_of_labels):  Rmeoved unneeded non-terminal.
16954         CASE_EXPR and DEFAULT_EXPR are added to current block.
16955         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
16956         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
16957         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
16958         * parse.y (wfl_operator, print_int_node): Make non-static.
16959         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
16960         as part of recursive scan of block.
16961         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
16962         (patch_switch_statement):  Most tests move dinto java_complete_tree.
16964         * parse.y:  Make various production be non-typed (void).
16965         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
16966         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
16967         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
16969         * jcf-write.c (struct jcf_handler):  New type.
16970         (struct jcf_switch_state):  New type.
16971         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
16972         (alloc_handler, emit_unop, emit_reloc):  New functions.
16973         (adjust_typed_op):  Add extra parameter ("max type" offset).
16974         (emit_switch_reloc, emit_case-reloc):  New function.
16975         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
16976         (generate_bytecode_insns):  Support REAL_CST, switch statements,
16977         exception handling, method calls, object/array creation, and more.
16979         * class.c:  Remove some unused variables.
16980         * constants.c (find_string_constant):  New function.
16981         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
16982         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
16983         if flag_emit_class_files.
16985 1998-11-12  Tom Tromey  <tromey@cygnus.com>
16987         * jcf-io.c (find_class): Added explanatory comment.
16989         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
16990         trailing slash to `.zip' entries.
16992         * jvspec.c (lang_specific_driver): Correctly handle case where
16993         GC_NAME not defined.
16995 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16997         * jvspec.c (GC_NAME): New define.
16998         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
16999         if required.
17000         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17002 1998-11-11  Per Bothner  <bothner@cygnus.com>
17004         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
17006 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17008         * jcf-dump.c (main): Correctly recognize `--'-style long options.
17010 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17012         * class.c (is_compiled_class): Call safe_layout_class for class
17013         compiled from source.
17014         * conver.h (convert_to_integer, convert_to_real,
17015         convert_to_pointer): Added prototypes.
17016         * decl.c (init_decl_processing): Non longer push the decls of
17017         `methodtable', `constants', `Class', `Field', `dispatchTable'
17018         `jexception' and `Method'.
17019         * expr.c (build_invokeinterface): New function.
17020         (expand_invoke): static variable CLASS_IDENT now in
17021         build_invokeinterface. Use build_invokeinterface.
17022         (expand_java_field_op): Moved code to inline
17023         java.lang.PRIMTYPE.TYPE into a function.
17024         (build_primtype_type_ref): New function.
17025         * java-tree.def (INSTANCEOF_EXPR): New tree code.
17026         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17027         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17028         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17029         (DECL_LOCAL_STATIC_VALUE): New macro.
17030         (build_invokeinterface, build_primtype_type_ref): New function
17031         prototypes.
17032         (java_parse_abort_on_error): Macro rewritten.
17033         * jcf-parse.c (current_method): Add comment to declaration.
17034         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17035         Function prototypes fixed.
17036         (jcf_parse_source): push/pop parser context. save/restore global.
17037         (parse_source_file): Fixed leading comment. Now take a
17038         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17039         classes and pop the parser context anymore.
17040         (yyparse): Push parser context, save globals, parse the source
17041         file, restore globals and pop the parser context when processing a
17042         source file.
17043         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17044         * lex.c (java_parse_doc_section): New function.
17045         (java_lex): Call java_parse_doc_section when appropriate. Build an
17046         operator around INSTANCEOF_TK.
17047         * lex.h (java_lineterminator, java_sprint_unicode,
17048         java_unicode_2_utf8, java_lex_error, java_store_unicode):
17049         Prototypes rewritten.
17050         (java_parse_escape_sequence, java_letter_or_digit_p,
17051         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17052         java_read_unicode, java_store_unicode, java_read_char,
17053         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17054         Added function prototypes.
17055         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17056         define.
17057         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17058         New macros
17059         (struct parser_ctxt): New fields: deprecated,
17060         current_parsed_class_un, gclass_list.
17061         (fix_method_argument_names, issue_warning_error_from_context,
17062         resolve_package, lookup_package_type): New function prototypes.
17063         (resolve_expression_name): Fixed function prototype.
17064         (find_applicable_accessible_methods_list): Fixed indentation, added
17065         extra argument in prototype.
17066         (check_final_assignment, build_null_of_type, check_deprecation,
17067         check_method_redefinition, reset_method_name,
17068         java_check_regular_methods, java_check_abstract_methods,
17069         maybe_build_primttype_type_ref): New function prototype.
17070         * parse.y (conver.h): Include.
17071         (INSTANCEOF_TK): Tagged <operator>.
17072         (single_type_import_declaration): Use REGISTER_IMPORT macro.
17073         (relational_expression:): Build binop for instanceof.
17074         (java_push_parser_context): Remember ctxp->gclass_list across
17075         contexts.
17076         (java_pop_parser_context): Simply return if no context
17077         exists. Remember gclass_list across contexts.
17078         (issue_warning_error_from_context): New function.
17079         (parse_error_context): Don't setup ctxp->elc here. Call
17080         issue_warning_error_from_context instead.
17081         (parse_warning_context): Likewise.
17082         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17083         setup. Link new class/interface to ctxp->gclass_list.
17084         (add_superinterfaces): Register interface as incomplete if not
17085         loaded.
17086         (create_class): Remember class unqualified name in
17087         ctxp->current_parsed_class_un. Check class deprecation.
17088         (register_fields): Check field deprecation. Remember static final
17089         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17090         processing INIT.
17091         (method_header): New local variable ORIG_ARG. Use unqualified
17092         current class name for check on constructor errors. Promote return
17093         type if of record type. Argument list fix moved in
17094         fix_method_argument_names, called here. Check method deprecation.
17095         (fix_method_argument_names): New function.
17096         (method_declarator): Promote record typed arguments.
17097         (safe_layout_class): Check class methods before layout.
17098         (java_complete_class): Compute field layout when patched.
17099         (do_resolve_class): Try to load class after having it renamed
17100         after the package name.
17101         (get_printable_method_name): Use DECL_CONTEXT.
17102         (reset_method_name): New function.
17103         (check_method_redefinition): Use reset_method_name.
17104         (java_check_regular_methods): New local variable
17105         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17106         names for error report. Check for compile-time error when method
17107         found has default (package) access.
17108         (java_check_abstract_methods): Now takes an interface DECL node as
17109         an argument. Also reinstall real name on unchecked
17110         overriding/hiding methods for error report.
17111         (java_check_methods): Fixed leading comment. Get classes to verify
17112         from ctxp->gclass_list. Use CHECK_METHODS macro and set
17113         CLASS_METHOD_CHECKED_P on class verification.
17114         (lookup_java_method2): Get real method name if necessary.
17115         (find_in_imports): Don't check package class access here.
17116         (resolve_package, lookup_package_type): New functions.
17117         (java_layout_classes): Fixed leading comment. Take classes to be
17118         laid out from ctxp->gclass_list.
17119         (java_complete_expand_methods): Don't expand native and abstract
17120         methods.
17121         (java_expand_classes): New function.
17122         (resolve_expression_name): Use additional argument ORIG.  Retrieve
17123         values of static final field of primitive types.
17124         (resolve_field_access): Handles static final field of promotive
17125         type.
17126         (resolve_qualified_expression_name): Handle STRING_CST as
17127         primaries and package name resolution. Check deprecation on found
17128         decls. Set where_found and type_found on non static field resolved
17129         during qualification. Layout non primitive field decl types.
17130         (check_deprecation): New function.
17131         (maybe_access_field): Simplified.
17132         (patch_method_invocation_stmt): Local variable CLASS_TYPE
17133         removed. Reverse method's argument when primary is a type. Don't
17134         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17135         instead. Include abstract class in the list of class searchable
17136         for constructors. Use DECL_CONTEXT of found method for access
17137         checks. Check method deprecation.
17138         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17139         converting arguments. Handle INVOKE_INTERFACE.
17140         (lookup_method_invoke): Search constructor using existing
17141         infrastructure (don't rely on lookup_java_constructor anymore).
17142         (find_applicable_accessible_methods_list): Extra argument flag
17143         LC. Now include constructor in the search.
17144         (qualify_ambiguous_name): Conditional expression are primaries.
17145         (not_initialized_as_it_should_p): static final are always
17146         initialized.
17147         (java_complete_tree): Pass extra NULL argument to
17148         resolve_expression_name. Stricter test to carry on patching
17149         assignments. New case for INSTANCEOF_EXPR.
17150         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17151         (check_final_assignment, maybe_build_primttype_type_ref): New
17152         functions.
17153         (patch_assignment): Detect resolved static finals and carry normal
17154         assignment error check on them. Inline PRIMTYPE.TYPE read access.
17155         (try_builtin_assignconv): Access constant 0 on all primitive
17156         types.
17157         (valid_builtin_assignconv_identity_widening_p): Accept identical
17158         types. Accept all promoted type on int type.
17159         (valid_ref_assignconv_cast_p): Accept a null pointer to be
17160         assigned to a reference.
17161         (valid_method_invocation_conversion_p): Accept to check null
17162         pointers.
17163         (build_binop): Merge declaration and initialization of local
17164         variable BINOP.
17165         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17166         numeric types. Improved validity test for qualify operators on
17167         references.
17168         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17169         and PREINCREMENT_EXPR. Also detect resolved static finals of a
17170         primitive type and issue the appropriate error message.
17171         (resolve_type_during_patch): Mark class loaded when resolved.
17172         (patch_cast): Allow null to be cased to reference types.
17173         (build_null_of_type): New function.
17174         (patch_array_ref): Handle array on references correctly.
17175         (patch_return): Removed unused local variable MODIFY. Force
17176         boolean to be returned as integers. Allows null to be returned by
17177         a function returning a reference.
17178         * typeck.c (convert_to_integer, convert_to_real,
17179         convert_to_pointer): Prototypes moved to convert.h
17180         (lookup_argument_method): Use method real name, if necessary.
17182 1998-10-30  Tom Tromey  <tromey@cygnus.com>
17184         * class.c (build_class_ref): Changed name of primitive classes to
17185         start with `_Jv_'.
17187         * class.c (make_class_data): Renamed fields: nmethods to
17188         method_count, method_count to dtable_method_count.  Always set
17189         `state' field to 0.
17190         * decl.c (init_decl_processing): Likewise.
17192 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17194         * class.c (layout_class): Don't mangle <finit>, produce
17195         __finit<class> instead. Don't verify artificial methods.
17196         * decl.c (finit_identifier_node): New declared global.
17197         (init_decl_processing): finit_identifier_node initialized.
17198         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17199         * java-tree.h (finit_identifier_node): Declared as extern.
17200         (struct lang_decl): New field called_constructor.
17201         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17202         (CLASS_HAS_FINIT_P): New macro.
17203         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17204         explicit constructor invocation.
17205         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17206         CALL_SUPER_CONSTRUCTOR_P): New macros.
17207         (write_classfile): Added prototype.
17208         * jcf-parse.c (jcf_parse_source): Parse and remember for
17209         generation if the file was seen on the command line.
17210         (parse_source_file): Don't write the class file here.
17211         (yyparse): Loop on files rewritten. Set current_jcf.
17212         (parse_zip_file_entries): Parse class file only if it was found.
17213         * lang.c (init_parse): Don't open command line provided filename
17214         here.
17215         (lang_parse): Don't set main_jcf anymore.
17216         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17217         (JCONSTRUCTOR_CHECK): New macro.
17218         (JBSC_TYPE_P): New macro.
17219         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17220         (COMPLETE_CHECK_OP_2): New macro.
17221         (struct parse_ctxt): New field explicit_constructor_p.
17222         (check_class_interface_creation): Fixed prototype indentation.
17223         (patch_method_invocation_stmt): Prototype reflects added argument.
17224         (patch_invoke): Likewise.
17225         (complete_method_declaration, build_super_invocation,
17226         verify_constructor_circularity,
17227         build_this_super_qualified_invocation, get_printable_method_name,
17228         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17229         verify_constructor_super, create_artificial_method,
17230         start_artificial_method_body, end_artificial_method_body,
17231         generate_field_initialization_code): New function prototypes.
17232         * parse.y: Fixed leading comment
17233         (constructor_header:, constructor_body:, block_end:): Rules tagged
17234         <node>.
17235         (type_declaration:): Call maybe_generate_finit.
17236         (method_declaration:): Action for method_body: placed in new
17237         function complete_method_declaration, called here.
17238         (constructor_declaration:): Defined actions. Removed leading
17239         FIXME.
17240         (constructor_header:): New rule with action.
17241         (constructor_body:): Rule rewritten using block_begin: and
17242         block_end:. Defined actions.
17243         (constructor_declarator:, explicit_constructor_invocation:):
17244         Defined actions.
17245         (block:): Use new rules block_begin: block_end:.
17246         (block_begin:, block_end:): New rules and actions.
17247         (block_statements:): Fixed error message for explicit
17248         constructors.
17249         (method_invocation:): Call build_this_super_qualified_invocation
17250         if primary is `this' or `super' was seen.
17251         (conditional_expression:): Action defined.
17252         (extra_ctxp_pushed_p): New static global flag.
17253         (java_parser_context_save_global): Create parser context if
17254         necessary. Use extra_ctxp_pushed_p to remember it.
17255         (java_parser_context_restore_global): Pop extra parser context if
17256         one exists.
17257         (build_array_from_name): Array on primitive types are marked
17258         loaded.
17259         (register_fields): Restore new name in field initializer
17260         expression if type was altered. Non static fields initialized upon
17261         declaration marked initialized.
17262         (maybe_generate_finit): New function.
17263         (maybe_generate_clinit): Use create_artificial_method,
17264         start_artificial_method_body, end_artificial_method_body. Generate
17265         debug info for enclosed initialization statements.
17266         (method_header): Fixed leading comment. Check constructor
17267         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17268         accordingly.
17269         (complete_method_declaration, constructor_circularity_msg,
17270         verify_constructor_circularity): New functions.
17271         (get_printable_method_name): New function.
17272         (check_method_redefinition): Don't rename <finit> methods. Fix
17273         declared constructor names. Error message for
17274         constructors modified.
17275         (java_check_regular_methods): Local variable seen_constructor
17276         renamed saw_constructor. Skip verification on constructors. Create
17277         default constructor with create_artificial_method.
17278         (java_check_methods): Removed unnecessary empty line.
17279         (create_artificial_method, start_artificial_method_body,
17280         end_artificial_method_body): New functions.
17281         (java_layout_classes): Changed leading comment. Reverse fields
17282         list if necessary. Always layout java.lang.Object if being
17283         defined.
17284         (java_complete_expand_methods): Verify constructor circularity.
17285         (java_complete_expand_method): Call fix_constructor on
17286         constructors.  Local variable no_ac_found removed. Restore
17287         bindings if method body expansion failed.
17288         (fix_constructors, verify_constructor_super,
17289         generate_field_initialization_code): New function.
17290         (java_expand_classes): Fixed leading comment. Write class file
17291         here.
17292         (resolve_expression_name): Check for illegal instance variable
17293         usage within the argument scope of an explicit constructor
17294         invocation.
17295         (resolve_qualified_expression_name): Pass extra from_super flag
17296         when invoking patch_method_invocation_stmt. New case for
17297         conditional expression when used as a primary. Check for error
17298         when acquiring super.
17299         (patch_method_invocation_stmt): Added extra argument super. New
17300         local variable is_static_flag. Set class_to_search according to
17301         the nature of the constructor invocation. Don't add `this'
17302         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17303         invocation within the argument scope of explicit constructor
17304         invocation. Set is_static according to is_static_flag. Provide
17305         extra `super' argument to patch_invoke invocation.
17306         (patch_invoke): New argument from_super. Loop on arguments
17307         indentation fixed. Pass from_super to invocation_mode. New switch
17308         case INVOKE_SUPER. Fixed error message in switch default case.
17309         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17310         value.
17311         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17312         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17313         message takes constructors into account.
17314         (find_applicable_accessible_methods_list): Fixed indentation.
17315         (qualify_ambiguous_name): Take explicit constructor invocation
17316         into account. Deal with a conditional expression as a primary to
17317         a method call.
17318         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17319         case. Added extra argument to patch_method_invocation_stmt.
17320         Register calls made to explicit constructor `this'. Don't call
17321         save_expr in ARRAY_REF case when emitting class files. Check for
17322         illegal use of this when expanding explicit constructor invocation
17323         arguments.
17324         (complete_function_arguments): Set and reset parser context
17325         explicit_constructor_p field value when appropriate.
17326         (build_super_invocation, build_this_super_qualified_invocation):
17327         New functions.
17328         (patch_assignment): Fixed typo.
17329         (patch_unaryop): Check on final fields occurs only when a decl
17330         exits.
17331         (patch_return): Take constructors into account.
17332         (patch_conditional_expr): New function.
17333         * typeck.c (build_java_signature): Removed unnecessary empty line.
17335 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17337         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17339 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17341         * decl.c (init_decl_processing): Renamed fields.
17342         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17343         interface_len, msize fields.
17345         * class.c (make_class_data): Removed subclass_head and
17346         subclass_next fields.
17347         * decl.c (init_decl_processing): Removed subclass_head and
17348         subclass_next fields.
17350 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17352         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17353         * mangle.c (emit_unicode_mangled_name): Similarly.
17355 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17357         * jcf-parse.c (get_constant): Place braces around code to compute
17358         'd' when REAL_ARITHMETIC is not defined.
17360 1998-10-25  H.J. Lu  (hjl@gnu.org)
17362         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17363         dependency.
17365 1998-10-23  Tom Tromey  <tromey@cygnus.com>
17367         * lang-specs.h: `.zip' files are input to jc1.
17369 1998-10-22  Per Bothner  <bothner@cygnus.com>
17371         * jvspecs.c:  Add (but don't enable) support for combining multiple
17372         .class and .java input filenames to a single jc1 invocation.
17373         Add support for -C flag (copile to .class files).
17374         Translate -classpath and -CLASSPATH arguments.
17375         * lang-specs.h:  Don't set %2 spec.
17377 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17379         * jcf-path.c (add_entry): Don't add trailing separator if entry is
17380         a .zip file.
17381         (add_path): Don't add trailing separator to non-empty path
17382         elements.
17384         * lang.c (lang_decode_option): Check for -fclasspath and
17385         -fCLASSPATH before examining other `-f' options.
17387         * java-tree.h (finalize_identifier_node): Don't declare.
17388         * class.c (make_class_data): Don't push "final" field.
17389         * decl.c (init_decl_processing): Don't push "final" field.
17390         (finalize_identifier_node): Removed.
17391         (init_decl_processing): Don't set finalize_identifier_node.
17393         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17395 1998-10-11  Anthony Green  <green@cygnus.com>
17397         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17398         (JV_SCAN_SOURCES): New macro.
17399         (JCF_DUMP_SOURCES): Likewise.
17400         (jcf-dump$(exeext)): New target.
17401         (jv-scan$(exeext)): New target.
17403 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17405         * Makefile.in (LEX): Removed.
17406         (LEXFLAGS): Likewise.
17407         (SET_BISON): New macro.
17408         (BISON): Removed.
17409         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
17410         spurious diffs in parse.c.
17411         ($(PARSE_SCAN_C)): Likewise.
17412         (PARSE_DIR): New macro.
17413         (PARSE_C): Use it.
17414         (PARSE_SCAN_C): Likewise.
17415         (PARSE_RELDIR): New macro.
17417         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17419         * jcf-io.c (find_class): Use saw_java_source to determine when to
17420         look for `.java' file.
17421         * jcf-parse.c (saw_java_source): New global.
17422         (yyparse): Set it if `.java' file seen.
17424         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17425         (GCJH_SOURCES): Likewise.
17426         * Makefile.in (datadir): New macro.
17427         (libjava_zip): Likewise.
17428         (JAVA_OBJS): Added jcf-path.o.
17429         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17430         (../gcjh$(exeext)): Likewise.
17431         (jcf-path.o): New target.
17432         * java-tree.h (fix_classpath): Removed decl.
17433         * jcf-parse.c (fix_classpath): Removed.
17434         (load_class): Don't call fix_classpath.
17435         * parse.y (read_import_dir): Don't call fix_classpath.
17436         * lex.h: Don't mention classpath.
17437         * lex.c (java_init_lex): Don't initialize classpath.
17438         * jcf-io.c (classpath): Removed global.
17439         (find_class): Use jcf_path iteration functions.  Correctly search
17440         class path for .java file.
17441         (open_in_zip): New argument `is_system'.
17442         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
17443         classpath-related options.
17444         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17445         and -I.
17446         (lang_init): Call jcf_path_init.
17447         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17448         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
17449         Correctly put braces around second string in each entry.
17450         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
17451         classpath-related options.
17452         (help): Updated for new options.
17453         * jcf.h: Declare functions from jcf-path.c.  Don't mention
17454         `classpath' global.
17455         * jcf-path.c: New file.
17457         * jcf-depend.c: Include jcf.h.
17459         * jcf-write.c (localvar_alloc): Returns `void'.
17460         (localvar_free): Removed unused variable.
17462         * lang.c (OBJECT_SUFFIX): Define if not already defined.
17463         (init_parse): Use OBJECT_SUFFIX, not ".o".
17465 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17467         * class.c (emit_register_classes): Renamed from
17468         emit_register_class.
17469         * java-tree.h (emit_register_classes): Prototype renamed from
17470         emit_register_class.
17471         * jcf-parse.c (yyparse): Call emit_register_classes once before
17472         returning.
17473         * parse.y (java_expand_classes): No longer register classes.
17475 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17477         * class.c (is_compiled_class): New local variable
17478         seen_in_zip. Identify classes found in currently compiled source
17479         file(s).
17480         * decl.c (complete_start_java_method): Fixed typo.
17481         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17482         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17483         (CLASS_P): Moved around.
17484         (java_parse_abort_on_error): Macro moved from jcf-parse.c
17485         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17486         java-tree.h
17487         (jcf_parse_source): Changed leading comment. Removed unnecessary
17488         fclose and CLASS_FROM_SOURCE_P marking.
17489         (parse_source_file): New local variables remember_for_generation
17490         and filename. Mark parsed file name identifier node. Removed block
17491         executed when parse_only was null. Set remember_for_generation.
17492         Use it as an argument to java_pop_parser_context.
17493         (yyparse): New local variables several_files, list, next node and
17494         current_file_list. Split ampersand separated file names into
17495         current_file_list. Iterate through the list and parse accordingly.
17496         * parse.h (java_pop_parser_context): New function prototype.
17497         * parse.y (ctxp_for_generation): New static global variable.
17498         (java_pop_parser_context): New argument generate. Link popped ctxp
17499         to ctxp_for_generation list accordingly.
17500         (java_complete_expand_methods): Fixed indentation.
17501         (java_expand_classes): New function.
17503 1998-10-17  Per Bothner  <bothner@cygnus.com>
17505         * Makefile.in:  Link with libiberty.a instead of memmove.o.
17507 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17509         * lex.c (setjmp.h): No longer included.
17510         * lex.h (setjmp.h): Included.
17511         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17512         (duplicate_declaration_error_p): Renamed from
17513         duplicate_declaration_error.
17514         (build_array_from_name): New function prototype.
17515         * parse.y (setjmp.h): No longer included.
17516         (variable_declarator_id): Define action.
17517         (build_array_from_name): New function.
17518         (duplicate_declaration_error_p): Renamed from
17519         duplicate_declaration_error.  Fixed leading comment.
17520         (register_fields): Main `for' loop reorganized. Uses
17521         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17522         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17523         build_array_from_name.
17524         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17525         types.
17526         (read_import_dir): Don't try to skip `.' and `..'.
17527         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17528         build_array_from_name. Main `for' loop reorganized.
17529         (resolve_qualified_expression_name): When building access to a
17530         field, use the type where the field was found, not its own type.
17531         (maybe_access_field): Use field DECL_CONTEXT if the type where the
17532         field was found is null.
17533         (qualify_ambiguous_name): Sweep through all successive array
17534         dimensions.
17536 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17538         * java-tree.h (pop_labeled_block, lang_printable_name,
17539         maybe_add_interface, set_super_info, get_access_flags_from_decl,
17540         interface_of_p, inherits_from_p, fix_classpath,
17541         complete_start_java_method, emit_handlers, init_outgoing_cpool,
17542         make_class_data, register_class, alloc_name_constant): New
17543         function prototypes.
17544         * lang.c (lang_decode_option): Set argc argument unused. Fixed
17545         indentation. Added cast to remove warning.
17546         (lang_printable_name): Set v argument unused.
17547         (lang_print_error): Added argument to lang_printable_name call.
17548         (java_dummy_print, print_lang_decl, print_lang_type,
17549         print_lang_identifier, lang_print_xnode): All argument marked
17550         unused.
17551         * lex.c (java_unget_unicode): Removed unnecessary argument.
17552         (java_allocate_new_line): Unused local variable is gone.
17553         (java_read_char): Added parenthesis in expressions to remove
17554         warnings.  Added final return statement.
17555         (java_read_unicode): Added parenthesis in expression to remove
17556         warning.
17557         (java_parse_end_comment): Fixed java_unget_unicode invocation.
17558         (java_parse_escape_sequence): Likewise.
17559         (java_lex): Unused local variables are gone. Fixed
17560         java_unget_unicode invocation.
17561         * lex.h (set_float_handler): Prototype added when JC1_LITE not
17562         defined.
17563         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
17564         lang_printable_name invocation in macro.
17565         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
17566         Likewise.
17567         (duplicate_declaration_error): Suppressed unused argument in
17568         prototype.
17569         (identical_subpath_p): Function declaration is gone.
17570         (patch_invoke): Suppressed unused argument in prototype.
17571         (patch_cast, build_labeled_block, check_thrown_exceptions):
17572         Likewise.
17573         * parse.y (setjmp.h): Included
17574         (toplev.h): Likewise.
17575         (field_declaration:): Suppressed unused local
17576         (label_decl:): Fixed build_labeled_block invocation.
17577         (java_pop_parser_context): Put extra parenthesis around assignment
17578         in if.
17579         (yyerror): Suppressed unused local variables.
17580         (variable_redefinition_error): Fixed lang_printable_name
17581         invocation.
17582         (create_interface): Suppressed unused local variables.
17583         (create_class): Likewise.
17584         (duplicate_declaration_error): Suppressed unused argument. Fixed
17585         lang_printable_name invocation.
17586         (register_fields): Suppressed unused local variable. Fixed
17587         duplicate_declaration_error invocation.
17588         (method_header): Suppressed unused local variable.
17589         (method_declarator, parser_check_super): Likewise.
17590         (java_complete_class): Suppressed unused local variable. Fixed
17591         fatal error message.
17592         (complete_class_report_errors): Added default: in switch.
17593         (java_check_regular_methods): Fixed lang_printable_name
17594         invocations.
17595         (check_throws_clauses): Likewise.
17596         (java_check_abstract_methods): Suppressed unused local
17597         variable. Fixed lang_printable_name invocation.
17598         (read_import_entry): Added supplemental return statement.
17599         (read_import_dir): Suppressed unused local variables.
17600         (check_pkg_class_access, declare_local_variables): Likewise.
17601         (source_start_java_method): Suppressed unused extern variable
17602         declarations
17603         (expand_start_java_method): Suppressed unused extern and local
17604         variable declarations.
17605         (java_complete_expand_methods): Likewise.
17606         (java_complete_expand_method): Suppressed unused local variables.
17607         (make_qualified_name): Likewise.
17608         (resolve_qualified_expression_name): Added default: in
17609         switch. Fixed lang_printable_name invocation.
17610         (class_instance_creation_expression): Added parenthesis around
17611         expressions.
17612         (patch_method_invocation_stmt): Fixed lang_printable_name and
17613         patch_invoke invocations.
17614         (check_for_static_method_reference): Fixed lang_printable_name
17615         invocation.
17616         (patch_invoke): Suppressed unused arguments and local variables.
17617         (lookup_method_invoke): Suppressed unused local variables.
17618         (qualify_ambiguous_name): Added default: in switch.
17619         (identical_subpath_p): Function removed.
17620         (patch_assignment): Suppressed unused local variables. Suppressed
17621         unnecessary if statement. Fixed lang_printable_name invocations.
17622         (try_builtin_assignconv): Fixed lang_printable_name invocations.
17623         (valid_ref_assignconv_cast_p): Parenthesis around
17624         expression. Suppressed unused local variables.
17625         (build_binop): Suppressed unused local variables. fixed
17626         lang_printable_name invocations.
17627         (string_constant_concatenation): Suppressed unused local
17628         variables.
17629         (patch_unaryop): Fixed lang_printable_name invocation.
17630         (patch_cast): Suppressed unnecessary argument. Fixed
17631         lang_printable_name invocation.
17632         (patch_array_ref): Fixed lang_printable_name invocation.
17633         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
17634         (build_labeled_block): Suppressed unused argument.
17635         (generate_labeled_block): Fixed build_labeled_block invocation.
17636         (build_loop_body): Suppressed unused local variables.
17637         (patch_loop_statement): Likewise.
17638         (patch_exit): Fixed lang_printable_name invocation.
17639         (patch_switch_statement): Likewise.
17640         (case_identity): First argument marked unused.
17641         (patch_try_statement): Fixed lang_printable_name invocations.
17642         (patch_synchronized_statement, patch_throw_statement): Likewise.
17643         (check_thrown_exceptions): Fixed check_thrown_exceptions and
17644         lang_printable_name invocations.
17645         (check_thrown_exceptions_do): Suppressed unused argument.
17647 1998-10-14  Tom Tromey  <tromey@cygnus.com>
17649         * jcf-write.c (write_classfile): Add output class file as target.
17650         * lang-options.h: Added -MD, -MMD, -M, and -MM.
17651         * jcf.h: Added declarations for dependency-tracking functions.
17652         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
17653         * lang.c (lang_decode_option): Recognize -MD and -MMD.
17654         (finish_parse): Call jcf_dependency_write.
17655         (dependency_tracking): New global.
17656         (DEPEND_SET_FILE): New define.
17657         (DEPEND_ENABLE): New define.
17658         (init_parse): Enable dependency tracking if required.
17659         Include "flags.h".
17660         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
17661         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17662         (../gcjh$(exeext)): Likewise.
17663         (jcf-depend.o): New target.
17664         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
17665         (GCJH_SOURCES): Likewise.
17666         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
17667         dep_name argument.
17668         (find_classfile): Added dep_name argument.
17669         (find_class): Compute name of dependency.
17670         (open_in_zip): Call jcf_dependency_add_file.
17671         * gjavah.c (output_file): No longer global.
17672         (usage): Don't mention "gjavah".
17673         (help): Likewise.
17674         (java_no_argument): Likewise.
17675         (version): Likewise.
17676         (main): Recognize and handle -M family of options.
17677         (print_mangled_classname): Return is void.
17678         (process_file): Handle case where output is suppressed.
17679         (HANDLE_END_FIELD): Likewise.
17680         (HANDLE_METHOD): Likewise.
17681         * jcf-depend.c: New file.
17683 1998-10-13  Jeffrey A Law  (law@cygnus.com)
17685         * java-tree.def: Add missing newline at EOF.
17687 1998-10-13  Tom Tromey  <tromey@cygnus.com>
17689         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
17690         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
17691         function.
17692         Include <config.h> and "system.h".
17693         (disassemble_method): Undefine RET to avoid clash with
17694         config/i386/i386.h.
17696 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17698         * decl.c (runtime_exception_type_node, error_exception_type_node):
17699         New global variables.
17700         (init_decl_processing): Initialized.
17701         * expr.c (java_lang_expand_expr): Set caught exception type to
17702         null if catch handler argument doesn't exit.
17703         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
17704         tree codes.
17705         * java-tree.h (runtime_exception_type_node,
17706         error_exception_type_node): Global variables declared.
17707         (DECL_FUNCTION_THROWS): New macro.
17708         (DECL_FUNCTION_BODY): Modified comment.
17709         (DECL_SPECIFIC_COUNT): Likewise.
17710         (struct lang_decl): New field throws_list.
17711         (IS_UNCHECKED_EXPRESSION_P): New macro.
17712         * lex.c (java_lex): Generate location information for THROW_TK.
17713         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
17714         EXCEPTIONS_P): New macros.
17715         (enum jdep_code): New value JDEP_EXCEPTION.
17716         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
17717         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
17718         PATCH_METHOD_RETURN_ERROR): New macros.
17719         (patch_method_invocation_stmt): Added new argument to prototype.
17720         (patch_synchronized_statement, patch_throw_statement,
17721         check_thrown_exceptions, check_thrown_exceptions_do,
17722         purge_unchecked_exceptions, check_throws_clauses): New function
17723         prototypes.
17724         * parse.y Fixed typo in keyword section.
17725         (throw:): Rule tagged <node>.
17726         (THROW_TK): Keyword tagged <operator>.
17727         (method_header:): Last argument to call to method_header passed
17728         from throws: rule.
17729         (throws:, class_type_list:, throw_statement:,
17730         synchronized_statement:, synchronized:): Defined actions.
17731         (method_header): New local variable current. Register exceptions
17732         from throws clause.
17733         (java_complete_tree): Complete and verify exceptions from throws
17734         clause.
17735         (complete_class_report_errors): Error message on exceptions not
17736         found
17737         (java_check_regular_methods): Fixed typo. Shortcut on private
17738         overriding methods. Changed error message on method
17739         redefinition. Check for throws clause compatibility.
17740         (check_throws_clauses): New function.
17741         (java_check_abstract_methods): Use DECL_NAME for wfl or current
17742         method. Changed error message on method redefinition.
17743         (currently_caught_type_list): New static variable.
17744         (java_complete_expand_methods): Purge unchecked exceptions from
17745         throws clause list. Call PUSH_EXCEPTIONS before walk and
17746         POP_EXCEPTIONS after.
17747         (resolve_qualified_expression_name): Pass new argument as NULL to
17748         patch_method_invocation_stmt.
17749         (patch_method_invocation_stmt): New argument ref_decl. Invoke
17750         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
17751         argument list when appropriate. Use new argument if non null to
17752         store selected method decl.
17753         (patch_invoke): Convert if necessary args of builtin types before
17754         forming CALL_EXPR. Argument list no longer reversed here.
17755         (invocation_mode): Treat final methods as static methods.
17756         (java_complete_tree): New cases for THROW_EXPR: and
17757         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
17758         function call.
17759         (complete_function_arguments): No more RECORD_TYPE
17760         conversion. Function parameter nodes no longer saved.
17761         (valid_ref_assignconv_cast_p): Avoid handling null type.
17762         (patch_binop): Fixed null constant reference handling.
17763         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
17764         BUILD_THROW macros.
17765         (patch_try_statement): Fixed comments. Record caught types in
17766         list, push the list, expand try block and pop the list.
17767         (patch_synchronized_statement, patch_throw_statement,
17768         check_thrown_exceptions, check_thrown_exceptions_do,
17769         purge_unchecked_exceptions): New functions.
17770         * typeck.c (lookup_argument_method): Allow WFL in place of method
17771         DECL_NAME during method definition check
17773 1998-10-09  Tom Tromey  <tromey@cygnus.com>
17775         * gjavah.c (decode_signature_piece): New function.
17776         (print_c_decl): Use it.  Added `name_override' argument.
17777         (print_method_info): Use name_override argument to print_c_decl.
17778         (seen_fields): Removed.
17779         (print_field_info): Don't update seen_fields.
17780         (struct method_name): New structure.
17781         (method_name_list): New global.
17782         (print_method_info): Add new method to list of methods.
17783         (name_is_method_p): New function.
17784         (print_field_info): If field name has same name as method, then
17785         change field name.
17786         (process_file): Parse methods before fields.
17787         (field_pass): New global.
17788         (HANDLE_END_FIELD): Take field_pass into account.
17790 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17792         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
17793         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
17795 1998-10-03  Anthony Green  <green@cygnus.com>
17797         * jvspec.c: Fix bug in jvgenmain_spec patch.
17799 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17801         * Makefile.in (lang.o:): Install dependency on java-tree.def.
17802         * decl.c (soft_exceptioninfo_call_node): New global variable.
17803         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
17804         takes extra integer argument. soft_exceptioninfo_call_node
17805         initialized.
17806         * except.c (java_set_exception_lang_code): New function
17807         (method_init_exceptions): Called here.
17808         (prepare_eh_table_type): New function.
17809         (expand_end_java_handler): Called here.
17810         * expr.c (build_java_throw_out_of_bounds_exception): Now features
17811         one argument. Modified generation of call to
17812         soft_badarrayindex_node to use new argument.
17813         (build_java_arrayaccess): Pass faulty index value to
17814         build_java_throw_out_of_bounds_exception.
17815         (generate_name): New function.
17816         (java_lang_expand_expr): New local variables node, current,
17817         has_finally_p. Expand TRY_EXPR node.
17818         (process_jvm_instruction): Replace top of the stack with thrown
17819         object reference when entering exception handler.
17820         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
17821         specific tree codes.
17822         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
17823         global.
17824         (DECL_SPECIFIC_COUNT): New macro.
17825         (prepare_eh_table_type, java_set_exception_lang_code,
17826         generate_name): New function declarations.
17827         (match_java_method): Declaration deleted.
17828         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
17829         macros.
17830         * lex.c (TRY_TK, CATCH_TK): Generate location information.
17831         * parse.h (redefinition_error, refine_accessible_methods_list,
17832         can_cast_to_p): Function declaration removed.
17833         (classitf_redefinition_error, variable_redefinition_error,
17834         parse_jdk1_1_error, find_applicable_accessible_methods_list,
17835         find_most_specific_methods_list, argument_types_convertible,
17836         enter_a_block, valid_builtin_assignconv_identity_widening_p,
17837         valid_cast_to_p, valid_method_invocation_conversion_p,
17838         try_reference_assignconv, add_stmt_to_compound,
17839         build_jump_to_finally, build_tree_list, patch_try_statement,
17840         java_get_catch_block): New function declarations.
17841         * parse.y (string_buffer_type): Global variable deleted.
17842         (group_of_labels, catches, catch_clause, catch_clause_parameter,
17843         finally): Rules tagged <node>.
17844         (TRY_TK, CATCH_TK): Token tagged <operator>.
17845         (class_body_declaration:, class_member_declaration:,
17846         formal_parameter:, explicit_constructor_invocation:,
17847         interface_member_declaration:, constant_declaration:,
17848         primary_no_new_array:, class_instance_creation_expression:,
17849         array_creation_expression:): Issue error on unsuported JDK1.1
17850         features.
17851         (try_statement:, catches:, finally:): Define actions.
17852         (catch_clause_parameter): New rule.
17853         (catch_clause:): Use new rule catch_clause_parameter.
17854         (parse_jdk1_1_error): New function.
17855         (redefinition_error): Renamed classitf_redefinition_error.
17856         (variable_redefinition_error): New function.
17857         (check_class_interface_creation): Call
17858         classitf_redefinition_error.
17859         (java_complete_tree): Added error message on JDEP_TYPE: case.
17860         (complete_class_report_errors): Fixed indentation.
17861         (declare_local_variables): Call variable_redefinition_error.
17862         (source_end_java_method): Call java_set_exception_lang_code and
17863         emit_handlers where appropriate.
17864         (java_method_add_stmt): Call add_stmt_to_block.
17865         (add_stmt_to_block): New function.
17866         (lookup_method_invoke): Fixed outside comment. new local variable
17867         candicates.  Call find_applicable_accessible_methods_list and
17868         find_most_specific_methods_list when searching for a
17869         method. Modified error report to list possible candidates when
17870         applicable.
17871         (find_applicable_accessible_methods_list,
17872         find_most_specific_methods_list, argument_types_convertible): New
17873         function.
17874         (refine_accessible_methods_list): Function deleted.
17875         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
17876         expr (if applicable) before calling patch_array_ref.
17877         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
17878         (enter_block): Fixed comment.
17879         (enter_a_block): New function.
17880         (patch_assignment): Reorganized. Call try_reference_assignconv for
17881         references. Call valid_cast_to_p instead of can_cast_to_p.
17882         (try_reference_assignconv,
17883         valid_builtin_assignconv_identity_widening_p): New functions.
17884         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
17885         (valid_cast_to_p, valid_method_invocation_conversion_p): New
17886         functions.
17887         (build_string_concatenation): Don't resolve StringBuffer.
17888         (patch_cast): Fixed inverted arguments.
17889         (patch_array_ref): Code to save array expr deleted. Call
17890         valid_cast_to_p instead of can_cast_to_p.
17891         (generate_labeled_block): Call generate_name.
17892         (build_jump_to_finally, build_try_statement, java_get_catch_block,
17893         patch_try_statement): New functions.
17894         * typeck.c (match_java_method): Function deleted.
17896 1998-10-02  Anthony Green  <green@cygnus.com>
17898         * jvspec.c: jvgenmain_spec uses different temporary file names.
17900 1998-10-02  Anthony Green  <green@cygnus.com>
17902         * jvspec.c (lang_specific_driver): Fail if user specifies
17903         --main= when not linking.
17905 1998-09-28  Tom Tromey  <tromey@cygnus.com>
17907         * class.c (make_class_data): Push value for `thread' field.
17908         * decl.c (init_decl_processing): Added `thread' field to class.
17910         * class.c (add_field): Always make static fields externally
17911         visible.
17913 1998-09-26  Anthony Green  <green@cygnus.com>
17915         * expr.c (build_java_athrow,
17916         build_java_throw_out_of_bounds_exception, expand_invoke,
17917         build_newarray, expand_java_multianewarray, build_java_monitor):
17918         Update comments to reflect _Jv_* function names.
17920 1998-09-25  Per Bothner  <bothner@cygnus.com>
17922         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
17923         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
17924         * parse.y (expand_start_java_method):  Likewise.
17926 1998-09-24  Per Bothner  <bothner@cygnus.com>
17928         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
17930         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
17931         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
17932         * expr.c:  Remove no-longer-needed calls to promote_type.
17933         * decl.c (give_name_to_locals):  Liekwise.
17934         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
17935         * parse.y:  Add/remove promote_type calls as appropriate.
17936         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
17937         (parse_signature_string):  Likewise.
17938         (build_java_array_type):  Fix for now signature convenions.
17940         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
17942 1998-09-23  Tom Tromey  <tromey@cygnus.com>
17944         * class.c (init_class_processing): libjava function renamed to
17945         _Jv_RegisterClass.
17947 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17949         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
17950         * java-tree.def: Fixed DEFTREECODE third argument.
17951         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
17952         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
17953         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
17954         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17955         JAVA_THIS_EXPR): Now replaced by tree code definitions.
17956         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
17957         * lang.c (java_tree_code_type, java_tree_code_length,
17958         java_tree_code_name): New arrays.
17959         (lang_init): Append Java tree node definitions to Gcc ones.
17960         * lex.c (expression_obstack): Declared as extern when JC1_LITE
17961         defined.
17962         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
17963         wfl_to_string.
17964         (java_lex): Allow declaration of empty string constants. Retain
17965         location information on CASE_TK and DEFAULT_TK.
17966         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
17967         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
17968         Modified to be more robust.
17969         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
17970         (build_new_invocation, try_builtin_assignconv,
17971         patch_switch_statement, string_constant_concatenation,
17972         build_string_concatenation, patch_string_cst, patch_string,
17973         java_expand_switch): New function declarations.
17974         * parse.y: Rules related to switch and EH tagged <node>.
17975         (label_id): Set to NULL_TREE
17976         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
17977         tree nodes.
17978         (this_or_super:): Fixed indentation.
17979         (statement:, statement_nsi:, statement_without_trailing_substatement:,
17980         statement_expression:): Removed call to RULE on all sub-rules.
17981         (switch_expression:, switch_labels:): New rules.
17982         (switch_statement:, switch_block:, switch_block_statement_groups:,
17983         switch_block_statement_group:, switch_labels:, switch_label:):
17984         Defined actions.
17985         (throw_statement:, synchronized_statement:, try_statement:):
17986         Defined temporary actions.
17987         (class_instance_creation_expression:): Call
17988         build_new_invocation. Fixed indentation.
17989         (field_access): Fixed indentation.
17990         (method_invocation): Likewise.
17991         (make_qualified_primary): Use THIS_EXPR.
17992         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
17993         resolving from SUPER, set *type_found.
17994         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
17995         (java_complete_tree): Removed unused local variable `location'. Case
17996         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
17997         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
17998         on MODIFY_EXPR: and all binary operator tree code cases. Removed
17999         STRING_CST: case. default: checks for patchable strings.
18000         (complete_function_arguments): Transform string constant or
18001         crafted StringBuffer if necessary.
18002         (build_method_invocation): Fixed comments.
18003         (build_new_invocation): New function.
18004         (patch_assignment): Call try_builtin_assignconv to figure a valid
18005         assignment conversion between builtin types.
18006         (try_builtin_assignconv): New function.
18007         (build_binop): Use URSHIFT_EXPR directly to call build.
18008         (operator_string): Use UNARY_PLUS_EXPR.
18009         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18010         operator.
18011         (do_merge_string_cste, merge_string_cste,
18012         string_constant_concatenation, build_string_concatenation,
18013         patch_string, patch_string_cst): New function.
18014         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18015         (patch_unaryop): Likewise. New test of valid ++/-- operands.
18016         (build_newarray_node): Use NEW_ARRAY_EXPR.
18017         (build_this): Use THIS_EXPR.
18018         (build_return): Enable debug information on return statement.
18019         (build_if_else_statement): Likewise.
18020         (complete_labeled_statement): Fixed related comment.
18021         (build_loop_body): Fixed comment.
18022         (build_bc_statement): Enable debug information on break/continue
18023         statements.
18024         (patch_bc_statement): Fixed typos. Handle SWITCH statement
18025         context.
18026         (patch_switch_statement, case_identity, java_expand_switch): New
18027         functions.
18029 1998-09-21  Per Bothner  <bothner@cygnus.com>
18031         * buffer.h (BUFFER_INIT):  New macro.
18032         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
18033         Pass (struct jcf_partial *state) to most functions.
18034         (jcf_block, jcf_relocation):  New types.
18035         Support labels, branches, conditionals, loops.
18037 1998-09-21  Tom Tromey  <tromey@cygnus.com>
18039         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18041 1998-09-21  Per Bothner  <bothner@cygnus.com>
18043         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
18044         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
18045         not integer_type_node (INT_TYPE_SIZ bits).
18047         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
18049         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
18050         * jcf-dump.c (print_exception_table):  New function.
18051         (disassemble_method):  Better handling of wide instructions.
18052         Make more robust for bad input.
18054 1998-09-30  Jeffrey A Law  (law@cygnus.com)
18056         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18057         FreeBSD.
18059 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18061         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18063 1998-09-17  Tom Tromey  <tromey@cygnus.com>
18065         * Makefile.in ($(PARSE_H)): Removed target.
18067 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18069         * Makefile.in (JAVA_OBJS): Add memmove.o
18070         (memmove.o): New target & rules.
18072 1998-09-15  Tom Tromey  <tromey@cygnus.com>
18074         * expr.c (expand_invoke): Don't generate a call to the class init
18075         code.
18077 1998-09-14  Jeffrey A Law  (law@cygnus.com)
18079         * Makefile.in: Add many missing dependencies.
18080         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18081         as appropriate.
18082         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18083         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18085 1998-09-11  Per Bothner  <bothner@cygnus.com>
18087         * decl.c (complete_start_java_method):  If method is static (and
18088         not private) call _Jv_InitClass.
18089         * expr.c (expand_invoke):  Don't call build_class_init.
18091         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
18093 1998-09-10  Jeffrey A Law  (law@cygnus.com)
18095         * Make-lang.in (GCJ): Define before using.
18097 1998-09-09  Jeffrey A Law  (law@cygnus.com)
18099         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18100         losing due to namespace pollution in GNU getopt.h
18102 1998-09-09  Tom Tromey  <tromey@cygnus.com>
18104         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18105         (java.all.cross): Likewise.
18106         (java.rest.encap): Likewise.
18108 1998-09-08  Jeffrey A Law  (law@cygnus.com)
18110         * gjavah.c (print_class_decls): Fix thinko in arglist
18111         * jcv-io.c (find_classfile): Similarly.
18113 1998-09-07  Jeffrey A Law  (law@cygnus.com)
18115         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18117 1998-09-05  Tom Tromey  <tromey@cygnus.com>
18119         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18120         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18121         * Makefile.in (PARSE_C): New macro.
18122         (PARSE_H): Likewise.
18123         (PARSE_SCAN_C): Likewise.
18124         ($(PARSE_C)): Target renamed from parse.c.
18125         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18126         (clean): Remove parse-scan.c as well.
18127         (parse.o): Depend on $(PARSE_C).
18129 1998-09-05  Anthony Green  <green@cygnus.com>
18131         * README, license.terms: Removed.
18133         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18134         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18135         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18136         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18137         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18138         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18139         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18140         and Java trademark attribution.
18142 1998-09-04  Tom Tromey  <tromey@cygnus.com>
18144         * Makefile.in: Use gcjh, not gjavah.
18145         * config-lang.in (stagestuff): Use gcjh, not gjavah.
18146         * Make-lang.in: Changed gjavah to gcjh everywhere.
18148 1998-09-03  Per Bothner  <bothner@cygnus.com>
18150         * gjavah.c:  Support new -prepend -add -append flags.
18151         (print_method_info):  Method is not virtual if class is final.
18153 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18155         * jv-scan.c: Fixed copyright assignment.
18156         * keyword.gperf: Likewise.
18157         * keyword.h: Likewise.
18158         * lex.c: Fixed copyright assignment.
18159         (java_lex): Push unicode back when parsing '<'.
18160         * lex.h: Fixed copyright assignment.
18161         * parse-scan.y: Likewise.
18162         * parse.h: Fixed copyright assignment.
18163         (build_debugable_stmt, complete_for_loop): New function prototypes.
18164         * parse.y: Fixed copyright assignment.
18165         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18166         size_zero_node when completing a loop with no exit condition.
18167         (for_statement_nsi:): Define action.
18168         (for_init:, for_update:): Return size_zero_node when empty.
18169         (declare_local_variables): Call build_debugable_stmt.
18170         (build_debugable_stmt): New function.
18171         (build_loop_body): Build debugable statement around loop
18172         condition part.
18173         (complete_loop_body): Take into account the debugable statement
18174         around the EXIT_EXPR.
18175         (complete_loop_body): New function.
18176         (patch_exit_expr): Fixed condition inversion.
18178 1998-09-02  Tom Tromey  <tromey@cygnus.com>
18180         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18181         name of thread define.
18182         * jvspec.c (THREAD_NAME): New macro.
18183         (GCLIB): Likewise.
18184         (THREADLIB): Likewise.
18185         (lang_specific_driver): Recognize attempt to link with thread
18186         library or gc library.  Recognize -ljava on command line so it
18187         isn't linked against more than once.
18189 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18191         * parse-scan.y (report_main_declaration): Name of the class
18192         containing `main' can be a qualified name.
18194 1998-08-31  Tom Tromey  <tromey@cygnus.com>
18196         * config-lang.in: Changed gjavac to gjc everywhere.
18197         * Make-lang.in: Changed gjavac to gjc everywhere.
18199 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18201         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18202         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18203         and install the files.
18204         * Makefile.in (JAVA_OBJS_LITE): New variable.
18205         (compiler:): Now include jv-scan as a dependency.
18206         (../jv-scan$(exeext), parse-scan.c): New targets.
18207         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18208         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18209         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18210         check for errors even if parse_only.
18211         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18212         defined.
18213         (yylex): New function. Uses java_lex body.
18214         (java_lex): Removed commented out statement. Remove local variable
18215         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18216         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18217         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18218         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18219         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18220         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18221         where appropriate.
18222         (java_lex_error): Empty if JC1_LITE is defined.
18223         (java_get_line_col): Return 0 if JC1_LITE is defined.
18224         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18225         SET_MODIFIER_CTX): Moved into the section containing the macros
18226         conditionally defined by JC1_LITE.
18227         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18228         argument if JC1_LITE is defined.
18229         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18230         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18231         is defined.
18232         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18233         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18234         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18235         to different values according to JC1_LITE.
18236         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18237         declared if JC1_LITE set.
18238         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18239         defined if JC1_LITE not set.
18240         (struct parser_ctx): Reorganized and skip the jc1 front end part
18241         if JC1_LITE set.
18242         (java_layout_classes): New function definition.
18243         (java_push_parser_context, java_init_lex, yyparse, yylex,
18244         yyerror): Prototype always declared. All other static function
18245         prototypes declared only if JC1_LITE is not set.
18246         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18247         declared in parse.h.
18248         (java_layout_classes): New function.
18249         (java_complete_expand_methods): No longer layout the class here.
18250         * parse-scan.y: New file.
18251         * jv-scan.c: New file.
18253 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18255         * gjavah.c (main): Handle -friend option.
18256         (friend_specs): New global.
18257         (generate_access): Handle friend_specs.
18258         (process_file): Likewise.
18259         (MAX_FRIENDS): New macro.
18260         (friend_count): New global.
18261         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18262         Changed all callers.
18264 1998-08-24  Per Bothner  <bothner@cygnus.com>
18266         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18267         (main):  Handle processing all the entries of a named .zip archive.
18268         * jcf-io.c (jcf_trim_old_input):  New function.
18269         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18271 1998-08-24  Per Bothner  <bothner@cygnus.com>
18273         * lang.c (flag_assume_compiled):  Make default be on.
18275 1998-08-21  Per Bothner  <bothner@cygnus.com>
18277         * jcf-dump.c:  Add bunches of flags to control output more.
18278         (process_class):  New function;  support printing more than one class.
18279         (main): Support new --print-main and --javap flags.
18280         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18281         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18283 1998-08-20  Per Bothner  <bothner@cygnus.com>
18285         Change mangling of dispatch table to match C++ vtable (w/thunks).
18286         * class.c (build_dtable_decl), java-tree.h:  New function.
18287         (make_class_data):  Call it.
18288         * decl.c (init_decl_processing):  Likewise.
18290 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18292         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18293         soft_anewarray; adjust args passed.
18294         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18295         match _Jv_NewObjectArray.
18297 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18299         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18300         * expr.c (loopup_label): Call create_label_decl.
18301         (create_label_decl): New function.
18302         (java_lang_expand_expr): Call expand_start_bindings with argument
18303         set to zero.
18304         * java-tree.h Added space after PROTO in function declarations
18305         when necessary.
18306         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18307         (create_label_decl, push_labeled_block): New function
18308         declarations.
18309         * lex.c (label_id): Initialize.
18310         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18311         switch.
18312         * parse.h Added space after PROTO in function declarations when
18313         necessary.
18314         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18315         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18316         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18317         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18318         macros.
18319         (struct parser_ctxt): New fields current_loop,
18320         current_labeled_block.
18321         (build_if_else_statement, patch_if_else_statement,
18322         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18323         generate_labeled_block, complete_labeled_statement,
18324         build_bc_statement, patch_bc_statement, patch_loop_statement,
18325         build_new_loop, build_loop_body, complete_loop_body): New function
18326         declarations.
18327         * parse.y (java_warning_count): New global variable.
18328         (label_id): New static variable.
18329         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18330         (block:): Return size_zero_node when block is empty.
18331         (empty_statement:): Return size_zero_node.
18332         (statement:): Implement supplemental action when for_statement: is
18333         reduced.
18334         (label_decl:): New rule.
18335         (labeled_statement:): Rewritten using label_decl. Actions
18336         implemented.
18337         (labeled_statement_nsi:): Likewise.
18338         (if_then_statement): Actions implemented.
18339         (while_expression): New rule.
18340         (while_statement:): Rewritten using while_expression. Actions
18341         implemented.
18342         (while_statement_nsi:): Likewise.
18343         (do_statement_begin:): New rule.
18344         (do_statement:): Rewritten using do_statement_begin. Actions
18345         implemented.
18346         (for_statement:): Rewritten using for_begin. Actions implemented.
18347         (for_statement_nsi:): Likewise.
18348         (for_header:, for_begin:): New rules.
18349         (for_init:): Actions implemented.
18350         (statement_expression_list:, break_statement:,
18351         continue_statement:): Likewise.
18352         (yyerror): Count number of issued warning(s).
18353         (java_report_errors): Report error(s) and/or warning(s).
18354         (java_complete_class): Use build_java_argument_signature to
18355         recompute completed method signature.
18356         (java_check_regular_methods): New locals method_wfl and aflags.
18357         Use method_wfl instead of lookup_cl during error reports. Fixed
18358         indentation and modified some error messages. Use
18359         lang_printable_name in method instead of the DECL_NAME. New code
18360         to issue warnings on methods not overriding corresponding methods
18361         private to a different package.
18362         (java_method_add_stmt): Call add_stmt_to_compound.
18363         (add_stmt_to_compound): New function.
18364         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18365         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18366         (build_if_else_statement, patch_if_else_statement,
18367         build_labeled_block, generate_labeled_block,
18368         complete_labeled_statement, build_new_loop, build_loop_body,
18369         complete_loop_body, patch_loop_statement, build_bc_statement,
18370         patch_bc_statement, patch_exit_expr): New functions.
18371         * typeck.c (build_java_signature): Build argument signature before
18372         enclosing it in between parenthesis.
18374 1998-08-17  Warren Levy  <warrenl@cygnus.com>
18376         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18377         (JAVA_OBJS): Added reminder comment
18379 1998-08-13  Nick Clifton  <nickc@cygnus.com>
18381         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18382         be interpreted as a long long.
18384 1998-08-13  Warren Levy  <warrenl@cygnus.com>
18386         * decl.c (init_decl_processing): Use _Jv_InitClass, not
18387         soft_initialise_class.  Use _Jv_NewMultiArray, not
18388         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
18389         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
18390         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
18391         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18393 1998-08-12  Per Bothner  <bothner@cygnus.com>
18395         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18396         length_identifier_node):  New global tree node constants.
18397         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
18398         Replace uses by super_identifier_node etc.
18399         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
18401         * parse.y (resolve_field_access):  Don't special-case ".length" if
18402         flag_emit_class_files.
18403         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
18404         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
18405         and ARRAY.length.
18407 1998-08-11  Per Bothner  <bothner@cygnus.com>
18409         * decl.c (init_decl_processing): Remove unused method_type_node fields.
18410         * class.c (make_method_value):  Remove init for removed fields.
18412         * class.c (layout_class):  Use build_java_argument_signature.
18413         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
18415         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
18416         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
18417         (build_java_signature):  Don't use push_java_argument_signature.
18419         * typeck.c (lookup_argument_method):  New function.
18420         * parse.y (java_check_regular_methods):  Use lookup_argument_method
18421         instead of lookup_java_method2 followed by lookup_java_method.
18423         * parse.y (check_method_redefinition):  Minor optimization.
18425         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
18426         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18428 1998-08-10  Tom Tromey  <tromey@cygnus.com>
18430         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18431         c-pragma.o.
18433         * gjavah.c (java_float_finite): Use K&R-style definition.
18434         (java_double_finite): Likewise.
18435         (generate_access): Now returns void.  Changed all callers.
18436         (last_access_generated): Removed.
18437         (process_file): Only make a single pass over the .class file.
18439 1998-07-29  Per Bothner  <bothner@cygnus.com>
18441         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
18442         for compatibility for G++ (with -fvtable-thunks).
18443         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
18445         * gjavah.c (process_file):  Use public inheritance for super-class.
18447 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18449         * lex.c (java_init_lex): Initialize ctxp->package.
18450         * parse.h (struct parser_ctxt): package and package_len replaced
18451         by tree package, an identifier node. Field method_decl_list is
18452         gone. Fixed comments.
18453         (lookup_field_wrapper, merge_qualified_name, not_accessible,
18454         class_in_current_package): New function prototypes.
18455         * parse.y (array_type:): Set class loaded flag on primitive type
18456         arrays.
18457         (package_declaration:): Assign ctxp->package to the
18458         identifier node.
18459         (method_invocation:): Handle invocation of method qualified by
18460         `super'.
18461         (single_type_import_declaration:): Removed ambiguity check.
18462         (java_pop_parser_context): New local variable `next'. Reset and
18463         set IMPORT_CLASSFILE_NAME flags on current and previous import
18464         list.
18465         (java_accstring_lookup): Use new local macro COPY_RETURN.
18466         (lookup_field_wrapper): New function.
18467         (parser_qualified_classname): Use merge_qualified_name.
18468         (parser_check_super_interface): Broaden error message.
18469         (do_resolve_class): Check for qualified class name in the current
18470         compilation unit if appropriate.
18471         (process_imports): Check for already defined classes.
18472         (check_pkg_class_access): Got rid of call to
18473         get_access_flags_from_decl.
18474         (java_complete_expand_methods): Call safe_layout_class based on
18475         the current class size.
18476         (make_qualified_primary): Build a WFL qualification on primary if
18477         none exists.
18478         (merge_qualified_name): New function.
18479         (make_qualified_name): Use merge_qualified_name.
18480         (resolve_expression_name): Use safe_lookup_field.
18481         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18482         (resolve_qualified_expression_name): Likewise. Check on resolved
18483         element accessibility.
18484         (not_accessible_p, class_in_current_package): New functions.
18485         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18486         (patch_method_invocation_stmt): Merged common pieces. Check
18487         accessibility of invoked method.
18488         (check_for_static_method_reference): Add returned type in error
18489         message.
18490         (invocation_mode): Get rid of bogus check on PRIVATE methods.
18491         (refine_accessible_methods_list): Merged two conditions in test.
18492         (java_complete_class): Sanity check on stabilize_ref gone.
18493         * zextract.c (read_zip_archive): Cast lseek second argument to long.
18495 1998-07-28  Per Bothner  <bothner@cygnus.com>
18497         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
18499 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18501         * gjavah.c (F_NAN): Removed.
18502         (F_NAN_MASK): New macro.
18503         (F_POSITIVE_INFINITY): Removed.
18504         (F_NEGATIVE_INFINITY): Likewise.
18505         (java_float_finite): Rewrote.
18506         (D_NAN_MASK): Renamed.
18507         (java_double_finite): Rewrote.
18508         (D_POSITIVE_INFINITY): Removed.
18509         (D_NEGATIVE_INFINITY): Likewise.
18511         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18512         If verbose, print underlying representation of value in hex.
18514 1998-07-24  Per Bothner  <bothner@cygnus.com>
18516         * buffer.h, buffer.c:  New files.
18517         * Makefile.in (JAVA_OBJS):  Add buffer.o.
18519         Support locals variables and writing their debug entries to .class.
18520         * jcf-write.c:  Simplify some by user new buffer type.
18521         (vode_buffer_grow):  Removed.
18522         (struct localvar_info):  New type.
18523         (localsvars, localvartable):  New buffers.
18524         (localvar_alloc, localvar_free):  New functions.
18525         (generate_bytecode_insns):  Handle local variables.
18526         (generate_classfile):  Write LocalVariableTable attribute.
18528 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18530         * jcf-io.c (open_in_zip): Check the zipfile magic number.
18531         * zipfile.h (ZIPMAGIC): New macro.
18533 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18535         * Makefile.in (gjavah.o): Updated dependencies.
18536         (jcf-dump.o): Likewise.
18537         (all.indirect): Use ../gjavah.
18538         (../gjavah$(exeext)): Likewise.
18539         (clean): Don't remove gjavah.
18540         (clean): Remove parse.c, not java/parse.c.
18541         * Make-lang.in (java): Added gjavah.
18542         (gjavah$(exeext)): New target.
18543         (GJAVAH_SOURCES): New macro.
18544         (java.all.build): Added gjavah.
18545         (java.all.cross): Likewise.
18546         (java.rest.encap): Likewise.
18547         * config-lang.in (compilers, stagestuff): Added gjavah.
18549 1998-07-23  Tom Tromey  <tromey@cygnus.com>
18551         * gjavah.c (java_float_finite): New function.
18552         (java_double_finite): Likewise.
18553         (F_POSITIVE_INFINITY): New macro.
18554         (F_NEGATIVE_INFINITY): Likewise.
18555         (F_NAN): Likewise.
18556         (D_POSITIVE_INFINITY): Likewise.
18557         (D_NEGATIVE_INFINITY): Likewise.
18558         (D_NAN): Likewise.
18559         (print_field_info): Use java_float_finite and java_double_finite.
18561 1998-07-23  Per Bothner  <bothner@cygnus.com>
18563         * parse.y (method_header):  Name "this" implicit argument.
18565 1998-07-22  Per Bothner  <bothner@cygnus.com>
18567         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
18568         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
18569         (put_linenumber):  New function.
18570         (generate_bytecode_insns, generate_classfile):  Write line numbers.
18572 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18574         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
18575         (lookup_name, build_known_method_ref, build_class_init,
18576         build_invokevirtual, invoke_build_dtable, match_java_method,
18577         build_field_ref, pushdecl_force_head, build_java_binop,
18578         binary_numeric_promotion, build_decl_no_layout,
18579         build_java_arrayaccess, build_newarray, build_anewarray,
18580         build_java_array_length_access, build_java_arraynull_check): New
18581         extern function prototypes.
18582         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18583         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
18584         java-tree.h.
18585         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
18586         to NULL
18587         * jcf.h (jcf_out_of_synch): New extern function prototype.
18588         * parse.h: Static/global function implemented in parse.y
18589         prototyped and declarations moved at the end of the file.
18590         (DECL_P): Check that the argument isn't null.
18591         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18592         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
18593         (QUAL_DECL_TYPE): New macro.
18594         (PARAMS): Macro definition removed.
18595         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
18596         (return_statement:): Call build_return.
18597         (field_access:): Call make_qualified_primary in sub rule.
18598         (method_invocation:): Build method invocation and call
18599         make_qualified_primary when processing primaries.
18600         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
18601         get_type_from_signature.
18602         (java_check_regular_method): Extra integer 0 argument when calling
18603         lookup_java_method2.
18604         (lookup_java_interface_method2): Extra method DECL argument when
18605         calling lookup_java_interface_method2.
18606         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
18607         COMPOUND_EXPR node.
18608         (java_complete_expand_method): Layout current class iff not
18609         already done. Don't process interface's methods.
18610         (java_complete_expand_method): Use super class only if it
18611         exists. Use current class otherwise.
18612         (make_qualified_primary): New function.
18613         (resolve_expression_name): Process qualified expression or
18614         expression from primary the same way.
18615         (resolve_expression_name): Two last arguments to
18616         resolve_field_access are now NULL_TREEs.
18617         (resolve_field_access): New variable is_static. Local field must
18618         be DECLs. is_static computed on field DECLs only. Append code in
18619         where_found to the field access if necessary. Use QUAL_DECL_TYPE
18620         to initialize field_type.
18621         (resolve_qualified_expression_name): New local variable,
18622         previous_call_static and is_static. Handle primaries with function
18623         calls, casts, array references and `this'. `super' now handled as
18624         `(super_class)this'. Use is_static to clarify boolean expressions.
18625         Added code to handle case where a proper handle is required to
18626         access a field. Use QUAL_DECL_TYPE where applicable.
18627         (maybe_access_field): New function.
18628         (patch_method_invocation_stmt): New arguments primary, where,
18629         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
18630         deleted. Use `where' as a type to search from if specified. Check
18631         for static method reference where forbidden. Append primary or
18632         current_this to the argument list if not calling constructor nor
18633         static methods.
18634         (check_for_static_method_reference): New function.
18635         (patch_invoke): Layout the class on which new is done if
18636         necessary.
18637         (lookup_method_invoke): Changed format to report errors on
18638         methods.
18639         (qualify_ambiguous_name): New local variable this_found. Now
18640         handle things from primaries. Method call are considered
18641         expression names.
18642         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
18643         changed into NULLs.
18644         (not_initialized_as_it_should_p): Comply with the new DECL_P.
18645         (java_complete_tree): New case fo RETURN_EXPR. Process function
18646         call arguments in separate function.
18647         (complete_function_arguments): New function.
18648         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
18649         anymore.
18650         (patch_assignment): Take the return function slot into account as
18651         a RHS. Distinguish assignment from a return.
18652         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
18653         when checking methods in interfaces.
18654         (resolve_type_during_patch): NULL argument to unresolve_type_p
18655         instead of NULL_TREE.
18656         (patch_newarray): Fixed typo in comment.
18657         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
18658         (build_return, patch_return): New functions.
18659         * typeck.c (lookup_java_constructor): Fixed typo in comment.
18661 1998-07-21  Per Bothner  <bothner@cygnus.com>
18663         * constants.c (find_name_and_type_constant, find_fieldref_index,
18664         find_methodref_index):  New methods.
18665         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
18666         just return given method.  Also, rename to build_known_method_ref.
18667         (expand_invoke):  Rename call to build_invoke_non_interface.
18668         * java-tree.h, parse.h:  Update prototype.
18669         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
18670         (such as expand_expr_stmt) if flag_emit_class_files.
18671         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
18672         STACK_TARGET, IGNORE_TARGET):  New macros.
18673         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
18674         (generate_bytecode_insn):  New function to generate method's bytecode.
18675         (generate_classfile):  Node generate Code attribute for a method.
18676         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
18677         push_long_const, field_op, adjust_typed_op, maybe_wide):
18678         New functions used by generate_bytecode_insn.
18680         * typeck.c (signature_include_return):  Remove variable.
18681         (push_java_argument_signature, build_java_argument_signature):  New.
18682         (build_java_signature):  Use push_java_argument_signature.
18683         * parse.y:  Use build_java_argument_signature instead of fiddling
18684         with signature_include_return.
18686 1998-07-17  Tom Tromey  <tromey@cygnus.com>
18688         * gjavah.c (print_c_decl): Always generate JArray<>* for array
18689         types.
18691         * Makefile.in (all.indirect): Added gjavah$(exeext).
18692         (gjavah$(exeext)): Added $(exeext).
18693         (clean): Likewise.
18695 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18697         * class.c (layout_class): Call to java_layout_parsed_class replace
18698         by safe_layout_class.
18699         * expr.c (build_java_array_length_access): Removed static storage
18700         class in the function definition.
18701         (build_java_arraynull_check): Likewise.
18702         Also fixed typos in two comments.
18703         * lex.c (java_init_lex): Initialize static global kw_length.
18704         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
18705         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
18706         java_lex_error.
18707         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
18708         * parse.h (resolve_no_layout): New static function declaration.
18709         (get_identifier_in_static): Declaration removed.
18710         (java_layout_parsed_class): Function name declaration changed to
18711         safe_layout_class.
18712         (build_newarray_node, patch_newarray, resolve_type_during_patch,
18713         not_initialized_as_it_should_p, build_this): New static function
18714         declarations.
18715         (pushdecl_force_head, build_java_binop, int_fits_type_p,
18716         binary_numeric_promotion, stabilize_reference,
18717         build_decl_no_layout, build_java_arrayaccess): Extern function
18718         declarations moved into their own section.
18719         (build_newarray, build_anewarray, build_java_array_length_access,
18720         build_java_arraynull_check): New extern function declarations.
18721         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
18722         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
18723         fake tree codes.
18724         (CALL_CONSTRUCTOR_P): New macro.
18725         * parse.y (kw_length): New static global tree node.
18726         (return_statement): Tagged <node>.
18727         (RETURN_TK): Tagged <operator>.
18728         (variable_declarator_id:): Build variable declaration with an
18729         empty initialization value if a syntax error was found in the
18730         initialization part of the variable declaration.
18731         (statement_without_trailing_substatement:): return_statement: now
18732         uses the default rule.
18733         (return_statement:): Temporarily fixed to return NULL_TREE.
18734         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
18735         (class_instance_creation_expression:): Class creation rules now
18736         call build_method_invocation upon reduction.
18737         (array_creation_expression:): Rules call build_newarray_node upon
18738         reduction.
18739         (dim_exprs:): Build a list of dimension expressions.
18740         (dim_expr:): Store location of the OSB_TK in the dimension
18741         expression node.
18742         (method_invocation:): Added a new error rule.
18743         (build_unresolved_array_type): WFL argument may also be an array
18744         on a primitive type. Name of the argument changed to reflect this.
18745         (method_declarator): Insert argument type at the beginning of the
18746         argument type list and later reverse the list.
18747         (unresolved_type_p): Argument 'returned' may be optionally
18748         NULL_TREE.
18749         (java_layout_class_from_source): Function renamed
18750         safe_layout_class.
18751         (resolve_and_layout): Now call resolve_no_layout and
18752         safe_layout_class.
18753         (resolve_no_layout): New function.
18754         (purify_type_name): New function.
18755         (complete_class_report_errors): Call purify_type_name during error
18756         report on a type not found.
18757         (process_imports): error_found local variable doesn't need to be
18758         initialized to zero.
18759         (declare_local_variables): New local type_wfl. Fixed typo in error
18760         message. type_wfl assigned to unresolved type and used to register
18761         incomplete type. Build a WFL around the variable initialization
18762         statement so that debug info can be generated on it.
18763         (source_start_java_method): Reverse argument list after they've
18764         been processed.
18765         (current_this): New static global variable.
18766         (java_complete_expand_methods): Set current_this when appropriate.
18767         (resolve_expression_name): Build correct static and non static
18768         field access bearing a simple name.
18769         (resolve_field_access): Resolve the length field of arrays. Handle
18770         f.m() cases.
18771         (patch_method_invocation_stmt): Set the type of the method
18772         invocation to error_mark_node. This value is later overridden by a
18773         valid type, if any. Don't handle qualified constructor invocation
18774         as qualified method invocation. Call lookup_method_invoke with its
18775         new flag. It's no longer necessary to access the selected method
18776         as the value of a tree list. Handle constructor invocation.
18777         (patch_invoke): Reverse argument list when invoking non interface
18778         methods. Insert call to new as the first argument of the
18779         constructor.
18780         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
18781         defined within a final class. Return INVOKE_STATIC if the invoked
18782         method is a constructor.
18783         (lookup_method_invoke): New lc argument is a flag to indicate a
18784         constructor lookup. Now handle constructor lookup. Choose the most
18785         specific method in case several were matching the invocation
18786         requirements. Return a method decl instead of a tree list featuring
18787         one single method decl element.
18788         (refine_accessible_methods_list): New lc flag argument to
18789         indicate that a constructor is being looked up.
18790         (not_initialized_as_it_should_p): New function.
18791         (java_complete_tree): Now process fake tree codes
18792         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
18793         save_expr on resolved function call arguments. Case on
18794         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
18795         (patch_assignment): LHS can be a field access expression. When
18796         dealing with reference, lhs_type is the promoted type of the
18797         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
18798         applicable.
18799         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18800         (patch_binop): Use not_initialized_as_it_should_p where
18801         applicable.
18802         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18803         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
18804         where applicable.
18805         (resolve_type_during_patch): New function.
18806         (patch_cast): Call resolve_type_during_patch to resolve type and
18807         report error accordingly.
18808         (patch_array_ref): Use not_initialized_as_it_should_p where
18809         applicable. Array base expression is saved before being
18810         used. Promote the type of an array elements if it contains non
18811         builtin types.
18812         (build_newarray_node, patch_newarray, build_this): New functions.
18814 1998-07-16  Tom Tromey  <tromey@cygnus.com>
18816         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
18817         increment it in `for' statement.
18818         (print_field_info): If number is inf or nan, don't print it.
18819         (print_method_info): If method name is `delete', just ignore it.
18820         (print_c_decl): Special-case jstringArray.
18822         * gjavah.c (help): New function.
18823         (no_argument): New function.
18824         (usage): Changed text.
18825         (main): Rewrote argument handling.  Now handles -v, --help,
18826         --version.
18827         (version): New function.
18828         (found_error): New global.
18829         (main): Return found_error.
18830         (generate_access): Set found_error.
18831         (print_c_decl): Likewise.
18833 1998-07-15  Tom Tromey  <tromey@cygnus.com>
18835         * gjavah.c (print_c_decl): Don't print "," when examining field.
18836         Skip type name when looking at "[L" types.
18837         (process_file): Now static.
18838         (generate_access): Now returns int.
18839         (last_access_generated): New global.
18840         (process_file): Clear last_access_generated; make multiple passes
18841         over the class.
18842         (print_field_info): Just return if generate_access returns true.
18843         (print_method_info): Likewise.  Also, allow <init> functions to
18844         pass through.
18845         (print_c_decl): Added is_init argument.  Print constructors
18846         properly.
18847         (print_cxx_classname): Use UTF8_GET to extract characters from
18848         string.
18849         (print_base_classname): New function.
18850         (print_class_decls): New function.
18851         (process_file): Use it.
18852         (utf8_cmp): New function.
18854 1998-07-13  Nick Clifton  <nickc@cygnus.com>
18856         * lang-options.h: Format changed to match changes in gcc/toplev.c
18857         to implement a --help option.
18859 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
18861         * decl.c (init_decl_processing): Revert change to dtable_type.
18863 1998-07-09  Per Bothner  <bothner@cygnus.com>
18865         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
18867 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
18869         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
18871         * lang.c (lang_init): Default flag_exceptions to 1, without
18872         checking to see if it's 2 first.
18874 1998-07-08  Jeffrey A Law  (law@cygnus.com)
18876         * constants.c: Include "system.h".
18877         * decl.c: Likewise.
18878         * lang.c (flag_new_exceptions): Get via extern now.
18879         (lang_init_options): New functions.  Turn on flag_new_exceptions.
18881 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18883         * lex.c (java_lex): Return 0 when we see an invalid character in
18884         the input.
18886         * lex.c (java_read_char): Specify extra argument when calling
18887         java_lex_error.
18888         (java_read_unicode, java_parse_end_comment,
18889         java_parse_escape_sequence): Likewise,
18890         (java_lex): Specify extra argument when calling
18891         java_lex_error. Test that IDs are beginning with a legal character
18892         for IDs. Handle invalid characters with an error message and a
18893         call to java_lex_error.
18894         (java_lex_error): Adjust column position by new argument
18895         `forward'. Issue an error even if in the middle of reporting an
18896         other error.
18898 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
18900         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
18901         we don't explicitly put a null pointer when we're copying it.
18903 1998-07-07  Tom Tromey  <tromey@cygnus.com>
18905         * gjavah.c (print_cxx_classname): New function.
18906         (super_class_name): Likewise.
18907         (print_super_fields): Removed.
18908         (in_super): Removed.
18909         (print_field_info): Never generate #defines.
18910         (print_c_decl): Changed generated types to match JNI.  No longer
18911         print class name before method name.
18912         (print_method_info): Print "static" before static methods.
18913         Print "virtual" before non-final methods.
18914         (usage): Use exit(1), not exit(-1).
18915         (main): Likewise.
18916         (print_field_info): Use %.17g to print a double.
18917         (last_access): New globals.
18918         (process_file): Initialize last_access.
18919         (usage): Now static.
18920         (ACC_VISIBILITY): New define.
18921         (generate_access): New function.
18922         (print_field_info): Call it.
18923         (print_method_info): Likewise.  Also, generate information for all
18924         methods, not just native methods.  Return void.
18925         (print_c_decl): Return void.
18926         (print_field_info): Return void.
18928 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18930         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
18931         processing the jc1 grammar file. Prefix bison functions and
18932         variables with java_.
18933         (parse.c): Dependencies on parse.h and lex.h
18934         * expr.c (build_java_arrayaccess): Function now global.
18935         * java-tree.h: Comment reorganized to carry on previous
18936         classification effort.
18937         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
18938         RESOLVE_TYPE_NAME_P): New flags on WFLs.
18939         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
18940         java_parse (new prefix java_ generated by bison).
18941         (java_layout_parsed_class, java_register_parsed_class): Function
18942         call removed.
18943         (yyparse): Removed unnecessary call to init_outgoing_cpool.
18944         * lex.c (static tree wfl_op): Variable deleted.
18945         (java_init_lex): Initialize kw_super and kw_this. Initialize more
18946         ctxp fields to NULL_TREE.
18947         (java_lex): No longer create WFL for operators. Filename caching
18948         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
18949         created as STRING_CST and later expanded. Removed extra argument
18950         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
18951         and SUPER.
18952         (build_wfl_node): Removed code in comments.
18953         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
18954         store token and location data in the current bison token.
18955         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
18956         static/extern function declaration at the beginning of the file.
18957         (struct qualification): Data structure definition deleted.
18958         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
18959         (qualify_ambiguous_name): Function declaration modified. Function
18960         now returns nothing.
18961         (build_array_ref, patch_array_ref, make_qualified_name,
18962         resolve_qualified_expression_name, maybe_generate_clinit,
18963         resolve_field_access): New static function declarations.
18964         (build_java_arrayaccess): New extern function declaration.
18965         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
18966         (CALL_EXPR_PRIMARY): Macro deleted.
18967         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
18968         (struct parser_ctxt): Field initialized_final
18969         removed. non_static_initialized, static_initialized: New fields.
18970         * parse.y (static tree kw_super, static tree kw_this): New global
18971         static.
18972         (%union): tree wfl field of operator member replaced by int
18973         location. WFLs are non longer created for operators.
18974         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
18975         (qualified_name:): Now calls make_qualified_name to build the
18976         identifier.
18977         (type_declaration:): Consider generating <clinit> when class
18978         parsing completed.
18979         (variable_declarator:): Directly build an assignment node when the
18980         variable is initialized when declared.
18981         (this_or_super:): Build a WFL and set current location when THIS
18982         or SUPER are parsed.
18983         (expression_statement:): Wrap statement around a WFL.
18984         (primary_no_new_array:): Fixed typo. Changed value returned by
18985         THIS_TK because of its new type (temporary).
18986         (dim_exprs:): Temporary fix because of OSB_TK's new type.
18987         (field_access:): Build qualified name with SUPER.
18988         (method_invocation:): Fixed returned value because of SUPER's new
18989         type.
18990         (array_access:): Use OSB_TK location information.
18991         (post_increment_expression:, post_decrement_expression:,
18992         unary_expression:, pre_increment_expression:,
18993         pre_decrement_expression:, unary_expression_not_plus_minus:,
18994         cast_expression:, multiplicative_expression:,
18995         additive_expression:, shift_expression:, relational_expression:,
18996         equality_expression:, and_expression:, exclusive_or_expression:,
18997         inclusive_or_expression:, conditional_and_expression:,
18998         conditional_or_expression:, assignment:): Use new location/token
18999         information available on operators.
19000         (create_class): Set super_decl_type to NULL_TREE when processing
19001         java.lang.Object.
19002         (register_fields): Field initialization is now a MODIFY_EXPR
19003         node. Chain initialization code to the matching lists (according
19004         to the field declaration modifiers).
19005         (maybe_generate_clinit): New function.
19006         (method_header): Don't set method's DECL_NAME to a WFL when adding
19007         methods to java.lang.Object.
19008         (resolve_and_layout): Now can return NULL_TREE if the type
19009         resolution fails. Otherwise, return the class DECL instead of its
19010         TYPE.
19011         (check_method_redefinition): Don't patch method DECL_NAME if it
19012         belongs to java.lang.Object.
19013         (process_imports): Simply assign error_found to the value returned
19014         by check_pkg_class_access.
19015         (declare_local_variables): Don't use their init statements (if
19016         any) when parsing error were previously found. Reuse MODIFY_EXPR
19017         build during parsing as an init statement.
19018         (java_method_add_stmt): Now return the current method body.
19019         (java_layout_parsed_class, java_register_parsed_class): Functions
19020         removed.
19021         (java_complete_expand_methods): Initialize the constant pool on a
19022         per class basis. Layout the classes before expanding their method
19023         bodies. Don't try expand artificial constructor code if error were
19024         found. Make the classes data and register them if no error were
19025         found.
19026         (java_complete_expand_method): Retrieve an artificial constructor
19027         argument list before entering its body. Assign the top block to
19028         the artificial constructor function body and set types of declared
19029         blocks and compound statements to void. Walk method body if not an
19030         artificial constructor.
19031         (make_qualified_name, cut_identifier_in_qualified): New functions.
19032         (resolve_expression_name): Fixed comments. Save/restore the
19033         current class CLASS_LOADED_P flag value. Build non qualified
19034         static field access and handle qualified expression names.
19035         (resolve_field_access, resolve_qualified_expression_name): New
19036         functions.
19037         (patch_method_invocation_stmt): Use the new expression resolution
19038         scheme, calling resolve_field_access when the function call is
19039         resolved as an expression.
19040         (qualify_ambiguous_name): Function rewritten to work on qualified
19041         expression produced by make_qualified_name.
19042         (java_complete_tree): Promote type when function's argument are
19043         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19044         the assignment to discover further errors if RHS is a expression
19045         name that fails to evaluate. Declare LHS initialized even though
19046         the assignment failed. Don't use the location variable and removed
19047         extra argument in patch function calls. Now handle the ARRAY_REF
19048         case and build internal string representation when STRING_CSTs are
19049         walked.
19050         (build_method_invocation): Don't wrap function call around a WFL.
19051         (build_assignment): Likewise. Use the operator location
19052         information.
19053         (patch_assignment): Handle array access LHSs. Handle error
19054         provenance, resulting in a better error report.
19055         (build_binop): Use op_location from operator as binop location
19056         information.
19057         (build_unaryop, build_incdec, build_cast): Likewise.
19058         (patch_binop): Extract location information from the node. Fixed
19059         typo in error message.
19060         (patch_unary_op): Extract location information from the node.
19061         (build_array_ref, patch_array_ref): New functions.
19063 1998-07-01  Tom Tromey  <tromey@cygnus.com>
19065         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19066         match _Jv_IsInstanceOf.
19067         * decl.c (init_decl_processing): Use _Jv_NewArray, not
19068         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
19070 1998-06-30  Tom Tromey  <tromey@cygnus.com>
19072         * decl.c (init_decl_processing): Functions are now named
19073         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19075 1998-06-29  Per Bothner  <bothner@cygnus.com>
19077         * java-tree.h (load_class):  Add prototype.
19078         * class.c (is_compiled_class):  Add missing arg to load_class.
19079         * expr.c (expand_java_NEW):  Call load_class.
19080         * parse.y (process_import):  Removed bogus use of void return value.
19082 1998-06-25  Per Bothner  <bothner@cygnus.com>
19084         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
19085         Function name is "_Jv_Throw" instead of "soft_athrow".
19086         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
19087         Function name is "_Jv_AllocObject" instead of "soft_new".
19088         Takes an extra parameter (object size).
19089         * expr.c:  Update calls.
19091 1998-06-24  Per Bothner  <bothner@cygnus.com>
19093         * lex.c (java_get_line_col):  Handle end-of-file.
19094         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
19096 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
19098         * lang.c (lang_init): Make -fexceptions the default.
19099         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19100         exception handling is not turned on.
19102 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
19104         * lang.c (flag_new_exceptions): Make this this default.
19105         * decl.c (end_java_method): Call emit_handlers.
19106         * except.c (method_init_exceptions): Set language code and version.
19107         (expand_start_java_handler): Enable exception, and call
19108         expand_eh_region_start.
19109         (expand_end_java_handler): Enable exception, and set up catch blocks.
19110         (emit_handlers): New routine to generate the saved handlers.
19111         * java-except.h (emit_handlers): Add prototype.
19113 1998-06-12  Per Bothner  <bothner@cygnus.com>
19115         We used to have three different representations of the constant pool:
19116         the CPool structure, the tree_constant_pool, and the constructures
19117         used to build the Class object (which may need class and string
19118         constants) in compiled code.  None were appropriate for compiling
19119         to .class files, so I did a major overhaul.
19121         First, the tree_constant_pool array was removed.  Things were
19122         modified to the CPool structure in the JCF could be used.
19123         Second, a "capacity" field was added to the CPool, and functions
19124         written to search for a matching constant, adding one if not found.
19125         The code that generated the Class object was changed to use a CPool.
19126         The actual TREE_LISTs used to build the CONSTRUCTORs used for
19127         the static Class object are now only in build_constants_constructor.
19128         Finally, I wrote code which can generate a .class file (including its
19129         constant pool) from the RECORD_TYPE of a class.  This is a big step
19130         on the way to compiling Java source into .class files.
19132         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
19133         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
19135         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19136         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
19137         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19138         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19139         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
19140         (lang_type):  Removed constant_pool field.
19141         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
19142         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19143         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
19144         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19146         * constants.c (current_constant_pool_tags, current_constant_pool_data,
19147         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19148         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
19149         (set_constant_entry, find_constant1, find_constant2,
19150         find_class_constant, count_constant_pool_bytes, write_constant_pool,
19151         find_utf8_constant, find_class_or_string_constant):  New functions.
19153         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
19154         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
19155         (give_name_to_class, get_class_constant):  Likewise.
19156         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
19157         (get_name_and_type_constant, get_ref_constant):  Removed.
19158         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
19159         * parse.y:  Don't save/restore tree_constant_pool.
19160         * verify.c (verify_jvm_instructions):  Update for new approach.
19161         * expr.c (expand_invoke, expand_java_field_op): Likewise.
19163         * lang-options.h:  Added -femit-class-file, -femit-class-files.
19164         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
19165         (lang_f_options):  Added "emit-class-file(s)".
19167         * expr.c (build_java_arrayaccess):  Generate more efficient array
19168         bounds checking, by using unsigned compare.
19170         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
19172 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19174         * parse.h: New comment on the handling of unresolved type
19175         identifiers. JDEPs are now part of the jdep_code enum.
19176         (typedef struct jdep): Now use enum jdep_code or int, depending on
19177         availability. Both are narrowed down to an 8 bits bitfield.
19178         (CALL_EXPR_PRIMARY): Fixed comment.
19180 1998-06-10  Tom Tromey  <tromey@cygnus.com>
19182         * Make-lang.in (java): Added gjavac and jvgenmain.
19183         (java.start.encap): Depend on gjavac.
19184         (java.rest.encap): Depend on jvgenmain.
19186         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19187         (JAVA_CROSS_NAME): Likewise.
19188         (java.all.build): Depend on jvgenmain and gjavac.
19189         (java.all.cross): Depend on jvgenmain and gjavac-cross.
19190         (jvgenmain$(exeext)): New target.
19191         (java.install-common): Wrote.
19192         * config-lang.in (compilers, stagestuff): Added gjavac and
19193         jvgenmain.
19195 1998-06-10  Dave Brolley  <brolley@cygnus.com>
19197         * lang.c (lang_decode_option): New argc/argv interface.
19199 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19201         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19202         * decl.c (build_decl_no_layout): New function.
19203         * expr.c (java_lang_expand_expr): Layout declarations found in
19204         blocks before they're pushed.
19205         * jcf-parse.c (load_class): Save current line when parsing class
19206         file.
19207         (parse_source_file): Register class before expanding their
19208         methods.
19209         * lang.c (put_decl_node): Produce `null' when `void *' is
19210         processed.
19211         * lex.c (static tree wfl_op): New static global, for error report
19212         on casts.
19213         (java_init_lex): wfl_operator and wfl_op initialized
19214         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19215         parsed.
19216         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19217         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19218         build_unresolved_array_type): New static function definitions.
19219         (build_decl_no_layout): New extern function declared.
19220         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19221         faulty modifier exists.
19222         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19223         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19224         (UNARY_PLUS_EXPR): New fake operator.
19225         (struct parser_ctxt): New field osb_number.
19226         * parse.y (static tree wfl_operator): New static WFL for operator
19227         bound error messages.
19228         (DECR_TK, INCR_TK): Moved.
19229         (OP_TK): Tagged <operator>.
19230         (array_type:): Now call build_unresolved_array_type.
19231         (dim_expr:): Count the number of '[' seen.
19232         (post_increment_expression, post_decrement_expression,
19233         pre_increment_expression, pre_decrement_expression,
19234         unary_expression_not_plus_minus, unary_expression:): Actions are
19235         now building the corresponding unary expressions.
19236         (cast_expression:): Actions are now building cast expressions.
19237         (build_unresolved_array_type): New function.
19238         (create_interface): Reset the number of declared interfaces.
19239         (create_class): Likewise.
19240         (method_header): Methods declared within the scope of an interface
19241         are now implicitly set public and abstract.
19242         (java_complete_class): Variable's and parameter's type are patched
19243         with a promoted type.
19244         (declare_local_variables): Resolved non builtin types are promoted
19245         before being used to build a variable decl. Removed type patch
19246         posted on variable initialization statement.
19247         (source_start_java_method): Use build_decl_no_layout to build the
19248         decl of a parameter of incomplete type.
19249         (java_register_parsed_class): Process interfaces too. Call
19250         rest_of_decl_compilation on each processed class declarations.
19251         (java_complete_expand_methods): Don't attempt to expand things in
19252         interfaces.
19253         (java_complete_tree): Process CONVERT_EXPR, even though it always
19254         has a type. Propagate error_mark_node to node's type too. Promote
19255         method's call argument type and return error_mark_node if
19256         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19257         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19258         handle unary operator nodes.
19259         (build_assignment): Added comment.
19260         (print_int_node): New function.
19261         (patch_assignment): New second argument. New error handling. Use
19262         print_int_node. Handle references. Use can_cast_to_p to issue
19263         different error message according to the context and check upon
19264         the initialization of the RHS.
19265         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19266         (operator_string): Handle more operators.
19267         (patch_binop): No longer use a function static
19268         wfl_operator. Improved error message on shift distance.
19269         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19270         patch_cast): New functions.
19272 1998-06-05  Per Bothner  <bothner@cygnus.com>
19274         * jvspec.c:  New file.
19275         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19277         * java-tree.h (identifier_subst):  Add declaration.
19279 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19281         * jvgenmain.c (main): Generate call to JvRunMain.
19283         * class.c (make_class_data): Push value for "sync_info" field.
19284         * decl.c (init_decl_processing): Push "sync_info" field.
19286 1998-06-03  Per Bothner  <bothner@cygnus.com>
19288         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19289         Java (source) name, not signature.
19290         Set TYPE_ALIGN to (at least) that of element_type.
19292 1998-06-02  Per Bothner  <bothner@cygnus.com>
19294         * class.c:  Moved classname-mangling-rekated code to ...
19295         * mangle.c:  ... this new file.
19296         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19297         * Makefile.in:  Update for above changes.
19299 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19301         * expr.c (truthvalue_conversion): Convert integer and floating
19302         point value to their truth value.
19303         * lex.c (java_lex): Handle the `null' literal.
19304         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19305         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19306         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19307         New macros.
19309         * parse.y: Reorganization/documentation on token declaration.
19310         (binop_lookup[]): New added new tree codes.
19311         (relational_expression): Build corresponding binary operators.
19312         (equality_expression, conditional_and_expression,
19313         conditional_or_expression): Likewise.
19314         (java_complete_class): Fix crash in debug message.
19315         (java_complete_tree): Check initialization of method call
19316         arguments. Further bogus node evaluation to detect more error
19317         during assignments. Handles more binary operators.
19318         (patch_assignment): Use DECL_P.
19319         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19320         code.
19321         (operator_string): Handle more case. Compacted source.
19322         (patch_binop): Changed function comment. Checking for
19323         uninitialized first operand takes the compound assignment into
19324         account and uses DECL_P. Checking for uninitialized second operand
19325         delayed to routine's end. Use macros to issue type bound error
19326         messages and issue messages on both operands if their types are
19327         different. Force fixed type into node. Handle all binary
19328         operators.
19330 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19332         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19333         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19334         build operator node and return tokens.
19335         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19336         * parse.h (java_complete_tree): Changed returned type in prototype.
19337         (build_method_invocation, build_assignment, patch_assignment,
19338         patch_binop): New static function declarations.
19339         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19340         BUILD_EXPR_WFL): New macros.
19341         * parse.y (enum tree_code binop_lookup[]): New static for token to
19342         TREE_CODE lookup.
19343         (%union): Parser union has new sub-structure `operator'.
19344         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19345         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19346         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19347         ASSIGN_ANY_TK): Tokens tagged `operator'.
19348         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19349         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19350         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19351         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19352         (assignment_operator:): Rule tagged `operator'.
19353         (expression_statement:): Re-installed default rule.
19354         (method_invocation:): Sub rules call build_method_invocation.
19355         (postfix_expression:): Don't attempt to resolve name here. Just
19356         return an ID.
19357         (multiplicative_expression:): Sub-rules build corresponding binop
19358         expression node.
19359         (additive_expression:, shift_expression:, and_expression:,
19360         exclusive_or_expression:, inclusive_or_expression:): Likewise.
19361         (assignment:): Sub rule invoke build_assignment.
19362         (assignment_operator:): Default rules on sub rules.
19363         (force_error): Added documentation on this variable.
19364         (declare_local_variables): Build initialization calling
19365         build_assignment.
19366         (expand_start_java_method): Removed unused rtx declaration. Mark
19367         arguments as already initialized.
19368         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19369         (java_complete_expand_methods): Don't process next method if
19370         completion of the previous one triggered errors.
19371         (java_complete_expand_method): Call source_end_java_method if no
19372         error were found during completion.
19373         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19374         locals declaratilon. Handle names found within a class. Return
19375         error_mark_node when things aren't found.
19376         (patch_method_invocation_stmt): Return error_mark_node on failures.
19377         (patch_invoke): Removed unused local. Return the correct node.
19378         (java_complete_tree): Now returns a value. The BLOCK section binds
19379         local identifiers and the type of a BLOCK is now void. Assign the
19380         result of operand completion on COMPOUND_EXPR. Assign the
19381         encapsulated node of a WFL to the result of its completion, except
19382         when the node is an identifier. Now handle MODIFY_EXPR and several
19383         binary operators. Return error_mark_node on errors.
19384         (build_method_invocation, build_assignment, patch_assignment,
19385         build_binop, operator_string, patch_binop): New functions.
19386         * typeck.c (binary_numeric_promotion): New function.
19388 1998-05-21  Per Bothner  <bothner@cygnus.com>
19390         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
19391         Replace most uses of ident_subst by identifier_subst.
19393         * class.c (push_class_static_dummy_field):  Removed function.
19394         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
19395         instead of looking got "class" static field.  Create that decl here.
19396         (class_identifier_node):  Removed;  no longer needed.
19397         (init_class_processing):  Don't init class_identifier_node.
19398         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
19399         Do nreverse 0 times (instead of twice) for Object and Class.
19400         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19402 1998-05-20  Per Bothner  <bothner@cygnus.com>
19404         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
19405         while initializing linenumber_count and linenumber_table.
19406         Do it before init_function_start (which calls emit_line_note).
19407         * expr.c (expand_byte_code):  Don't need to clear lineno here.
19409 1998-05-18  Tom Tromey  <tromey@cygnus.com>
19411         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19412         then mangle number as _N_.
19414         * class.c (mangle_class_field): New function.
19415         (build_class_ref): Set assembler name of class reference using
19416         mangle_class_field.
19417         (push_class_static_dummy_field): Likewise.
19419 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
19421         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19422         of assigning to TREE_CODE.  The latter method exploits a feature
19423         of GCC that is not ANSI compliant.
19425 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19427         * decl.c (pushdecl_force_head): New function.
19428         (pushlevel): Removed conditional printf.
19429         (complete_start_java_method): Don't enter local variable scope if
19430         function is compiled from source code.
19431         * expr.c: parse.h now included
19432         (java_lang_expand_expr): New function.
19433         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19434         printf. Terminate buffer when doing directories.
19435         * jcf-parse.c (parse_source_file): Call lang_init_source before
19436         parsing and before code generation.
19437         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19438         use printf if the macro is defined.
19439         * lang.c (lang_init): Install lang_expand_expr hook on
19440         java_lang_expand_expr.
19441         (java_dummy_print): New function.
19442         (lang_init_source): New function.
19443         * lex.c (java_lex): Remember location of an opening brace at the
19444         second nesting level.
19445         (java_is_eol): Unget character seen after a CR if it is EOF.
19446         * parse.h: Now includes lex.h
19447         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19448         printf if the macro is defined.
19449         (expand_start_java_method, build_expr_block, enter_block,
19450         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19451         New static function declarations.
19452         (pushdecl_force_head): New extern function declaration.
19453         (INCOMPLETE_TYPE_P): New macro.
19454         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19455         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19456         BLOCK_EXPR_ORIGIN): New macros.
19457         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19458         DECL_SOURCE_LINE_LAST): New macros.
19459         (struct parser_ctxt): Removed field current_method_decl, redundant
19460         with the field current_function_decl. Added fields
19461         first_ccb_indent1 and pending_block.
19462         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19463         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19464         tagged <node>
19465         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19466         (compilation_unit:): Cosmetic on sub rule.
19467         (type_declaration:): Cosmetic on sub rules. Added an error rule.
19468         (variable_initializer:): Installed default rule on expression:.
19469         (method_declaration:): method_header: starts a new
19470         method. method_body: installs the function body, absorbs blocks
19471         emitted for temporary variable scopings, pops function's body block
19472         and merges function's last statement lineno in DECL_SOURCE_LINE.
19473         (method_body:): Installed default rules.
19474         (block:): Call enter_block when an opening brace is seen.  Absorb
19475         scoping blocks and call exit_block when a closing brace is seen.
19476         (block_statement:): Cosmetic changes.
19477         (method_invocation:): Create WFL around CALL_EXPR node.
19478         (patch_stage): Added comment around definition.
19479         (method_header): Try to use first_ccb_indent1 as the first line of
19480         the method, so BP debug info are emitted at the first opening
19481         brace of the function. If the function has no body, use the
19482         location of the function's name. Override currently defined method
19483         name with the matching WFL so we can point redefinition errors
19484         using the location where the function's name was declared.
19485         (check_abstract_method_header): Interprets DECL_NAME as an
19486         identifier or as a WFL, accordingly.
19487         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19488         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19489         location and name information out of it and reinstall DECL_NAME to
19490         its original identifier node value.
19491         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19492         function's source code).
19493         (read_import_dir): Test the value returned by find_class and issue
19494         a fatal accordingly.
19495         (declare_local_variables): Push a new block for the scope of the
19496         new variable(s) if code has been already generated at that nesting
19497         level. Pinpoint redefinition errors using the variable id
19498         WFLs. Generate initialization code if necessary. If the variable
19499         type is incomplete, register a patch on its decl.
19500         (source_start_java_method): Rewritten. Define a new block for the
19501         function's parameters. Build parameter decl out of function's
19502         arguments and register them for a patch if their types are
19503         incomplete.
19504         (expand_start_java_method): Includes the part of
19505         source_start_java_method that was pushing the parameter decls and
19506         completing the method start code.
19507         (source_end_java_method): Removed call the expand_end_bindings and
19508         poplevel (already taken care of). Reinstall function's arguments
19509         and get function's last line of code before calling
19510         expand_function_end.
19511         (java_method_add_stmt): New comment before the function's
19512         code. Complement the second operand of the current COMPOUND_EXPR
19513         if necessary.
19514         (java_complete_expand_methods): Don't generate debug info on line
19515         zero when expanding a generated constructor.
19516         (java_complete_expand_method): Set start and end line numbers for
19517         a artificially generated constructor to one and manually call
19518         enter_block and exit_block when defining it. For all methods:
19519         expand function's start calling the new expand_start_java_method
19520         and invoke java_complete_tree on the effective method's body, if
19521         any.
19522         (resolve_expression_name): Now use lookup_name_in_blocks to search
19523         local variable decls and print out an error when variables are
19524         undefined.
19525         (patch_method_invocation_stmt): Inserted comment before the
19526         function's code.
19527         (lookup_method_invoke): Chain method's arguments using chainon
19528         with the current arg list as a second argument. Inserted missing
19529         IDENTIFIER_POINTER when reporting an error on methods not found.
19530         (refine_accessible_methods_list): Don't retain constructors.
19531         (patch_arguments): Function removed.
19532         (java_complete_tree): Inserted comment before the function's
19533         code. New case for BLOCKs. Moved the WFL case a bit
19534         further. Complete function's arguments.
19535         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19536         maybe_absorb_scoping_blocks): New functions.
19538 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19540         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19541         previously set.
19542         * jcf-parse.c (parse_source_file, java_error_count): New forward
19543         and extern declarations.
19544         (java_parse_abort_on_error): Macro moved.
19545         (jcf_parse_source): fatal called if fopen fails. Now calls
19546         parse_source_file.
19547         (parse_source_file): New parse_only parameter. Reflects the
19548         elimination of the second pass.
19549         (yyparse): parse_source_file called with argument set to 0.
19550         * jcf.h (JCF_ZERO): Sets java_source to zero.
19551         * lex.c (java_init_lex): pass argument is gone. Function modified
19552         to be called once during the analysis of a file.
19553         (java_unget_unicode): Fixed typo in fatal message.
19554         (java_get_line_col): Likewise.
19555         (java_lval): Likewise. String literals no longer built during
19556         second pass.
19557         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
19558         account.
19559         * parse.h (MODIFIER_WFL): New macro.
19560         (parse_check_super, parser_check_super_interface): Now return int.
19561         (parser_chain_incomplete_item, not_builtin_p,
19562         complete_method_decl): Declarations removed.
19563         (build_method_invocation_stmt, build_invoke): Renamed using the
19564         `patch' instead of `build'
19565         (register-incomplete_type, obtain_incomplete_type,
19566         java_complete_tree, java_complete_expand_method,
19567         unresolved_type_p, create_jdep_list): New function declarations.
19568         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
19569         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
19570         (jdep): New typedef on new struct _jdep.
19571         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
19572         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
19573         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
19574         JDEP_RESOLVED_P): New macros.
19575         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
19576         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
19577         JDEP_VARIABLE): New enum values and jdep kinds.
19578         (jdeplist): New typedef on struct _jdeplist.
19579         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
19580         macros.
19581         (CALL_EXPR_PRIMARY): New macro.
19582         (struct parser_ctxt): Fields java_pass, current_method_decl,
19583         method_decl_list deleted. New field jdeplist.
19584         (INCOMPLETE_P): Macro deleted.
19585         * parse.y (single_type_import_declaration:): Removed pass switch.
19586         (type_import_on_demand_declaration): Likewise.
19587         (field_declaration:): Removed pass switch on all sub rules.
19588         (class_declaration:): Call the complete_class_decl removed on
19589         class_body rules.
19590         (method_declaration:): Removed second pass switch. No longer chain
19591         methods decl when method_header reduced.
19592         (method_header:): Sub rules no longer depend on pass switch.
19593         (method_declarator:): Likewise.
19594         (method_body:): Likewise.
19595         (abstract_method_declaration:): Likewise.
19596         (block_statement:): Likewise.
19597         (local_variable_declaration:): Likewise.
19598         (argument_list:): Likewise.
19599         (method_invocation:): Likewise. Call to build_method_invocation_stmt
19600         removed. Partial CLASS_EXPR tree node built instead.
19601         (postfix_expression:): Removed pass switch on all sub rules.
19602         (java_pop_parser_context): Free classd_list content.
19603         (yyerror): Call obstrack_grow0 to finalize error message.
19604         (check_class_interface_creation): Comment modified to reflect new
19605         returned value meaning. Removed second pass switch. Return 1 if an
19606         error was found, 0 otherwise. Adjust pointer on filename if a
19607         leading path separator was found.
19608         (maybe_create_class_interface_decl): Removed first pass switch
19609         when linking the class decl to the class_list. Install a new
19610         jdep_list for the class.
19611         (add_superinterfaces): List of unresolved interfaces is
19612         gone. Unresolved interfaces are directly added to the current
19613         dependencies list.
19614         (create_interface): Second pass shortcut removed.
19615         ctpx->modifier_ctx access through MODIFIER_WFL.
19616         (create_class): Second pass shortcut removed. Call to
19617         register_incomplete_type replaces the call to
19618         parser_chain_incomplete_item.
19619         (complete_class_decl): Function removed.
19620         (duplicate_declaration_error): New way of retrieving redeclared
19621         item type.
19622         (register_fields): Call to lookup_modifier_cl replaced by
19623         MODIFIER_WFL. New way of handling unresolved type, using
19624         unresolved_type_p and obtain_incomplete_type.
19625         register_incomplete_type replaces call to parser_chain_incomplete_item.
19626         (patch_stage): New static global variable.
19627         (method_header): New way of handling unresolved type, using
19628         unresolved_type_p and obtain_incomplete_type. patch_stage used to
19629         indicates that the method decl needs to be patched.
19630         (check_abstract_method_header): Call to lookup_modifier_cl
19631         replaced by MODIFIER_WFL.
19632         (method_declarator): Incomplete argument type are registered
19633         calling register_incomplete_type. Patch on the declared method is
19634         issued in that case.
19635         (unresolved_type_p): New function.
19636         (parser_check_super_interface): New comment to reflect function's
19637         modified returned type (int). Function and has a new argument
19638         this_wfl. Call to parse_error_context uses this_wfl instead of
19639         relying on lookup_cl.
19640         (parser_check_super): Comment reflects function's new returned
19641         type (int). Function returns nonzero value on error.
19642         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
19643         register_incomplete_type, jdep_resolve_class): New functions to
19644         handle incomplete types in declarations.
19645         (java_complete_class): Rewritten to work with the new incomplete
19646         type handling scheme.
19647         (complete_class_report_errors): Likewise.
19648         (complete_method_decl): Removed: it jobs is now handled by
19649         java_complete_class.
19650         (do_resolve_class): Class loaded in not already loaded and not
19651         found in Java source code.
19652         (java_check_regular_methods, java_check_abstract_methods): Don't
19653         call complete_method_decl anymore.
19654         (lookup_modifier_cl, not_builtin_p): Functions deleted.
19655         (read_import_dir): Got rid of the pass number dependency.
19656         (declare_local_variables): New handling of unresolved types (patch
19657         issued).
19658         (source_start_java_method): New parameter level. Function called
19659         with level set to 1 when argument types are potentially
19660         unresolved.  Called to complete the job with level set to 2 once
19661         types are complete.
19662         (source_end_java_method): Call to permanent_allocation
19663         removed. Waiting to be replaced by a more suitable obstack
19664         management.
19665         (java_complete_expand_methods, java_complete_expand_method,
19666         java_expand_finals): New functions.
19667         (build_method_invocation_stmt): Renamed
19668         patch_method_invocation_stmt. Extracts function call expression
19669         (wfl) and arguments (args) from CALL_EXPR tree operands.
19670         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
19671         call. Patch the function and argument operand of the CALL_EXPR
19672         tree argument.
19673         (patch_argument, java_complete_tree): New functions.
19675 1998-04-20  Per Bothner  <bothner@cygnus.com>
19677         Recover from missing fields and methods (i.e. error instead of fatal).
19678         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
19679         * expr.c (expand_invoke):  Recover from missing method.
19680         (expand_java_field_op):  Recover from missing field.
19681         Inline references to java.lang.{Integer,Char,...}.TYPE.
19682         * typeck.c (get_type_from_signature), java-tree.h:  New function.
19683         * class.c (add_method):  Use get_type_from_signature.
19684         (build_class_ref):  Handle a class that was not found.
19685         * typeck.c (convert):  Handle conversion to pointers (for convenience).
19686         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
19687         instead of lookup_field to handle missing fields.
19689         * jcf-parse.c (process_zip_dir):  Set java_source.
19691 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
19693         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
19695 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19697         * jcf-parse.c (load_class): Don't change input_filename before
19698         calling jcf_parse_source (but still do it before calling
19699         jcf_parse).
19700         (jcf_parse_source): Assign input_filename after having saved the
19701         parser context.
19702         * lex.c (java_init_lex): Chain a WFL node to the import on demand
19703         list. ctxp->modifier_ctx zeroed according to its new
19704         definition. ctxp->filename initialized. Removed
19705         JAVA_MODIFIER_CTX_UNMARK.
19706         (java_unget_unicode): Update the character based column position.
19707         (java_allocate_new_line): ref_count not used anymore. Always free
19708         ctxp->p_line. Initialize c_line->char_col to 0.
19709         (java_get_unicode): Update the character based column position.
19710         (java_lex): Use ctxp->elc to store current position in source
19711         file, at the beginning of the parsed token. Set modifier_ctx entry
19712         corresponding to the parse modifier to a WFL node. Return a WFL
19713         node when an identifier is parsed.
19714         (java_lex_error): Now uses ctxp->elc to store current position in
19715         source.
19716         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
19717         * lex.h (build_wfl_node): New function definitions.
19718         (struct java_line): ref_count and next fields are gone. New field
19719         char_col.
19720         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19721         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
19722         (JAVA_COLUMN_DELTA): New macro.
19723         (java_lc): New typedef on new struct _java_lc.
19724         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
19725         (parse_error_context, parse_warning_context): Changed prototypes.
19726         (java_get_line_col): Added as an available global function.
19727         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
19728         (IC_DECL): Replaced by macro IC_TYPE
19729         (DEPEND_WFL): New macro.
19730         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
19731         wrong modifier.
19732         (exit_java_complete_class): Removed a commented out statement.
19733         (struct parser_ctxt): Added comments on fields. modifier_ctx is
19734         now an array of tree nodes. Deleted fields line_list and
19735         e_line. New field elc, to replace e_line.
19736         * parse.y (array_type:): Build WFL node.
19737         (qualified_name:): Build a single WFL node out of two. Retain
19738         the location information of the first node in the resulting node.
19739         (package_declaration:): Use package name as a WFL node
19740         (single_type_import_declaration:): Use imported name as a WFL node.
19741         (type_import_on_demand_declaration:): Use root of the imported
19742         packages as a WFL node.
19743         (field_declaration:): Removed unused local variable cl.
19744         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
19745         (yyerror): New static elc. Removed static error_line, error_pos.
19746         New local code_from_source. Save ctxp->elc into elc at the first
19747         pass. Call java_get_line_col to get a string of the line where
19748         the error occurred.
19749         (debug_line): Removed static function.
19750         (parse_error_context, parse_warning_context): Parameter cl is now
19751         a WFL node. Use its value to initialize ctxp->elc.
19752         (redefinition_error): Parameter cl is now a WFL node.
19753         (parse_add_interface): New parameter wfl. No longer call
19754         lookup_cl, use wfl instead.
19755         (check_class_interface_creation): Parameter cl is now a WFL node.
19756         (maybe_create_class_interface_decl): Likewise.
19757         (add_superinterfaces): New function.
19758         (create_interface): Removed local cl, node, super_decl,
19759         super_decl_type.  Function now uses id as a WFL node. Better
19760         warning/error report on obsolete or forbidden mix of
19761         modifiers. Now calls add_superinterfaces to register interfaces.
19762         (create_class): Removed local cl, node. Local variable id is used
19763         as a WFL node. Better error report on forbidden modifier
19764         mix. Uses add_superinterfaces to register interfaces.
19765         (find_field): Argument cl is now a WFL node. Now store the WFL
19766         node of a fields that needs to be checked for their
19767         initialization.
19768         (method_header): Local variable node non longer used. Local
19769         variable id replaces cl.
19770         (check_modifiers_consistency): Local variable cl is now a WFL
19771         node.
19772         (method_declarator): Local variable cl replaced by parameter id.
19773         (parser_qualified_name): Now uses parameter name as a WFL node.
19774         (parser_check_super_interface): New parameter wfl, for achieve
19775         greater accuracy during error reports.
19776         (parser_chain_incomplete_item): New parameter named location. Used,
19777         along the decl, to construct the incomplete item node.
19778         (java_complete_class): resolve_class now uses WFL node extracted
19779         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
19780         where appropriate.
19781         (complete_method_decl): Unresolved function's argument types are WFL.
19782         (resolve_class): Parameter cl is now a WFL node.
19783         (resolve_and_layout): Likewise.
19784         (do_resolve_class): Likewise. Try first to use cl and then do the
19785         lookup on the decl when calling check_pkg_class_access.
19786         (complete_class_report_errors): Use IC_TYPE in place of
19787         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
19788         instead of doing a lookup over the decl.
19789         (java_check_final): Use WFL info from field tree list.
19790         (lookup_cl): Rewritten and returns a statically defined WFL node.
19791         (lookup_modifier_cl): Now uses information from WFL nodes.
19792         (process_imports): Likewise.
19793         (read_import_dir): name and cl arguments replaced by a single WFL
19794         node. Function modified accordingly.
19795         (find_in_imports_on_demand): Now uses WFL node.
19796         (check_pkg_class_access): cl argument is now a WFL node.
19797         (declare_local_variables): Fixed to use WFL nodes.
19798         (resolve_expression_name): Likewise.
19799         (build_method_invocation_stmt): name_combo argument renamed
19800         wfl. Function modified to use WFL nodes.
19801         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
19802         (lookup_method_invoke): cl is now a WFL node. Added missing
19803         IDENTIFIER_POINTER to class type decl name.
19805 1998-04-14  Dave Brolley  <brolley@cygnus.com>
19807         * lang.c (init_parse): Now returns char* containing the filename.
19809 1998-04-10  Per Bothner  <bothner@cygnus.com>
19811         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
19813         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
19814         * class.c (make_class_data):  If flag_assume_compiled, initial class
19815         state is CSTATE_PREPARED; make superclass and interfaces direct
19816         references, rather than constant pool indexes.
19818 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19820         * parser.y: Include flags.h. Removed debug variable pl.
19821         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
19822         (block:): Likewise.
19823         (labeled_statement_nsi:): Generate debug info when reducing
19824         expression_statement:.
19825         (check_pkg_class_access): get_access_flags_from_decl invocation
19826         fixed for new CLASS_* flags location.
19827         (source_end_java_method): Save/restore parser context when
19828         entering/leaving this routine. Restore lineno to its right value
19829         before calling expand_end_bindings.
19830         (build_method_invocation_stmt): build_invoke called with the
19831         current line information.
19832         (build_invoke): New argument cl. Wrap the function call around a
19833         wfl node.
19834         (refine_accessible_methods_list): Changed comment, removed
19835         unnecessary code.
19836         * parse.h: Fixed typo in comments.
19837         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
19838         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
19839         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
19840         parser_ccb_indent.
19841         * lex.c (java_lex): Record the last closing curly bracket of a
19842         function.
19843         * jcf-parse.c (jcf_parse_source): Now calls
19844         java_check_methods. Clarified comment, fixed typo.
19846 1998-04-09  Dave Brolley  <brolley@cygnus.com>
19848         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
19849         (finish_parse): Expose for non USE_CPPLIB builds.
19851 1998-04-08  Jeffrey A Law  (law@cygnus.com)
19853         * lang.c (lang_print_xnode): New function.
19855 1998-04-03  Per Bothner  <bothner@cygnus.com>
19857         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
19858         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
19859         used to build a class's dispatch table.
19860         (make_class_data):  Generate dispatch table if flag_assume_compiled.
19861         Set dtable of class object to address of class_dtable_decl.
19863         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
19864         be volatile and have side effects - generates better code.
19866         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
19867         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
19869         * expr.c (expand_invoke):  If class is final, method is
19870         effectively final, so can call it directly.
19872         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
19874         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
19876 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19878         * parse.y (build_method_invocation_stmt): Removed extra argument
19879         to build_invoke.
19881 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19883         * expr.c (dtable_indent): Now static global.
19884         (expand_invoke): Now call invoke_build_dtable and
19885         build_invokevirtual.
19886         (invoke_build_dtable, build_invokevirtual): New functions.
19887         * jcf-io.c (find_class): Defer issuing a warning by setting
19888         jcf->outofsynch to 1.
19889         * jcf-parse.c (jcf_out_of_synch): New function.
19890         (load_class): Test this_jcf.outofsynch flag and call
19891         jcf_out_of_synch accordingly.
19892         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
19893         comment indentation.
19894         * lex.c (java_get_unicode): Fixed code indentation.
19895         (java_lex): Create string literal. Fixed typo. Removed several
19896         premature obstack_free.
19897         * parse.h: New enums for name resolution and invocation mode.
19898         (struct qualification): New data structure.
19899         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
19900         (do_resolve_class, build_method_invocation_stmt,
19901         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
19902         debug_line, identical_subpath_p, invocation_mode,
19903         refine_accessible_methods_list, build_invoke,
19904         lookup_method_invoke): New functions declared.
19905         (build_invokevirtual, invoke_build_dtable, match_java_method,
19906         build_field_ref, jcf_out_of_synch): New references to external
19907         functions.
19908         (struct parse_ctxt): Removed artificial_constructor field.
19909         * parse.y: (array_type:): Type defined for this rule.
19910         (class_type:): Installed default rule for interface_type:.
19911         (array_type:): Now build Java array type.
19912         (qualified_name:): Now use obstack_grow0.
19913         (method_declaration:): Skip the artificial constructor added to
19914         the list, if any.
19915         (abstract_method_declaration:): Execute the code only during pass 1.
19916         (block:): Installed default rule in block_statements:.
19917         (block_statement:): Add the statement to the method during pass 2.
19918         (statement_expression): Installed default rule for
19919         method_invocation:.
19920         (argument_list:): Added code to build the argument list.
19921         (method_invocation:): Added call to create the method invocation
19922         node.
19923         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
19924         (debug_line): New function for debug.
19925         (complete_class_decl): No longer do something during pass 1.
19926         (method_header): Use BUILD_PTR_FROM_NAME.
19927         (parser_qualified_classname): Use obstack_grow0. Removed bogus
19928         obstack_free.
19929         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
19930         function's main comment.
19931         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
19932         classes.
19933         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
19934         (resolve_class): Now works with arrays.
19935         (do_resolve_class, resolve_and_layout): New functions.
19936         (java_check_regular_methods): Reverse method list before and after
19937         having processed it. No longer set ctxp->artificial_constructor.
19938         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
19939         accordingly. Fixed typo in issued error message. Now use
19940         obstack_grow0.
19941         (find_in_imports_on_demand): Now use obstack_grow0.
19942         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
19943         (source_end_java_method): Call expand_expr_stmt instead of
19944         expand_expr. Calls it before calling expand_function_end.
19945         (java_method_add_stmt): Do nothing if errors were found during
19946         parsing.
19947         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
19948         (build_method_invocation_stmt, build_invoke, invocation_mode,
19949         lookup_method_invoke, refine_accessible_methods_list,
19950         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
19951         New functions.
19952         * typeck.c (build_java_signature): Properly end method signature
19953         if return type skipped.
19954         (match_java_method): New function.
19956 1998-03-16  Per Bothner  <bothner@cygnus.com>
19958         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
19960 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19962         * expr.c (build_invoke_non_interface): New function.
19963         (methods_ident, ncode_ident): Now static globals.
19964         (expand_invoke): Use build_invoke_non_interface.
19965         * java-tree.h (struct lang_decl): New field function_decl_body.
19966         (DECL_FUNCTION_BODY): New macro.
19967         * jcf-parse.c (jcf_parse_source): Deeper check before setting
19968         CLASS_FROM_SOURCE_P.
19969         (parse_source_file): Fixed typos. Call java_layout_parsed_class
19970         before starting pass 2. Call to java_generate_parsed_class replaced
19971         by java_register_parsed_class.
19972         * lex.c: Fixed typo in header. Some line width related formating.
19973         * lex.h: Some line width related formating.
19974         * parse.h (source_end_java_method, resolve_expression_name,
19975         complete_class_decl, maybe_create_class_interface_decl,
19976         check_class_interface_creation): New static function declarations.
19977         (java_layout_parsed_class, java_method_add_stmt): New function
19978         declarations.
19979         (struct parser_ctxt): Field mark_class_generate removed. New
19980         fields class_list and artificial_constructor.
19981         * parse.y: Fixed typo in header.
19982         (class_declaration:): Call complete_class_decl when class body
19983         parsed.
19984         (method_declaration:): Call source_end_java_method in pass 2 when
19985         the method body is defined.
19986         (postfix_expression:): Do expression name resolution on sub-rule
19987         name during pass 2.
19988         (create_class, create_interface): Merged common pieces.
19989         (check_class_interface_creation, maybe_create_class_interface_decl):
19990         New functions.
19991         (complete_class_decl): New function.
19992         (register_fields): Fixed line width related typo.
19993         (method_header): Correctly skip first argument when fixing
19994         argument line. Changed the loop.
19995         (java_check_circular_reference): Now use ctxp->class_list.
19996         (java_complete_class): Removed start/stop marking.
19997         (java_check_regular_methods): Now takes a class decl as an
19998         argument.  Add default constructor if none were encountered.
19999         (java_check_methods): Now use ctxp->class_list. Changed call to
20000         java_check_regular_methods.
20001         (source_start_java_method): Set DECL_ARG_TYPE for each function
20002         arguments.
20003         (source_end_java_method, java_method_add_stmt): New functions.
20004         (java_generate_parsed_class): No longer exists.
20005         (java_layout_parsed_class, java_register_parsed_class): New functions.
20006         (resolve_expression_name): New function.
20008 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20010         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20011         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20012         until pass initializations are done. Call read_import_dir with
20013         pass set to 0.
20014         * parse.h: (lookup_modifier_cl): New function declared.
20015         (INTERFACE_FIELD_MODIFIERS): New macro.
20016         (OBSOLETE_MODIFIER_WARNING): New macro.
20017         * parse.y: (register_fields): Class type and current field name in
20018         local variables. Check modifier(s) if adding field(s) to an interface.
20019         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20020         and report errors using the faulty modifier line context.
20021         (lookup_modifier_cl): New function.
20022         (read_import_dir): Detect and report default import processing
20023         failure.
20025 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
20027         Add a pair of -fassume-compiled/-fno-assume-compiled options.
20028         * class.c (is_compiled_class): Return 1 after making sure it
20029         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20030         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20031         * java-tree.h (flag_assume_compiled): Add decl.
20032         * lang.c (lang_f_options): Add the flag.
20033         (flag_assume_compiled): Add decl, default to 0.
20035 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20037         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20038         (is_compiled_class): Likewise.
20039         (layout_class): Likewise.
20040         (layout_class): Detect and lay out classes defined in source code.
20041         (interface_of_p, add_interface_do, may_add_interface): New
20042         function.
20043         (add_interface): Now use add_interface_do.
20044         (add_method_1): New function.
20045         (add_method): Now use add_method_1.
20046         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20047         (complete_start_java_method): New function.
20048         (start_java_mehod): Now call complete_start_java_method.
20049         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20050         (expand_invoke): Likewise and fixed typo.
20051         *gjava.c: (print_super_field): Use new argument to find_class
20052         DO_CLASS_FILE.
20053         (main): Likewise.
20054         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20055         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20056         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20057         IDENTIFIER_NODE.
20058         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20059         (add_method_1, push_class): New prototypes.
20060         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20061         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20062         directory where the class was found.
20063         (find_class): New argument DO_CLASS_FILE. Function find_class
20064         modified accordingly.
20065         *jcf-parse.c: (fix_class_path): New function.
20066         (load_class): Use new VERBOSE argument. load_class now finds and
20067         loads/parses .class/.java files. Save read_state of current_jcf
20068         if necessary.
20069         (java_parser_abort_on_error): New macro.
20070         (jcf_parse_source, parse_source_file): New function.
20071         (jcf_parse): Fixed typo.
20072         (yyparse): Call parse_source_file () only.
20073         (process_zip_dir): Fixed typo, fix zdir->filename_length when
20074         writing the real class name back in the zip directory entry.
20075         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20076         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20077         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20078         (find_class): Prototype fixed.
20079         *lex.c: Added 1998 time stamp.
20080         Removed all static global variables, moved into the parser
20081         context data structure.. Now include unistd.h if SEEK_SET not
20082         defined.
20083         (java_init_lex): Rewritten.
20084         (java_sneak_unicode): Modified current unicode access in current line.
20085         (java_unget_unicode): Likewise.
20086         (java_allocate_new_line): New allocation management.
20087         (java_read_char): Modified access and storage of unget_utf8_value.
20088         New way of processing current unicode.
20089         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20090         (java_get_unicode): Now use the parser context.
20091         (java_lineterminator): Likewise.
20092         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20093         of the reentrant parser implementation. Function now use the
20094         parser context data structure and java_lval. Fixed production of
20095         the float and double constant "out of range" error message. Fixed
20096         obstack use. Return integer value when hitting a modifier. Now
20097         return type for TRUE, FALSE and other predefined types. Return
20098         identifier as a TREE_LIST list containing the current line context
20099         as the TREE_VALUE sub-node.
20100         (java_unicode_2_utf8): Fixed typo in declaration.
20101         (java_lex_error): Now use the parser context data structure.
20102         *lex.h: Added 1998 time stamp.
20103         (struct java_line): New fields ref_count and next.
20104         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20105         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20106         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20107         *parse.h: Added 1998 time stamp.
20108         (java_parse_source_file): Renamed from parse_source_file.
20109         (YYERROR_NOW, YYNOT_TWICE): Fixed.
20110         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20111         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20112         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20113         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20114         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20115         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20116         (struct parser_ctxt): New data structure to keep the parser context.
20117         *parse.y: Added 1998 time stamp, got rid of static global variables.
20118         (java_error_count, ctxp): New global variables.
20119         (%union): New value field.
20120         (numeric_type, integral_type): Rules removed.
20121         (primitive_type): Rule defined to handle integral, float, double and
20122         boolean types.
20123         (qualified_name, package_declaration,
20124         single_type_import_declaration, type_import_on_demand_declaration,
20125         modifiers, class_declaration, super, interfaces,
20126         interface_type_list, class_body, field_declaration,
20127         field_declaration, variable_declarators, variable_declarator,
20128         variable_declarator_id, method_declaration, method_header,
20129         formal_parameter_list, formal_parameter, method_body, block,
20130         static, interface_declaration, extends_interfaces,
20131         abstract_method_declaration, local_variable_declarators): Rules now
20132         define actions.
20133         (force_error, do_warning): New global statics.
20134         (push_parser_context, parser_context_save_global,
20135         parser_context_restore_global, pop_parser_context): New functions.
20136         (yyerror): Now uses the global parser context. Fixed use of obstack.
20137         (parse_error, parse_error_context, parse_warning_context,
20138         java_accstring_lookup, redefinition_error, check_modifiers,
20139         parser_add_interface, create_interface, create_class, find_field,
20140         duplicate_declaration_error, register_fields, method_header,
20141         check_modifiers_consistency, check_abstract_method_header,
20142         method_declarator, parser_qualified_classname,
20143         parser_check_super_interface, parser_check_super,
20144         parser_chain_incomplete_item, java_check_circular_reference,
20145         layout_class_from_source, java_complete_class,
20146         complete_method_decl, resolve_class, complete_class_report_errors,
20147         java_check_final, check_method_redefinition,
20148         java_check_regular_methods, java_check_abstract_methods,
20149         java_check_methods, lookup_java_interface_method2,
20150         lookup_java_method2, lookup_cl, find_name_in_single_imports,
20151         process_imports, find_in_imports, read_import_entry,
20152         read_import_dir, find_in_imports_on_demand,
20153         check_pkg_class_access, not_builtin_p, declare_local_variables,
20154         source_start_java_method, java_generate_parsed_class): New
20155         functions.
20156         *typeck.c: (signature_include_return): New global variable.
20157         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20158         to add the function returned type in the signature.
20160 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
20162         * jcf-io.c (open_in_zip): Use strncmp and LEN.
20164 1998-01-29  Dave Brolley  <brolley@cygnus.com>
20166         * Make-lang.in (java.info): Added.
20167         (java.install-info): Added
20169 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
20171         * Makefile.in (clean): Also remove java/parse.c.
20173 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
20175         Add a pair of -fbounds-check/-fno-bounds-check options.
20176         * lang.c (lang_decode_option): Add code to grok arguments.
20177         (flag_bounds_check): Add decl.
20178         (lang_f_options): New array w/ the option in it.
20179         * java-tree.h (flag_bounds_check): Add decl.
20180         * lang-options.h: New file.
20181         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20182         of a static macro value.
20183         (JAVA_ARRAY_EXCEPTION): Delete macro.
20185 1998-01-23  Per Bothner  <bothner@cygnus.com>
20187         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
20188         * expr.c (build_anewarray):  Add missing promote_type.
20190 1998-01-22  Per Bothner  <bothner@cygnus.com>
20192         Add array types with known length to optimize bounds checking.
20193         * typeck.c (build_java_array_type):  Take length parameter.
20194         (java_array_type_length, build_prim_array_type):  New functions.
20195         * java-tree.h:  Update for new functions.
20196         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20197         * class.c:  Use build_prim_array_type.
20198         * expr.c (can_widen_reference_to):  Handle known-length array types.
20199         (verify_jvm_instructions):  Keep track of integer push instructions
20200         followed by newarray/anewarray, so we can build known-length arrays.
20201         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
20202         (java_array_data_offset):  New function.
20203         (build_java_array_length_access):  New function.  Optimize if constant.
20204         (build_java_arrayaccess):  Constant fold bounds check.
20205         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
20206         (build_newarray, build_anewarray):  New functions.
20207         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20208         * verify.c (merge_types):  Handle known-lengh array types.
20210 1998-01-19  Per Bothner  <bothner@cygnus.com>
20212         * expr.c (expand_byte_code):  Fix performace bug, which caused
20213         searching linenumber_table to be linear rather than constant.
20215 1997-12-12  Per Bothner  <bothner@cygnus.com>
20217         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20219         * decl.c, java-tree.h (soft_fmod_node):  New global.
20220         * decl.c (init_decl_processing):  Define __builtin_fmod.
20221         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20222         using __builtin_fmod.
20224 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20226         * keyword.h: New file, output of keyword.gperf as processed by
20227         gperf.
20228         * lex.c (java_lex_init): Initialize java_error_flag.
20229         * parse.c (YYERROR_NOW): Uses java_error_flag.
20230         * parse.y: New static java_error_flag. Useless definition of
20231         buffer_error gone.
20232         * parse.y (java_error): Portable error recovery using
20233         java_error_flag (not yet completely tuned).
20235 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20237         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20239 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20241         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20242         (parse.c, lex.c, keyword.h): New rules for Java source code
20243         front-end.
20244         * parse.c: Renamed into jcf-parse.c.
20245         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20246         * keyword.gperf: New file, Java keywords.
20247         * parse.y: New file, Java language grammar.
20248         * parse.h: New file, Java language grammar definitions.
20249         * lex.c: New file, Java language lexer.
20250         * lex.h: New file, Java language lexer definitions.
20252 1997-12-03  Per Bothner  <bothner@cygnus.com>
20254         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20255         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20256         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20257         * expr.c (expand_java_field_op):  Check for invalid assignment
20258         to final field.
20260         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20262 1997-10-27  Per Bothner  <bothner@cygnus.com>
20264         * verify.c (verify_jvm_instructions):  When processing a handler,
20265         attempt to set the current_subr to the right value.
20266         (More complicated code combines Sep 17 and Oct 22 versions.)
20268 1997-10-24  Per Bothner  <bothner@cygnus.com>
20270         * class.c (push_class):  Figure out (guess) name of source file.
20271         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20272         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20273         (parse_class_file):  Change return type from int to void.
20274         Call debug_start_source_file/debug_end_source_file.
20276         * expr.c (build_java_binop):  Fix masking 2nd operand.
20277         * decl.c (init_decl_processing):  Set sizetype first.
20279 1997-10-22  Per Bothner  <bothner@cygnus.com>
20281         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20282         (Revert Sep 17 change.)
20284 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20286         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20287         .class extension in their name and fix thing so we don't process
20288         them parse_zip_file_entries().
20289         (parse_zip_file_entries): Cleaned unused local variables.
20291 1997-10-20  Per Bothner  <bothner@cygnus.com>
20293         * expr.c (can_widen_reference_to):  Allows equal array element types.
20294         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20295         * jcf-dump.c (RET):  Get (and print) index.
20297         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20298         Promote element type to POINTER_TYPE.
20300 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20302         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20303         find_in_current_zip, jcf_figure_file_type): Moved from
20304         jcf-reader.c to parse.c.
20305         * zextract.c: (read_zip_archive): takes file_comment_length possible
20306         field into account.
20308 1997-10-20  Per Bothner  <bothner@cygnus.com>
20310         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20312         * verify.c (merge_types):  Handle array types even better ...
20314 1997-10-17  Per Bothner  <bothner@cygnus.com>
20316         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20318         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20319         * class.c (make_class_data):  Don't build fields_decl if no fields.
20320         When building fields_decl, skip if DECL_ARTIFICIAL.
20322         * expr.c (java_stack_swap):  Update stack_type_map.
20323         * verify.c (merge_types):  Handle array types better.
20325 1997-10-15  Per Bothner  <bothner@cygnus.com>
20327         * class.c (add_field):  Don't promote short integral fields to
20328         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20329         * expr.c (push_value):  Promote and convert short integral values.
20331         * decl.c, java-tree.h (integer_two_node):  New constant node.
20332         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20334 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20336         * class.c (append_gpp_mangled_type): Use function argument
20337         unpromoted type to generate mangled name.
20339 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20341         * constants.c (build_constant_data_ref): Now uses current_class
20342         instead of main_class.
20343         (build_constants_constructor): Now uses current_class instead of
20344         main_class.
20345         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20346         of the global variable SeepZipFiles done here.
20347         * zextract.c (read_zip_archive): extra_field optional field taken
20348         into account while computing the position of the class file in the
20349         archive.
20350         * verify.c (verify_jvm_instructions): Use current_jcf to search
20351         the constant pool.
20352         * parse.c (load_class): First search for the class to load in the
20353         current zip file. Saves current_jcf (restored before returning
20354         from that function). Don't call JCF_FINISH in the class was found
20355         in the current ZIP file.
20356         (jcf_parse): If the class was found in the current ZIP file, save
20357         its tree_constant_pool (for later reuse).
20358         (parse_class_file): New function. Process each method defined in
20359         the current class and record the class as to be later registered.
20360         (yyparse): Rewritten. Figure the type of the current file and switch
20361         accordingly.
20362         * lang.c: New global variable current_jcf.
20363         (lang_init): Removed compiling_from_source test (done later, in
20364         yyparse). Removed call the jcf_parse ().
20365         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20366         (typedef struct JCF): New fields seen_in_zip (to mark a class found
20367         in the current ZIP file) and zip_offset (offset to the class data in
20368         the current zip file).
20369         * jcf-reader.c: zipfile.h included.
20370         localToFile: New ZipFileCache static global variable
20371         (parse_zip_file_entries): New function. Browse the current ZIP
20372         file directory and process each class found.
20373         (process_zip_dir): New function. Register each class found in the
20374         ZIP file directory. The class aren't parsed but a valid JCF is
20375         link to each of them.
20376         (find_in_current_zip): New function. Search for a class in the
20377         current ZIP file directory. If found, prepare the class so that it
20378         can be loaded.
20379         (jcf_figure_file_type): New function. Examine the file structure
20380         to figure a class file, a ZIP file. If none of these categories are
20381         matched, a source file is assumed.
20382         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20383         SeenZipFile: New global variable.
20384         (open_in_zip): Use zipmember's length to accelerate the search for
20385         a member. If zipmember was NULL and zip file successfully read,
20386         return 0.
20387         * java-tree.h: New global variable current_jcf declared.  Added
20388         declaration for current_constant_pool_tags, current_constant_pool_data,
20389         current_constant_pool_length, current_constant_pool_data_ref.
20390         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20391         store the JCF of classes seen in a zip file) and tree *constant_pool
20392         (to save a loaded class constant pool). current_class declared here.
20393         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20394         retrieve method_ref_constant.
20395         (PUSHC): java_push_constant_from_pool now uses current_jcf.
20396         (OBJECT): get_class_constant now uses current_jcf.
20397         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20398         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20399         (expand_invoke): Now uses current_class instead of main_class
20400         (build_class_init): Now uses current_class instead of main_class
20401         * class.c: New static global variable registered_class.
20402         (register_class): New function.
20403         (emit_register_class): Modified to use registered_class instead of
20404         main_class
20405         (is_compiled_class): Now take into account class seen in the archive.
20407 1997-10-06  Per Bothner  <bothner@cygnus.com>
20409         * except.h:  Renamed to: java-except.h.
20410         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
20411         * except.c:  Add semi-working (commented out) implementation.
20413         * expr.c (expand_iinc):  Add needed flush_quick_stack.
20414         * parse.c (set_source_filename):  New function.
20415         (give_name_to_class):  Set input_filename from package.classname.java.
20417         * jcf-io.c (find_class):  Don't look first in ".".
20419 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20421         * zextract.c (read_zip_archive): Now takes into account the
20422         extra_field field.
20423         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20425 1997-09-20  Per Bothner  <bothner@cygnus.com>
20427         * constants.c, java-tree.h (build_internal_class_name):  New function.
20428         (alloc_class_constant):  Re-implement using build_internal_class_name.
20429         * class.c (make_class_data):  Likewise.
20430         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
20432 1997-09-17  Per Bothner  <bothner@cygnus.com>
20434         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
20435         to NULL before pushing an exception handler target.
20437         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
20438         (java_stack_swap, java_stack_dup):  Re-write to be safe from
20439         clobbering registers.
20440         (build_class_init):  New function.
20442 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20444         * typeck.c (build_java_array_type): Temporary use
20445         permanent_obstack to create the array 'length' field.
20446         * expr.c (lookup_label): Temporay use permanent_obstack to create
20447         label if not found.
20448         * class.c (push_super_field): Tempory use permanent_obstack.
20450 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20452         * typeck.c (type_for_mode): Now handles double_type_node and
20453         float_type_node.
20454         * verify.c (verify_jvm_instructions): The instruction following
20455         the wide bytecode is checked. OPCODE_ret added to the list of
20456         wide.
20458 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20460         * class.c (make_class): Temporary use permanent_obstack. Set the
20461         class CLASS_P field to 1.
20462         (push_class): Temporary use permanent_obstack.
20463         (set_super_info): Temporary use permanent_obstack.
20464         (add_method): Temporary use permanent_obstack, set
20465         METHOD_TRANSIENT().
20466         (add_field): Temporary use permanent_obstack. Sets
20467         FIELD_VOLATILE() and FIELD_TRANSIENT().
20468         (build_class_ref): Temporary use permanent_obstack if the class
20469         isn't compiled.
20470         (build_static_field_ref): Temporary use permanent_obstack when
20471         creating field's rtl.
20472         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20473         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20474         and fields. Function finalized, as far as flag handling.
20475         (push_class_static_dummy_field): Temporary use permanent_obstack.
20476         (emit_register_class): Force generation of class registration at
20477         -O3 or deeper.
20478         * decl.c (end_java_method): Call permanent_allocation() before
20479         returning.
20480         * expr.c (can_widen_reference_to): Added comment to interface
20481         handling, fixed typo.
20482         (lookup_field): Now uses CLASS_P() to correct FIXME
20483         (expand_invoke): Verification on public && !static &&
20484         !abstract moved into soft_lookupinterfacemethod (kaffe).
20485         Use Object class dtable if objectref is an array when expanding
20486         invokeinterface.
20487         (java_push_constant_from_pool): Temporary use permanent_obstack
20488         for CONSTANT_string
20489         * parse.c (get_ref_constant): Temporary use permanent_obstack to
20490         create constant references.
20491         (get_constant): Temporary use permanent_obstack to create constant.
20492         (load_class): Temporary use permanent_obstack to load class.
20493         (jcf_parse): Temporary use permanent_obstack to perform class
20494         layout.
20495         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20496         (build_java_signature): Temporary use permanent_obstack.
20497         * verify.c: (verify_jvm_instruction): removed unnecessary verification
20498         on ACC_SUPER flag.
20499         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20500         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20501         (CLASS_P): Defined
20503 1997-09-11  Per Bothner  <bothner@cygnus.com>
20505         * class.c (append_gpp_mangled_type):  Fix typo.
20506         (emit_register_class):  Use main_class to get class object, rather
20507         than looking for no-longer-existing static decl starting with _CL.
20508         * typeck.c (parse_signature_type):  Promote array element type
20509         if it is a RECORD_TYPE.
20511 1997-09-10  Per Bothner  <bothner@cygnus.com>
20513         * class.c (push_class_static_dummy_field):  New function.
20514         (mangle_static_field):  New. Do G++-style mangling of static fields.
20515         (layout_class):  Mandle static fields here, not in add_field.
20516         (build_class_ref):  The class object is now a dummy static field.
20517         * decl.c (find_local_variable):  Look for best, instead of first match.
20518         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
20519         (build_java_athrow):  Don't check here if exception is Throwable.
20520         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
20521         (TYPE_USED):  Removed.  No longer used ...
20522         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
20523         * verify.c (push_pending_label):  New function.
20524         (push_pending_block):  Renamed to check_pending_block.
20525         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
20526         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
20527         re-checking possible handlers) after a store (less wasted work).
20528         Check for null handler (finally) before calling add_handler.
20529         Various changes to (finally?) correctly handle try/finally.
20531 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
20533         * class.c: Include stdio.h.
20535 1997-09-04  Per Bothner  <bothner@cygnus.com>
20537         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20538         to make sure class is initialized before static/special invoke.
20540         * verify.c (verify_jvm_instructions):  On a store instruction,
20541         call find_local_variable to force pre-allocation of decl and rtx.
20542         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
20544 1997-09-03  Per Bothner  <bothner@cygnus.com>
20546         * class.c (build_class_ref):   Strip off "promoted_" if need be.
20547         (make_field_value): Call build_java_signature when needed.
20548         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
20549         * expr.c (build_java_athrow):  Don't push_value of exception.
20550         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
20551         match specification of [fd]cmp[lg] for NaNs.
20552         (expand_byte_code):  Add support for exception handler ranges.
20553         * except.c:  Add skeleton for EH code-generation.
20554         * verify.c (merge_types):  Treat all promoted integral types as equal.
20555         * constants.c (build_constants_constructor):  To force creation of
20556         current_constant_pool_data_ref, call build_constant_data_ref.
20558         * javaop.def (lload):  Fix typo.
20559         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
20561 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
20563         * parse.c: Don't include function.h.
20565 1997-08-27  Per Bothner  <bothner@cygnus.com>
20567         * except.[ch]:  New files.
20568         * Makefile.in (JAVA_OBJS):  Add except.o
20569         * expr.c:  Temporary warning about unimplemented exceptions.
20570         * verify.c:  Verify exception handlers.
20572         * jcf-dump.c (disassemble_method):  Print exception table.
20574 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20576         * expr.c (verify_jvm_instructions): Started a thorough
20577         verification of invoke* bytecodes.
20578         (expand_byte_code): flush quick stack if PC is the target of a
20579         branch.  and undef RET (conflicting with config/i386/i386.h).
20580         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
20581         used.
20582         (expand_invoke): Now handles invokeinterface and do more
20583         verification according to the bytecode.
20584         (lookup_field): Don't try to load the class if processing
20585         dtable_type.
20586         (can_widen_reference_to): Now handles interfaces.
20587         * decl.c (init_decl_processing): New global variable
20588         soft_lookupinterfacemethod_node, declared in java-tree.h.
20589         Call set_super_info on string_type_node.
20590         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
20591         defined.
20592         * class.c (set_super_info): Fills the CLASS_* flags according to
20593         access_flags.
20594         (get_access_flags_from_decl): Handles all class flags.
20596 1997-08-26  Per Bothner  <bothner@cygnus.com>
20598         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
20599         * parse.c (yyparse):  Check for abstract method, and missing code.
20600         * expr.c (expand_byte_code):  Change interface.
20601         * lang.c (put_decl_node):  Print promoted types prettier.
20602         * verify.c (verify_jvm_instruction):  Change interface.
20603         Partial support for scanning exception table.
20604         For load instructions, handle promoted integral types.
20606 1997-08-21  Per Bothner  <bothner@cygnus.com>
20608         * verify.c:  New file, with contents moved from expr.c.
20609         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
20610         * typeck.c (is_array_type_p):  Moved here from expr.c.
20611         * java-tree.h:  Add some now-needed function declarations.
20612         * Makefile.in (JAVA_OBJS): Added verify.o.
20614 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20616         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20617         METHOD_ABSTRACT flag.
20619         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
20620         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
20621         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
20623         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20624         variables.
20625         (start_java_method): Hook for SYNCHRONIZED methods.
20627         * expr.c (build_java_jsr, build_java_ret): New functions
20628         (JSR,PRE): New macros
20629         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
20630         (verify_jvm_instructions): tableswitch, lookupswitch,
20631         monitorenter, monitorexit, goto_w: verified.
20632         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
20633         (build_java_monitor): New function.
20634         (MONITOR_OPERATION): Modified to call build_java_monitor()
20635         (verify_jvm_instructions): Started a thorough verification of
20636         invoke* bytecodes.
20638 1997-08-19  Per Bothner  <bothner@cygnus.com>
20640         Support verification of jsr/ret subroutines (used for try/finally).
20641         * decl.c (return_address_type_node):  New type node.
20642         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
20643         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
20644         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
20645         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
20646         TYPE_USED):  New macros for special types in type_map.
20648         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
20649         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
20650         BCODE_JUMP_TARGET.
20651         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
20653         * expr.c (can_widen_reference_to):  New function.
20654         (pop_type):  Use it.
20655         (merge_type_state):  Support handling start of subroutine.
20656         (push_pending_block):  Return char* error message, instead of calling
20657         fatal on an error.  Also handle subroutines.
20658         (verify_jvm_instructions):  Handle errors from push_poending_block.
20659         Support jsr and ret instructions.
20661 1997-08-19  Per Bothner  <bothner@cygnus.com>
20663         * jcf-io.c (find_classfile):  Fix thinko.
20664         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
20666 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
20668         * Makefile.in (BISON): Remove.
20670 1997-08-07  Per Bothner  <bothner@cygnus.com>
20672         * Makefile.in:  Convert to autoconf.
20673         * config-lang.in (outputs):  Added java/Makefile.
20675         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20676         Rename cc1java to jc1.
20678         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
20679         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
20681         * class.c (class_depth):  Do load_class if needed.
20683         Mostly better verification.
20684         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
20685         (init_decl_processing):  Change return type of soft_checkcast.
20686         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
20687         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
20688         lang_print_error):  New functions.
20689         (lang_init):  Set global hook print_error_function to lang_print_error.
20690         * expr.c:  In the type_map ptr_type_node is only used for null now.
20691         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
20692         (merge_types):  Dererence pointer to record types before comparing.
20693         (decode_newarray_type, merge_types):  On error just return NULL.
20694         (build_java_binop):  Add preliminary implementation (with warning)
20695         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
20696         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
20697         (expand_compare, expand_java_goto, expand_java_call):  Don't
20698         push_pending_block, since that only makes sense when verifying.
20699         (merge_type_state):  Different return codes.
20700         (push_pending_block):  A block may need to be verified more than once.
20701         (expand_byte_code):  Warn about unused code at code generation time.
20702         (verify_jvm_instruction):  Changed logic, since code may need to be
20703         re-verified if type-state has changed.  Also, better error handling.
20704         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
20705         Improve newarray, anewarray, ?aload, athrow,
20706         * java-tree.h (LABEL_CHANGED):  New macro.
20708 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20710         * decl.c (soft_athrow_node): New global variable initialized.
20711         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
20712         * typeck.c (convert): Added support for REAL_TYPE.
20713         (convert_to_char): New function.
20714         (convert): Handle CHAR_TYPE.
20715         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
20716         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
20717         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
20718         promoted type.
20719         (verify_jvm_instructions): Added break a the end of bogus unop: label.
20720         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
20721         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
20722         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
20723         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
20724         to Use The Right Things.
20725         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
20726         compatible with INT. BOOLEAN is made equivalent to BYTE.
20727         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
20728         OPCODE_ifnonnull): Now supported.
20729         (build_java_athrow): New function.
20731 1997-08-04  Per Bothner  <bothner@cygnus.com>
20733         Rename method name <init> to match G++ (and fix mangling).
20734         * class.c (layout_class):  Replace method name of <init> by class name.
20735         (make_method_value):  Do inverse renaming of constructor from <init>.
20736         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
20737         * typeck.c (lookup_java_constructor):  New function.
20738         * expr.c (expand_invoke):  If method_name is <init>, call
20739         lookup_java_constructor to find constructor.
20741         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
20743 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20745         * parse.c (get_class_constant): Modified to handle array "classes"
20746         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
20747         wide type.
20748         (convert): Modified to handle real type.
20749         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
20750         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
20751         variables declared.
20752         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
20753         soft_multianewarray, soft_newarray_node, soft_throw_node): New
20754         global variables initialized.
20755         (find_local_variable): Handles the case of a pointer
20756         (end_java_method): Restore the use of one more scope
20757         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
20758         build_java_array_length_access, expand_java_arrayload,
20759         expand_java_arraystore, expand_java_array_length,
20760         expand_java_multianewarray, expand_java_anewarray,
20761         build_java_check_indexed_type, is_array_type_p,
20762         build_java_throw_out_of_bound_exception): New functions.
20763         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
20764         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
20765         OPCODE_<t>aload): Implemented code for verification.
20766         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
20767         ARRAY_NEW_MULTI): Macro defined.
20768         (CONVERT): Modified to invoke convert().
20769         (case OPCODE_aload2): Fixed index typo from 2 to 1.
20771 1997-07-31  Per Bothner  <bothner@cygnus.com>
20773         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
20774         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
20775         (make_class_data):  Field name needs '/' as package prefix.
20776         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
20778 1997-07-25  Per Bothner  <bothner@cygnus.com>
20780         Implement debug information for local variables.
20781         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
20782         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
20783         DECL_LOCAL_SLOT_CHAIN):  New macros.
20784         (struct lang_decl_var):  New type.
20785         * parse.c (give_name_to_locals):  Move to decl.c.
20786         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
20787         (start_java_method):  Re-write parameter handling.
20788         (pending_local_decls):  New global variable.
20789         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
20790         (find_local_variable):  Accept pc so we can skips decls not in range.
20791         (struct binding_level):  Add end_pc field.
20792         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
20793         (various):  Change so current pc gets passed to find_local_variable.
20795         * decl.c (init_decl_processing):  Re-arrange fields in
20796         class_type_node and and method_type_node to match kaffe 0.9.1.
20797         * class.c (make_method_value, make_class_data):  Update
20798         initializations to match.
20800 1997-07-16  Per Bothner  <bothner@cygnus.com>
20802         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
20803         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
20804         (push_super_field):  New function.
20805         (make_class_data):  Handle inheritance of class static initializer.
20806         (layout_class):  New name mangling.
20807         * constants.c (build_constant_data_ref):  Init type of data array
20808         to a one-element array.
20809         (build_constants_constructor):  Set DECL_SIZE from complete array type.
20810         * decl.c:  Rename class_type, object_type etc to class_type_node,
20811         object_type_node etc.  Make former inherit from latter.
20812         * expr.c (expand_invoke):  Add cast of function address.
20813         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
20814         * parse.c (yyparse):  Don't call layout_class here.
20815         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
20817 1997-06-14  Per Bothner  <bothner@cygnus.com>
20819         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
20820         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
20821         (alloc_class_constant):  New.
20822         * expr.c (expand_invoke):  Make sure method's class is initialized.
20823         * class.c (interits_from_p, emit_register_class):  New functions.
20824         * parse.c (yyparse):  Call emit_register_class.
20826 1997-06-09  Per Bothner  <bothner@cygnus.com>
20828         * constants.c:  New file, to handle constant pool.
20829         * Makefile.in (JAVA_OBJS):  Add constants.o.
20830         * decl.c (init_decl_processing):  Update, fix, finish various structs.
20831         (pushdecl_top_level):  New.
20832         * parse.c (layout_class):  Moved to class.c.
20833         * expr.c (java_push_constant_from_pool):  New function.
20834         * class.c (build_class_ref):  Make work fully
20835         (make_class_data):  Emit super-class, constant pool, interface vector.
20837 1997-06-03  Per Bothner  <bothner@cygnus.com>
20839         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
20840         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
20841         * class.c (class_depth):  New function.
20842         (lookup_named_class):  Replaced by new function lookup_class.
20843         * decl.c (object_type_node, string_type_node):  New.
20844         Remove various types that we no longer need.
20845         * expr.c (verify_jvm_instructions):  New separate verifier pass.
20846         (push_type, pop_type):  New functions for verifier.
20847         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
20848         (expand_byte_code):  Simplify, since we assume already verified.
20849         (expand_invoke):  Now mostly works.
20850         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
20851         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
20852         * parse.c:  Wait to allocate class object until we know its name.
20853         (layout_class):  Calculate DECL_VINDEX for each virtual method.
20854         * typeck.c (get_array_type):  Rename to ...
20855         (build_java_array_type):  ... and provide working implementation.
20856         (build_java_signature):  New function - build Java signature of type.
20857         (set_java_signature):  New function - cache signature with type.
20858         (lookup_java_method):  New function.
20860 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
20862         * class.c (ident_subst):  Take extra SUFFIX parameter.
20863         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
20864         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
20865         (build_class_ref):  Actually implement.
20866         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
20867         * decl.c (builtin_function):  New.
20868         (init_decl_processing):  Update for current Kaffe.  Declare some
20869         builtin Kaffe functions.
20870         * expr.c (build_address_of):  New.
20871         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
20872         Renamed (from expand_java_new etc), and added working implementations.
20873         (build_field_ref):  Now also handle static fields.
20874         (expand_invoke):  Implement invokestatic, and start implement rest.
20875         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
20876         * javaop.def:  Rename invokevirt -> invokevirtual.
20877         * lang.c (use_handles):  Removed.
20878         * parse.c:  Add support for ConstantValue attribute.
20879         Handle nested loading of a class.  (JPOOL_UTF):  New.
20881 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
20883         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
20885 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
20887         * Make-lang.in (java.install-man):  New empty rule.
20888         * typeck.c (set_local_type):  New function.
20889         * expr.c (STORE_INTERNAL):  Call find_local_variable,
20890         not find_stack_slot.  Call set_local_type.
20892 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
20894         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
20895         and building RECORD_TYPE CONSTRUCTORs.
20896         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
20898         * lang.c (use_handles):  Change the default to 0.
20899         * decl.c:  Define and build class_type, field_type, utf8const_type.
20900         * class.c (make_class_data, make_field_value,
20901         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
20902         hashUtf8String, strLengthUtf8, mangled_classname:
20903         Functions to build reflective data structures.
20904         * parse.c (yyparse):  Call make_class_data.
20906         * jcf-io.c (open_class, find_classfile):  New functions.
20907         * jcf-dump.c:  Support reading classfile from explicitly-named
20908         class file (without CLASSPATH searching).
20910 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
20912         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
20913         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
20914         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
20915         (get_constant):  Now trivial for CONSTANT_Utf8.
20917         * jcf.h:  Make NEW_CPOOL the default.
20918         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
20920 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
20922         New directory.