OSDN Git Service

* jvspec.c (lang_specific_driver): Remove unused classpath_args.
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2007-01-30  Ben Elliston  <bje@au.ibm.com>
2
3         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
4
5 2007-01-29  Tom Tromey  <tromey@redhat.com>
6
7         PR java/30607:
8         * jvspec.c (lang_specific_driver): Handle separate -I argument.
9         * lang.opt (-I): Add 'Separate'.
10
11 2007-01-29  Andrew Haley  <aph@redhat.com>
12
13         * class.c (add_method_1): Mark fndecl as external unless we are
14         compiling it into this object file.
15
16 2007-01-24  Andrew Haley  <aph@redhat.com>
17
18         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
19         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
20
21 2007-01-22  Andrew Haley  <aph@redhat.com>
22
23         * builtins.c (VMSupportsCS8_builtin): New function.
24
25 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
26
27         PR java/30454
28         * jcf-io.c (opendir_in_zip): Close the file
29         and free zipf before returning after an error.
30
31 2007-01-16  Tom Tromey  <tromey@redhat.com>
32
33         * java-tree.def: Added copyright header.
34
35 2007-01-15  Tom Tromey  <tromey@redhat.com>
36
37         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
38         case.
39         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
40         Removed case.
41         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
42         (EXPR_WFL_NODE): Likewise.
43         (EXPR_WFL_LINECOL): Likewise.
44         (EXPR_WFL_FILENAME): Likewise.
45         (EXPR_WFL_LINENO): Likewise.
46         (build_expr_wfl, expr_add_location): Don't declare.
47         (build_unknown_wfl): Removed.
48         (EXPR_WFL_FILENAME_NODE): Removed.
49         (EXPR_WFL_COLNO): Removed.
50         (EXPR_WFL_SET_LINECOL): Removed.
51         (DECL_FUNCTION_WFL): Removed.
52         (DECL_FIELD_FINAL_WFL): Removed.
53         (struct lang_decl_func) <wfl>: Removed field.
54         <called_constructor>: Likewise.
55         <inner_access>: Likewise.
56         (struct lang_decl_var) <wfl>: Removed field.
57         (DECL_CONSTRUCTOR_CALLS): Removed.
58         (DECL_FUNCTION_ACCESS_DECL): Likewise.
59         (DECL_FUNCTION_INNER_ACCESS): Likewise.
60         (DECL_SPECIFIC_COUNT): Likewise.
61         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
62         * expr.c (build_expr_wfl): Removed.
63         (expr_add_location): Likewise.
64
65 2007-01-12  Tom Tromey  <tromey@redhat.com>
66
67         * jcf-dump.c (main): Updated call to find_class.
68         * lang.c (java_init): Removed dead code.
69         * jcf-parse.c (read_class): Don't use java_source field.  Removed
70         dead code.
71         (parse_zip_file_entries): Don't use java_source field.
72         (process_zip_dir): Likewise.
73         (jcf_parse): Removed dead code.
74         (java_parse_file): Likewise.
75         (read_class): Updated call to find_class.
76         * jcf-io.c (find_class): Don't use java_source field.  Removed
77         'source_ok' argument, .java logic.
78         * jcf.h (JCF) <java_source>: Removed field.
79         (JCF_ZERO): Updated.    (find_class): Updated.
80         * decl.c: Removed dead code.
81         * class.c: Removed dead code.
82
83 2007-01-11  Tom Tromey  <tromey@redhat.com>
84
85         * typeck.c (convert): Don't use flag_emit_class_files.
86         * lang.c (java_post_options): Don't use flag_emit_class_files.
87         (java_handle_option): Don't use flag_extraneous_semicolon or
88         flag_redundant.
89         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
90         flag_emit_class_files.
91         (load_class): Likewise.
92         * java-tree.h (flag_emit_class_files): Don't declare.
93         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
94         (flag_extraneous_semicolon): Don't declare.
95         (flag_not_overriding): Likewise.
96         (flag_static_local_jdk1_1): Likewise.
97         (flag_redundant): Likewise.
98         * expr.c (build_newarray): Don't use flag_emit_class_files.
99         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
100         flag_emit_class_files.
101         (build_class_ref): Likewise.
102         * builtins.c (check_for_builtin): Don't use
103         flag_emit_class_files.
104
105 2007-01-10  Tom Tromey  <tromey@redhat.com>
106
107         * lang.c (java_can_use_bit_fields_p): Removed.
108         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
109
110 2007-01-09  Andrew Haley  <aph@redhat.com>
111
112         * expr.c (build_java_arrayaccess): Rewrite to generate array
113         access in canonical form.
114         (expand_java_arraystore): Use build_fold_addr_expr() on address of
115         array access.
116
117 2007-01-03  Andrew Haley  <aph@redhat.com>
118
119         PR java/28754
120         * expr.c (expand_java_field_op): If we're initializing a field's
121         declaring interface we should not also initialize the class
122         context in which it was referenced.
123
124 2007-01-02  Tom Tromey  <tromey@redhat.com>
125
126         * java-tree.h (compiling_from_source, current_encoding,
127         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
128         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
129         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
130         JTI_WFL_OPERATOR): Removed
131         (finit_identifier_node, instinit_identifier_node,
132         length_identifier_node, super_identifier_node,
133         continue_identifier_node, access0_identifier_node, wfl_operator):
134         Removed.
135         (cyclic_inheritance_report,
136         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
137         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
138         DECL_FIXED_CONSTRUCTOR_P): Removed.
139         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
140         Removed.
141         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
142         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
143         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
144         import_list, import_demand_list>: Removed.
145         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
146         cxx_keyword_p): Removed.
147         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
148         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
149         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
150         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
151         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
152         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
153         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
154         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
155         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
156         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
157         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
158         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
159         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
160         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
161         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
162         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
163         java_parse_abort_on_error, extract_field_decl): Removed.
164         (finput): Declare.
165         * lang.c: (compiling_from_source, current_encoding): Removed.
166         (java_handle_option): Ignore -fencoding.
167         * parse.h: Don't include lex.h.
168         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
169         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
170         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
171         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
172         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
173         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
174         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
175         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
176         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
177         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
178         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
179         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
180         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
181         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
182         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
183         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
184         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
185         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
186         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
187         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
188         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
189         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
190         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
191         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
192         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
193         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
194         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
195         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
196         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
197         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
198         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
199         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
200         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
201         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
202         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
203         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
204         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
205         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
206         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
207         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
208         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
209         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
210         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
211         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
212         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
213         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
214         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
215         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
216         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
217         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
218         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
219         SET_CPC_STATIC_INITIALIZER_STMT,
220         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
221         java_complete_class, java_check_circular_reference,
222         java_fix_constructors, java_layout_classes, java_reorder_fields,
223         java_method_add_stmt, java_get_line_col, reset_report,
224         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
225         java_finish_classes, ctxp, ctxp_for_generation,
226         ctxp_for_generation_last): Removed.
227         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
228         * mangle.c (utf8_cmp): New function.
229         (cxx_keywords): New global.
230         (cxx_keyword_p): New function.
231         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
232         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
233         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
234         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
235         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
236         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
237         * Make-lang.in (java.srcextra): Do nothing.
238         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
239         (JAVA_OBJS): Don't mention deleted files.
240         (java.mostlyclean): Likewise.
241         (java.clean): Likewise.
242         (JAVA_LEX_C): Removed.
243         (buffer.o, check-init.o, parse.o): Remove unused targets.
244         (typeck.o): Updated.
245         * jcf-parse.c (read_class): Comment out unused code.
246         (java_layout_seen_class_methods): New function.
247         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
248         Removed.
249         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
250         (init_jcf_parse): Removed.
251         * config-lang.in (gtfiles): Remove deleted files.
252         * decl.c (java_init_decl_processing): Don't initialize
253         finit_identifier_node, instinit_identifier_node,
254         length_identifier_node, super_identifier_node,
255         continue_identifier_node, access0_identifier_node.  Don't call
256         init_jcf_parse.
257         * class.c (cyclic_inheritance_report): New global.
258         (add_method_1): Don't use
259         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
260         (maybe_layout_super_class): Comment out code.
261         (safe_layout_class): New function.
262         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
263         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
264         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
265         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
266         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
267         (java_gimplify_case_expr): Removed.
268         (java_gimplify_default_expr): Likewise.
269         (java_gimplify_new_array_init): Likewise.
270         * parse.y: Removed.
271         * keyword.gperf, keyword.h: Removed.
272         * chartables.h: Removed.
273         * check-init.c: Removed.
274         * buffer.c, buffer.h: Removed.
275         * convert.h: Removed.
276         * gen-table.pl: Removed.
277         * lex.c, lex.h: Removed.
278
279 2007-01-02  Andrew Haley  <aph@redhat.com>
280
281         * expr.c (expand_java_arraystore): Make sure we perform a bounds
282         check at runtime before we perform a type check.
283
284 2006-12-19  Andrew Haley  <aph@redhat.com>
285
286         * decl.c: Bump minor BC ABI version.
287
288 2006-12-13  Gary Benson  <gbenson@redhat.com>
289
290         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
291
292 2006-12-12  Tom Tromey  <tromey@redhat.com>
293
294         * lang-specs.h: Pass -M options to jc1.
295         * jcf-depend.c (jcf_dependency_add_file): Don't emit
296         dependencies.
297
298 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
299
300         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
301
302 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
303
304         * lang-specs.h: Pass '%U'-based options as separate arguments.
305
306 2006-12-05  Tom Tromey  <tromey@redhat.com>
307
308         PR java/29495:
309         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
310         classes as well.
311         * class.c (add_field): Handle ACC_SYNTHETIC.
312         (add_method_1): Likewise.  Handle bridge and varargs.
313         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
314         annotation.
315         (set_class_decl_access_flags): Handle synthetic and annotation.
316         * java-tree.h (METHOD_BRIDGE): New macro.
317         (METHOD_VARARGS): Likewise.
318         (TYPE_SYNTHETIC): Likewise.
319         (TYPE_ANNOTATION): Likewise.
320         (lang_type): New fields 'synthetic' and 'annotation'.
321         (lang_decl_func): New fields 'varargs' and 'bridge'.
322
323 2006-12-04  Andrew Haley  <aph@redhat.com>
324
325         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
326         there's no map.
327
328 2006-11-29  Gary Benson  <gbenson@redhat.com>
329
330         * expr.c (rewrite_arglist_getcaller): Reorder.
331
332 2006-11-29  Andrew Haley  <aph@redhat.com>
333
334         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
335         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
336
337 2006-11-23  Andrew Haley  <aph@redhat.com>
338
339         * expr.c (rewrite_arglist_getcaller): New.
340         (rewrite_arglist_getclass): Fix indentation.
341         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
342         gnu.classpath.VMStackWalker.getCallingClassLoader().
343         * builtins.c (initialize_builtins): Remove duplicate def'n of
344         __sync_synchronize.
345         Add __builtin_return_address.
346
347 2006-11-22  Andrew Haley  <aph@redhat.com>
348
349         * jcf-reader.c (get_attribute): Mark attr_type unused.
350
351         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
352
353 2007-01-08  Richard Guenther  <rguenther@suse.de>
354
355         * lex.c (do_java_lex): Use build_int_cst_wide_type.
356         * jcf-parse.c (get_constant): Likewise.
357
358 2006-11-12  Jan Hubicka  <jh@suse.cz>
359
360         * resource.c (compile_resource_data): Update for new varpool names.
361         * java/class.c (build_utf8_ref): Likewise.
362
363 2006-11-12  David Daney  <ddaney@avtrex.com>
364
365         PR java/29805
366         * typeck.c (build_java_array_type): Increase buffer sizes.
367
368 2006-11-11  Richard Guenther  <rguenther@suse.de>
369
370         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
371         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
372
373 2006-11-06  Andrew Haley  <aph@redhat.com>
374
375         * java-tree.h (CONSTANT_LazyFlag): New.
376         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
377         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
378         reflection_data.
379         (handle_constant): Return 0 for dummy cpool entries.
380         Handle constants of kind Class.
381         Handle constants of kind NameAndType.
382         (handle_enclosingmethod_attribute): New.
383         (handle_signature_attribute): New.
384         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
385         (HANDLE_SIGNATURE_ATTRIBUTE): New.
386         (handle_constant): Use unmangle_classname()rather than calling
387         identifier_subst() directly.
388
389 2006-11-02  Andrew Haley  <aph@redhat.com>
390
391         * java-tree.h (FIELD_ENUM): New.
392         (lang_decl_var.field_enum): New.
393         (lang_type.enum_class): New.
394         (CLASS_ENUM): New.
395         * class.c (set_class_decl_access_flags): Handle enum types.
396         (add_field): Handle enum fields.
397         (get_access_flags_from_decl): Likewise.
398
399         * class.c (make_class_data): Put reflection_data into rodata.
400
401 2006-11-01  Andrew Haley  <aph@redhat.com>
402
403         * jcf-parse.c (field_offsets, bit_obstack): New variables.
404         (jcf_parse): Write end marker to annotation_data.
405         (java_parse_file): Create field_offsets bitmap.  Destroy it.
406         (annotation_grow, annotation_rewrite_byte) 
407         (annotation_rewrite_short, annotation_rewrite_int) 
408         (annotation_read_short, annotation_write_byte) 
409         (annotation_write_short, annotation_write_int) 
410         (handle_long_constant, handle_constant, handle_element_value) 
411         (handle_annotation, handle_annotations) 
412         (handle_annotation_attribute, rewrite_reflection_indexes) 
413         (handle_member_annotations, handle_parameter_annotations) 
414         (handle_default_annotation): New functions.
415         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
416         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
417         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
418         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
419         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
420         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
421         (TYPE_REFLECTION_DATA): New.
422         (TYPE_REFLECTION_DATASIZE): New.
423         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
424         an enum.
425         * jcf-reader.c (get_attribute): Pass field/method index and
426         attribute type to get_attribute().
427         * constants.c (find_class_or_string_constant): Make nonstatic.
428         (cpool_for_class): Likewise.
429         (build_constants_constructor): Separate string and scalar types.
430         * class.c (make_class_data): Generate field_indexes permutation.
431         Pass it to rewrite_reflection_indexes().
432         (make_class_data): Generate constructor for reflection_data field.
433
434 2006-10-20  Tom Tromey  <tromey@redhat.com>
435
436         * gcj.texi (Top): Don't mention jv-scan.
437         (Invoking gcj): Likewise.
438         (Invoking gcjh): Likewise.
439         (Invoking gjnih): Likewise.
440         (Invoking gij): Likewise.
441         (Invoking gcj-dbtool): Likewise.
442         (Invoking jv-scan): Removed.
443         * parse-scan.y: Removed.
444         * jv-scan.c: Removed.
445         * config-lang.in (stagestuff): Don't mention jv-scan.
446         * Make-lang.in (java): Removed jv-scan.
447         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
448         (JVSCAN_OBJS): Removed.
449         (jv-scan$(exeext)): Likewise.
450         (JAVA_MANFILES): Removed jv-scan.1.
451         (java.uninstall): Don't mention jv-scan.
452         (java.mostlyclean): Likewise.
453         (java.maintainer-clean): Likewise.
454         (.INTERMEDIATE): Likewise.
455         (java/jv-scan.o): Removed.
456         (jv-scan.pod): Likewise.
457         (java.srcextra): Don't mention parse-scan.c.
458         (java.mostlyclean): Likewise.
459         (java/parse-scan.c): Removed.
460         (java/parse-scan.o-warn): Removed.
461         (java/parse-scan.o): Removed.
462
463 2006-10-20  Tom Tromey  <tromey@redhat.com>
464
465         * lang.c (java_handle_option): Don't use
466         jcf_write_base_directory.
467         * jcf.h (jcf_write_base_directory): Removed.
468         * parse.y (java_expand_classes): Don't call write_classfile.
469         * config-lang.in (gtfiles): Removed jcf-write.c.
470         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
471         (java/jcf-write.o): Removed.
472         * jcf-parse.c (parse_class_file): Don't call write_classfile.
473         * java-tree.h (write_classfile): Removed declaration.
474         * jcf-write.c: Removed.
475
476 2006-10-20  Tom Tromey  <tromey@redhat.com>
477
478         * Make-lang.in (java): Removed gjnih, gcjh.
479         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
480         (GCJH_OBJS): Removed.
481         (GJNIH_OBJS): Likewise.
482         (gjnih$(exeext)): Likewise.
483         (gcjh$(exeext)): Likewise.
484         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
485         (java.install-common): Don't special case gcjh.
486         (java.uninstall): Don't mention gcjh, gjnih.
487         (java.mostlyclean): Likewise.
488         (java.maintainer-clean): Likewise.
489         (.INTERMEDIATE): Likewise.
490         (gcjh.pod): Removed.
491         (gjnih.pod): Likewise.
492         (GCJH_TARGET_INSTALL_NAME): Removed.
493         (java/gjavah-jni.o): Removed.
494         (java/gjavah.o): Likewise.
495         * config-lang.in (stagestuff): Removed gjnih, gcjh.
496         * gjavah.c: Removed.
497
498 2006-10-17  Tom Tromey  <tromey@redhat.com>
499
500         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
501         "string" case.
502
503 2006-10-17  Tom Tromey  <tromey@redhat.com>
504
505         * jvgenmain.c (main): Handle -findirect-dispatch.
506         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
507         jvgenmain.
508
509 2006-10-06  Andrew Haley  <aph@redhat.com>
510
511         * builtins.c (compareAndSwapInt_builtin): Check that we really do
512         have a compare_and_swap builtin.
513         (compareAndSwapLong_builtin): Likewise.
514         (compareAndSwapObject_builtin): Likewise.
515
516 2006-10-04  Andrew Haley  <aph@redhat.com>
517
518         * builtins.c (java_builtins): Add compareAndSwapInt,
519         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
520         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
521         putObjectVolatile, getObjectVolatile, getIntVolatile,
522         getLongVolatile, getLong.
523         (UNMARSHAL3): New macro.
524         (UNMARSHAL4): Likewise.
525         (UNMARSHAL5): Likewise.
526         (build_arglist_for_builtin): New function.
527         (build_addr_sum, build_check_this): New functions.
528         (putObject_builtin. compareAndSwapInt_builtin,
529         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
530         putVolatile_builtin, getVolatile_builtin): New builtins.
531
532 2006-06-08  Andrew Haley  <aph@redhat.com>
533  
534         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
535         get_symbol_table_index().
536         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
537         private method.
538         (build_known_method_ref): New arg: special.  Pass it to
539         get_symbol_table_index.
540         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
541         the method list.
542         (build_invokevirtual): New arg: special.  Pass it to
543         get_symbol_table_index.
544         (expand_invoke): New variable: special.
545         Pass it to maybe_rewrite_invocation().
546         Pass it to build_known_method_ref().
547         * class.c (build_symbol_entry): Add new arg: special.  Use it to
548         build the symbol table conbstructor.
549         (emit_symbol_table): Extract SPECIAL from the method list and pass
550         it to build_symbol_entry().
551         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
552         special accordingly.
553  
554 2006-09-08  Andrew Haley  <aph@redhat.com>
555
556         * class.c (layout_class_method): Use build_java_signature, not
557         build_java_argument_signature.  Use lookup_java_method, not
558         lookup_argument_method.
559
560 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
561             Bryce McKinlay  <bryce@mckinlay.net.nz>
562
563         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
564
565 2006-07-18  Tom Tromey  <tromey@redhat.com>
566
567         * lang.opt: Added missing -W options.
568
569 2006-07-12  Tom Tromey  <tromey@redhat.com>
570
571         PR java/28329:
572         * lang-specs.h: Pass '%U'-based options as separate arguments.
573         Use -faux-classpath.
574         * lang.c (java_handle_option): Handle OPT_faux_classpath.
575         * lang.opt (faux-classpath): New option.
576
577 2006-07-07  Tom Tromey  <tromey@redhat.com>
578
579         * class.c (make_class_data): Set value for reflection_data field.
580         * decl.c (java_init_decl_processing): Add reflection_data field.
581
582 2006-07-07  Tom Tromey  <tromey@redhat.com>
583
584         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
585         earlier.
586         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
587
588 2006-07-07  Andrew Haley  <aph@redhat.com>
589
590         * jcf-parse.c (set_source_filename): Don't check for
591         CLASS_FROM_CURRENTLY_COMPILED_P.
592         Remove // comments.
593
594 2006-07-07  Andrew Haley  <aph@redhat.com>
595
596         * java-tree.h (java_read_sourcefilenames): Declare.
597         * lang.c (java_handle_option): Call java_read_sourcefilenames().
598         * lang.opt (fsource-filename): New opt.
599         * lang-specs.h: Add -fsource-filename.
600         * jcf-parse.c (num_files, filenames): New variables.
601         (reverse, cmpstringp, java_read_sourcefilenames,
602         find_sourcefile): New.
603         (set_source_filename): Call find_sourcefile to find the real name
604         of a source file.
605
606 2006-06-27  Tom Tromey  <tromey@redhat.com>
607
608         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
609         Signature, LocalVariableTypeTable, annotation attributes.
610         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
611         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
612         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
613         (HANDLE_METHOD): Likewise.
614         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
615         (print_annotation): New function.
616         (print_element_value): Likewise.
617         (indent): Likewise.
618         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
619         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
620         (print_parameter_annotations): New function.
621         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
622         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
623         Likewise.
624         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
625         (print_annotations): New function.
626
627 2006-06-23  Tom Tromey  <tromey@redhat.com>
628
629         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
630         emitting class files, always use 1.5.
631         * gcj.texi (Input Options): Document -fsource.
632         (Code Generation): Document -ftarget.
633
634 2006-06-21  Tom Tromey  <tromey@redhat.com>
635
636         PR java/28089:
637         * expr.c (expand_java_field_op): Initialize field's declaring
638         class.
639
640 2006-06-20  Tom Tromey  <tromey@redhat.com>
641
642         * expr.c (push_value): Always flush quick stack.
643
644 2006-06-19  Tom Tromey  <tromey@redhat.com>
645
646         * expr.c (push_value): Also flush quick stack if value is a
647         component_ref.
648
649 2006-06-19  Tom Tromey  <tromey@redhat.com>
650
651         * expr.c (push_value): Flush quick stack if value has side
652         effects.
653
654 2006-06-13  Tom Tromey  <tromey@redhat.com>
655
656         * class.c (is_compiled_class): Explicitly check for current
657         class.
658
659 2006-06-09  Tom Tromey  <tromey@redhat.com>
660
661         * gjavah.c (decompile_method): Don't decompile a static field
662         accessor method.
663
664 2006-06-06  Tom Tromey  <tromey@redhat.com>
665
666         * lang-specs.h <jc1>: Add .jar file to command line if
667         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
668
669 2006-06-05  Tom Tromey  <tromey@redhat.com>
670
671         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
672         synthetic, enum, annotation.
673         * jcf.h (ACC_BRIDGE): New macro.
674         (ACC_VARARGS): Likewise.
675         (ACC_SYNTHETIC): Likewise.
676         (ACC_ENUM): Likewise.
677         (ACC_ANNOTATION): Likewise.
678
679 2006-06-04  Tom Tromey  <tromey@redhat.com>
680
681         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
682         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
683         and -ftarget.
684         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
685         when needed.  Handle classpath-setting.
686         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
687         * lang-specs.h: Rewrote.
688
689 2006-06-04  Tom Tromey  <tromey@redhat.com>
690
691         * jcf-io.c (find_class): Set source_ok to 0.
692         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
693         (parse_class_file): Don't call java_mark_class_local.
694         (java_parse_file): Skip .java files.  Call java_mark_class_local
695         before lowering any code.
696         (parse_zip_file_entries): Don't call duplicate_class_warning
697         here.
698         (process_zip_dir): ... call it here.
699         * class.c (add_field): Don't mark field external if it is being
700         compiled into this object.
701         (make_class_data): Handle situation where class_dtable_decl is
702         created before Class is compiled.
703         (is_compiled_class): Don't assume files in zip are compiled into
704         this object.
705         (layout_class_method): Don't mark method external if it is being
706         compiled into this object.
707
708 2006-06-04  Tom Tromey  <tromey@redhat.com>
709
710         * jcf-path.c (jcf_path_compute): New function.
711         * jcf.h (jcf_path_compute): Declare.
712
713 2006-10-23 Rafael Avila de Espindola  <rafael.espindola@gmail.com>
714
715         * decl.c: Include langhooks.h.
716         (builtin_function): Remove.
717         (java_init_decl_processing): Replace calls to builtin_function
718         with add_builtin_function.
719         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
720         (java/decl.o): Depend on langhooks.h.
721         * java-tree.h (builtin_function): Remove.
722
723 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
724
725         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
726
727 2006-09-12  Tom Tromey  <tromey@redhat.com>
728
729         * expr.c (push_value): Always flush quick stack.
730
731 2006-09-12  Tom Tromey  <tromey@redhat.com>
732
733         PR java/29013:
734         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
735         the push of the called method's return result.
736
737 2006-09-12  Tom Tromey  <tromey@redhat.com>
738
739         * jvspec.c (lang_specific_driver): Read spec file even if
740         -fsyntax-only.
741
742 2006-09-12  Tom Tromey  <tromey@redhat.com>
743
744         PR java/28754:
745         * expr.c (expand_java_field_op): Initialize field's declaring
746         interface if necessary.
747
748 2006-09-12  Tom Tromey  <tromey@redhat.com>
749
750         PR java/28892:
751         * expr.c (expand_java_field_op): No error for assignments not in
752         class initializer or constructor.
753
754 2006-08-22  Andrew Haley  <aph@redhat.com>
755
756         * decl.c (java_add_stmt): Give the statement list a type.
757
758 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
759             Bryce McKinlay  <bryce@mckinlay.net.nz>
760
761         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
762
763 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
764
765         PR java/8923
766         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
767         or '--' is used with a constant operand.
768         (java_complete_lhs): When processing a '++' or '--' expression,
769         don't call java_complete_tree but java_complete_lhs, so that a
770         static final variable operand is never replaced by its value. This
771         avoids an ICE later on.
772         (patch_unaryop): Fixed typo in comment.
773
774 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
775
776         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
777
778 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
779
780         * builtins.c (check_for_builtin): If a builtin could result in a
781         direct call being generated, don't use it if flag_indirect_dispatch
782         is set.
783
784 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
785
786         * gcj.texi (Invocation): Corrections for Invocation API example.
787
788 2006-07-04  Andrew Haley  <aph@redhat.com>
789
790         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
791         entry.
792
793 2006-06-21  Andrew Haley  <aph@redhat.com>
794
795         * java-tree.h (update_aliases): Remove
796         * expr.c (expand_iinc): Remove call to update_aliases().
797         (STORE_INTERNAL): Likewise.
798         * decl.c (update_aliases, initialize_local_variable) 
799         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
800
801 2006-06-19  Andrew Haley  <aph@redhat.com>
802
803         PR java/1305
804         PR java/27908
805         * expr.c (java_modify_addr_for_volatile): New function.
806         (expand_java_field_op): Handle volatile fields.
807         * java-gimplify.c (java_gimplify_component_ref): Call
808         java_modify_addr_for_volatile to give the field_ref the correct
809         volatile type.
810         (java_gimplify_modify_expr): Likewise.
811         * java-tree.h (java_modify_addr_for_volatile): New decl.
812
813 2006-06-17  Karl Berry  <karl@gnu.org>
814
815         * gcj.texi (@dircategory): Use "Software development" instead
816         of "Programming", following the Free Software Directory.
817
818 2006-06-16  Andrew Haley  <aph@redhat.com>
819
820         * class.c (make_class_data): When using flag_indirect_classes,
821         don't initialize the vtable of Class instances.
822
823 2006-06-09  Andrew Haley  <aph@redhat.com>
824
825         PR java/1305
826         PR java/27908
827         * builtins.c (initialize_builtins): Add __sync_synchronize().
828         * class.c (add_field): Mark volatile fields.
829         * java-gimplify.c (java_gimplify_expr): Call new functions to
830         handle self-modifying exprs and COMPONENT_REFs.
831         (java_gimplify_component_ref): New.
832         (java_gimplify_modify_expr): Add handling for volatiles.
833
834 2006-06-08  Tom Tromey  <tromey@redhat.com>
835
836         * gcj.texi (libgcj Runtime Properties): Document
837         gnu.gcj.user.realname.
838
839 2006-06-08  Andrew Haley  <aph@redhat.com>
840
841         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
842         get_symbol_table_index().
843         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
844         private method.
845         (build_known_method_ref): New arg: special.  Pass it to
846         get_symbol_table_index.
847         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
848         the method list.
849         (build_invokevirtual): New arg: special.  Pass it to
850         get_symbol_table_index.
851         (expand_invoke): New variable: special.
852         Pass it to maybe_rewrite_invocation().
853         Pass it to build_known_method_ref().
854         * class.c (build_symbol_entry): Add new arg: special.  Use it to
855         build the symbol table conbstructor.
856         (emit_symbol_table): Extract SPECIAL from the method list and pass
857         it to build_symbol_entry().
858         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
859         special accordingly.
860
861 2006-06-06  David Daney  <ddaney@avtrex.com>
862
863         * gcj.texi (libgcj Runtime Properties): Document
864         gnu.gcj.runtime.NameFinder.show_raw and
865         gnu.gcj.runtime.NameFinder.remove_unknown.
866
867 2006-06-06  Tom Tromey  <tromey@redhat.com>
868
869         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
870         synthetic, enum, annotation.
871         * jcf.h (ACC_BRIDGE): New macro.
872         (ACC_VARARGS): Likewise.
873         (ACC_SYNTHETIC): Likewise.
874         (ACC_ENUM): Likewise.
875         (ACC_ANNOTATION): Likewise.
876
877 2006-06-06  Mike Stump  <mrs@apple.com>
878
879         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
880         installing during build.
881
882 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
883
884         * gcj.texi (Extensions): Document the new gcj-dbtool-based
885         classname-to-library resolution mechanism.
886         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
887         mechanism deprecated.
888         (libgcj Runtime Properties): Document
889         gnu.gcj.runtime.VMClassLoader.library_control's new default.
890
891 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
892
893         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
894         bit wide type.
895         (jword): Define to uint64 on 64-bit arches.
896         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
897
898 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
899
900         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
901         typos.
902
903 2006-05-26  Tom Tromey  <tromey@redhat.com>
904
905         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
906         * verify-glue.c (vfy_class_type): New function.
907         * verify-impl.c (check_constant): Allow 'ldc class'.
908         * verify.h (vfy_class_type): Declare.
909
910 2006-05-25  Andrew Haley  <aph@redhat.com>
911
912         PR java/27756
913         * decl.c (maybe_pushlevels): When variable ranges are non-nested
914         update all lifetimes, not just the first one.
915
916 2006-05-24  Tom Tromey  <tromey@redhat.com>
917
918         * java-tree.h: Fixed flag documentation.
919
920 2006-05-24  Tom Tromey  <tromey@redhat.com>
921
922         PR libgcj/27729:
923         * jcf.h (ACC_INVISIBLE): Changed value.
924
925 2006-05-24  Andrew Haley  <aph@redhat.com>
926
927         PR java/27754
928         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
929         COMPOUND_EXPR.
930
931 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
932
933         * lang.opt (femit-class-file): Remove VarExists.
934
935 2006-05-16  Tom Tromey  <tromey@redhat.com>
936
937         * verify-impl.c (verify_instructions_0) <op_return>: Special case
938         for Object.<init>.
939
940 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
941
942         PR driver/26885
943         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
944         $(GCC_OBJS).
945
946 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
947
948         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
949         (java/expr.o): Replace target.h with $(TARGET_H).
950         (java/parse.o): Likewise.
951
952 2006-05-10  Andrew Haley  <aph@redhat.com>
953
954         * class.c (emit_indirect_register_classes): Fix comment.
955
956 2006-05-04  Tom Tromey  <tromey@redhat.com>
957
958         * java-tree.h (uses_jv_markobj_p): Declare.
959         * class.c (uses_jv_markobj_p): Removed.
960         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
961         (get_boehm_type_descriptor): Use it.
962         (uses_jv_markobj_p): Moved from class.c.  Return bool.
963
964 2006-05-04  Tom Tromey  <tromey@redhat.com>
965
966         * java-tree.def (THIS_EXPR): Now a tcc_expression.
967
968 2006-05-04  Andrew Haley  <aph@redhat.com>
969
970         * class.c (make_field_value): Always build_address_of fdecl if
971         there is an initializer.
972
973 2006-05-03  Andrew Haley  <aph@redhat.com>
974
975         PR libgcj/27352
976         * expr.c (maybe_rewrite_invocation): New function.
977         (rewrite_arglist_getclass): Likewise.
978         (rules): New.
979         (expand_invoke): Call maybe_rewrite_invocation.
980         * parse.y (patch_invoke): Likewise.
981         * java-tree.h: (maybe_rewrite_invocation): New function.
982
983 2006-04-21  Andrew Haley  <aph@redhat.com>
984
985         * lang.c (java_init): Handle flag_indirect_classes.
986         * jvgenmain.c: Use "class$$" instead of "class$".
987         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
988         DECLs.
989         (mangle_class_field): Special case "class$$" as well as "class$".
990         * constants.c (build_ref_from_constant_pool): If
991         flag_indirect_classes, generate a ref into the heap.
992         * decl.c (constants_field_decl_node,
993         constants_data_field_decl_node): New.
994         * class.c (build_static_class_ref): New.
995         (build_classdollar_field): Factor out from build_class_ref().
996         (make_field_value): Handle static fields in heap.
997         (make_class_data): Make sure we get a static ref to class.
998         Make class initializer const if flag_indirect_classes.
999         (register_class): Build a class_ref for initialization if
1000         flag_indirect_classes.
1001         (emit_indirect_register_classes): New.
1002
1003 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1004
1005         * expr.c, gjavah.c: Fix comment typos.
1006
1007 2006-04-03  Andrew Haley  <aph@redhat.com>
1008
1009         PR java/26858
1010         * expr.c (build_field_ref): Don't check the field offset if
1011         flag_syntax_only.
1012
1013 2006-03-30  Andrew Haley  <aph@redhat.com>
1014
1015         PR java/26858
1016         * lang.c (java_attribute_table): New.
1017         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1018         * expr.c (build_field_ref): Add a null pointer check for all
1019         fields of offset > 4k.  Don't do so for accesses via the this
1020         pointer, which we know can never be null.
1021         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1022         methods nonnull.
1023
1024 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1025
1026         * Make-lang.in: Rename docdir to gcc_docdir.
1027
1028 2006-03-30  Tom Tromey  <tromey@redhat.com>
1029
1030         PR java/26042:
1031         * parse.y (java_reorder_fields): Reset superclass field's size as
1032         well.
1033
1034 2006-03-28  Tom Tromey  <tromey@redhat.com>
1035
1036         PR java/26390:
1037         * parse.y (find_most_specific_methods_list): Added 'class'
1038         argument.
1039         (lookup_method_invoke): Updated.
1040
1041 2006-03-15  Tom Tromey  <tromey@redhat.com>
1042
1043         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1044         non-static method calls.
1045
1046 2006-03-15  David Daney  <ddaney@avtrex.com>
1047
1048         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1049         declaration.
1050
1051 2006-03-15  David Daney  <ddaney@avtrex.com>
1052
1053         * lang.opt (-freduced-reflection): New option.
1054         * lang.c (java_post_options): Generate an error if
1055         -freduced-reflection used with -fjni or -findirect-dispatch.
1056         * java-tree.h (flag_reduced_reflection): Declare new variable.
1057         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1058         if bitmap overflows and flag_reduced_reflection set.
1059         * class.c (uses_jv_markobj_p): New function.
1060         (make_class_data): Moved generation of vtable to before
1061         reflection data, generate less reflection data if
1062         flag_reduced_reflection set.
1063         * gcj.texi: Document -freduced-reflection.
1064
1065 2006-03-15  Tom Tromey  <tromey@redhat.com>
1066
1067         PR java/26638:
1068         * class.c (get_interface_method_index): Don't put <clinit> into
1069         interface table.
1070
1071 2006-03-15  Tom Tromey  <tromey@redhat.com>
1072
1073         * parse.y (analyze_clinit_body): Ignore empty statements.
1074
1075 2006-03-08  David Daney  <ddaney@avtrex.com>
1076
1077         * gcj.texi: Document -static-libgcj option.
1078
1079 2006-02-20  Andrew Haley  <aph@redhat.com>
1080
1081         * jcf-parse.c (parse_class_file): Set input_location from
1082         current_class.
1083
1084 2006-02-15  Andrew Haley  <aph@redhat.com>
1085
1086         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1087         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1088         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1089
1090 2006-02-09  Andrew Haley  <aph@redhat.com>
1091
1092         PR java/26192
1093         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1094         in their superclass.
1095
1096         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1097         array types.
1098         
1099 2006-02-08  Tom Tromey  <tromey@redhat.com>
1100
1101         PR java/22578:
1102         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1103         * builtins.c (convert_real): New function.
1104         (java_builtins): Handle Float.intBitsToFloat,
1105         Float.floatToRawIntBits, Double.longBitsToDouble,
1106         Double.doubleToRawLongBits.
1107
1108 2006-02-07  Andrew Haley  <aph@redhat.com>
1109
1110         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1111         class other than the one in which we expected to find it, ignore
1112         the result.
1113
1114         PR java/25535
1115         * constants.c (build_constants_constructor): move initializer into
1116         first halfword on a 64-bit big-endian machine.
1117
1118 2006-02-04  Tom Tromey  <tromey@redhat.com>
1119
1120         PR java/25676:
1121         * builtins.c (max_builtin): Skip floating point 'max'.
1122         (min_builtin): Skip floating point 'min'.
1123         (check_for_builtin): Never return NULL_TREE.
1124
1125 2006-02-04  Tom Tromey  <tromey@redhat.com>
1126
1127         PR java/26097:
1128         * expr.c (push_type): Avoid side effect in gcc_assert.
1129
1130 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1131
1132         * decl.c (java_init_decl_processing): Create char_type_node as a
1133         regular INTEGER_TYPE node.
1134         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1135         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1136         test for char_type_node and promoted_char_type_node as special
1137         instances of INTEGER_TYPE tree codes.
1138         (promote_type,build_java_signature): Likewise.
1139         * jcf-write.c (adjust_typed_op): Likewise.
1140         * mangle.c (mangle_type): Likewise.
1141         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1142         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1143
1144 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1145
1146         * expr.c (java_stack_swap): Revert gcc_assert patch.
1147
1148 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1149
1150         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1151         * typeck.c: Likewise.
1152         * verify-impl.c: Likewise.
1153         * class.c: Likewise.
1154         * decl.c: Likewise.
1155         * jcf-parse.c: Likewise.
1156         * constants.c: Likewise.
1157         * check-init.c: Likewise.
1158         * jcf-write.c: Likewise.
1159         * verify-glue.c: Likewise.
1160         * mangle.c: Likewise.
1161         * expr.c: Likewise.
1162         * lang.c: Likewise.
1163         * boehm.c: Likewise.
1164
1165 2006-02-01  Jan Hubicka  <jh@suse.cz>
1166
1167         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1168         * lang.c (java_init_options): Set no_unit_at_a_time_default.
1169
1170 2006-01-30  Andrew Haley  <aph@redhat.com>
1171
1172         PR java/21428
1173         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1174
1175 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1176
1177         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1178         Update copyright notice dates.
1179
1180 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1181
1182         * jvspec.c (lang_specific_spec_functions): Remove.
1183
1184 2006-01-06  Tom Tromey  <tromey@redhat.com>
1185
1186         * gcj.texi (Arrays): Added more documentation for
1187         JvNewObjectArray.
1188         (Primitive types): Correct information about primitive classes.
1189         (Reference types): New node.
1190         (Index): New node.
1191
1192 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
1193
1194         * jcf-parse.c (set_source_filename): Set the decl source location
1195         even when returning early.
1196
1197 2005-12-15  Tom Tromey  <tromey@redhat.com>
1198             Andrew Haley  <aph@redhat.com>
1199
1200         PR java/25429
1201         * parse.y (resolve_expression_name): Don't generate accessor
1202         methods for constant fields.
1203
1204 2005-12-13  Andrew Haley  <aph@redhat.com>
1205
1206         PR java/25366
1207         PR java/25368
1208         * class.c (maybe_layout_super_class): Update current_class before
1209         calling do_resolve_class.
1210
1211 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
1212
1213         PR java/25330
1214         * jcf-write.c (write_classfile): Use PID in temporary class
1215         file. Save/restore errno when reporting error.
1216
1217 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1218
1219         PR java/9861
1220         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1221         to bare_function_type and including the return type
1222         * builtins.c (initialize_builtins) : Change builtin mangled name
1223         constants to conform to new mangling scheme
1224
1225 2005-12-08  Andrew Haley  <aph@redhat.com>
1226
1227         PR libgcj/25265
1228         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1229         (soft_abstractmethod_node): New.
1230         * expr.c (build_field_ref): Add in-line check for missing field.
1231         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1232
1233 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1234
1235         * Make-lang.in (java.all.build, java.install-normal): Remove.
1236
1237 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1238
1239         * Make-lang.in: Remove all dependencies on s-gtype, except for
1240         gt-java-parse.h.
1241
1242 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
1243
1244         * class.c (build_utf8_ref, emit_register_classes): Use
1245         switch_to_section and get_section.
1246
1247 2005-12-06  Tom Tromey  <tromey@redhat.com>
1248
1249         PR java/25283:
1250         * parse.y (patch_new_array_init): Revert previous patch.
1251         (lookup_method_invoke): Use size-less array type when creating an
1252         anonymous constructor.
1253
1254 2005-12-05  Tom Tromey  <tromey@redhat.com>
1255
1256         * parse.y (patch_new_array_init): Don't set length on array.
1257
1258 2005-12-02  Richard Guenther  <rguenther@suse.de>
1259
1260         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1261         buildN instead of build.
1262         * class.c (finish_class): Likewise.
1263         * expr.c (java_create_object): Likewise.
1264
1265 2005-11-28  Tom Tromey  <tromey@redhat.com>
1266
1267         PR java/18278:
1268         * expr.c (build_jni_stub): Unwrap the return value.
1269         * java-tree.h (soft_unwrapjni_node): New define.
1270         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1271         * decl.c (java_init_decl_processing): Initialize
1272         soft_unwrapjni_node.
1273
1274 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
1275
1276         * gcj.texi (gij options): Add -Xss documentation.
1277
1278 2005-11-08  Wil Mahan  <wmahan@gmail.com>
1279
1280         PR java/23617
1281         * zextract.c (read_zip_archive): Fix out of memory error when
1282         reading jar files with zip-style comments.
1283
1284 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
1285
1286         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1287         formats.
1288         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1289
1290 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1291             Wil Mahan <wmahan@gmail.com>
1292
1293         PR java/23620
1294         * class.c (make_class): Create empty binfo here.
1295         (set_super_info): Only create binfo if we have superclasses.
1296
1297 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
1298
1299         PR java/24127
1300         * parse.y (method_header): Make the result of the rule a NULL_TREE
1301         when a parsing error occurs.
1302
1303 2005-09-29  Tom Tromey  <tromey@redhat.com>
1304
1305         PR java/24120:
1306         * jcf-io.c (memoized_dirlist_hash): New function.
1307         (caching_stat): Use it.
1308
1309 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
1310
1311         PR java/21418
1312         * class.c (inherits_from_p): Try to lay out super class
1313         if it is not already laid out.
1314         (maybe_layout_super_class): Handle the case where SUPER_CLASS
1315         is a NULL_TREE.
1316
1317 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
1318
1319         * builtins.c (max_builtin, min_builtin, abs_builtin,
1320         java_build_function_call_expr): Use fold_buildN.
1321         * class.c (layout_class_method): Likewise.
1322         * expr.c (java_truthvalue_conversion, build_java_jsr,
1323         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1324         build_java_binop, build_field_ref, expand_compare,
1325         build_known_method_ref, build_invokevirtual,
1326         process_jvm_instruction): Likewise.
1327         * parse.y (patch_binop, patch_exit_expr): Likewise.
1328         * typeck.c (convert_ieee_real_to_integer): Likewise.
1329         (convert): Don't call fold after convert_ieee_real_to_integer.
1330
1331 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
1332
1333         PR java/23891
1334         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1335         the newly created type. Set import lists here, not in create_class.
1336         (jdep_resolve_class): Set current_class.
1337         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
1338         the current package context, not ctxp->package.
1339         (cicp_cache): Removed.
1340         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
1341         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
1342         * java-tree.h (TYPE_PACKAGE): New macro.
1343         (struct lang_type): New member 'package'.
1344
1345 2005-09-09  Andrew Haley  <aph@redhat.com>
1346
1347         PR libgcj/23182 
1348         * expr.c (pop_type_0): If the expected type is object or ptr
1349         (i.e. void*), return the type of the object we just popped from
1350         the stack.
1351
1352 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
1353
1354         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1355         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1356
1357 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
1358
1359         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
1360         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
1361         typos.  Follow spelling conventions.
1362
1363 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
1364
1365         PR java/23431
1366         * typeck.c (lookup_do): Look up interfaces for the original class,
1367         not the base class.
1368         * parse.y (java_check_regular_methods): Fix diagnostic message for
1369         more restrictive overriding of a method from an interface.
1370
1371 2005-08-16  Tom Tromey  <tromey@redhat.com>
1372
1373         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1374         class' initial state.
1375
1376 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1377
1378         PR java/22113
1379         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1380         `literal_token' for large numeric input tokens.
1381
1382 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1383
1384         PR java/19870
1385         * parse.y (nested_field_access_p): Rename to nested_member_access_p
1386         and expand to handle method accesses across nested classes.
1387         (build_outer_method_access_method): Rename to
1388         build_nested_method_access_method.  Minor adjustments to comments.
1389         (resolve_expression_name): Use the newly-renamed
1390         nested_member_access_p method.
1391         (resolve_qualified_expression_name): Likewise.
1392         (patch_method_invocation): Also consider static methods for access
1393         method generation.  Minor adjustments to comments.
1394         (maybe_use_access_method): Use the more general
1395         nested_memeber_access_p to determine access across nested class
1396         boundaries.  Allow THIS_ARG to be NULL (for static methods).
1397
1398 2005-08-15  Tom Tromey  <tromey@redhat.com>
1399
1400         PR java/23300.
1401         * expr.c (build_field_ref): Don't generate otable reference when
1402         DECL_FIELD_OFFSET is 0.
1403         * class.c (maybe_layout_super_class): Pass outer class to
1404         do_resolve_class.
1405
1406 2005-08-15  Tom Tromey  <tromey@redhat.com>
1407
1408         * java-tree.h (LABEL_IN_SUBR): Removed.
1409         (LABEL_IN_SUBR): Likewise.
1410         (LABEL_IS_SUBR_START): Likewise.
1411         (LABEL_SUBR_START): Likewise.
1412         (LABEL_SUBR_CONTEXT): Likewise.
1413         (LABEL_CHANGED): Likewise.
1414         (LABEL_RETURN_LABEL): Likewise.
1415         (LABEL_RETURN_TYPE_STATE): Likewise.
1416         (LABEL_RETURN_LABELS): Likewise.
1417         (RETURN_MAP_ADJUSTED): Likewise.
1418         (LABEL_PENDING_CHAIN): Likewise.
1419
1420 2005-08-15  Tom Tromey  <tromey@redhat.com>
1421
1422         * Make-lang.in (JAVA_OBJS): Removed verify.o
1423         (java/verify.o): Removed.
1424         * verify.c: Removed.
1425         * lang.c (flag_new_verifier): Removed.
1426         (java_post_options): Updated.
1427         * java-tree.h (flag_new_verifier): Removed.
1428         (verify_jvm_instructions): Removed.
1429         * expr.c (pop_type_0): Assume flag_new_verifier is true.
1430         (build_java_check_indexed_type): Likewise.
1431         (expand_java_arraystore): Likewise.
1432         (expand_java_arrayload): Likewise.
1433         (pop_arguments): Likewise.
1434         (expand_byte_code): Likewise.
1435         (process_jvm_instruction): Likewise.
1436
1437 2005-08-10  Andrew Haley  <aph@redhat.com>
1438
1439         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1440         type mismatches to make legal GIMPLE.
1441
1442 2005-08-10  Robin Green <greenrd@greenrd.org>
1443
1444         PR java/23230:
1445         * parse.y (maybe_use_access_method): Generalize check from
1446         java.lang.Object to any superclass of current_class
1447
1448 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1449
1450         * class.c (build_class_ref): Wrap the primary class type in a
1451         NOP_EXPR.
1452         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1453         primary class type from the NOP_EXPR in which it was placed.
1454
1455 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
1456
1457         * expr.c (expand_load_internal): Fix missing parens in
1458         predicate.
1459
1460 2005-07-28  Andrew Haley  <aph@redhat.com>
1461
1462         * expr.c (expand_load_internal): Convert to destination type.
1463
1464 2005-07-22  Manfred Hollstein  <mh@suse.com>
1465
1466         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1467         (check_constant): Likewise.
1468         (check_wide_constant): Likewise.
1469
1470 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
1471
1472         Make CONSTRUCTOR use VEC to store initializers.
1473         * check-init.c (check_init): Update to cope with VEC in
1474         CONSTRUCTOR_ELTS.
1475         * class.c (make_field_value, make_method_value, get_dispatch_table,
1476         make_class_data, emit_symbol_table, emit_catch_table,
1477         emit_assertion_table): Use build_constructor_from_list instead of
1478         build_constructor.
1479         * constants.c (build_constants_constructor): Likewise.
1480         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
1481         VEC in CONSTRUCTOR_ELTS.
1482         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
1483         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
1484         of a TREE_LIST.
1485         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
1486         CONSTRUCTOR_ELTS.
1487         * parse.y (build_new_array_init): Use build_constructor_from_list
1488         instead of build_constructor.
1489         (patch_new_array_init): Update to cope with VEC in
1490         CONSTRUCTOR_ELTS.
1491         (array_constructor_check_entry): Likewise.
1492
1493 2005-07-12  Tom Tromey  <tromey@redhat.com>
1494
1495         * jvspec.c (lang_specific_driver): Put filelist_filename first on
1496         command line.
1497
1498 2005-07-12  Tom Tromey  <tromey@redhat.com>
1499
1500         PR java/19674:
1501         * parse-scan.y (interface_member_declaration): Added
1502         empty_statement.
1503
1504 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
1505         
1506         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
1507         (LABEL_PENDING_CHAIN): Ditto.
1508         (LABEL_PC): Ditto.
1509         (DECL_BIT_INDEX): Ditto.        
1510
1511 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1512
1513         PR java/18119
1514         * parse.y (inner_class_accessible): New function. Logic moved from
1515         check_inner_class_access.
1516         (check_inner_class_access): Use inner_class_accessible.
1517         (resolve_inner_class): Simplify arguments. Create circularity hash
1518         here. Keep looking for classes if we found one that was inaccessible. 
1519         Return the inaccessible class only if there is no other match.
1520         (do_resolve_class): Update for new resolve_inner_class arguments.
1521         Don't create circularity_hash here.
1522
1523 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1524
1525         PR java/21045
1526         * parse.y (add_exception_to_throws): New function.
1527         (purge_unchecked_exceptions): Removed.
1528         (get_constructor_super): Renamed from verify_constructor_super. Now
1529         returns the super constructor after verification.
1530         (java_complete_expand_method): Don't use purge_unchecked_exceptions
1531         or save/restore the exception list.
1532         (check_thrown_exceptions): Add uncaught exceptions in anonymous
1533         class initializers and constructors to the throws clause of the method. 
1534
1535 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
1536
1537         PR java/19674
1538         * parse.y (interface_member_declaration): Allow empty statements in
1539         interface declarations.
1540
1541 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
1542
1543         * Makefile.in (parse.o): Adjust dependencies.
1544         * parse.y: Include tree-dump.h.
1545
1546 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
1547
1548         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
1549         flag for quoting.
1550
1551 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
1552
1553         * parse.y (issue_warning_error_from_context): Call
1554         pp_output_formatted_text to be able to get the buffer.
1555
1556 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
1557
1558         * parse.y (issue_warning_error_from_context): Update for the
1559         renaming of pp_format_text to pp_format.
1560
1561 2005-06-28  Paul Brook  <paul@codesourcery.com>
1562
1563         * decl.c (java_init_decl_processing): Call
1564         default_init_unwind_resume_libfunc.
1565
1566 2005-06-27  Tom Tromey  <tromey@redhat.com>
1567
1568         PR java/21540, PR java/13788:
1569         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
1570         fold_constant_for_init.
1571         (patch_binop): Added 'folding' argument.  Updated all callers.
1572         (patch_unaryop) <NOP_EXPR>: New case.
1573         (fold_constant_for_init) <NOP_EXPR>: Likewise.
1574         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
1575
1576 2005-06-25  Jan Hubicka  <jh@suse.cz>
1577
1578         * builtins.c (define_builtin): Accept new flags parameter.
1579         (initialize_builtins): Mark the builtins const and nothrow accordingly.
1580
1581 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
1582
1583         * all files: Update FSF address in copyright headers.
1584
1585 2005-06-24  Tom Tromey  <tromey@redhat.com>
1586
1587         * verify-impl.c (verify_instructions_0): Correctly handle
1588         situation where PC falls off end.
1589
1590 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
1591
1592         PR java/20697
1593         * parse.y (find_most_specific_methods_list): Remove special case for
1594         inner classes.
1595
1596 2005-06-15  Tom Tromey  <tromey@redhat.com>
1597
1598         PR libgcj/21906:
1599         * class.c (make_method_value): Use soft_abstractmethod_node for
1600         abstract method.
1601         * java-tree.h (soft_abstractmethod_node): New define.
1602         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
1603         * decl.c (java_init_decl_processing): Initialize
1604         soft_abstractmethod_node.
1605
1606 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
1607
1608         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
1609
1610 2005-06-13  Per Bothner  <per@bothner.com>
1611
1612         * expr.c (int highest_label_pc_this_method,
1613         start_label_pc_this_method): New globals.
1614         (lookup_label): Add start_label_pc_this_method to pc for label, and
1615         update highest_label_pc_this_method.  This prevents conflicts between
1616         labels from different methods.
1617         * java-tree.h: Declare new globals.
1618         * jcf-parse.c (parse_class_file): If needed bump
1619         start_label_pc_this_method and reset highest_label_pc_this_method.
1620
1621 2005-06-13  Tom Tromey  <tromey@redhat.com>
1622
1623         PR java/21844:
1624         * parse.y (nested_field_access_p): Handle case where outer field
1625         is inherited by enclosing class.
1626
1627 2005-06-12  Per Bothner  <per@bothner.com>
1628
1629         * class.c (inherits_from_p): Do load_class if needed.
1630
1631 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1632
1633         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
1634         * java-tree.h (parse_error_context): Move...
1635         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
1636         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
1637         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
1638
1639 2005-06-08  Roger Sayle  <roger@eyesopen.com>
1640
1641         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
1642
1643 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
1644
1645         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
1646         msgid for argument name.
1647         * gjavah.c (error): Likewise.
1648         * java-tree.h (parse_error_context): Likewise.
1649         * parse.y (parse_error_context, parse_warning_context,
1650         issue_warning_error_from_context): Likewise.
1651
1652 2005-06-01  Tom Tromey  <tromey@redhat.com>
1653
1654         PR java/21722:
1655         * class.c (build_static_field_ref): Don't fold constant fields if
1656         current class is from a .class file and we're using indirect
1657         dispatch.
1658
1659 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1660
1661         * java/verify-glue.c: Don't include errors.h and include toplev.h.
1662         * java/Make-lang.in: Updates dependencies.
1663
1664 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
1665
1666         PR java/19870.
1667         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
1668         NESTED_FIELD_ACCESS_IDENTIFIER_P.
1669         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
1670         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
1671         * jcf-write.c (generate_classfile): Use
1672         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1673         OUTER_FIELD_ACCESS_IDENTIFIER_P.
1674         * parse.y (build_outer_field_access): Rename to
1675         build_nested_field_access. Support static fields and outer-to-inner
1676         class accesses.
1677         (outer_field_access_p): Rename to nested_field_access_p. Support
1678         static fields and generalise to outer-to-inner class and sibling
1679         inner class accesses.
1680         (outer_field_expanded_access_p): Rename to
1681         nested_field_expanded_access_p and support static fields.
1682         (outer_field_access_fix): Rename to nested_field_access_fix and
1683         support static fields.
1684         (build_outer_field_access_expr): Rename to
1685         build_nested_field_access_expr and support static fields.
1686         (build_outer_field_access_methods): Rename to
1687         build_nested_field_access_methods and support static fields. For
1688         static fields, generate accessors without class instance parameters.
1689         (build_outer_field_access_method): Rename to
1690         build_nested_field_access_method and support static fields.
1691         (build_outer_method_access_method): Use
1692         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1693         OUTER_FIELD_ACCESS_IDENTIFIER_P.
1694         (resolve_expression_name): Consider static field accesses across
1695         nested classes.
1696         (resolve_qualified_expression_name): Likewise.
1697         (java_complete_lhs): Use nested_field_access_fix instead of
1698         outer_field_access_fix.
1699         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
1700         Use nested_field_expanded_access_p instead of
1701         outer_field_expanded_access_p. Use nested_field_access_fix instead
1702         of outer_field_access_fix.
1703         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
1704         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
1705
1706 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
1707
1708         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
1709         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
1710         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
1711         MINOR_BINARYCOMPAT_ABI_VERSION): New.
1712         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
1713         (parse_version): Calculate version ID using new method. Use bit-flags
1714         for flag_indirect_dispatch and flag_bootstrap_classes.
1715
1716 2005-05-25  Richard Henderson  <rth@redhat.com>
1717
1718         PR libgcj/21692
1719         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
1720         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
1721         DECL_CONTEXT; avoid pushdecl_top_level.
1722         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
1723         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
1724         (layout_class_method): Likewise.
1725         * decl.c (java_mark_cni_decl_local): New.
1726         (java_mark_class_local): Use it.
1727         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
1728         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
1729         (struct lang_decl_func): Add local_cni;
1730         (struct lang_decl_var): Add class_field, vtable.
1731         (java_mangle_decl): Declare.
1732         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
1733         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
1734         (mangle_obstack_1): New.
1735         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
1736         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
1737         lhd_set_decl_assembler_name for things that don't need mangling.
1738         (mangle_class_field): Rename from java_mangle_class_field, make
1739         static, don't call init_mangling or finish_mangling.
1740         (mangle_vtable): Similarly.
1741         (mangle_local_cni_method_decl): New.
1742         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
1743         gcc_assert, and MANGLE_RAW_STRING.
1744         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
1745
1746 2005-05-25  DJ Delorie  <dj@redhat.com>
1747
1748         * class.c (set_constant_value): Move warning control from if() to
1749         warning(OPT_*).
1750
1751 2005-05-24  Richard Henderson  <rth@redhat.com>
1752
1753         * builtins.c (define_builtin): Don't call make_decl_rtl.
1754         * constants.c (build_constant_data_ref): Likewise.
1755         * class.c (build_utf8_ref): Likewise.
1756         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
1757         (get_dispatch_table, layout_class_method): Likewise.
1758         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
1759         by hand.
1760         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
1761         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
1762         to determine if we need a non-zero address.
1763         * decl.c (builtin_function): Don't call make_decl_rtl.
1764         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
1765         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
1766         * resource.c (compile_resource_data): Likewise.
1767         * parse.y (resolve_field_access): Re-word comment to avoid
1768         building DECL_RTL.
1769
1770 2005-05-24  Richard Henderson  <rth@redhat.com>
1771
1772         * class.c (registered_class): Take it out of class_roots; turn into
1773         a vec of trees.
1774         (register_class): Make static.  Don't duplicate decl node.  Use
1775         VEC_safe_push.
1776         (emit_register_classes): Use VEC_iterate.  Use output_constant
1777         instead of assemble_integer.  Don't call mark_decl_referenced
1778         directly.
1779         * java-tree.h (register_class): Remove decl.
1780
1781 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
1782
1783         PR java/17845
1784
1785         * parse.y (register_package, package_list): Remove.
1786         (package_declaration): Do not call register_package.
1787         (do_resolve_class): Do not use package_list.
1788
1789 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
1790
1791         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
1792         unused variable.
1793
1794 2005-05-15  Tom Tromey  <tromey@redhat.com>
1795
1796         PR java/21519:
1797         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
1798         NOTE_PUSH.
1799
1800 2005-05-12  Aaron Luchko <aluchko@redhat.com>
1801
1802         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
1803
1804 2005-05-11  Tom Tromey  <tromey@redhat.com>
1805
1806         * gcj.texi (Code Generation): Document -fbootstrap-classes.
1807         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
1808         (parse_version): Use it.
1809         * lang.opt (-fbootstrap-classes): New option.
1810
1811 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
1812
1813         PR java/21436
1814         * class.c (maybe_layout_super_class): Look for imports in this_class.
1815         * parse.h (ctxp_for_generation_last): New.
1816         (do_resolve_class): Add a parameter.
1817         * parse.y (ctxp_for_generation_last): New.
1818         (java_pop_parser_context): Add at end of list.
1819         (find_in_imports, find_in_imports_on_demand): Look in ctxp
1820         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
1821         the given type are NULL.
1822         (do_resolve_class): Look into the imports of the new second parameter.
1823         Adjust recursive calls.
1824         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
1825         calls to do_resolve_class.
1826         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
1827         (java_complete_class): Do not do that here.
1828
1829 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
1830
1831         PR java/20309
1832         * Make-lang.in (java): Add gjnih.
1833         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1834         (GJNIH_OBJS): New variable.
1835         (gjnih$(exeext)): New target.
1836         (JAVA_MANFILES): Add gjnih.1.
1837         (java.uninstall): Add gjnih.1.
1838         (java.mostlyclean): Add gjnih.
1839         (java.maintainer-clean): Add gjnih.1.
1840         (java/gjavah-jni.o): New target.
1841         (.INTERMEDIATE): Add gjnih.pod.
1842         (gjnih.pod): New target.
1843         * config-lang.in (stagestuff): Add gjnih.
1844         * gcj.texi (Top): Add gjnih node.
1845         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
1846         -bootclasspath options.
1847         (Invoking gjnih): New node.
1848         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
1849         (TOOLNAME): New macro.
1850         (error): Replace hard-coded gcjh with TOOLNAME.
1851         (process_file): Likewise.
1852         (usage): Likewise.
1853         (version): Likewise.
1854         (help): Likewise.  Add help output for -force, -old, -trace and -J
1855         options.
1856         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
1857         (options): Add force, old, trace and J fields.
1858         (main): Handle -force, -old, -trace and -J options.
1859
1860 2005-05-03  Tom Tromey  <tromey@redhat.com>
1861
1862         PR java/21245:
1863         * gjavah.c (main): Unlink output file on error.
1864
1865 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
1866
1867         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
1868         copyright.
1869
1870 2005-04-29  Tom Tromey  <tromey@redhat.com>
1871
1872         * expr.c (build_jni_stub): Updated for change to build_block.
1873
1874 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
1875
1876         * expr.c (force_evaluation_order): Declare 'saved' earlier.
1877
1878 2005-04-28  Andrew Haley  <aph@redhat.com>
1879
1880         PR java/19285
1881         * java-tree.h (soft_resolvepoolentry_node): New.
1882         (alloc_constant_fieldref): Declare.
1883         * expr.c (expand_java_field_op): Don't call class_init for
1884         accesses to static fields with indirect dispatch.
1885         * builtins.c (initialize_builtins): Add "__builtin_expect".
1886         * decl.c (soft_resolvepoolentry_node): New variable.
1887         (java_init_decl_processing): Create a decl for
1888         "_Jv_ResolvePoolEntry".
1889         * class.c (build_fieldref_cache_entry): New function.
1890         (build_static_field_ref): Rewrite for indirect dispatch.
1891         * constants.c (find_name_and_type_constant_tree): New function.
1892         (alloc_constant_fieldref): Likewise.
1893         (build_constants_constructor): Handle CONSTANT_Fieldref and
1894         CONSTANT_NameAndType.
1895
1896         PR java/21115
1897         * expr.c (force_evaluation_order): Convert outgoing args smaller
1898         than integer.
1899
1900 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
1901
1902         * gcj.texi (libgcj Runtime Properties): Remove obsolete
1903         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
1904         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
1905
1906 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1907
1908         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
1909         to `unlock_stream' with `unlock_std_streams'.
1910
1911 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
1912
1913         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
1914         instead of just expr.h.
1915
1916 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1917
1918         * gjavah.c (main): Unlock the stdio streams.
1919         * jcf-dump.c (main): Likewise.
1920         * jv-scan.c (main): Likewise.
1921         * jvgenmain.c (main): Likewise.
1922
1923 2005-04-23  DJ Delorie  <dj@redhat.com>
1924
1925         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
1926         parse.y: Adjust warning() callers.
1927
1928 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
1929
1930         * gcj.texi (Object fields): Change "Integer" to "Int" in example
1931         contructor.
1932
1933 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
1934
1935         * gcj.texi: Fix typos and bogus example.
1936
1937 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
1938
1939         * except.c: Fix a comment typo.
1940
1941 2005-04-19  Julian Brown  <julian@codesourcery.com>
1942
1943         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
1944         indirect dispatch with PIC.
1945
1946 2005-04-18  Andrew Haley  <aph@redhat.com>
1947
1948         * java-except.h (struct eh_range.handler): Remove unused field.
1949         (handle_nested_ranges): Remove function declaration.
1950         (sanity_check_exception_range): Add function declaration.       
1951         * verify.c (verify_jvm_instructions): Remove call to
1952         handle_nested_ranges.
1953         * verify-glue.c (verify_jvm_instructions_new): Call
1954         sanity_check_exception_range.
1955         * except.c (link_handler, eh_range_freelist, link_handler,
1956         handle_nested_ranges): Remove.
1957         (add_handler): Rewrite.
1958         (sanity_check_exception_range): New function.
1959         (print_ranges): New function.
1960
1961 2005-04-13  Julian Brown  <julian@codesourcery.com>
1962
1963         * decl.c (finish_method): Give methods once-only linkage.
1964
1965 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
1966
1967         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1968
1969 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1970
1971         * java-tree.h: Don't use PARAMS().
1972
1973 2005-04-07  Per Bothner  <per@bothner.com>
1974
1975         * class.c (push_class): By default, suppress debug output.
1976         (finish_class): Enable debug output for classes we're emitting.
1977
1978 2005-04-07  Andrew Haley  <aph@redhat.com>
1979
1980         * gcj.texi: Correct gcj-dbtool instructions.
1981
1982 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
1983
1984         * gcj.texi: Fix a typo.
1985         * lang.c: Fix a comment typo.
1986
1987 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
1988
1989         * gcj.texi (Invoking gij): Add descriptions of new -X options.
1990         Mention recognized-and-ignored compatibility options.
1991         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
1992         JvFree.
1993         (About CNI): Add Memory allocation section.
1994
1995 2005-04-01  Tom Tromey  <tromey@redhat.com>
1996
1997         * decl.c (java_init_decl_processing): Fix types of
1998         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
1999         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2000         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2001
2002 2005-03-31  Jan Hubicka  <jh@suse.cz>
2003
2004         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2005         * class.c: Include cgraph.h
2006         (make_local_functoin_alias): Mark aslias as needed.
2007         * resource.c: Include cgraph.h
2008         (compile_resource_data): Go via cgraph interface.
2009
2010 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2011
2012         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2013
2014 2005-03-30  Tom Tromey  <tromey@redhat.com>
2015
2016         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2017         inner_class_info_index==0 or outer_class_info_index==0.
2018
2019 2005-03-29  Tom Tromey  <tromey@redhat.com>
2020
2021         * gcj.texi (libgcj Runtime Properties): Document
2022         gnu.gcj.runtime.endorsed.dirs.
2023
2024 2005-03-24  Anthony Green  <green@redhat.com>
2025
2026         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2027         'gcj-dbtool -p'.
2028
2029 2005-03-23  Tom Tromey  <tromey@redhat.com>
2030
2031         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2032         (parse_version): Use it.
2033
2034 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2035
2036         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2037
2038 2005-03-18  Andrew Haley  <aph@redhat.com>
2039
2040         PR java/20522
2041         * decl.c (update_aliases): Don't update variables that are about
2042         to die.
2043         (maybe_poplevels): Add comment.
2044
2045 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2046
2047         PR java/20502
2048         * jcf-parse.c (duplicate_class_warning): New function.
2049         (java_parse_file): Call duplicate_class_warning if 
2050         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2051         (parse_zip_file_entries): Likewise. Also set
2052         CLASS_FROM_CURRENTLY_COMPILED_P.
2053
2054 2005-03-16  Andrew Haley  <aph@redhat.com>
2055
2056         * expr.c (expand_java_arrayload): Don't generate a
2057         NullPointerException based on the type of the node.
2058         (build_java_array_length_access): Likewise.
2059
2060 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2061
2062         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2063
2064 2005-03-11  Tom Tromey  <tromey@redhat.com>
2065
2066         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2067         (libgcj Runtime Properties): Document the default .db.
2068
2069 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2070
2071         PR java/20312
2072         * parse.y (checks_throws_clauses): Check exceptions list even when
2073         the base class does not come from a source file being compiled.
2074         (java_complete_lhs): Remove unused variable 'wfl'.
2075
2076 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2077
2078         PR java/20338
2079         * decl.c (finish_method): Emit _Jv_InitClass for private static
2080         methods inside inner classes as well.
2081
2082 2005-03-08  Julian Brown  <julian@codesourcery.com>
2083         * Revert patch from 2005-03-08 for causing bootstrap failure on
2084         ppc-darwin.
2085
2086 2005-03-08  Julian Brown  <julian@codesourcery.com>
2087
2088         * decl.c (finish_method): Give methods once-only linkage.
2089
2090 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2091
2092         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2093
2094 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2095
2096         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2097         can_widen_reference_to if the C++ ABI is in use.
2098         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2099         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2100         type_isresolved, init_state, set_pc, state_get_pc,
2101         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2102         (verify_fail): Report the current PC from the verifier context.
2103         (free_state): Remove #if 0 block to enable this function.
2104         (free_verifier_context): Call free_state on state_list iterator
2105         values before freeing them.
2106         * expr.c (pop_type_0): Pop correct type for error message when stack
2107         contains a multi-word type.
2108
2109 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2110
2111         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2112         for known NULL array length access.
2113
2114 2005-03-07  Tom Tromey  <tromey@redhat.com>
2115
2116         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2117
2118 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2119
2120         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2121         typeck.c: Update copyright.
2122
2123 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2124
2125         Remove xref code.
2126         * xref.c, xref.h: Remove file.
2127         * Make-lang.in (java/xref.o): Remove.
2128         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2129         * lang.c (flag_emit_xref): Remove definition.
2130         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2131         * typeck.c (convert): Remove use of do_not_fold.
2132         * parse.y (do_not_fold): Remove definition.
2133         (parser grammar): Remove xref code.
2134         (maybe_create_class_interface_decl, create_class): Likewise.
2135         (register_fields, method_header, finish_method_declaration): Likewise.
2136         (declare_local_variables, source_end_java_method): Likewise.
2137         (java_complete_expand_classes): Do not set do_not_fold.
2138         (java_complete_expand_method): Remove xref code.
2139         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2140         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2141         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2142         (patch_synchronized_statement, patch_throw_statement): Likewise.
2143         (maybe_build_class_init_for_field): Likewise.
2144
2145 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2146
2147         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2148         instead of IS_NON_TYPE_CODE_CLASS.
2149
2150 2005-03-04  Andrew Haley  <aph@redhat.com>
2151
2152         PR java/18362
2153         * class.c (set_method_index): Don't set method_index if it is
2154         NULL_TREE.
2155         (layout_class_method): Don't complain about "non-static method foo
2156         overrides static method" in the case of indirect dispatch.
2157
2158 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2159
2160         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2161         warning.
2162         * Make-lang.in: Don't elide warnings in jcf-io.c.
2163
2164 2005-03-01  Per Bothner  <per@bothner.com>
2165
2166         PR java/8608
2167         * check-init.c (wfl): Remove static.
2168         (final_assign_error, check_init): Replace calls to parse_error_context
2169         by plain error.
2170         (check_init): Save, set, and restore input_location for each exp.
2171
2172 2005-03-01  Per Bothner  <per@bothner.com>
2173
2174         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2175         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2176         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2177
2178 2005-03-01  Per Bothner  <per@bothner.com>
2179
2180         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2181
2182 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2183
2184         PR libgcj/16923
2185         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2186         JvVMOption.
2187
2188 2005-02-22  Tom Tromey  <tromey@redhat.com>
2189
2190         PR java/20056:
2191         * verify-impl.c (EITHER): New define.
2192         (types_compatible): Handle it.
2193         (check_field_constant): Use it.
2194
2195 2005-02-18  Tom Tromey  <tromey@redhat.com>
2196
2197         PR java/20056:
2198         * verify-impl.c (types_equal): Fixed test.
2199
2200         PR java/20056:
2201         * verify-glue.c (vfy_class_has_field): New function.
2202         * verify.h (vfy_class_has_field): Declare.
2203         * verify-impl.c (check_field_constant): Added 'putfield'
2204         argument.
2205         (verify_instructions_0): Updated.
2206         (types_equal): New function.
2207
2208 2005-02-14  Tom Tromey  <tromey@redhat.com>
2209
2210         PR java/19921:
2211         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2212         stack effect of multianewarray.
2213
2214 2005-02-14  Andrew Haley  <aph@redhat.com>
2215
2216         PR java/19907
2217         * expr.c (expand_byte_code): Call promote_arguments().
2218         (promote_arguments): New function.
2219         * decl.c (check_local_unnamed_variable): Remove special case for
2220         new verifier.
2221         (find_local_variable): Promote all boolean types to int
2222         when searching for local variable decls.
2223
2224 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
2225
2226         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2227         parse-scan.y: Update copyright.
2228
2229 2005-02-11  Per Bothner  <per@bothner.com>
2230
2231         PR java/15543
2232         * parse-scan.y (input_location): Remove variable.
2233         (main_input_filename): New - replaces input_filename, which isn't
2234         settable if USE_MAPPED_LOCATION.
2235         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2236         so we don't reference input_location or wfl_operator in that case.
2237         * jv-scan.c (expand_location): Remove - no longer used.
2238         (main): Set main_input_filename rather than input_filename.
2239
2240 2005-02-09  Richard Henderson  <rth@redhat.com>
2241
2242         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2243         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2244
2245 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
2246
2247         * expr.c (add_type_assertion): Use the proper enumeration type,
2248         since this is what htab_find_slot() is expecting.
2249
2250 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2251
2252         * gcj.texi: Update copyright dates.
2253
2254 2005-02-02  Tom Tromey  <tromey@redhat.com>
2255
2256         * gcj.texi (libgcj Runtime Properties): Default library_control
2257         to 'cache'.
2258
2259 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
2260
2261         PR java/15543
2262         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2263         (modifiers) when square brackets are present in a declaration for
2264         a final paramter.
2265         * jv-scan.c (main): Set input_filename and input_line.
2266
2267 2005-02-01  Tom Tromey  <tromey@redhat.com>
2268
2269         PR java/19742:
2270         * gjavah.c (get_field_name): Don't override name for JNI header.
2271
2272 2005-02-01  Roger Sayle  <roger@eyesopen.com>
2273
2274         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2275         of unsigned types using iushr and lushr JVM bytecodes.
2276
2277 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2278
2279         PR java/19738
2280         * gjavah.c (jni_print_float): Do not emit floating-point
2281         initialiser for a static final field.
2282         (jni_print_double): Likewise.
2283
2284 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
2285
2286         Revert:
2287         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2288         * gjavah.c (print_field_info): Mark static data members of
2289         floating-point type with "__extension__".
2290
2291 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2292
2293         * gjavah.c (print_field_info): Mark static data members of
2294         floating-point type with "__extension__".
2295
2296 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2297
2298         PR java/9157
2299         * parse.y (build_string_concatenation): Remove redundant if.
2300         (patch_conditional_expr): Attempt to patch_string() the condition
2301         of a ?: as well, in addition to its other operands.
2302
2303 2005-01-25  Tom Tromey  <tromey@redhat.com>
2304
2305         * Make-lang.in (java/java-tree-inline.o): Removed.
2306
2307 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
2308
2309         PR java/19070
2310         * parse.y (patch_binop): Allow comparisons against NULL only
2311         if the other operand is of a reference type.
2312
2313 2005-01-24  Tom Tromey  <tromey@redhat.com>
2314
2315         * java-tree.h (gcj_abi_version): Declare.
2316         * class.c (make_class_data): Push gcj_abi_version into "next"
2317         field.  Renamed field.
2318         * decl.c (gcj_abi_version): New global.
2319         (parse_version): New function.
2320         (java_init_decl_processing): Call it.  Renamed 'next' field.
2321         Include version.h.
2322         (GCJ_BINARYCOMPAT_ADDITION): New define.
2323
2324 2005-01-24  Roger Sayle  <roger@eyesopen.com>
2325
2326         PR java/19295
2327         * jcf-write.c (generate_bytecode_insns): Conversions between
2328         integer types of the same precision shouldn't generate widening
2329         or narrowing conversion bytecodes.
2330
2331 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
2332
2333         * java-except.h, java-tree.h: Remove unused prototypes.
2334
2335 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
2336
2337         PR java/18091:
2338         * jcf-write.c (perform_relocations): Don't call memcpy if source
2339         and destination are the same.
2340
2341 2005-01-17  Tom Tromey  <tromey@redhat.com>
2342
2343         * verify-impl.c (get_short): Sign extend.
2344         (get_int): Likewise.
2345
2346 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
2347
2348         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2349         with TYPE_SIZE.
2350
2351 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2352
2353         * verify.c: Revert to the version before the BC-ABI merge.
2354
2355 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2356
2357         PR java/19277
2358         * check-init.c (check_init): Take care of references that do not
2359         have an explicit final variable declaration (e.g. array length
2360         access) for pre/post in/de-crement operators.
2361
2362 2005-01-08  Mark Wielaard  <mark@klomp.org>
2363
2364         * parse.y (process_imports): Allocate (and free) original_name only
2365         when not already defined.
2366         * jcf-parse.c (read_class): Free results of find_class() and
2367         lrealpath().
2368         (java_parse_file): Keep pointer to head of file_list and free when
2369         done. Free result of lrealpath().
2370
2371 2005-01-05  Tom Tromey  <tromey@redhat.com>
2372
2373         * gcj.texi (Standard Properties): java.ext.dirs is now used.
2374
2375 2004-12-20  Andrew Haley  <aph@redhat.com>
2376
2377         * typeck.c: Use fold_convert for ints and booleans.
2378
2379 2004-12-17  Andrew Haley  <aph@redhat.com>
2380
2381         PR java/18931
2382         * typeck.c (convert): Use a CONVERT_EXPR when converting to
2383         BOOLEAN_TYPE or CHAR_TYPE.
2384         (convert_to_boolean, convert_to_char) : Remove.
2385         * convert.h (convert_to_boolean, convert_to_char) : Remove.
2386         * expr.c (expand_load_internal): Do type conversion if type is not
2387         as required.
2388
2389 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
2390
2391         PR target/18459
2392         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2393         Update comment.
2394
2395 2004-12-07  Andrew Haley  <aph@redhat.com>
2396
2397         PR java/18811:
2398         * jcf-parse.c (load_class): Remove sanity test for missing inner
2399         class file.
2400
2401 2004-12-06  Tom Tromey  <tromey@redhat.com>
2402
2403         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
2404         (java.uninstall): Likewise.
2405         (java.maintainer-clean): Likewise.
2406         (.INTERMEDIATE): Likewise.
2407         (java.install-man): Likewise.
2408         (gcj-dbtool.pod): New target.
2409         * gcj.texi (Code Generation): Document -findirect-dispatch.
2410         (libgcj Runtime Properties): Document
2411         gnu.gcj.precompiled.db.path.
2412         (Top): Link to "Invoking gcj-dbtool".
2413
2414 2004-12-06  Tom Tromey  <tromey@redhat.com>
2415
2416         PR java/14853:
2417         * java-tree.h (extract_field_decl): Declare.
2418         * parse.y (extract_field_decl): Renamed from
2419         strip_out_static_field_access_decl.  No longer static.
2420         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
2421
2422 2004-12-03  Tom Tromey  <tromey@redhat.com>
2423
2424         * lang.c (flag_new_verifier): Define.
2425         (java_post_options): Set flag_new_verifier if indirect dispatch
2426         is being used.
2427         * lang.opt (fnew-verifier): Removed.
2428
2429 2004-12-03  Tom Tromey  <tromey@redhat.com>
2430
2431         PR bootstrap/14614:
2432         * Make-lang.in (java.install-common): Only install transformed
2433         gcjh if gcj-cross exists.
2434
2435 2004-12-03  Andrew Haley  <aph@redhat.com>
2436
2437         PR java/18812
2438         * except.c (link_handler): Patch 'outer' field of siblings of the
2439         range we're demoting.
2440
2441 2004-12-03  Andrew Haley  <aph@redhat.com>
2442
2443         PR java/18697
2444         * class.c (layout_class_method): Don't fail to override a method
2445         simply because it has DECL_ARTIFICIAL set.
2446
2447 2004-12-02  Tom Tromey  <tromey@redhat.com>
2448
2449         PR java/16675:
2450         * parse.y (craft_constructor): Special case null_pointer_node.
2451
2452 2004-12-02  Tom Tromey  <tromey@redhat.com>
2453
2454         PR java/18741:
2455         * java-gimplify.c (java_gimplify_expr): Don't call
2456         SET_EXPR_LOCATION unless wrapped tree is an expression.
2457
2458 2004-11-27  Per Bothner  <per@bothner.com>
2459
2460         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
2461         Fix fencepost error in 'i', which got executed one too many times.
2462         Also, fold memcpy into explicit loop, as originally intended.
2463         Also, free temporary 'buf' which otherwise leaks.
2464
2465 2004-11-27  Per Bothner  <per@bothner.com>
2466
2467         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2468         local static variables if not USE_MAPPED_LOCATION.
2469
2470 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2471
2472         * class.c, decl.c, expr.c: Fix comment typos.
2473
2474 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
2475
2476         PR java/18305
2477         * decl.c (end_java_method): Call
2478         attach_init_test_initialization_flags on all the init_decls.
2479         * parse.y (attach_init_test_initialization_flags): Move to ...
2480         * expr.c (attach_init_test_initialization_flags): here and
2481         support BIND_EXPR also.
2482         * java-tree.h (attach_init_test_initialization_flags): Prototype.
2483         * jcf-parse.c (parse_class_file): Don't disable class init
2484         optimization.
2485
2486 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2487
2488         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
2489         in diagnostics.
2490
2491 2004-11-24  Richard Henderson  <rth@redhat.com>
2492
2493         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
2494         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2495
2496 2004-11-24  Tom Tromey  <tromey@redhat.com>
2497
2498         * verify.c (defer_merging): Don't use C++-style comment.
2499         * verify.h (java_opcode): Added java_opcode_end.
2500         * class.c (build_class_ref): Remove C++ comment and old FIXME.
2501
2502         * verify-impl.c (vfy_push_type): Removed bogus "return".
2503         (initialize_stack): Use vfy_alloc and vfy_free.
2504         (verify_instructions_0): Likewise.
2505
2506         * Merged gcj-abi-2-dev-branch to trunk.
2507
2508 2004-11-24  Andrew Haley  <aph@redhat.com>
2509
2510         * jcf-parse.c (parse_class_file): Set file_start_location.
2511
2512 2004-11-10  Tom Tromey  <tromey@redhat.com>
2513
2514         * class.c (make_field_value): Don't call build_static_field_ref.
2515         (build_static_field_ref): Don't emit direct references when using
2516         indirect dispatch.
2517
2518         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
2519         -verbose:class into man page synopsis.
2520
2521 2004-11-09  Tom Tromey  <tromey@redhat.com>
2522
2523         * expr.c (build_java_arraystore_check): Still generate check if
2524         element type is itself an array.
2525
2526 2004-11-08  Tom Tromey  <tromey@redhat.com>
2527
2528         * java-tree.h (soft_check_assignment_node): Removed.
2529         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
2530         * decl.c (java_init_decl_processing): Don't initialize
2531         soft_check_assignment_node.
2532
2533 2004-11-05  Tom Tromey  <tromey@redhat.com>
2534
2535         * class.c (layout_class_methods): Don't add Miranda methods when
2536         using indirect dispatch.
2537
2538 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
2539
2540         * class.c (make_class_data): Call emit_assertion_table to set the
2541         'assertion_table' field.
2542         (build_signature_for_libgcj): Move here from expr.c.
2543         (add_assertion_table_entry): New function. Callback for assertion
2544         hashtable traversal.
2545         (emit_assertion_table): New. Take class argument, and generate
2546         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
2547         * decl.c (init_decl_processing): Define assertion_entry_type record.
2548         Push 'assertion_table' class field instead of 'verify'.
2549         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
2550         (type_assertion_hash): Include 'assertion_code' in hash.
2551         (add_type_assertion): Rewritten. Take class and assertion_code
2552         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
2553         (can_widen_reference_to): Use new add_type_assertion() arguments.
2554         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
2555         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
2556         (verify_identifier_node): Removed.
2557         (assertion_entry_type, assertion_table_type): New.
2558         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
2559         assertion code definitions.
2560         (struct type_assertion): Add assertion_code. Rename 'source_type' and
2561         'target_type' to 'op1' and 'op2'.
2562         (add_type_assertion): Declare.
2563         (lang_printable_name_wls): Remove unused definition.
2564         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
2565         to emit runtime assertion.
2566         (vfy_note_stack_type): Clean up non-C90 declarations.
2567         (vfy_note_local_type): Likewise.
2568         * verify.h (vfy_is_assignable_from): Declare.
2569         * verify-impl.c (is_assignable_from_slow): Remove unused function.
2570         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
2571         instead of is_assignable_from_slow().
2572         (types_compatible): Reinstate ref_compatible() call.
2573
2574 2004-11-04  Tom Tromey  <tromey@redhat.com>
2575
2576         * class.c (build_static_field_ref): Reverted previous patch.
2577
2578         * class.c (build_static_field_ref): Don't emit direct references
2579         when using indirect dispatch.
2580
2581 2004-11-03  Tom Tromey  <tromey@redhat.com>
2582
2583         * expr.c (expand_java_arrayload): Set lhs_type_node.
2584         (expand_java_arraystore): Set rhs_type_node.
2585
2586 2004-11-02  Tom Tromey  <tromey@redhat.com>
2587
2588         * jcf-parse.c (compute_class_name): Use filename length from zip
2589         directory, not strlen.
2590
2591         * expr.c (expand_invoke): Mark new interface methods as abstract.
2592
2593 2004-11-01  Tom Tromey  <tromey@redhat.com>
2594
2595         * verify-impl.c (push_jump): Removed check for uninitialized
2596         objects.
2597         (push_exception_jump): Likewise.
2598         (handle_ret_insn): Likewise.
2599         (handle_jsr_insn): Likewise.
2600         (state_check_no_uninitialized_objects): Removed.
2601
2602         * decl.c (check_local_unnamed_variable): Recognize
2603         promoted-to-int parameters when using the new verifier.
2604         * expr.c (expand_java_arraystore): Explicitly request array type
2605         when using new verifier.
2606         (expand_java_arrayload): Likewise.
2607         (invoke_build_dtable): Don't pass object_type_node as
2608         expression argument to build_java_indirect_ref.
2609         (build_java_check_indexed_type): Do nothing.
2610         (build_java_arraystore_check): Handle case where array doesn't
2611         have array type.
2612         (build_java_array_length_access): Likewise.
2613         (expand_invoke): Handle case where interface overrides a method
2614         from Object.
2615         (pop_type_0): Always succeed for reference types.
2616         (process_jvm_instruction): Don't pop a value in a dead
2617         exception handler.
2618         (pop_arguments): Convert arguments to correct types.
2619
2620 2004-10-29  Andrew Haley  <aph@redhat.com>
2621
2622         * jcf-parse.c (give_name_to_class): Remove line that was
2623         incorrectly merged.
2624
2625 2004-10-29  Andrew Haley  <aph@redhat.com>
2626
2627         * jcf-parse.c (set_source_filename): Add code to build new sfname.
2628
2629 2004-10-20  Andrew Haley  <aph@redhat.com>
2630
2631         * decl.c (end_java_method): Don't expand if flag_syntax_only.
2632
2633 2004-10-26  Tom Tromey  <tromey@redhat.com>
2634
2635         * verify.h (vfy_notify_verified): Removed.
2636         * verify-glue.c (vfy_notify_verified): Removed.
2637
2638 2004-10-26  Tom Tromey  <tromey@redhat.com>
2639
2640         * verify-impl.c (debug_print_state): Declare `i' before code.
2641         (merge_types): Modify `t' when it is null_type.
2642
2643 2004-10-26  Tom Tromey  <tromey@redhat.com>
2644
2645         * verify-impl.c (type_print): Renamed from print.  Now static and
2646         takes an argument.
2647         (debug_print_state): Use type_print.
2648
2649 2004-10-25  Tom Tromey  <tromey@redhat.com>
2650
2651         * expr.c (build_invokeinterface): Compute correct offset for
2652         index into interface methods.
2653
2654 2004-10-20  Tom Tromey  <tromey@redhat.com>
2655
2656         * java-tree.h (verify_jvm_instructions_new): Declare.
2657
2658         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
2659         command line.
2660
2661         * verify-impl.c (verify_instructions): Correctly handle wide
2662         types on the stack.
2663         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
2664         (vfy_get_component_type): Strip pointer types.
2665         (vfy_find_class): Use get_type_from_signature.  Strip pointer
2666         types.
2667         Include java-except.h.
2668
2669 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
2670
2671         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
2672         vfy_push_type_t, set_variable, add_new_state, merge_into,
2673         handle_jsr_insn, branch_prepass, check_class_constant,
2674         check_wide_constant, get_one_type, compute_static_types,
2675         verify_instructions_0): Clean up C99 declarations after statements.
2676
2677 2004-10-20  Tom Tromey  <tromey@redhat.com>
2678
2679         * verify-impl.c (merge_refs): Compare reference against iterator,
2680         not ref2.
2681
2682         * verify-glue.c (vfy_tag): Mask off resolved flag.
2683
2684 2004-10-19  Tom Tromey  <tromey@redhat.com>
2685
2686         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
2687         (init_state_with_stack): Initialize `this_type' in state.
2688         (verify_method): Use debug_print.
2689         * verify-glue.c (vfy_is_primitive): Removed debugging print.
2690         (vfy_note_stack_depth): Reverted last patch.
2691         (vfy_note_stack_type): Note pointer to Object, not Object.
2692         (vfy_note_local_type): Likewise.
2693
2694         * verify.h (vfy_note_instruction_seen): Declare.
2695         * verify-glue.c (verify_jvm_instructions_new): Set
2696         BCODE_EXCEPTION_TARGET on target instruction.
2697         (vfy_note_instruction_seen): New function.
2698         * verify-impl.c (FLAG_INSN_SEEN): New define.
2699         (verify_instructions_0): Set flag on instruction.  Save state for
2700         PC=0 later.
2701         (verify_instructions): Call vfy_note_instruction_seen.
2702
2703         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
2704         (verify_jvm_instructions_new): Call method_init_exceptions,
2705         add_handler, and handle_nested_ranges.
2706         * verify-impl.c (verify_method): Return 1 on success.
2707         (verify_instructions_0): Save the state at PC=0.
2708
2709         * verify-impl.c (init_type_from_class): Set is_resolved and
2710         ref_next on new ref_intersection.
2711         (init_type_from_string): Likewise.
2712
2713 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
2714
2715         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
2716         if flag_new_verifier is set.
2717         * java-tree.h (flag_new_verifier): Declare.
2718         * lang.opt (fnew-verifier): New option.
2719         * verify-impl.c: Work around namespace pollution by undef'ing
2720         'current_class'.
2721         (struct verifier_context): Make 'bytecode' const.
2722         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
2723         (types_compatible): For the BC-ABI, always consider reference types
2724         compatible.
2725         (check_class_constant): Use vfr->current_class.
2726         (check_constant): Likewise.
2727         (check_wide_constant): Likewise.
2728         (check_field_constant): Check for 'L' at start of type name.
2729         (get_one_type): Return pointer instead of type. Set type result in
2730         caller via passed type pointer.
2731         (compute_argument_types): Update to use new get_one_type arguments.
2732         (compute_return_type): Likewise.
2733         (make_verifier_context): New. Allocate and initialize 'vfr'.
2734         (free_verifier_context): New. Free 'vfr' and its contents.
2735         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
2736         and free_verifier_context.
2737
2738 2004-10-15  Tom Tromey  <tromey@redhat.com>
2739
2740         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
2741         * verify.h (vfy_fail): Fixed formatting.
2742
2743         * verify-impl.c (vfr): Fixed comment formatting.
2744         (collapse_type): New function.
2745         (verify_instructions): Notify compiler about type map.
2746         * verify.h (vfy_note_stack_depth): Updated.
2747         (vfy_note_stack_type): Likewise.
2748         (vfy_note_local_type): Likewise.
2749         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
2750         Declare.
2751         * verify-glue.c (vfy_note_stack_depth): Correctly size type
2752         state.  Added `method' argument.
2753         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
2754         argument.
2755         (vfy_note_local_type): New function.
2756         (vfy_unsuitable_type): Likewise.
2757         (vfy_return_address_type): Likewise.
2758         (vfy_null_type): Likewise.
2759
2760         * verify.h (VFY_IN_GCC): Removed.
2761         (VFY_WANT_TYPEMAP): Removed.
2762         * verify-impl.c (verify_instructions_0): Removed useless "\".
2763         (struct state) <next>: Uncomment.
2764
2765 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
2766
2767         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
2768         C-style.
2769
2770 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2771
2772         * Make-lang.in (verify.o): Re-enabled this target.
2773         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
2774         (vfy_get_interface): Likewise.
2775         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
2776         * verify.h (verify_jvm_instructions_new): Declare.
2777         * verify-impl.c (free_state): Temporarily comment out unused
2778         function.
2779
2780 2004-10-06  Tom Tromey  <tromey@redhat.com>
2781
2782         * java-tree.h (JV_STATE_READ): New enum value.
2783
2784 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2785
2786         * verify.h: New file.
2787
2788 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
2789
2790         * verify-impl.c, verify-glue.c, verify.h: New files.
2791         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
2792
2793 2004-09-24  Andrew Haley  <aph@redhat.com>
2794
2795         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
2796         for a slot if it's of pointer type.
2797
2798 2004-09-14  Tom Tromey  <tromey@redhat.com>
2799
2800         * class.c (make_class_data): Correctly initialize "state" field.
2801         Initialize "engine" field.
2802         * decl.c (java_init_decl_processing): Add "engine" field.
2803
2804 2004-09-10  Andrew Haley  <aph@redhat.com>
2805
2806         PR java/12760
2807         * expr.c (build_invokeinterface): Use fast method for interface
2808         dispatch.
2809         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
2810         JTI_ITABLE_PTR_TYPE.
2811         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
2812         (emit_symbol_table): Add new arg, element_size.
2813         * decl.c (java_init_decl_processing): Initialize Class.itable.
2814         * class.c (GEN_TABLE): New macro.
2815         (gen_indirect_dispatch_tables): Use it.  Add itable.
2816         (make_class_data): Add new arg for emit_symbol_table().
2817         Emit itable.
2818         (add_miranda_methods): Make sure search_class has been parsed.
2819         (emit_symbol_table): Add new arg, element_size.
2820
2821 2004-09-06  Andrew Haley  <aph@redhat.com>
2822
2823         * verify.c (merge_types): Return Object for all merges of
2824         interfaces.
2825         * expr.c (add_type_assertion): Don't generate assertions when
2826         source type is array of Object.
2827
2828 2004-09-03  Andrew Haley  <aph@redhat.com>
2829
2830         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
2831
2832         * lang.c (java_post_options): Force flag_verify_invocations if
2833         we're not using indirect dispatch.
2834
2835         * expr.c (pop_type_0): Move test for interfaces before call to
2836         can_widen_reference_to().
2837         (build_signature_for_libgcj): Remove generation of canonical array
2838         type.
2839         (add_type_assertion): Canonicalize both arrays.
2840         Don't assert that type X can be assigned to Object.
2841         Don't assert that type X an be assigned to type X.
2842         Don't assert that Object can be assigned to type X.
2843         (can_widen_reference_to): Warn whenever we generate an assertion.
2844         (process_jvm_instruction): Use throwable_type_node for the type of
2845         an exception class.
2846
2847 2004-09-01  Andrew Haley  <aph@redhat.com>
2848
2849         * decl.c (java_init_decl_processing): Change
2850         verify_identifier_node to "__verify".
2851         * expr.c (add_type_assertion): Use verify_identifier_node for name.
2852         * java-tree.h (verify_identifier_node): Change to "__verify".
2853
2854         * expr.c (build_signature_for_libgcj): New function.
2855         (add_type_assertion): Use it to construct signatures for
2856         source_type and target_type.
2857
2858 2004-08-27  Andrew Haley  <aph@redhat.com>
2859
2860         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
2861         (verify_identifier_node): New.
2862         (TYPE_VERIFY_METHOD): New.
2863         (struct type_assertion): New type.
2864         * expr.c (type_assertion_eq): New function.
2865         (type_assertion_hash): New function.
2866         (add_type_assertion): New function.
2867         (can_widen_reference_to): Call add_type_assertion().
2868         * decl.c (java_init_decl_processing): Add verify_identifier_node.
2869         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
2870         (finish_class): Output TYPE_VERIFY_METHOD (type).
2871
2872         * decl.c (end_java_method): Nullify unused fields.
2873
2874 2004-08-17  Andrew Haley  <aph@redhat.com>
2875
2876         * verify.c (defer_merging): Quieten.
2877         * jcf-parse.c (load_class): Only try to open a class file if it's
2878         java.lang.Object or if it's part of the current compilation.
2879         Check that the class we just tried to load is the class we just
2880         loaded.  Quieten.
2881         (java_parse_file): Set flag_verify_invocations off if we're
2882         compiling from .class.
2883         (parse_zip_file_entries): Abort if we try to read a dummy class.
2884         * expr.c (can_widen_reference_to): Quieten.
2885         (build_invokevirtual): Abort if we try to invokevirtual an
2886         interface.
2887         (expand_invoke): Don't build a non-interface call to an interface.
2888         (build_instanceof): Don't do premature optimization if
2889         flag_verify_invocations is not set.
2890         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
2891         from superclass.
2892         (build_static_field_ref): Add correct type conversion for
2893         field_address.
2894         (add_miranda_methods): Disable generation of Miranda methods for
2895         dummy classes.
2896         (layout_class_method): Don't complain about non-static method
2897         overrides static method with dummy classes.
2898
2899 2004-08-13  Tom Tromey  <tromey@redhat.com>
2900
2901         * class.c (build_static_field_ref): Re-enable atable lookups for
2902         static fields.
2903
2904         * parse.y (strip_out_static_field_access_decl): Indentation fix.
2905
2906 2004-08-11  Tom Tromey  <tromey@redhat.com>
2907
2908         * gcj.texi (libgcj Runtime Properties): Document new properties.
2909
2910 2004-08-06  Andrew Haley  <aph@redhat.com>
2911
2912         * jcf-parse.c (load_class): Check that we really have loaded the
2913         class we're looking for.
2914
2915 2004-07-19  Andrew Haley  <aph@redhat.com>
2916
2917         * verify.c (verify_jvm_instructions): Comment change only.
2918
2919         * typeck.c (build_java_array_type): Add size field to array name.
2920
2921         * java-tree.h (LOCAL_SLOT_P): New.
2922         (update_aliases): Add PC argument.
2923         (pushdecl_function_level): New function.
2924
2925         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2926         MODIFY_EXPR, and SAVE_EXPR.
2927         (java_gimplify_modify_expr): New function.
2928
2929         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2930         (expand_iinc): Pass PC to update_aliases().
2931         (STORE_INTERNAL): Likewise.
2932         (process_jvm_instruction): Likewise.
2933
2934         * decl.c (base_decl_map): New variable.
2935         (uniq): New variable.
2936         (update_aliases): Rewrite with more thorough checking.
2937         (debug_variable_p): New function.
2938         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
2939         (check_local_named_variable): Delete whole function.
2940         (initialize_local_variable): New function.
2941         (check_local_unnamed_variable): Add checks and comments.
2942         (find_local_variable): Rewrite.
2943         (java_replace_reference): New function.
2944         (function_binding_level): New variable.
2945         (pushdecl_function_level): New function.
2946         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2947         (maybe_pushlevels): Call pushdecl() on each of the new decls.
2948         (start_java_method): Reset uniq.  Create base_decl_map.  Set
2949         function_binding_level.
2950         (end_java_method): Null unused fields to save memory.
2951
2952 2004-06-29  Andrew Haley  <aph@redhat.com>
2953
2954         * except.c (expand_start_java_handler): Push a new binding level.
2955         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
2956         register_exception_range() to register where we'll do it.
2957         (expand_end_java_handler): Remove old bogus code.  Replace with
2958         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2959         the top of the expression we're curently building.
2960         (maybe_end_try): Delete.
2961         * decl.c (binding_level.exception_range): New field.
2962         (clear_binding_level): Add field exception_range.  Reformat.
2963         (poplevel): Call expand_end_java_handler().
2964         (poplevel): Call java_add_stmt only if functionbody is false.
2965         (maybe_poplevels): Don't call maybe_end_try() from here.
2966         (end_java_method): Clear no longer used trees in function decl.
2967         (register_exception_range): New function.
2968         * java-tree.h (register_exception_range, struct eh_range): Declare.
2969
2970 2004-06-22  Andrew Haley  <aph@redhat.com>
2971
2972         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
2973         the otable.
2974         * check-init.c (get_variable_decl): Teach check-init about
2975         FIELD_DECLs addressed via the otable.
2976         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
2977         CLASS_PARSED_P.
2978
2979 2004-05-28  Andrew Haley  <aph@redhat.com>
2980
2981         * jcf-parse.c (load_class): Don't try to read a class that we've
2982         already read.
2983
2984         * expr.c (build_invokeinterface): Use the old-fashioned way of
2985         doing indirect dispatch: look up interfaces by name.
2986         * java-tree.h (enum java_tree_index): Add
2987         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
2988         * decl.c (java_init_decl_processing): Add
2989         soft_lookupinterfacemethodbyname_node.
2990
2991         * gjavah.c (print_method_info): Final methods have vtable entries,
2992         so gjavah needs to output them.
2993         * class.c (layout_class_method): Generate vtable entries for final
2994         methods.
2995         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
2996         dispatch, even if a method is final.
2997
2998 2004-05-25  Andrew Haley  <aph@redhat.com>
2999
3000         * class.c (build_symbol_entry): Convert the names of constructors
3001         to init_identifier_node when generating an entry for the indirect
3002         dispatch table.
3003
3004         * expr.c (build_known_method_ref): Generate indirect calls for
3005         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3006
3007 2004-05-24  Andrew Haley  <aph@redhat.com>
3008
3009         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3010         atable element is of the right type.
3011
3012         * class.c (build_static_field_ref): Cast pointer to correct type
3013         for field.
3014
3015 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3016
3017         * Merged with HEAD as of 20040514. Diff against
3018         gcj-abi-2-merge-20040514.
3019
3020 2004-04-16  Andrew Haley  <aph@redhat.com>
3021
3022         * verify.c (check_pending_block): Disable subroutine checks.
3023         (defer_merging): New function.
3024         (merge_types): If types are dummy, use defer_merging to combine them.
3025         (verify_jvm_instructions): If invocation is invokeinterface and
3026         target is dummy, assume target really is an interface.
3027
3028         * parse.y (patch_invoke): Break out call to java_create_object.
3029
3030         * lang.c (flag_verify_invocations): New.
3031
3032         * jcf-parse.c (load_class): If we've already failed to load a
3033         class, don't try again.
3034         (load_class): If we can't find a .class file, don't fail, but emit
3035         a warning.
3036         (parse_class_file): Don't act on dummy methods.
3037
3038         * java-tree.h (flag_verify_invocations): New.
3039         (TYPE_DUMMY): New.
3040         (lang_type.dummy_class): New field.
3041         (java_create_object): New function.
3042         (METHOD_DUMMY): New.
3043
3044         * expr.c (build_field_ref): Widen field offset.
3045         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3046         that each of its elements is compatible with the one we're
3047         popping.
3048         (pop_type_0): Issue a warning to say that we need to generate a
3049         runtime check.
3050         (java_create_object): New function.
3051         (build_field_ref): Only generate hard refs if we're not using
3052         indirect dispatch.
3053         (expand_java_field_op): If we're using !verify_invocations and we
3054         see a missing field, generate a decl for it.
3055
3056         (expand_invoke): If a class doesn't have the method we seek and
3057         we're using !flag_verify_invocations, generate a decl for the
3058         method now.
3059
3060         (build_known_method_ref): Always use indirect dispatch via the
3061         atable for static methods.
3062
3063         (expand_java_NEW): Break out object creation into new function,
3064         java_create_object.
3065
3066         (can_widen_reference_to): Issue a warning to say that we need to
3067         generate a runtime check.
3068
3069         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3070         (make_method_value): Also use index for interfaces.
3071         (make_class_data): Skip dummy field for inherited data.
3072         Don't build method array for dummy methods.
3073         Set size_in_byte to -1 when using inirect dispatch
3074         Don't build a hard class ref if we don't have a hard ref to our
3075         superclass, or if we're using inirect dispatch.
3076         Null out dispatch tables.
3077
3078         (layout_class_method): Don't complain about non-static method
3079         overrides static method is method is artificial.
3080
3081         (build_static_field_ref): Disable atable references to static
3082         fields for the time being.
3083
3084         (layout_class_methods): Check for CLASS_INTERFACE as
3085         well as CLASS_ABSTRACT.
3086
3087 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3088
3089         * class.c (make_class_data): Don't check flag_inline_functions.
3090         * lang.c (flag_really_inline): Remove unused flag.
3091         (java_handle_option): Don't set it here.  Remove special handling
3092         of flag_inline_functions for Java.
3093         (java_init): Don't set flag_inline_trees here.  Already done...
3094         (java_post_options): ...here.  Don't clear flag_inline_functions.
3095
3096 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3097
3098         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3099         (java_gimplify_exit_block_expr): New function.
3100         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3101         LABELED_BLOCK_EXPR.
3102         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3103         (EXIT_BLOCK_EXPR): Likewise.
3104         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3105         (LABELED_BLOCK_BODY): Likewise.
3106         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3107         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3108         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3109         TREE_OPERAND.
3110         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3111         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3112         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3113         second operand of EXIT_BLOCK_EXPR.
3114         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3115         TREE_OPERAND.
3116         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3117
3118 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3119
3120         * xref.h (xref_flag_value): Remove.
3121         (xref_set_data, xref_get_data): Likewise.
3122         (xref_set_current_fp): Likewise.
3123         (XREF_NONE): Likewise.
3124         (XREF_GET_DATA): Likewise.
3125         * xref.c (xref_flag_value): Remove.
3126         (xref_set_data, xref_get_data): Likewise.
3127         (xref_set_current_fp): Likewise.
3128
3129 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3130
3131         * gjavah.c (output_directory): Make static.
3132         (temp_directory): Likewise.
3133
3134 2004-11-15  Tom Tromey  <tromey@redhat.com>
3135
3136         * decl.c (instn_ptr_type_node): Removed.
3137         (lineNumbers_ptr_type_node): Removed.
3138         (jint_type): Removed.
3139         (jint_ptr_type): Removed.
3140
3141 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3142
3143         PR java/15576
3144         * check-init.c (check_init): Ignore DECL_EXPR.
3145         * expr.c (always_initialize_class_p): Reenable.
3146         (build_class_init): Use a variable to store the decl.  Also use
3147         boolean_false_node instead of integer_zero_node.
3148         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3149         to the block.
3150
3151 2004-11-08  Tom Tromey  <tromey@redhat.com>
3152
3153         PR java/16843:
3154         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3155         generating a JNI header.
3156         (print_field_info): Handle JNI headers.
3157         (jni_print_float): Likewise.
3158         (jni_print_double): Likewise.
3159
3160 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
3161
3162         * decl.c (end_java_method): Remove duplicated code.
3163
3164 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
3165             Gerald Pfeifer  <gerald@pfeifer.com>
3166
3167         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3168         as well.
3169
3170 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
3171
3172         PR java/17265
3173         * class.c: Reinstate 2004-08-18 patch.
3174         (make_local_function_alias): Don't create an alias for extern (native)
3175         functions.
3176
3177 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3178
3179         PR java/17265
3180         * class.c (make_local_function_alias): Revert 2004-08-18 change.
3181         (make_method_value): Likewise.
3182
3183 2004-10-21  Andrew Haley  <aph@redhat.com>
3184
3185         PR java/18091:
3186         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3187
3188 2004-10-20  Andrew Haley  <aph@redhat.com>
3189
3190         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3191         Remove duplicated code block.
3192
3193 2004-10-18  Steven Bosscher  <stevenb@suse.de>
3194
3195         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3196         New rules to work around old Bison warnings.
3197
3198 2004-10-17  Steven Bosscher  <stevenb@suse.de>
3199
3200         * class.c (ident_subst): Always alloca buffer.
3201         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3202         opcode after including javaop.def.
3203         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3204         conditional expression that exits, to avoid warnings.
3205         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3206         a user of an extension.
3207         * win32-host.c: Move check down to have non-empty file when
3208         WIN32 is not defined.
3209
3210         * Make-lang.in (java-warn): Add STRICT_WARN.
3211         (java/jcf-io.o-warn): Don't have Werror for this file.
3212         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3213
3214 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
3215
3216         * expr.c (expr_add_location): Move declaration to before all
3217         statements.
3218         * parse.y (java_expand_classes): Ditto.
3219         * lex.c (java_peek_unicode): Ditto.
3220
3221 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3222
3223         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3224         if possible, else convert `foo' to 'foo'.
3225         * class.c: Likewise.
3226         * decl.c: Likewise.
3227         * expr.c: Likewise.
3228         * jcf-io.c: Likewise.
3229         * jcf-parse.c: Likewise.
3230         * lang.c: Likewise.
3231         * lex.c: Likewise.
3232         * parse.h: Likewise.
3233
3234 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3235
3236         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3237         rename parameter 'msg' to 'msgid' in function declaration.
3238         (issue_warning_error_from_context): Likewise.
3239         (yyerror): Rename parameter 'msg' to 'msgid'.
3240         (all over): Use new quoting style for diagnostics.
3241
3242 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
3243
3244         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3245         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3246         Update copyright.
3247
3248 2004-10-14  Matt Austern  <austern@apple.com>
3249
3250         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3251         pointer_set_t* now.
3252
3253 2004-10-13  Tom Tromey  <tromey@redhat.com>
3254
3255         PR java/15578:
3256         * lang.opt (--extdirs): Document.
3257         * jvspec.c (lang_specific_driver): Recognize -encoding and
3258         -extdirs.
3259
3260 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
3261
3262         * parse.y (issue_warning_error_from_context): Use va_list *
3263         instead of va_list parameter.
3264         (parse_error_context): Update call.
3265         (parse_warning_context): Likewise.
3266
3267 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
3268
3269         * parse.y, parse-scan.y: Add list of diagnostic messages to
3270         insulate translation template from version of yacc/bison used
3271         to compile the grammar.
3272
3273 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
3274
3275         Prepare for %q, %< and %> in diagnostic message strings.
3276         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3277         Name second parameter 'msgid'.
3278         * parse.y: Additionally include pretty-print.h and diagnostic.h.
3279         (issue_warning_error_from_context): Use pretty-printer functions
3280         instead of vsprintf for constructing formatted messages. Rename
3281         parameter 'msg' to 'msgid'.
3282         (parse_error_context): Rename parameter 'msg' to 'msgid'.
3283         (parse_warning_context): Likewise.
3284
3285 2004-10-05  Andrew Haley  <aph@redhat.com>
3286
3287         PR java/17779
3288         * jcf-parse.c (parse_zip_file_entries): If a class has a
3289         superclass and a TYPE_SIZE of zero, lay it out.
3290
3291 2004-09-30  Andrew Haley  <aph@redhat.com>
3292
3293         PR java/17733
3294         * jcf-parse.c (compute_class_name): Rewrite.
3295
3296 2004-10-01  Jan Hubicka  <jh@suse.cz>
3297
3298         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3299
3300 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3301
3302         * lex.c: Fix a comment typo.
3303
3304 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3305
3306         * java-tree.h: Fix a comment typo.
3307
3308 2004-09-30  Per Bothner  <per@bothner.com>
3309
3310         Simplify lexer.  Implement --enable-mapped-location support.
3311         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
3312         (parse_source_file_1): Pass filename as extra parameter, so we can call
3313         linemap_add and set input_location here, rather than in both callers.
3314         (read_class): Pass copied filename to parse_source_file_1.
3315         Don't initialize wfl_operator - only needed for source compilation.
3316         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
3317         * lex.h:  Remove a bunch of debugging macros.
3318         * lex.h (struct_java_line, struct java_error):  Remove types.
3319         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
3320         (struct java_lc_s):  Remove prev_col field.
3321         (struct java_lexer):  New fields next_unicode, next_columns, and
3322         avail_unicode.  New position field, and maybe token_start field.
3323         Don't need hit_eof field - use next_unicode == -1 instead.
3324         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
3325         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
3326         * parse.h:  Various changes for USE_MAPPED_LOCATION.
3327         (EXPR_WFL_EMIT_LINE_NOTE): XXX
3328         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3329         (struct parser_ctxt):  New file_start_location field.
3330         Remove p_line, c_line fields since we no longer save lines.
3331         Remove elc, lineno, and current_jcf fields - no longer used.
3332         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
3333         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3334         source_location and is probably not needed anymore anyway.
3335         Use new expr_add_Location function.
3336         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
3337         (java_pop_parser_context):  Minor cleanup.
3338         (java_parser_context_save_global, java_parser_context_restore_global,
3339         java_pop_parser_context):  Save/restore input_location as a unit.
3340         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
3341         a source_location instead of a wfl context node.
3342         (check_class_interface_creation):  input_filename is not addressable.
3343         (create_artificial_method):  Calling java_parser_context_save_global
3344         and java_parser_context_restore_global is overkill.  Instead,
3345         temporarily set input_location from class decl.
3346         (java_layout_seen_class_methods): Set input_location from method decl.
3347         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
3348         (finish_loop_body):  Likewise.
3349         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
3350         (java_sprint_unicode):  Take a character, not index in line.
3351         (java_sneak_uncode):  Replaced by java_peek_unicode.
3352         (java_unget_unicode):  No longer used.
3353         (java_allocate_new_line. java_store_unicode):  Removed, since we
3354         no longer remember "lines".
3355         (java_new_lexer):  Update for new data structures.
3356         (java_read_char):  Move unget_value checking to java_read_unicode.
3357         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
3358         efficient functions that are used directly when lexing.
3359         (java_read_unicode_collapsing_terminators):  No longer needed.
3360         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
3361         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
3362         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
3363         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
3364         combine switch branches, and test for common token kinds earlier.
3365         (java_lex_error):  Rewrite.
3366         * jv-scan.c (expand_location): New function, copied from tree.c.
3367         (main): Set ctxp->filename instead of setting input_filename directly.
3368
3369 2004-09-30  Per Bothner  <per@bothner.com>
3370
3371         More cleanup for --enable-mapped-location.
3372         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
3373         input_location here.  Instead do it in give_name_to_class.
3374         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
3375         * expr.c (expand_byte_code): Call linemap_line_start.
3376         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
3377         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
3378         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
3379         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
3380         to USE_MAPPED_LOCATION case.
3381
3382         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
3383         * jcf-parse.c (java_parse_file): Don't set input_filename.
3384         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
3385         Create a list of TRANSLATION_UNIT_DECL.
3386         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
3387         reason is so we can set a DECL_SOURCE_LOCATION for each file.
3388         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
3389         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
3390         (file_start_location):  New static.
3391         (set_source_filename):  Avoid extra access to input_filename macro.
3392         Concatenate new name with class's package prefix.
3393         (set_source_filename, give_name_to_class): Update.
3394         (give_name_to_class):  Set class's "line 0" input_location here.
3395         (parse_class_file):  Set input_location as a unit.
3396
3397         * jcf-parse.c (load_class): Sanity test if missing inner class file.
3398
3399 2004-09-29  Per Bothner  <per@bothner.com>
3400
3401         * java-tree.h:  Redefine some macros and add some declaration
3402         to handle the USE_MAPPED_LOCATION case.
3403         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
3404         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
3405         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
3406         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
3407
3408         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
3409         * decl.c (finish_method, java_add_stmt): Likewise.
3410         * java-gimplify.c (java-gimplify.c):  Likewise.
3411         * jcf-write.c (generate_bytecode_insns):  Likewise.
3412         * lang.c (java_post_options): Likewise - call linemap_add.
3413
3414 2004-09-29  Andrew Haley  <aph@redhat.com>
3415
3416         PR java/17007
3417         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
3418         result of TRUNC_MOD_EXPR.
3419         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
3420         * decl.c (java_init_decl_processing): Mark
3421         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
3422
3423 2004-09-28  Tom Tromey  <tromey@redhat.com>
3424
3425         PR java/15710:
3426         * class.c (add_miranda_methods): Load superinterface if not
3427         already loaded.
3428
3429 2004-09-28  Andrew Haley  <aph@redhat.com>
3430
3431         PR java/17586
3432         * jcf-parse.c (load_class): Don't try to read a class that we've
3433         already read.
3434
3435 2004-09-28  Andrew Haley  <aph@redhat.com>
3436
3437         * jcf-parse.c (load_class): Back out previous broken patch.
3438
3439 2004-09-28  Andrew Haley  <aph@redhat.com>
3440
3441         PR java/17586
3442         * jcf-parse.c (load_class): Don't try to read a class that we've
3443         already read.
3444         Check that we really did read the right class.
3445
3446 2004-09-25  Tom Tromey  <tromey@redhat.com>
3447
3448         PR java/17500:
3449         * parse.y (create_artificial_method): Use add_method_1.
3450
3451 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
3452
3453         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3454         comment typos.
3455         * gcj.texi: Fix typos.
3456
3457 2004-09-24  Tom Tromey  <tromey@redhat.com>
3458
3459         PR java/15656:
3460         * parse.y (class_instance_creation_expression): Set `$$' to NULL
3461         in error parts of rule.
3462         (unary_expression): Don't call error_if_numeric_overflow when $1
3463         is NULL.
3464
3465 2004-09-24  Tom Tromey  <tromey@redhat.com>
3466
3467         PR java/16789:
3468         * parse.y (resolve_qualified_expression_name): Set
3469         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
3470         * expr.c (force_evaluation_order): Check for empty argument list
3471         after stripping COMPOUND_EXPR.
3472
3473 2004-09-23  Andrew Haley  <aph@redhat.com>
3474
3475         PR java/16927:
3476         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
3477         COND_EXPRs.
3478
3479 2004-09-23  Tom Tromey  <tromey@redhat.com>
3480
3481         PR java/17329:
3482         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
3483         where operand is null.
3484
3485 2004-09-23  Tom Tromey  <tromey@redhat.com>
3486
3487         PR java/17380:
3488         * parse.y (not_accessible_p): Allow access to protected members
3489         even when class is not static.
3490
3491 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
3492
3493         * Make-lang.in: Revert the gcc-none.o change.
3494
3495 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3496
3497         * parse.y (patch_anonymous_class): VEC_space returns true if there
3498         is space.
3499
3500 2004-09-21  Matt Austern  <austern@apple.com>
3501
3502         Fix bootstrap.
3503         * gjavah.c (free_method_name_list): Fix function definition so
3504         it's a proper C prototype.
3505
3506 2004-09-21  Tom Tromey  <tromey@redhat.com>
3507
3508         PR java/17575:
3509         * gjavah.c (free_method_name_list): New method.
3510         (main): Call it.
3511
3512 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3513             Zack Weinberg  <zack@codesourcery.com>
3514
3515         * java-tree.def: Use tree_code_class enumeration constants
3516         instead of code letters.
3517         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
3518         new tree-class enumeration constants.
3519
3520 2004-09-13  Tom Tromey  <tromey@redhat.com>
3521
3522         PR java/17216:
3523         * class.c (layout_class_method): Put synthetic methods into the
3524         vtable.
3525
3526 2004-09-11  Andrew Pinski  <apinski@apple.com>
3527
3528         * Make-lang.in (java/ggc-none.c): Change dependency
3529         for ggc.h into $(GGC_H).
3530
3531 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3532
3533         * Make-lang.in (java/win32-host.o): Add dependency on
3534         coretypes.h.
3535         * win32-host.c: Add includes for coretypes.h, jcf.h
3536
3537 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3538
3539         * Make-lang.in (GCJH_OBJS): Change dependency from
3540         ggc-none.o to java/ggc-none.o
3541         (JCFDUMP_OBJS): Likewise.
3542         (java/ggc-none.o): New target.
3543
3544 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3545
3546         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
3547         * class.c (build_utf8_ref, build_static_field_ref,
3548         make_field_value, make_method_value, get_dispatch_table,
3549         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3550         * constants.c (get_tag_node, build_ref_from_constant_pool,
3551         build_constants_constructor): Likewise.
3552         * decl.c (java_init_decl_processing): Likewise.
3553         * expr.c (build_java_array_length_access, build_newarray,
3554         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3555         build_java_binop, build_field_ref, expand_java_add_case,
3556         expand_java_call, build_known_method_ref, build_invokevirtual,
3557         build_invokeinterface, build_jni_stub): Likewise.
3558         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3559         * jcf-parse.c (get_constant): Likewise.
3560         * lex.c (do_java_lex): Likewise.
3561         * parse.y (patch_binop, patch_unaryop, patch_cast,
3562         build_newarray_node, patch_newarray): Likewise.
3563         * resource.c (compile_resource_data): Likewise.
3564         * typeck.c (build_prim_array_type): Likewise.
3565
3566 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3567
3568         * decl.c (java_init_decl_processing): Adjust
3569         initialize_sizetypes call.
3570
3571 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3572
3573         * jv-scan.c (fancy_abort): Add.
3574
3575 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
3576
3577         * expr.c (build_java_arrayaccess): Use convert to change
3578         len's type.
3579
3580 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
3581
3582         * class.c (make_local_function_alias): Allocate extra space for 'L'
3583         in name buffer. Reported by Thomas Neumann.
3584
3585 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3586
3587         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
3588         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
3589         * lex.c (do_java_lex): Adjust.
3590         (error_if_numeric_overflow): Likewise.
3591
3592 2004-08-18  Andrew Pinski  <apinski@apple.com>
3593
3594         * class.c (make_local_function_alias): Only make a new decl if we
3595         support alias attribute on all decls.
3596
3597 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
3598
3599         * class.c (make_local_function_alias): New function. Create local
3600         alias for public method DECL.
3601         (make_method_value): Use make_local_function_alias.
3602         * parse.y (craft_constructor): Don't special-case anonymous classes.
3603         Always set ctor_name to init_identifier_node.
3604         (lookup_method_invoke): Call layout_class_method when creating
3605         anonymous class constructor.
3606
3607 2004-08-18  Richard Henderson  <rth@redhat.com>
3608
3609         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
3610         default case.  Treat '<' similarly.  Update for
3611         is_gimple_formal_tmp_var name change.
3612
3613 2004-08-17  Andrew Haley  <aph@redhat.com>
3614
3615         * lang.c (lang_printable_name): Obey verbose flag.
3616         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
3617         lang_printable_name().
3618         (verify_constructor_circularity, get_printable_method_name,
3619         check_abstract_method_definitions, java_check_regular_methods,
3620         java_check_abstract_methods, check_inner_class_access,
3621         fix_constructors, patch_method_invocation, patch_return):
3622         Likewise.
3623         * expr.c (pop_type_0): Likewise.
3624
3625         * java-tree.h (lang_printable_name_wls): Delete.
3626
3627 2004-08-16  Tom Tromey  <tromey@redhat.com>
3628
3629         PR java/8473:
3630         * parse.y (primary): Changed for initialized and uninitialized
3631         array creations.
3632         (array_access): Handle array_creation_initialized.
3633         (array_creation_expression): Split into
3634         array_creation_initialized and array_creation_uninitialized.
3635
3636 2004-08-16  Andrew Haley  <aph@redhat.com>
3637
3638         * jcf-write.c (find_constant_index): Canonicalize NaNs when
3639         generating bytecode.
3640
3641 2004-08-16  Elliot Lee <sopwith@redhat.com>
3642
3643         PR java/9677
3644         * jcf-parse.c (java_parse_file): Handle filenames with embedded
3645         spaces, and quoted filelists.
3646
3647 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3648
3649         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
3650         * class.c (build_utf8_ref, build_static_field_ref,
3651         make_field_value, make_method_value, get_dispatch_table,
3652         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3653         * constants.c (get_tag_node,  build_ref_from_constant_pool,
3654         build_constants_constructor): Likewise.
3655         * decl.c (java_init_decl_processing): Likewise.
3656         * expr.c (build_java_array_length_access, build_newarray,
3657         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3658         build_java_binop, build_field_ref, expand_java_add_case,
3659         expand_java_call, build_known_method_ref, build_invokevirtual,
3660         build_invokeinterface, build_jni_stub): Likewise.
3661         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3662         * jcf-parse.c (get_constant): Likewise.
3663         * lex.c (do_java_lex): Likewise.
3664         * parse.y (patch_binop, patch_unaryop, patch_cast,
3665         build_null_of_type, patch_newarray): Likewise.
3666         * resource.c (compile_resource_data): Likewise.
3667         * typeck.c (build_prim_array_type): Likewise.
3668
3669 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
3670
3671         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
3672         Don't create BLOCK here or call java_gimplify_block.
3673
3674 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3675
3676         * java-tree.h (flag_deprecated): Removed.
3677         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
3678         * parse.y (check_deprecation): Check warn_deprecated instead of
3679         flag_deprecated.
3680
3681 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
3682
3683         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
3684         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
3685         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
3686         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
3687         flag_force_classes_archive_check, flag_optimize_sci,
3688         flag_indirect_dispatch): Remove explicit declarations.
3689         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
3690         final comment.
3691
3692 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
3693
3694         PR bootstrap/14893
3695         * Make-lang.in (java.install-man): Install from either build
3696         tree or source tree, whichever has the file first.
3697
3698 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
3699
3700         * jcf-parse.c (get_constant): Adjust force_fit_type call.
3701         * lex.h (SET_LVAL_NODE_TYPE): Remove.
3702         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
3703         (do_java_lex): Likewise. Adjust force_fit_type call.
3704
3705 2004-08-04  Roger Sayle  <roger@eyesopen.com>
3706             Andrew Haley  <aph@redhat.com>
3707
3708         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
3709         checking trees as they're being built.
3710         (convert): Call convert_ieee_real_to_integer if we're
3711         converting a constant, even if we're writing a class file.
3712
3713 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
3714
3715         PR java/16701
3716         * parse.y (fold_constant_for_init): Call resolve_field_access with
3717         correct current_class context.
3718
3719 2004-08-01  Roger Sayle  <roger@eyesopen.com>
3720
3721         * decl.c (update_aliases, initialize_local_variable): Replace calls
3722         to build with calls to buildN.
3723         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
3724         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
3725         * parse.h (BUILD_THROW): Likewise.
3726         * parse.y (switch_expression, synchronized_statement,
3727         catch_clause_parameter, array_creation_expression,
3728         conditional_expression, make_qualified_name,
3729         resolve_qualified_expression_name, patch_method_invocation,
3730         patch_invoke, build_method_invocation, build_new_invocation,
3731         build_assignment, patch_assignment, build_binop, patch_binop,
3732         build_string_concatenation, build_incdec, patch_unaryop,
3733         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
3734         patch_return, build_if_else_statement, build_labeled_block,
3735         build_new_loop, build_loop_body, build_bc_statement,
3736         build_assertion, encapsulate_with_try_catch, build_try_statement,
3737         build_try_finally_statement, patch_synchronized_statement,
3738         emit_test_initialization): Likewise, replace build with buildN.
3739
3740 2004-07-28  Eric Christopher  <echristo@redhat.com>
3741
3742         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3743         (java_unsafe_for_reeval): Ditto.
3744
3745 2004-07-26    <hp@bitrange.com>
3746
3747         * parse.y (build_super_invocation): Adjust declaration order to
3748         avoid declaration after statement.
3749
3750 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
3751
3752         * decl.c: Rename all identifiers named `class' to `cl'.
3753
3754 2004-07-25  Richard Henderson  <rth@redhat.com>
3755
3756         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
3757
3758 2004-07-23  Mike Stump  <mrs@apple.com>
3759
3760         * boehm.c (set_bit): Improve type safety wrt unsignedness.
3761         * gjavah.c (throwable_p, decode_signature_piece,
3762         print_full_cxx_name, print_include, add_namelet, add_class_decl,
3763         process_file): Likewise.
3764         * jcf-dump.c (main): Likewise.
3765         * jcf-io.c (read_zip_member): Likewise.
3766         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
3767         give_name_to_class, get_class_constant): Likewise.
3768         * jcf-write.c (find_constant_wide, push_long_const,
3769         generate_classfile): Likewise.
3770         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
3771         * parse.y (read_import_dir): Likewise.
3772         * typeck.c (parse_signature_type): Likewise.
3773         * verify.c (verify_jvm_instructions): Likewise.
3774         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
3775
3776 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3777
3778         * Make-lang.in: Replace rmic and rmiregistry references with
3779         grmic and grmiregistry.
3780         * gcj.texi: Likewise.
3781
3782 2004-07-20  Andrew Haley  <aph@redhat.com>
3783
3784         PR java/16431.
3785         * verify.c (verify_jvm_instructions): Comment change only.
3786
3787         * typeck.c (build_java_array_type): Add size field to array name.
3788
3789         * java-tree.h (LOCAL_SLOT_P): New.
3790         (update_aliases): Add PC argument.
3791         (pushdecl_function_level): New function.
3792
3793         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3794         MODIFY_EXPR, and SAVE_EXPR.
3795         (java_gimplify_modify_expr): New function.
3796
3797         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3798         (expand_iinc): Pass PC to update_aliases().
3799         (STORE_INTERNAL): Likewise.
3800         (process_jvm_instruction): Likewise.
3801
3802         * decl.c (base_decl_map): New variable.
3803         (uniq): New variable.
3804         (update_aliases): Rewrite with more thorough checking.
3805         (debug_variable_p): New function.
3806         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3807         (check_local_named_variable): Delete whole function.
3808         (initialize_local_variable): New function.
3809         (check_local_unnamed_variable): Add checks and comments.
3810         (find_local_variable): Rewrite.
3811         (java_replace_reference): New function.
3812         (function_binding_level): New variable.
3813         (pushdecl_function_level): New function.
3814         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3815         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3816         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3817         function_binding_level.
3818         (end_java_method): Null unused fields to save memory.
3819
3820 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3821
3822         * class.c (add_interface_do): Remove.
3823         (set_super_info, interface_of_p, maybe_add_interface,
3824         add_interface, make_class_data, layout_class,
3825         add_miranda_methods): Adjust BINFO accessors and addition.
3826         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
3827         accessors.
3828         * jcf-write.c (generate_classfile): Likewise.
3829         * parse.y (patch_anonymous_class, check_inner_circular_reference,
3830         check_circular_reference, java_complete_class,
3831         check_abstract_method_definitions,
3832         java_check_abstract_method_definitions,
3833         check_interface_throws_clauses, java_check_abstract_methods,
3834         lookup_java_interface_method2,
3835         find_applicable_accessible_methods_list): Adjust BINFO accessors
3836         and addition.
3837         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
3838
3839 2004-07-18  Roger Sayle  <roger@eyesopen.com>
3840
3841         * builtins.c (max_builtin, min_builtin,
3842         java_build_function_call_expr): Replace calls to build with buildN.
3843         * class.c (build_class_ref, build_static_field_ref,
3844         get_dispatch_table, make_class_data, layout_class_method): Likewise.
3845         * constants.c (build_ref_from_constant_pool): Likewise.
3846         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
3847         add_stmt_to_compound): Likewise.
3848         * except.c (build_exception_object_ref, expand_end_java_handler):
3849         Likewise.
3850         * java-gimplify.c (java_gimplify_case_expr,
3851         java_gimplify_default_expr, java_gimplify_block,
3852         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
3853         * jcf-write.c (generate_bytecode_insns): Likewise.
3854         * typeck.c (convert_ieee_real_to_integer): Likewise.
3855
3856 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3857
3858         * java-tree.h (builtin_function): Declare.
3859
3860 2004-07-16  Steven Bosscher  <stevenb@suse.de>
3861
3862         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
3863         abuse restore_line_number_status.
3864
3865 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
3866
3867         g++/15861
3868         * jcf-parse.c (java_emit_static_constructor): Specify default
3869         priority.
3870
3871 2004-07-13  Per Bothner  <per@bothner.com>
3872
3873         * java-tree.h (all_class_filename):  Remove useless macro.
3874         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
3875         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
3876         * parse.y (java_parser_context_restore_global):  Replace
3877         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
3878         * jcf-parse.c (read_class, java_parse_file):  Likewise.
3879
3880 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
3881
3882         PR java/16474
3883         gjavah.c (print_field_info): Emit constant only if field is static.
3884
3885 2004-07-11  Roger Sayle  <roger@eyesopen.com>
3886
3887         * expr.c (java_truthvalue_conversion, flush_quick_stack,
3888         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
3889         build_java_ret, build_java_throw_out_of_bounds_exception,
3890         build_java_array_length_access, java_check_reference,
3891         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
3892         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
3893         expand_java_arrayload, build_java_monitor, expand_java_return,
3894         expand_load_internal, expand_java_NEW, build_get_class,
3895         build_instanceof, expand_java_CHECKCAST, expand_iinc,
3896         build_java_soft_divmod, build_java_binop, build_field_ref,
3897         expand_compare, expand_java_goto, expand_java_switch,
3898         expand_java_add_case, build_class_init, build_known_method_ref,
3899         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
3900         expand_invoke, build_jni_stub, expand_java_field_op,
3901         java_expand_expr, expand_byte_code, STORE_INTERNAL,
3902         force_evaluation_order, emit_init_test_initialization): Convert
3903         calls to "build" into calls to the prefered "buildN" functions.
3904
3905 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
3906
3907         * java-tree.h (set_block): Remove.
3908         * lang.c (java_clear_binding_stack): New.
3909         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3910         * decl.c (struct binding_level): Remove this_block.
3911         (clear_binding_level): Likewise.
3912         (poplevel): Don't handle this_block.
3913         (set_block): Remove.
3914
3915 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
3916
3917         * class.c (common_enclosing_context_p): Remove statement with no
3918         side-effects.
3919
3920 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
3921
3922         PR java/8618
3923         * parse.y (create_anonymous_class): Remove 'location' argument. Use
3924         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
3925         (craft_constructor): Inherit access flags for implicit constructor
3926         from the enclosing class.
3927         (create_class): Fix comment typo.
3928         (resolve_qualified_expression_name): Pass type of qualifier to
3929         not_accessible_p, not the type in which target field was found.
3930         (not_accessible_p): Handle inner classes. Expand protected
3931         qualifier-subtype check to enclosing instances, but don't apply this
3932         check to static members. Allow protected access to inner classes
3933         of a subtype. Allow private access within common enclosing context.
3934         (build_super_invocation): Get WFL line number info from current
3935         class decl.
3936         (build_incomplete_class_ref): Update for new create_anonymous_class
3937         signature.
3938         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
3939         common_enclosing_instance_p.
3940         * class.c (common_enclosing_context_p): New. Determine if types
3941         share a common enclosing context, even across static contexts.
3942         (common_enclosing_instance_p): Renamed from
3943         common_enclosing_context_p. Determines if types share a common
3944         non-static enclosing instance.
3945         * java-tree.h (common_enclosing_instance_p): Declare.
3946         * jcf-write.c (get_method_access_flags): New. Surpress private flag
3947         for inner class constructors.
3948         (generate_classfile): Use get_method_access_flags.
3949
3950 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
3951
3952         * class.c (interface_of_p): Check for null TYPE_BINFO.
3953
3954 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
3955
3956         * class.c (make_class): Do not create binfo here.
3957         (set_super_info): Create it here.
3958         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
3959
3960 2004-07-08  Richard Henderson  <rth@redhat.com>
3961
3962         * expr.c (case_identity, get_primitive_array_vtable,
3963         java_expand_expr, emit_init_test_initialization): Remove.
3964         * java-tree.h (java_expand_expr): Remove.
3965         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
3966
3967 2004-07-07  Per Bothner  <per@bothner.com>
3968
3969         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
3970         get internal error due to mismatched types.
3971
3972         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
3973
3974         * gcj.texi (Linking):   New node.  Document -lgij usage.
3975
3976 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3977
3978         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
3979         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
3980         * java/class.c (set_super_info, class_depth, interface_of_p,
3981         maybe_add_interface, add_interface, make_class_data,
3982         layout_class, add_miranda_methods): Adjust BINFO macros.
3983         * expr.c (can_widen_reference_to, lookup_field): Likewise.
3984         * jcf-write.c (generate_classfile): Likewise.
3985         * parse.y (patch_anonymous_class,
3986         check_inner_circular_reference, check_circular_reference,
3987         java_complete_class, check_abstract_method_definitions,
3988         java_check_abstract_method_definitions,
3989         check_interface_throws_clauses, java_check_abstract_methods,
3990         lookup_java_interface_method2,
3991         find_applicable_accessible_methods_list): Likewise.
3992         * typeck.c (find_method_in_interface): Likewise.
3993         * verify.c (merge_types): Likewise.
3994
3995 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
3996
3997         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
3998         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
3999
4000 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4001
4002         * class.c (make_class): Use make_tree_binfo.
4003         (set_super_info, add_interface_do): Likewise.
4004         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4005
4006 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4007
4008         * verify.c: Correct array element access formatting thinko.
4009
4010 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4011
4012         * verify.c: Insert a short blurb at the start referring to the JVMS.
4013         (merge_type_state): Remove redundant nested if statement.
4014         (verify_jvm_instructions): Ensure current_subr is initialised to
4015         NULL_TREE.
4016         Minor formatting fixes all over the place.
4017
4018 2004-07-02  Richard Henderson  <rth@redhat.com>
4019
4020         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4021
4022 2004-07-01  Richard Henderson  <rth@redhat.com>
4023
4024         * class.c (registerClass_libfunc): Remove.
4025         (init_class_processing): Don't set it.
4026         (emit_register_classes): Take list_p parameter.  Fill it in
4027         with _Jv_RegisterClass calls.
4028         * decl.c (java_init_decl_processing): Don't call
4029         init_resource_processing.
4030         * jcf-parse.c (java_emit_static_constructor): New.
4031         (java_parse_file): Call it.
4032         * resource.c (registerResource_libfunc): Remove.
4033         (init_resource_processing): Remove.
4034         (write_resource_constructor): Take list_p parameter.  Fill it in
4035         with _Jv_RegisterResource calls.
4036         * java-tree.h: Update prototypes.
4037
4038 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4039
4040         PR java/1262
4041         * class.c (layout_class_method): Do not override package-private
4042         method if its in a different package.
4043         (split_qualified_name): Move here from parse.y. Rename from
4044         breakdown_qualified. Add comment.
4045         (in_same_package): Move here from parse.y. Add comment.
4046         * java-tree.h (break_down_qualified, in_same_package): Declare.
4047         (in_same_package): Likewise.
4048         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4049         Callers updated.
4050
4051 2004-06-29  Andrew Haley  <aph@redhat.com>
4052
4053         * except.c (expand_start_java_handler): Push a new binding level.
4054         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4055         register_exception_range() to register where we'll do it.
4056         (expand_end_java_handler): Remove old bogus code.  Replace with
4057         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4058         the top of the expression we're curently building.
4059         (maybe_end_try): Delete.
4060         * decl.c (binding_level.exception_range): New field.
4061         (clear_binding_level): Add field exception_range.  Reformat.
4062         (poplevel): Call expand_end_java_handler().
4063         (poplevel): Call java_add_stmt only if functionbody is false.
4064         (maybe_poplevels): Don't call maybe_end_try() from here.
4065         (end_java_method): Clear no longer used trees in function decl.
4066         (register_exception_range): New function.
4067         * java-tree.h (register_exception_range, struct eh_range): Declare.
4068
4069 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4070
4071         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4072
4073 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4074
4075         Formatting fixes.
4076         * expr.c (class_has_finalize_method): Fix method name indentation.
4077         (expand_java_call): Remove K&R style parameter declaration.
4078         (expand_invoke): Fix statement indentation.
4079         (expand_java_field_op): Likewise.
4080         * parse-scan.y: Fix typo.
4081         (reset_report): Fix method name indentation.
4082         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4083         line. Fix typos.
4084         * verify.c (verify_jvm_instructions): Document parameters, insert
4085         page break.
4086         * lang.c (lang_init_source): Fix method name indentation.
4087         * class.c (common_enclosing_context_p): Likewise.
4088         (emit_symbol_table): Fix parameter list indentation.
4089         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4090         parameter declaration.
4091         * constants.c: Fix copyright notice indentation.
4092         * typeck.c (find_method_in_superclasses): Fix parameter list
4093         indentation.
4094         (find_method_in_interfaces): Likewise.
4095         * zextract.c (makelong): Fix method name indentation.
4096
4097 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4098
4099         PR java/15715.
4100         * parse.y (create_interface): Set correct access modifiers for
4101         interfaces.
4102         * jcf-write.c (get_classfile_modifiers): New function.
4103         (generate_classfile): Use get_classfile_modifiers, not
4104         get_access_flags.
4105
4106 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4107
4108         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4109         dependency to current parser context, not NULL_TREE, for top-level
4110         classes.
4111         (jdep_resolve_class): Enable member access check for all inner
4112         class dependencies.
4113
4114 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4115
4116         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4117         load_class.
4118
4119 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4120
4121         PR java/15734
4122         * expr.c (expand_java_field_op): Ensure that target class for static
4123         field access has been loaded.
4124
4125 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4126             Ranjit Mathew  <rmathew@hotmail.com>
4127
4128         PR java/1207, java/16178
4129         * jcf-parse.c (load_class): Return immediately if passed a type decl
4130         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4131         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4132         before calling load_class.
4133         (qualify_and_find): Likewise.
4134         (find_in_imports_on_demand): Likewise.
4135         (find_applicable_accessible_methods_list): Likewise.
4136
4137 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4138
4139         * parse.y (java_layout_seen_class_methods): Don't call load_class
4140         on class defined by source parser.
4141
4142 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4143
4144         * parse.y (set_nested_class_simple_name_value): Removed.
4145         (java_complete_expand_class): Remove calls to
4146         set_nested_class_simple_name_value.
4147
4148 2004-06-22  Andrew Haley  <aph@redhat.com>
4149             Ranjit Mathew  <rmathew@hotmail.com>
4150
4151         Fixes PR java/16113.
4152         * decl.c (force_poplevels): Remove call to expand_end_bindings.
4153
4154 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
4155
4156         * parse.y (create_class): Correct diagnostic message about
4157         java.lang.Object extending anything else.
4158
4159 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4160
4161         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4162         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4163         * constants.c (build_ref_from_constant_pool): Likewise.
4164         * expr.c (build_java_array_length_access): Likewise.
4165         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4166         (invoke_build_dtable, build_invokevirtual): Likewise.
4167         (build_invokeinterface, java_expand_expr): Likewise.
4168         (emit_init_test_initialization): Likewise.
4169         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4170         * parse.y (make_qualifed_name, build_array_ref): Likewise.
4171
4172 2004-06-21  Andrew Haley  <aph@redhat.com>
4173
4174         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4175         block.
4176
4177 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4178
4179         * jcf.h (struct JCF): Change java_source, right_zip and finished
4180         to unsigned int.
4181         * lex.h (struct java_lexer): Change hit_eof, read_anything,
4182         byte_swap and use_fallback to unsigned int.
4183         * parse.h (struct _jdep): Change flag0 to unsigned int.
4184
4185 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
4186
4187         Fixes PR java/13948
4188         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4189         before trying to lay out its methods.
4190         * jcf-parse.c (read_class): Track parsed files using canonical paths
4191         obtained via lrealpath from libiberty.
4192         (java_parse_file): Likewise.
4193         (parse_source_file_1): Rename formal parameter to reflect its
4194         modified purpose. Minor formatting fix.
4195
4196 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4197
4198         * class.c (emit_register_classes): Make the function uninlinable,
4199         do not set current_function_cannot_inline.
4200         * resource.c (write_resource_constructor): Do not reset
4201         flag_inline_functions around rest_of_compilation.
4202
4203 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
4204
4205         PR java/15769
4206         * expr.c (java_truthvalue_conversion): Handle
4207         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4208         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4209         i.e. return the expression.
4210
4211 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
4212
4213         * gjavah.c: Include version.h
4214
4215 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
4216
4217         * jcf-write.c (generate_bytecode_conditional): Correct handling
4218         of unordered conditionals. Add comment.
4219
4220 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
4221             Per Bothner  <per@bothner.com>
4222
4223         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4224         local variable was initialised upon declaration.
4225         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4226         variable was final and initialised upon declaration.
4227         * check-init.c (check_final_reassigned): Give error only if a blank
4228         final is not definitely unassigned or if an initialised final is
4229         reassigned.
4230         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4231         assignment expressions. Remove case MODIFY_EXPR, label do_default.
4232         (check_init): Perform initialised-variable-removing-optimisation
4233         only on non-final local variables.
4234
4235 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4236
4237         * jcf-write.c (generate_bytecode_conditional): Handle binops
4238         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4239         and LTGT_EXPR.
4240         (generate_bytecode_insns): Likewise.
4241
4242 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4243
4244         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4245         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4246
4247 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4248
4249         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4250         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4251
4252 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4253
4254         * decl.c (struct binding_level): Add GTY marker. Compile
4255         binding_depth unconditionally.
4256         (current_binding_level, free_binding_level, global_binding_level):
4257         Likewise.
4258         (clear_binding_level): Unconditionally set binding_depth.
4259         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4260
4261 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4262
4263         * lex.c (java_new_lexer): Set 'encoding'.
4264         (java_read_char): Improve error message for unrecognized characters.
4265         * lex.h (struct java_lexer): New field 'encoding'.
4266
4267 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4268
4269         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4270
4271 2004-05-21  Mark Wielaard  <mark@klomp.org>
4272
4273         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4274         extern.
4275
4276 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
4277
4278         * typeck.c: Remove non-printable character 160.
4279
4280 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
4281
4282         * check-init.c: Correct minor typos.
4283
4284 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4285
4286         * Make-lang.in, expr.c, java-gimplify.c: Rename
4287         tree-simple.[ch] to tree-gimple.[ch].
4288
4289 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
4290
4291         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4292
4293 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4294
4295         Merge from tree-ssa-20020619-branch.  See
4296         ChangeLog.tree-ssa for details.
4297
4298         * Make-lang.in, builtins.c, check-init.c, class.c,
4299         constants.c, decl.c, except.c, expr.c, java-except.h,
4300         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4301         lang.c, lang.opt, parse.y, resource.c: Merged.
4302         * java-gimplify.c: New file.
4303
4304 2004-05-10  Andrew Haley  <aph@redhat.com>
4305
4306         * parse.y (create_class): Set TYPE_VFIELD.
4307         * decl.c (java_init_decl_processing): Likewise.
4308
4309         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4310         * class.c (make_method_value): Replace DECL_VINDEX with call to
4311         get_method_index().
4312         (get_dispatch_vector): Likewise.
4313         (layout_class_method): Likewise.
4314         Replace set of DECL_VINDEX with call to set_method_index().
4315         (set_method_index): New function.
4316         (get_method_index): New function.
4317         * java-tree.h (set_method_index): New function decl.
4318         (get_method_index): New function decl.
4319
4320 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
4321
4322         * parse.y (check_pkg_class_access): Add new argument
4323         and use it when cl is NULL to call lookup_cl on it.
4324         (parser_check_super_interface): Do not call lookup_cl.
4325         Pass this_decl to check_pkg_class_access and NULL
4326         instead of lookup_cl.
4327         (parser_check_super): Update for change in
4328         check_pkg_class_access.
4329         (do_resolve_class): Likewise.
4330         (process_imports): Likewise.
4331         (find_in_imports_on_demand): Likewise.
4332         (resolve_qualified_expression_name): Likewise.
4333
4334 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
4335
4336         Fixes PR java/9685, PR java/15073
4337         * parse.y (accessibility_string): New method.
4338         (not_accessible_field_error): Use accessibility_string()
4339         instead of java_accstring_lookup().
4340         (resolve_qualified_expression_name): Check with
4341         check_pkg_class_access() before allowing access using
4342         qualified names.
4343         Fix comment typo.
4344         Use check_pkg_class_access() instead of not_accessible_p()
4345         for unqualified types.
4346         (not_accessible_p): Use DECL_CONTEXT (member) instead of
4347         REFERENCE for package-private access checking.
4348         (patch_method_invocation): Use accessibility_string() instead
4349         of java_accstring_lookup().
4350
4351 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
4352
4353         Fixes PR java/15133
4354         * gjavah.c (struct method_name): Add member is_native.
4355         (overloaded_jni_method_exists_p): Match candidate method only if
4356         it is native.
4357         (print_method_info): Initialise is_native flag from the method's
4358         access flags.
4359
4360 2004-04-30  Roger Sayle  <roger@eyesopen.com>
4361
4362         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4363         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4364
4365 2004-04-22  Roger Sayle  <roger@eyesopen.com>
4366
4367         * resource.c (write_resource_constructor): Guard call to possibly
4368         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4369
4370 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
4371
4372         * class.c (make_class_data): Add new field aux_info.
4373         * decl.c (java_init_decl_processing): Push type and decl for
4374         `aux_info'.
4375
4376 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
4377
4378         * expr.c (expand_java_NEW): Don't use size argument for
4379         _Jv_AllocObject calls.
4380         * parse.y (patch_invoke): Likewise.
4381
4382 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4383
4384         * expr.c (build_invokeinterface): Remove unused variables to
4385         fix warnings.
4386
4387 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4388
4389         * class.c (get_interface_method_index): New function. Return dispatch
4390         index for interface method.
4391         (make_method_value): For interface methods, set index field to
4392         iface dispatch index, not DECL_VINDEX.
4393         * expr.c (build_invokeinterface): Use get_interface_method_index.
4394
4395 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4396
4397         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4398
4399 2004-03-31  Andrew Haley  <aph@redhat.com>
4400
4401         PR java/14104
4402         * jcf-io.c (opendir_in_zip): Tidy up error handling.
4403
4404 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
4405
4406         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4407         form of GTY markers.
4408
4409 2004-03-25  Marcus Meissner  <meissner@suse.de>
4410
4411         PR java/14689:
4412         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4413
4414 2004-03-23  Tom Tromey  <tromey@redhat.com>
4415
4416         PR java/14315:
4417         * jcf-write.c (make_class_file_name): Don't report if mkdir
4418         failed with EEXIST.
4419
4420 2004-03-23  Tom Tromey  <tromey@redhat.com>
4421
4422         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4423
4424 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
4425
4426         * class.c, gjavah.c, lang.c: Fix comment typos.
4427         * gcj.texi: Fix typos.
4428
4429 2004-03-19  Per Bothner  <per@bothner.com>
4430
4431         * gcj.texi (Code Generation):  Document new flags and assert defaults.
4432
4433         * class.c (assume_compiled_node_struct):  Rename type to
4434         class_flag_node_struct, as it is now also used for enable_assertions.
4435         Rename assume_compiled_node typedef.  Rename excludep field to value.
4436         (find_assume_compiled_node):  Rename function to find_class_flag_node.
4437         Minor optimization - avoid needless strlen.
4438         (add_assume_compiled):  Some tweaking and optimization.
4439         Rename and generalize to add_class_flag takem an extra parameter.
4440         (add_assume_compled):  New just calls add_class_flag.
4441         (add_enable_assert, enable_assertions):  New functions.
4442         (enable_assert_tree):  New static.
4443         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
4444         * lang.opt (fenable-assertions, fenable-assertions=,
4445         fdisable-assertions, fdisable-assertions=):  New options.
4446         * lang.c (java_handle_option):  Handle new options.
4447         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
4448         class in an interface - create helper class nested in outer interface.
4449         (build_assertion):  Short-circuit if enable_assertions is false.
4450
4451 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4452
4453         * java-tree.h: Changes throughout to add checking to macros
4454         and numerous whitespace changes.
4455         (VAR_OR_FIELD_CHECK): New macro.
4456         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
4457         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
4458
4459 2004-03-16  Per Bothner  <per@bothner.com>
4460
4461         * jcf-jump.c (options):  New --print-constants option.
4462         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
4463
4464         * jcf-dump.c (flag_print_constant_pool):  Default to off.
4465         (print_constant_terse_with_index):  New helper function.
4466         (various places):  Check flag_print_constant_pool where missing.
4467         (main):  If verbose set flag_print_constant_pool.
4468         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
4469
4470 2004-03-15  Andrew Haley  <aph@redhat.com>
4471
4472         PR java/14581
4473         * parse.y (java_complete_lhs): Check that final variable has an
4474         initializer.
4475
4476 2004-03-12  Andrew Haley  <aph@redhat.com>
4477
4478         PR java/14551
4479         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
4480         conversion.
4481
4482 2004-02-29  Roger Sayle  <roger@eyesopen.com>
4483
4484         * jcf-parse.c (java_parse_file): Handle the case that input_filename
4485         is NULL.
4486
4487 2004-02-27  Per Bothner  <per@bothner.com>
4488
4489         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
4490         suggestion:  Use build_incomplete_class_ref.
4491         This fixes PR java/13508, java/11714.
4492
4493 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
4494
4495         * java/parse.h: Update copyright.
4496
4497 2004-02-26  Andrew Haley  <aph@redhat.com>
4498
4499         PR java/14231:
4500         * parse.y (check_interface_throws_clauses): Check for
4501         !METHOD_INVISIBLE (iface_method).
4502         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
4503         well as CLASS_ABSTRACT.
4504
4505 2004-02-25  Per Bothner  <per@bothner.com>
4506
4507         * parse.y (build_assertion):  If we're in an inner class, create the
4508         class$ helper routine in the outer class.
4509
4510 2004-02-19  Richard Henderson  <rth@redhat.com>
4511
4512         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
4513
4514 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
4515
4516         * Make-lang.in (java.install-man): Add extra dependencies.
4517
4518 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
4519
4520         * Make-lang.in: Install man pages under the same names
4521         (possibly transformed) as the program they document.
4522
4523 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
4524
4525         * gjavah.c: Include "intl.h".
4526         (error): New function.
4527         (main): Call gcc_init_libintl.
4528         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
4529         print_stub_or_jni, process_file, main): Use error rather than
4530         fprintf.
4531         (print_method_info, usage, help, version, main): Mark strings for
4532         translation with _.  Avoid splitting up sentences.  Send
4533         information messages to stdout.
4534         * jcf-dump.c: Include "intl.h".
4535         (main): Call gcc_init_libintl.
4536         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
4537         Mark error, usage and version messages for translation with _.
4538         Avoid splitting up sentences.
4539         * jv-scan.c: Include "intl.h".
4540         (fatal_error, warning): Change parameter s to msgid.  Translate
4541         messages.
4542         (main): Call gcc_init_libintl.
4543         (usage, help, version): Mark error, usage and version messages for
4544         translation with _.  Avoid splitting up sentences.
4545         * jvgenmain.c: Include "intl.h".
4546         (main): Call gcc_init_libintl.
4547         (usage, main): Mark error messages for translation with _.
4548         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
4549         JVGENMAIN_OBJS): Add intl.o.
4550         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
4551         java/jvgenmain.o): Update dependencies.
4552
4553 2004-02-08  Per Bothner  <per@bothner.com>
4554
4555         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
4556         class don't use not_accessible_field_error, which can get confused.
4557
4558 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
4559
4560         Make-lang.in (po-generated):  Delete.
4561
4562 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
4563
4564         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
4565         Depend on target.h.
4566         * decl.c: Include target.h.
4567         (start_java_method): Replace PROMOTE_PROTOTYPES with
4568         targetm.calls.promote_prototypes.
4569         * expr.c: Include target.h.
4570         (pop_arguments): Replace PROMOTE_PROTOTYPES with
4571         targetm.calls.promote_prototypes.
4572         * parse.y: Include target.h.
4573         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
4574         with targetm.calls.promote_prototypes.
4575
4576 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
4577
4578         * typeck.c: Update copyright.
4579
4580 2004-02-02  Tom Tromey  <tromey@redhat.com>
4581
4582         * decl.c (java_init_decl_processing): Remove duplicate
4583         gnu/gcj/RawData.
4584
4585 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
4586
4587         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
4588
4589 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
4590
4591         * expr.c (build_field_ref): Move variable
4592         definition up.
4593
4594 2004-01-28  Andrew Haley  <aph@redhat.com>
4595
4596         * expr.c (build_field_ref): Widen field offset.
4597
4598 2004-01-27  Andrew Haley  <aph@redhat.com>
4599
4600         java/13273
4601         * parse.y (check_interface_throws_clauses): Make sure class_decl
4602         has been loaded.
4603
4604 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
4605
4606         PR java/13733
4607         * parse.y (patch_assignment): Don't modify lhs_type for
4608         reference assignments.
4609
4610 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4611
4612         * Make-lang.in: Replace $(docdir) with doc.
4613         (java.info, java.srcinfo, java.man, java.srcman): New rules.
4614         (java.install-man): Revamp rule.
4615
4616 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4617
4618         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
4619         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
4620         instead of deferred backquote.
4621
4622 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
4623
4624         * typeck.c (find_method_in_interfaces): Move variable
4625         definition up.
4626
4627 2004-01-16  Andrew Haley  <aph@redhat.com>
4628
4629         PR java/13273:
4630         * typeck.c (shallow_find_method): New.
4631         (find_method_in_superclasses): New.
4632         (find_method_in_interfaces): New.
4633         (lookup_do): Rewrite.
4634         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
4635
4636         * jcf-parse.c (read_class): Save and restore output_class.
4637         * decl.c (java_expand_body): Set output_class from fndecl.
4638
4639 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
4640
4641         * class.c (gen_indirect_dispatch_tables): Fix string length
4642         calculations.
4643
4644 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
4645
4646         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
4647         (java.srcextra): Copy above back to source directory if requested.
4648         (po-generated): Delete reference to $(parsedir).
4649         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
4650         Use implicit rule.
4651
4652 2004-01-14  Jan Hubicka  <jh@suse.cz>
4653
4654         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
4655         estimation.
4656
4657 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
4658
4659         * java-tree.h (java_expand_expr): Change prototype.
4660         * expr.c (java_expand_expr): Add alt_rtl parameter.
4661
4662 2004-01-09  Andrew Haley  <aph@redhat.com>
4663
4664         PR java/12755:
4665         * parse.y (java_fix_constructors):  Set output_class.
4666         (java_reorder_fields): Likewise.
4667         (java_layout_classes): Likewise.
4668         (java_expand_classes): Generate indirect dispatch tables.
4669         (java_expand_classes): Set output_class.
4670         (java_finish_classes): Likewise.
4671         * lang.c (java_init): Turn on always_initialize_class_p if we're
4672         using indirect dis[atch.
4673         (java_decl_ok_for_sibcall): Use output_class, not current_class.
4674         (java_get_callee_fndecl): Use class local atable.
4675         * jcf-parse.c
4676         (always_initialize_class_p): Decl moved to java-tree.h.
4677         (HANDLE_CLASS_INFO): Set output_class.
4678         (read_class): Likewise.
4679         (parse_class_file): Call gen_indirect_dispatch_tables.
4680         (parse_zip_file_entries): Set output_class.
4681         (java_parse_file): Set output_class.  Don't emit symbol tables.
4682         * java-tree.h (output_class): New.
4683         Remove global declarations for otable, atable, and ctable.
4684         (always_initialize_class_p): moved here from decl.c.
4685         (DECL_OWNER): New.
4686         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
4687         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
4688         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
4689         (struct lang_type): Add otable_methods, otable_decl,
4690         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
4691         ctable_decl, catch_classes, type_to_runtime_map.
4692         * expr.c (build_field_ref): Make otable, atable, and ctable class
4693         local rather than global.
4694         (build_known_method_ref): Likewise.
4695         (build_invokeinterface): Likewise.
4696         (java_expand_expr): Pass runtime type (rather than actual type) to
4697         expand_start_catch.
4698         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
4699         this class.  Look up each class in that map to delete duplicates.
4700         (expand_end_java_handler): Pass runtime type (rather than actual
4701         type) to expand_start_catch.
4702         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
4703         (do_nothing): New.
4704         (java_init_decl_processing): Rearrange things.  Remove global
4705         declarations of otable, atable, and ctable.
4706         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
4707         (java_expand_body): Set output_class.
4708         * constants.c (build_constant_data_ref): Use output_class, not
4709         current_class.
4710         (alloc_name_constant): Likewise.
4711         * class.c (gen_indirect_dispatch_tables): New.
4712         (build_class_ref): Generate hard reference to superclass, even if
4713         using indirect dispatch.
4714         (build_static_field_ref): Use class local atable.
4715         (make_class_data): Generate hard reference to superclass, even if
4716         using indirect dispatch.
4717         Generate symbolic references to interfaces when using indirect
4718         dispatch.
4719         (make_class_data): Emit otable, atable, and ctable.
4720         Make otable, atable, and ctable class local rather than global.
4721         (emit_catch_table): Make otable, atable, and ctable class local
4722         rather than global.
4723
4724 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
4725
4726         * parse.y (catch_clause_parameter): Fix typo.
4727
4728         PR java/13404
4729         * parse.y: (catch_clause_parameter): Return early if $3, aka
4730         formal_parameter, is null.
4731
4732 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
4733
4734         * class.c: Remove uses of "register" specifier in
4735         declarations of arguments and local variables.
4736         * decl.c: Likewise.
4737         * expr.c: Likewise.
4738         * gjavah.c: Likewise.
4739         * jcf-dump.c: Likewise.
4740         * jcf-io.c: Likewise.
4741         * jcf-parse.c: Likewise.
4742         * jcf-write.c: Likewise.
4743         * keyword.h: Likewise.
4744         * parse.y: Likewise.
4745         * typeck.c: Likewise.
4746         * verify.c: Likewise.
4747
4748 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
4749
4750         * Make-lang.in (GCJ_CROSS_NAME): Delete.
4751         (java.install_common, java.install-man): Adjust for above.
4752         (java.uninstall): Likewise.
4753
4754 2003-12-03  Michael Koch  <konqueror@gmx.de>
4755
4756         * class.c (make_class_data):
4757         Push field value to 'hack_signers' instead of 'signers'.
4758         * decl.c (java_init_decl_processing):
4759         Push field 'hack_signers' instead of 'signers'.
4760
4761 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
4762
4763         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
4764         including iconv.h.
4765
4766 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
4767
4768         PR java/12374:
4769         * parse.y (qualify_ambiguous_name): Remove lots of broken
4770         field access processing - there's no need to do that here,
4771         because we have resolve_field_access.  Remove
4772         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
4773         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
4774         used.
4775
4776 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
4777
4778         Fix PR java/13237
4779         * parse.y (java_complete_lhs): Save location prior to patching
4780         CALL_EXPR.
4781
4782 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
4783
4784         PR java/12548
4785         * resource.c (write_resource_constructor): Append
4786         "_resource" to constructor identifier name.
4787
4788 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
4789
4790         Fix PR java/13183.
4791         * constants.c (cpool_for_class): New function.
4792         (outgoing_cpool): Remove global variable.
4793         (alloc_name_constant): Use cpool_for_class.
4794         (build_constants_constructor): Likewise.
4795         * decl.c (java_expand_body): Set current_class.
4796         * java-tree.h (outgoing_cpool) Remove declaration.
4797         (init_outgoing_cpool): Likewise.
4798         * jcf-parse.c (init_outgoing_cpool): Remove function.
4799         (parse_class_file): Don't call init_outgoing_cpool.
4800         * parse.y (java_complete_expand_methods): Don't call
4801         init_outgoing_cpool.  Don't save outgoing_cpool.
4802         (java_expand_classes): Don't restore outgoing_cpool.
4803         (java_finish_classes): Likewise.
4804
4805 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
4806
4807         * Make-lang.in: (java.install-common) Add
4808         symlink for $(target_noncanonical)-gcjh for
4809         native builds.
4810
4811 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
4812
4813         * Make-lang.in (java.extraclean): Delete.
4814
4815 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
4816
4817         * Make-lang.in (check-java): Add.
4818
4819 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
4820
4821         Fix PR java/13024.
4822         * except.c (prepare_eh_table_type): Allocate variable-sized
4823         buffer `buf' with alloca.
4824
4825 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
4826
4827         Fix PR java/12857.
4828
4829         decl.c (java_init_decl_processing): Don't initialize
4830         class_not_found_type_node, no_class_def_found_type_node.
4831
4832         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
4833         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
4834         (class_not_found_type_node, no_class_def_found_type_node):
4835         Don't define.
4836
4837         parse.y (build_dot_class_method_invocation): Add this_class
4838         argument.  Qualify method invocations to a different class.
4839         (create_new_parser_context): Initialize saved_data_ctx to 0.
4840         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
4841         (build_dot_class_method): Don't load classes.  Register
4842         incomplete types.
4843         (build_incomplete_class_ref): Special cases for interfaces
4844         and inner classes.  Move build_dot_class_method call to here...
4845         (patch_incomplete_class_ref): ...from here.  Pass current_class
4846         to build_dot_class_method_invocation.
4847         (build_assertion): Pass class_type to
4848         build_dot_class_method_invocation.
4849         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
4850
4851 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
4852
4853         Fix PR java/12739.
4854         * java-tree.h (BLOCK_EMPTY_P): Define.
4855         * parse.y (java_complete_lhs): Check for empty blocks
4856         in TRY_FINALLY_EXPR case.
4857
4858 2003-11-17  Andrew Haley  <aph@redhat.com>
4859
4860         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
4861         (struct lang_decl_var:freed): New variable.
4862         * decl.c (poplevel): Mark local vars that have gone out of scope.
4863         (push_jvm_slot): Don't use the RTL of a var that has gone out of
4864         scope.
4865
4866 2003-11-16  Jason Merrill  <jason@redhat.com>
4867
4868         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
4869         and TAGS files that include them for each front end.
4870
4871 2003-11-15  Tom Tromey  <tromey@redhat.com>
4872
4873         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
4874
4875 2003-11-12  Jason Merrill  <jason@redhat.com>
4876
4877         PR optimization/12547
4878         * lang.c (java_tree_inlining_walk_subtrees): Just walk
4879         BLOCK_EXPR_BODY directly.
4880
4881 2003-11-12  Andrew Haley  <aph@redhat.com>
4882
4883         PR java/11045
4884         * parse.y (fold_constant_for_init): Check that we really do have a
4885         constant.
4886
4887         PR java/11533
4888         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
4889         init_test_decls being inlined.
4890
4891         PR java/12890:
4892         * parse.y (do_resolve_class): Check return value from
4893         breakdown_qualified().
4894
4895 2003-11-11  Tom Tromey  <tromey@redhat.com>
4896
4897         PR java/12915:
4898         * parse.y (merge_string_cste): Handle case where we have a
4899         pointer that happens to be zero, not null_pointer_node.
4900
4901 2003-11-10  Tom Tromey  <tromey@redhat.com>
4902
4903         * jcf-parse.c (classify_zip_file): Correctly compare
4904         filename_length against length of manifest file's name.
4905
4906 2003-11-08  Tom Tromey  <tromey@redhat.com>
4907
4908         PR java/12894:
4909         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
4910
4911 2003-11-06  Andrew Haley  <aph@redhat.com>
4912
4913         * expr.c (java_stack_swap): Make sure destination stack slots are
4914         of the correct type.
4915
4916 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
4917
4918         * Make-lang.in (dvi): Move targets to $(docobjdir).
4919         (gcj.dvi): Simplify rule and adjust target.
4920         (gcj.info): Simplify rule.
4921         (gcj.pod): New intermediate rule.
4922         (gcjh.pod): Likewise.
4923         (jv-scan.pod): Likewise.
4924         (jcf-dump.pod): Likewise.
4925         (gij.pod): Likewise.
4926         (jv-convert.pod): Likewise.
4927         (rmic.pod): Likewise.
4928         (rmiregistry.pod): Likewise.
4929         (gcj.1): Delete.
4930         (gcjh.1): Delete.
4931         (jv-scan.1): Delete.
4932         (jcf-dump.1): Delete.
4933         (gij.1): Delete.
4934         (jv-convert.1): Delete.
4935         (rmic.1): Delete.
4936         (rmiregistry.1): Delete.
4937
4938 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
4939
4940         Fixes PR java/12866.
4941         * parse.y (resolve_qualified_expression_name): Move test
4942         for outer field access methods from here...
4943         (check_thrown_exceptions) ...to here.
4944
4945 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
4946
4947         * .cvsignore: Delete.
4948
4949 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
4950
4951         * verify.c (verify_jvm_instructions): Don't warn about legal
4952         eh binding regions generated for example by jdk 1.4.1.
4953
4954 2003-10-24  David S. Miller  <davem@redhat.com>
4955
4956         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
4957
4958 2003-10-22  Andrew Haley  <aph@redhat.com>
4959
4960         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
4961         (java_get_callee_fndecl): New.
4962
4963         * jcf-parse.c (java_parse_file): Call emit_catch_table().
4964
4965         * java-tree.h (ctable_decl): New.
4966         (catch_classes):  New.
4967         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
4968
4969         * decl.c (java_init_decl_processing): Add catch_class_type.
4970         Add ctable_decl.
4971         Add catch_classes field.
4972
4973         * class.c (build_indirect_class_ref): Break out from
4974         build_class_ref.
4975         (make_field_value): Check flag_indirect_dispatch.
4976         (make_class_data): Ditto.
4977         Tidy uses of PUSH_FIELD_VALUE.
4978         Add field catch_classes.
4979         (make_catch_class_record): New.
4980
4981         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
4982
4983 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
4984
4985         * jcf-write.c: Follow spelling conventions.
4986         * parse.y: Likewise.
4987
4988 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
4989
4990         * ChangeLog: Fix typos.
4991         * expr.c: Fix comment typos.
4992         * jcf-write.c: Likewise.
4993         * lang.c: Likewise.
4994         * lex.c: Likewise.
4995         * mangle.c: Likewise.
4996         * parse-scan.y: Likewise.
4997         * parse.y: Likewise.
4998
4999 2003-10-22  Tom Tromey  <tromey@redhat.com>
5000
5001         * expr.c (expand_byte_code): Only warn about dead bytecode when
5002         extra_warnings is set.
5003
5004 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5005
5006         Fix for PR java/12586.
5007         * mangle.c (find_compression_record_match): Don't iterate through
5008         package namespace elements unless they all match compression_table
5009         entries.
5010
5011 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5012
5013         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5014         (generate-manpages): Likewise.
5015         (java.maintainer-clean): Likewise.
5016         (gcj.info): Likewise.
5017         (gcj.1): Likewise.
5018         (gcjh.1): Likewise.
5019         (jv-scan.1): Likewise.
5020         (jcf-dump.1): Likewise.
5021         (gij.1): Likewise.
5022         (jv-convert.1): Likewise.
5023         (rmic.1): Likewise.
5024         (rmiregistry.1): Likewise.
5025         (java.install-man): Likewise.
5026         (parse-scan.o): Move and define complete compile line.
5027         (parse.o): Likewise.
5028         (jcf-tree-inline.o): Move.
5029
5030 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5031
5032         * Make-lang.in (info): Update dependencies.
5033         (java.install-info): Remove.
5034         ($(srcdir)/java/gcj.info): Replace with ...
5035         ($(docobjdir)/gcj.info): ... this.
5036
5037 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5038
5039         * Make-lang.in: Replace uses of $(target_alias) with
5040         $(target_noncanonical).
5041
5042 2003-10-09  Tom Tromey  <tromey@redhat.com>
5043
5044         * decl.c (java_init_decl_processing): Declare signers field.
5045         * class.c (make_class_data): Set signers field.
5046
5047 2003-10-09  Jason Merrill  <jason@redhat.com>
5048
5049         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5050         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5051         POINTER_TYPE.
5052
5053 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5054
5055         * Make-lang.in (java.info): Replace with ...
5056         (info): ... this.
5057         (java.dvi): Replace with ...
5058         (dvi): ... this.
5059         (java.generated-manpages): Replace with ...
5060
5061 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5062
5063         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5064
5065 2003-10-01  Andrew Haley  <aph@redhat.com>
5066
5067         * jcf-parse.c (java_parse_file): Write otable and atable.
5068         * java-tree.h (atable_methods): New.
5069         (atable_decl): New.
5070         (atable_syms_decl): New.
5071         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5072         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5073         (symbol_*type): Rename method_symbol* to symbol*type.
5074         (emit_offset_symbol_table): Delete.
5075         (emit_symbol_table): New.
5076         (get_symbol_table_index): New.
5077         (atable_type): New.
5078         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5079         (build_known_method_ref): Likewise.
5080         (get_symbol_table_index): Rename from get_offset_table_index.
5081         Parameterize to allow re-use by differing types of symbol table.
5082         (build_invokevirtual): Pass table to get_offset_table_index.
5083         * decl.c (java_init_decl_processing): Push types and decls for
5084         atable and atable_syyms.
5085         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5086         (make_class_data): Add new fields atable and atable_syms.
5087         (emit_symbol_table): Rename from emit_offset_symbol_table.
5088         Parameterize to allow re-use by different types of symbol table.
5089         (build_symbol_entry): Renamed from build_method_symbols_entry.
5090
5091 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5092
5093         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5094         semantics for SAVE_EXPR, by caching the result in a temporary.
5095
5096 2003-09-28  Richard Henderson  <rth@redhat.com>
5097
5098         * check-init.c (check_init): Save and restore input_location
5099         instead of file and line separately.
5100         * decl.c (java_expand_body): Likewise.
5101         * jcf-write.c (generate_bytecode_insns): Likewise.
5102         * parse.y (safe_layout_class): Likewise.
5103         * jcf-parse.c (read_class, parse_class_file): Likewise.
5104         (java_parse_file): Use %H for warning locator.
5105
5106 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5107
5108         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5109         with void-type branches instead of using a COMPOUND_EXPR.
5110
5111 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5112
5113         * decl.c (java_optimize_inline, dump_function): Remove.
5114         * java-tree.h (java_optimize_inline): Remove declaration.
5115         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5116         * parse.y (source_end_java_method, java_expand_classes):
5117         Likewise.  Remove dead code.
5118
5119 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5120
5121         * lang.c (java_init_options): Set flag_evaluation_order.
5122         * expr.c (force_evaluation_order): Don't attempt to force
5123         evaluation order of binary operations using save_expr.
5124         * parse.y (java_complete_lhs): No longer need to call
5125         force_evaluation_order when constructing binary operators.
5126
5127 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5128             Bryce McKinlay  <bryce@mckinlay.net.nz>
5129
5130         PR java/1333:
5131         * parse.y (not_accessible_field_error): New function.
5132         (resolve_expression_name): Check field access permissions.
5133         (resolve_qualified_expression_name): Use
5134         not_accessible_field_error.
5135         (resolve_qualified_expression_name): Likewise.
5136
5137 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5138
5139         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5140
5141 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5142
5143         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5144         with equal operands without side-effects.
5145
5146 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5147
5148         * decl.c (java_init_decl_processing): Don't emit otable decls
5149         if flag_indirect_dispatch is not set.
5150
5151 2003-09-21  Richard Henderson  <rth@redhat.com>
5152
5153         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5154         resource.c: Revert.
5155
5156 2003-09-21  Richard Henderson  <rth@redhat.com>
5157
5158         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5159         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5160
5161 2003-09-20  Richard Henderson  <rth@redhat.com>
5162
5163         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5164
5165 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5166
5167         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5168         * check-init.c (check_init): Likewise.
5169
5170 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5171
5172         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5173
5174 2003-09-16  Andrew Haley  <aph@redhat.com>
5175
5176         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5177
5178 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
5179
5180         Fixes PR java/9577
5181         * mangle.c (find_compression_record_match): Skip
5182         over a "6JArray" (the array template mangled string)
5183         IDENTIFIER_NODE.
5184         (mangle_array_type): Correct minor typo.
5185         (atms): Move definition to the beginning.
5186
5187 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
5188
5189         * class.c (add_miranda_methods): Ensure super-interfaces are laid
5190         out. Fix for PR java/12254.
5191
5192 2003-09-11  Richard Henderson  <rth@redhat.com>
5193
5194         * parse.y (source_end_java_method): Update for new
5195         cgraph_finalize_function argument.
5196
5197 2003-09-09  Richard Henderson  <rth@redhat.com>
5198
5199         * parse.y (source_end_java_method): Update call to
5200         cgraph_finalize_function.
5201
5202 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
5203
5204         * decl.c (java_expand_body): New function.
5205         * expr.c (build_class_init): Set DECL_IGNORED_P.
5206         * java-tree.h (start_complete_expand_method,
5207         java_expand_body): Declare.
5208         * jcf-parse.c (cgraph.h): Include.
5209         (java_parse_file): Handle flag_unit_at_a_time.
5210         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5211         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5212         (java_estimate_num_insns): Use walk_tree_without_duplicates.
5213         (java_start_inlining): New function.
5214         * parse.h (java_finish_classes): Declare.
5215         * parse.y: Include cgraph.h.
5216         (block): Don't special-case empty block production.
5217         (craft_constructor): Set DECL_INLINE.
5218         (source_end_java_method): Handle flag_unit_at_a_time.
5219         Replace inline code with call to java_expand_body.
5220         (start_complete_expand_method): Remove static modifier.
5221         (java_expand_method_bodies): Patch function tree for
5222         class initialization and/or synchronization as needed.
5223         Don't begin RTL expansion yet.
5224         (java_expand_classes): Check flag_unit_at_a_time before
5225         calling finish_class.
5226         (java_finish_classes): New function.
5227         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5228         (patch_assignment): Set DECL_CONTEXT on temporary variable.
5229         (emit_test_initialization): Set DECL_IGNORED_P.
5230
5231 2003-09-03  Roger Sayle  <roger@eyesopen.com>
5232
5233         * builtins.c (enum builtin_type): Delete unused enumeration.
5234         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5235
5236 2003-08-28  Tom Tromey  <tromey@redhat.com>
5237
5238         * gcj.texi (Extensions): Document gcjlib URLs.
5239
5240 2003-08-20  Tom Tromey  <tromey@redhat.com>
5241
5242         * gcj.texi (Extensions): Added xref.
5243         (libgcj Runtime Properties): Document
5244         gnu.gcj.runtime.VMClassLoader.library_control.
5245
5246 2003-08-20  Andrew Haley  <aph@redhat.com>
5247
5248         * except.c (prepare_eh_table_type): Use new encoding for exception
5249         handlers when using -fno-assume-compiled.
5250
5251 2003-08-13  Tom Tromey  <tromey@redhat.com>
5252
5253         * gcj.texi (Invoking gij): Document -X and -?.
5254
5255 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
5256
5257         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5258         GCJH_OBJS, JCFDUMP_OBJS
5259         * win32-host.c: Removed the unnecessary and broken dependency
5260         on jcf.h
5261
5262 2003-08-11  Tom Tromey  <tromey@redhat.com>
5263
5264         * parse.y (java_check_regular_methods): Typo fixes.  Call
5265         check_interface_throws_clauses.  Use
5266         check_concrete_throws_clauses.
5267         (check_interface_throws_clauses): New function.
5268         (check_concrete_throws_clauses): New function.
5269         (hack_is_accessible_p): New function.
5270         (find_most_specific_methods_list): Added FIXME.
5271         * typeck.c (lookup_do): Use `flags' argument to decide what to
5272         do.  Reimplemented.
5273         (lookup_argument_method_generic): New function.
5274         (lookup_argument_method2): Removed.
5275         * jcf.h (ACC_INVISIBLE): New define.
5276         * jcf-write.c (generate_classfile): Skip invisible methods.
5277         * class.c (add_miranda_methods): New function.
5278         (layout_class_methods): Use it.
5279         (get_access_flags_from_decl): Use ACC_INVISIBLE.
5280         * java-tree.h (METHOD_INVISIBLE): New define.
5281         (lang_decl_func) [invisible]: New field.
5282         (lookup_argument_method_generic): Declare.
5283         (SEARCH_INTERFACE): New define.
5284         (SEARCH_SUPER): Likewise.
5285         (SEARCH_ONLY_INTERFACE): Likewise.
5286         (SEARCH_VISIBLE): Likewise.
5287         (lookup_argument_method2): Removed declaration.
5288
5289 2003-08-05  Tom Tromey  <tromey@redhat.com>
5290
5291         Fix for PR java/11600:
5292         * parse.y (java_complete_lhs): See whether we're calling a method
5293         on an array.
5294         (check_thrown_exceptions): Added `is_array_call' argument;
5295         fixed `clone' checking; updated all callers.
5296
5297 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
5298
5299         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5300
5301 2003-08-03  Tom Tromey  <tromey@redhat.com>
5302
5303         * java-tree.h (METHOD_TRANSIENT): Removed.
5304         * decl.c (pushdecl): Removed some dead code.
5305         * class.c (get_access_flags_from_decl): Can't have transient
5306         method.
5307         (add_method_1): Can't have a transient method.
5308
5309 2003-07-28  Andreas Jaeger  <aj@suse.de>
5310
5311         * jvspec.c: Convert to ISO C90 prototypes.
5312
5313 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5314
5315         * decl.c (force_poplevels): Fix warning call.
5316
5317 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5318
5319         * expr.c (expand_java_field_op): Don't use xxx_with_decl
5320         (expand_java_field_op): Likewise.
5321         * class.c (layout_class_method): Likewise
5322         (emit_register_classes): Likewise.
5323         * decl.c (pushdecl): Likewise.
5324         (poplevel): Likewise.
5325         (force_poplevels): Likewise.
5326         (give_name_to_locals): Likewise.
5327         * check-init.c (check_for_initialization): Likewise.
5328
5329 2003-07-24  Jason Merrill  <jason@redhat.com>
5330
5331         * java-tree.h: Move boolean_type_node et al to the back end.
5332
5333 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5334
5335         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5336         casts.
5337
5338 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
5339
5340         * lang.opt: Don't show -MD_ and -MDD_.
5341
5342 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
5343
5344         * lang-options.h: Remove.
5345         * lang.opt: Add help text.
5346
5347 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
5348
5349         * expr.c: Remove the last argument to expand_assignment().
5350
5351 2003-07-09  Jan Hubicka  <jh@suse.cz>
5352
5353         * java-tree.h (DECL_NUM_STMTS): Rename to...
5354         (DECL_ESTIMATED_INSNS): ... this.
5355         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
5356         New static functions.
5357         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
5358         * parser.y (add_stmt_to_compound): Do not account statements.
5359
5360 2003-07-08  Mark Wielaard  <mark@klomp.org>
5361
5362         * gcj.texi: CNI now expands to Compiled Native Interface.
5363
5364 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5365
5366         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5367
5368 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5369
5370         * expr.c (expand_byte_code): Adjist emit_line_note call.
5371
5372 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
5373
5374         * lang.c (java_handle_option): Don't handle filenames.
5375
5376 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
5377
5378         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5379         DIR_SEPARATOR.
5380         Use FILENAME_CMP.
5381         * jcf-write.c: Don't default-define DIR_SEPARATOR.
5382         * jcf.h: Delete COMPARE_FILENAMES definition.
5383
5384 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
5385
5386         * lang.c (java_init_options): Update prototype.
5387
5388 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
5389
5390         * decl.c (poplevel): Adjust define_label call.
5391
5392 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
5393
5394         * gjavah.c (flag_jni): Make non-static.
5395         * parse-scan.y (ctxp): Make non-static.
5396
5397         * class.c (build_method_symbols_entry)
5398         * expr.c (get_offset_table_index)
5399         * jcf-parse.c (jcf_parse):
5400         Mark the definition static, matching the forward declaration.
5401
5402 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
5403
5404         * lang.c (java_handle_option): Don't check for missing arguments.
5405
5406 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
5407
5408         * class.c (push_class): Use a location_t to save place.
5409         (emit_register_classes): Set input_location. Adjust
5410         expand_function_end call.
5411         * resource.c (write_resource_constructor): Likewise.
5412         * decl.c (end_java_method): Adjust expand_function_end call.
5413         * parse.y (source_end_java_method): Likewise.
5414
5415 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
5416
5417         * lang.c (java_handle_option): Likewise.
5418
5419 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
5420
5421         * lang.c (java_handle_option): Special-casing of optional
5422         joined arguments no longer needed.
5423         * lang.opt: Update switches that take optional argument.
5424
5425 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5426
5427         * lang.opt: Declare Java.
5428         * lang.c (java_init_options): Update.
5429
5430 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5431
5432         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5433
5434 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5435
5436         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
5437         * lang.c (java_handle_option): -MD and -MMD have an underscore.
5438         * lang.opt: -MD and -MMD have an underscore.
5439
5440 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
5441
5442         * class.c (emit_register_classes): Adjust init_function_start
5443         call.
5444         * decl.c (complete_start_java_method): Likewise.
5445         * resource.c (write_resource_constructor): Likewise.
5446
5447 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5448
5449         * Make-lang.in: Update to use options.c and options.h.
5450         * lang.c: Include options.h not j-options.h.
5451         (java_handle_option): Abort on unrecognized option.
5452         (java_init_options): Request Java switches.
5453
5454 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
5455
5456         * Make-lang.in: Handle mostlyclean.
5457
5458 2003-06-11  Tom Tromey  <tromey@redhat.com>
5459
5460         * lang.c (java_handle_option): Update dependency_tracking for
5461         OPT_MF case.
5462
5463         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5464         empty argument.
5465
5466 2003-06-10  Andrew Haley  <aph@redhat.com>
5467
5468         * resource.c (write_resource_constructor): Use expand_expr to
5469         generate the address of the label attached to a resource.
5470         * Make-lang.in (java/resource.o): Add expr.h
5471
5472 2003-06-10  Andrew Haley  <aph@redhat.com>
5473
5474         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
5475         (java_decl_ok_for_sibcall): New.
5476
5477 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
5478
5479         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
5480         (java/j-options.c, java/j-options.h): New.
5481         * java-tree.h (resource_name, compile_resource_file,
5482         compile_resource_data): Constify.
5483         * jcf-write.c (jcf_write_base_directory): Similarly.
5484         * jcf.h (jcf_write_base_directory): Similarly.
5485         * lang.c: Include j-options.h.
5486         (cl_options_count, cl_options, string_option, java_decode_option,
5487         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
5488         process_option_with_no): Remove.
5489         (resource_name): Constify.
5490         (LANG_HOOKS_HANDLE_OPTION): Override.
5491         (java_handle_option): New.
5492         (java_init): Don't call jcf_path_init.
5493         (java_init_options): Call jcf_path_init.
5494         * lang.opt: New.
5495         * resource.c (compile_resource_data, compile_resource_file): Constify.
5496
5497 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
5498
5499         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
5500         (struct lang_decl_func): Add last_line field.
5501         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
5502         DECL_SOURCE_LINE_LAST): Remove.
5503         * parse.y (missing_return_error, finish_method_declaration,
5504         lookup_cl, start_artificial_method_body, source_end_java_method,
5505         start_complete_expand_method): Adjust.
5506
5507 2003-06-08  Tom Tromey  <tromey@redhat.com>
5508
5509         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
5510         fno-assume-compiled.
5511
5512 2003-06-08  Roger Sayle  <roger@eyesopen.com>
5513
5514         * builtins.c (define_builtin_type, builtin_types): Delete.
5515         (define_builtin): Rewritten to take just the built-in code,
5516         the function's name, type and fallback library function name.
5517         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
5518         (initialize_builtins): Overhaul to define the GCC builtins
5519         used by gcj manually, providing the Java run-time's
5520         implementations as the fallback library function.
5521
5522 2003-06-08  Anthony Green  <green@redhat.com>
5523
5524         * parse.y (patch_cast): Fix conversions from floating-point to
5525         integral types.
5526
5527 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
5528
5529         * Make-lang.in: Update.
5530         * lang.c: Include opts.h. Define cl_options_count and cl_options.
5531
5532 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
5533
5534         * lang.c (java_init_options): Update.
5535
5536 2003-06-05  Jan Hubicka  <jh@suse.cz>
5537
5538         * Make-lang.in:  Add support for stageprofile and stagefeedback
5539
5540 2003-05-31  Roger Sayle  <roger@eyesopen.com>
5541
5542         * lang.c (java_init_options): Prescribe wrap-around two's
5543         complement arithmetic overflow by setting flag_wrapv.
5544
5545 2003-05-29  Roger Sayle  <roger@eyesopen.com>
5546
5547         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
5548         (builtin_record): Add an additional builtin_code field to
5549         record which GCC built-in corresponds to the Java function.
5550         (java_builtins):  Add new entries for atan, atan2, exp, log,
5551         pow and tan.
5552         (max_builtin, min_builtin, abs_builtin): Perform constant
5553         folding on the resulting tree.
5554         (java_build_function_call_expr): Likewise, perform constant
5555         folding on the resulting tree.
5556         (initialize_builtins): The NULL creators are now allowed in
5557         the java_builtins table, which is now terminated by an entry
5558         with builtin_code == END_BUILTINS.
5559         (check_for_builtin): Likewise.  If the matching creator is
5560         NULL, construct the call using java_build_function_call_expr
5561         directly with the decl for the corresponding builtin_code.
5562
5563 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5564
5565         * win32-host.c: Normalize copyright boilerplate.
5566
5567 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5568
5569         * parse.y (print_int_node): Use string concatentation on
5570         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
5571         function calls into one.
5572
5573 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
5574
5575         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
5576         fatal_io_error with calls to fatal_error; add ": %m" to the end of
5577         all the affected error messages.
5578
5579 2003-05-13  Richard Henderson  <rth@redhat.com>
5580
5581         * class.c (layout_class_method): Set DECL_EXTERNAL.
5582         * decl.c (java_mark_decl_local, java_mark_class_local): New.
5583         * java-tree.h (java_mark_class_local): Declare.
5584         * jcf-parse.c (parse_class_file): Use it.
5585         * parse.y (java_expand_classes): Likewise.
5586
5587 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
5588
5589         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
5590         * lex.h: #include input.h.
5591         * jv-scan.c (input_filename): Remove.
5592
5593 2003-05-02  Tom Tromey  <tromey@redhat.com>
5594
5595         PR java/10491:
5596         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5597         (handle_inner_classes): New function.
5598
5599 2003-05-01  Tom Tromey  <tromey@redhat.com>
5600
5601         PR java/10459:
5602         * parse.y (finish_for_loop): Do nothing if update expression is a
5603         EXPR_WFL_NODE wrapping nothing.
5604         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
5605
5606 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
5607
5608         * lex.h (input_lineno): Remove declaration.
5609         * parse-scan.y: #include input.h.
5610         (input_filename): Remove declaration.
5611         (input_location): Add definition.
5612         (input_line): Remove definition.
5613
5614 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
5615
5616         * lex.h (lineno): Rename to ...
5617         (input_line): ... here
5618         * parse-scan.y (lineno): Rename to ...
5619         (input_line): ... here.
5620         (reset_report): Rename lineno to input_line.
5621         * check-init.c (check_init): Likewise.
5622         * class.c (push_class): Likewise.
5623         * decl.c (complete_start_java_method, end_java_method): Likewise.
5624         * expr.c (expand_byte_code): Likewise.
5625         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
5626         * jcf-write.c (generate_bytecode_insns): Likewise.
5627         * lex.c (java_init_lex, java_allocate_new_line,
5628         do_java_lex): Likewise.
5629         * parse.h (YYNOT_TWICE): Likewise.
5630         * parse.y (empty_statement, expression_statement,
5631         java_pop_parser_context, java_parser_context_save_global,
5632         yyerror, register_fields, method_header, safe_layout_class,
5633         find_in_imports_on_demand, create_artificial_method,
5634         source_end_java_method, start_complete_expand_method,
5635         build_thisn_assign, java_complete_lhs,
5636         maybe_absorb_scoping_block): Likewise.
5637
5638 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
5639
5640         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
5641         '/' when computing java source filename
5642
5643 2003-04-13  Tom Tromey  <tromey@redhat.com>
5644
5645         * gjavah.c (print_c_decl): Indentation fix.
5646
5647 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
5648
5649         * class.c (make_field_value, make_method_value, get_dispatch_table)
5650         (make_class_data, emit_offset_symbol_table)
5651         * constants.c (build_constants_constructor)
5652         * java-tree.h (START_RECORD_CONSTRUCTOR)
5653         * parse.y (maybe_build_array_element_wfl):
5654         Use build_constructor.
5655
5656 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
5657
5658         PR java/10253:
5659         * parse.y (string_convert_int_cst): Always use at least one digit
5660         in string conversion. Remove ASCII dependence.
5661         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
5662
5663 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
5664
5665         * Make-lang.in: added win32-host.c
5666         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
5667         resolves to open() on non-Win32 platforms and
5668         Win32-specific jcf_open_exact_case() on Win32
5669         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
5670         when trying .java and .class files
5671         * win32-host.c: added to repository. Defines
5672         Win32-specific jcf_open_exact_case()
5673
5674 2003-04-10  Andrew Haley  <aph@redhat.com>
5675
5676         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
5677         (maybe_free_localvar): Renamed from localvar_free.
5678         Add new arg, really.
5679         (generate_bytecode_insns): Set new variable, jsrs.
5680         Only free local vars if no jsr insns have been emittted.
5681         Call maybe_free_localvar, not localvar_free.
5682
5683 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5684
5685         * gcj.texi: Remove @ at start of file.
5686
5687 2003-03-25  Tom Tromey  <tromey@redhat.com>
5688
5689         * parse.y (create_interface): Call CHECK_DEPRECATED.
5690
5691 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
5692
5693         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
5694
5695 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
5696
5697         * javaop.h (jfloat, jdouble): Make them structures mirroring
5698         the bit fields of IEEE float and double respectively.
5699         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
5700         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
5701         (union Word, union DWord): Delete.
5702         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
5703
5704         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
5705         D_NAN_MASK): Delete.
5706         (jni_print_float, jni_print_double): New.  Generate
5707         hexadecimal floating constants.
5708         (print_field_info): Use jni_print_float/double.
5709
5710         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
5711         finite floating point numbers for output; special case
5712         non-finite floats.
5713
5714 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
5715
5716         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
5717         Replace 0 and 1 with true and false in return statements.
5718
5719 2003-03-19  Tom Tromey  <tromey@redhat.com>
5720
5721         * lex.c (do_java_lex): Renamed from java_lex.
5722         (java_lex): New function.
5723         Include timevar.h.
5724
5725 2003-03-13  Tom Tromey  <tromey@redhat.com>
5726
5727         * parse.y (resolve_inner_class): Error if qualifier is a primitive
5728         type.
5729
5730 2003-03-04  Andrew Haley  <aph@redhat.com>
5731
5732         * gjavah.c (is_first_data_member): New global variable.
5733         (print_c_decl): If it's the first data member, align it as the
5734         superclass.
5735         (process_file): Set is_first_data_member.
5736
5737 2003-03-11  Tom Tromey  <tromey@redhat.com>
5738
5739         * parse.y (resolve_field_access): Initialize class if field is
5740         found in another static field.
5741         * expr.c (build_class_init): Don't optimize out initialization of
5742         implemented interface.
5743
5744 2003-03-11  Andrew Haley  <aph@redhat.com>
5745
5746         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
5747         warning.
5748
5749 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
5750
5751         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
5752         and DIR_SEPARATOR_2 for a target.
5753         Correct minor typos.
5754
5755         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
5756         and DIR_SEPARATOR_2 for a target into account.
5757
5758 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
5759
5760         * lang.c (java_init): Update prototype, move code to java_post_options.
5761         (java_post_options): Similarly.
5762
5763 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
5764
5765         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
5766         compare file name components depending on the case-sensitivity
5767         or otherwise of the host file system.
5768
5769         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
5770         "strcmp" to compare file name components.
5771         Use IS_DIR_SEPARATOR instead of comparing directly against
5772         DIR_SEPARATOR.
5773         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
5774         comparing directly against DIR_SEPARATOR.
5775
5776 2003-03-04  Tom Tromey  <tromey@redhat.com>
5777
5778         * Make-lang.in (java.tags): New target.
5779
5780 2003-03-01  Roger Sayle  <roger@eyesopen.com>
5781
5782         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
5783         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
5784
5785 2003-03-01  Tom Tromey  <tromey@redhat.com>
5786
5787         * parse.y (jdep_resolve_class): Only check deprecation if we found
5788         a decl.
5789
5790 2003-02-28  Tom Tromey  <tromey@redhat.com>
5791
5792         PR java/9695:
5793         * class.c (maybe_layout_super_class): Always pass a WFL to
5794         do_resolve_class.
5795         * parse.y (do_resolve_class): Updated comment to explain
5796         parameters.
5797
5798 2003-02-26  Tom Tromey  <tromey@redhat.com>
5799
5800         * jcf-write.c (generate_classfile): Check whether class is
5801         deprecated before writing attribute count.
5802
5803 2003-02-25  Roger Sayle  <roger@eyesopen.com>
5804
5805         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
5806         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
5807
5808 2003-02-23  Tom Tromey  <tromey@redhat.com>
5809
5810         * lang-options.h: Added -Wdeprecated.
5811         * gcj.texi (Warnings): Document -Wdeprecated.
5812         * java-tree.h (flag_deprecated): Declare.
5813         * lang.c (lang_W_options): Added deprecated.
5814         (flag_deprecated): New global.
5815         * chartables.h: Rebuilt.
5816         * gen-table.pl (process_one): Look at whitespace.
5817         (print_tables): Define LETTER_SPACE, LETTER_MASK.
5818         * parse.h (CLEAR_DEPRECATED): New macro.
5819         (CHECK_DEPRECATED_NO_RESET): New macro.
5820         * jcf-parse.c (handle_deprecated): New function.
5821         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
5822         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
5823         * parse.y (resolve_type_during_patch): Check deprecation.
5824         (jdep_resolve_class): Likewise.
5825         (process_imports): Likewise.
5826         (resolve_expression_name): Likewise.
5827         (check_deprecation): Strip arrays from decl.  Check
5828         flag_deprecated.
5829         (patch_method_invocation): Also check the particular constructor
5830         for deprecation.
5831         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
5832         * jcf-write.c (append_deprecated_attribute): New function.
5833         (generate_classfile): Generate deprecated attribute when
5834         appropriate.
5835         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
5836         (java_lex) [case '*']: Simplify logic.
5837         (java_start_char_p): Use LETTER_MASK.
5838         (java_part_char_p): Likewise.
5839         (java_space_char_p): New function.
5840
5841 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5842
5843         Change base class access representation.
5844         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
5845         (add_interface_do): Likewise.
5846
5847 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
5848
5849         * decl.c (java_init_decl_processing): Change
5850         soft_lookupjnimethod_node to reflect the change in
5851         signature of _Jv_LookupJNIMethod in libjava/jni.cc
5852         * expr.c (build_jni_stub): Calculate and pass the size
5853         on the stack of the arguments to a JNI function. Use
5854         new target macro MODIFY_JNI_METHOD_CALL to allow a
5855         target to modify the call to a JNI method.
5856
5857 2003-02-08  Roger Sayle  <roger@eyesopen.com>
5858
5859         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
5860         instead of basename to avoid compiler warnings on Tru64.
5861
5862 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
5863
5864         * gcj.texi: Update to GFDL 1.2.
5865
5866 2003-01-31  Andrew Haley  <aph@redhat.com>
5867
5868         * parse.y (java_expand_classes): Scan the whole class list looking
5869         for access methods that haven't yet been expanded.
5870
5871 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
5872
5873         Fix for java/4269:
5874
5875         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
5876         to fix bootstrap on sparc-unknown-netbsdelf1.5.
5877         * jcf-parse.c: Likewise.
5878
5879 2003-01-31  Mark Wielaard  <mark@klomp.org>
5880
5881         * gjavah.c (throwable_p): Allocate 1 more byte for string.
5882
5883 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5884
5885         * class.c (make_class): Use BINFO_ELTS.
5886         (set_super_info): Likewse.
5887         (add_interface_do): Likewise.
5888
5889 2003-01-30  Tom Tromey  <tromey@redhat.com>
5890
5891         * jcf-parse.c (read_class): Update identifier's class value if it
5892         changed during parsing.
5893
5894 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
5895
5896         * Make-lang.in (po-generated): Find the targets in $(parsedir).
5897         Propagate change to all other rules as required.
5898         (java/parse-scan.o): Add explicit dependency on
5899         $(parsedir)/java/parse-scan.c .
5900
5901 2003-01-29  Tom Tromey  <tromey@redhat.com>
5902
5903         * parse.y (patch_assignment): Only transform the rhs of an
5904         assignment when compiling to native.
5905
5906 2003-01-28  Tom Tromey  <tromey@redhat.com>
5907
5908         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
5909
5910 2003-01-28  Tom Tromey  <tromey@redhat.com>
5911
5912         * lex.c (java_lex): Don't include UEOF as part of token.
5913         (java_read_unicode): Error if \u sequence prematurely terminated.
5914
5915 2003-01-27  Tom Tromey  <tromey@redhat.com>
5916
5917         * parse.y (java_check_regular_methods): Check for construct after
5918         checking types in throws clause.
5919
5920 2003-01-24  Tom Tromey  <tromey@redhat.com>
5921
5922         * class.c (build_static_field_ref): Only a String or numeric field
5923         can fold to a constant.
5924
5925 2003-01-23  Tom Tromey  <tromey@redhat.com>
5926
5927         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
5928         file name in resource buffer.
5929
5930 2003-01-23  Tom Tromey  <tromey@redhat.com>
5931
5932         * expr.c (build_known_method_ref): Use method's context to find
5933         method table index.
5934
5935 2003-01-23  Tom Tromey  <tromey@redhat.com>
5936
5937         * constants.c (set_constant_entry): Allocated cleared memory.
5938
5939 2003-01-22  Tom Tromey  <tromey@redhat.com>
5940
5941         * java-tree.h: Don't use PARAMS.
5942         * resource.c: Add prototypes for all functions.
5943         (write_resource_constructor): Use `const char *' to avoid
5944         warning.
5945
5946 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
5947
5948         * jcf-parse.c (process_zip_dir): Remove unused variable.
5949
5950 2003-01-22  Tom Tromey  <tromey@redhat.com>
5951
5952         * expr.c (build_invokeinterface): Abort if method's context is not
5953         an interface.
5954
5955 2003-01-22  Tom Tromey  <tromey@redhat.com>
5956
5957         * gcj.texi (Input and output files): Mention non-class entries.
5958         * decl.c (java_init_decl_processing): Call
5959         init_resource_processing.
5960         * java-tree.h (compile_resource_data, write_resource_constructor,
5961         compile_resource_file, init_resource_processing): Declare.
5962         * config-lang.in (gtfiles): Added resource.c.
5963         * Make-lang.in (gt-java-resource.h): New target.
5964         (JAVA_OBJS): Added resource.o.
5965         (java/resource.o): New target.
5966         * resource.c: New file.
5967         * class.c (compile_resource_file): Moved to resource.c.
5968         (registerResource_libfunc): Likewise.
5969         (utf8_decl_list): Mark with GTY; now static.
5970         * jcf-parse.c (classify_zip_file): New function.
5971         (parse_zip_file_entries): Use it; compile .properties files.
5972         (process_zip_dir): Use classify_zip_file and compute_class_name.
5973         Don't write class name into zip directory.
5974         (java_parse_file): Call write_resource_constructor.
5975         (compute_class_name): New function.
5976         * jcf-io.c (read_zip_member): Reindented.
5977
5978 2003-01-21  Tom Tromey  <tromey@redhat.com>
5979
5980         * class.c (supers_all_compiled): New function.
5981         (make_class_data): Use it.
5982
5983 2003-01-21  Tom Tromey  <tromey@redhat.com>
5984
5985         * parse.y (method_header): Native method can't be strictfp.
5986         No method can be transient or volatile.
5987
5988 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5989
5990         Make-lang.in (jvspec.o-warn): Add -Wno-error.
5991
5992 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
5993
5994         * check-init.c: Fix comment typos.
5995         * class.c: Likewise.
5996         * constants.c: Likewise.
5997         * decl.c: Likewise.
5998         * except.c: Likewise.
5999         * expr.c: Likewise.
6000         * java-except.h: Likewise.
6001         * java-tree.h: Likewise.
6002         * javaop.h: Likewise.
6003         * jcf-dump.c: Likewise.
6004         * jcf-io.c: Likewise.
6005         * jcf-parse.c: Likewise.
6006         * jcf-write.c: Likewise.
6007         * lang.c: Likewise.
6008         * mangle.c: Likewise.
6009         * typeck.c: Likewise.
6010         * verify.c: Likewise.
6011
6012 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6013
6014         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6015         * jcf-write.c: Include "tm_p.h".
6016
6017 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6018
6019         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6020
6021 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6022
6023         * builtins.c (java_build_function_call_expr): Renamed from
6024         build_function_call_expr.  All callers changed.
6025
6026         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6027         * jcf-parse.c: Include tm_p.h.
6028
6029         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6030         warning.
6031
6032 2003-01-14  Tom Tromey  <tromey@redhat.com>
6033
6034         * class.c (make_class_data): Check that super is compiled before
6035         building class reference to it.
6036
6037 2003-01-14  Andrew Haley  <aph@redhat.com>
6038
6039         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6040         varargs function -- correct.
6041
6042 2003-01-14  Andrew Haley  <aph@redhat.com>
6043
6044         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6045
6046 2003-01-14  Andrew Haley  <aph@redhat.com>
6047
6048         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6049         varargs function -- correct.
6050
6051         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6052         temporary if the RHS is a reference.
6053
6054 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6055
6056         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6057         * keyword.h: Regenerated.
6058
6059         * All Files: Convert to ISO C style function definitions.
6060
6061 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6062
6063         * parse.y (check_pkg_class_access): ANSIfy definition.
6064
6065 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6066
6067         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6068         xmalloc et al.
6069
6070         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6071
6072 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6073
6074         Merge from pch-branch:
6075
6076         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6077
6078         * Make-lang.in (java/gjavah.o): Update dependencies.
6079         * gjavah.c: Include ggc.h.
6080
6081         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6082
6083         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6084         (JCFDUMP_OBJS): Add ggc-none.o.
6085         (java/jcf-dump.o): Depend on GGC_H.
6086         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6087         CPool substructures.
6088         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6089         * jcf-dump.c: Include ggc.h.
6090
6091         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6092
6093         * jcf.h (union cpool_entry): New.
6094         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6095         an array of unions.
6096         (struct JCF): Use gengtype to mark.
6097         (CPOOL_UINT): Update for new cpool_entry type.
6098         (CPOOL_USHORT1): Likewise.
6099         (CPOOL_USHORT2): Likewise.
6100         (CPOOL_FINISH): Use GC to free cpool subfields.
6101         * parse.h (struct parser_ctxt): Mark field current_jcf.
6102         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6103         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6104         (main_jcf): Use gengtype to mark.
6105         (ggc_mark_jcf): Delete.
6106         (get_constant): Update for new cpool_entry type.
6107         (give_name_to_class): Likewise.
6108         (get_class_constant): Likewise.
6109         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6110         (java_parse_file): Use GGC to allocate struct JCF.
6111         (init_jcf_parse): Don't call ggc_add_root.
6112         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6113         cpool_entry type.
6114         * java-tree.h (current_jcf): Use gengtype to mark.
6115         (CPOOL_UTF): Update for new cpool_entry type.
6116         (outgoing_cpool): Use gengtype to mark.
6117         (struct lang_type): GC struct JCF and struct CPool.
6118         * config-lang.in (gtfiles): Add jcf.h.
6119         * constants.c (find_tree_constant): New.
6120         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6121         for new cpool_entry type.
6122         (find_constant1): Update for new cpool_entry type.
6123         (find_constant2): Likewise.
6124         (find_utf8_constant): Use find_tree_constant.
6125         (find_class_or_string_constant): Remove unnecessary cast to jword.
6126         Update for new cpool_entry type.
6127         (count_constant_pool_bytes): Update for new cpool_entry type.
6128         (write_constant_pool): Likewise.
6129         (alloc_name_constant): Use find_tree_constant.
6130         (build_constants_constructor): Update for new cpool_entry type.
6131
6132         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6133
6134         * parse.y (mark_parser_ctxt): Delete.
6135         (goal): Don't use ggc_add_root.
6136         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6137         (java_pop_parser_context): Let GC free parser_ctxt.
6138         (java_parser_context_resume): Likewise.
6139         * parse.h (struct parser_ctxt): Use gengtype to mark.
6140         (ctxp): Likewise.
6141         (ctxp_for_generation): Likewise.
6142         * lex.h (struct java_lc_s): Mark for gengtype.
6143         (java_lexer): Rearrange for gengtype.
6144         * config-lang.in (gtfiles): Add lex.h, parse.h.
6145
6146 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6147
6148         * All Files: Remove PARAMS macro.
6149
6150         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6151         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6152         `__STDC__' macros.
6153
6154         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6155         VA_CLOSE.
6156
6157 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6158
6159         * Make-lang.in (java.install-common, java.uninstall,
6160         java.install-info, java.install-man): Prepend $(DESTDIR)
6161         to destination paths in all (un)installation commands.
6162         (java.install-common): Rewrite $(LN) command to support
6163         DESTDIR with "ln" as well as with "ln -s".
6164
6165 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6166
6167         * java-tree.h: Protect against multiple inclusion.
6168
6169 2003-01-07  Tom Tromey  <tromey@redhat.com>
6170
6171         * class.c (add_assume_compiled): Don't adjust parent if we're
6172         already at the root of tree.
6173
6174 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6175
6176         * lang.c (dump_compound_expr): Prototype.
6177
6178 2003-01-03  Tom Tromey  <tromey@redhat.com>
6179
6180         Fix for PR java/8712:
6181         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6182         when simply checking against `null'.
6183
6184 2003-01-03  Tom Tromey  <tromey@redhat.com>
6185
6186         * gcj.texi (Standard Properties): Document http.proxyHost and
6187         http.proxyPort.
6188
6189         * gcj.texi (GNU Classpath Properties): Document new properties.
6190
6191 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6192
6193         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6194         java/lang-options.h, java/mangle.c, java/mangle_name.c,
6195         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6196
6197 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6198
6199         * Make-lang.in, boehm.c, buffer.c,
6200           buffer.h, builtins.c, class.c,
6201           config-lang.in, constants.c,
6202           convert.h, decl.c, except.c,
6203           expr.c, java-except.h,
6204           java-tree.h, javaop.def,
6205           jcf-parse.c, jcf-write.c,
6206           jv-scan.c, jvgenmain.c,
6207           jvspec.c, keyword.gperf,
6208           keyword.h, lang-options.h,
6209           lang-specs.h, lang.c, lex.c,
6210           lex.h, mangle.c, mangle_name.c,
6211           parse-scan.y, parse.h, parse.y,
6212           typeck.c, verify.c, xref.c,
6213           xref.h: Replace "GNU CC" with
6214           "GCC" in the copyright header.
6215
6216         * check-init.c, gjavah.c, javaop.h,
6217           jcf-depend.c, jcf-dump.c, jcf-io.c,
6218           jcf-path.c, jcf-reader.c, jcf.h,
6219           zextract.c, zipfile.h: These files are
6220           "part of GCC". Also say "GCC" not "GNU CC".
6221
6222 2002-12-30  DJ Delorie  <dj@redhat.com>
6223
6224         * Make-lang.in: Protect against texi2pod/pod2man failing.
6225
6226 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
6227
6228         * gcj.texi: Use @copying.
6229
6230 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6231
6232         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6233         print_cxx_classname.
6234         (print_cxx_classname): Add add_scope parameter.
6235         (print_class_decls): Do not emit a semicolon after the extern
6236         "Java" block.
6237         (process_file): Adjust calls to print_cxx_classname.
6238
6239 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6240
6241         * gcj.texi: Include Cover Texts in man page.
6242
6243 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
6244
6245         * class.c (build_static_field_ref): Check FIELD_FINAL.
6246
6247         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6248         instead of current_constant_pool_data_ref.
6249         * java-tree.h (current_constant_pool_data_ref): Undefine.
6250         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6251         * jcf-parse.c (init_outgoing_cpool): Don't initialize
6252         current_constant_pool_data_ref.
6253
6254         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6255         not build_internal_class_name.
6256
6257         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6258         Use it when class ref isn't certain to be compiled.
6259
6260 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6261
6262         * gcj.texi: Include gcc-common.texi.
6263         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6264         $(srcdir)/doc/include/gcc-common.texi.
6265
6266 2002-12-22  Anthony Green  <green@redhat.com>
6267
6268         * gcj.texi (Limitations): Add note about org.xml.sax and
6269         org.w3c.dom.
6270
6271 2002-12-20  Tom Tromey  <tromey@redhat.com>
6272
6273         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6274         where minimum case value is Integer.MIN_VALUE.
6275         Fixes PR java/8955.
6276
6277 2002-12-18  Andrew Haley  <aph@redhat.com>
6278
6279         * parse.y (patch_invoke): Force evaluation order when `check' is
6280         set.  For PR libgcj/8945.
6281
6282 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
6283
6284         * gcj.texi: Change version number to 3.4.
6285
6286 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
6287         Andrew Haley <aph@redhat.com>
6288
6289         * parse.y (source_end_java_method): Remove custom encoding of line
6290         numbers for a function decl before passing it to the back end.
6291
6292 2002-12-03  Andrew Haley  <aph@redhat.com>
6293
6294         * class.c (make_class_data): New field, "chain".
6295         * decl.c (java_init_decl_processing): Likewise.
6296
6297 2002-12-02  Tom Tromey  <tromey@redhat.com>
6298
6299         For PR java/8740:
6300         * parse.y (do_resolve_class): Handle qualified name via
6301         recursion.
6302
6303 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6304
6305         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6306         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6307         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6308         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6309         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6310         Include coretypes.h and tm.h.
6311         * Make-lang.in: Update dependencies.
6312
6313 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6314
6315         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6316
6317 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6318
6319         * jcf-reader.c: Don't expand JCF_readu4 inside the
6320         expansion of JCF_SKIP.
6321
6322 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6323
6324         * jcf-reader.c: Don't expand JCF_readu4 inside the
6325         expansion of JCF_SKIP.
6326
6327 2002-11-22  Tom Tromey  <tromey@redhat.com>
6328
6329         * parse.y (patch_binop): Cast right hand side of shift expression
6330         to `int'.  Fixes PR java/8676.
6331
6332 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
6333             Andrew Haley <aph@redhat.com>
6334
6335         * gcc/java/jcf-write.c (write_classfile): Remove target
6336         class file, if it exists, before renaming the temporary
6337         class file to it.
6338
6339 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6340
6341         * jvspec.c (lang_specific_spec_functions): New.
6342
6343 2002-11-18  Tom Tromey  <tromey@redhat.com>
6344
6345         Fix for PR java/7912:
6346         * expr.c (can_widen_reference_to): Allow cast of array to
6347         Cloneable or Serializable.
6348         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
6349         (java_io_serializable_identifier_node): Likewise.
6350         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
6351         (valid_ref_assignconv_cast_p): Use new identifier nodes.
6352         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
6353         java_io_serializable.
6354         * decl.c (java_init_decl_processing): Initialize
6355         java_lang_cloneable_identifier_node and
6356         java_io_serializable_identifier_node.
6357         (java_lang_cloneable_identifier_node): New global.
6358         (java_io_serializable_identifier_node): Likewise.
6359
6360 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
6361
6362         * buffer.c: Remove unnecessary casts.
6363         * check-init.c: Likewise.
6364         * class.c: Likewise.
6365         * constants.c: Likewise.
6366         * decl.c: Likewise.
6367         * except.c: Likewise.
6368         * gjavah.c: Likewise.
6369         * jcf-io.c: Likewise.
6370         * jcf-parse.c: Likewise.
6371         * jcf-path.c: Likewise.
6372         * jvspec.c: Likewise.
6373         * lang.c: Likewise.
6374         * lex.c: Likewise.
6375         * verify.c: Likewise.
6376
6377 2002-11-06  Tom Tromey  <tromey@redhat.com>
6378
6379         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6380         a JNI header.
6381
6382 2002-11-05  Tom Tromey  <tromey@redhat.com>
6383
6384         Fix for PR java/6388.
6385         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
6386         * java-tree.h (enum java_tree_index): New values
6387         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
6388         (decimal_int_max, decimal_long_max): New defines.
6389         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
6390         (error_if_numeric_overflow): Rewrote range checking.
6391         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
6392         decimal_long_max.
6393
6394 2002-11-02  Tom Tromey  <tromey@redhat.com>
6395
6396         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6397
6398         * class.c (make_method_value): Put class name, not signature, into
6399         `throws' field.  For PR java/8415.
6400
6401 2002-10-24  Tom Tromey  <tromey@redhat.com>
6402
6403         * gcj.texi (Invoking gij): Document --showversion.
6404         (Standard Properties): java.library.path now set.
6405
6406 2002-10-23  Tom Tromey  <tromey@redhat.com>
6407
6408         * gjavah.c (decode_signature_piece): In JNI mode, print
6409         `jobjectArray' when array depth is nonzero.
6410         Fixes PR java/8296.
6411
6412 2002-10-15  Andrew Haley  <aph@redhat.com>
6413
6414         * parse.y (patch_invoke): Call force_evaluation_order on a static
6415         arg list.
6416         (resolve_qualified_expression_name): Call force_evaluation_order
6417         on a arg list that is part of a Qualified Expression Name.
6418
6419         * lang.c (dump_compound_expr): New.
6420         (java_dump_tree): New.
6421
6422 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
6423
6424         * gcj.texi: Added item describing the GCJ runtime property
6425         "gnu.gcj.progname".
6426
6427 2002-10-15  Richard Henderson  <rth@redhat.com>
6428
6429         * jcf-parse.c (get_constant): Fix type warning.
6430
6431 2002-10-15  Andrew Haley  <aph@redhat.com>
6432
6433         * java-tree.h (java_inlining_merge_static_initializers): Declare.
6434         (java_inlining_map_static_initializers): Declare.
6435
6436 2002-10-14  Andrew Haley  <aph@redhat.com>
6437
6438         * tree-inline.c (remap_block): All local class initialization
6439         flags go in the outermost scope.
6440         (expand_call_inline): Call java_inlining_map_static_initializers.
6441         (expand_call_inline): Call java_inlining_merge_static_initializers.
6442         * java/lang.c (merge_init_test_initialization): New.
6443         (java_inlining_merge_static_initializers): New.
6444         (inline_init_test_initialization): New.
6445         (java_inlining_map_static_initializers): New.
6446
6447 2002-10-11  Mark Wielaard  <mark@klomp.org>
6448
6449         * gcj.texi (Compatibility): Add Limitations and Extensions section.
6450
6451 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6452
6453         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6454
6455 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6456
6457         * parse.y (merge_string_cste): Add parentheses around & within |.
6458
6459 2002-10-08  Tom Tromey  <tromey@redhat.com>
6460
6461         * parse.y (variable_declarator_id): Simplify error path for
6462         array declarator error.  For PR java/8003.
6463
6464 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
6465
6466         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6467         bug_report_url.
6468
6469 2002-10-08  Andrew Haley  <aph@redhat.com>
6470
6471         * parse.y (attach_init_test_initialization_flags): Check for
6472         error_mark_node.
6473
6474 2002-10-07  Anthony Green  <green@redhat.com>
6475
6476         * parse.y (merge_string_cste): Fix bug in string concatenation.
6477
6478 2002-10-03  Michael Koch  <konqueror@gmx.de>
6479
6480         * gcj.texi (Standard properties):
6481         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
6482
6483 2002-10-02  Roger Sayle  <roger@eyesopen.com>
6484
6485         PR optimization/6627
6486         * lang.c (java_init): If storing the vbit in function
6487         pointers, ensure that force_align_functions_log is atleast
6488         one to aid compatability with g++ vtables.
6489
6490 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
6491
6492         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
6493         foul of type-based aliasing.
6494
6495 2002-09-30  Anthony Green  <green@redhat.com>
6496
6497         * gcj.texi (Invoking jv-scan): Fix texinfo.
6498
6499 2002-09-28  Anthony Green  <green@redhat.com>
6500
6501         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
6502         (Code Generation): Add -fno-assert documentation.
6503         * jv-scan.c (flag_assert): New global.
6504         (options): Add assert option.
6505         (help): Add --no-assert documentation.
6506         * parse-scan.y (flag_assert): New global.
6507         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
6508         (flag_assert): New global.
6509         * java-tree.h (flag_assert): New global.
6510         * lex.c (java_lex): Obey flag_assert.
6511         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
6512         calling cc1.
6513
6514 2002-09-26  Andrew Haley  <aph@redhat.com>
6515
6516         * expr.c (build_java_array_length_access): Check for null pointer.
6517         * expr.c (expand_java_arrayload): Likewise.
6518
6519 2002-09-21  Richard Henderson  <rth@redhat.com>
6520
6521         * jcf-parse.c (get_constant): Decode from IEEE no matter
6522         what the target format.
6523
6524 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
6525
6526         * ChangeLog: Follow spelling conventions.
6527         * class.c: Likewise.
6528         * decl.c: Likewise.
6529         * expr.c: Likewise.
6530         * gjavah.c: Likewise.
6531         * java-tree.h: Likewise.
6532         * jcf-dump.c: Likewise.
6533         * jcf-parse.c: Likewise.
6534         * jvspec.c: Likewise.
6535         * lang.c: Likewise.
6536         * mangle.c: Likewise.
6537         * parse.y: Likewise.
6538
6539 2002-09-17  Tom Tromey  <tromey@redhat.com>
6540
6541         * lex.c (java_read_unicode_collapsing_terminators): Handle case
6542         where \r appears at EOF.  Fixes PR java/7950.
6543
6544 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6545
6546         * jvspec.c (lang_specific_driver): Remove unused variable.
6547
6548 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
6549
6550         * java-tree.h (union lang_tree_node): Add chain_next option.
6551
6552 2002-09-16  Richard Henderson  <rth@redhat.com>
6553
6554         * jcf-parse.c (get_constant): Runtime check for IEEE format;
6555         use new real.h interface.
6556         * jcf-write.c (find_constant_index): Use new real.h interface.
6557         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
6558
6559 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
6560
6561         * lang.c: Follow spelling conventions.
6562
6563 2002-09-11  Per Bothner  <per@bothner.com>
6564
6565         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
6566         constant to the type of the field.
6567         (java_complete_tree):  Remove now-redundant code.
6568
6569         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
6570
6571 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
6572
6573         For PR java/5794:
6574         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
6575         return label if a ret instruction for the jsr has been reached.
6576
6577 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
6578
6579         * parse.y (DIR_SEPARATOR): Don't define.
6580         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
6581
6582 2002-08-28  Andrew Haley  <aph@redhat.com>
6583
6584         * verify.c (verify_jvm_instructions): Allow exception handler
6585         inside code that is being protected, but generate a warning.
6586         * except.c (link_handler): Initialize `expanded' in new eh_range.
6587         (binding_depth, is_class_level, current_pc): Declare extern.
6588
6589 2002-09-01  Mark Wielaard <mark@klomp.org>
6590
6591         * gcj.texi: Add chapter about system properties.
6592         Fixed some typos.
6593
6594 2002-08-26  Tom Tromey  <tromey@redhat.com>
6595
6596         * parse.y (try_builtin_assignconv): Allow narrowing primitive
6597         conversion if RHS_TYPE is byte, short, or char.
6598
6599 2002-08-22  Tom Tromey  <tromey@redhat.com>
6600
6601         * gcj.texi (Invoking gij): Document -cp and -classpath.
6602
6603 2002-08-21  Tom Tromey  <tromey@redhat.com>
6604
6605         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
6606         $(prefix)/share.  For PR libgcj/7633.
6607
6608         For PR java/6005 and PR java/7611:
6609         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
6610         (java_can_use_bit_fields_p): New function.
6611
6612 2002-08-16  Tom Tromey  <tromey@redhat.com>
6613
6614         * gcj.texi (Class Initialization): Mention class initialization of
6615         arrays.
6616
6617 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
6618
6619         * Make-lang.in (java-tree-inline.o): New.
6620         (JAVA_OBJS): Add java-tree-inline.o.
6621         * parse.y (source_end_java_method): Call java_optimize_inline.
6622         (java_expand_method_bodies): Save method's tree in
6623         DECL_SAVED_TREE.
6624         (add_stmt_to_compound): Keep track of the number of statments.
6625         * lang.c (java_init): Enable flag_inline_trees.
6626         (java_post_options): If flag_inline_functions is on, enable
6627         flag_inline_trees instread.
6628         (decl_constant_value): New.
6629         (java_tree_inlining_walk_subtrees): New.
6630         * java-tree.h (DECL_NUM_STMTS): New macro.
6631         (java_optimize_inline): Declare.
6632         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
6633         Handle a LABEL_EXPR.
6634         * decl.c (build_result_decl): If we already have a DECL_RESULT
6635         don't make another.
6636         (dump_function): New.
6637         (java_optimize_inline): New.
6638         (dump_function): New.
6639
6640 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
6641
6642         For PR java/7483:
6643         * parse.y (build_assertion): Invert return from
6644         desiredAssertionStatus.
6645
6646 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6647
6648         * jcf-write.c (get_access_flags): Return correct access flags for
6649         private and protected inner classes.
6650
6651 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6652
6653         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
6654
6655 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
6656
6657         * mangle_name.c: Don't include obstack.h twice.
6658         * xref.c: Don't include obstack.h.
6659
6660 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
6661
6662         * class.c: (permanent_obstack): Delete declaration.
6663         * constants.c: (permanent_obstack): Delete declaration.
6664         * except.c: (permanent_obstack): Delete declaration.
6665         * expr.c: (permanent_obstack): Delete declaration.
6666         * jcf-parse.c: (permanent_obstack): Delete declaration.
6667         (saveable_obstack): Delete declaration.
6668         * parse.h: (permanent_obstack): Delete declaration.
6669         * typeck.c: (permanent_obstack): Delete declaration.
6670
6671 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6672
6673         * gcj.texi (version-gcc): Increase to 3.3.
6674
6675 2002-07-22  Tom Tromey  <tromey@redhat.com>
6676
6677         * lex.c (java_lex): Check for `e' or `E' after 0.
6678
6679 2002-07-21  Richard Henderson  <rth@redhat.com>
6680
6681         * lang.c (java_unsafe_for_reeval): New.
6682         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
6683
6684 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
6685
6686         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
6687         (jcf_path_init): Use GET_ENVIRONMENT.
6688
6689 2002-07-10  Roger Sayle  <roger@eyesopen.com>
6690             Zack Weinberg <zack@codesourcery.com>
6691
6692         * builtins.c (initialize_builtins): Remove defines that
6693         handled C/C++ specific junk hereby removed from builtins.def.
6694
6695 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
6696
6697         * lang.c (java_post_options): Update prototype.
6698
6699 2002-07-05  Roger Sayle  <roger@eyesopen.com>
6700
6701         * builtins.c (initialize_builtins): Ignore the additional
6702         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
6703         the builtins.def file.
6704
6705 2002-07-01  Tom Tromey  <tromey@redhat.com>
6706
6707         For PR libgcj/7073:
6708         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
6709         specially.
6710
6711 2002-07-01  Roger Sayle  <roger@eyesopen.com>
6712
6713         * java/decl.c (builtin_function): Accept additional parameter.
6714         (java_init_decl_processing): Pass an additional NULL_TREE
6715         argument to builtin_function.
6716
6717 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
6718
6719         * gcj.texi: Fixed gcj invocation example so that it compiles.
6720
6721 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6722
6723         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
6724         * parse.y (mark_parser_ctxt): Likewise.
6725         (check_modifiers, declare_local_variables): Avoid incorrect
6726         hardcoded constant 10.
6727
6728         * lex.c (java_read_char): Avoid "comparison is always true"
6729         warning.
6730
6731 2002-06-25  Andreas Schwab  <schwab@suse.de>
6732
6733         * expr.c (JSR): Avoid undefined operation on PC.
6734
6735 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6736
6737         * decl.c (clear_binding_level): Const-ify.
6738
6739 2002-06-13  Akim Demaille  <akim@epita.fr>
6740
6741         * parse.y (class_declaration, interface_declaration): Make sure
6742         all their rules have an action, in order to avoid meaningless `$$
6743         = $1' and their type clashes.
6744
6745 2002-06-11  Tom Tromey  <tromey@redhat.com>
6746
6747         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
6748         * parse-scan.y (statement_without_trailing_substatement): Added
6749         assert_statement.
6750         (assert_statement): New rule.
6751         * java-tree.h (struct lang_type) [assertions]: New field.
6752         (TYPE_USES_ASSERTIONS): New macro.
6753         (CLASS_USES_ASSERTIONS): Likewise.
6754         (FIELD_SYNTHETIC): New define.
6755         * lex.c (java_lval;): Added ASSERT_TK.
6756         * parse.y (ASSERT_TK): Added.
6757         (statement_without_trailing_substatement): Added assert_statement.
6758         (assert_statement): New rule.
6759         (build_assertion): New function.
6760         (maybe_generate_pre_expand_clinit): Create and initialize
6761         $assertionsDisabled.
6762         (lookup_package_type): Removed decl.
6763         * keyword.h: Rebuilt.
6764         * keyword.gperf (assert): New token.
6765
6766 2002-06-10  Akim Demaille  <akim@epita.fr>
6767
6768         * parse.y (interface_type_list, class_member_declaration)
6769         (unary_expression_not_plus_minus): Remove duplicate %type.
6770         Whitespace changes.
6771
6772 2002-06-09  Tom Tromey  <tromey@redhat.com>
6773
6774         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
6775
6776         * parse.y (method_header): Give error message in all cases.
6777         Fixes PR java/6865.
6778
6779 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6780
6781         Don't use RTL inlining. Fix for PR java/6820.
6782         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
6783         (flag_really_inline): New.
6784         (java_decode_option): Set flag_really_inline if -finline-functions
6785         is seen.
6786         (java_post_options): New function. Turn off inlining unless
6787         flag_really_inline is set.
6788
6789 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6790
6791         * gjavah.c (throwable_p): Accept argument as either a classname or
6792         signature fragment. Create null-terminated classname string for super
6793         when calling itself recursively.
6794         (decode_signature_piece): Skip first character from class name
6795         signature when calling throwable_p.
6796
6797 2002-06-08  H.J. Lu  (hjl@gnu.org)
6798
6799         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
6800
6801 2002-06-04  Tom Tromey  <tromey@redhat.com>
6802
6803         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
6804
6805 2002-06-04  Michael Koch  <konqueror@gmx.de>
6806
6807         * gcj.texi (Input Options): Fixed typo.
6808
6809 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
6810
6811         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
6812         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
6813         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
6814         and all now-pointless local variables.  Rename other local
6815         variables to reflect their not being handles.
6816
6817         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
6818         #if JCF_USE_STDIO blocks.
6819
6820         * parse.y: Add missing semicolon at end of rule.
6821
6822 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
6823
6824         * check-init.c (attach_initialized_static_class): Delete, unused.
6825         * parse.y: Use htab_t instead of struct hashtable, update
6826         all uses.
6827         * java-tree.h: Include hashtab.h instead of hash.h.
6828         (struct lang_decl_func): Use htab_t, set up for gengtype.
6829         (struct init_test_hash_entry): Delete.
6830         (struct treetreehash_entry): New.
6831         (java_treetreehash_find): New
6832         (java_treetreehash_new): New prototype.
6833         (java_treetreehash_create): New prototype.
6834         (java_mark_tree): Delete prototype.
6835         (java_hash_hash_tree_node): Delete prototype.
6836         (java_hash_compare_tree_node): Delete prototype.
6837         (attach_initialized_static_class): Delete prototype.
6838         * expr.c (build_class_init): Update to use java_treetreehash
6839         functions.
6840         (java_expand_expr): Update to use htab_t.
6841         (emit_init_test_initialization): Likewise.
6842         * decl.c (java_mark_tree): Delete.
6843         * class.c (init_test_hash_newfunc): Delete.
6844         (java_hash_hash_tree_node): Delete.
6845         (java_hash_compare_tree_node): Delete.
6846         (add_method_1): Update to use java_treetreehash functions.
6847         (JAVA_TREEHASHHASH_H): New macro.
6848         (java_treetreehash_hash): New function.
6849         (java_treetreehash_compare): New function.
6850         (java_treetreehash_find): New function.
6851         (java_treetreehash_new): New function.
6852         (java_treetreehash_create): New function.
6853         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
6854
6855         * Make-lang.in (java/parse.o): Depend on debug.h.
6856         * java-tree.h (struct lang_identifier): Use gengtype.
6857         (union lang_tree_node): New.
6858         (struct lang_decl_func): Use gengtype.
6859         (struct lang_decl_var): Likewise.
6860         (struct lang_decl): Likewise.
6861         * parse.y: Include debug.h.
6862         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
6863
6864         * lang.c (struct language_function): New dummy structure.
6865
6866         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
6867         descriminator for DECL_LANG_SPECIFIC.
6868         (struct lang_decl_func): Rename from struct lang_decl.
6869         (enum lang_decl_desc): New.
6870         (struct lang_decl): Make it a union.  Update all the accessor macros.
6871         (struct lang_type): Use gengtype.
6872         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
6873         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
6874         are now the same size.
6875         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
6876         use discriminator to mark DECL_LANG_SPECIFIC.
6877
6878         * Make-lang.in (gt-java-builtins.h): New rule.
6879         (java/builtins.o): Add dependency on gt-<filename>.h.
6880         * builtins.c: Use gengtype for roots.
6881         (union string_or_tree): Use gengtype.
6882         (struct builtin_record): Use gengtype.
6883         * config-lang.in (gtfiles): Add builtins.c.
6884
6885         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
6886         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
6887         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
6888         gt-java-parse.h, gtype-java.h): Add rules to generate.
6889         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
6890         (class.o): Add dependency on gt-*.h.
6891         (constants.o): Likewise.
6892         (decl.o): Likewise.
6893         (expr.o): Likewise.
6894         (jcf-parse.o): Likewise.
6895         (jcf-write.o): Likewise.
6896         (lang.o): Likewise.
6897         * config-lang.in (gtfiles): New.
6898         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6899         * constants.c: Replace uses of ggc_add_* with GTY markers.
6900         Include gt-*.h.
6901         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6902         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6903         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
6904         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
6905         Include gt-*.h.
6906         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
6907         Include gt-*.h.
6908         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6909         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
6910         gt-*.h.
6911         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6912         Include gtype-java.h.
6913
6914 2002-06-02  Tom Tromey  <tromey@redhat.com>
6915
6916         Fix for PR java/5913:
6917         * parse.y (patch_binop): Call patch_string on op1.
6918
6919 2002-06-02  Tom Tromey  <tromey@redhat.com>
6920
6921         Fix for PR java/1343, PR java/6336:
6922         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
6923         formatting.  Changed return type.
6924         (anonymous_class_counter): Moved to top of file.
6925         (maybe_make_nested_class_name): Append number to class name for
6926         function-local classes.
6927
6928 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
6929
6930         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
6931         * Make-lang.in: Update dependency lists.
6932
6933 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
6934
6935         * gjavah.c (throwable_p): Do not free the name of the class after
6936         passing it to find_class.
6937         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
6938         * jcf-io.c (dirent.h): Include it.
6939         (fnmatch.h): Likewise.
6940         (compare_path): New function.
6941         (java_or_class_file): Likewise.
6942         (memoized_dirlist_entry): New type.
6943         (memoized_dirlist_lookup_eq): New function.
6944         (memoized_dirlists): New variable.
6945         (caching_stat): New function.
6946         (memoized_class_lookup_eq): New function.
6947         (memoized_class_lookups): Likewise.
6948         (find_class): Use memoized_class_lookups and caching_stat.
6949         * jcf.h (JCF_USE_SCANDIR): Define.
6950         * parse.y (java_expand_classes): Write the class files in reverse
6951         order.
6952
6953 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6954
6955         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
6956
6957 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
6958
6959         * jcf-write.c (write_classfile): Unlink the temporary file if it
6960         cannot be renamed.  Use concat to build up the name of the
6961         temporary file.
6962
6963 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
6964
6965         * jcf-write.c (write_classfile): Write the file to a
6966         temporary file and then rename it.
6967
6968 2002-05-07  Tom Tromey  <tromey@redhat.com>
6969
6970         * gjavah.c (throwable_p): Use xstrdup, not strdup.
6971
6972         Fix for PR java/1200:
6973         * gjavah.c (throwable_p): New function.
6974         (decode_signature_piece): Use it.  A `WeakReference' isn't the
6975         same as a `jweak'.
6976         Include hashtab.h.
6977         (gcjh_streq): New function.
6978
6979 2002-05-07  Andreas Jaeger  <aj@suse.de>
6980
6981         * parse.y (finish_for_loop): Fix if statement.
6982
6983 2002-05-06  Tom Tromey  <tromey@redhat.com>
6984
6985         Fix for PR java/5941:
6986         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
6987         loop update expression.
6988         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
6989         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
6990
6991 2002-05-04  Mark Wielaard  <mark@klomp.org>
6992
6993         For PR java/6519:
6994         * parse.y (build_string_concatenation): Return just op1 only when op2
6995         is null and op1 is a STRING_CST, otherwise always construct a
6996         StringBuffer.
6997
6998 2002-04-27  Tom Tromey  <tromey@redhat.com>
6999
7000         For PR java/6382:
7001         * parse.y (string_convert_int_cst): New function.
7002         (merge_string_cste): Use it.
7003
7004 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7005
7006         * java-tree.h (java_parse_file): Update.
7007         (java_set_yydebug): Remove.
7008         * jcf-parse.c (yydebug): Remove.
7009         (java_set_yydebug): Die.
7010         (java_parse_file): Update.
7011         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7012
7013 2002-04-24  Tom Tromey  <tromey@redhat.com>
7014
7015         For PR java/6425:
7016         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7017         EXPR_WFL_QUALIFICATION of qual_wfl.
7018
7019 2002-04-23  Per Bothner  <per@bothner.com>
7020
7021         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7022         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7023         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7024
7025 2002-04-23  Tom Tromey  <tromey@redhat.com>
7026
7027         For PR java/6314:
7028         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7029         recognize `-fcompile-resource='.
7030         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7031         a bit.
7032
7033 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7034
7035         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7036         paths. Fixes PR java/2791.
7037
7038 2002-04-19  Andrew Haley  <aph@redhat.com>
7039
7040         * jcf-write.c (push_long_const): lo, hi: New variables.
7041         Use rshift_double to extract the high part of a 64-bit long.
7042         Use WORD_TO_INT to extract the low part.
7043
7044         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7045         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7046         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7047
7048 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7049
7050         * typeck.c (incomplete_type_error): Remove.
7051
7052 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7053
7054         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7055         for hash synchronization.
7056         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7057         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7058         class_type_node.
7059
7060 2002-04-16  Mark Wielaard  <mark@klomp.org>
7061
7062         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7063         negative zero.
7064
7065 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7066
7067         Fix for PR java/6294:
7068         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7069         interfaces.
7070
7071 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7072
7073         Fix for PR java/6085:
7074         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7075         to get enclosing "this" argument for inner-class constructor
7076         invocation. Pass correct arguments to build_access_to_thisn.
7077
7078 2002-04-10  Andreas Jaeger  <aj@suse.de>
7079
7080         * gcj.texi (Input Options): Fix extdirs patch.
7081
7082 2002-04-10  Anthony Green  <green@redhat.com>
7083
7084         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7085
7086 2002-04-09  Anthony Green  <green@redhat.com>
7087
7088         * gcj.texi (Input Options): Add --extdirs documentation.
7089         * jcf-dump.c (OPT_extdirs): New macro.
7090         (options): Add extdirs option.
7091         (help): Describe --extdirs.
7092         (main): Handle OPT_extdirs.
7093         * gjavah.c (OPT_extdirs): New macro.
7094         (options): Add extdirs option.
7095         (help): Describe --extdirs.
7096         (main): Handle OPT_extdirs.
7097         * jcf-path.c (jcf_path_init): Add extdirs support.
7098         (jcf_path_extdirs_arg): New function.
7099         (extensions): New variable to hold extensions path entries.
7100         * jvspec.c: Remove -fextdirs= when compiling main().
7101         * lang.c (java_decode_option): Handle -fextdirs=.
7102         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7103         * Make-lang.in: Compile jcf-path with version info for use in
7104         identifying the appropriate libgcj.jar.
7105
7106 2002-04-08  Tom Tromey  <tromey@redhat.com>
7107
7108         For PR libgcj/5303:
7109         * .cvsignore: Added rmic.1 and rmiregistry.1.
7110         * gcj.texi (Top): Link to new nodes.
7111         (Invoking rmic): New node.
7112         (Invoking rmiregistry): Likewise.
7113         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7114         rmiregistry.1.
7115         (java.maintainer-clean): Likewise.
7116         ($(srcdir)/java/rmic.1): New target.
7117         ($(srcdir)/java/rmiregistry.1): Likewise.
7118         (java.install-man): Handle rmic.1 and rmiregistry.1.
7119
7120 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7121
7122         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7123         Add note about handling uncaught exceptions. Add an exception handler
7124         to example.
7125
7126 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7127
7128         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7129         after using it to patch CALL_EXPR.
7130
7131 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7132
7133         * gcj.texi (Invocation): Document CNI invocation API.
7134
7135 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7136
7137         * expr.c (truthvalue_conversion): Rename.  Update.
7138         (expand_compare): Update.
7139         * java-tree.h (java_truthvalue_conversion): New.
7140         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7141
7142 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7143
7144         * java-tree.h (java_mark_addressable): New.
7145         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7146         * typeck.c (mark_addressable): Rename, update.
7147
7148 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7149
7150         * expr.c (build_java_binop): Update.
7151         * java-tree.h (java_signed_type, java_unsigned_type,
7152         java_signed_or_unsigned_type): Update.
7153         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7154         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7155         * parse.y (patch_binop): Update.
7156         * typeck.c (signed_or_unsigned_type, unsigned_type,
7157         signed_type): Update.
7158
7159 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7160
7161         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7162         (java_dummy_print): Remove.
7163         (lang_print_error): Rename.  Exit early if inhibiting output.
7164         (inhibit_error_printing_function): New.
7165         (java_init): Don't set hook.
7166         (lang_init_source): Use new boolean.
7167
7168 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7169
7170         * parse.y (do_resolve_class): Fix infinite recursion.
7171
7172 2002-03-29  Tom Tromey  <tromey@redhat.com>
7173
7174         * parse.y (check_inner_circular_reference): Ignore incomplete
7175         types.
7176
7177 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7178
7179         * Make-lang.in (builtins.o): Update.
7180         * boehm.c (get_boehm_type_descriptor): Update.
7181         * builtins.c: Include langhooks.h.
7182         * decl.c (java_init_decl_processing): Update.
7183         * java-tree.h (java_type_for_mode, java_type_for_size): New.
7184         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7185         Redefine.
7186         * typeck.c (type_for_mode, type_for_size): Update.
7187
7188 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7189
7190         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7191
7192 2002-03-28  Tom Tromey  <tromey@redhat.com>
7193
7194         * except.c (expand_end_java_handler): If the handler type is NULL,
7195         use java.lang.Throwable.  Fixes PR java/5986.
7196
7197 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7198
7199         Fix for PR java/4715:
7200         * jcf-parse.c (parse_source_file_3): New function.
7201         (read_class): Call it.
7202         (java_parse_file): Likewise.
7203
7204 2002-03-28  Jan Hubicka  <jh@suse.cz>
7205
7206         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7207
7208 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7209
7210         * parse.y (resolve_package): Initialize "decl".
7211         (lookup_package_type): Remove unused function.
7212
7213 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7214
7215         Fix for PR java/5993:
7216         * parse.y (resolve_package): Return the decl if resolution was
7217         successful. Don't special case "java.lang" and "java.lang.reflect"
7218         packages. Set type_name to the merged identifier.
7219         (resolved_qualified_expression_name): Print error using "name" if
7220         resolve_package returns NULL_TREE.
7221
7222 2002-03-27  Tom Tromey  <tromey@redhat.com>
7223
7224         * expr.c (expand_invoke): Don't generate null pointer check if
7225         we're calling <init>.
7226
7227 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7228
7229         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7230         fix prototype.
7231         * java-tree.h (java_lang_expand_expr): Similarly.
7232         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7233         (java_init): Don't set hook.
7234
7235 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7236
7237         Fix for PR java/5850:
7238         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7239         context if field was not found in the current scope.
7240         * expr.c (lookup_field): Don't look in enclosing contexts.
7241
7242 2002-03-26  Tom Tromey  <tromey@redhat.com>
7243
7244         Fix for PR java/5942:
7245         * parse.y (init_src_parse): Added sanity check.
7246         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7247         elements, not 11.
7248
7249 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7250
7251         * decl.c (lang_mark_tree): Rename java_mark_tree.
7252         * java-tree.h (java_mark_tree): New.
7253         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7254
7255 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
7256
7257         * lex.c: Change java_perform_atof to take normal parameters
7258         instead of a pointer to a parameter block.  Call it directly
7259         from java_lex.
7260
7261 2002-03-22  Mark Wielaard  <mark@klomp.org>
7262
7263         Fix for PR java/5368:
7264         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7265         when printing error message.
7266
7267 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7268
7269         * decl.c (maybe_build_cleanup): Remove.
7270
7271 2002-03-22  Tom Tromey  <tromey@redhat.com>
7272
7273         Andrew Haley  <aph@cambridge.redhat.com>
7274
7275         * expr.c (build_field_ref): Don't build a check if the field is a
7276         member of `this'.
7277
7278 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
7279
7280         Fix for PR java/6026:
7281         * lex.c (java_lex): Fix parsing of consecutive floats.
7282
7283 2002-03-21  Tom Tromey  <tromey@redhat.com>
7284
7285         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7286         class.
7287
7288 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7289
7290         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7291         insert_block, getdecls, kept_level_p, global_bindings_p): New.
7292
7293 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7294
7295         * gcj.texi: @code{gcj} becomes @command{gcj}.
7296         @code{gcc} becomes @command{gcc}.
7297         GcjRaw changed to gnu.gcc.RawData.
7298
7299 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7300
7301         * decl.c (start_java_method): Use new hook.
7302         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7303         (java_init): Remove old hook.
7304
7305 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7306
7307         * builtins.c (define_builtin): Do nothing if `type' is null.
7308         Fixes PR java/5876.
7309
7310 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7311
7312         * parse.y (parser_check_super_interface): Fix error message
7313         grammar/order.
7314
7315 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7316
7317         * jcf-parse.c (get_constant): Delete unused variables.
7318
7319 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7320
7321         * java-tree.h (java_parse_file): New.
7322         * jcf-parse.c (yyparse): Rename java_parse_file.
7323         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7324
7325 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7326
7327         * parse.y (craft_constructor): Return the constructor decl.
7328         (java_expand_classes): Update comments.
7329         (lookup_method_invoke): Call fix_constructors immediately for
7330         anonymous class. Fixes PR java/5935.
7331
7332 2002-03-15  Anthony Green  <green@redhat.com>
7333
7334         * jcf-parse.c (yyparse): Don't emit class registration
7335         constructor when compiling resource files.
7336
7337 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7338
7339         * lang.c (java_tree_code_type, java_tree_code_length,
7340         tree_code_name): Delete.
7341         (tree_code_type, tree_code_length, tree_code_name): Define.
7342         (java_init): Don't try to copy into the various tree_code
7343         arrays.
7344
7345 2002-03-12  Tom Tromey  <tromey@redhat.com>
7346
7347         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7348         UTF-8, not UCS-2.  Fixes PR java/5923.
7349
7350         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7351         a call_expr wrapped in a convert.  Fixes PR java/5848.
7352
7353 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7354
7355         * jcf-write.c (write_classfile): Improve error strings.
7356
7357 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7358
7359         * lex.c: Adjust comments to GNU standards.
7360
7361 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7362
7363         Fix for PR java/5902:
7364         * lex.c (java_lex): Fix parsing of literals.
7365
7366 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7367
7368         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
7369         to prevent it getting evaluated twice in the store checking case.
7370         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
7371         examining OBJECT.
7372
7373 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7374
7375         * decl.c (java_init_decl_processing): Make sure class_type_node
7376         alignment is not less than 64 bits if hash synchronization is enabled.
7377
7378 2002-03-08  Per Bothner  <per@bothner.com>
7379
7380         * parse.y (java_complete_lhs):  Check if patch_assignment
7381         returned an error-mark.
7382
7383         * parse.y (try_builtin_assignconv):  Don't special-case zero.
7384
7385 2002-03-08  Per Bothner  <per@bothner.com>
7386
7387         Fix for PR java/5812.
7388         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
7389         here instead of in JSR macro.  Likewise with load_type_state call.
7390         Do the latter on if the return_pc has been verified (the jsr returns).
7391         (JSR):  Now just call build_java_jsr.
7392
7393 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
7394
7395         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7396         (java.install-common): Link native driver to
7397         JAVA_TARGET_INSTALL_NAME.
7398
7399 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
7400
7401         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7402         * builtins.c(sin_builtin): Likewise
7403         * builtins.c(sqrt_builtin): Likewise
7404
7405 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
7406
7407         * java/expr.c, java/jcf-parse.c, java/lex.c:
7408         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
7409         REAL_ARITHMETIC blocks unconditional.  Delete some further
7410         #ifdef blocks predicated on REAL_ARITHMETIC.
7411
7412 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7413
7414         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
7415         explicit sizeof/sizeof.
7416         * decl.c (java_init_decl_processing): Likewise.
7417         * jcf-parse.c (init_jcf_parse): Likewise.
7418         * parse.y (init_src_parse): Likewise.
7419
7420 2002-03-02  Per Bothner  <per@bothner.com>
7421
7422         Make --CLASSPATH by a synonym for --classpath and -classpath.
7423         Implement --bootclasspath.
7424         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
7425         (classpath_l):  Remove.
7426         (jcf_path_CLASSPATH_arg):  Remove.
7427         (jcf_path_bootclasspath_arg):  New function.
7428         (jcf_path_seal):  Simplify accordingly.
7429
7430         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
7431         (jcf_path_CLASSPATH):  Remove declaration.
7432         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
7433         (lang_specific_driver):  Translate -bootclasspath.
7434         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
7435         * lang.c (decode_lang_options):  Do jcf_path_init first.
7436         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
7437         * gjavah.c:  Also handle --bootclasspath.
7438         Handle --CLASSPATH as a synonum for --classpath.
7439         * jcf-dump.c: Likewise.
7440
7441         "." is not part of system path, but is the default for --classpath.
7442         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
7443         (jcf_path_seal):  Add "." if no CLASSPATH specified.
7444
7445         * gcj.texi:  Document changes.
7446
7447 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7448
7449         * expr.c (build_java_arraystore_check): Fix formatting.
7450
7451 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7452
7453         Fix for PR java/5758, java/5632:
7454         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
7455         inner-class separator too.
7456         * parse.y (do_resolve_class): New local `decl_result.'
7457         Progressively build a name for what can have been loaded.
7458
7459 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7460
7461         * expr.c (java_array_data_offset): Removed function.
7462         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
7463         (build_java_array_length_access): Obtain "length" value using a
7464         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
7465         (build_java_arrayaccess): Correct comment. Access "data" using a
7466         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
7467         (build_java_arraystore_check): New function.
7468         (expand_java_arraystore): Use build_java_arraystore_check.
7469         * parse.y (patch_assignment): Simplify code to insert a store check
7470         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
7471         * check-init.c (check_init): Update to reflect that an array length
7472         access is now a COMPONENT_REF.
7473         * gcj.texi (Code Generation): Improve documentation of
7474         -fno-bounds-check. Add documentation for -fno-store-check.
7475         * java-tree.h (flag_store_check): Declare.
7476         (build_java_arraystore_check): Declare.
7477         * lang.c (flag_store_check): Initialize to 1.
7478         (lang_f_options): Add store-check option.
7479         * jvspec.c: Don't pass store-check option to jvgenmain.
7480         * lang-options.h: Add help string for -fno-store-check.
7481
7482 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
7483
7484         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
7485         * java-tree.h (java_dup_lang_specific_decl): New.
7486         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7487
7488 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
7489
7490         * builtins.c, decl.c: Delete traditional-mode-related code
7491         copied from the C front end but not used, or used only to
7492         permit the compiler to link.
7493
7494 2002-02-22  Tom Tromey  <tromey@redhat.com>
7495
7496         Fix for PR java/2369:
7497         * jvspec.c (verify_class_name): New function.
7498         (lang_specific_driver): Call it.
7499         (JAVA_START_CHAR_P): New macro.
7500         (JAVA_PART_CHAR_P): Likewise.
7501
7502 2002-02-22  Per Bothner  <per@bothner.com>
7503
7504         * class.c:  Change vtable to be more compatible with g++ v3 abi.
7505         (get_dispatch_table):  Prepend offset-to-top (always 0) and
7506         type_info pointer (currently unimplemented hence NULL) to vtable.
7507         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
7508         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
7509         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
7510         (build_dtable_decl):  Add declarations for new fields.
7511
7512 2002-02-20  Per Bothner  <per@bothner.com>
7513
7514         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
7515         to finit$ (otherwise generate_bytecode_insns drops it). However, we
7516         don't need to set it on the COMPOUND_EXPR - the caller does that.
7517
7518 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7519
7520         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
7521         `--CLASSPATH' becomes `--classpath.'
7522         * gjavah.c: Likewise.
7523         * jcf-dump.c: Likewise.
7524         * lang-options.h: Likewise.
7525         * lang.c: Likewise.
7526         * jcf-path.c: Updated comment.
7527         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
7528         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
7529         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
7530         (jcf_path_CLASSPATH_arg): Ditto.
7531         (classpath_u): Updated leading comment.
7532
7533 2002-02-20  Per Bothner  <per@bothner.com>
7534
7535         * builtins.c (check_for_builtin):  New function.
7536         (build_call_or_builtin):  Remove.
7537         * java-tree.h:  Update accordingly.
7538         * expr.c (expand_invoke):  Use build + check_for_builtin instead
7539         of build_call_or_builtin.
7540         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
7541         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
7542         flag (which had caused jcf-write to incorrectly emit invokevirtual).
7543
7544 2002-02-17  Tom Tromey  <tromey@redhat.com>
7545
7546         * java-tree.h (TYPE_STRICTFP): New macro.
7547         (struct lang_type) [strictfp]: New field.
7548         (CLASS_STRICTFP): New macro.
7549         (METHOD_STRICTFP): New macro.
7550         (struct lang_decl) [strictfp]: New field.
7551         * parse.y (method_header): Disallow strictfp constructor or
7552         abstract method.
7553         (STRICT_TK): Move before MODIFIER_TK.
7554         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
7555         (METHOD_MODIFIERS): Likewise.
7556         (INTERFACE_MODIFIERS): Likewise.
7557         * jcf-write.c (get_access_flags): Likewise.
7558         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
7559         (add_method_1): Likewise.
7560         (get_access_flags_from_decl): Likewise.
7561         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
7562         recognize strictfp flag.
7563         * jcf.h (ACC_STRICT): New define.
7564
7565 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
7566
7567         * class.c(build_utf8_ref): Move declaration of decl_size
7568
7569 2002-02-07  Tom Tromey  <tromey@redhat.com>
7570
7571         * gcj.texi (Input Options): --CLASSPATH does not suppress system
7572         path.
7573
7574 2002-02-04  Anthony Green  <green@redhat.com>
7575
7576         * class.c (build_utf8_ref): Put UTF-8 constants into merged
7577         sections if available.
7578
7579 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7580
7581         * parse.y (java_expand_classes): Fix typo in static field loop.
7582
7583 2002-02-02  Richard Henderson  <rth@redhat.com>
7584
7585         * class.c (add_field): Mark static fields external.
7586         (build_class_ref): Remove redundant set.
7587         * parse.y (java_expand_classes): Mark static fields of classes
7588         to be compiled as local.
7589         * jcf-parse.c (parse_class_file): Likewise.
7590
7591 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7592
7593         * gcj.texi (About CNI): New node.
7594
7595 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7596
7597         PR java/5080
7598         * jcf-parse.c : Check for HAVE_LOCALE_H before using
7599         setlocale() with LC_CTYPE as a parameter.
7600         * jv-scan.c: Same.
7601
7602 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
7603
7604         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7605         Follow GNU Coding Standards for --version.
7606
7607 2002-01-28  Tom Tromey  <tromey@redhat.com>
7608
7609         * expr.c (build_jni_stub): Ensure storage for `meth' is
7610         generated.
7611         * parse.y (java_complete_expand_methods): Set
7612         current_function_decl before building JNI stub.
7613
7614 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
7615
7616         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
7617         BUILT_IN_SQRTF.
7618
7619 2002-01-22  Tom Tromey  <tromey@redhat.com>
7620
7621         * decl.c (java_init_decl_processing): Use add_predefined_file.
7622         Predefine RawData.java.
7623         (predef_filenames): Removed.
7624         (java_init_decl_processing): Don't register predef_filenames.
7625         * jcf-parse.c (add_predefined_file): New function.
7626         (predefined_filename_p): Rewrote.
7627         (predefined_filename_p): No longer static.
7628         * decl.c (java_init_decl_processing): Call initialize_builtins.
7629         * Make-lang.in (JAVA_OBJS): Added builtins.o.
7630         (java/builtins.o): New target.
7631         * builtins.c: New file.
7632         * parse.y (patch_invoke): Use build_call_or_builtin.
7633         * java-tree.h (build_call_or_builtin): Declare.
7634         (initialize_builtins): Declare.
7635         (java_set_exception_lang_code): Removed unused declaration.
7636         (PREDEF_FILENAMES_SIZE): Removed.
7637         (java_tree_index): Added JTI_PREDEF_FILENAMES.
7638         (predef_filenames): New define.
7639         (add_predefined_file): Declare.
7640         (predefined_filename_p): Declare.
7641         * expr.c (expand_invoke): Use build_call_or_builtin.
7642
7643 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7644
7645         * parse.y (patch_switch_statement): Fix format specifier.
7646
7647 2002-01-16  Tom Tromey  <tromey@redhat.com>
7648
7649         More for PR java/5365:
7650         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
7651         default.
7652         (process_file): Generate include for
7653         java.lang.UnsupportedOperationExceptions.
7654
7655 2002-01-15  Andreas Jaeger  <aj@suse.de>
7656
7657         * .cvsignore: Add man pages.
7658
7659 2002-01-15  Tom Tromey  <tromey@redhat.com>
7660
7661         Fix for PR java/5365:
7662         * gjavah.c (process_file): Turn class name into a file name.
7663
7664 2002-01-14  Matthias Klose  <doko@debian.org>
7665
7666         * gcj.texi: Fix whitespace and formatting errors in the
7667         synopsis of the man pages. Update copyright.
7668
7669 2002-01-14  Tom Tromey  <tromey@redhat.com>
7670
7671         For PR libgcj/5303:
7672         * Make-lang.in (java.install-man): Handle jv-convert man page.
7673         (java.generated-manpages): Added jv-convert.1.
7674         (java.uninstall): Remove jv-convert.1.
7675         (java.maintainer-clean): Likewise.
7676         ($(srcdir)/java/jv-convert.1): New target.
7677         * gcj.texi (Top): Link to jv-convert node.
7678         (Individual utilities): Likewise.
7679         (Invoking jv-convert): New node.
7680
7681 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
7682             Martin Kahlert  <martin.kahlert@infineon.com>
7683
7684         * jcf-parse.c (get_constant): Don't swap lo/hi for big
7685         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
7686
7687 2002-01-03  Graham Stott  <grahams@redhat.com>
7688
7689         * class.c (compile_resource_file): Update copyright date.
7690         Constify filename parameter.
7691         (java-tree.h): Update copyright date.
7692         (compile_resource_file): Constify filename parameter.
7693
7694 2002-01-03  Graham Stott  <grahams@redhat.com>
7695
7696         * gcc/jcf-parse.c: Update copyright date.
7697         (yyparse): Constify resource_filename.
7698
7699 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7700
7701         * parse.y (src_parse_roots): Don't needlessly zero init.
7702
7703 2001-12-31  Tom Tromey  <tromey@redhat.com>
7704
7705         * parse.y (dump_java_tree): New function.
7706         (source_end_java_method): Call it.
7707         (end_class_declaration): Likewise.
7708         * lang.c (java_decode_option): Call dump_switch_p.
7709
7710 2001-12-28  Tom Tromey  <tromey@redhat.com>
7711
7712         * gen-table.pl: Don't process characters after \uffff.  Added
7713         comment pointing to input file.
7714
7715 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7716
7717         * gen-table.pl: Const-ify output.  Document the location of a
7718         suitable unicode input file.
7719
7720         * chartables.h: Regenerate.
7721
7722 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7723
7724         * chartables.h: Const-ify.
7725         * gjavah.c (options): Likewise.
7726         * jcf-dump.c (options): Likewise.
7727         * jv-scan.c (options): Likewise.
7728         * lex.c (java_start_char_p, java_part_char_p): Likewise.
7729         * parse.y (binop_lookup): Likewise.
7730
7731 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7732
7733         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
7734         the static arrays that are output.
7735         * jvspec.c (jvgenmain_spec): Make static.
7736         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
7737         * keyword.h: Regenerate.
7738         * lang.c (string_option, process_option_with_no, lang_f_options,
7739         lang_W_options): Const-ify.
7740         * lex.c (java_lex): Likewise.
7741
7742 2001-12-21  Richard Henderson  <rth@redhat.com>
7743
7744         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
7745         (get_boehm_type_descriptor): ... here.  Arrange for the
7746         TREE_TYPE to get set properly.
7747
7748 2001-12-21  Richard Henderson  <rth@redhat.com>
7749
7750         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
7751         only if the target requires collect2.
7752
7753         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
7754
7755 2001-12-20  Tom Tromey  <tromey@redhat.com>
7756
7757         For PR java/4509:
7758         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
7759         CAN_COMPLETE_NORMALLY for the node.
7760         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
7761         generate code for second branch if first branch can't complete
7762         normally.
7763         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
7764         the loop head if the loop body can't complete normally.
7765
7766 2001-12-20  Tom Tromey  <tromey@redhat.com>
7767
7768         For PR java/4766:
7769         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
7770         case where `finally' clause can't complete normally.
7771
7772 2001-12-20  Tom Tromey  <tromey@redhat.com>
7773
7774         Fixes PR java/5057:
7775         * parse.y (analyze_clinit_body): Added this_class parameter.
7776         Check for more cases where we must keep <clinit>.
7777         (maybe_yank_clinit): Cleaned up flow control.
7778
7779 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7780
7781         * decl.c (java_init_decl_processing): Don't initialize
7782         finit_leg_identifier_node.
7783         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
7784         (finit_leg_identifier_node): Remove.
7785         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
7786
7787 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7788
7789         * mangle.c (mangle_member_name): Don't special-case for
7790         NO_DOLLAR_IN_LABEL.
7791         * mangle_name.c (unicode_mangling_length): Likewise.
7792         (append_unicode_mangled_name): Likewise.
7793         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
7794         code.
7795
7796 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7797
7798         * expr.c (build_java_array_length_access): Don't force null pointer
7799         check unless flag_check_references is set.
7800
7801 2001-12-20  Tom Tromey  <tromey@redhat.com>
7802
7803         Fix for PR java/3417:
7804         * parse.y (patch_assignment): Added special processing for
7805         `return'.
7806         (patch_return): Don't convert booleans to integers, and don't
7807         special-case `null'.
7808
7809 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
7810
7811         * config-lang.in (diff_excludes): Remove.
7812
7813 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
7814
7815         * gcj.texi: Update link to GCC manual.
7816
7817 2001-12-17  Tom Tromey  <tromey@redhat.com>
7818
7819         * parse.y (link_nested_class_to_enclosing): Removed useless
7820         statement.
7821
7822 2001-12-16  Tom Tromey  <tromey@redhat.com>
7823
7824         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
7825         Fixes PR java/5088.
7826
7827 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
7828
7829         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
7830         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
7831         spelling errors.
7832
7833 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7834
7835         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
7836
7837 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7838
7839         * decl.c (java_init_decl_processing): Build otable_type correctly.
7840         otable_decl is an otable_type.
7841
7842 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7843
7844         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
7845         otable_type, otable_ptr_type, method_symbol_type,
7846         method_symbols_array_type, method_symbols_array_ptr_type): New
7847         field/global tree definitions.
7848         (flag_indirect_dispatch): New flag.
7849         * decl.c (java_init_decl_processing): Initialize new otable and
7850         otable_syms type nodes and decls. Add new field "index" to
7851         method_type_node.
7852         * class.c (build_method_symbols_entry): New function.
7853         (make_method_value): Set "index" to to method's vtable index for
7854         virtual methods when indirect-dispatch is not used.
7855         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
7856         and set vtable_method_count to -1. Set otable and otable_syms field
7857         if indirect-dispatch is used and there was something to put in them.
7858         (build_method_symbols_entry): New function.
7859         (emit_offset_symbol_table): New function.
7860         * expr.c (get_offset_table_index): New function.
7861         (build_invokevirtual): Build array reference to otable at the index
7862         returned by get_offset_table_index, and use the result as the vtable
7863         offset.
7864         (build_invokeinterface): Similar.
7865         * jcf-parse.c (yyparse): If indirect-dispatch, call
7866         emit_offset_symbol_table at the end of compilation, after all classes
7867         have been generated.
7868         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
7869         * lang.c (flag_indirect_dispatch): Define.
7870         (lang_f_options): Add indirect-dispatch flag.
7871
7872 2001-12-14  Matthias Klose  <doko@debian.org>
7873
7874         * gcj.texi: Markup for man page generation. Document missing
7875         options printed by <tool> --help.
7876         Terminate description of gij's -ms option with a dot.
7877         * Make-lang.in ($(srcdir)/java/*.1): New targets.
7878         (java.generated-manpages java.install-man, java.uninstall,
7879         java-maintainer-clean) Updated.
7880
7881 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
7882
7883         * class.c (get_dispatch_table): Fix java vtable layout
7884         for TARGET_VTABLE_USES_DESCRIPTORS.
7885         * decl.c (java_init_decl_processing): Initialize
7886         alloc_no_finalizer_node, finalize_identifier_node.
7887         * expr.c (class_has_finalize_method): New function.
7888         (expand_java_NEW): Generate calls for finalizer-free allocation.
7889         (build_invokevirtual): Fix java vtable layout for
7890         TARGET_VTABLE_USES_DESCRIPTORS.
7891         * java-tree.h (enum java_tree_index): New entries:
7892         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
7893         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
7894         (class_has_finalize_method): declare.
7895         (HAS_FINALIZER_P): New macro.
7896         * parse.y (patch_invoke): Generate calls for finalizer-free
7897         allocation.
7898
7899 2001-12-12  Matthias Klose  <doko@debian.org>
7900
7901         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
7902         whitespace at end of line.
7903
7904 2001-12-11  Tom Tromey  <tromey@redhat.com>
7905
7906         * lex.c (java_init_lex): Define wfl_to_string as
7907         gnu.gcj.runtime.StringBuffer unless generating bytecode.
7908
7909 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
7910
7911         * class.c (make_method_value): Use null_pointer_node to
7912         represent empty exception table.
7913
7914 2001-12-10  Tom Tromey  <tromey@redhat.com>
7915
7916         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
7917
7918 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
7919
7920         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
7921
7922 2001-12-09  Per Bothner  <per@bothner.com>
7923
7924         * check-init.c (current_switch_has_default):  New static field.
7925         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
7926         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
7927         DEFAULT_EXPR seen, simulate a default alternative that copies state.
7928
7929 2001-12-09  Tom Tromey  <tromey@redhat.com>
7930
7931         * check-init.c (check_init): Don't allow pre- or post- increment
7932         or decrement of final variable.
7933         (final_assign_error): Minor error message rewording.
7934
7935 2001-12-08  Tom Tromey  <tromey@redhat.com>
7936
7937         * java-tree.h: Fixed typo.
7938
7939         * gjavah.c (decompile_method): Don't decompile to `return this'
7940         for static methods.
7941
7942         * gjavah.c (cxx_keywords): Re-sorted.
7943         * lex.c (cxx_keywords): Re-sorted.
7944
7945         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
7946         else.
7947
7948         * gjavah.c (print_namelet): Clear subnamelets.
7949         (HANDLE_METHOD): Set `method_printed' earlier.
7950
7951 2001-12-07  Tom Tromey  <tromey@redhat.com>
7952
7953         * lang.c (lang_f_options): Added
7954         optimize-static-class-initialization.
7955         (java_decode_option): Removed special case.
7956
7957 2001-12-07  Per Bothner  <per@bothner.com>
7958
7959         * check-init.c (check_init):  Fix typo freeing memory twice.
7960
7961 2001-12-05  Per Bothner  <per@bothner.com>
7962
7963         Restore support for static class initialization optimization.
7964         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
7965         * check-init.c (check_int):  At end of BLOCK handle initialization
7966         blocks, which used to be done in java_complete_expand_method but did
7967         not handle the case where check_for_initialization might allocate
7968         more than a word of bits.
7969         * decl.c (lang_make_tree):  The smic field is now a tree.
7970         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
7971         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
7972
7973         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
7974
7975         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
7976         Change from a hash table to a list.
7977         (struct_lang_decl):  Change field 'smic' to match.
7978         * class.c (add_method_1):  Initialize
7979         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
7980         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
7981         (java_expand_method_bodies): -here, since 'smic' is now a list.
7982         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
7983
7984         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
7985
7986         * class.c (java_hash_compare_tree_node):  Fix casts.
7987
7988 2001-12-04  Per Bothner  <per@bothner.com>
7989
7990         * check-init.c:   Handle definite unassignment to finals in addition
7991         to definite assignment.
7992         (loop_current_locals):  New field.
7993         (num_current_locals, int start_current_locals, num_current_words):
7994         Make static.
7995         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
7996         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
7997         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
7998         (get_variable_decl, check_final_reassigned):  New functions.
7999         (check_init, check_bool_init):  Modify as needed for checking finals.
8000         (check_for_initialization):  Take extra parameter and return void.
8001         Do extra start-up logic to check final fields for assignment.
8002         * parse.y (check_static_final_variable_assignment_flag,
8003         reset_static_final_variable_assignment_flag, check_final_assignment,
8004         check_final_variable_local_assignment_flag,
8005         reset_final_variable_indirect_assignment_flag,
8006         reset_final_variable_global_assignment_flag):  Remove functions.
8007         (java_complete_expand_methods, outer_field_access_fix,
8008         patch_assignment): Remove no-longer used logic.
8009         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8010         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8011
8012         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8013         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8014         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8015
8016         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8017
8018         * java-tree.h (DECL FINAL):  New bit-field.
8019         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8020         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8021         (DECL_INIT_CALLS_THIS):  New macro.
8022         (struct lang_decl):  New bit-field init_calls_this.
8023         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8024         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8025         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8026         use it for both local variables and final fields.
8027         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8028         and local_final.
8029         (struct lang_type):  Remove hfv bit-field.
8030         (check_for_initialization):  Change to return void.
8031
8032         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8033         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8034         * check-init.c (final_assign_error):  New helper function.
8035         (check_final_reassigned, check_init):  Use it.
8036         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8037
8038         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8039         bit-fields to unsigned.
8040
8041 2001-12-03  Per Bothner  <per@bothner.com>
8042
8043         * parse.y (patch_binop):  Minor constant folding.
8044
8045         * parse.y (build_current_thisn):  Shorter 'buffer'.
8046
8047 2001-12-03  Per Bothner  <per@bothner.com>
8048
8049         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8050         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8051         * jcf-write.c (generate_bytecode_insns):  Remove support for
8052         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8053         * check-init.c (check_init):  Likewise.
8054
8055 2001-12-03  Per Bothner  <per@bothner.com>
8056
8057         * verify.c (subroutine_nesting):  New function.
8058         (verify_jvm_instructions):  Use it to fix logic for checking that
8059         we're done with the current subroutine.
8060
8061         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8062         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8063
8064 2001-12-03  Per Bothner  <per@bothner.com>
8065
8066         * jcf.h:  Fix obvious typo in comment.
8067         * typeck.c (build_null_signature):  Add comment.
8068
8069 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8070
8071         * expr.c: Remove leading capital from diagnostic messages, as
8072         per GNU coding standards.
8073         * jcf-io.c: Similarly.
8074         * jcf-parse.c: Similarly.
8075         * jv-scan.c: Similarly.
8076         * jvspec.c: Similarly.
8077         * mangle.c: Similarly.
8078
8079 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8080             Alexandre Petit-Bianco  <apbianco@redhat.com>
8081
8082         * expr.c (build_java_arrayaccess): Call save_expr on array for
8083         correct evaluation order, modified comment, fixed indentation.
8084         * parse.y: (patch_assignment): Correctly extract the array base
8085         from the tree generate by build_java_arrayaccess, added comments.
8086         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8087         Fixes PR java/3096, PR java/3803, PR java/3965.
8088
8089 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8090
8091         * expr.c (expand_byte_code): Remove trailing periods from messages.
8092         * jcf-parse.c (load_class, jcf_parse): Similarly.
8093         * jcf-write.c (generate_classfile): Similarly.
8094         * lex.c (java_lex): Similarly.
8095
8096 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8097
8098         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8099
8100 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8101
8102         * Make-lang.in (java.generated-manpages): New dummy target.
8103
8104 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8105
8106         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8107         ASM_FINAL_SPEC.
8108         (lang_specific_pre_link): Use set_input to set input_filename.
8109         Append `main' here.
8110         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8111         (main): Fix definition.
8112         Strip `main' from classname.
8113         Fixes PR java/227.
8114
8115 2001-11-18  Roger Sayle <roger@eyesopen.com>
8116
8117         * parse.h (java_expand_switch): Remove old prototype.
8118
8119 2001-11-18  Tom Tromey  <tromey@redhat.com>
8120
8121         Fix for PR java/1401:
8122         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8123         arg0 is null.
8124         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8125         correctly.
8126
8127 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8128
8129         * lang.c (finish_parse): Rename to java_finish.
8130         (LANG_HOOKS_FINISH, java_finish): New.
8131
8132 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8133
8134         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8135         * java-tree.h: New prototype.
8136         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8137
8138 2001-11-13  Tom Tromey  <tromey@redhat.com>
8139
8140         * gjavah.c (method_signature): New global.
8141         (HANDLE_METHOD): Set it.
8142         (decompile_return_statement): New function.
8143         (decompile_method): Use it.
8144         (print_method_info): Removed `synth' argument.
8145
8146 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8147
8148         * java-tree.h (java_set_yydebug): New.
8149         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8150         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8151         (print_lang_decl, print_lang_type, print_lang_identifier,
8152         print_lang_statistics, lang_print_xnode): Remove.
8153
8154 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8155
8156         * jcf-parse.c (init_lex): Remove.
8157         * lang.c (language_string, lang_identify): Remove.
8158         (struct lang_hooks): Constify.
8159         (LANG_HOOKS_NAME): Override.
8160         (init_parse): Update.
8161
8162 2001-11-08  Andreas Franck  <afranck@gmx.de>
8163
8164         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8165         program_transform_name the way suggested by autoconf.
8166         (java.install-common): Also transform auxiliary program names with
8167         program_transform_name.
8168
8169 2001-11-08  Tom Tromey  <tromey@cygnus.com>
8170
8171         * parse.y (trap_overflow_corner_case): New rule.
8172         (unary_expression): Use it.
8173         * lex.c (java_init_lex): Don't set minus_seen.
8174         (yylex): Don't use minus_seen.  Communicate overflow to parser for
8175         it to handle.
8176         (error_if_numeric_overflow): New function.
8177         * parse.h (minus_seen): Removed field.
8178         (JAVA_RADIX10_FLAG): New define.
8179
8180 2001-11-07  Tom Tromey  <tromey@redhat.com>
8181
8182         Patch for PR java/1414:
8183         * parse.y (case_label_list): New global.
8184         (goal): Register case_label_list with GC.
8185         (java_complete_lhs): Save new case on case_label_list.
8186         (patch_switch_statement): Check for duplicate case labels.
8187
8188 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8189
8190         * parse.y (patch_assignment): Removed unused third argument.
8191         (java_complete_lhs): Removed unused third argument to patch_assignment.
8192
8193 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8194
8195         * lang.c: Include langhooks-def.h.
8196         * Make-lang.in: Update.
8197
8198 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8199
8200         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8201
8202 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8203
8204         * mangle.c (find_compression_record_match): Don't match compression
8205         records for package name elements unless they occur at the start of
8206         the name. Fix for PR java/4717.
8207
8208 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8209
8210         * expr.c (expand_java_field_op): Don't special-case references to
8211         java.lang.PRIMTYPE.TYPE.
8212         (build_primtype_type_ref): Removed.
8213         * java-tree.h (build_primtype_type_ref): Remove prototype.
8214         * parse.y (maybe_build_primttype_type_ref): Removed.
8215         (complete_function_arguments): Don't special-case references to
8216         java.lang.PRIMTYPE.TYPE.
8217         (patch_assignment): Likewise.
8218         (array_constructor_check_entry): Likewise.
8219
8220 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8221
8222         * mangle.c (static tree compression_table): Fixed leading comment.
8223         * parse.h (struct parser_ctxt): Fixed field comment.
8224         * parse.y (check_pkg_class_access): New prototype, fixed leading
8225         comment, new parameter used to emit error only if passed as true.
8226         (parse_check_super): Pass extra argument to check_pkg_class_access.
8227         (do_resolve_class): Likewise.
8228         (process_imports): Likewise.
8229         (read_import_dir): Fixed indentation.
8230         (find_in_imports_on_demand): New local class_type_name. Local
8231         node_to_use deleted. while loop changed into for loop. Report
8232         multiple definition only for accessible classes. Improved error
8233         message.
8234         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8235         assigned to parameter list, fixed indentation. while loop changed
8236         into for loop, restore TREE_CHAIN on local `tem' before the next
8237         iteration.
8238
8239 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8240
8241         * lang.c (lang_get_alias_set): Deleted.
8242
8243 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8244
8245         * gjavah.c (jni_print_char): Fix thinko in last change.
8246
8247         * gjavah.c (jni_print_char, decode_signature_piece): Use
8248         safe-ctype macros and/or fold extra calls into fewer ones.
8249         * lex.c (java_read_unicode, java_lex): Likewise.
8250         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8251         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8252         * mangle_name.c (append_unicode_mangled_name,
8253         unicode_mangling_length): Likewise.
8254
8255 2001-10-17  Richard Henderson  <rth@redhat.com>
8256
8257         * Make-lang.in (java/lang.o): Depend on langhooks.h.
8258
8259 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8260
8261         * lang.c (langhooks.h): Included.
8262         (LANG_HOOKS_INIT): Redefined.
8263         (LANG_HOOKS_INIT_OPTIONS): Likewise.
8264         (LANG_HOOKS_DECODE_OPTION): Likewise.
8265         (struct lang_hooks lang_hooks): New initialization.
8266
8267 2001-10-11  Per Bothner  <per@bothner.com>
8268
8269         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
8270         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8271         The former is simpler, and jcf-write.c handles it better.
8272         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
8273         or WITH_CLEANUP_EXPR.
8274         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
8275         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8276
8277         * parse.y (patch_if_else_statement):  If the condition is constant,
8278         optimize away the test.
8279
8280 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8281
8282         * parse.y (patch_cast): Call patch_string on the first operand of
8283         the incoming node, update it if necessary. Fixes PR java/4510.
8284
8285 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8286
8287         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8288         when name qualifier matches a package name.
8289
8290 2001-10-08  Tom Tromey  <tromey@redhat.com>
8291
8292         Fix for PR java/4489:
8293         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8294         force a new label when computing `body_block'.
8295
8296 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8297
8298         * jcf-io.c (format_uint): Const-ify.
8299         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8300         * lex.c (java_get_line_col): Likewise.
8301         * parse.y (build_incdec): Likewise.
8302
8303 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8304
8305         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8306         a NULL enclosing context if appropriate. Fixes PR java/4466.
8307
8308 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8309
8310         * parse.y (patch_assignment): Use lvalue's original TYPE when
8311         building the final COMPOUND_EXPR.
8312         (try_reference_assignconv): Fixed leading comment.
8313
8314 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8315
8316         * parse.y (check_final_variable_indirect_assignment): For
8317         COMPOUND_EXPR, return only if finals were found initialized
8318         properly, if not, keep on checking.
8319         (check_final_variable_global_assignment_flag): New local
8320         error_found, set when appropriate and used to decide whether to
8321         report uninitialized finals. Fixed typo in comment.
8322
8323 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8324
8325         * decl.c (init_decl_processing): Fixed typo in predef_filenames
8326         last three initializations. Fixes PR java/4360.
8327
8328 2001-09-21  Richard Henderson  <rth@redhat.com>
8329
8330         * class.c (get_dispatch_table): Handle function descriptors.
8331         (build_dtable_decl): Likewise.
8332         * expr.c (build_invokevirtual): Likewise.
8333
8334 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8335
8336         * parse.y (patch_method_invocation): Build class initialization
8337         when static finals are used to qualify method invocation.
8338         Fixes PR java/4366.
8339
8340 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
8341
8342         * parse.h: (WFL_STRIP_BRACKET): Re-written using
8343         build_type_name_from_array_name.
8344         (STRING_STRIP_BRACKETS): New macro.
8345         * parse.y (build_type_name_from_array_name): New function.
8346         (array_creation_expression:): Accumulate []s instead of [s.
8347         (cast_expression:): Accumulate []s instead of [s after cast type
8348         name.
8349         (build_array_from_name): Local string deleted, use
8350         build_type_name_from_array_name.
8351         (build_unresolved_array_type): Accumulate []s instead of [s after
8352         type name.
8353         (register_fields): Fixed comment.
8354         (resolve_class): Local name, base deleted, new locals tname and
8355         array_dims. Use build_type_name_from_array_name. Use array_dims to
8356         build array type.
8357         (purify_type_name): Use STRING_STRIP_BRACKETS.
8358
8359 2001-09-18  Andreas Jaeger  <aj@suse.de>
8360
8361         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8362         * jv-scan.c: Likewise.
8363
8364 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8365
8366         * parse.y (patch_method_invocation): Inner class creation context
8367         check not enforced within constructors. Fixes PR java/1873.
8368
8369 2001-09-16  Tom Tromey  <tromey@redhat.com>
8370
8371         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8372         NOTE_PUSH for single-case push.  Fixes PR java/4189.
8373
8374 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8375
8376         * java-tree.h (TYPE_IMPORT_LIST): New macro.
8377         (TYPE_IMPORT_DEMAND_LIST): Likewise.
8378         (struct lang_type): New fields import_list and import_demand_list.
8379         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
8380         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
8381         (do_resolve_class): New local saved_enclosing_type, initialized,
8382         passed as parameter to find_in_imports and find_in_imports_on_demand.
8383         (find_in_imports): Added paramater enclosing_type, use its
8384         TYPE_IMPORT_LIST when applicable.
8385         (find_in_imports_on_demand): Added parameter enclosing_type, use
8386         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
8387         declaration and initialization.
8388         (fold_constant_for_init): Switch/restore current_class to the
8389         appropriate context.
8390
8391 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
8392
8393         * verify.c (verify_jvm_instructions): Fix typo.
8394
8395 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8396
8397         * expr.c (expand_invoke): Const-ification.
8398         * parse.y (patch_method_invocation): Likewise.
8399
8400 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8401
8402         * gjavah.c (cxx_keywords): Const-ification.
8403         * keyword.gperf (java_keyword): Likewise.
8404         * lang.c (java_tree_code_name): Likewise.
8405         * lex.c (cxx_keywords): Likewise.
8406         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
8407
8408 2001-09-11  Richard Henderson  <rth@redhat.com>
8409
8410         * parse.h (ctxp_for_generation): Mark extern.
8411
8412 2001-09-10  Richard Henderson  <rth@redhat.com>
8413
8414         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8415
8416 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8417
8418         * typeck.c (java_array_type_length, build_prim_array_type):
8419         Represent empty arrays by NULL index.
8420
8421 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
8422
8423         * java-tree.h (compile_resource_file): Grouped with other prototypes.
8424         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8425
8426 2001-09-06  Anthony Green  <green@redhat.com>
8427
8428         * class.c (O_BINARY): Define if necessary.
8429         (registerResource_libfunc): Declare.
8430         (init_class_processing): Initilize registerResource_libfunc.
8431         (compile_resource_file): New function.
8432         * java-tree.h (resource_name): Declare.
8433         (compile_resource_file): Declare.
8434         * jcf-parse.c (yyparse): Handle compiling java resource files.
8435         * lang.c (java_decode_option): Handle -fcompile-resource option.
8436         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
8437         resource files.
8438         * gcj.texi (Code Generation): Add documentation for -R flag.
8439
8440 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
8441
8442         * jcf-write.c (generate_classfile): Issue an error in case of
8443         field/initial value mismatch.
8444         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
8445         being initialized and we're generating bytecode.
8446         (java_complete_lhs): In MODIFY_EXPR section: added comments,
8447         set DECL_INITIAL properly when appropriate.
8448         Fixes PR java/4230
8449         Fixes PR java/4204
8450
8451 2001-09-01  Per Bothner  <per@bothner.com>
8452
8453         * parse.y (maybe_yank_clinit):  A field without an initializer is not
8454         relevant.  All initializers except static final and constant require
8455         <clinit>, regardless of flag_emit_class_files.
8456
8457 2001-08-31  Per Bothner  <per@bothner.com>
8458
8459         * class.c (set_constant_value):  When not emitting class files, then a
8460         String ConstantValue is a utf8const_ptr_type.
8461
8462 2001-08-30  Per Bothner  <per@bothner.com>
8463
8464         * jcf-write.c (generate_classfile):  Check that field is primitive
8465         or string before emitting ConstantValue attribute.
8466
8467 2001-08-30  Per Bothner  <per@bothner.com>
8468
8469         * parse.y (resolve_qualified_expression_name):  If creating a
8470         COMPOUND_EXPR, set it's type correctly.
8471
8472 2001-08-30  Per Bothner  <per@bothner.com>
8473
8474         * jcf-io.c (open_class):  Set filename field.
8475
8476         * jcf-parse,c (parse_class_file):  Set current_function_decl
8477         for better error message when Code attribute is missing.
8478
8479         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
8480         better diagnostics, especially for constructors.
8481
8482 2001-08-30  Per Bothner  <per@bothner.com>
8483
8484         * jcf-write.c (generate_classfile):  Don't write ConstantValue
8485         attribute if field is not final, for compatibility with jdk.
8486
8487         * jcf-write.c (generate_classfile):  Convert ConstantValue values
8488         to correct type.  Work-around for front-end bug.
8489         * class.c (set_constant_value):  Error if constant has wrong type.
8490
8491 2001-08-30  Per Bothner  <per@bothner.com>
8492
8493         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
8494         "Double" are printed at verbosity 1.
8495
8496         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
8497
8498         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
8499
8500 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
8501
8502         * parse.y (patch_assignment): Don't verify final re-assignment here.
8503         (java_complete_lhs): Verify assignments to finals calling
8504         patch_assignment. Verify re-assignments to finals before calling
8505         patch_assignment.
8506
8507 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
8508
8509         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
8510         Fixes PR java/1413
8511
8512 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8513
8514         * lex.c (java_lex): new local found_hex_digits. Set and then used
8515         in test to reject invalid hexadecimal numbers.
8516         * parse.y (java_complete_tree): Prevent unwanted cast with
8517         initialized floating point finals.
8518         (patch_binop): Emit a warning when detecting a division by zero,
8519         mark result not constant, don't simplify non integer division.
8520
8521 2001-08-28  Per Bothner  <per@bothner.com>
8522
8523         * jcf-write.c  (generate_bytecode_insns):  For increments and
8524         decrements just recurse to push constant.  Improvement on Mark's patch.
8525
8526 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
8527
8528         * jcf-write.c (generate_bytecode_insns): Generate an integer to
8529         real conversion for increments and decrements of reals.
8530
8531 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8532
8533         * parse.y (resolve_qualified_expression_name): Handle unresolved
8534         qualified expressions, prevent numerical qualifiers, fixed typo.
8535         Fixes PR java/4141
8536
8537 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8538
8539         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
8540         don't report anything but deprecated class when marked so. Handle
8541         VAR_DECL.
8542         (patch_method_invocation): Check deprecation on methods and types.
8543         (patch_binop): code becomes an enum tree_code, added default: to
8544         switch to handle that. Detect division by zero, try to fold and
8545         return before using a subroutine.
8546
8547 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
8548
8549         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
8550         file smaller than 4 bytes.
8551         * parse.y (check_inner_circular_reference): New function.
8552         (check_circular_reference): Likewise.
8553         (array_initializer:): Accept {,}.
8554         (java_check_circular_reference): Rewritten using
8555         check_circular_reference and check_inner_circular_reference.
8556         (java_complete_expand_method): Unconditionally save and restore
8557         the unpurged exception list.
8558         (build_dot_class_method_invocation): Unmangle signature parameter.
8559
8560 2001-08-21  Tom Tromey  <tromey@redhat.com>
8561
8562         * decl.c (init_decl_processing): Add `throws' field to method
8563         descriptor.
8564         * class.c (make_method_value): Compute `throws' field for method.
8565
8566 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8567
8568         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
8569         circularity is detected.
8570         (ctors_unchecked_throws_clause_p): Fixed leading comment.
8571
8572 2001-08-17  Richard Henderson  <rth@redhat.com>
8573
8574         * class.c (emit_register_classes): Add align parameter to
8575         call to assemble_integer.
8576
8577 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
8578
8579         * jcf-parse.c (load_class): New locals saved and class_loaded. If
8580         loading a class_or_name fails, try considering an innerclass name
8581         and load the enclosing context.
8582         * parse.y (resolve_inner_class): New function.
8583         (find_as_inner_class): Added leading comment.
8584         (register_incomplete_type): Keep the current context as enclosing
8585         context for JDEP_FIELD dependencies.
8586         (do_resolve_class): Locals new_class_decl and super initialized to
8587         NULL. Call resolve_inner_class, explore the enclosing context
8588         superclass if necessary.
8589         Fixes PR java/4007
8590
8591 2001-08-16  Tom Tromey  <tromey@redhat.com>
8592
8593         * jcf-dump.c (main): Updated for change to jcf_path_seal.
8594         * gjavah.c (main): Updated for change to jcf_path_seal.
8595         * lang.c (version_flag): New global.
8596         (java_decode_option): Recognize `-version'.
8597         (java_init): Update for change to jcf_path_seal.
8598         * jcf.h (jcf_path_seal): Added `print' argument.
8599         * jcf-path.c (jcf_path_seal): Added `print' argument.
8600
8601 2001-08-13  Zack Weinberg  <zackw@panix.com>
8602
8603         * Make-lang.in (java/decl.o): Update dependencies.
8604         * decl.c: Include libfuncs.h, don't include toplev.h.
8605
8606 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8607
8608         * decl.c (init_decl_processing): exception_type_node,
8609         class_not_found_type_node, and no_class_def_found_type_node
8610         initialized. predef_filenames augmented accordingly.
8611         instinit_identifier_node initialized.
8612         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
8613         * java-tree.h (enum java_tree_index): New entries
8614         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
8615         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
8616         (exception_type_node): New macro.
8617         (class_not_found_type_node): Likewise.
8618         (no_class_def_found_type_node): Likewise.
8619         (instinit_identifier_node): Likewise.
8620         (PREDEF_FILENAMES_SIZE): Adjusted.
8621         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
8622         (struct lang_type): Fixed typo in bitfield name.
8623         (DECL_INSTINIT_P): New macro.
8624         (ID_INSTINIT_P): Likewise.
8625         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
8626         attribute.
8627         * parse.y (encapsulate_with_try_catch): New function.
8628         (generate_instinit): Likewise.
8629         (build_instinit_invocation): Likewise.
8630         (ctors_unchecked_throws_clause_p): Likewise.
8631         (add_instance_initializer): Deleted.
8632         (build_instance_initializer): Likewise.
8633         (in_instance_initializer): Likewise.
8634         (check_method_redefinition): instinit$ not to be verified.
8635         (java_complete_expand_methods): Generate instinit$, simplified code.
8636         (build_dot_class_method): Eliminated unnecessary locals. Use
8637         encapsulate_with_try_catch, removed unnecessary code.
8638         (fix_constructors): New local iii. Use build_instinit_invocation.
8639         (patch_method_invocation): Added comment.
8640         (maybe_use_access_method): Don't consider instinit$.
8641         (find_applicable_accessible_methods_list): Shorten the search for
8642         instinit$ too.
8643         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
8644         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
8645         (patch_throw_statement): Likewise. Fixed typo.
8646
8647 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
8648
8649         Revert:
8650         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8651         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8652         ASM_FINAL_SPEC.
8653         (lang_specific_pre_link): Use set_input to set input_filename.
8654         Append `main' here.
8655         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8656         (main): Fix definition.
8657         Strip `main' from classname.
8658         Fixes PR java/227.
8659
8660 2001-08-11  Zack Weinberg  <zackw@panix.com>
8661
8662         * lex.h: Don't include setjmp.h.  Don't define
8663         SET_FLOAT_HANDLER or prototype set_float_handler.
8664
8665 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8666
8667         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
8668         `poplevel' in the right order.
8669
8670 2001-08-09  Richard Henderson  <rth@redhat.com>
8671
8672         * Make-lang.in (class.o): Depend on TARGET_H.
8673         * class.c (emit_register_classes): Use target hooks instead of
8674         assemble_constructor and assemble_destructor.
8675
8676 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
8677
8678         * check-init.c (flags.h): Include
8679         (check_init): Don't report uninitialized static class
8680         initialization flags, don't free bit index when doing static class
8681         initialization optimization.
8682         (check_for_initialization): Return type changed to `unsigned int.'
8683         (attach_initialized_static_class): New function.
8684         * class.c (add_method_1): Create the initialized static class
8685         table if necessary.
8686         (finish_class): Always emit deferred inline methods.
8687         * decl.c (emit_init_test_initialization): Moved to expr.c
8688         (complete_start_java_method): Don't traverse
8689         DECL_FUNCTION_INIT_TEST_TABLE.
8690         (lang_mark_tree): Mark hash tables in function decls.
8691         * expr.c (emit_init_test_initialization): Moved from decl.c.
8692         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
8693         initialization flag, set DECL_CONTEXT and
8694         LOCAL_CLASS_INITIALIZATION_FLAG.
8695         (java_lang_expand_expr): Emit initialization code for static class
8696         initialized flags when entering block, if necessary.
8697         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
8698         * java-tree.h (flag_optimize_sci): New global variable declaration.
8699         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
8700         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
8701         (LOCAL_FINAL_P): Fixed typo in comment.
8702         (FINAL_VARIABLE_P): Likewise.
8703         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
8704         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
8705         (struct lang_decl): New fields `ict', `smic' and `cif.'
8706         (check_for_initialization): New returned value for global.
8707         (attach_initialized_static_class): New global function.
8708         (STATIC_CLASS_INIT_OPT_P): New macro.
8709         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
8710         * lang.c (java_decode_option): Handle
8711         `-fno-optimize-static-class-initialization'
8712         * parse.y (start_complete_expand_method): New function.
8713         (java_expand_method_bodies): Likewise.
8714         (attach_init_test_initialization_flags): Likewise.
8715         (adjust_init_test_initialization): Likewise.
8716         (emit_test_initialization): Likewise.
8717         (java_complete_expand_methods): Nullify abstract and native method
8718         bodies.
8719         (java_complete_expand_method): New locals `fbody', `block_body'
8720         and `exception_copy.' Reorganized: directly return on empty method
8721         bodies, call `start_complete_expand_method', remember definitely
8722         initialized static class in function, don't expand method bodies.
8723         (java_expand_classes): Call `java_expand_method_bodies' before
8724         `finish_class' when compiling to native.
8725         (resolve_expression_name): Use `orig' after building outer class
8726         field access.
8727         (patch_invoke): Remember static method invocations.
8728
8729 2001-08-06  Richard Henderson  <rth@redhat.com>
8730
8731         * class.c (emit_register_classes): Pass a symbol_ref and priority
8732         to assemble_constructor.
8733
8734 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
8735
8736         * java-tree.h (all_class_filename): New macro.
8737         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
8738         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
8739         newly created IDENTIFIER_NODE to `all_class_filename.'
8740
8741 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
8742
8743         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
8744         Use ggc_add_tree_root to register roots.
8745
8746 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8747
8748         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
8749         second operand calling check_init.
8750         * decl.c (complete_start_java_method): Swaped second and third
8751         arguments while creating WITH_CLEANUP_EXPR node.
8752         * jcf-write.c (generate_bytecode_insns): Use second operand
8753         instead of third when handling WITH_CLEANUP_EXPR.
8754         * parse.y (java_complete_lhs): Expand second operand of
8755         WITH_CLEANUP_EXPR nodes.
8756         (patch_synchronized_statement): Swaped second and third arguments
8757         while creating WITH_CLEANUP_EXPR node.
8758
8759 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8760
8761         * parse.y (create_interface): Avoid cyclic inheritance report when
8762         syntax error encountered during class definition.
8763         Fixes PR java/2956
8764
8765 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8766
8767         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8768         ASM_FINAL_SPEC.
8769         (lang_specific_pre_link): Use set_input to set input_filename.
8770         Append `main' here.
8771         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8772         (main): Fix definition.
8773         Strip `main' from classname.
8774         Fixes PR java/227.
8775
8776 2001-07-18  Tom Tromey  <tromey@redhat.com>
8777
8778         For PR java/2812:
8779         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
8780         * lex.c (java_new_lexer): Use ICONV_CONST.
8781         (java_read_char): Likewise.
8782         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
8783         (jv-scan$(exeext)): Likewise.
8784
8785 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8786
8787         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
8788         * parse.y (check_class_interface_creation): Allow `private' if the
8789         enclosing is not an interface.
8790         (create_interface): Interface tagged public if the enclosing
8791         context is an interface.
8792         (create_class): Class tagged public if the enclosing context
8793         is an interface.
8794         Fixes PR java/2959
8795
8796 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8797
8798         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
8799         Fixes PR java/2665
8800
8801 2001-07-14  Tim Josling  <tej@melbpc.org.au>
8802
8803         * check-init.c (check_init): Remove references to EXPON_EXPR.
8804
8805 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8806
8807         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
8808         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
8809         Fixes PR java/3602
8810
8811 2001-07-13  Tom Tromey  <tromey@redhat.com>
8812
8813         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
8814         invocation.
8815
8816 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8817
8818         * parse.y (patch_method_invocation): Don't override primary if one
8819         is already provided, but let this$<n> be built. Fixed comment.
8820
8821 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8822
8823         * parse.y (empty_statement:): Report empty statement error only
8824         when found at class declaration level.
8825         Fixes PR java/3635
8826
8827 2001-07-12  Tom Tromey  <tromey@redhat.com>
8828
8829         * expr.c (expand_load_internal): New function.
8830         (LOAD_INTERNAL): Use it.
8831
8832 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
8833
8834         * parse.y (verify_constructor_super): Compare anonymous class ctor
8835         args with `valid_method_invocation_conversion_p.'
8836         Fixes PR java/3285
8837
8838 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8839
8840         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
8841         `-fsyntax-only.' Fixes PR java/3248
8842
8843 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8844
8845         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
8846
8847 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8848
8849         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
8850         current function is static. Fixes PR java/1970
8851
8852 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8853
8854         * parse.y (patch_method_invocation): Add enclosing context to ctor
8855         calls if necessary. Fixes PR java/2953
8856
8857 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8858
8859         * parse.y (resolve_package): Abort if qualified expression member
8860         isn't right.
8861         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
8862         Fixes PR java/1391
8863
8864 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
8865
8866         * verify.c: Don't use // comments.
8867
8868 2001-07-05  Tom Tromey  <tromey@redhat.com>
8869
8870         * lang.c (flag_assume_compiled): Removed.
8871         * java-tree.h (flag_assume_compiled): Removed.
8872         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
8873         -fhash-synchronization, -fuse-divide-subroutine,
8874         -fcheck-references, -femit-class-file, -femit-class-files,
8875         -fassume-compiled.  Updated --encoding information.  Changed
8876         -foutput-class-dir to `-d'.
8877
8878 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
8879
8880         * jcf-parse.c (parse_class_file): Add lineno parameter to
8881         debug_start_source_file call.
8882
8883 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8884
8885         * gcj.texi: Use gpl.texi.
8886         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
8887         dependencies and use doc/include in search path.
8888
8889 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
8890
8891         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
8892         `this'.  If so, don't build instance initializers.
8893
8894 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8895
8896         * parse.y (resolve_expression_name): Improved error message for
8897         inner class cases. Fixes PR java/1958
8898
8899 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8900
8901         * lang.c: #include diagnostic.h
8902         (lang_print_error): Add a `diagnostic_context *' parameter.
8903         (java_dummy_print): Likewise.
8904         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
8905
8906 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8907
8908         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
8909         * jcf.h (typedef struct JCF): New bitfield `finished.'
8910         (JCF_FINISH): Set `finished.'
8911         (JCF_ZERO): Reset `finished.'
8912         Fixes PR java/2633
8913
8914 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8915
8916         * parse.y (class_body_declaration:): Don't install empty instance
8917         initializers.
8918         Fixes PR java/1314
8919
8920 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8921
8922         * class.c (set_super_info): Call `set_class_decl_access_flags.'
8923         (set_class_decl_access_flags): New function.
8924         * java-tree.h (set_class_decl_access_flags): New prototype.
8925         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
8926         (parse_class_file): New local `decl_max_locals.' Take wide types
8927         into account to compute DECL_MAX_LOCALS.
8928         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
8929         imports on demand.
8930
8931 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
8932
8933         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
8934
8935 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8936
8937         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
8938         * parse.y (do_resolve_class): Moved comments out to leading comment
8939         section. Removed local `start', New local `_ht' and
8940         `circularity_hash.'  Record `enclosing' in hash table and search
8941         it to detect circularity.  Use `enclosing' as an argument to
8942         `lookup_cl.' Free the hash table when done.
8943
8944 2001-06-19  Tom Tromey  <tromey@redhat.com>
8945
8946         * lex.c (java_read_char): Disallow invalid and overlong
8947         sequences.  Fixes PR java/2319.
8948
8949 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
8950
8951         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
8952
8953 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
8954
8955         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
8956         arguments accordingly.
8957
8958 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8959
8960         * gcj.texi: Move contents to just after title page.
8961
8962 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
8963
8964         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
8965         builtin type.
8966         (patch_incomplete_class_ref): Build the class ref, build the class
8967         init if necessary, complete the tree.
8968         Fixes PR java/2605
8969
8970 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8971
8972         * parse.y (lookup_field_wrapper): Test `name' code.
8973         (resolve_qualified_expression_name): Test `qual_wfl' code.
8974         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
8975         handle `qual_wfl' by code.
8976         (maybe_build_primttype_type_ref): Test `wfl' code.
8977
8978 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8979
8980         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
8981         fdl.texi.
8982         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
8983         the dvi file in the java directory.
8984
8985 2001-05-25  Sam TH  <sam@uchicago.edu>
8986
8987         * gen-table.pl javaop.h jcf.h lex.h,
8988         parse.h: Fix header include guards.
8989
8990 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
8991
8992         * jv-scan.c (version): Update copyright year.
8993
8994 2001-05-21  Per Bothner  <per@bothner.com>
8995
8996         * jcf-parse.c (read_class):  If class is from .class or .zip file
8997         and it's already been read, don't push/pop parser context.
8998
8999 2001-05-18  Per Bothner  <per@bothner.com>
9000
9001         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9002         command line so the jvgenmain-generated main program comes first.
9003
9004 2001-05-15  Tom Tromey  <tromey@redhat.com>
9005
9006         * class.c (build_utf8_ref): Don't generate identifier based on
9007         utf8const contents.
9008
9009 2001-05-12  Richard Henderson  <rth@redhat.com>
9010
9011         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9012         * expr.c (java_lang_expand_expr): Expand it.
9013         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9014         calling build_exception_object_ref.
9015         * parse.y (catch_clause_parameter): Likewise.
9016         (build_dot_class_method): Likewise.
9017         (try_reference_assignconv): Likewise.
9018         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9019         * jcf-write.c (generate_bytecode_insns): Likewise.
9020
9021 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9022
9023         * parse.y (build_unresolved_array_type): Set
9024         EXPR_WFL_QUALIFICATION on the newly created wfl.
9025         Fixes PR java/2538. Fixes PR java/2535.
9026
9027 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9028
9029         * parse.y (fix_constructors): Removed unnecessary assignment to
9030         local. Moved assignment to `this$<n>', fixed comments and
9031         indentation.
9032         (build_wfl_wrap): Fixed indentation.
9033         Fixes PR java/2598, java/2579 and java/2658.
9034
9035 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9036
9037         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9038         check for byte swap.
9039
9040 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9041
9042         * expr.c (build_class_init): Move MODIFY_EXPR
9043         outside of COND_EXPR.  Remove variable `call'.
9044
9045 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9046
9047         * decl.c: NULL_PTR -> NULL.
9048         * jcf-write.c: Likewise.
9049
9050 2001-05-01  Tom Tromey  <tromey@redhat.com>
9051
9052         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9053         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9054         * gcj.texi: Updated copyright text.  Include fdl.texi.
9055         (Top): Link to new node.
9056
9057 2001-05-01  Per Bothner  <per@bothner.com>
9058
9059         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9060
9061 2001-05-01  Per Bothner  <per@bothner.com>
9062
9063         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9064         import_list contains the name, not the TREE_PURPOSE.
9065
9066 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9067
9068         * jcf-io.c (read_zip_member): Cast to long in comparison with
9069         signed value.
9070
9071         * jvspec.c (lang_specific_driver): Initialize variables.
9072
9073         * mangle.c (find_compression_record_match): Likewise.
9074
9075         * typeck.c (build_null_signature): Provide static prototype.  Mark
9076         parameter with ATTRIBUTE_UNUSED.
9077
9078         * verify.c (verify_jvm_instructions): Initialize variable.
9079
9080 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9081
9082         * parse.y (do_resolve_class): Check for cyclic inheritance during
9083         inner class resolution.
9084
9085 2001-04-27  Per Bothner  <per@bothner.com>
9086
9087         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9088         while iterating, since that could cause gc to lose stuff.
9089
9090 2001-04-26  Per Bothner  <per@bothner.com>
9091
9092         Fix method search wrt scope of inner classes to match JLS2.
9093         * typeck.c (build_null_signature):  New static function.
9094         (has_method):  New function.  Uses build_null_signature and lookup_do.
9095         * java-tree.h (has_method):  New declaration.
9096         * parse.y (find_applicable_accessible_methods_list):  Do not search
9097         context of inner classes here.
9098         (patch_method_invocation):  Search scope, ie. current and outer clases,
9099         for method matching simple name, to find class.
9100
9101 2001-04-26  Per Bothner  <per@bothner.com>
9102
9103         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9104         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9105
9106         * constants.c (find_methodref_with_class_index):  New function.
9107         (find_methodref_index):  Use find_methodref_with_class_index.
9108         * java-tree.h (find_methodref_with_class_index):  New declaration.
9109         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9110         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9111         If context changed from interface to class, don't use invokeinterface.
9112
9113 2001-04-25  Per Bothner  <per@bothner.com>
9114
9115         * verify.c (verify_jvm_instructions):  For field instructions,
9116         check that field index is valid.  For invoke instructions, check that
9117         method index is valid.
9118
9119 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9120
9121         * config-lang.in (target_libs): Copy from $libgcj_saved.
9122
9123 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9124
9125         * decl.c (init_decl_processing): Add new class "protectionDomain"
9126         field.
9127         * class.c (make_class_data): Set initial value for "protectionDomain".
9128
9129 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9130
9131         * jvspec.c (lang_specific_driver): Fix memory allocation
9132         deficit, by using concat in lieu of xmalloc/sprintf.
9133
9134 2001-04-20  Per Bothner  <per@bothner.com>
9135
9136         Fixes to compile multiple .class files at once.
9137         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9138         * java-tree.h (CLASS_PARSED_P):  New macro.
9139         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9140         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9141         (read_class):  Avoid some code duplication.
9142         Don't call JCF_FINISH for a .class file - might be needed later.
9143         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9144         rather than CLASS_LOADED_P, since latter implies class laid out.
9145         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9146         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9147
9148 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9149
9150         * Make-lang.in (java/boehm.o): Depend on toplev.h.
9151
9152         * boehm.c: Include toplev.h.
9153
9154 2001-04-06  Tom Tromey  <tromey@redhat.com>
9155             Alexandre Petit-Bianco  <apbianco@redhat.com>
9156
9157         Fix for PR gcj/1404 and PR gcj/2332:
9158         * parse.y (build_array_from_name): If we use the type_wfl then
9159         accumulate dimensions from the original type as well.
9160         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9161
9162 2001-04-06  Tom Tromey  <tromey@redhat.com>
9163
9164         * parse.y (analyze_clinit_body): Return true if the second operand
9165         of a METHOD_EXPR is nonzero.
9166
9167 2001-04-06  Tom Tromey  <tromey@redhat.com>
9168
9169         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9170         directory.
9171         ($(srcdir)/java/parse.c): Likewise.
9172
9173 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9174
9175         * gcj.texi: Use `which-gcj' instead of `which-g77.'
9176         (version-gcc): Initialized.
9177         (which-gcj): Likewise.
9178
9179 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9180
9181         * java-tree.h (struct lang_decl): New macro
9182         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9183         * parse.y (build_instance_initializer): New function.
9184         (add_instance_initializer): Use it.
9185         (java_fix_constructors): Set `current_class' before fix pass.
9186         (fix_constructors): Just return if already fixed. Move `super()'
9187         invocation ahead. Use `build_instance_initializer.'
9188         Fixes PR java/1315.
9189
9190 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9191
9192         * parse.y (resolve_qualified_expression_name): Pass field's
9193         DECL_CONTEXT to `not_accessible_p.'
9194         (not_accessible_p): Changed parameters order in `inherits_from_p'
9195         invocation.
9196
9197 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
9198
9199         * lang-options.h: Add flag_check_references.
9200
9201 2001-04-04  Per Bothner  <per@bothner.com>
9202
9203         * java-tree.h (CONSTANT_VALUE_P):  New macro.
9204         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
9205         * parse.y (maybe_build_class_init_for_field):  New static function.
9206         (resolve_expression_name, resolve_field_access):  Use
9207         maybe_build_class_init_for_field instead of build_class_init
9208         This does not do the init if the field is compile-time-constant.
9209         (resolve_field_access):  Simplify.
9210
9211         * parse.y (fold_constant_for_init):  Merge test into switch.
9212
9213 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
9214
9215         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9216         on gansidecl.h.
9217         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9218
9219 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
9220
9221         * expr.c (pop_type_0): Save the result of the first
9222         lang_printable_name call in a scratch buffer, so it
9223         won't be clobbered by the second call.
9224
9225 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9226
9227         * parse-scan.y (array_type:): Rewritten.
9228         (type_declaration:): `empty_statement' replaces `SC_TK.'
9229         (class_member_declaration:): `empty statement' added.
9230         (method_body:): Simplified.
9231         (static_initializer:): Likewise.
9232         (primary_no_new_array:): Use `type_literals.'
9233         (type_literals:): New rule.
9234         (dims:): Set and update `bracket_count.'
9235         Fixes PR java/1074. Fixes PR java/2412.
9236
9237 2001-03-28  Hans Boehm  <boehm@acm.org>
9238
9239         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9240         (get_boehm_type_descriptor): Set type on returned value to be a
9241         pointer length integer.
9242
9243 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9244
9245         * expr.c (pop_type_0): Call `concat' rather than building the
9246         string manually.
9247         (pop_type): Add format specifier in call to `error'.
9248
9249         * parse.y (patch_method_invocation): Avoid casting away
9250         const-ness.
9251
9252 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
9253
9254         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9255
9256 2001-03-28  Richard Henderson  <rth@redhat.com>
9257
9258         IA-64 ABI Exception Handling:
9259         * Make-lang.in (except.o): Don't depend on eh-common.h.
9260         * check-init.c (check_init): Handle EXC_PTR_EXPR.
9261         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9262         [soft_exceptioninfo_call_node]: Remove.
9263         [eh_personality_libfunc, lang_eh_runtime_type]: New.
9264         (end_java_method): No emit_handlers.
9265         * except.c (java_set_exception_lang_code): Remove.
9266         (method_init_exceptions): Don't call it.
9267         (prepare_eh_table_type): No CATCH_ALL_TYPE.
9268         (build_exception_object_ref): New.
9269         (expand_end_java_handler): Update for except.h name changes.
9270         (emit_handlers, expand_resume_after_catch): Remove.
9271         * expr.c (java_lang_expand_expr): Update for except.h name changes.
9272         (process_jvm_instruction): Use build_exception_object_ref.
9273         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9274         (soft_exceptioninfo_call_node): Remove.
9275         (build_exception_object_ref): Declare.
9276         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9277         soft_exceptioninfo_call_node.  Move processing ...
9278         [EXC_PTR_EXPR]: ... here.
9279         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9280         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9281         (source_end_java_method): No java_set_exception_lang_code or
9282         emit_handlers.
9283         (build_dot_class_method): Use build_exception_object_ref.
9284         (try_reference_assignconv): Check EXC_PTR_EXPR not
9285         soft_exceptioninfo_call_node.
9286
9287 2001-03-28  Richard Henderson  <rth@redhat.com>
9288
9289         * java-tree.h (throw_node): Define as a single member of
9290         java_global_trees instead of a separate array.
9291         (JTI_THROW_NODE): New.
9292         * decl.c (throw_node): Don't declare.
9293         (init_decl_processing): Init a scalar throw_node.
9294         Don't register it for gc.
9295         * check-init.c (check_init): Reference scalar throw_node.
9296         * expr.c (build_java_athrow): Likewise.
9297         * jcf-write.c (generate_bytecode_insns): Likewise.
9298         * parse.h (BUILD_THROW): Likewise.
9299
9300 2001-03-28  Richard Henderson  <rth@redhat.com>
9301
9302         * decl.c (end_java_method): Do not save and restore
9303         flag_non_call_exceptions.
9304         * parse.y (source_end_java_method): Likewise.
9305         * lang.c (flag_exceptions): Don't declare.
9306         (java_init_options): Set flag_non_call_exceptions.  Set
9307         flag_exceptions here ...
9308         (java_init): ... not here.
9309
9310 2001-03-27  Richard Henderson  <rth@redhat.com>
9311
9312         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9313         exceptions_via_longjmp.
9314
9315         * lang.c (flag_new_exceptions): Don't declare it.
9316         (java_init_options): Or set it.
9317
9318 2001-03-27  Richard Henderson  <rth@redhat.com>
9319
9320         * decl.c (end_java_method): Rename asynchronous_exceptions to
9321         flag_non_call_exceptions.
9322         * parse.y (source_end_java_method): Likewise.
9323
9324 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9325
9326         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9327
9328 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9329
9330         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9331
9332 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9333
9334         * parse.y (find_as_inner_class): Follow current package
9335         indications not to mistakingly load an unrelated class.
9336
9337 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9338
9339         * constants.c (PUTN): Use memcpy, not bcopy.
9340
9341         * lex.c (java_read_char): Use memmove, not bcopy.
9342
9343         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9344
9345 2001-03-23  Per Bothner  <per@bothner.com>
9346
9347         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
9348         macro for better error pin-pointing.
9349         * java-tree.h:  Fix typo in comment.
9350
9351         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
9352         Don't include jsr/goto in exception range.
9353         Check if start and end of exception range are the same (also TRY_EXPR).
9354         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
9355         However, do emit the following goto even if try_block is empty.
9356         Defer freeing exception_decl until after the finalizer, to make
9357         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
9358
9359         * parse.y (java_complete_lhs):  If the try-clause is empty, just
9360         return the finally-clause and vice versa.
9361
9362 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9363
9364         * gcj.texi (Input Options): documented the check for attribute
9365         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
9366         * java-tree.h (flag_force_classes_archive_check): Declared extern.
9367         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
9368         (jcf_parse): Check for the right classes archive if necessary.
9369         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
9370         (jcf_parse_fields): Fixed indentation.
9371         * jcf-write.c (append_gcj_attribute): New function.
9372         (generate_classfile): Compute the attribute count, invoke
9373         `append_gcj_attribute'.
9374         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
9375         turned into bit-fields. New bit-field `right_zip.'
9376         (JCF_ZERO): Set `right_zip' to zero.
9377         * lang-options.h (-fforce-classes-archive-check): Added flag.
9378         * lang.c (flag_force_classes_archive_check): New flag.
9379         (lang_f_options): New entry `force-classes-archive-check.'
9380         Fixes PR java/1213.
9381
9382 2001-02-07  Andrew Haley  <aph@redhat.com>
9383
9384         * gcj.texi (Configure-time Options): Add -fcheck-references.
9385         * expr.c (build_java_indirect_ref): New function.
9386         (java_check_reference): New function.
9387         (build_java_array_length_access): Use build_java_indirect_ref to
9388         check for null references.
9389         (build_java_arrayaccess): Likewise.
9390         (build_get_class): Likewise.
9391         (build_field_ref): Likewise.
9392         (invoke_build_dtable): Likewise.
9393         (build_invokeinterface): Likewise.
9394         * lang.c (lang_f_options): Add flag_check_references.
9395         * jvspec.c (jvgenmain_spec): Add flag_check_references.
9396         * java-tree.h (flag_check_references): New variable.
9397         * lang.c (flag_check_references): Likewise.
9398         * parse.y (patch_invoke): Use java_check_reference.
9399         (patch_assignment): Allow for extra nesting in
9400         _Jv_CheckArrayStore.
9401
9402 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
9403
9404         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9405         * lex.c (cxx_keywords): Likewise.
9406
9407 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9408
9409         * parse.y (qualify_ambiguous_name): Broaden `length'
9410         recognition. Help MODIFY_EXPR be resolved as expression names.
9411         Fixes PR java/2066. Fixes PR java/2400.
9412
9413 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
9414
9415         * gjavah.c (process_file): Mark interface definitions with
9416         "__attribute__ ((java_interface))".
9417
9418 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9419
9420         * class.c (layout_class): Fixed push_super_field's second
9421         argument. Fixes PR java/2333.
9422         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
9423         too early to lay innerclasses out.
9424
9425 2001-03-20  Tom Tromey  <tromey@redhat.com>
9426             Alexandre Petit-Bianco <apbianco@redhat.com>
9427
9428         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
9429         inside an array reference. Insertion of the array store check
9430         rewritten. Fixes PR java/2299.
9431
9432 2001-03-20  Tom Tromey  <tromey@redhat.com>
9433
9434         * lex.c (java_read_unicode): Only accept leading `u's.
9435
9436 2001-03-20  Tom Tromey  <tromey@redhat.com>
9437
9438         * jcf-parse.c (read_class): Initialize `class'.
9439
9440 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9441
9442         * jcf_parse.c (jcf_parse): Eliminate unused variable.
9443
9444 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9445
9446         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
9447         (layout_class): Likewise.
9448         (layout_class_method): Likewise.
9449         (emit_register_classes): Likewise.
9450         * decl.c (builtin_function): Likewise.
9451         (give_name_to_locals): Likewise.
9452
9453 2001-03-19  Per Bothner  <per@bothner.com>
9454
9455         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
9456         before trying to load an inner class.
9457
9458         Fixes to process to command-line .class files in two passes.
9459         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
9460         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
9461         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
9462         * class.c (is_compiled_class):  Fix for renamed flag.
9463         * parse.y (maybe_create_class_interface_decl):  Likewise.
9464         * jcf-parse.c (yyparse):  Also set if compiling .class files.
9465         * jcf-parse.c (read_class);  Read current_class.
9466         (jcf_parse):  Make static.
9467         (load_inner_classes):  New function, with code moved from jcf_parse,
9468         because we need to inner classes after the command-line files are read.
9469         (yyparse):  Set finput to NULL when it doesn't need to be closed.
9470         Reduce use of main_jcf (basically only for archive) and
9471         use finput instead of main_jcf->read_state.
9472         Inline jcf_figure_file_type into yyparse.
9473         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
9474         Defer load_inner_classes and parse_class_file to a second pass,
9475         after we've correctly mapped command-line .clas fiels to classes.
9476         (jcf_figure_file_type):  Removed.
9477         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
9478         (JCF_ZERO):  Also clear zipd field.
9479         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
9480
9481 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9482
9483         * jcf-parse.c (yyparse): Change ch from char * to char.
9484
9485 2001-03-19  Per Bothner  <per@bothner.com>
9486
9487         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
9488         Add constructed filelist-file at end, following -xjava.  Thus any .o
9489         and library files are not affected by the -xjava.  Also wrap
9490         explicit @FILE with -xjava and -xnone.
9491
9492 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
9493
9494         * class.c (build_static_field_ref): Call make_decl_rtl() after
9495         setting the DECL_EXTERNAL flag.
9496
9497 2001-03-17  Per Bothner  <per@bothner.com>
9498
9499         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
9500
9501         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
9502         when result is is needed (target is STACK_TARGET).
9503
9504         * parse.h (JDEP_SOLV):  Removed.
9505         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
9506
9507         * parse.y (incomplete_class_list): Removed.
9508         (obtain_incomplete_type): Don't use or set incomplete_class_list.
9509         It doesn't work if resolve_class changes the name of an array type
9510         that is on the list and then someone else looks for the modified name.
9511         Also, seems liable to break when compiling multiple source files at
9512         once.  So the simplest is to just remove incomplete_class_list -
9513         it is only a minor space win and it is not even clear it saves time.
9514
9515         * parse.y (resolve_class):  Remove unneeded promote_type.
9516
9517 2001-03-15  Per Bothner  <per@bothner.com>
9518
9519         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
9520         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
9521         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
9522         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
9523
9524         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
9525         * parse.y (java_expand_classes):  Likewise.
9526
9527         * parse.y (expand_start_java_method):  Was only called once and had a
9528         misleading name, so inline in caller java_complete_expand_method.
9529         (enter_a_block):  Likewise inline in enter_block and remove.
9530
9531         Remove junk from when gcc/java was created (by copying from C/C++).
9532         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
9533         (struct binding_level):  Remove fields keep, keep_if_subblocks,
9534         more_cleanups_ok, have_cleanups (which have never been used).
9535         (pushlevel, poplevel):  Remove related useless code.
9536
9537         * class.c (make_class_data):  The class_dtable_decl (i.e. the
9538         vtable for Class) should be external, except when compiling Class.
9539
9540         * jvspec.c (lang_specific_driver):  Fix -C handling.
9541         Check -save-temps to see if temp @FILE should be deleted.
9542         Follow-up to/fix for February 16 patch.
9543
9544         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
9545         (type_stack_dup):  Remove no-longer neded error check.
9546
9547 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
9548
9549         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
9550         to 'for_pointer'. If this type is for a pointer (argument) mangling,
9551         don't surround the element with 'N..E' if the type name is
9552         unqualified.
9553
9554 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9555
9556         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
9557         DECL_RTL_SET_P, etc.
9558         (make_method_value): Likewise.
9559         (get_dispatch_table): Likewise.
9560
9561         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9562
9563 2001-03-07  Tom Tromey  <tromey@redhat.com>
9564
9565         * config-lang.in (lang_requires): Define.
9566
9567 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
9568
9569         * typeck.c (convert): Check flag_unsafe_math_optimizations,
9570         not flag_fast_math.
9571
9572 2001-03-05  Per Bothner  <per@bothner.com>
9573
9574         Fix a problem where rest_of_decl_compilation applied to
9575         class_dtable_decl causes problems because it was done too early,
9576         before output file was opened.
9577         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
9578         * class.c (class_dtable_decl):  Add macro - element of class_roots.
9579         (make_class_data):  Define class_dtable_decl.
9580         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
9581
9582 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9583
9584         * java/class.c, java/decl.c, java/java-tree.h: Replace all
9585         uses of 'boolean' with 'bool'.
9586
9587 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9588
9589         * lang-specs.h: Add zero initializer for cpp_spec field to all
9590         array elements.
9591
9592 2001-02-16  Per Bothner  <per@bothner.com>
9593
9594         Handle compiling multiple input files at once, and @FILE syntax.
9595         * gcj.texi:  Updated documentation to match.
9596         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
9597         * jcf-parse.c (parse_source_file):  Split into ...
9598         (parse_source_file_1):  New function - and:
9599         (parse_source_file_2):  New function.
9600         (yyparse):  On -ffilelist-file, open and scan named file.
9601         On first pass over files, only do parse_source_file_1.
9602         A new second pass calls parse_source_file_2 for each file to compile.
9603         (init_jcf_parse):  Call init_src_parse.
9604         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
9605         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
9606         as multiple input file combined in one compilation.
9607         * lang-options.h:  Add -ffilelist-file
9608         * lang.c (flag_filelist_file):  New flag variable.
9609         (lang_f_options):  Handle -ffilelist-file.
9610         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
9611         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
9612         gclass_list - use global fields of src_parse_roots instead.
9613         * parse.y (src_parse_roots):  New array.
9614         (incomplete_class_list, gclass_list):  New macros.
9615         (push_parser_context, java_pop_parser_context,
9616         java_parser_context_resume):  Don't fiddle with deleted fields.
9617         (various):  Use incomplete_class gclass_list and global macros
9618         instead of parse_ctxt fields - the lists are global.
9619         (init_src_parse):  New function.
9620
9621 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9622
9623         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
9624
9625 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9626
9627         * parse.y (check_inner_class_access): Moved declaration of local
9628         `enclosing_decl_type' to the right location.
9629
9630 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
9631
9632         * parse.y (parser_check_super_interface): Don't call
9633         check_pkg_class_access for an inner interface.
9634         (parser_check_super): Don't call check_pkg_class_access for inner
9635         class.
9636         (do_resolve_class): Simplify enclosing type loop. Don't call
9637         check_pkg_class_access if CL and DECL are not set.
9638         (find_in_imports_on_demand): Set DECL if class_type needed to be
9639         loaded. Don't call check_pkg_class_access for an inner class.
9640         (check_inner_class_access): Rewritten to implement member access
9641         rules as per spec 6.6.1.
9642         (check_pkg_class_access): Handle the empty package correctly.
9643         (in_same_package): New function. Determine if two classes are in the
9644         same package.
9645
9646 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
9647
9648         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
9649         method into array types.
9650         * parse.y (patch_method_invocation): Bypass access check on clone call
9651         to array instance.
9652
9653 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9654
9655         * expr.c (build_instanceof): Check for arrays when trying fold to
9656         false.
9657
9658 2001-02-15  Jim Meyering  <meyering@lucent.com>
9659
9660         * Make-lang.in (java.install-common): Depend on `installdirs'.
9661         (java.install-info): Likewise.
9662
9663 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
9664
9665         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
9666
9667 2001-02-14  Tom Tromey  <tromey@redhat.com>
9668             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9669
9670         Fix for PR java/1261.
9671         * typeck.c (build_java_array_type): Add public `clone' method to
9672         arrays.
9673         * parse.y (resolve_qualified_expression_name): Use current_class
9674         when checking for inaccessibility.
9675         (patch_method_invocation): Fixed error message when accessibility
9676         denied.  Added `from_super' argument.
9677
9678 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
9679
9680         * parse.y (resolve_class): Don't build a fake decl. Use the one
9681         already built.
9682         * typeck.c (build_java_array_type): Build and assign decl to array
9683         type.
9684
9685 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
9686
9687         * parse.y (not_accessible_p): Changed leading comment. Added extra
9688         `where' argument. Use it to enforce protected access rules.
9689         (resolve_qualified_expression_name): Added extra argument to
9690         not_accessible_p.
9691         (patch_method_invocation): Use argument `primary' to provide
9692         not_accessible_p with an extra argument.
9693         (lookup_method_invoke): Added extra argument to not_accessible_p.
9694         (search_applicable_method_list): Likewise.
9695
9696 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9697
9698         * parse.y (resolve_qualified_expression_name): Try to resolve as
9699         an inner class access only if `decl' is a TYPE_DECL.
9700
9701 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9702
9703         * decl.c (classdollar_identifier_node): Initialize.
9704         * java-tree.h (enum java_tree_index): New entry
9705         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
9706         (classdollar_identifier_node): New macro.
9707         (ID_CLASSDOLLAR_P): Likewise.
9708         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
9709         (build_dot_class_method_invocation): Likewise.
9710         (find_applicable_accessible_methods_list): `class$' can't be
9711         inherited.
9712
9713 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
9714
9715         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
9716
9717 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9718
9719         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
9720         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
9721         gone.
9722
9723 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9724
9725         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
9726         outside of the `__U' sequence too.
9727         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
9728         sequence too.
9729
9730 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9731
9732         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
9733
9734 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9735
9736         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
9737         (JVGENMAIN_OBJS): Likewise.
9738         * java-tree.h (append_gpp_mangled_name): New prototype.
9739         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
9740         Removed cast calling `gcc_add_root.'
9741         * jvgenmain.c (mangle_obstack): New global, initialized.
9742         (main): Use it.
9743         (do_mangle_class): Constify local `ptr.'
9744         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
9745         append_gpp_mangle_name and update `count' if necessary.
9746         Use `mangle_obstack.'
9747         * mangle.c (append_unicode_mangled_name): Removed.
9748         (append_gpp_mangled_name): Likewise.
9749         (unicode_mangling_length): Likewise.
9750         (mangle_member_name): Return type set to `void.'
9751         (mangle_field_decl): Don't append `U' in escaped names.
9752         (mangle_method_decl): Likewise.
9753         (mangle_member_name): Just use `append_gpp_mangled_name.'
9754         * mangle_name.c: New file.
9755
9756 2001-02-07  Per Bothner  <per@bothner.com>
9757
9758         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
9759
9760         * check-init.c (check_init):  Don't call done_alternative after
9761         processing loop code, as a LOOP_EXPR never terminates normally.
9762
9763 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9764
9765         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
9766
9767 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9768
9769         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
9770         DECLs.
9771
9772 2001-02-06  Tom Tromey  <tromey@redhat.com>
9773
9774         * lex.c (java_new_lexer): Longer error message.
9775
9776 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
9777             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9778
9779         * typeck.c (build_prim_array_type): Added leading comment.
9780         (build_java_array_type): Moved locals out of
9781         block. Always create the `data' field, fixed alignment to match
9782         C++.
9783
9784 2001-02-04  Tom Tromey  <tromey@redhat.com>
9785
9786         * expr.c (java_lang_expand_expr): Don't bother recomputing
9787         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
9788         Fixes PR java/1866.
9789
9790 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9791
9792         * parse.y (process_imports): Save the original name of the import
9793         for better error report.
9794
9795 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
9796
9797         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
9798         of macros used when compiling jvspec.c.
9799         * jvspec.c (lang_specific_driver): Link with the shared
9800         libgcc by default.
9801
9802 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9803
9804         * check-init.c (check_init): Call internal_error instead of fatal.
9805         * expr.c (java_lang_expand_expr): Likewise.
9806         * jcf-parse.c (get_constant): Likewise.
9807         * mangle.c (java_mangle_decl): Likewise.
9808         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
9809         (operator_string): Likewise.
9810         * check-init.c (check_init): Call abort instead of fatal.
9811         * class.c (build_class_ref): Likewise.
9812         * constants.c (write_constant_pool): Likewise.
9813         * decl.c (start_java_method): Likewise.
9814         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
9815         (java_stack_dup, encode_newarray_type): Likewise.
9816         (build_java_array_length_access): Likewise.
9817         (build_java_check_indexed_type, expand_java_pushc): Likewise.
9818         (build_java_soft_divmod, build_invokeinterface): Likewise.
9819         * java-tree.h (INNER_CLASS_P): Likewise.
9820         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
9821         (give_name_to_class, get_class_constant): Likewise.
9822         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
9823         (find_constant_index, generate_bytecode_conditional): Likewise.
9824         (generate_bytecode_insns, perform_relocations): Likewise.
9825         * lex.c (java_unget_unicode, java_lex): Likewise.
9826         * mangle.c (mangle_type, mangle_record_type): Likewise.
9827         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
9828         (finish_mangling): Likewise.
9829         * parse.h (MARK_FINAL_PARMS): Likewise.
9830         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
9831         (obtain_incomplete_type, java_complete_class): Likewise.
9832         (java_check_regular_methods, java_complete_expand_method): Likewise.
9833         (cut_identifier_in_qualified, check_deprecation): Likewise.
9834         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
9835         (java_complete_lhs, lookup_name_in_blocks): Likewise.
9836         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
9837         * typeck.c (set_local_type, parse_signature_type): Likewise.
9838         (parse_signature_string, build_java_signature): Likewise;
9839         (set_java_signature): Likewise.
9840         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
9841         * class.c (add_method): Call fatal_error instead of fatal.
9842         (build_static_field_ref): Likewise.
9843         * expr.c (build_known_method_ref, expand_invoke): Likewise.
9844         * jcf-parse.c (get_constant, jcf_parse): Likewise.
9845         * lex.c (java_new_new_lexer): Likewise.
9846         * jv-scan.c (main): Likewise.
9847         (fatal_error): Renamed from fatal.
9848         * jcf-parse.c (yyparse): Call fatal_io_error instead of
9849         pfatal_with_name.
9850         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
9851         (yyparse): Likewise.
9852         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
9853         * lex.c (java_get_line_col): Likewise.
9854         * jcf-parse.c (load_class): Make errors non-fatal.
9855         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
9856
9857 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
9858
9859         * jvgenmain.c (class_mangling_suffix): Remove unused string.
9860         (error): Remove unused function.
9861         (main): Don't use "__attribute__ alias" on generated class symbol.
9862
9863 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9864
9865         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
9866         argument.
9867         * parse.y (finish_method_declaration): Code accounting for WFLed
9868         method DECL_NAMEs deleted.
9869         (check_abstract_method_definitions): Likewise.
9870         (resolve_type_during_patch): Layout resolved type.
9871         * typeck.c (lookup_do): Removed unused local.
9872
9873 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
9874
9875         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
9876         * decl.c (init_decl_processing): Use integer_minus_one_node, not
9877         integer_negative_one_node.
9878         * expr.c (build_java_binop): Likewise.
9879
9880 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
9881
9882         * zextract.c (read_zip_archive): Read file_offset before writing
9883         zipd and consequently clobbering the header contents.
9884
9885 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9886
9887         * Make-lang.in: Remove all dependencies on defaults.h.
9888         * decl.c: Don't include defaults.h.
9889         * expr.c: Likewise.
9890         * parse.y: Likewise.
9891
9892 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9893
9894         * ChangeLog (2001-01-21): Fixed typo.
9895         * class.c (layout_class_method): Code accounting for WFLed
9896         method DECL_NAMEs deleted.
9897         * constant.c (find_methodref_index): Likewise.
9898         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
9899         * java-tree.h (DECL_FUNCTION_WFL): New macro.
9900         (struct lang_decl): New field `wfl'.
9901         (java_get_real_method_name): Prototype deleted.
9902         * mangle.c (mangle_method_decl): Code accounting for WFLed
9903         method DECL_NAMEs deleted.
9904         * parse.h (GET_METHOD_NAME): Macro deleted.
9905         * parse.y (reset_method_name): Deleted.
9906         (method_header): Set DECL_FUNCTION_WFL.
9907         (check_abstract_method_header): Code accounting for WFLed method
9908         DECL_NAMEs deleted.
9909         (java_get_real_method_name): Deleted.
9910         (check_method_redefinition): Code accounting for WFLed method
9911         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
9912         (java_check_regular_methods): Likewise.
9913         (java_check_abstract_methods): Likewise.
9914         (java_expand_classes): Don't call `reset_method_name.'
9915         (search_applicable_method_list): Use DECL_NAMEs instead of
9916         GET_METHOD_NAME.
9917         * typeck.c (lookup_do): Code accounting for WFLed method
9918         DECL_NAMEs deleted.
9919
9920 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
9921
9922         * lex.c (java_read_char): Check for EOF from getc first.
9923
9924 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9925
9926         * class.c (layout_class): Don't lay the superclass out if it's
9927         already being laid out.
9928         * jcf-parse.c (handle_innerclass_attribute): New function.
9929         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
9930         handle_innerclasses_attribute.
9931         (jcf_parse): Don't load an innerclasses if it's already being
9932         laid out.
9933         * jcf-write.c (append_innerclass_attribute_entry): Static
9934         `anonymous_name' and its initialization deleted. `ocii' and `ini'
9935         to be zero for anonymous classes.
9936
9937 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9938
9939         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
9940         necessary.
9941         * jcf-parse.c (set_source_filename): Use
9942         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
9943
9944 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9945
9946         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
9947         gets a unique asm name.
9948
9949 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9950
9951         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
9952         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
9953         if necessary.
9954         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
9955         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
9956         * parse.y (lookup_package_type_and_set_next): Deleted.
9957         (resolve_package): Removed unnecessary code.
9958         (find_applicable_accessible_methods_list): `finit$' can't be
9959         inherited.
9960         * verify.c (pop_argument_types): Added missing prototype.
9961
9962 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
9963
9964         * config-lang.in: Disable java by default.
9965
9966 2001-01-23  Tom Tromey  <tromey@redhat.com>
9967
9968         * gcj.texi (Copying): New node.
9969         Added copyright information.
9970
9971 2001-01-21  Per Bothner  <per@bothner.com>
9972
9973         Various fixes to allow compiling a compressed .jar/.zip archive.
9974         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
9975         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
9976         (struct ZipDirectory):  New field zipf points to owning ZipFile.
9977         * jcf.h (struct ZipDirectory):  Add forward declaration.
9978         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
9979         Remove seen_in_zip and zip_offset fields.
9980         (JCF_SEEN_IN_ZIP):  New macro.
9981         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
9982         * jcf-io.c:  Change all ZipFileCache to ZipFile.
9983         (read_zip_member):  New function.
9984         (open_in_zip):  Call read_zip_member.
9985         * jcf-parse.c (find_in_current_zip):  Remove function.
9986         (read_class):  Merge in find_in_current_zip functionality.
9987         Call read_zip_member if needed.
9988         (parse_zip_file_entries):  Use read_zip_member.
9989         (process_zip_dir):  Update for removed and added JCF fields.
9990         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
9991
9992 2001-01-21  Per Bothner  <per@bothner.com>
9993
9994         Minor optimization of static ggc roots.
9995         * jcf-parse.c (parse_roots):  New static field.
9996         (current_field, current_method, current_file_list):  Replace by macros
9997         naming fields of parse_roots.
9998         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
9999         * class.c (class_roots):  New static field.
10000         (registered_class, fields_ident, info_ident, class_list):
10001         New macros naming fields of parse_roots.
10002         (build_static_field_ref):  Don't register roots here.
10003         (layout_class):  Static field list replaced by macro class_list.
10004         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10005         Initialize fields_ident and info_ident here.
10006
10007 2001-01-21  Per Bothner  <per@bothner.com>
10008
10009         * jcf-parse.c (ggc_mark_jcf):  New function.
10010         (init_jcf_parse):  Register current_jcf as ggc root.
10011
10012 2001-01-21  Per Bothner  <per@bothner.com>
10013
10014         * lang.c (put_decl_node):  Print method's name.
10015
10016 2001-01-21  Per Bothner  <per@bothner.com>
10017
10018         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10019         (verify_jvm_instructions):  Use it, for better error messages on loads.
10020
10021 2001-01-21  Per Bothner  <per@bothner.com>
10022
10023         * verify.c (merge_type_state):  Still may have to merge even if
10024         LABEL_VERIFIED (label).
10025
10026 2001-01-21  Per Bothner  <per@bothner.com>
10027
10028         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10029         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10030
10031 2001-01-19  Per Bothner  <per@bothner.com>
10032
10033         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10034         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10035
10036 2001-01-18  Per Bothner  <per@bothner.com>
10037
10038         * gcj.texi (Input Options): Mention .java files.
10039
10040 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10041
10042         * lang-options.h (-Wunsupported-jdk11): Removed.
10043         * lang.c (flag_not_overriding): Deleted.
10044         (flag_static_local_jdk1_1): Likewise.
10045         (lang_W_options): Removed "unsupported-jdk11" entry.
10046         * parse.y (java_check_methods): Removed dead code.
10047
10048 2001-01-17  Tom Tromey  <tromey@redhat.com>
10049
10050         Changes suggested by Per Bothner:
10051         * gcj.texi (Input Options): Don't mention input files.
10052         (Code Generation): Updated --main information.
10053         (Invoking jcf-dump): Mention that --javap is incomplete.
10054         From Alexandre Petit-Bianco:
10055         (Warnings): Don't mention -Wunsupported-jdk11.
10056         My stuff:
10057         (Compatibility): Mention JDK 1.2-ness of libraries.
10058         (Resources): Mention resources used when writing gcj.
10059
10060 2001-01-17  Tom Tromey  <tromey@redhat.com>
10061
10062         * gcj.texi: New file.
10063         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10064         (java.info): Depend on gcj.info.
10065         (java/gcj.dvi): New target.
10066         (java.dvi): Depend on gcj.dvi.
10067         (java.install-info): Wrote.
10068
10069 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10070
10071         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10072         having called make_decl_rtl.
10073
10074 2001-01-14  Per Bothner  <per@bothner.com>
10075
10076         Various patches to emit better messages on verification errors.
10077         * expr.c (push_type_0):  Return error indication on stack overflow,
10078         instead of callinfg fatal.
10079         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10080         (pop_type_0):  Return detailed error message (in a char** argument).
10081         (pop_type):  If pop_type_0 fails, print error message.
10082         (pop_argument_types):  Moved to verify.c.
10083         * verify.c (pop_argument_types):  Moved from expr.c.
10084         Return a (possible) error message, rather than void.
10085         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10086         (verify_jvm_instruction):  Use new macros, improving error messages.
10087         For case OPCODE_astore use object_ptr_type_node.
10088         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10089         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10090
10091         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10092         constant, return body without wrapper.  (Improves constant folding.)
10093         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10094
10095 2001-01-13  Per Bothner  <per@bothner.com>
10096
10097         * expr.c (expand_java_field_op):  Assigning to a final field outside
10098         an initializer does not violate JVM spec, so should be warning, not
10099         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10100
10101 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10102
10103         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10104         to 2001.
10105
10106 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10107
10108         * parse.y (resolve_expression_name): Permit instance variables from
10109         enclosing context in super constructor call.
10110         (resolve_qualified_expression_name): Permit enclosing class's qualified
10111         "this" in super constructor call.
10112
10113 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10114
10115         * class.c (build_utf8_ref): Remove last argument in call to
10116         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10117         (build_class_ref): Likewise.
10118         (build_static_field_ref): Likewise.
10119         (get_dispatch_table): Likewise.
10120         (layout_class_method): Likewise.
10121         (emit_register_classes): Likewise.
10122         * constants.c (build_constant_data_ref): Likewise.
10123         * decl.c (builtin_function): Likewise.
10124         (create_primitive_vtable): Likewise.
10125         * expr.c (build_known_method_def): Likewise.
10126         (build_jni_stub): Likewise.
10127         (java_lang_expand_expr): Likewise.
10128
10129 2001-01-10  Tom Tromey  <tromey@redhat.com>
10130
10131         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10132
10133 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10134
10135         * java-tree.h (lang_printable_name_wls): New prototype.
10136         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10137         rather than `current_class' to print type name. Don't prepend type
10138         names when printing constructor names.
10139         (lang_printable_name_wls): New function.
10140         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10141         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10142         * parse.y (patch_method_invocation): Message tuned for constructors.
10143         (not_accessible_p): Grant `private' access from within
10144         enclosing contexts.
10145
10146 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10147
10148         All files with updated copyright when applicable.
10149         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10150         * class.c (mangle_class_field): Function removed.
10151         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10152         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10153         (build_class_ref): Call `java_mangle_class_field' instead of
10154         `mangle_class_field.'
10155         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10156         (layout_class): Call `java_mangle_decl' instead of
10157         `mangle_static_field.'
10158         (cxx_keywords): Initialized static array moved to `lex.c.'
10159         (layout_class_method): Changed leading comment. Simplified to
10160         call `java_mangle_decl.' Local `ptr' moved in for loop body.
10161         * decl.c (lang_mark_tree): Mark field `package_list.'
10162         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10163         (struct lang_type): New field `package_list.'
10164         (unicode_mangling_length): Prototype removed.
10165         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10166         emit_unicode_mangled_name): Likewise.
10167         (cxx_keyword_p): New prototype.
10168         (java_mangle_decl, java_mangle_class_field,
10169         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10170         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10171         `build_expr_wfl.'
10172         * jvgenmain.c (main_method_prefix): Global variable removed.
10173         (main_method_suffix): Likewise.
10174         (do_mangle_classname): New function.
10175         (main): Call it. Format changed to accommodate new mangling scheme.
10176         * lex.c: (utf8_cmp): Conditionally prototyped.
10177         (cxx_keywords): Moved from class.c, conditionally defined.
10178         (utf8_cmp, cxx_keyword_p): Likewise.
10179         * mangle.c (obstack.h, ggc.h): Included.
10180         (mangle_field_decl): New function.
10181         (mangle_method_decl, mangle_type, mangle_pointer_type,
10182         mangle_array_type, mangle_record_type,
10183         find_compression_pointer_match, find_compression_array_match,
10184         find_compression_record_match,
10185         find_compression_array_template_match, set_type_package_list,
10186         entry_match_pointer_p, emit_compression_string, init_mangling,
10187         finish_mangling, compression_table_add, mangle_member_name): Likewise.
10188         (mangle_obstack): New global.
10189         (MANGLE_RAW_STRING): New macro.
10190         (unicode_mangling_length): Turned static.
10191         (append_unicode_mangled_name): Renamed from
10192         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
10193         replaces `obstack', removed from the parameter list.
10194         (append_gpp_mangled_name): Turned static. `mangle_obstack'
10195         replaces parameter `obstack', removed from the parameter list. Call
10196         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10197         (append_gpp_mangled_classtype): Removed.
10198         (compression_table, compression_next): New static variables.
10199         * parse.y (temporary_obstack): Extern declaration removed.
10200
10201 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10202
10203         * parse.y (patch_binop): Compute missing type in error situations.
10204
10205 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10206
10207         * class.c (make_class_data): Push initial value for "arrayclass".
10208         * decl.c (init_decl_processing): Add new class field "arrayclass".
10209
10210 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10211
10212         From patha@softlab.ericsson.se:
10213         * parse.y (switch_label): Use build, not build1, to construct
10214         DEFAULT_EXPR.
10215
10216 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10217
10218         * lang.c (lang_decode_option): Change -MA to -MP.
10219         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10220         Update to new prototype; do quote targets.
10221         (jcf_dependency_write): Update.
10222
10223 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
10224
10225         Shorten primitive array allocation path:
10226         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10227         to create new primitive arrays.
10228         * expr.c (build_newarray): If generating native code, call
10229         soft_newarray_node with a reference to the primitive TYPE identifier
10230         instead of type_value.
10231
10232 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
10233
10234         Fix for PRs gcj/312 and gcj/253:
10235         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10236         dest if they arn't already.
10237         * class.c (layout_class): Call maybe_layout_super_class on
10238         superinterfaces also, but only if compiling from bytecode.
10239
10240         Fix for PR gcj/373:
10241         * parse.y (create_class): Set ACC_STATIC if class is declared in an
10242         interface.
10243
10244 2000-12-15  Tom Tromey  <tromey@redhat.com>
10245
10246         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10247         set.
10248
10249 2000-12-14  Andrew Haley  <aph@redhat.com>
10250
10251         * boehm.c (mark_reference_fields): Change test to correctly detect
10252         bitmap overflow.
10253
10254 2000-12-15  Andreas Jaeger  <aj@suse.de>
10255
10256         * config-lang.in (lang_dirs): Added.
10257
10258 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10259
10260         * parse.y (end_artificial_method_body): Fixed undefined behavior.
10261         Credits go to rth for finding it.
10262
10263 2000-12-13  Mike Stump  <mrs@wrs.com>
10264
10265         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10266
10267 2000-11-07  Tom Tromey  <tromey@cygnus.com>
10268
10269         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10270         * lex.c (java_ignorable_control_p): Removed.
10271         (java_letter_or_digit_p): Removed.
10272         (java_start_char_p): New function.
10273         (java_read_char): Return `int', not `unicode_t'.  Changed
10274         callers.
10275         (java_read_unicode): Likewise.
10276         (java_read_unicode_collapsing_terminators): Likewise.
10277         (java_get_unicode): Likewise.
10278         (java_new_lexer): Initialize hit_eof.
10279         (java_parse_end_comment): Take `int' argument.
10280         (java_parse_doc_section): Likewise.
10281         (java_parse_escape_sequence): Don't allow backlash-newline.
10282         Return `int'.
10283         * lex.h (JAVA_DIGIT_P): Removed.
10284         (_JAVA_LETTER_OR_DIGIT_P): Removed.
10285         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10286         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10287         (JAVA_PART_CHAR_P): New macro.
10288         (UEOF): Now -1.
10289         (JAVA_CHAR_ERROR): Now -2.
10290         (java_lexer): New field `hit_eof'.
10291         * chartables.h: New file.
10292         * gen-table.pl: new file.
10293
10294 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10295             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10296
10297         * parse.y (java_complete_lhs): Only allow compound assignment of
10298         reference type if type is String.
10299
10300 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10301
10302         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10303         jcf-path.c: Likewise.
10304
10305 2000-12-09  Anthony Green  <green@redhat.com>
10306
10307         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10308         filestart and filename_length as int values.
10309
10310 2000-12-07  Mo DeJong  <mdejong@redhat.com>
10311
10312         * jcf-io.c (find_class): Correct the logic that tests to see if a
10313         .java file is newer than its .class file. The compiler was
10314         incorrectly printing a warning when file mod times were equal.
10315
10316 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
10317
10318         * jvgenmain.c: Use ISPRINT not isascii.
10319
10320 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10321
10322         * parse.y (end_artificial_method_body): Fixed typo.
10323
10324 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10325
10326         * parse.y (patch_method_invocation): Pick the correct enclosing
10327         context when creating inner class instances.
10328         Fixes gcj/332.
10329
10330 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
10331
10332         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10333         Update copyright year to 2000.
10334
10335 2000-11-23  Anthony Green  <green@redhat.com>
10336
10337         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10338         Move current_file_list out of yyparse and make it static.
10339
10340         * expr.c: Declare quick_stack and tree_list_free_list as static
10341         (init_expr_processing): Register quick_stack and
10342         tree_list_free_list roots.
10343
10344 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10345
10346         * parse.y (build_outer_field_access): New local `decl_ctx', use
10347         it. Check for field's context and current class immediate outer
10348         context inheritance.
10349         (outer_field_access_p): Consider fields inherited from the last
10350         enclosing context.
10351         (build_access_to_thisn): Stop at the last enclosing context if
10352         necessary.
10353         Fixes gcj/367.
10354
10355 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
10356
10357         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10358
10359 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
10360
10361         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10362         scratch buffer.
10363
10364 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10365
10366         * jv-scan.c (help): Document --complexity.
10367         (options): Added --complexity.
10368         (flag_complexity): New global.
10369         (main): Call `report'.
10370         * parse-scan.y (complexity): New global.
10371         (if_then_statement, if_then_else_statement,
10372         if_then_else_statement_nsi, switch_block_statement_group,
10373         while_expression, do_statement, for_begin, continue_statement,
10374         throw_statement, catch_clause, finally, method_invocation,
10375         conditional_and_expression, conditional_or_expression,
10376         conditional_expression): Update complexity.
10377         (reset_report): Reset complexity.
10378         (report): New function.
10379
10380 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10381
10382         * lex.c (yylex): Added STRICT_TK case.
10383         * parse.y (STRICT_TK): Added.
10384         * parse-scan.y (STRICT_TK): Added.
10385         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
10386         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
10387         file.
10388         * keyword.h: Rebuilt.
10389         * keyword.gperf (strictfp): Added.
10390
10391 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10392
10393         * lex.c (yylex): Recognize floating point constants with leading
10394         0.
10395
10396 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10397
10398         * java-tree.h (cyclic_inheritance_report): Constify.
10399         * parse.y (cyclic_inheritance_report): Likewise.
10400
10401 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10402
10403         * parse.y (goal): Remove call to ggc_add_string_root.
10404
10405 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10406
10407         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10408         Create string in scratch buffer, then pass to build_string.
10409
10410 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10411
10412         * parse.y (issue_warning_error_from_context): Add
10413         ATTRIBUTE_PRINTF.
10414
10415 2000-11-11  Anthony Green  <green@redhat.com>
10416
10417         * jcf-parse.c (process_zip_dir): Add finput parameter.
10418         (jcf_figure_file_type): Call process_zip_dir with appropriate
10419         argument.
10420
10421 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10422
10423         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10424         * jcf-parse.c (jcf_figure_file_type): Likewise.
10425
10426 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10427
10428         * parse.y (create_new_parser_context): Use memset () instead of
10429         bzero ().
10430
10431 2000-11-08  Tom Tromey  <tromey@cygnus.com>
10432
10433         * gjavah.c (process_file): Only include gcj/cni.h when generating
10434         CNI stubs.
10435
10436 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10437
10438         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
10439         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
10440         instead of bzero ().
10441
10442 2000-11-05  Tom Tromey  <tromey@cygnus.com>
10443
10444         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
10445         * lex.c (IS_ZERO): New define.
10446         (java_perform_atof): Error on floating point underflow.
10447
10448 2000-11-04  Tom Tromey  <tromey@cygnus.com>
10449
10450         * lex.c (java_parse_escape_sequence): Only read two octal
10451         characters if the first one is greater than 3.  Don't allow
10452         "octal" numbers to include the digits 8 or 9.
10453
10454 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10455
10456         * Make-lang.in (java.distdir): Remove.
10457
10458 2000-11-03  Tom Tromey  <tromey@cygnus.com>
10459
10460         * Make-lang.in (java.dvi): New target.
10461         Partial fix for PR other/567.
10462
10463         * lang-options.h: Mention -Wout-of-date.
10464         * jcf-dump.c (flag_newer): New global.
10465         * gjavah.c (flag_newer): New global.
10466         * jcf-io.c (find_class): Only warn when flag_newer set.
10467         * lang.c (flag_newer): New global.
10468         (struct string_option): New declaration.
10469         (lang_W_options): New global.
10470         (process_option_with_no): New function.
10471         (lang_decode_option): Use it.
10472
10473         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
10474         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
10475         `$'.
10476
10477         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
10478         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
10479         * lex.c (java_read_unicode): Removed `term_context' argument.
10480         Recognize any number of `u' in `\u'.
10481         (java_read_unicode_collapsing_terminators): New function.
10482         (java_get_unicode): Use it.
10483         (java_lineterminator): Removed.
10484         (yylex): Produce error if character literal is newline or single
10485         quote.  Return if eof found in middle of `//' comment.  EOF in
10486         `//' comment is only an error if pedantic.
10487         (java_ignorable_control_p): New function.
10488         (java_parse_end_comment): Return if eof found in middle of
10489         comment.
10490         Include flags.h.
10491         * jv-scan.c (pedantic): New global.
10492
10493 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10494
10495         * parse.y (outer_field_access_p): Inherited fields aren't
10496         consider outer fields.
10497         (maybe_build_thisn_access_method): Use
10498         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
10499         (resolve_expression_name): Trigger an error if a static field
10500         is being accessed as an outer field.
10501
10502 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10503
10504         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
10505         Fixes gcj/365.
10506
10507 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10508
10509         * Make-lang.in: Move all build rules here from Makefile.in,
10510         adapt to new context.  Wrap all rules that change the current
10511         directory in parentheses.  Expunge all references to $(P).
10512         When one command depends on another and they're run all at
10513         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10514         all object-file generation rules.  Delete obsolete variables.
10515
10516         * Makefile.in: Delete.
10517         * config-lang.in: Delete outputs= line.
10518
10519 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10520
10521         * parse.y (patch_method_invocation): NULLify this_arg when already
10522         inserted.
10523         (maybe_use_access_method): Handle call to methods unrelated to the
10524         current class. Fixed comment.
10525         Fixes gcj/361.
10526
10527 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10528
10529         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
10530         scope.
10531
10532 2000-10-24  Tom Tromey  <tromey@cygnus.com>
10533
10534         * lex.c (java_new_lexer): Initialize new fields.  Work around
10535         broken iconv() implementations.
10536         (java_read_char): Swap bytes if required.  Use fallback decoder if
10537         required.
10538         (byteswap_init, need_byteswap): New globals.
10539         (java_destroy_lexer): Only close iconv handle if it is in use.
10540         * lex.h (java_lexer): New fields read_anything, byte_swap,
10541         use_fallback.
10542         Made out_buffer unsigned.
10543
10544 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10545
10546         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
10547         where an enclosing context can be set on the jdep.
10548         (do_resolve_class): Fixed identation.
10549
10550 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10551
10552         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
10553
10554         * jcf-reader.c (peek_attribute, skip_attribute): Only define
10555         when requested.
10556
10557         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
10558
10559         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
10560
10561 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10562
10563         * jcf-write.c (OP1): Update `last_bc'.
10564         (struct jcf_block): Fixed indentation and typo in comments.  New
10565         field `last_bc'.
10566         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
10567         follows `monitorenter'.
10568         * parse.y (patch_synchronized_statement): New local `tmp'. Call
10569         `patch_string'.
10570         Fixes gcj/232.
10571
10572 2000-10-16  Tom Tromey  <tromey@cygnus.com>
10573
10574         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
10575         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
10576         * lang-options.h: Added -MA, -MT, -MF..
10577         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
10578         (DEPEND_TARGET_SET): New macro.
10579         (DEPEND_FILE_ALREADY_SET): Likewise.
10580         (init_parse): Handle new flags.
10581         * jcf.h (jcf_dependency_print_dummies): Declare.
10582         * Make-lang.in (s-java): Added mkdeps.o.
10583         * Makefile.in (BACKEND): Added mkdeps.o.
10584         (../gcjh$(exeext)): Added mkdeps.o.
10585         (../jcf-dump$(exeext)): Added mkdeps.o.
10586         * jcf-depend.c: Include mkdeps.h.
10587         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
10588         add_entry): Removed.
10589         (jcf_dependency_reset): Rewrote.
10590         (dependencies): New global.
10591         (jcf_dependency_set_target): Rewrote.
10592         (jcf_dependency_add_target): Likewise.
10593         (jcf_dependency_add_file): Likewise.
10594         (munge): Removed.
10595         (print_ents): Removed.
10596         (jcf_dependency_write): Rewrote.
10597         (print_dummies): New global.
10598         (jcf_dependency_print_dummies): New function
10599         (jcf_dependency_write): Call deps_dummy_targets if required.
10600
10601 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10602
10603         * gjavah.c (add_class_decl): Removed unused variables `tname',
10604         `tlen' and `name_index'.
10605         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
10606         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
10607         in `wfl_operator' with value.
10608         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
10609         (jcf_figure_file_type): Fixed identation.
10610         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
10611         * parse.y (analyze_clinit_body): New function.
10612         (static_initializer:): Reset `current_static_block'.
10613         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
10614         `wfl_operator' with new value.
10615         (lookup_cl): Use EXPR_WFL_FILENAME.
10616         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
10617         analyze_clinit_body.
10618         (build_outer_field_access): Access to this$<n> built from
10619         current_class, not its outer context.
10620         (build_access_to_thisn): Fixed leading comment. Tidied things up.
10621         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
10622         (patch_method_invocation): Use `is_static_flag' when already
10623         initialized.
10624         (patch_newarray): Removed assignment in ternary operator.
10625
10626 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10627
10628         * except.c (free_eh_ranges): Don't free `whole_range'.
10629
10630 2000-10-15  Anthony Green  <green@redhat.com>
10631
10632         * decl.c (init_decl_processing): Call init_class_processing before
10633         anything else.
10634
10635 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10636
10637         * check-init.c (check_init): Fixed leading comment. Use
10638         LOCAL_FINAL_P.
10639         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10640         (give_name_to_locals): Likewise.
10641         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
10642         fields in lang_decl_var.
10643         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
10644         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
10645         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
10646         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
10647         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
10648         (LOCAL_FINAL): Rewritten.
10649         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
10650         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
10651         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
10652         `init_final' fields.
10653         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
10654         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
10655         (TYPE_HAS_FINAL_VARIABLE): New macro.
10656         (struct lang_type): Added `afv' field.
10657         * parse.y (check_static_final_variable_assignment_flag): New function.
10658         (reset_static_final_variable_assignment_flag): Likewise.
10659         (check_final_variable_local_assignment_flag): Likewise.
10660         (reset_final_variable_local_assignment_flag): Likewise.
10661         (check_final_variable_indirect_assignment): Likewise.
10662         (check_final_variable_global_assignment_flag): Likewise.
10663         (add_inner_class_fields): Use LOCAL_FINAL_P.
10664         (register_fields): Handle local finals and final variables.
10665         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
10666         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10667         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10668         on local finals.
10669         (java_complete_expand_methods): Loop to set
10670         TYPE_HAS_FINAL_VARIABLE. Call
10671         `reset_final_variable_local_assignment_flag' and
10672         `check_final_variable_local_assignment_flag' accordingly before
10673         and after constructor expansion. Call
10674         `reset_static_final_variable_assignment_flag'
10675         before expanding <clinit> and after call
10676         `check_static_final_variable_assignment_flag' if the
10677         current_class isn't an interface. After all methods have been
10678         expanded, call `check_final_variable_global_assignment_flag' and
10679         `check_static_final_variable_assignment_flag' if the current class
10680         is an interface.
10681         (maybe_yank_clinit): Fixed typo in comment.
10682         (build_outer_field_access_methods): Removed old sanity check. Use
10683         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10684         Don't create access methods for finals.
10685         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
10686         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
10687         existing DECL_INIT has been processed.
10688         (java_complete_lhs): Likewise.
10689         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
10690         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
10691         logic.
10692         (patch_assignment): Use LOCAL_FINAL_P.
10693         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
10694         DECL_INITIAL is nullified.
10695         Fixes gcj/163.
10696
10697 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10698
10699         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
10700
10701         * Makefile.in (parse.c, parse-scan.c): Likewise.
10702
10703 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10704
10705         * class.c (temporary_obstack): Remove.
10706         (make_class): Don't mess with obstascks.
10707         (push_class): Likewise.
10708         (set_super_info): Likewise.
10709         (add_method_1): Likewise.
10710         (add_method): Likewise.
10711         (add_field): Likewise.
10712         (build_utf8_ref): Likewise.
10713         (build_class_ref): Likewise.
10714         (build_static_field_ref): Likewise.
10715         (finish_class): Likewise.
10716         (push_super_field): Likewise.
10717         (layout_class): Likewise.
10718         (layout_class_methods): Likewise.
10719         (init_class_processing): Likewise.
10720         * constants.c (get_tag_node): Likewise.
10721         (build_constant_data_ref): Likewise.
10722         * decl.c (ggc_p): Remove.
10723         (copy_lang_decl): Use ggc_alloc.
10724         (complete_start_java_method): Don't mess with obstacks.
10725         (start_java_method): Likewise.
10726         (end_java_method): Likewise.
10727         * except.c (link_handler): Use xmalloc.
10728         (free_eh_ranges): New function.
10729         (method_init_exceptions): Use it.
10730         (add_handler): Use xmalloc.
10731         (expand_start_java_handler): Don't mess with obstacks.
10732         (prepare_eh_table_type): Likewise.
10733         (expand_end_java_handler): Likewise.
10734         * expr.c (push_value): Likewise.
10735         (create_label_decl): Likewise.
10736         (build_jni_stub): Likewise.
10737         (java_lang_expand_expr): Likewise.
10738         (note_instructions): Use xrealloc.
10739         (java_push_constant_from_pool): Don't mess with obstacks.
10740         (process_jvm_instruction): Likewise.
10741         * java-tree.h (cyclic_inheritance_report): Remove duplicate
10742         declaration.
10743         * jcf-parse.c (get_constant): Don't mess with obstacks.
10744         (read_class): Likewise.
10745         (jcf_parse): Likewise.
10746         * lex.c (expression_obstack): Remove.
10747         (java_lex): Don't use obstack_free.
10748         * parse.h (exit_java_complete_class): Don't mess with obstacks.
10749         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
10750         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
10751         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
10752         * parse.y (gaol): Add more GC roots.
10753         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
10754         (lookup_field_wrapper): Likewise.
10755         (obtain_incomplete_type): Don't mess with obstacks.
10756         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
10757         macros.
10758         (craft_constructor): Don't mess with obstacks.
10759         (safe_layout_class): Likewise.
10760         (java_complete_class): Likewise.
10761         (source_end_java_method): Likewise.
10762         (build_outer_field_access_methods): Likewise.
10763         (build_outer_method_access_method): Likewise.
10764         (maybe_build_thisn_access_method): Likewise.
10765         (build_dot_class_method_invocation): Likewise.
10766         (java_complete_tree): Likewise.
10767         (java_complete_lhs): Likewise.
10768         (do_merge_string_cste): Likewise.
10769         (patch_string_cst): Likewise.
10770         (array_constructor_check_entry): Likewise.
10771         * typeck.c (build_java_array_type): Likewise.
10772         (parse_signature_string): Likewise.
10773         (build_java_signature): Likewise.
10774
10775 2000-10-12  Tom Tromey  <tromey@cygnus.com>
10776
10777         Fix for PR gcj/356:
10778         * gjavah.c (add_class_decl): Don't special-case inner classes.
10779         (add_namelet): Likewise.
10780
10781 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
10782
10783         * java-tree.h: Constify current_encoding.
10784         * lang.c: Constify current_encoding.
10785
10786 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
10787
10788         * jvgenmain.c (class_mangling_suffix): Omit `.'.
10789         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
10790
10791 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10792
10793         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
10794         patch. Fixes gcj/340.
10795
10796 2000-10-10  Tom Tromey  <tromey@cygnus.com>
10797
10798         * lex.c (java_new_lexer): Initialize out_first and out_last
10799         fields.
10800         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
10801
10802 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10803
10804         * parse.y (pop_current_osb): New function.
10805         (array_type:): Use `dims:', changed actions
10806         accordingly. Suggested by Anthony Green.
10807         (array_creation_expression:): Used pop_current_osb.
10808         (cast_expression:): Likewise.
10809         (search_applicable_method_list): Fixed indentation.
10810
10811 2000-10-08  Anthony Green  <green@redhat.com>
10812
10813         * parse.y (array_type_literal): Remove production.
10814         (type_literals): Refer to array_type, not array_type_literal.
10815
10816 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10817
10818         Patch contributed by Corey Minyard.
10819         * decl.c (check_local_named_variable): New function.
10820         (tree check_local_unnamed_variable): Likewise.
10821         (find_local_variable): Splitted. Call check_local_{un}named_variable.
10822
10823 2000-10-07  Anthony Green  <green@redhat.com>
10824
10825         * class.c (layout_class): Handle case where superclass can't be
10826         layed out yet.
10827
10828 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10829
10830         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
10831         gperf.
10832
10833 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10834
10835         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
10836         * jvgenmain.c (class_mangling_prefix): Removed.
10837         (class_mangling_suffix): New global.
10838         (main): Use it.
10839         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
10840         `$'.
10841         (print_method_info): Handle overrides for static and final
10842         methods.
10843         (process_file): Generate declaration for class object field.
10844         * class.c (cxx_keywords): New array.
10845         (utf8_cmp): New function.
10846         (cxx_keyword_p): New function.
10847         (layout_class_method): Mangle C++ keywords by appending `$'.
10848         (mangle_field): New function.
10849         (mangle_class_field): Use mangle_field.  Mangle class name as
10850         `class$'.
10851         (mangle_static_field): Use mangle_field.
10852
10853 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10854
10855         * decl.c (find_local_variable): Removed uncessary type check and
10856         fixed range check typo. From Corey Minyard.
10857
10858 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10859
10860         * decl.c (give_name_to_locals): New local `code_offset'. Call
10861         `maybe_adjust_start_pc'.
10862         * expr.c (note_instructions): New function.
10863         (expand_byte_code): Don't collect insn starts here.
10864         (peek_opcode_at_pc): New function.
10865         (maybe_adjust_start_pc): Likewise.
10866         * java-tree.h (maybe_adjust_start_pc): Declare.
10867         (note_instructions): Likewise.
10868         * jcf-parse.c (parse_class_file): Call `note_instructions'.
10869
10870 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10871
10872         * parse.y (field_access:): Fixed indentation.
10873         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
10874
10875 2000-09-07  Tom Tromey  <tromey@cygnus.com>
10876
10877         Fix for PR gcj/307:
10878         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
10879         JPRIMITIVE_TYPE_P, for arithmetic operators.
10880         (patch_method_invocation): Indentation fix.
10881         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
10882         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
10883         (do_unary_numeric_promotion): Cleaned up code.
10884         (valid_cast_to_p): Handle boolean correctly.
10885
10886 2000-09-27  Tom Tromey  <tromey@cygnus.com>
10887
10888         * lex.c (java_read_unicode): Reset bs_count when finished with
10889         `\u' sequence.
10890
10891 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10892
10893         Convert to GC.
10894         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
10895         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
10896         (typeck.o): Depend on ggc.h.
10897         * class.c (add_method_1): Use GC functions for allocation.
10898         (init_class_processing): Register roots.
10899         * decl.c (ggc_p): Set to 1.
10900         (pending_local_decls): Make it static.
10901         (push_jvm_slot): Use GC functions for allocation.
10902         (init_decl_processing): Register roots.
10903         (give_name_to_locals): Use GC functions for allocation.
10904         (lang_mark_tree): New function.
10905         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
10906         functions for allocation.
10907         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
10908         * lex.c (java_lex): Use build_string, rather than replicating it
10909         inline.
10910         * parse.y (goal): Add more roots.
10911         (mark_parser_ctxt): New function.
10912         * typeck.c: Include ggc.h.
10913
10914 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10915
10916         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
10917         contains something else than MODIFY_EXPR.
10918
10919 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
10920
10921         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
10922         * Makefile.in (parse.o): Depend on ggc.h.
10923         (class.o): Likewise.
10924         (constants.o): Likewise.
10925         (decl.o): Likewise.
10926         (expr.o): Likewise.
10927         (jcf-parse.o): Likewise.
10928         (jcf-write.o): Likewise.
10929         (mangle.o): Likewise.
10930         * class.c: Include ggc.h.
10931         (build_static_field_ref): Register GC roots.
10932         (layout_class): Likewise.
10933         (init_class_processing): Likewise.
10934         * constants.c: Include ggc.h.
10935         (current_constant_pool_data_ref): Remove.
10936         (tag_nodes): Move it to ...
10937         (get_tag_node): ... here.  Register GC roots.
10938         * decl.c: Include ggc.h.  Remove many global tree definitions.
10939         (throw_node): Define.
10940         (java_global_trees): Likewise.
10941         (predef_filenames): Make the size a constant.
10942         (init_decl_processing): Adjust accordingly.
10943         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
10944         * expr.c: Include ggc.h.
10945         (init_expr_processing): Register GC roots.
10946         (build_invokeinterface): Likewise.
10947         * java-tree.h: Replace extern tree declarations with macros.
10948         (java_global_trees): New variable.
10949         (java_tree_index): New enumeration.
10950         (init_jcf_parse): Declare.
10951         * jcf-parse.c: Include ggc.h.
10952         (current_class): Remove declaration.
10953         (main_class): Likewise.
10954         (all_class_list): Likewise.
10955         (predefined_filename_p): Adjust for constant size of
10956         predef_filenames.
10957         (init_jcf_parse): New function.
10958         * jcf-write.c: Include ggc.h.
10959         (generate_classfile): Register GC roots.
10960         (append_synthetic_attribute): Likewise.
10961         (append_innerclass_attribute_entry): Likewise.
10962         * lang.c: Include ggc.h.
10963         (lang_print_error): Register GC roots.
10964         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
10965         with macros.
10966         * parse.y: Include ggc.h.
10967         (wfl_operator): Remove.
10968         (goal): Register GC roots.
10969         (java_pop_parser_context): Adjust for new field names.
10970         (java_parser_context_save_global): Likewse.
10971         (java_parser_context_restore_global): Likewise.
10972         (java_parser_context_suspend): Likewise.
10973         (java_parser_context_resume): Likewise.
10974         (verify_constructor_circularity): Register GC roots.
10975         (lookup_cl): Likewise.
10976         (java_reorder_fields): Likewise.
10977         (build_current_this): Likewise.
10978         (class_in_current_package): Likewise.
10979         (argument_types_convertible): Likewise.
10980         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
10981
10982 2000-09-14  Tom Tromey  <tromey@cygnus.com>
10983
10984         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
10985
10986 2000-09-13  Tom Tromey  <tromey@cygnus.com>
10987
10988         * jcf-parse.c: Include <locale.h>.
10989         * jv-scan.c: Include <locale.h>.
10990
10991 2000-09-12  Tom Tromey  <tromey@cygnus.com>
10992
10993         * expr.c (pop_type_0): Return `Object' if trying to merge two
10994         interface types.
10995         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
10996         interface types; `Object' is always a valid supertype.
10997
10998 2000-09-12  Tom Tromey  <tromey@cygnus.com>
10999
11000         Fix for PR gcj/33:
11001         * jv-scan.c (help): Document --encoding.
11002         (options): Added `encoding' entry.
11003         (OPT_ENCODING): New define.
11004         (main): Handle --encoding.
11005         Include <langinfo.h> if nl_langinfo exists.
11006         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11007         --encoding.
11008         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11009         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11010         argument.  Use nl_langinfo to determine default encoding.
11011         * java-tree.h (current_encoding): Declare.
11012         * parse.y (java_parser_context_restore_global): Don't restore
11013         `finput'.
11014         (java_parser_context_save_global): Don't set `finput' field.
11015         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11016         if required.
11017         * lang.c (current_encoding): New global.
11018         (lang_decode_option): Recognize `-fencoding='.
11019         (finish_parse): Don't close finput.
11020         * parse.h (struct parser_ctxt): Removed `finput' and
11021         `unget_utf8_value' fields.  Added `lexer' field.
11022         (java_init_lex): Fixed declaration.
11023         * lex.c (java_new_lexer): New function.
11024         (java_destroy_lexer): Likewise.
11025         (java_read_char): Added `lex' argument.  Handle iconv case.
11026         (java_read_unicode): Added `lex' argument.  Count backslashes in
11027         lexer structure.
11028         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11029         `lexer' field in ctxp.
11030         (BAD_UTF8_VALUE): Removed.
11031         (java_lex): Handle seeing UEOF in the middle of a string literal.
11032         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11033         (java_lexer): New structure.
11034         (UNGETC): Removed.
11035         (GETC): Removed.
11036         (DEFAULT_ENCODING): New define.
11037         (java_destroy_lexer): Declare.
11038
11039 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11040
11041         Fix for PR gcj/343:
11042         * lex.c (java_init_lex): Initialize java_io_serializable.
11043         * parse.y (java_io_serializable): New global.
11044         (valid_ref_assignconv_cast_p): An array can be cast to
11045         serializable.
11046
11047 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11048
11049         * decl.c, expr.c: Include defaults.h if not already included.
11050         Don't define the *_TYPE_SIZE macros.
11051
11052 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11053
11054         * typeck.c (build_java_array_type): Correct first parameter
11055         in ADJUST_FIELD_ALIGN invocation.
11056
11057 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11058
11059         * lang-specs.h: Also recognize `-femit-class-files'.
11060
11061 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11062
11063         * verify.c (merge_types): Load the types to merge if necessary.
11064
11065 2000-09-02  Anthony Green  <green@redhat.com>
11066
11067         * jcf-io.c: Include zlib.h.
11068         (open_in_zip): Read compressed class file archives.
11069         * zipfile.h (ZipDirectory): Add uncompressed_size and
11070         compression_method fields.
11071         * zextract.c (read_zip_archive): Collect file compression info.
11072
11073 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11074
11075         * parse.y (do_resolve_class): Also explore superclasses of
11076         intermediate enclosing contexts when searching for inner classes.
11077
11078 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11079
11080         * parse.y (variable_declarator_id:): Better error message.
11081         (expression_statement:): Use YYNOT_TWICE.
11082         (cast_expression:): Likewise.
11083         (assignment:): Likewise.
11084
11085 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11086
11087         * parse.y (do_merge_string_cste): New locals. Create new
11088         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11089
11090 2000-08-07  Hans Boehm  <boehm@acm.org>
11091
11092         * boehm.c (mark_reference_fields): Set marking bits for all words in
11093         a multiple-word record.
11094         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11095         java.lang.Class.
11096
11097 2000-08-31  Mike Stump  <mrs@wrs.com>
11098
11099         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11100         jcf-dump$(exeext)): Make parallel safe.
11101
11102 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11103
11104         * jcf-parse.c (set_source_filename): Constify a char *.
11105         * jcf-write.c (append_innerclasses_attribute,
11106         make_class_file_name): Constify a char *.  Don't recycle a
11107         variable for an unrelated purpose.
11108         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11109         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11110
11111 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11112
11113         * expr.c (can_widen_reference_to): Fixed indentation.
11114         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11115         * parse.y: `finit$' replaces `$finit$' in comments.
11116         (try_builtin_assignconv): Fixed leading comment.
11117
11118 2000-08-25  Greg McGary  <greg@mcgary.org>
11119
11120         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11121
11122 2000-08-24  Greg McGary  <greg@mcgary.org>
11123
11124         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11125         * parse.y (BINOP_LOOKUP): Likewise.
11126
11127 2000-08-22  Andrew Haley  <aph@cygnus.com>
11128
11129         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11130         sign extending. Fixes gcj/321.
11131         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11132         combining to make a jlong. Fixes gcj/321.
11133
11134 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11135
11136         * lang-specs.h: Do not process -o or run the assembler if
11137         -fsyntax-only.
11138
11139 2000-08-16  Andrew Haley  <aph@cygnus.com>
11140
11141         * typeck.c (build_java_array_type): Rewrite code to do array
11142         alignment.  Take into account back-end macros when aligning array
11143         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11144         user to set alignment. Fixes gcj/252 and 160.
11145
11146 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11147
11148         * parse.y (check_abstract_method_definitions): Now return `int'.
11149         Check implemented interfaces.  Fixes PR gcj/305.
11150
11151         * parse.y (patch_switch_statement): Disallow `long' in switch
11152         expressions.  Fixes PR gcj/310.
11153
11154 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11155
11156         * decl.c (finit_leg_identifier_node): New global.
11157         (init_decl_processing): Use `finit$' to initialize
11158         finit_identifier_node. Use `$finit$' to initialize
11159         finit_leg_identifier_node.
11160         * expr.c (expand_java_field_op): Use ID_FINIT_P.
11161         * java-tree.h (finit_identifier_node): Changed attached comment.
11162         (finit_leg_identifier_node): New declaration.
11163         (ID_FINIT_P): Take finit_identifier_node and
11164         finit_leg_identifier_node into account. This is a backward
11165         compatibility hack.
11166
11167 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11168
11169         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11170         Jan 6 2000 patch.
11171         (generate_bytecode_insns): Check `nargs' before emitting it.
11172         * verify.c (merge_type_state): Fixed typo.
11173         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11174         generate_bytecode_{conditional,insns}.
11175
11176 2000-08-13  Anthony Green  <green@redhat.com>
11177
11178         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11179         for -pg builds).
11180
11181 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11182
11183         * class.c (maybe_layout_super_class): Fixed indentation.
11184         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11185         (java_check_methods): New function declaration.
11186         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11187         instead of `str_ptr'.
11188         * jcf-write.c (generate_bytecode_insns): Emit number the of args
11189         of a `invokeinterface' at the right time.
11190         * parse.h (WFL_STRIP_BRACKET): New macro.
11191         (SET_TYPE_FOR_RESOLUTION): Use it.
11192         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11193         (check_class_interface_creation): Don't check for cross package
11194         innerclass name clashes.
11195         (method_header): Behave properly if MDECL is `error_mark_node'.
11196         (method_declarator): Return `error_mark_node' if bogus current
11197         class.
11198         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11199         (resolve_and_layout): New local `decl_type', set and used. Call
11200         java_check_methods.
11201         (java_check_methods): New method.
11202         (java_layout_classes): Use it.
11203         (resolve_qualified_expression_name): No EH check necessary in
11204         access$<n>.
11205         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11206         `case' statement.
11207         (patch_assignment): Set DECL_INITIAL on integral final local.
11208
11209 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11210
11211         * java-tree.h (flag_extraneous_semicolon): New extern.
11212         * lang-options.h: (-Wextraneous-semicolon): New option.
11213         * lang.c (flag_redundant): Fixed typo in leading comment.
11214         (flag_extraneous_semicolon): New global.
11215         (lang_decode_option): Set `flag_extraneous_semicolon' when
11216         -Wall. Decode `-Wextraneous-semicolon'.
11217         * parse.y (type_declaration:): Removed `SC_TK' hack, added
11218         `empty_statement' rule.
11219         (class_body_declaration): Likewise.
11220         (method_body:): Accept `;' as a method body.
11221         (static_initializer:): Removed `SC_TK' hack.
11222         (constructor_block_end:): Likewise.
11223         (empty_statement:): Report deprecated empty declaration. Fixes
11224         gcj/295
11225
11226 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11227
11228         * parse.y (build_dot_class_method_invocation): Changed parameter
11229         name to `type'. Build signature from `type' and convert it to a
11230         STRING_CST if it's an array.
11231         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11232         to use `ref_type' directly.
11233
11234 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
11235
11236         * lang-options.h: Added a comma after the last element to avoid
11237         syntax errors when other languages define additional options.
11238
11239 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11240
11241         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11242         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11243         (jc1): Link with $(BACKEND).
11244         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11245
11246 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11247
11248         * jvspec.c: Adjust type of second argument to
11249         lang_specific_driver, and update code as necessary.
11250
11251         * class.c (build_dtable_decl): Initialize dummy.
11252
11253 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11254
11255         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11256         method bodies not to rule out discarding `<clinit>'; don't use
11257         <clinit> to initialize static fields with constant initializers.
11258
11259 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11260
11261         * gjavah.c (print_method_info): Added `synth' parameter. Skip
11262         synthetic methods.
11263         (method_synthetic): New global.
11264         (HANDLE_METHOD): Recognize synthetic method and tell
11265         `print_method_info' about it.
11266         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11267         processing a synthetic method.
11268         * jcf-reader.c (skip_attribute): New function.
11269         ( skip_attribute): Likewise.
11270
11271 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11272
11273         * parse.y (build_outer_field_access): Fixed comments.
11274         (fix_constructors): Emit the initialization of this$<n> before
11275         calling $finit$.
11276         (resolve_qualified_expression_name): Build an access to `decl' if
11277         necessary.
11278
11279 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11280
11281         * parse-scan.y (curent_class): Non longer const.
11282         (inner_qualifier, inner_qualifier_length): Deleted.
11283         (current_class_length): New global.
11284         (bracket_count): Fixed typo in leading comment.
11285         (anonymous_count): New global.
11286         (class_instance_creation_expression:): Handle anonymous classes.
11287         (anonymous_class_creation:): New rule.
11288         (push_class_context): Rewritten.
11289         (pop_class_context): Likewise.
11290         (INNER_QUALIFIER): Macro deleted.
11291         (report_class_declaration): call `push_class_context' when
11292         entering the function. `fprintf' format modified not to use
11293         INNER_QUALIFIER.
11294         (report_class_declaration): Assign `package_name' and
11295         `current_class' to NULL separately.
11296
11297 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11298
11299         * expr.c (build_invokeinterface): Call layout_class_methods on
11300         target interface.
11301
11302 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11303             Anthony Green  <green@cygnus.com>
11304             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11305
11306         * class.c (make_class_data): Create vtable for abstract classes.
11307         (get_dispatch_table): Changed to cope with abstract classes.
11308
11309 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11310
11311         * parse.y (patch_method_invocation): Don't reverse the argument
11312         list when dealing with anonymous class constructors. Fixed typo in
11313         comment.
11314
11315 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11316
11317         * parse.y (build_alias_initializer_parameter_list): Reverse
11318         crafted list when building aliases for anonymous class
11319         constructors.
11320
11321 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11322
11323         * parse.y (jdep_resolve_class): Don't bother checking potential
11324         innerclass access if `decl' is NULL.
11325         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11326         WFL.
11327
11328 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11329
11330         * parse.c: Remove (again.)
11331
11332 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11333
11334         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11335         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
11336         outside the `if' statement, alias to innerclass removed, `decl'
11337         used to mark the class complete.
11338
11339 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11340
11341         * parse.y (simple_name:): Fixed typo in error message.
11342
11343 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11344
11345         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11346         or its first operand can be error marks.
11347
11348 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11349
11350         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11351         * parse.y (method_header): Likewise.
11352
11353 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11354
11355         * parse.y (process_imports): Consider that one might be trying to
11356         import an innerclass. Fixes gcj/254
11357
11358 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11359
11360         * parse.y (find_as_inner_class): Handle the case where the
11361         enclosing context of an innerclass has been loaded as bytecode.
11362
11363 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11364
11365         * parse.y (simple_name:): Reject `$' in type names.
11366         (resolve_type_during_patch): Use `type' as a second
11367         argument to resolve_no_layout. Fixes gcj/257.
11368
11369 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
11370
11371         * parse.y (find_most_specific_methods_list): Select the only
11372         non-abstract method even if max has been set.
11373         Fixes gcj/285, gcj/298.
11374
11375 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
11376
11377         * lang-specs.h: Added %(jc1) to java compiler options.
11378
11379 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11380
11381         * .cvsignore: New file.
11382
11383 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11384
11385         * parse.y (not_accessible_p): Access granted to innerclasses
11386         (indirectly) extending the reference type. Fixes gcj/249.
11387
11388 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11389
11390         * parse.y (patch_method_invocation): Fixed comment.
11391         (maybe_use_access_method): Build this$<n>s to the context of the
11392         target method, or a type that extends it. Fixes gcj/242.
11393
11394 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11395
11396         * parse.c: Remove.
11397
11398 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11399
11400         * parse.y (fold_constant_for_init): Avoid bullish conversion.
11401
11402 2000-07-13  Tom Tromey  <tromey@cygnus.com>
11403
11404         * lang-specs.h: Added %{I*}.
11405
11406 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11407
11408         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11409
11410 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11411
11412         * parse-scan.c: Remove.
11413
11414 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11415
11416         * class.c (set_super_info): Handled protected inner classes.
11417         (common_enclosing_context_p): Bail early if arguments aren't both
11418         inner classes.
11419         (get_access_flags_from_decl): Handle private and protected inner
11420         classes.
11421         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
11422         (CLASS_PROTECTED): Likewise.
11423         (struct lang_type): New bitfield `poic'.
11424         * parse.y (jdep_resolve_class): Call check_inner_class_access on
11425         inner classes only.
11426         (check_inner_class_access): Renamed arguments, added
11427         comments. Handles protected inner classes (fixes gcj/225)
11428         (not_accessible_p): Fixed comments. Avoid handling inner classes.
11429
11430 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11431
11432         * parse.y (resolve_qualified_expression_name): Verify qualified
11433         access to `this'. Fixes gcj/239.
11434
11435 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11436
11437         * jcf-write.c (generate_classfile): Don't install ConstantValue
11438         for null pointers.
11439
11440 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11441
11442         * parse.y (resolve_qualified_expression_name): Handle inner class
11443         access. Fixes gcj/256.
11444
11445 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11446
11447         * jcf-write.c (generate_classfile): Properly install the
11448         ConstantValue attribute and the initial value constant pool index
11449         on string constants.
11450         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
11451         class files.
11452
11453 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11454
11455         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
11456         construct.
11457         * parse.y (find_as_inner_class): Fixed typo.
11458         (do_resolve_class): Explore enclosing contexts when searching for
11459         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
11460         (check_inner_class_access): Check `decl' which can be null in case
11461         of previous errors.
11462
11463 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11464
11465         * java-tree.h (java_debug_context): Declared `extern'.
11466         (safe_layout_class): Likewise.
11467         * parse.y (resolve_field_access): Field must be `static' in order
11468         to be replaced by its initial value. Added comments.
11469         (find_applicable_accessible_methods_list): Fixed typo.
11470         (find_most_specific_methods_list): Methods found in innerclasses
11471         take over methods founds in the enclosing contexts.
11472         (java_complete_tree): Loosen restrictions on the type of DECLs
11473         that can be replaced by their initialization values.
11474         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
11475
11476 2000-07-05  Tom Tromey  <tromey@cygnus.com>
11477
11478         * Make-lang.in (PARSE_DIR): New macro.
11479         (PARSE_RELDIR): Likewise.
11480         (PARSE_C): Likewise.
11481         (PARSE_SCAN_C): Likewise.
11482         ($(PARSE_C)): New target.
11483         ($(PARSE_SCAN_C)): Likewise.
11484         (SET_BISON): New macro.
11485         (BISONFLAGS): Likewise.
11486         (JAVABISONFLAGS): Likewise.
11487
11488 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
11489
11490         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
11491         argument on the first pass for CNI as well as JNI.
11492         (print_method_info): Set up method name on the first pass only.
11493
11494 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11495
11496         * parse.y (parser_qualified_classname): Removed parameter
11497         `is_static'.
11498         (create_interface): Removed first passed parameter to
11499         parser_qualified_classname.
11500         (create_class): Likewise. Don't install alias on static
11501         innerclasses. Fixes gcj/275.
11502
11503 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11504
11505         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
11506         debugable statement with empty_stmt_node. Fixes gcj/272
11507
11508 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11509
11510         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
11511         gcj/271.
11512
11513 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11514
11515         * jcf-write.c (push_long_const): Appropriately cast short negative
11516         constant to jword.
11517
11518 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11519
11520         * parse.y (verify_constructor_super): Use loop variable
11521         `m_arg_type' initialized with `mdecl_arg_type'.
11522
11523 2000-06-29  Tom Tromey  <tromey@cygnus.com>
11524
11525         * parse.y (resolve_field_access): Handle case where `type_found'
11526         is NULL.
11527
11528 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11529
11530         * expr.c (lookup_field): The same field can be found through two
11531         different interface. Don't declare it ambiguous in that case.
11532
11533 2000-06-27  Tom Tromey  <tromey@cygnus.com>
11534
11535         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
11536         follows \r, then unget it at a lower level.
11537
11538 2000-06-26  Tom Tromey  <tromey@cygnus.com>
11539
11540         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
11541         java_complete_tree.
11542
11543 2000-06-25  Tom Tromey  <tromey@cygnus.com>
11544
11545         * parse.y (for_statement): Wrap expression in a WFL if it is a
11546         constant.  For PR gcj/268.
11547
11548 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11549
11550         * parse.y (do_resolve_class): Minor optimiztion in the package
11551         list search. Removed unnecessary test and return statement.
11552         (valid_ref_assignconv_cast_p): Order of arguments to
11553         enclosing_context_p fixed.
11554
11555 2000-06-24  Tom Tromey  <tromey@cygnus.com>
11556
11557         * expr.c (lookup_field): Print error and return error_mark_node if
11558         field reference is ambiguous.
11559
11560         * parse.y (check_abstract_method_definitions): Also check if
11561         `other_method' is abstract.
11562
11563 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11564
11565         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
11566         classes.
11567         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
11568         (struct lang_type): New field `pic'.
11569         (CLASS_PRIVATE): New macro.
11570         * parse.y (check_inner_class_access): New function.
11571         (jdep_resolve_class): Call it.
11572
11573 2000-06-23  Tom Tromey  <tromey@cygnus.com>
11574
11575         * parse.y (patch_incomplete_class_ref): Initialize the returned
11576         class.  For PR gcj/260.
11577
11578 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11579
11580         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
11581
11582 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11583
11584         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11585         Java specific checks.
11586         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
11587         screened by DECL_P.
11588         * java-tree.def (CASE_EXPR): Marked 'e'.
11589         (DEFAULT_EXPR): Likewise.
11590         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
11591         screened by DECL_P.
11592         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11593         Java specific checks.
11594         (generate_bytecode_insns): Test try_block for BLOCK before using
11595         BLOCK_EXPR_BODY.
11596         * parse.y (build_wfl_wrap): Added `location' argument. Set
11597         EXPR_WFL_LINECOL accordingly.
11598         (dim_expr:): Wrap constants with WFLs.
11599         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
11600         (resolve_package): Check for `stmt' not being a BLOCK before
11601         building a debuggable statement with it.
11602         (make_qualified_primary): Added extra parameter to build_wfl_wrap
11603         invocation.
11604         (resolve_field_access): Make sure `decl' is a DECL before treating
11605         it as such.
11606         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
11607         IDENTIFIER_NODE before treating it as such.
11608         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
11609         treating it as such.
11610         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
11611         to be applied only on non array types.
11612
11613 2000-06-16  Per Bothner  <per@bothner.com>
11614
11615         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
11616         define in terms of DECL_RESULT, as that fails when --enable-checking.
11617
11618 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11619
11620         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
11621         types the same in comparison.
11622         (CHECK_OP): Add static prototype.
11623
11624 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11625
11626         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
11627         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
11628         * parse.c: Rebuilt.
11629
11630 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11631
11632         * decl.c (create_primitive_vtable): Prototype.
11633
11634         * jcf-write.c (generate_bytecode_insns): Initialize variable
11635         `saved_context'.
11636
11637         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
11638
11639 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11640
11641         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
11642         to track searched classes, and do not search the same class more than
11643         once. Call find_applicable_accessible_methods_list on immediate
11644         superclass, instead of search_applicable_method_list on all ancestors.
11645         Fix for PR gcj/238.
11646
11647 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11648
11649         * parse.y (register_fields): Permit static fields in inner classes
11650         if they are final. Fix for PR gcj/255.
11651
11652 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11653
11654         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
11655         * parse.y (find_in_imports): Returned type changed to void,
11656         leading comment fixed.
11657         (register_package): New function.
11658         (qualify_and_find): Likewise.
11659         (package_declaration:): Use `register_package'.
11660         (single_type_import_declaration:): Removed local variable
11661         `node'. Added missing `;' for consistency.
11662         (type_import_on_demand_declaration:): Use `chainon' to link new
11663         entries.
11664         (lookup_field_wrapper): Lookup local variables defined in outer
11665         contexts first.
11666         (java_complete_class): Don't reverse the list of imported on demand.
11667         (do_resolve_class): Reorganized. Removed local variable
11668         `original_name'. Call `qualify_and_find' with the current package
11669         name, invoke `find_in_imports_on_demand' right after. Call
11670         `qualify_and_find' with the packages we've seen so far. Fixed
11671         operations numbering in comments.
11672         (java_expand_class): Don't reverse `package_list'.
11673         (find_most_specific_methods_list): New local variables `abstract'
11674         and `candidates'. Use them to pick the right method.
11675
11676 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
11677
11678         * parse.y (check_modifiers_consistency): Don't subtract out
11679         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
11680
11681 2000-06-04  Philipp Thomas  <pthomas@suse.de>
11682
11683         * Makefile.in (INTLLIBS): New.
11684         (LIBS): Add above.
11685         (DEPLIBS): Ditto.
11686
11687 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11688
11689         * class.c (get_dispatch_table): Build the vtable dummy entry list
11690         element with a null purpose. Fixed leading comment.
11691         (build_dtable_decl): Build an accurate dtable type when appropriate
11692         and use it.
11693
11694 2000-06-02  Richard Henderson  <rth@cygnus.com>
11695
11696         * lang.c (lang_get_alias_set): New.
11697
11698 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11699
11700         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
11701         before using it as the accessed field.
11702
11703 2000-05-31  Tom Tromey  <tromey@cygnus.com>
11704
11705         * java-tree.h (boolean_array_vtable, byte_array_vtable,
11706         char_array_vtable, short_array_vtable, int_array_vtable,
11707         long_array_vtable, float_array_vtable, double_array_vtable):
11708         Declare.
11709         * expr.c (get_primitive_array_vtable): New function.
11710         (create_primitive_vtable): New function.
11711         (java_lang_expand_expr): Enable code to statically generate
11712         arrays.
11713         * decl.c (init_decl_processing): Create primitive vtables.
11714         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
11715         short_array_vtable, int_array_vtable, long_array_vtable,
11716         float_array_vtable, double_array_vtable): Define.
11717
11718 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
11719
11720         * java/parse.y (find_applicable_accessible_methods_list):
11721         Don't add an uninitialized value to the list.
11722
11723 2000-05-25  Tom Tromey  <tromey@cygnus.com>
11724
11725         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
11726         when trying to see if field's class should be initialized.  Always
11727         initialize field's declaring class, not qualified class.
11728         For PR gcj/162.
11729
11730         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
11731         `wfl_operator', to maybe_build_primttype_type_ref.
11732         Fixes PR gcj/235.
11733
11734 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
11735
11736         * parse.y (patch_method_invocation): Don't try to lookup methods
11737         in primitive types.
11738
11739 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11740
11741         * parse.y (resolve_field_access): Call the appropriate <clinit>
11742         before accessing the length of a static array. Craft a decl for
11743         the field while its time. Fixes PR gcj/129.
11744
11745 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11746
11747         * parse.y (resolve_package): Correctly set `*next' (was off by
11748         one.)
11749         (resolve_qualified_expression_name): Fixed comment.
11750
11751 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11752
11753         * jcf-parse.c (jcf_parse_source): Reset current_class and
11754         current_function_decl to NULL before parsing a new file.
11755
11756 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11757
11758         * parse.y (block_end:): If the collected block doesn't feature a
11759         statement, insert an empty statement.
11760
11761 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11762
11763         * parse.y (maybe_yank_clinit): New function.
11764         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
11765         end of the list of methods belonging to a class.
11766         (java_complete_expand_method): Check whether <clinit> is really
11767         necessary and expand it accordingly.
11768
11769 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11770
11771         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
11772         processed by the method's switch statement.
11773
11774 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11775
11776         * java-tree.h: Added init state enum.
11777         * decl.c (emit_init_test_initialization): Initialize class
11778         initialization check variable by looking at class' state.
11779
11780 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11781
11782         * java-tree.h (build_instanceof): Declare.
11783         (build_get_class): Declare.
11784         * parse.y (patch_binop): Use build_instanceof.
11785         * expr.c (build_instanceof): New function.  If class is final,
11786         don't make a function call.
11787         (expand_java_INSTANCEOF): Use it.
11788         (build_get_class): New function.
11789
11790 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
11791
11792         * jcf-write.c (generate_classfile): Scan the source_file for
11793         slashes with the right pointer variable.
11794
11795 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
11796
11797         * lang.c (lang_decode_option): Update -Wunused flags by calling
11798         set_Wunused.
11799         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
11800
11801 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
11802
11803         * check_init.c (check_init): Constify local char *.
11804         * class.c (push_class): Constify local char *.
11805         * java_tree.h: Update prototypes.
11806         * jcf-io.c (open_class): Constify filename parameter and
11807         return value.
11808         (find_class): Remove redundant string copy.  Cast return from
11809         open_class.
11810         * jcf-parse.c (read_class, parse_class_file, yyparse):
11811         Constify local char *.
11812         * jcf-write.c (generate_bytecode_insns, generate_classfile):
11813         Constify local char *.
11814         * jcf.h (JCF): Constify filename and classname.
11815         (JCF_FINISH): Cast args to FREE to char * when appropriate.
11816         * lang.c (init_parse): Constify parameter and return value.
11817         * lex.c (java_get_line_col): Constify filename parameter.
11818         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
11819         * parse.y (java_parser_context_suspend,
11820         issue_warning_error_from_context, safe_layout_class): Constify
11821         local char *.
11822         * parse.c: Regenerate.
11823
11824 2000-05-08  Tom Tromey  <tromey@cygnus.com>
11825
11826         * expr.c (build_jni_stub): Cache the result of
11827         _Jv_LookupJNIMethod.
11828
11829 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11830
11831         * decl.c (predef_filenames_size): Now 7.
11832         (predef_filenames): New seventh entry.
11833
11834 2000-05-04  Tom Tromey  <tromey@cygnus.com>
11835
11836         * boehm.c (mark_reference_fields): Don't mark RawData fields.
11837         Keep track of when we've seen a reference field after a
11838         non-reference field.
11839         (get_boehm_type_descriptor): Handle case where we see
11840         non-reference fields but no trailing reference field.
11841         * decl.c (rawdata_ptr_type_node): Define.
11842         (init_decl_processing): Initialize rawdata_ptr_type_node.
11843         * java-tree.h (rawdata_ptr_type_node): Declare.
11844
11845 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11846
11847         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
11848         specifiers in calls to fprintf.
11849
11850 2000-05-03  Andrew Haley  <aph@cygnus.com>
11851
11852         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
11853
11854         * javaop.h (WORD_TO_INT): New function.
11855         (IMMEDIATE_s4): Use WORD_TO_INT.
11856         * jcf.h (JPOOL_INT): Ditto.
11857
11858         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
11859         separator.
11860
11861 2000-04-19  Tom Tromey  <tromey@cygnus.com>
11862
11863         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
11864         on native function.
11865         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
11866         JNI methods.
11867         * expr.c (build_jni_stub): New function.
11868         * lang-specs.h: -fjni and -femit-class-file are incompatible.
11869         * parse.c: Rebuilt.
11870         * parse.y (java_complete_expand_methods): Expand a native method
11871         and call build_jni_stub if -fjni given.
11872         * lang-options.h: Document -fjni.
11873         * lang.c (flag_jni): New global.
11874         (lang_f_options): Added `jni' entry.
11875         * java-tree.h (soft_lookupjnimethod_node,
11876         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
11877         Declare.
11878         (flag_jni): Declare.
11879         (build_jni_stub): Declare.
11880         (struct lang_decl): Added `native' flag.
11881         (METHOD_NATIVE): Redefined to use `native' field of lang specific
11882         structure.
11883         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
11884         soft_jnipopsystemframe_node): New globals.
11885         (init_decl_processing): Set them.  _Jv_InitClass only takes one
11886         argument.
11887
11888         * java-tree.def: Put into `C' mode.
11889
11890 2000-04-27  Tom Tromey  <tromey@cygnus.com>
11891
11892         Fix for PR gcj/2:
11893         * expr.c (expand_invoke): Generate check to see if object pointer
11894         is null in nonvirtual invocation case.
11895         * java-tree.h (soft_nullpointer_node): Declare.
11896         * decl.c (soft_nullpointer_node): New global.
11897         (init_decl_processing): Initialize soft_nullpointer_node.
11898         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
11899         or `private' methods.
11900         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
11901
11902 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11903
11904         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11905         from <clinit>
11906
11907 2000-04-26  Tom Tromey  <tromey@cygnus.com>
11908
11909         * zextract.c (find_zip_file_start): New function.
11910         (read_zip_archive): Use it.
11911
11912 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11913
11914         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
11915
11916 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11917
11918         * class.c (common_enclosing_context_p): New function.
11919         * java-tree.h (common_enclosing_context_p): Added prototype.
11920         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
11921         classes sharing an outer context with the current instance.
11922         * parse.y (build_access_to_thisn): Fixed leading comment.
11923         (verify_constructor_super): New local `supper_inner'. Skip
11924         enclosing context argument in the case of inner class constructors.
11925         (patch_method_invocation): Insert proper context as second
11926         parameter to pure inner class constructor super invocations.
11927
11928 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11929
11930         * parse.y (end_class_declaration): Reset the interface number
11931         counter.
11932
11933 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11934
11935         * parse.y (source_start_java_method): Deleted unnecessary code.
11936         (patch_method_invocation): Fixed comment.
11937
11938 2000-04-24  Robert Lipe <robertlipe@usa.net>
11939
11940         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
11941
11942 2000-04-23  Tom Tromey  <tromey@cygnus.com>
11943
11944         * boehm.c (mark_reference_fields): Use int_byte_position.
11945
11946 2000-04-22  Tom Tromey  <tromey@cygnus.com>
11947
11948         * boehm.c (mark_reference_fields): Only call byte_position on
11949         non-static fields.
11950
11951 2000-04-22  Tom Tromey  <tromey@cygnus.com>
11952
11953         * boehm.c (mark_reference_fields): Added `last_view_index'
11954         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
11955
11956 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
11957
11958         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
11959         * parse.y (check_class_interface_creation): Fixed comments. Select
11960         permitted modifiers for (inner) interfaces. Changed error message
11961         to report rejected modifiers used with local classes.
11962
11963 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11964
11965         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
11966         of directly inherited type considered in scope.
11967         * parse.y (do_resolve_class): Search inherited classes for inner
11968         classes.
11969
11970 2000-04-20  Tom Tromey  <tromey@cygnus.com>
11971
11972         * parse.y (not_accessible_p): Use member's class, not current
11973         class, when doing inheritance check for protected reference.
11974         Fixes PR gcj/124.
11975
11976 2000-04-20  Jason Schroeder  <shrode@subnature.com>
11977
11978         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
11979
11980 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11981
11982         * parse.y (lookup_field_wrapper): Search for final local aliases.
11983         (resolve_expression_name): Let lookup_field_wrapper search for
11984         final local aliases. Force the value of `name' if one is found.
11985         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
11986         an expression name. Fixed comments.
11987
11988 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11989
11990         * parse.y (yyerror): `msg' can be null, don't use it in that case.
11991
11992 2000-04-19  Tom Tromey  <tromey@cygnus.com>
11993
11994         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
11995
11996 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11997
11998         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
11999
12000 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12001
12002         PR gcj/211:
12003         * gjavah.c (utf8_cmp): Changed return value.
12004         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12005         result.
12006         (cxx_keywords): New global.
12007         (get_field_name): Handle new result of cxx_keyword_subst.
12008         (print_method_info): Likewise.
12009
12010 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12011
12012         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12013         with a newline, for CNI.
12014         (print_stub_or_jni): Print a space or newline before method name for
12015         CNI as well as JNI.
12016         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12017         (process_file): Include gcj/cni.h if generating CNI stubs.
12018
12019 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12020
12021         * gjavah.c (decompile_method): Use print_field_name.
12022         Fixes PR gcj/205.
12023
12024 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12025
12026         * parse.y (java_expand_classes): Reverse the package list once.
12027         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12028         reduction.
12029         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12030         the `==' and `!=' operators.
12031
12032 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12033
12034         * jcf-write.c (generate_bytecode_insns): At invocation time,
12035         always relate an interface method to the type of its selector.
12036
12037 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12038
12039         Fix for PR gcj/2:
12040         * expr.c (expand_invoke): Generate check to see if object pointer
12041         is null in nonvirtual invocation case.
12042         * java-tree.h (soft_nullpointer_node): Declare.
12043         * decl.c (soft_nullpointer_node): New global.
12044         (init_decl_processing): Initialize soft_nullpointer_node.
12045         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12046         or `private' methods.
12047         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12048
12049 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12050
12051         Fix for PR gcj/140:
12052         * parse.y (check_final_assignment): Recognize assignments to the
12053         `length' field of an array when generating class files.
12054
12055 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12056
12057         * class.c (decl_hash): Prototype removed.
12058         (decl_compare): Likewise.
12059
12060 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12061
12062         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12063         * parse.y (check_modifiers_consistency): Check for final/volatile
12064         clash.  Fixes PR gcj/164.
12065
12066 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12067
12068         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12069         made global.
12070         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12071         global.
12072         (add_method_1): Use `java_hash_hash_tree_node' and
12073         `java_hash_compare_tree_node'.
12074         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12075         (java_hash_compare_tree_node): Likewise.
12076         * parse.y (find_applicable_accessible_methods_list): Create,
12077         delete and use a hash table to remember already searched interfaces.
12078
12079 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12080
12081         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12082         with latest entry.
12083
12084 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12085
12086         * boehm.c (mark_reference_fields, set_bit): Prototype.
12087         (set_bit): Un-ANSI-fy definition.
12088
12089         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12090         Prototype.
12091
12092         * decl.c (emit_init_test_initialization): Likewise.
12093
12094         * gjavah.c (jni_print_char): Likewise.
12095
12096         * parse.y (create_new_parser_context): Likewise.
12097
12098 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12099
12100         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12101         patch missing hunk. Fixed indentation.
12102
12103 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12104
12105         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12106         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12107
12108 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12109
12110         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12111         when negative *before* using it as an array index.
12112         * ChangeLog: Fixed typo.
12113
12114 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12115
12116         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12117         to 0 when it reaches -1.
12118
12119 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12120
12121         * jcf-parse.c (get_constant): Properly cast `num' during the
12122         invocation of `add_double'.
12123         * jcf-write.c (push_long_const): Properly cast `lo' before
12124         comparing it to short bounds.
12125         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12126         `interface_body:' is reduced after the current interface is
12127         pushed.
12128
12129 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12130
12131         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12132         Java-specific `-f' option.
12133
12134 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12135
12136         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12137         Adjust order of making types.
12138         Make bitsize_*_node values.
12139
12140 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12141
12142         * class.c (make_field_value): Use byte_position.
12143         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12144         (java_array_data_offset): Likewise.
12145         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12146         bzero call.
12147
12148 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12149
12150         * parse.y (check_abstract_method_definitions): New local
12151         `end_type_reached'. Make sure we also consider `end_type'.
12152         (java_check_abstract_method_definitions): Make sure we eventually
12153         consider `java.lang.Object'.
12154         (maybe_use_access_method): Don't use access method if not in the
12155         context of a pure inner class or if the method's context is right.
12156         (find_applicable_accessible_methods_list): New static flag
12157         `object_done'. Don't search abstract classes as interfaces. Fixed
12158         indentation. Fixed the `java.lang.Object' only search. Search
12159         class interface(s) first, then fully search enclosing contexts.
12160         (find_most_specific_methods_list): Pick the closest candidate when
12161         they're all abstract.
12162
12163 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12164
12165         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12166         properly initialize `finished_label'. Don't emit gotos for empty
12167         try statements.
12168
12169 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12170
12171         * except.c (emit_handlers): Clear catch_clauses_last.
12172
12173 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12174
12175         * parse.y (check_method_types_complete): New function.
12176         (create_class): Reset anonymous class counter only when seeing an
12177         non inner classe.
12178         (java_complete_class): JDEP_METHOD: Don't recompute signature
12179         if incomplete.
12180
12181 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12182
12183         * class.c (build_static_ref): Fixed indentation in comment.
12184         * java-tree.def (TRY_EXPR): Fixed typo in name.
12185         (CLASS_LITERAL): Likewise.
12186         * java-tree.h: (TYPE_DOT_CLASS): New macro.
12187         (struct lang_type): New field `dot_class'.
12188         * jcf-write.c (generate_bytecode_insns): Fixed error message.
12189         (generate_classfile): Method `class$' is synthetic.
12190         * parse.y (build_do_class_method): New function.
12191         (build_dot_class_method_invocation): Likewise.
12192         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12193         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12194         (qualify_ambiguous_name): Likewise.
12195         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12196         (build_try_statement): Fixed leading comment.
12197
12198 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12199
12200         * class.c (make_field_value): Properly handle sizes.
12201         (get_dispatch_vector): Use tree_low_cst and host_integerp.
12202         (layout_class_method): Count using trees.
12203         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12204         * expr.c (java_array_data_offset): Use int_bit_position.
12205         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12206         (build_invokevirtual): Use tree_low_cst and do computations with trees.
12207
12208 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12209
12210         * lang.c (flag_hash_synchronization): New global.
12211         (lang_f_options): Added `hash-synchronization'.
12212         * lang-options.h: Mention -fhash-synchronization.
12213         * java-tree.h (flag_hash_synchronization): Declare.
12214         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12215         hash table synchronization is disabled.
12216         * decl.c (init_decl_processing): Only push `sync_info' value when
12217         hash table synchronization is disabled.
12218         * class.c (make_class_data): Only push `sync_info' field when hash
12219         table synchronization is disabled.  Removed dead code.
12220
12221 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12222
12223         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12224
12225 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12226
12227         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12228         classes.
12229         * parse.y (patch_method_invocation): Handle anonymous classes
12230         creation in static context.
12231
12232 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12233
12234         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12235         * parse.y (resolve_qualified_expression_name): Use it.
12236         (patch_method_invocation): Likewise.
12237
12238 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12239
12240         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12241         depending on the type of dependency which dictates what the
12242         current class is.
12243         (unresolved_type_p): Resolved types limited to the current class.
12244
12245 2000-03-15  Tom Tromey  <tromey@cygnus.com>
12246
12247         * decl.c (init_decl_processing): Set type of `sync_info' to be
12248         pointer to Object.
12249
12250         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12251         Correctly compute bit number for current slot.  Zero `high' and
12252         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
12253         mark_reference_fields.
12254         (mark_reference_fields): New function.
12255
12256 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12257
12258         * parse.y (register_incomplete_type): Fixed initialization of
12259         JDEP_ENCLOSING.
12260
12261 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12262
12263         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12264         static globals.
12265         (push_class_context, pop_class_context): New function.
12266         (class_body:): Call pop_class_context.
12267         (interface_body:): Likewise.
12268         (INNER_QUALIFIER): New macro.
12269         (report_class_declaration): Changed output format and use
12270         INNER_QUALIFIER. Call push_class_context.
12271
12272 2000-02-14  Andrew Haley  <aph@cygnus.com>
12273
12274         * check-init.c (check_init): Add new cases for unary and binary
12275         tree nodes.
12276
12277 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12278
12279         * parse.y (resolve_package): Set `next' once a type name has been
12280         progressively discovered.
12281         (resolve_qualified_expression_name): Propagate resolution only if
12282         there are remaining qualifiers. Take into account `q' might have
12283         been cleared after re-qualification.
12284         * parse.y (patch_method_invocation): New local `resolved'.
12285         Section dealing with qualified expression rewritten to use
12286         resolve_field_access.
12287
12288 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12289
12290         * parse.h (PUSH_CPC): Fixed indentation.
12291         (DEBUG_CPC): New macro.
12292         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12293         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12294         * parse.y (class_body_declaration:): Use
12295         SET_CPC_INSTANCE_INITIALIZER_STMT.
12296         (method_declaration:): Check for null current_function_decl.
12297         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12298         (java_parser_context_pop_initialized_field): Better handling of
12299         empty lists.
12300         (maybe_make_nested_class_name): Mark nested class name as
12301         qualified when necessary.
12302         (end_class_declaration): Don't call java_parse_context_resume when
12303         one or more error occurred.
12304         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12305         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12306         SET_CPC_INITIALIZER_STMT.
12307         (method_header): Check for inner classes declaring static methods.
12308         (resolve_qualified_expression_name): Handle situation where `this'
12309         is implied.
12310
12311 2000-03-13  Hans Boehm <boehm@acm.org>
12312
12313         * typeck.c (build_prim_array_type): Correctly set the high word too.
12314
12315 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12316
12317         * parse.y (java_complete_expand_methods): Leave <clinit> out of
12318         ordinary methods.
12319         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12320         list of methods for interfaces.
12321
12322 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12323
12324         * parse.y (qualify_ambiguous_name): Properly handle expressions
12325         using `null'.
12326
12327 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12328
12329         * parse.y (check_final_assignment): Extended to process
12330         COMPOUND_EXPR.
12331         (patch_assignment): Have check_final_assignment called only once.
12332
12333 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12334
12335         * java-tree.h (IS_INIT_CHECKED): New flag.
12336         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
12337         * parse.y (patch_string): Call force_evaluation_order on the
12338         completed string concatenation tree.
12339         * expr.c (force_evaluation_order): Call force_evaluation_order on
12340         function's arguments too.
12341
12342 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12343
12344         * decl.c (emit_init_test_initialization): Mark KEY as unused.
12345         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12346         (build_anewarray): Likewise.
12347         * parse.y (patch_newarray): Likewise.
12348         * parse.c: Regenerated.
12349
12350 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
12351
12352         * decl.c (init_decl_processing): Added new class fields `depth',
12353         `ancestors', and `idt' to class_type_node. Use
12354         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
12355         * class.c (make_class_data): Push initial values for new fields.
12356         * java-tree.h: Updated prototype for `build_invokeinterface'.
12357         * expr.c (build_invokeinterface): Changed parameters to accept
12358         `method' tree. Calculate index of `method' in its declaring
12359         interface. Build call to _Jv_LookupInterfaceMethodIdx.
12360         (expand_invoke): Call `build_invokeinterface' with new parameters.
12361         * parse.y (patch_invoke): Call `build_invokeinterface' with new
12362         parameters.
12363
12364 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
12365
12366         * typeck.c (lookup_do): Search superinterfaces first
12367         when looking up an interface method. From Godmar Back
12368         <gback@cs.utah.edu>
12369
12370 2000-03-06  Tom Tromey  <tromey@cygnus.com>
12371
12372         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12373
12374 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12375
12376         * java-tree.h (lookup_argument_method2): Declared.
12377         (safe_layout_class): Prototype moved from parse.h.
12378         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
12379         * parse.y (java_check_regular_methods): Local `super_class' gone.
12380         Call lookup_argument_method2 instead of lookup_argument_method.
12381         Perform modifier match for methods found declared in implemented
12382         interfaces. Fixed indentation problem. Overriding/hiding error
12383         report to take place only for methods found in classes.
12384         * typeck.c (lookup_argument_method): Changed leading
12385         comment. Re-written by calling lookup_do.
12386         (lookup_argument_method2): New function.
12387         (lookup_java_method): Re-written by calling lookup_do.
12388         (lookup_do): New function.
12389
12390 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12391
12392         * check-init.c (check_init): Removed dead code. Handle (blank)
12393         final variables.
12394         * parse.y (declare_local_variables): New local `final_p', set it
12395         and use it to initialize LOCAL_FINAL.
12396         (check_final_assignment): Only check FIELD_DECLs.
12397
12398 2000-02-17  Tom Tromey  <tromey@cygnus.com>
12399
12400         * Makefile.in (JAVA_OBJS): Added boehm.o.
12401         (boehm.o): New target.
12402         * Make-lang.in (JAVA_SRCS): Added boehm.c.
12403         * java-tree.h (flag_use_boehm_gc): Declare.
12404         (get_boehm_type_descriptor): Declare.
12405         * lang.c (lang_f_options): Added `use-boehm-gc'.
12406         (flag_use_boehm_gc): New global.
12407         * lang-options.h: Added -fuse-boehm-gc.
12408         * boehm.c: New file.
12409         * class.c (get_dispatch_table): If class uses a Boehm type
12410         descriptor, put it in the vtable.
12411         (make_class_data): Removed dead code.
12412
12413 2000-03-03  Per Bothner  <per@bothner.com>
12414
12415         * decl.c (init_decl_processing):  Initialize sizetype properly.
12416
12417 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12418
12419         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
12420         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
12421         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12422         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
12423         (jcf_parse): New local `current'. Load innerclasses seen in outer
12424         context being processed.
12425         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12426         * jcf-write.c (append_innerclasses_attribute): New function.
12427         (append_innerclasses_attribute_entry): Likewise.
12428         (get_access_flags): Handle static classes. Set anonymous and local
12429         classes to be private.
12430         (generate_classfile): Attribute count adjusted. Call
12431         append_innerclasses_attribute.
12432         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
12433         PURE_INNER_CLASS_TYPE_P.
12434         * parse.y (parser_qualified_classname): New parameter `is_static',
12435         produce non qualified name accordingly.
12436         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
12437         (create_interface): Added argument to parser_qualified_classname.
12438         (create_class): Added argument to parser_qualified_classname. Setup
12439         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
12440         (add_inner_class_fields): Fixed indentation.
12441         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
12442         (method_declarator): Fixed typo in comment.
12443         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
12444         (build_current_thisn): Likewise.
12445         (patch_method_invocation): Likewise.
12446
12447 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12448
12449         * decl.c (current_function_decl): Move to toplev.c.
12450
12451 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12452
12453         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
12454         (DECL_BIT_INDEX): Use underlying representation.
12455         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
12456
12457 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12458
12459         * expr.c (build_java_ret): Pass proper type to size_binop.
12460
12461 2000-02-25  Anthony Green  <green@cygnus.com>
12462
12463         * expr.c (build_class_init): Mark the decl to be ignored by
12464         check_init.
12465         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
12466         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
12467         * class.c (init_test_hash_newfunc): New function.
12468         (decl_hash): New function.
12469         (decl_compare): New function.
12470         * decl.c (emit_init_test_initialization): New function.
12471         (complete_start_java_method): Traverse the init test hashtable,
12472         calling emit_init_test_initialization.
12473         (always_initialize_class_p): Define.
12474         * expr.c (build_class_init): Use initialization tests when
12475         emitting class initialization code.
12476         (always_initialize_class_p): Declare.
12477         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
12478         1.
12479         * java-tree.h: Include hash.h.
12480         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
12481         (struct lang_decl): Add init_test_table field.
12482         (init_test_hash_entry): Define.
12483
12484 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12485
12486         * gjavah.c (main): Avoid using `argi' to report unimplemented
12487         options.
12488
12489 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12490
12491         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12492         initialize locals to avoid warnings. Local `exception_type' moved
12493         into if statement.
12494
12495 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12496
12497         * parse.y (resolve_expression_name): Use `orig' as a second
12498         argument to resolve_field_access.
12499         (resolve_field_access): Removed unnecessary code when dealing with
12500         static fields.
12501
12502 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12503
12504         * class.c (push_super_field): Don't push the field twice.
12505         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
12506         * parse.h (java_reorder_fields): Prototyped.
12507         * parse.y (java_reorder_fields): New function.
12508         (java_layout_class): Simplified not to worry about re-ordering.
12509
12510 2000-02-23  Tom Tromey  <tromey@cygnus.com>
12511
12512         * gjavah.c (print_name): In JNI case, correctly quote string.
12513         (print_method_info): Don't handle overrides in JNI mode.
12514
12515 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12516
12517         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
12518         value type set to `boolean_type_node'.
12519
12520 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12521
12522         * jcf-dump.c (main): Test for correct condition after
12523         output file creation.
12524
12525 2000-02-19  Anthony Green  <green@cygnus.com>
12526
12527         * jcf-depend.c (add_entry): Fix test for first list entry.
12528
12529 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12530
12531         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
12532         * constants.c (build_constants_constructor): Likewise.
12533
12534 2000-02-19  Anthony Green  <green@cygnus.com>
12535
12536         * jcf-depend.c (add_entry): Add entries to the end of the list.
12537
12538 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
12539
12540         * decl.c (INT_TYPE_SIZE): Define if necessary.
12541         (expand_java_return): Handle the case of a native integer smaller
12542         than a JVM integer.
12543
12544 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12545
12546         * gjavah.c (help): Use GCCBUGURL.
12547         * jv-scan.c (help): Likewise.
12548         * jcf-dump.c (help): Likewise.
12549
12550 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12551
12552         * jcf-write.c (generate_bytecode_insns): Don't generate empty
12553         `finally' clauses.
12554
12555 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12556
12557         * jcf-parse.c (load_class): Call `fatal' if no file containing
12558         the target class are found.
12559
12560 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
12561
12562         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
12563         lex.c, lex.h, and PARSE_H to...
12564         (parse.o, parse-scan.o): ...here, respectively.
12565
12566         * lex.c: Split out code that may trigger SIGFPE from yylex()
12567         to its own function.
12568         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
12569
12570 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12571
12572         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
12573
12574 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12575
12576         * parse.y (outer_field_access_p): Stop in time when outer contexts
12577         are exhausted.
12578         (resolve_qualified_expression_name): Properly qualify *everything*
12579         after a package.type to be resoled as expression names.
12580         (find_applicable_accessible_methods_list): Save/restore `class' to
12581         isolate it from a possible outer context search.
12582
12583 2000-02-15  Tom Tromey  <tromey@cygnus.com>
12584
12585         * gjavah.c (jni_print_char): New function.
12586         (print_full_cxx_name): Use it.
12587         (decode_signature_piece): Likewise.
12588         (print_cxx_classname): Likewise.
12589
12590 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12591
12592         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
12593         version.o.
12594         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
12595
12596         * gjavah.c: Include version.h.
12597
12598         * jcf-dump.c: Likewise.
12599
12600         * jv-scan.c: Likewise.
12601
12602 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12603
12604         * parse.y (outer_field_access_fix): First parameter now a tree
12605         node. Check for assignment to final. First argument to
12606         build_outer_field_access_fix modified to accommodate prototype.
12607         (build_outer_field_access): Don't check for assignment to final
12608         here.
12609         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
12610         possibly returned by outer_field_access_fix. Changed
12611         outer_field_access_fix's first argument.
12612         (check_final_assignment): $finit$'s context is OK.
12613         (patch_unaryop): Use node instead of its line/column value when
12614         calling outer_field_access_fix.
12615
12616 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12617
12618         * parse.y (interface_declaration:): No longer tagged
12619         <node>. Re-installed default action.
12620         (class_member_declaration:): Handle inner interfaces.
12621         (interface_member_declaration): Handle inner interfaces and
12622         classes.
12623         (create_interface): Push error if one seen. Suspend parsing
12624         context when processing an inner interface.
12625         (register_fields): Inner class static field limitations not to
12626         apply to inner interfaces.
12627
12628 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12629
12630         * jcf-parse.c (load_class): Update `java_error_count' when a
12631         class' file can't be found.
12632         (parse.y): Avoid (byte)code generation when errors seen.
12633
12634 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12635
12636         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
12637         decodes a valid node.
12638         (patch_binop): Handle TRUNC_DIV_EXPR.
12639
12640 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12641
12642         * parse.y (resolve_package): New local `acc'. Try to progressively
12643         build and guess a package and type name.
12644
12645 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12646
12647         * parse.y (find_applicable_accessible_methods_list): Load and
12648         layout the search class if necessary.
12649         (java_complete_tree): Keep to original type of the folded initial
12650         value.
12651
12652 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12653
12654         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
12655         Generate error message if circularity is detected. New static
12656         local `list'.
12657         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
12658         * jcf-write.c (generate_bytecode_insns): Very simply handle
12659         SAVE_EXPR.
12660         * parse.y (java_check_circular_reference): Use
12661         `cyclic_inheritance_report' during report, if necessary.
12662         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
12663         walking NEW_ARRAY_INIT twice.
12664
12665 2000-02-09  Tom Tromey  <tromey@cygnus.com>
12666
12667         * parse.y (check_class_interface_creation): Allow inner classes to
12668         be `private' or `protected', check modifiers' consistency. Prevent
12669         block local classes from bearing any modifiers.
12670
12671 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12672
12673         * except.c (check_start_handlers): Re-add prototype lost in last
12674         patch.
12675         (maybe_start_try): Remove excess argument to `check_start_handlers'.
12676
12677 2000-02-09  Andrew Haley  <aph@cygnus.com>
12678
12679         * decl.c (clear_binding_level): Remove excess initializer.
12680         (maybe_poplevels): Remove unused variable.
12681         (force_poplevels): Ditto.
12682         (struct binding_level): Add comment.
12683
12684 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12685
12686         * jcf-write.c (generate_classfile): Don't consider
12687         pre-initialization with reference value (use <clinit> instead.)
12688         * parse.y (java_fix_constructors): No generated constructor for
12689         interfaces.
12690         (build_outer_field_access): Removed debug message.
12691         (outer_field_expanded_access_p): Adapted to bytecode generation.
12692         (build_outer_field_access_method): Use fix_method_argument_names.
12693         (build_outer_method_access_method): Fixed indentation. Added
12694         comment. Handle access method generation for static and also void
12695         methods.
12696         (build_access_to_thisn): Inserted debug message.
12697         (maybe_build_thisn_access_method): Use fix_method_argument_names.
12698         (resolve_qualified_expression_name): Fixed comment.
12699         (not_accessible_p): Adapted to bytecode generation. Added comment.
12700         (patch_method_invocation): Added comment.
12701         (maybe_use_access_method): Fixed leading comment. Handle static
12702         methods.
12703         (java_complete_lhs): Don't shortcut handling of initialized upon
12704         declaration String type static fields when generating bytecode.
12705         (patch_unaryop): Handle outer field access when generating
12706         bytecode.
12707
12708 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12709
12710         * java-tree.h (FIELD_THISN): New macro.
12711         * jcf-write.c (append_synthetic_attribute): New function.
12712         (generate_classfile): Set "Synthetic" attribute on this$<n>,
12713         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
12714         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
12715         this$<n> fields.
12716         (build_outer_field_access): Turned on access functions usage and
12717         generation when compiling to bytecode.
12718         (maybe_use_access_method): Likewise.
12719
12720 2000-01-25  Andrew Haley  <aph@cygnus.com>
12721
12722         * java-except.h (struct eh_range): Add `expanded' field.
12723         (maybe_start_try): Add end_pc arg.
12724         (maybe_end_try): Ditto.
12725         * java-tree.h (force_poplevels): new function.
12726         * expr.c (expand_byte_code): Don't call maybe_start_try or
12727         maybe_end_try.
12728         * except.c (add_handler): Reset expanded.
12729         (expand_start_java_handler): Set expanded.
12730         (check_start_handlers): Don't expand a start handler that's
12731         already been expanded.
12732         (maybe_start_try): Add end_pc arg.  Only expand a handler which
12733         ends after end_pc.
12734         (expand_end_java_handler): call force_poplevels.
12735         (force_poplevels): new function.
12736         * decl.c (binding_level): Add start_pc of binding level.
12737         (maybe_pushlevels): Call maybe_start_try when pushing binding
12738         levels.
12739         (maybe_poplevels): Call maybe_end_try when popping binding levels.
12740         (LARGEST_PC): Define.
12741         (clear_binding_level): Use LARGEST_PC.
12742
12743         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
12744         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
12745         (binding_depth, is_class_level, current_pc): new variables.
12746         (struct binding_level): ditto.
12747         (indent): new function.
12748         (push_jvm_slot): add debugging info.
12749         (maybe_pushlevels): ditto.
12750         (maybe_poplevels): ditto.
12751         (pushlevel): ditto.
12752         (poplevel): ditto.
12753         (start_java_method): ditto.
12754         (give_name_to_locals): comment only.
12755         * except.c (binding_depth, is_class_level, current_pc):
12756         new variables.
12757         (expand_start_java_handler): add debugging info.
12758         (expand_end_java_handler): ditto.
12759
12760 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12761
12762         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
12763         (print_name_for_stub_or_jni, process_file): Constify a char*.
12764
12765 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12766
12767         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
12768
12769 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12770
12771         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
12772         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
12773         defined to be 1.
12774
12775 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12776
12777         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
12778         * java-tree.h (TYPE_II_STMT_LIST): New macro.
12779         (struct lang_type): New field `ii_block'.
12780         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
12781         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
12782         * parse.h (struct parser_ctxt): New field `instance_initializers'.
12783         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
12784         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
12785         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
12786         macros.
12787         * parse.y (add_instance_initializer): New function.
12788         (in_instance_initializer): New static global.
12789         (class_body_declaration:): Link instance initializer block.
12790         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
12791         (array_creation_expression:): Remove unused local.
12792         (java_parser_context_push_initialized_field): Fixed leading
12793         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
12794         CPC_INSTANCE_INITIALIZER_LIST.
12795         (java_parser_context_pop_initialized_field): Likewise.
12796         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
12797         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
12798         CPC_INITIALIZER_STMT.
12799         (fix_constructors): New local `class_type'. Use it. Call
12800         add_instance_initializer.
12801         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
12802         (patch_return): Forbid return in instance initializers.
12803         (patch_throw_statement): Enforce exception handling in the context
12804         of instance initializers.
12805
12806 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12807
12808         * Make-lang.in (java.mostlyclean): Remove executables in
12809         `mostlyclean'.
12810
12811 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12812
12813         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
12814         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
12815         (java_float_finite): Convert to use union Word from javaop.h.
12816         (java_double_finite): Convert to use union DWord from javaop.h.
12817
12818 2000-02-02  Tom Tromey  <tromey@cygnus.com>
12819
12820         * gjavah.c (options): Added `jni' entry.
12821         (help): Document -jni.
12822         (flag_jni): New global.
12823         (process_file): Handle JNI output.  Don't print text from
12824         -prepend, -add, etc, when generating stubs.  Only remove `.class'
12825         suffix if it actually exists.
12826         (main): Create a `.c' file when run with `--jni --stubs'.  Create
12827         correct output file name with `--jni'.
12828         (print_include): Mangle header name differently in JNI case.
12829         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
12830         method list.
12831         (print_method_info): Handle JNI case.  Put signature info into
12832         method name.  Handle case when STREAM is NULL.
12833         (print_name_for_stub_or_jni): New function.
12834         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
12835         (print_cxx_classname): Handle JNI.
12836         (print_full_cxx_name): Likewise.
12837         (decode_signature_piece): Likewise.
12838         (overloaded_jni_method_exists_p): New function.
12839         (struct method_name): Added `signature' and `sig_length' fields.
12840         (HANDLE_END_FIELD): Do nothing in JNI mode.
12841
12842 2000-02-02  Tom Tromey  <tromey@cygnus.com>
12843
12844         * jv-scan.c: Include version.c, <getopt.h>.
12845         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
12846         (options): New array.
12847         (usage): New function.
12848         (version): New function.
12849         (main): Use getopt_long to parse command line.
12850         * jcf-dump.c: Include version.c, <getopt.h>.
12851         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
12852         OPT_JAVAP): New macros.
12853         (options): New array.
12854         (usage): Return `void'.  Changed message.
12855         (help): New function.
12856         (version): New function.
12857         (main): Use getopt_long_only to parse command line.
12858         * gjavah.c: Include <getopt.h>.
12859         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
12860         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
12861         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
12862         (options): New array.
12863         (java_no_argument): Removed.
12864         (help): Updated with missing options.
12865         (main): Use getopt_long_only to parse command line.
12866         (usage): Changed message.
12867
12868 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12869
12870         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
12871         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
12872         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
12873         * parse.y (array_creation_expression:): Handle anonymous arrays.
12874         (build_array_from_name): Don't set `ret_name' if null.
12875         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
12876         (qualify_ambiguous_name): Likewise.
12877         (java_complete_expand_class): Likewise.
12878
12879 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12880
12881         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
12882         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
12883         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
12884         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
12885         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
12886         AIPL_FUNCTION_COMPLETED_INVOCATION.
12887         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
12888         AIPL_FUNCTION_INVOCATION_READY.
12889         (AIPL_FUNCTION_DECLARATION): New enum entry.
12890         * parse.y (reorder_static_initialized): New function.
12891         (java_parser_context_pop_initialized_field): Use it.
12892         (add_inner_class_fields): Use
12893         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
12894         augmented. Install marker after last alias initializer, if any.
12895         (generate_finit): Fixed typo. Don't try to retain only the used
12896         fields.
12897         (method_header): Compute and set DECL_FUNCTION_NAP.
12898         (method_declarator): Fixed comment. Insert alias initializer in
12899         parameter list.
12900         (build_alias_initializer_parameter_list): Fixed leading
12901         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
12902         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
12903         (java_complete_expand_class): Code to retain only used aliases
12904         removed.
12905         (java_complete_expand_methods): New local `first_decl'. Generate
12906         $finit$ first, then expand the constructors, regular methods and
12907         <clinit>.
12908         (java_complete_expand_method): Don't report error on missing
12909         return statement if previously detected bogus.
12910         (fix_constructors): Don't patch constructor parameters list.
12911         (patch_method_invocation): Use new AIPL enum values. Reverse
12912         alias initializer list for anonymous classes.
12913
12914 2000-01-30  Anthony Green  <green@redhat.com>
12915
12916         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
12917         determine how many stack slots to pop.
12918
12919 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12920
12921         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
12922         error handling/recovery.
12923         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
12924
12925 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12926
12927         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
12928         FIELD_LOCAL_ALIAS_USED): New macros.
12929         (DECL_FUNCTION_NAP): New macro.
12930         (struct lang_decl): New field `nap'.
12931         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
12932         (struct lang_type): New fields `finit_stmt_list' and
12933         `clinit_stmt_list'.
12934         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
12935         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
12936         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
12937         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
12938         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
12939         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
12940         (BUILD_THROW): Macro line separator re-indented.
12941         * parse.y (end_class_declaration): New function.
12942         (maybe_generate_pre_expand_clinit): New name for
12943         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
12944         pre-expand static fields.
12945         (maybe_generate_clinit): Function deleted.
12946         (check_for_static_method_reference): Prototype's parameter list
12947         indented.
12948         (generate_finit): New name for maybe_generate_finit. Changed
12949         leading comment. Function rewritten to use
12950         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
12951         (build_alias_initializer_parameter_list): New function.
12952         (java_parser_context_pop_initialized_field): Likewise.
12953         (add_inner_class_fields): Likewise.
12954         (type_declaration:): Call end_class_declaration.
12955         (class_member_declaration:): Likewise.
12956         (formal_parameter_list:): Fixed typos.
12957         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
12958         element. Improved error handling.
12959         (block_statement:): Call end_class_declaration.
12960         (anonymous_class_creation:): Likewise.
12961         (create_anonymous_class): Fixed comments.
12962         (create_class): Call add_inner_class_fields.
12963         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
12964         (method_header): Use MARK_FINAL_PARMS.
12965         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
12966         (method_declarator): Propagate final argument flag.
12967         (craft_constructor): New local `artificial'. Call
12968         build_alias_initializer_parameter_list. Use
12969         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
12970         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
12971         necessary.
12972         (complete_expand_class): Get rid of unused outer context local
12973         alias fields.
12974         (java_complete_expand_methods): Fixed leading
12975         comment. Generate/pre-expand <clinit> first. Changed method
12976         expansion order to regular, $finit$, constructors, <clinit>.
12977         (java_complete_expand_method): Set current_function_decl.
12978         (fix_constructors): Fix constructor parameter list to account for
12979         outer context local alias initializers.
12980         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
12981         (resolve_expression_name): Lookup outer context local aliases. New
12982         local `access', use it.
12983         (patch_method_invocation): Patch inner class ctor invocation with
12984         outer context local aliases initialization values. $finit$
12985         invocation patching now includes things generated with
12986         build_alias_initializer_parameter_list.
12987         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
12988         (build_super_invocation): Likewise.
12989         (patch_assignment): Changed comment.
12990
12991 2000-01-27  Andrew Haley  <aph@cygnus.com>
12992
12993         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
12994         (emit_if): Ditto.
12995         (emit_jsr): Ditto.
12996
12997 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12998
12999         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13000         concatenation.
13001         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13002
13003         * parse.y (register_fields): Don't pass a format specifier to
13004         OBSOLETE_MODIFIER_WARNING.
13005         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13006         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13007         specifier.
13008         (check_modifiers): Change function into a macro.
13009         (check_class_interface_creation): Pass a literal format string.
13010
13011 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13012
13013         * buffer.h: PROTO -> PARAMS.
13014         * check-init.c: Likewise.
13015         * class.c: Likewise.
13016         * constants.c: Likewise.
13017         * convert.h: Likewise.
13018         * decl.c: Likewise.
13019         * except.c: Likewise.
13020         * expr.c: Likewise.
13021         * gjavah.c: Likewise.
13022         * java-except.h: Likewise.
13023         * java-tree.h: Likewise.
13024         * jcf-depend.c: Likewise.
13025         * jcf-dump.c: Likewise.
13026         * jcf-parse.c: Likewise.
13027         * jcf-path.c: Likewise.
13028         * jcf-reader.c: Likewise.
13029         * jcf-write.c: Likewise.
13030         * jcf.h: Likewise.
13031         * jv-scan.c: Likewise.
13032         * jvgenmain.c: Likewise.
13033         * jvspec.c: Likewise.
13034         * lang.c: Likewise.
13035         * lex.c: Likewise.
13036         * lex.h: Likewise.
13037         * parse-scan.y: Likewise.
13038         * parse.h: Likewise.
13039         * parse.y: Likewise.
13040         * typeck.c: Likewise.
13041         * verify.c: Likewise.
13042         * xref.c: Likewise.
13043         * xref.h: Likewise.
13044         * zextract.c: Likewise.
13045         * zipfile.h: Likewise.
13046
13047 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13048
13049         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13050         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13051         * constants.c (build_constant_data_ref): Check for cached
13052         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13053         in TYPE_CPOOL_DATE_REF.
13054         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13055         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13056         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13057         (LOCAL_FINAL): New macro.
13058         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13059         constant pool -- don't try to reuse.
13060         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13061         TYPE_LANG_SPECIFIC.
13062         (find_in_current_zip): Use TYPE_JCF.
13063         * parse.h (java_check_final): Prototype removed.
13064         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13065         (maybe_create_class_interface_decl,
13066         check_class_interface_creation): Likewise.
13067         (java_expand_finals): Function removed.
13068         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13069         (block_statement:): Fixed comment.
13070         (anonymous_class_creation:): Likewise.
13071         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13072         argument patch.
13073         (check_class_interface_creation): Loosened error report on (inner)
13074         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13075         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13076         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13077         argument patch.
13078         (create_interface): Likewise.
13079         (anonymous_class_counter): New static global.
13080         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13081         patch. Fixed comments.
13082         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13083         anonymous_class_counter when declaring a toplevel class.
13084         (craft_constructor): Fixed constructor name when handling
13085         anonymous classes. Anonymous class constructors to feature hidden
13086         this$<n> parameter.
13087         (java_fix_constructors): Added comment.
13088         (java_check_final): Function removed.
13089         (java_complete_expand_methods): Fixed comment. Don't generate
13090         class data, save its outgoing constant pool instead.
13091         (verify_constructor_super): Skip anonymous class constructor
13092         hidden this$<n> parameter.
13093         (java_expand_classes): New local `saved_ctxp'. Removed call to
13094         java_expand_finals and java_check_final. Expand anonymous class
13095         constructors. Generate class data.
13096         (build_super_invocation): Skip anonymous class hidden this$<n>
13097         parameter.
13098         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13099         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13100         (set_java_signature): Likewise.
13101
13102 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13103
13104         * gjavah.c: Delete ACC_VISIBILITY define.
13105         * jcf.h: Add ACC_VISIBILITY define.
13106         * parse.y: final: rule tagged <value>.
13107         (java_check_regular_methods): Use ACC_VISIBILITY define for
13108         default package access check.
13109         (local_variable_declaration_statement): Use final: rule.
13110
13111 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13112
13113         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13114         (final:): New rule.
13115
13116 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13117
13118         * gjavah.c (print_field_info): Allow non-static final fields.
13119
13120 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13121
13122         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13123         * parse.y (patch_anonymous_class): New function.
13124         (create_anonymous_class): Register incomplete type when the
13125         class/interface to extends/implement isn't known yet.
13126         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13127         (verify_constructor_super): Tuned error message.
13128
13129 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13130
13131         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13132         (ANONYMOUS_CLASS_P): New macro.
13133         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13134         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13135         * parse.y (create_class): Added leading argument.
13136         (maybe_create_class_interface_decl,
13137         check_class_interface_creation): Likewise.
13138         (craft_constructor): New function.
13139         (verify_constructor_super): Added argument in prototype.
13140         (class_declaration:): Inserted leading argument.
13141         (for_begin:): Use FOR_LOOP_P.
13142         (anonymous_class_creation): Create WFL of the anonymous class to
13143         instantiate. Call build_new_invocation. Added comments.
13144         (check_class_interface_creation): Handle parameter `anonymous' in
13145         verbose mode class creation announce.
13146         (link_nested_class_to_enclosing): Exclude anonymous classes.
13147         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13148         anonymous class, even though they appear to have an enclosing
13149         context.
13150         (create_interface): Pass extra argument to
13151         check_class_interface_creation.
13152         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13153         (create_class): Call check_class_interface_creation and
13154         maybe_create_class_interface_decl with extra new argument. Don't
13155         add private this$<n> to anonymous classes.
13156         (method_declarator): Insert hidden this$<n> to anonymous class
13157         constructors.
13158         (java_fix_constructors): Deleted code creating default
13159         constructor. Call craft_constructor instead.
13160         (java_check_regular_methods): Set `saw_constructor' to 1 for
13161         anonymous classes.
13162         (fix_constructors): Pass extra argument to verify_constructor_super.
13163         (verify_constructor_super): New local `sdecl', use it. Search for
13164         matching constructor (possibly featuring arguments) in super
13165         class.
13166         (lookup_method_invoke): Craft constructor according to arguments
13167         list when dealing with anonymous class constructors.
13168         (build_super_invocation): Pass arguments to anonymous class super
13169         constructors.
13170         (search_loop): Use FOR_LOOP_P.
13171         (labeled_block_contains_loop_p): Likewise.
13172
13173 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13174
13175         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13176         (enclosing_context_p): New function.
13177         (get_access_flags_from_decl): Handle CLASS_STATIC.
13178         (maybe_layout_super_class): Extra first argument passed to
13179         do_resolve_class.
13180         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13181         ID_INIT_P.
13182         * decl.c (access0_identifier_node): New global.
13183         (init_decl_processing): access0_identifier_node initialized.
13184         (pushdecl): Set DECL_CONTEXT only on non type decls.
13185         * expr.c (lookup_field): Lookup inner class fields in enclosing
13186         contexts.
13187         (expand_invoke): Use ID_INIT_P.
13188         (expand_java_field_op): Use DECL_CLINIT_P.
13189         * java-tree.def (CLASS_LITERAL): New tree code.
13190         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13191         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13192         (struct lang_decl): New field `inner_access'.
13193         (enclosing_context_p): Prototyped.
13194         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13195         ID_CLINIT_P): New macros.
13196         (CLASS_STATIC): New macro.
13197         (CLASS_ACCESS0_GENERATED_P): New macro.
13198         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13199         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13200         INNER_CLASS_P): New macros.
13201         (DECL_INNER_CLASS_LIST): New macro.
13202         * jcf-parse.c (yyparse): Avoid the use of ANSI string
13203         concatenation.
13204         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13205         the shift value to int. Fixed typo in comment.
13206         * lex.c (inst_id, wpv_id): Initialize.
13207         * mangle.c (unicode_mangling_length): Take `$' into account.
13208         * parse.h (DRECOVER, RECOVER): Terminate properly.
13209         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13210         (typedef struct _jdep): New field `enclosing'.
13211         (JDEP_ENCLOSING): New macro.
13212         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13213         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13214         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13215         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13216         GET_ENCLOSING_CPC_CONTEXT): New macros.
13217         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13218         (do_resolve_class): Added extra argument in prototype.
13219         * parse.y (resolve_class): Added extra argument in prototype.
13220         (maybe_create_class_interface_decl): Likewise.
13221         (maybe_use_access_method, build_wfl_wrap): New functions.
13222         (java_complete_expand_classes, java_complete_expand_class):
13223         Likewise.
13224         (java_parser_context_push_initialized_field,
13225         java_parser_context_suspend, java_parser_context_resume):
13226         Likewise.
13227         (maybe_make_nested_class_name, make_nested_class_name,
13228         set_nested_class_simple_name_value,
13229         link_nested_class_to_enclosing, find_as_inner_class,
13230         find_as_inner_class_do, check_inner_class_redefinition,
13231         build_thisn_assign, build_current_thisn, build_access_to_thisn,
13232         maybe_build_thisn_access_method, build_outer_field_access,
13233         build_outer_field_access_methods, build_outer_field_access_expr,
13234         build_outer_method_access_method, build_new_access_id,
13235         build_outer_field_access_method, outer_field_access_p,
13236         outer_field_expanded_access_p, outer_field_access_fix,
13237         build_incomplete_class_ref, patch_incomplete_class_ref,
13238         create_anonymous_class): Likewise.
13239         (inst_id, wpv_id): New static global variables.
13240         (synchronized:): New rule, tagged <node>.
13241         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13242         rules.
13243         (anonymous_class_creation:): New rule, tagged <node>.
13244         (NEW_TK): Tagged <node>.
13245         (type_literals, array_type_literal): New rules, tagged <node>.
13246         (class_declaration:): Removed action when reducing by class_body:
13247         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13248         using GET_CPC in sub-rules.
13249         (class_member_declaration): Handle inner classes.
13250         (method_declaration): When reducing method_header:, reset
13251         current_function_decl when appropriate.
13252         (method_declarator:): Set the number of formal parameter to 0 for
13253         method declared without arguments.
13254         (constructor_declarator:): Likewise.
13255         (static_initializer:): List of elements kept in a list.
13256         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13257         use of the keyword `static' for type declarations.
13258         (block_statement:): Handle inner class declarations.
13259         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13260         type qualified `this'.
13261         (class_instance_creation_expression): Use anonymous_class_creation:
13262         to handle inner class instances creation. Handle qualified `new'.
13263         (something_dot_new): Added appropriate actions.
13264         (create_new_parser_context): New function.
13265         (java_push_parser_context, java_parser_context_save_global,
13266         java_parser_context_suspend): Use create_new_parser_context.
13267         (check_modifiers): Changed leading comment.
13268         (check_class_interface_creation): Handle interclasses.
13269         (add_superinterfaces): Fixed comment.
13270         (create_interface): Build qualified name from the raw_name instead
13271         of its matching WFL. Push the initialized fields list. raw_name added
13272         as an extra argument to maybe_create_class_interface_decl.
13273         (create_class): Build qualified name from the raw_name instead of
13274         its matching WFL. Removed assignment to current_parsed_class_un.
13275         Call PUSH_ERROR before returning an error. Suspend the current
13276         parser context when processing an inner class. Push the
13277         initialized fields list. raw_name added as an extra argument to
13278         maybe_create_class_interface_decl. Add the private this$<n>
13279         field.
13280         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13281         (register_fields): Get the class type from GET_CPC and handle
13282         previous errors.  Added code to handle the creation of static
13283         fields in inner classes. Initialized fields initialization
13284         statements kept in a list of lists.
13285         (maybe_generate_finit): Initialized fields initialization
13286         statements kept in a list of lists. Use GET_CPC.
13287         (maybe_generate_clinit): Likewise.
13288         (method_header): Use GET_CPC and GET_CPC_UN.
13289         (parser_qualified_classname): Handle inner classes.
13290         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13291         (java_fix_constructors): Hide pointer to enclosing context
13292         instance in constructor list when dealing with inner classes.
13293         (jdep_resolve_class): Call resolve_class with extra first argument
13294         JDEP_ENCLOSING.
13295         (resolve_class): Add enclosing context as a first extra argument
13296         to do_resolve_class.
13297         (do_resolve_class): Call find_as_inner_class. Handle WFLs
13298         properly.
13299         (resolve_no_layout): Extra argument added to resolve_class
13300         invocation.
13301         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13302         (java_get_real_method_name): Use GET_CPC_UN.
13303         (check_abstract_method_definitions): Use DECL_CLINIT_P.
13304         (java_check_abstract_methods): Handle static method declared in
13305         inner classes by an error.
13306         (java_check_regular_methods): Use DECL_CLINIT_P.
13307         (source_start_java_method): Also set DECL_MAX_LOCALS.
13308         (create_artificial_method): Call java_parser_context_save_global
13309         and java_parser_context_restore_global instead of saving/restoring
13310         the context by hand.
13311         (expand_start_java_method): Improved verbose mode message.
13312         (java_complete_expand_methods): Fixed leading comment. Use
13313         DECL_CLINIT_P.
13314         (fix_constructors): Added assignment to this$<n> if necessary.
13315         (java_expand_classes): Call java_complete_expand_classes instead
13316         of java_complete_expand_methods.
13317         (make_qualified_primary): Simplified.
13318         (merge_qualified_name): Optimized for missing left or right parts.
13319         (resolve_expression_name): Handle access to outer class fields from
13320         interclasses.
13321         (resolve_qualified_expression_name): New macro
13322         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13323         classes. Report error on non appropriate qualification of
13324         `new'. Handle qualified `this'.
13325         (not_accessible_p): Allow access to outer class private fields from
13326         inner classes.
13327         (patch_method_invocation): Handle method invocations through
13328         access methods and inner class constructor invocations.
13329         (find_applicable_accessible_methods_list): Search enclosing
13330         contexts of an inner class.
13331         (search_applicable_methods_list): Fixed typo.
13332         (argument_types_convertible): Handle inner class constructors'
13333         hidden outer context reference argument.
13334         (qualify_ambiguous_name): Handle qualified `this'.
13335         (java_complete_lhs): Handle use of field accessed through
13336         artificial access methods in various cases of assignments. Handle
13337         CLASS_LITERAL node.
13338         (check_final_assignment): Use DECL_CLINIT_P.
13339         (valid_ref_assignconv_cast_p): Handle the destination being an
13340         enclosing context of the source.
13341         (patch_unaryop): Handle use of field accessed through artificial
13342         access methods.
13343         (patch_return): Use DECL_CLINIT_P.
13344         (patch_throw_statement): Use DECL_CLINIT_P.
13345         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
13346         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
13347         ID_INIT_P.
13348
13349 2000-01-16  Anthony Green  <green@cygnus.com>
13350
13351         * parse.y (build_string_concatenation): Only use
13352         StringBuffer(String) shortcut if String arg is constant.
13353
13354 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13355
13356         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13357         the shift value to int. Fixed typo in comment.
13358
13359 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
13360
13361         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13362         * jcf-write.c: Likewise.
13363         * parse.y: Likewise.
13364         * parse.c: Regenerate.
13365
13366 2000-01-09  Anthony Green  <green@cygnus.com>
13367
13368         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13369         bytecodes in the correct order.
13370
13371 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13372
13373         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13374
13375 2000-01-06  Anthony Green  <green@cygnus.com>
13376
13377         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13378         before building constant array decl.
13379
13380 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13381
13382         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
13383         method invocation and typo in conditional expression.
13384         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
13385         the appropriate NOTE_POP.
13386         * parse.y (patch_binop): Shift value mask to feature the right
13387         type.
13388
13389 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13390
13391         * class.c (assume_compiled, assume_compiled_node): Add static
13392         prototype.
13393         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13394
13395         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13396
13397         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13398
13399         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13400         to `__modifier' to avoid stringifying it.
13401
13402         * parse.y (verify_constructor_circularity): Don't call a variadic
13403         function with a non-literal format string.
13404         (java_check_abstract_methods): Move unreachable code inside
13405         `continue' statement.
13406         (lookup_method_invoke): Call xstrdup, not strdup.
13407
13408         * expr.c (expand_java_field_op): Avoid the use of ANSI string
13409         concatenation.
13410
13411         * jcf-parse.c (yyparse): Likewise.
13412
13413         * jv-scan.c (main): Likewise.
13414
13415 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13416
13417         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
13418         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13419         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
13420         concatenation.
13421
13422         * parse.y (synchronized, variable_redefinition_error,
13423         check_class_interface_creation, create_interface, create_class,
13424         method_header, finish_method_declaration,
13425         check_modifiers_consistency, method_declarator,
13426         complete_class_report_errors, check_abstract_method_definitions,
13427         java_check_regular_methods, check_throws_clauses,
13428         java_check_abstract_methods, read_import_dir,
13429         check_pkg_class_access, declare_local_variables, fix_constructors,
13430         cut_identifier_in_qualified, resolve_expression_name,
13431         resolve_qualified_expression_name, patch_method_invocation,
13432         java_complete_lhs, patch_assignment, try_builtin_assignconv,
13433         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
13434         patch_exit_expr, patch_exit_expr, patch_switch_statement,
13435         patch_try_statement, patch_synchronized_statement,
13436         patch_throw_statement, check_thrown_exceptions,
13437         patch_conditional_expr): Likewise.
13438
13439 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13440
13441         * Makefile.in (LIBDEPS): Added gcc's errors.o
13442         (../jcf-dump$(exeext):): Link with gcc's errors.o
13443         (../gcjh$(exeext):): Likewise.
13444         * expr.c (expand_java_NEW): Layout the entire target type instead of
13445         laying out its methods only.
13446         (lookup_field): Layout the class after having loaded it.
13447         * java-tree.h (java_debug_context): Declared.
13448         * jcf-io.c (toplev.h): Included.
13449         (find_class): Removed assignment to jcf's outofsynch
13450         field. Force source file to be read if newer than its matching
13451         class file. Tweaked debug messages.
13452         * jcf-parse.c (jcf_out_of_synch): Deleted.
13453         (read_class): Call to jcf_out_of_synch removed.
13454         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
13455         (jcf_out_of_synch): Prototype deleted.
13456         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
13457         `deprecated' and `class_err': integer turned into bit-fields.
13458         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
13459         * parse.y (package_list): New global.
13460         (package_declaration:): Record newly parsed package name.
13461         (extra_ctxp_pushed_p): Static global deleted.
13462         (java_parser_context_save_global): Create buffer context for the
13463         purpose of saving globals, if necessary.
13464         (java_parser_context_restore_global): Pop context pushed for the
13465         purpose of saving globals, if necessary.
13466         (java_debug_context_do): New prototype and function.
13467         (java_debug_context): Likewise.
13468         (do_resolve_class): Use already parsed package names to qualify
13469         and lookup class candidate.
13470         (java_pre_expand_clinit): Removed unnecessary local variable.
13471
13472 1999-12-17  Tom Tromey  <tromey@cygnus.com>
13473
13474         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
13475         fixes PR gcj/119.
13476         (process_file): Use `\n\' at end of each line in string.
13477
13478 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13479
13480         * expr.c (expand_invoke): Layout the loaded class before
13481         attempting to use it.
13482         (expand_java_field_op): Allow final field assignments to take
13483         place in $finit$.
13484         * typeck.c (convert): Return error_mark_node if expr is null.
13485
13486 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13487
13488         * class.c (class_depth): Return -1 if the class doesn't load
13489         properly.
13490         * expr.c (can_widen_reference_to): Check for errors during depth
13491         computation and return 0 accordingly.
13492         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
13493         create default constructors and add an other error check.
13494         * parse.h (java_fix_constructors): Prototyped.
13495         * parse.y (java_pre_expand_clinit): Likewise.
13496         (build_super_invocation): Re-prototyped to feature one argument.
13497         (java_check_circular_reference): Directly use `current'.
13498         (java_fix_constructors): New function.
13499         (java_check_regular_methods): Don't create default constructors
13500         here, but abort if none were found.
13501         (java_complete_expand_methods): Pre-process <clinit> calling
13502         java_pre_expand_clinit.
13503         (java_pre_expand_clinit): New function.
13504         (fix_constructors): build_super_invocation invoked with the
13505         current method declaration as an argument.
13506         (build_super_invocation): Use the context of the processed method
13507         decl argument instead of current_class.
13508         * typeck.c (lookup_java_method): Take WFLs in method names into
13509         account.
13510
13511 1999-12-14  Per Bothner  <per@bothner.com>
13512
13513         * class.c (make_class_data): flag_keep_inline_functions to keep
13514         private methods in the method array.
13515
13516 1999-12-15  Anthony Green  <green@cygnus.com>
13517
13518         * check-init.c (check_init): Take into account both types of
13519         `throw's when checking for uninitialized variables.
13520
13521 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13522
13523         * parse.y (java_complete_lhs): Force conversion of array
13524         dimensions to int_type_node, that's what runtime's ABI expects.
13525
13526 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13527
13528         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
13529         operand of a WFL, until the Java front-end gets fixed with regard
13530         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
13531
13532 1999-12-10  Andrew Haley  <aph@cygnus.com>
13533
13534         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
13535         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
13536         expr.c (build_java_athrow): Add support for sjlj-exceptions.
13537         java-tree.h: Ditto.
13538         jcf-write.c: Ditto.
13539
13540 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13541
13542         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13543         before calling expand_eh_region_start and expand_start_all_catch.
13544         * except.c (expand_start_java_handler): Switch to permanent
13545         obstack before calling expand_eh_region_start.
13546         (expand_end_java_handler): Switch to permanent obstack before
13547         calling expand_start_all_catch.
13548
13549 1999-12-5  Anthony Green  <green@cygnus.com>
13550
13551         * decl.c (init_decl_processing): Mark throw_node as a noreturn
13552         function with side effects.
13553         (init_decl_processing): Mark all memory allocating DECLs with
13554         DECL_IS_MALLOC.
13555
13556 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13557
13558         * except.c (expand_end_java_handler): Call
13559         expand_resume_after_catch and end_catch_handler.
13560
13561 1999-11-30  Anthony Green  <green@cygnus.com>
13562
13563         * verify.c (verify_jvm_instructions): Create new return label
13564         chain if non existent (don't rely on the verified state of the jsr
13565         target.)
13566
13567 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13568
13569         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
13570         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
13571
13572         * parse.y (patch_assignment): Removed bogus final class test on
13573         lhs when checking on whether to emit an ArrayStoreException runtime
13574         check.
13575         * expr.c (expand_java_arraystore): Likewise.
13576
13577 1999-11-28 Anthony Green <green@cygnus.com>
13578
13579         * decl.c (find_local_variable): Reuse single slot decls when
13580           appropriate.
13581
13582 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13583
13584         * jcf-parse.c (saw_java_source): Global variable removed.
13585         (read_class): Don't use `saw_java_source'. Added extra braces.
13586         (yyparse): Code setting `saw_java_source' removed.
13587
13588 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
13589
13590         * except.c (emit_handlers): Zero catch_clauses after emitting them.
13591
13592 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13593
13594         * verify.c (merge_type_state): Non verified subroutines being
13595         considered more than once to trigger passive type merge.
13596
13597 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13598
13599         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
13600         in case of error. Error message tuned.
13601
13602 1999-11-21  Anthony Green  <green@cygnus.com>
13603
13604         * constants.c (find_methodref_index): Unwrap method names before
13605         inserting them in the constant pool.
13606
13607         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
13608
13609         * class.c (assume_compiled_node): New typedef.
13610         (assume_compiled_tree): New static data.
13611         (find_assume_compiled_node): New function.
13612         (add_assume_compiled): New function.
13613         (assume_compiled): New function.
13614         * class.c (make_class_data): Use assume_compiled.
13615         (is_compiled_class): Use assume_compiled.
13616
13617         * java-tree.h (add_assume_compiled): Declare.
13618
13619         * lang.c (lang_decode_option): Parse new options.
13620
13621 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13622
13623         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
13624         int_type_node: that's what `_Jv_AllocObject' expects.
13625
13626 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13627
13628         * parse.y (lookup_method_invoke): Use lang_printable_name to
13629         reliably build the type name during error report. Fixes PR gcj/97.
13630
13631 1999-11-09  Tom Tromey  <tromey@cygnus.com>
13632
13633         * jcf-path.c: Include <sys/stat.h>.
13634         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
13635         (DIR_UP): New macro.
13636
13637 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13638
13639         * parse.y (source_end_java_method): Resume permanent allocation,
13640         reversing Apr 27 1998 patch.
13641         (patch_string_cst): Pop obstacks after having pushed the permanent
13642         ones.
13643
13644 1999-11-05  Tom Tromey  <tromey@cygnus.com>
13645
13646         * class.c (finish_class): Emit inlined methods if any native
13647         methods exist in the class.  Fixes PR gcj/85.
13648
13649 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13650
13651         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
13652         (qualify_ambiguous_name): Likewise.
13653
13654 1999-11-03  Godmar Back <gback@cs.utah.edu>
13655
13656         * typeck.c: (lookup_java_method):  search all inherited
13657         interfaces when looking up interface method.
13658
13659 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13660
13661         * parse.y (method_header:): Issue error message for rule `type
13662         error'.
13663         (synchronized:): Error report when not using synchronized.
13664
13665 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13666
13667         * parse.y (resolve_qualified_expression_name): Prevent `this' from
13668         being used before the superclass constructor has been called.
13669         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
13670         instead of `CALL_THIS_CONSTRUCTOR_P'.
13671
13672 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
13673
13674         * check-init.c: Fix typo in comment.
13675
13676 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13677
13678         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
13679         and final method.
13680
13681 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13682
13683         * parse.y (expression_statement:): Call function to report
13684         improper invocation of a constructor.
13685         (parse_ctor_invocation_error): New function.
13686
13687 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
13688
13689         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
13690         remember_end_note.
13691
13692 1999-10-21  Tom Tromey  <tromey@cygnus.com>
13693
13694         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
13695         in generated `main'.
13696
13697 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13698
13699         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
13700         (qualify_ambiguous_name): Likewise.
13701
13702 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13703
13704         * parse.y (java_complete_tree): fold_constant_for_init to work on
13705         permanent_obstack.
13706         (java_complete_lhs): Likewise.
13707         (array_constructor_check_entry): Complete an initializer element
13708         on permanent_obstack.
13709
13710 1999-10-19  Tom Tromey  <tromey@cygnus.com>
13711
13712         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
13713         From Mike Moreton <mike@pillim.demon.co.uk>.
13714
13715 1999-10-15  Greg McGary  <gkm@gnu.org>
13716
13717         * java-tree.h (flag_bounds_check): Remove extern decl.
13718         * lang.c (flag_bounds_check): Remove global variable.
13719         (lang_f_options): Remove "bounds-check" entry.
13720         (lang_init_options): Default flag_bounds_check to "on".
13721
13722 1999-10-14  Tom Tromey  <tromey@cygnus.com>
13723
13724         * jvgenmain.c (usage): New function.
13725         (main): Use it.  Also, handle `-D' options.
13726         * jvspec.c (lang_specific_driver): Recognize -D.
13727         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
13728
13729         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
13730
13731 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13732
13733         * jcf-dump.c (print_constant, disassemble_method): Don't call a
13734         variadic function with a non-literal format string.
13735
13736         * parse-scan.y (report_main_declaration): Likewise.
13737
13738         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
13739
13740         * parse.y (read_import_dir, patch_assignment, patch_binop,
13741         patch_array_ref): Likewise.
13742
13743         * typeck.c (build_java_array_type): Likewise.
13744
13745         * verify.c (verify_jvm_instructions): Likewise.
13746
13747 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13748
13749         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
13750
13751 1999-10-07  Anthony Green  <green@cygnus.com>
13752
13753         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
13754         where CHECK_PUT may fail for valid reasons.
13755
13756         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
13757         UNSAFE_PUTN): New macros.
13758
13759 1999-10-04  Tom Tromey  <tromey@cygnus.com>
13760
13761         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
13762         well.  Fixes Java PR gcj/59.
13763         * parse-scan.y (yyerror): Report errors.
13764
13765 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
13766
13767         * decl.c (insert_block): Remove unconditional `abort'.
13768
13769 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
13770
13771         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
13772         FUNCTION_CODE now of type int.  All callers changed.
13773         Set the builtin's DECL_BUILT_IN_CLASS.
13774
13775 1999-09-23  Tom Tromey  <tromey@cygnus.com>
13776
13777         * jvspec.c (lang_specific_driver): Don't read spec file if
13778         -fsyntax-only given.
13779
13780 1999-09-22  Tom Tromey  <tromey@cygnus.com>
13781
13782         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
13783
13784         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
13785         (WORDS_TO_LONG): Likewise.
13786         (WORDS_TO_DOUBLE): Likewise.
13787
13788 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13789
13790         * jcf-write.c (RELOCATION_VALUE_0): New macro.
13791         (RELOCATION_VALUE_1): Likewise.
13792         (emit_iinc, emit_reloc, push_constant1, push_constant2,
13793         push_in_const, push_long_const): Prototyped.
13794         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
13795         (push_constant2): Likewise.
13796         (push_int_const): Cast find_constant1's integer arguments to `jword'.
13797         (find_constant_wide): Cast find_constant2's integer arguments to
13798         `jword'.
13799         (find_constant_index): Cast find_constant2's and find_constant2's
13800         integer arguments to `jword'.
13801         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
13802         (emit_switch_reloc): Use RELOCATION_VALUE_0.
13803         (emit_if): Use RELOCATION_VALUE_1.
13804         (emit_goto): Likewise.
13805         (emit_jsr): Likewise.
13806         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
13807         argument to push_long_const to HOST_WIDE_INT.
13808
13809 1999-09-15  Andreas Schwab  <schwab@suse.de>
13810
13811         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
13812
13813 1999-09-20  Nick Clifton  <nickc@cygnus.com>
13814
13815         * lang.c (lang_decode_option): Extend comment.
13816
13817 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13818
13819         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
13820         instead of fndecl.
13821
13822 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13823
13824         * gjavah.c (get_field_name, print_method_info, print_include,
13825         add_namelet): Use xmalloc, not malloc.
13826
13827         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
13828         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
13829         NULL pointer.
13830
13831         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
13832
13833         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
13834
13835         * jcf-path.c (add_entry): Likewise.
13836
13837         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
13838
13839         * jv-scan.c (xmalloc): Remove definition.
13840
13841         * jvgenmain.c (xmalloc): Likewise.
13842
13843         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
13844
13845         * lex.c (java_store_unicode): Use xrealloc, not realloc.
13846
13847         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
13848         concat, not xmalloc/sprintf.
13849         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
13850         (xstrdup): Remove definition.
13851
13852         * parse.y (duplicate_declaration_error_p,
13853         constructor_circularity_msg, verify_constructor_circularity,
13854         check_abstract_method_definitions, java_check_regular_methods,
13855         java_check_abstract_methods, patch_method_invocation,
13856         check_for_static_method_reference, patch_assignment, patch_binop,
13857         patch_cast, array_constructor_check_entry, patch_return,
13858         patch_conditional_expr): Use xstrdup, not strdup.
13859
13860         * zextract.c (ALLOC): Use xmalloc, not malloc.
13861
13862 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13863
13864         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
13865
13866         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
13867         (do_spec, lang_specific_pre_link, lang_specific_driver,
13868         input_filename, input_filename_length): Don't declare.
13869         (main_class_name, jvgenmain_spec, lang_specific_driver):
13870         Constify a char*.
13871         (lang_specific_driver): All calls to the function pointer
13872         parameter now explicitly call `fatal'.
13873
13874 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13875
13876         * parse.y (find_applicable_accessible_methods_list): Search
13877         abstract classes as interfaces.
13878
13879 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13880
13881         * class.c (finish_class): We're now outside a valid method
13882         declaration. Tell the rest of gcc so.
13883
13884 1999-09-08  Bruce Korb  autogen@linuxbox.com
13885
13886         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
13887
13888 1999-09-07  Tom Tromey  <tromey@cygnus.com>
13889
13890         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
13891         java-array.h.
13892         (decode_signature_piece): Don't emit "::" in JArray<>.
13893         (print_namelet): Only print trailing `;' when printing a class.
13894
13895 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
13896
13897         * java-tree.h: Delete declarations for all tree nodes now moved to
13898         global_trees.
13899         * decl.c: Delete their definitions.
13900
13901 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
13902
13903         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
13904         * Makefile.in (OBJS): Add ggc-callbacks.o.
13905         (OBJDEPS): Likewise.
13906
13907 1999-09-03  Tom Tromey  <tromey@cygnus.com>
13908
13909         * parse.y (strip_out_static_field_access_decl): Return operand if
13910         it satisfies JDECL_P.
13911
13912 1999-09-02  Tom Tromey  <tromey@cygnus.com>
13913
13914         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
13915         Handle nested arrays, like `[[I'.
13916
13917 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13918
13919         * class.c (finish_class): Remove unused parameter, all callers
13920         changed.
13921
13922         * expr.c (build_java_athrow): Change return type to void.
13923         (java_lang_expand_expr): Make sure each case in switch returns a
13924         value.
13925
13926         * java-tree.h (finish_class): Fix prototype to take void args.
13927
13928         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
13929         (main): Issue return from main, not exit.
13930
13931         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
13932
13933         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
13934
13935         * jv-scan.c (main): Issue return from main, not exit.
13936
13937         * parse.y (check_abstract_method_definitions,
13938         java_check_abstract_method_definitions): Add static prototypes.
13939         (java_complete_expand_methods): Fix call to `finish_class'.
13940
13941         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
13942         and `prevpc'.
13943
13944 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13945
13946         * lang.c (language_string): Constify.
13947
13948 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13949
13950         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
13951         Remove hacks for stuff which comes from libiberty.
13952
13953         * Make-lang.in: Likewise.
13954
13955 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
13956
13957         * Makefile.in (xref.o): Depend on xref.c explicitly.
13958
13959 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13960
13961         * java-tree.h (lang_printable_name): Constify a char*.
13962
13963         * lang.c (lang_printable_name): Likewise.
13964
13965 1999-08-27  Jeffrey A Law  (law@cygnus.com)
13966
13967         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
13968         comments in C code.
13969
13970 1999-08-26  Tom Tromey  <tromey@cygnus.com>
13971
13972         * gjavah.c (print_cxx_classname): Print "::" before qualified
13973         name.
13974
13975 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13976
13977         * parse.y (lookup_cl): Changed leading comment. Now does its best
13978         to set the column number.
13979         (qualify_ambiguous_name): Take WFL wrappers into account.
13980
13981 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
13982
13983         * verify.c (verify_jvm_instructions): Don't check instruction
13984         validity beyond end of method.
13985
13986 1999-08-25  Tom Tromey  <tromey@cygnus.com>
13987
13988         * jvspec.c (lang_specific_driver): Correctly handle --help again.
13989
13990 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13991
13992         * gjavah.c (print_name, print_base_classname, utf8_cmp,
13993         cxx_keyword_subst, generate_access, name_is_method_p,
13994         get_field_name, print_field_name, super_class_name, print_include,
13995         decode_signature_piece, print_class_decls, usage, help,
13996         java_no_argument, version, add_namelet, print_namelet): Add static
13997         prototype.
13998         (print_base_classname, utf8_cmp, cxx_keyword_subst,
13999         name_is_method_p): Constify a char*.
14000         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14001         Provide a final else clause in an if-else-if.
14002         (print_field_info): Add missing final arg in function call to
14003         `print_field_name'.
14004         (print_method_info, decompile_method, decode_signature_piece,
14005         print_c_decl, print_full_cxx_name, print_stub,
14006         print_mangled_classname, super_class_name, print_include,
14007         add_namelet, add_class_decl, print_class_decls, process_file,
14008         help): Constify a char*.
14009
14010         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14011         push_int_const, find_constant_wide, find_constant_index,
14012         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14013         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14014         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14015         emit_if, emit_goto, emit_jsr, call_cleanups,
14016         make_class_file_name): Add static prototypes.
14017         (generate_bytecode_return, generate_bytecode_insns): Pass a
14018         NULL_PTR, not a NULL_TREE.
14019
14020         * jv-scan.c: Include "jcf.h".
14021         (main): Declare using DEFUN macro.
14022
14023         * jvspec.c (find_spec_file, lang_specific_pre_link,
14024         lang_specific_driver): Add prototypes.
14025         (find_spec_file): Constify a char*.
14026
14027         * keyword.gperf (hash, java_keyword): Add prototypes.
14028
14029         * lang.c (lang_print_error): Add static prototype.
14030         (lang_init): Prefer memcpy over bcopy to avoid casts.
14031
14032         * lex.c (yylex): Add static prototype.
14033
14034         * parse-scan.y: Include "lex.c" earlier.
14035
14036         * parse.h: Remove redundant declaration for `yylex'.
14037
14038         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14039         labeled_block_contains_loop_p): Add static prototypes.
14040         (not_accessible_p): Make static to match prototype.
14041
14042         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14043
14044 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14045
14046         * parse.y (check_method_redefinition): Changed leading comment.
14047         (check_abstract_method_definitions): New function.
14048         (java_check_abstract_method_definitions): New function.
14049         (java_check_regular_methods): Call it.
14050         (verify_constructor_super): Fixed indentation.
14051         (lookup_method_invoke): Likewise.
14052
14053 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14054
14055         * parse.y (method_header): Return a null pointer if the current
14056         class node is null.
14057         (finish_method_declaration): Return if the current function decl
14058         is null.
14059         (source_start_java_method): Likewise.
14060         (java_method_add_stmt): Likewise.
14061
14062 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14063
14064         * class.c (emit_register_class): Removed unnecessary call to
14065         start_sequence.
14066         * parse.y (labeled_block_contains_loop_p): Removed unused local
14067         variable.
14068
14069 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14070
14071         * parse.y (java_refold): Added prototype.
14072
14073 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14074
14075         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14076         (java_stabilize_reference): Removed unnecessary `else'.
14077         (java_complete_lhs): Set flag to remember boolean. Call
14078         java_refold. Added comments.
14079         (java_decl_equiv): New function.
14080         (binop_compound_p): Likewise.
14081         (java_refold): Likewise.
14082         (patch_unaryop): Striped static field access assigned to decl and
14083         op. Changed promotion scheme for ++/-- operators.
14084         (search_loop): New function.
14085         (labeled_block_contains_loop_p): Likewise.
14086         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14087         comment.
14088         (patch_bc_statement): Call search_loop. Fixed comment.
14089
14090 1999-08-14  Anthony Green  <green@cygnus.com>
14091
14092         * expr.c (java_lang_expand_expr): Mark static array data as
14093         referenced.
14094
14095 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14096
14097         * jvgenmain.c (main): NUL-terminate name_obstack.
14098
14099 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14100
14101         * check-init.c (check_bool2_init, done_alternative): Add static
14102         prototypes.
14103
14104         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14105         (add_method, build_utf8_ref, build_class_ref,
14106         append_gpp_mangled_type, layout_class_method): Constify a char*.
14107
14108         * decl.c (push_promoted_type, make_binding_level): Add static
14109         prototypes.
14110         (push_promoted_type, pushdecl): Constify a char*.
14111
14112         * except.c (find_handler_in_range, link_handler,
14113         check_start_handlers): Add static prototypes.
14114
14115         * expr.c (process_jvm_instruction): Constify a char*.
14116
14117         * gjavah.c (main): Constify a char*.
14118
14119         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14120         Constify a char*.
14121
14122         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14123         static prototypes.
14124         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14125         munge, print_ents): Constify a char*.
14126
14127         * jcf-dump.c (disassemble_method): Constify a char*.
14128         (print_constant_pool, print_exception_table): Add static prototypes.
14129         (print_constant, print_exception_table, main, disassemble_method):
14130         Constify a char*.
14131
14132         * jcf-io.c (find_classfile, find_class): Likewise.
14133
14134         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14135         (set_source_filename, predefined_filename_p): Add static prototypes.
14136         (set_source_filename, get_constant, get_class_constant,
14137         find_in_current_zip): Constify a char*.
14138
14139         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14140         static prototypes.
14141         (add_entry, add_path, jcf_path_classpath_arg,
14142         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14143
14144         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14145         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14146         jcf_parse_one_method, jcf_parse_methods,
14147         jcf_parse_final_attributes): Add static prototypes.
14148         (get_attribute): Constify a char*.
14149
14150         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14151         jcf_dependency_add_target, jcf_path_classpath_arg,
14152         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14153
14154         * jv-scan.c (main): Constify a char*.
14155         (gcc_obstack_init): Add prototype arguments.
14156
14157         * jvgenmain.c (gcc_obstack_init): Likewise.
14158         (main): Constify a char*.
14159
14160         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14161         static prototypes.
14162         (put_decl_string, lang_print_error): Constify a char*.
14163         (lang_init): Remove redundant extern prototype.
14164
14165         * mangle.c (emit_unicode_mangled_name): Constify a char*.
14166
14167         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14168         Add static prototypes.
14169         (get_type_from_signature): Constify a char*.
14170
14171         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14172         Add static prototypes.
14173         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14174         (verify_jvm_instructions): Constify a char*.
14175
14176         * xref.c (xref_flag_value): Likewise.
14177
14178         * xref.h (xref_flag_value): Likewise.
14179
14180         * zextract.c (makeword, makelong): Add static prototypes.
14181         (makeword, makelong): Constify a uch*.
14182
14183 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14184
14185         * lang.c (java_dummy_print): Constify a char*.
14186         (lang_print_error): Likewise.
14187         (lang_init): Remove redundant prototype for `print_error_function'.
14188         (lang_init_source): Likewise.
14189         (lang_identify): Constify a char*.
14190
14191 1999-08-09  Tom Tromey  <tromey@cygnus.com>
14192
14193         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14194         (WORDS_TO_LONG): Likewise.
14195         (WORDS_TO_DOUBLE): Likewise.
14196
14197 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14198
14199         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14200
14201         * expr.c (java_stack_pop, java_array_data_offset,
14202         build_java_throw_out_of_bounds_exception, case_identity,
14203         build_java_check_indexed_type): Add static prototypes.
14204         (linenumber_table, expand_invoke, expand_java_field_op,
14205         build_primtype_type_ref, expand_byte_code): Constify a char*.
14206
14207         * java-tree.h (build_primtype_type_ref, linenumber_table):
14208         Constify a char*.
14209         (java_lang_expand_expr): Add prototype.
14210
14211         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
14212         `java_lang_expand_expr'.
14213
14214         * lex.c (java_lex_error): Constify a char*.
14215         (java_get_unicode, java_read_char, java_allocate_new_line,
14216         java_unget_unicode, java_sneak_unicode): Prototype.
14217
14218         * parse-scan.y (current_class, package_name, method_declarator,
14219         report_class_declaration, yyerror): Constify a char*.
14220
14221         * parse.h (java_report_errors): Prototype.
14222         (yyerror): Constify a char*.
14223
14224         * parse.y (classitf_redefinition_error, check_modifiers,
14225         parse_jdk1_1_error, lookup_package_type,
14226         lookup_package_type_and_set_next, get_printable_method_name,
14227         purify_type_name): Constify a char*.
14228         (build_super_invocation, maybe_generate_finit,
14229         verify_constructor_super, parser_add_interface,
14230         add_superinterfaces, jdep_resolve_class, note_possible_classname,
14231         java_complete_expand_methods, java_expand_finals,
14232         cut_identifier_in_qualified, java_stabilize_reference,
14233         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14234         merge_string_cste): Prototype.
14235         (single_type_import_declaration, yyerror,
14236         variable_redefinition_error, build_array_from_name,
14237         build_unresolved_array_type, check_class_interface_creation,
14238         resolve_class, complete_class_report_errors,
14239         note_possible_classname, read_import_dir,
14240         find_in_imports_on_demand, resolve_package, fix_constructors,
14241         check_deprecation, lookup_method_invoke,
14242         maybe_build_primttype_type_ref, array_constructor_check_entry):
14243         Constify a char*.
14244         (java_complete_expand_methods, java_expand_finals): Make static.
14245         (convert_narrow): Remove static prototype.
14246
14247 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
14248
14249         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14250
14251 1999-08-02  Richard Henderson  <rth@cygnus.com>
14252
14253         * decl.c: Include defaults.h instead of expr.h.
14254         * parse.y: Likewise.
14255
14256 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
14257
14258         * java/decl.c (start_java_method): Change all uses of
14259         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14260         Ensure expr.h is included.
14261         * java/expr.c (pop_arguments): Ditto.
14262         * java/parse.y (expand_start_java_method): Ditto.
14263
14264 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14265
14266         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14267
14268 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
14269
14270         * decl.c: Include "function.h".
14271         * except.c: Likewise.
14272         * parse.y: Likewise.
14273         * Makefile.in: Update dependencies.
14274
14275 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14276
14277         * expr.c (build_java_soft_divmod): Provide a default case in switch.
14278         (java_lang_expand_expr): Mark parameters `target', `tmode' and
14279         `modifier' with ATTRIBUTE_UNUSED.
14280
14281         * gjavah.c (process_file): Add braces around ambiguous `else'.
14282
14283         * jcf-dump.c (print_access_flags, localvar_free): Change return
14284         type to void.
14285
14286         * parse.y (java_complete_expand_method): Initialize variable
14287         `exception_copy'.
14288         (resolve_qualified_expression_name): Likewise for `field_decl'.
14289         (patch_method_invocation): Likewise for `class_to_search'.
14290         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14291         (patch_assignment): Likewise for `lhs_type'.
14292
14293         * verify.c (verify_jvm_instructions): Remove unused variable
14294         `caller'.
14295
14296 1999-07-25  Richard Henderson  <rth@cygnus.com>
14297
14298         * decl.c (va_list_type_node): New.
14299
14300 1999-07-25  Anthony Green  <green@cygnus.com>
14301
14302         * gjavah.c (print_stub): New function.
14303         (METHOD_IS_NATIVE): New macro.
14304         (print_mangled_classname): Make static.
14305         (HANDLE_END_FIELD): Don't emit fields during stub generation.
14306         (process_file): Perform stub generation.
14307         (HANDLE_METHOD): Don't emit class decls during stub
14308         generation.
14309         (HANDLE_END_METHOD): Take into account stub generation.
14310         (print_method_info): Handle stub generation.
14311         (print_stub): New function.
14312         (print_cxx_classname): Make signature consistant with others.
14313         (help): Describe -stubs option.
14314         (main): Create stub file.
14315         (version): Use version.c.
14316         (print_full_cxx_name): New function.
14317         (print_c_decl): Use print_full_cxx_name.
14318
14319 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14320
14321         * check-init.c (check_init): Handle MAX_EXPR.
14322
14323 1999-07-15  Andrew Haley  <aph@cygnus.com>
14324
14325         * lang.c (flag_use_divide_subroutine): New variable.
14326         * typeck.c: (convert_ieee_real_to_integer): Bounds check
14327         fp-to-integer conversion.
14328         (convert): Call convert_ieee_real_to_integer when flag_fast_math
14329         is not set.
14330
14331         * expr.c (build_java_soft_divmod): New function.
14332         (build_java_binop): Call build_java_soft_divmod if
14333         flag_use_divide_subroutine is set.
14334         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14335         soft_lrem_node: new builtin functions.
14336         (init_decl_processing) Initialize the new builtins.
14337         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14338         soft_lrem_node: new builtin functions.
14339         (build_java_soft_divmod): New function.
14340         * parse.y: Call build_java_soft_divmod if
14341         flag_use_divide_subroutine is set.
14342         * parse.c: Rebuilt.
14343
14344         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
14345         a --specs= arg) even if not linking.
14346         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
14347         -fuse-divide-subroutine
14348
14349 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14350
14351         * parse.y (resolve_and_layout): Check methods only once.
14352         (resolve_qualified_expression_name): Verify thrown exceptions
14353         compatibility.
14354         (check_thrown_exceptions): Reject exceptions thrown in
14355         initializer. Error message tuned.
14356
14357 1999-07-14  Andrew Haley  <aph@cygnus.com>
14358
14359         * expr.c (expand_expr): Do not return the last statement in a
14360         block as the block's value.
14361
14362 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14363
14364         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14365         CALL_EXPR, to avoid order of evaluation changes.
14366
14367 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14368
14369         * parse.y (qualify_ambiguous_name): Do not use
14370         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14371
14372 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14373
14374         * check-init.c (check_init): Handle MAX_EXPR.
14375         * expr.c (force_evaluation_order): Force method call arguments to
14376         be evaluated in left-to-right order.
14377         * parse.y (qualify_ambiguous_name): Loop again to qualify
14378         NEW_ARRAY_EXPR properly.
14379
14380 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14381
14382         * parse.y (patch_invoke): Resolve unresolved invoked method
14383         returned type.
14384         (qualify_ambiguous_name): STRING_CST to qualify expression for
14385         type name resolution.
14386
14387 1999-06-24  Andrew Haley  <aph@cygnus.com>
14388
14389         * class.c (finish_class): Whenever a deferred method is
14390         output, rescan the list of methods to see if a new candidate for
14391         output can be found.
14392
14393 1999-06-28  Tom Tromey  <tromey@cygnus.com>
14394
14395         * jvspec.c (lang_specific_driver): Recognize --help.
14396
14397 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14398
14399         * parse.y (resolve_package): Fixed bogus return statement.
14400         (patch_method_invocation): Resolve method invocation beginning with
14401         a package name qualifier.
14402
14403 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14404
14405         * Make-lang.in (java.stage1): Depend on stage1-start.
14406         (java.stage2): Likewise for stage2-start.
14407         (java.stage3): Likewise for stage3-start.
14408         (java.stage4): Likewise for stage4-start.
14409
14410 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14411
14412         * parse.y (java_complete_lhs): When doing cross referencing, don't
14413         try to keep file location on a WFL expanded as a CALL_EXPR.
14414
14415 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14416
14417         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
14418         compiling to class file a void method with an empty method body.
14419         As a side effect, the bytecode backend will generate the
14420         appropriate `return' instruction.
14421
14422 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14423
14424         * parse.y (lookup_package_type_and_set_next): New function prototype.
14425         (resolve_package): Search current and imported packages.
14426         (lookup_package_type_and_set_next): New function.
14427
14428 1999-06-22  Andrew Haley  <aph@cygnus.com>
14429
14430         * verify.c (verify_jvm_instructions): Check for pending blocks
14431         before invalid PC test and opcode switch, not after.
14432
14433 1999-06-21  Andrew Haley  <aph@cygnus.com>
14434
14435         * except.c (find_handler_in_range): The upper limit for exception
14436         ranges is exclusive, not inclusive: (start <= pc < end).
14437         (link_handler): find child pointer which points to outer by
14438         searching sibling list: previous code incorrectly assumed that
14439         outer->outer->first_child must point to outer.
14440         * verify.c (verify_jvm_instructions): FIXME added to code for
14441         `athrow'.
14442         (verify_jvm_instructions): Do not assume that the last block
14443         processed in a subroutine is a block which ends with a `ret'
14444         instruction.  With some control flows it is possible that the last
14445         block ends with an `athrow'.
14446
14447 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14448
14449         * parse.y (qualify_ambiguous_name): Reorganized the post
14450         evaluation of non WFL leading expression nodes.
14451
14452 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14453
14454         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14455         CONVERT_EXPR.
14456
14457 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14458
14459         * parse.y (qualify_ambiguous_name): Handle qualified expression
14460         beginning with a STRING_CST.
14461
14462 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14463
14464         * parse.y (register_fields): Set DECL_INITIAL on both
14465         pre-initialized static and public fields.
14466         (resolve_field_access): Static field access expressions to always
14467         use pointer types.
14468         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
14469         qualification. CONVERT_EXPR to be resolved as an expression name.
14470         (java_complete_lhs): Identify and access qualified final
14471         initialized field in switch statement case expression.
14472         (fold_constant_for_init): Pre-initialized field decl constant to
14473         be folded.
14474
14475 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14476
14477         * parse.y (note_possible_classname): Mark returned node with
14478         QUALIFIED_P only if the original class name contained a '/'.
14479
14480 1999-06-05  Anthony Green  <green@cygnus.com>
14481
14482         * Make-lang.in (gcjh): More parallel build fixes.
14483
14484 1999-06-03  Mike Stump  <mrs@wrs.com>
14485
14486         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
14487
14488 1999-06-02  Anthony Green  <green@cygnus.com>
14489
14490         * except.c (link_handler): Chain exception handlers in order.
14491
14492 1999-06-02  Anthony Green  <green@cygnus.com>
14493
14494         * expr.c (expand_byte_code): Fill unreachable bytecode regions
14495         with nops and process as usual in order to always set correct EH
14496         ranges.  Emit detailed warnings about unreachable bytecodes.
14497
14498 1999-06-02  Anthony Green  <green@cygnus.com>
14499
14500         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
14501         constant.
14502
14503 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14504
14505         * parse.y (lookup_field_wrapper): Unified returned value to NULL
14506           or the searched field decl.
14507
14508 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14509
14510         * parse.y (fold_constant_for_init): Convert numerical constant
14511         values to the type of the assigned field.
14512
14513 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14514
14515         * expr.c (lookup_field): Relaxed the test on class loading error
14516         detection.
14517         * parse.y (fold_constant_for_init): Enabeled old code.
14518
14519 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14520
14521         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
14522         decide the validity of the cast of a java.lang.Cloneable reference
14523         to an array.
14524         (patch_conditional_expr): Fixed first argument passed to
14525         binary_numeric_promotion.
14526
14527 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14528
14529         * parse.y (qualify_ambiguous_name): Take into account that a
14530         CONVERT_EXPR might specify a type as a WFL.
14531
14532 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14533
14534         * parse.y (patch_assignment): Save the rhs before using it as an
14535         argument to _Jv_CheckArrayStore.
14536
14537 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14538
14539         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
14540
14541 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14542
14543         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
14544         floating point literal only when the exponent indicator has been
14545         parsed.
14546
14547 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14548
14549         * parse.y (formal_parameter:): Construct argument tree list
14550         element even if a yet unsupported final parameter was encountered.
14551
14552 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14553
14554         * parse.y (finish_method_declaration): Issue errors for native or
14555         abstract methods declared with a method body, as well as for non
14556         native or non abstract methods with no method body.
14557
14558 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14559
14560         * class.c (build_utf8_ref): Initialize variable `field'.
14561
14562         * decl.c (init_decl_processing): Initialize variable `field'.
14563
14564         * expr.c (build_known_method_ref): Mark parameters `method_type',
14565         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
14566         (process_jvm_instruction): Likewise for parameter `length'.
14567
14568         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
14569         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
14570         ATTRIBUTE_UNUSED.
14571
14572         * parse.y (maybe_generate_clinit): Remove unused variable
14573         `has_non_primitive_fields'.
14574         (find_in_imports_on_demand): Initialize variables `node_to_use'
14575         and `cl'.
14576         (patch_binop): Likewise for variable `prom_type'.
14577         (patch_unaryop): Likewise for variable `prom_type'.
14578
14579         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
14580
14581         * xref.c (xref_table): Add missing initializer.
14582
14583 1999-05-14  Tom Tromey  <tromey@cygnus.com>
14584
14585         * java-except.h (struct eh_range): Removed unused `next' member.
14586         * verify.c (verify_jvm_instructions): Call check_nested_ranges
14587         after adding all exception handlers.  Sort exception ranges in
14588         order of start PC.
14589         (struct pc_index): New structure.
14590         (start_pc_cmp): New function.
14591         * except.c (add_handler): Return `void'.  Don't call link_handler;
14592         instead construct an ordinary linked list and do range
14593         coalescing.
14594         (check_nested_ranges): New function.
14595         (link_handler): Changed interface to allow merging of eh_ranges.
14596         Split overlapping ranges.  Return `void'.
14597
14598 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14599
14600         * parse.y (constructor_block_end:): New rule, tagged <node>.
14601         (constructor_body:): Use `constructor_block_end' instead of
14602         `block_end'.
14603
14604 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14605
14606         * parse.y (statement_nsi:): Pop `for' statement block.
14607         (java_complete_lhs): Labeled blocks containing no statement are
14608         marked as completing normally.
14609
14610 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14611
14612         * xref.c (xref_set_current_fp): New function, defined.
14613         * xref.h (xref_set_current_fp): New function, prototyped.
14614
14615 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14616
14617         * check-init.c (check_init): Take into account that
14618         LABELED_BLOCK_STMT can be empty.
14619
14620 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14621
14622         * parse.y (java_check_regular_methods): Warning check on not
14623         overriding methods with default access in other packages does not
14624         apply to `<clinit>'.
14625         (java_complete_lhs): If block body is an empty_stmt_node, replace
14626         it by NULL_TREE. This prevents gcc from generating an irrelevant
14627         warning.
14628
14629 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14630
14631         * check-init.c (check_init): Removed code accepting to see things
14632         falling through default:, when doing xrefs.
14633         * java-tree.h (do_not_fold): New global variable, declared.
14634         * parse.y (do_not_fold): New global variable, defined.
14635         (java_complete_expand_method): Set `do_not_fold' to the value of
14636         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
14637         and reinstall them after them have been purged; do not check for
14638         initializations; do not issue missing return errors.
14639         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
14640         when doing xrefs.
14641         (patch_binop): Skip the fold part when doing xrefs.
14642         (build_string_concatenation): Skip the concatenation part when
14643         doing xrefs.
14644         (patch_synchronized_statement): Do not generate a try-finally when
14645         doing xrefs.
14646         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
14647         and keep the location where the throw was seen.
14648         * typeck.c (convert): When `do_not_fold' is set, do not attempt
14649         any treatment on the converted node an simply return a NOP_EXPR of
14650         the targeted type.
14651         * xref.c (xref_get_data): New function, defined.
14652         * xref.h (xref_get_data): New function, declared.
14653         (XREF_GET_DATA): Use xref_get_data.
14654
14655 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14656
14657         * gjavah.c (print_include): Cast the result of `strlen' to int
14658         when comparing against a signed value.
14659         (add_namelet): Likewise.
14660
14661 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14662
14663         * expr.c (expand_invoke): Mark parameter `nargs' with
14664         ATTRIBUTE_UNUSED.
14665         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
14666
14667         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
14668         ATTRIBUTE_UNUSED.
14669
14670         * jcf-reader.c (get_attribute): Cast a value to long
14671         when comparing against a signed expression.  Likewise.
14672
14673         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
14674         HOST_BITS_PER_CHAR.
14675
14676 1999-05-11  Andrew Haley  <aph@cygnus.com>
14677
14678         * parse.y (source_end_java_method): If the current method contains
14679         any exception handlers, force asynchronous_exceptions: this is
14680         necessary because signal handlers in libjava may throw exceptions.
14681         * decl.c (end_java_method): Ditto.
14682
14683 1999-05-11  Tom Tromey  <tromey@cygnus.com>
14684
14685         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
14686         flags.
14687         * jvspec.c (THREAD_NAME): Removed.
14688         (GC_NAME): Likewise.
14689         (MATHLIB): Likewise.
14690         (WITHLIBC): Likewise.
14691         (GCLIB): Likewise.
14692         (THREADLIB): Likewise.
14693         (MATH_LIBRARY): Likewise.
14694         (lang_specific_driver): Don't add `-l' options to command line.
14695         Instead, add a single --specs option.  Recognize `-L' options and
14696         use them to search for spec file.
14697         (find_spec_file): New function.
14698         (SPEC_FILE): New define.
14699
14700 1999-05-11  Dave Brolley  <brolley@cygnus.com>
14701
14702         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
14703         cpplib-enabled build.
14704
14705 1999-05-05  Per Bothner  <bothner@cygnus.com>
14706
14707         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
14708         temporarily zero it while calling rest_of_decl_compilation.
14709
14710         * java-tree.h (string_ptr_type_node):  Add declaration.
14711         * decl.c:  Define and initialize string_ptr_type_node.
14712         * parse.y (patch_string_cst):  Use string_ptr_type_node.
14713
14714         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
14715         * parse.y (for_statement):  Now unconditionally exit_block.
14716         (finish_labeled_statement):  No longer exit_block if for-loop.
14717         (patch_loop_statement):  Check harder if the loop is already labeled.
14718
14719         * parse.y (patch_initialized_static_field):  Removed function.
14720         (maybe_generate_clinit):  Removed special handling for interfaces.
14721         (java_complete_expand_methods):  Do a preliminary java_complete_tree
14722         on <clinit> to determine if it can be removed.
14723         (java_complete_expand_method):  Remove special handling for <clinit>.
14724         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
14725         optimize if we get back empty_stmt_node.
14726         For MODIFY_EXPR, re-do checking of static initializers.
14727         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
14728         For VAR_DECL, pass correct context.
14729
14730         * verify.c (verify_jvm_instructions):  Better error messages.
14731
14732 1999-05-03  Tom Tromey  <tromey@cygnus.com>
14733
14734         * parse-scan.y (interface_declaration): Call
14735         report_class_declaration for interfaces.
14736
14737 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
14738
14739         * Makefile.in: Remove -v from bison command lines.
14740
14741 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14742
14743         * check-init.c (check_init): Exclude a case of error when doing
14744         xrefs.
14745         * class.c (layout_class_method): Don't generate the error message
14746         twice when compiling from source.
14747         * lang-options.h: Added `-Wredundant-modifers' and
14748         `-Wunusupported-jdk11' flags and help text.
14749         * lang.c (lang_decode_option): Added support for
14750         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
14751         flag_static_local_jdk11 and flag_redundant set accordingly.
14752         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
14753         * parse.h (EXPR_WFL_ADD_COL): New macro.
14754         (DECL_END_SOURCE_LINE): Likewise.
14755         (DECL_INHERITED_SOURCE_LINE): Likewise.
14756         * parse.y (static_ref_err): New function, prototyped.
14757         (CCB_TK): Now tagged <operator>.
14758         (class_body:): Remember the location of the closing '}' of a class
14759         definition when doing xrefs.
14760         (block:): Likewise.
14761         (block_end:): Likewise.
14762         (create_class): Remember the location of the inherited class
14763         identifier when doing xrefs.
14764         (register_fields): Added test on first operand of `init' before
14765         testing it TREE_CODE.
14766         (method_header): Store the location of the class identifier in the
14767         class decl when doing xrefs.
14768         (finish_method_declaration): Don't combine first/last method line
14769         when doing xref.
14770         (java_check_regular_methods): Warning check on not overriding
14771         methods with default access on other packages move before check on
14772         static methods. Initialization of `aflags' also moved up.
14773         (resolve_expression_name): Call static_ref_err to report the error.
14774         (static_ref_err): New function, implemented.
14775         (resolve_field_access): Returned simplified static field access
14776         when doing xrefs.
14777         (resolve_qualified_expression_name): Check for illegal use of
14778         static fields in a non static context. Call static_ref_err to
14779         report error in various places.
14780         (java_complete_tree): Do not fold initialized static fields when
14781         doing xrefs.
14782         (java_complete_lhs): Likewise.
14783
14784 1999-04-29  Anthony Green  <green@cygnus.com>
14785
14786         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
14787         create internal labels.
14788         (lookup_label): Ditto.
14789
14790 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14791
14792         * class.c (layout_class_method): Generate <clinit>'s rtl for
14793         interfaces.
14794         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14795         for interfaces' <clinit>.
14796         * expr.c (lookup_field): Search for fields in interfaces.
14797         (expand_invoke): Fixed indentation.
14798         (expand_java_field_op): Likewise. Use IS_CLINIT.
14799         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
14800         (IS_CLINIT): New macro.
14801         * parse.y (type_declaration:): Call maybe_generate_clinit after an
14802         interface was parsed.
14803         (maybe_generate_clinit): Don't generate if the current class is an
14804         interface with only fields of primitive types.
14805         (reset_method_name): Use IS_CLINIT.
14806         (java_complete_expand_method): Expand <clinit> when it exists for
14807         interfaces. Use IS_CLINIT.
14808         (resolve_expression_name): Use DECL_CONTEXT instead of
14809         current_class to build static field references.
14810         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
14811         ARRAY_REF when doing xreferencing.
14812         (check_final_assignment): Fixed typo in leading comment. Use
14813         IS_CLINIT.
14814         (patch_array_ref): Don't fully expand array references when
14815         xreferencing.
14816         (patch_return): Use IS_CLINIT.
14817         (patch_throw_statement): Likewise.
14818
14819 1999-04-22  Tom Tromey  <tromey@cygnus.com>
14820
14821         * Make-lang.in (JAVA_SRCS): Added check-init.c.
14822
14823 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14824
14825         * decl.c (predef_filenames, predef_filenames_size): New globals
14826         (init_decl_processing): predef_filenames and predef_filenames_size
14827         initialized.
14828         * java-tree.h (predef_filenames, predef_filenames_size): Declared
14829         extern.
14830         * jcf-parse.c (predefined_filename_p): New function.
14831         (yyparse): Check that files on the command line are specified only
14832         once and issue a warning otherwise.
14833         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
14834         * parse.y (source_end_java_method): Nullify NOP method bodies, to
14835         avoid a gcc warning with -W -Wall turned on.
14836         (java_expand_classes): Abort if errors were encountered.
14837         (java_complete_lhs): If the cross reference flag is set, wrap
14838         field DECL node around a WFL when resolving expression name.
14839
14840 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14841
14842         * lang.c (lang_decode_option): Fixed returned value when parsing
14843         `-fxref=...' and `-Wall'.
14844         * parse.y (source_end_java_method): Do not generate code when
14845         flag_emit_xref is set.
14846         (resolve_expression_name): Do not build static field access when
14847         flag_emit_xref is set.
14848         (resolve_field_access): No special treatment on `length' when
14849         flag_emit_xref is set. Do not build qualified static field access
14850         when flag_emit_xref is set.
14851         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
14852         when flag_emit_xref is set.
14853         (patch_assignment): Do not generate array store runtime check when
14854         flag_emit_xref is set.
14855         * xref.c (xref_flag_value): Fixed function declaration
14856         indentation.
14857         (xset_set_data): New function.
14858         * xref.h (xref_set_data): Added prototype for new function.
14859         (typedef struct xref_flag_table): New field data.
14860         (XREF_GET_DATA): New macro.
14861
14862 1999-04-19  Tom Tromey  <tromey@cygnus.com>
14863
14864         * xref.h (enum): Removed trailing comma.
14865
14866         * parse.y (resolve_qualified_expression_name): Added missing
14867         `break'.
14868
14869 1999-04-15  Anthony Green  <green@cygnus.com>
14870
14871         * gjavah.c: New prototypes for java_float_finite and
14872         java_double_finite.
14873
14874 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14875
14876         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
14877         references.
14878
14879 1999-04-06  Jeffrey A Law  (law@cygnus.com)
14880
14881         * Makefile.in (TREE_H): Add tree-check.h.
14882         (RTL_H): Add genrtl.h.
14883
14884 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14885
14886         * parse.y (patch_assignment): Added ArrayStoreException runtime
14887         check.
14888
14889 1999-04-06  Per Bothner  <bothner@cygnus.com>
14890
14891         * expr.c (pop_type_0):  New function.
14892         (pop_type):  Use pop_type_0.
14893         * java-tree.h (pop_type_0):  New declaration.
14894         * verify.c (verify_jvm_instructions):  Check return instructions.
14895
14896         * parse.y (patch_binop):  Don't fold if non-constant and emiting
14897         class files.
14898
14899 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14900
14901         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
14902
14903         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
14904         (main_jcf): Don't define.
14905         (process_file): Don't set `main_jcf'.
14906
14907         * java-tree.h (main_jcf): Don't declare.
14908
14909         * jcf-parse.c (main_jcf): Add static definition.
14910
14911         * lang.c (main_jcf): Don't define.
14912
14913 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14914
14915         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
14916
14917         * decl.c (copy_lang_decl): Likewise for `bcopy'.
14918
14919         * jcf-depend.c: Include "config.h", not <config.h>.
14920
14921         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
14922         `bcopy' to PTR.
14923
14924         * jcf-path.c: Include "config.h", not <config.h>.
14925
14926         * lex.c: Don't include various system header files.
14927         (java_init_lex): Cast the argument of `bzero' to PTR
14928
14929         * parse-scan.y (java_push_parser_context): Likewise.
14930
14931         * parse.y (java_push_parser_context): Likewise.
14932         (patch_bc_statement): Match format specifier to variable argument.
14933
14934         * xref.c: Don't include <stdio.h>.
14935
14936 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14937
14938         * parse.y (struct parser_ctxt *ctxp): Now global.
14939         (declare_local_variables): Use WFL compound value for the
14940         declaration source line value, when doing cross-referencing.
14941
14942 1999-03-31  Tom Tromey  <tromey@cygnus.com>
14943
14944         * gjavah.c (print_field_info): Allow constants of other types.
14945         (print_include): Generate include when new name is proper prefix
14946         of already printed name.
14947         (add_namelet): Likewise.
14948         (cxx_keyword_subst): New function.
14949         (print_method_info): Use it.
14950         (print_field_name): New function.
14951         (get_field_name): New function.
14952         (print_field_info): Use get_field_name and print_field_name.
14953
14954 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14955
14956         * Makefile.in (keyword.h): Generate using gperf language 'C', not
14957         'KR-C', so gperf uses the `const' keyword on strings.
14958
14959         * keyword.gperf (java_keyword): Const-ify a char*.
14960
14961 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14962
14963         * parse.y (patch_bc_statement): Fixed identation and a bogus
14964         `printf' format.
14965
14966 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14967
14968         * parse.y (patch_assignment): Allow static variables in other
14969         classes to be assigned.
14970
14971 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14972
14973         * class.c (maybe_add_interface): Remove unused variable
14974         `interface_binfo'.
14975         (make_class_data): Use = for assignment, not ==.  Likewise.
14976         (emit_register_classes): Remove unused variable `decl'.
14977
14978         * lex.c: Fix comment so as not to contain an embedded `/*'.
14979
14980         * verify.c (verify_jvm_instructions): Remove unused variable
14981         `self_type'.
14982
14983 1999-03-27  Per Bothner  <bothner@cygnus.com>
14984
14985         * parse.y (complete_loop_body):  Rename to finish_loop_body.
14986         (complete_labeled_statement):  Rename to finish_labeled_statement.
14987         (complete_for_loop):  Rename to finish_for_loop.
14988         (complete_method_declaration):  Rename to finish_method_declaration.
14989
14990         * java-tree.h (continue_identifier_node):  New global node.
14991         * decl.c:  Define and initialize continue_identifier_node.
14992         * parse.y (generate_labeled_block):  Remove - no longer needed.
14993         (build_loop_body):  Use continue_identifier_node for continue block.
14994         (finish_labeled_statement):  Also do pop_labeled_block actions.
14995         (java_complete_lhs):  POP_LOOP even if error.
14996         (build_labeled_block):  Special handling for continue_identifier_node.
14997         (patch_loop_statement):  Re-organize.
14998         (patch_bc_statement):  Re-write.
14999
15000 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15001
15002         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15003         using a WFL compound value.
15004         * parse.y (xref.h): Include.
15005         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15006         WFL compound value.
15007         (register_fields): Set WFL compound value to lineno if doing
15008         xrefs.
15009         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15010         is set.
15011         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15012         * xref.h (expand_xref): Prototype renamed from xref_generate.
15013
15014 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15015
15016         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15017         (GET_CURRENT_BLOCK): New macro.
15018         * parse.y (current_static_block): New global variable.
15019         (method_body:): Define action.
15020         (complete_method_declaration): Set current_function_decl to NULL
15021         when work on the current method is done.
15022         (declare_local_variables): Use GET_CURRENT_BLOCK.
15023         (java_method_add_stmt): Likewise.
15024         (java_complete_expand_method): Disable the use of `this' when
15025         expanding <clinit>.
15026         (enter_a_block): If no current method exist, use
15027         current_static_block to link static initializer blocks.
15028         (exit_block): Rewritten to use current_static_block when no current
15029         method decl exists.
15030         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15031         (patch_return): Forbid the use of `return' in static initializers.
15032         (patch_throw_statement): Fixed indentation. Issue specific error
15033         for uncaught thrown checked exception in static initializer
15034         blocks. Removed FIXME.
15035
15036 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15037
15038         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15039         Link gcj from gcc.o.
15040
15041 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15042
15043         * parse.y (find_applicable_accessible_methods_list): When dealing
15044         with interface: ensure that a given interface or java.lang.Object
15045         are searched only once.
15046
15047 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15048
15049         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15050
15051         * jcf-dump.c (print_access_flags): Add braces around if-else.
15052
15053         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15054         COMBINE_INPUTS.
15055
15056         * lex.c (build_wfl_node): Add static prototype.
15057
15058         * lex.h (build_wfl_node): Remove static prototype.
15059
15060         * parse.y: Include lex.c early enough to declare everything needed.
15061         Ensure calls to `build_wfl_node' pass the proper arguments.
15062         (create_class): Remove unused variable `super_decl'.
15063         (get_printable_method_name): Initialize variable `name'.
15064
15065 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15066
15067         * Changelog: Fixed 1999-03-22 typos.
15068         * lang.c (lang_decode_option): Fixed typo in error string in the
15069         XARG section.
15070
15071 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15072
15073         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15074         (xref.o): New rule.
15075         * java-tree.h (flag_emit_xref): Declared extern.
15076         * lang.c (xref.h): Included.
15077         (flag_emit_xref): New global variable.
15078         (lang_decode_option): Added support for -fxref.
15079         * xref.c: Created.
15080         * xref.h: Likewise.
15081
15082 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15083
15084         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15085         linked with.
15086
15087 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15088
15089         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15090         $(srcdir)/../system.h and $(JAVA_TREE_H).
15091         (jcf-io.o): Depend on $(JAVA_TREE_H).
15092         (mangle.o): Likewise.
15093
15094         * check-init.c (check_cond_init): Add static prototype.
15095
15096         * class.c (build_java_method_type, hashUtf8String,
15097         make_field_value, get_dispatch_vector, get_dispatch_table,
15098         append_gpp_mangled_type, mangle_static_field): Likewise.
15099         (strLengthUtf8): Hide unused definition.
15100         (hashUtf8String): Const-ify.
15101         (make_field_value): Un-ANSI-fy.
15102
15103         * constants.c: Move inclusion of jcf.h above java-tree.h.
15104         (set_constant_entry, find_class_or_string_constant,
15105         find_name_and_type_constant, get_tag_node,
15106         build_constant_data_ref): Add static prototype.
15107
15108         * decl.c (push_jvm_slot, builtin_function,
15109         lookup_name_current_level): Likewise.
15110         (builtin_function): Const-ify.
15111
15112         * except.c (expand_start_java_handler, expand_end_java_handler):
15113         Add static prototype.
15114
15115         * expr.c (flush_quick_stack, push_value, pop_value,
15116         java_stack_swap, java_stack_dup, build_java_athrow,
15117         build_java_jsr, build_java_ret, expand_java_multianewarray,
15118         expand_java_arraystore, expand_java_arrayload,
15119         expand_java_array_length, build_java_monitor, expand_java_pushc,
15120         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15121         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15122         expand_compare, expand_test, expand_cond, expand_java_goto,
15123         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15124         expand_java_field_op, java_push_constant_from_pool): Likewise.
15125
15126         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15127         (build_java_arraynull_check): Mark parameters `node' and `type'
15128         with ATTRIBUTE_UNUSED.
15129         (note_label): Likewise for parameter `current_pc'.
15130         (expand_java_call, expand_java_ret): Hide unused definition.
15131
15132         * java-tree.h (make_class, build_constants_constructor,
15133         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15134         init_outgoing_cpool, register_class, emit_register_classes,
15135         java_layout_seen_class_methods): Prototype.
15136         (unicode_mangling_length): Const-ify.
15137         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15138         emit_unicode_mangled_name, format_int, format_uint,
15139         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15140         jcf_print_utf8_replace, open_class): Prototype.
15141
15142         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15143         <stdio.h>.  Include tree.h/java-tree.h.
15144         (utf8_equal_string usage, process_class): Add static prototype.
15145         (open_class): Don't prototype this here.
15146         (utf8_equal_string): Match arguments to format specifiers.
15147         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15148         TABLE_SWITCH, disassemble_method): Likewise.
15149
15150         * jcf-io.c: Include tree.h/java-tree.h.
15151         (open_class, find_classfile, jcf_print_utf8,
15152         jcf_print_utf8_replace): Const-ify.
15153
15154         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15155         parse_class_file): Add static prototype.
15156         (find_in_current_zip): Match definition to existing static
15157         prototype.
15158
15159         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15160         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15161         finish_jcf_block, define_jcf_label, get_jcf_label_here,
15162         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15163         write_chunks, adjust_typed_op, generate_bytecode_conditional,
15164         generate_bytecode_return, perform_relocations, init_jcf_state,
15165         init_jcf_method, release_jcf_state, generate_classfile):
15166         Add static prototype.
15167         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15168         (make_class_file_name): Const-ify.
15169
15170         * jcf.h (find_classfile): Const-ify.
15171
15172         * jv-scan.c (reset_report): Remove prototype.
15173
15174         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15175         (error): Rewrite to allow varargs.
15176
15177         * lang.c (lang_f_options): Const-ify.
15178
15179         * lex.c (java_parse_escape_sequence): Add static prototype.
15180         (java_allocate_new_line): Match definition to existing static
15181         prototype.
15182
15183         * mangle.c Include tree.h/java-tree.h.
15184         (unicode_mangling_length, emit_unicode_mangled_name,
15185         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15186
15187         * parse.h (jdep_code): Remove trailing comma in enumeration.
15188         (java_get_line_col): Move prototype outside of !JC1_LITE test.
15189         (reset_report): Add prototype.
15190
15191         * verify.c (push_pending_label, merge_types): Add static
15192         prototypes.
15193
15194         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15195
15196 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15197
15198         * parse.y (find_applicable_accessible_methods_list): Extend the
15199         search to superinterfaces when relevant.
15200         (search_applicable_methods_list): New function.
15201
15202 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15203
15204         * class.c (unmangle_classname): Implemented stricter testing
15205         before setting the QUALIFIED_P flag on an identifier.
15206
15207 1999-03-16  Per Bothner  <bothner@cygnus.com>
15208
15209         * parse.y (java_complete_lhs):  Call force_evaluation_order
15210         after patch_newarray.
15211         (patch_binop):  Don't call fold if there are side effects.
15212
15213 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15214
15215         * parse.y (java_stabilize_reference): Use save_expr instead of
15216         building a SAVE_EXPR node.
15217         (java_complete_lhs): Patch the resulting string of the `+='
15218         operator (if necessary) and complete the RHS after having built
15219         the cast.
15220
15221 1999-03-15  Per Bothner  <bothner@cygnus.com>
15222
15223         * class.c (make_class):  Don't set CLASS_P here (because
15224         this function is also called by build_java_array_type).
15225         (push_class):  Set CLASS_P here instead.
15226         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
15227
15228         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
15229         context.  If the context is class, perfer "super" over "synchronized".
15230         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
15231
15232         * parse.y (create_class):  Don't call parser_check_super here;
15233         it is not robust.  Always wait until later.
15234
15235         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
15236         match what JDK 1.2 does), but don't set ACC_PUBLIC.
15237
15238 1999-03-13  Per Bothner  <bothner@cygnus.com>
15239
15240         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
15241         * lex.h (UNGETC):  Change misleading macro.
15242
15243 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15244
15245         * parse.y (java_stabilize_reference): Return NODE when patching a
15246         COMPOUND_EXPR.
15247         (java_complete_lhs): Put parenthesis around truth values.
15248
15249 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15250
15251         * class.c (layout_class_method): Don't make rtl for interface
15252         methods.
15253         * parse.h (GET_TYPE_NAME): New macro.
15254         * parse.y (if_then_statement:): Fixed indentation.
15255         (if_then_else_statement:): Likewise.
15256         (for_statement:): Fixed spacing.
15257         (try_statement:): Fixed indentation.
15258         (create_interface): Don't force interfaces to be abstract.
15259         (method_header): Abstract methods are OK in interfaces.
15260         (declare_local_variables): Fixed typo in comment.
15261         (java_complete_expand_method): Fixed indentation.
15262         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15263         non accessible fields.
15264         (java_stabilize_reference): New function.
15265         (java_complete_lhs): Fixed indentation. Use
15266         java_stabilize_reference in compound assignment. Insert the
15267         cast. If not processing `+' fix string constants before processing
15268         binop.
15269
15270 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15271
15272         * constants.c (find_class_or_string_constant): Cast variable `j'
15273         to a `jword' when comparing against one.
15274
15275         * expr.c (java_lang_expand_expr): Remove unused variables
15276         `has_finally_p' and `op0'.
15277
15278         * gjavah.c (print_field_info): Cast a value to jint when comparing
15279         against one.  Likewise for a jlong.
15280         (add_namelet): Likewise cast a `sizeof' to an int when comparing
15281         against a signed quantity.
15282
15283         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15284         (print_signature): Don't needlessly dereference variable `str'
15285
15286         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15287         `max_locals' with ATTRIBUTE_UNUSED.
15288         (jcf_parse_class): Likewise for variable `index'.
15289
15290         * parse.h (reverse_jdep_list): Remove static prototype.
15291
15292         * parse.y (build_jump_to_finally): Remove prototype and definition.
15293         (reverse_jdep_list): Add static prototype.
15294
15295         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15296         `assignment' and `expr_decl'.
15297
15298         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15299
15300 1999-03-12  Andrew Haley  <aph@cygnus.com>
15301
15302         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15303         we'll need a directory separator and a null character.
15304
15305 1999-03-10  Per Bothner  <bothner@cygnus.com>
15306
15307         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
15308
15309 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15310
15311         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15312         interfaces.
15313
15314 1999-03-05  Per Bothner  <bothner@cygnus.com>
15315
15316         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
15317
15318         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
15319
15320         * class.c (layout_class_method):  A static method in a base class
15321         is never overridden, so treat it like it doesn't exist.
15322         However, do complain about private non-static method overriding
15323         public static method.
15324
15325         * parse.y:  Don't set unused INITIALIZED_P flag.
15326         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
15327
15328         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
15329         (build_array_from_name):  Re-order &index[string] to &string[index].
15330
15331         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
15332         error_mark (it might catch more errors, but it is more likely to lose).
15333
15334 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15335
15336         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15337         (parse-scan.o): Depend on toplev.h.
15338
15339         * class.c (make_method_value): Add prototype.  Make it static.
15340         Remove unused second argument, caller changed.
15341
15342         * expr.c (java_lang_expand_expr): Remove unused variable
15343         `return_label'.
15344
15345         * java-tree.h: Don't prototype find_in_current_zip.
15346         Add prototypes for verify_constant_pool, start_java_method,
15347         end_java_method, give_name_to_locals, expand_byte_code,
15348         open_in_zip, set_constant_value, find_constant1, find_constant2,
15349         find_utf8_constant, find_string_constant, find_class_constant,
15350         find_fieldref_index, find_methodref_index, write_constant_pool,
15351         count_constant_pool_bytes and encode_newarray_type.
15352
15353         * jcf-dump.c: Remove unused variable `LONG_temp'.
15354
15355         * jcf-parse.c: Include parse.h.
15356         (jcf_parse_source): Remove unused parameter, all callers changed.
15357         (jcf_figure_file_type): Add static prototype.
15358         (find_in_current_zip): Likewise.  Also remove unused parameter,
15359         all callers changed.
15360         (read_class): Initialize variable `saved_pos'.
15361
15362         * jcf-reader.c (jcf_parse_preamble): Mark variables
15363         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
15364
15365         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
15366         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
15367         (java_parse_doc_section): Initialize variable `seen_star'.
15368         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
15369         (java_lex_error): Mark parameters `msg' and `forward' with
15370         ATTRIBUTE_UNUSED.
15371         (java_get_line_col): Mark parameters `filename' and `line' with
15372         ATTRIBUTE_UNUSED.
15373
15374         * parse-scan.y: Include toplev.h.
15375         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
15376
15377         * parse.h: use `struct JCF', not plain `JCF'.
15378         (java_parser_context_save_global, java_expand_classes
15379         java_parser_context_restore_global, java_parse): Add prototypes.
15380
15381         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15382         `node'.
15383
15384 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
15385
15386         *  check-init.c (check_init):  COPYN takes word count, not bit count.
15387
15388 1999-02-26  Per Bothner  <bothner@cygnus.com>
15389
15390         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
15391         explicit build_decl.  (Avoids crash in reload when optimizing.)
15392
15393 1999-02-25  Per Bothner  <bothner@cygnus.com>
15394
15395         * decl.c (complete_start_java_method):  Handle synchronized method
15396         even when compiling from bytecode.
15397
15398 1999-02-26  Tom Tromey  <tromey@cygnus.com>
15399
15400         * gjavah.c (add_class_decl): Only generate `#include' if outer
15401         class is not the name of the class we are processing.  Correctly
15402         append `.h' in #include.
15403         (process_file): Clean up newlines around generated `#include's.
15404         (decode_signature_piece): Correctly handle inner classes.
15405         (struct include): New structure.
15406         (all_includes): New global.
15407         (print_include): New function.
15408         (add_class_decl): Use it.
15409         (process_file): Likewise.
15410         (add_class_decl): Generate include for java-array.h if array
15411         seen.
15412         (process_file): Don't generate java-array.h include.
15413
15414         * gjavah.c (add_namelet): Check for standard package names here.
15415         (add_class_decl): Don't check for standard package names here.
15416
15417 1999-02-25  Tom Tromey  <tromey@cygnus.com>
15418
15419         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
15420         When reading a zip file, only use strncmp if both strings are
15421         bigger than the buffer length.  Initialize `k' when looping
15422         through zip file.
15423
15424 1999-02-24  Tom Tromey  <tromey@cygnus.com>
15425
15426         * gjavah.c (struct namelet): New structure.
15427         (add_namelet): New function.
15428         (print_namelet): New function.
15429         (print_class_decls): Use add_namelet and print_namelet to generate
15430         namespaces and not classes.
15431         (method_printed): New global.
15432         (HANDLE_END_METHOD): Examine method_printed.
15433         (print_method_info): Set method_printed when required.  Print
15434         error if function to be ignored is marked virtual.  Handle $finit$
15435         method.
15436         (METHOD_IS_FINAL): New macro.
15437         (print_field_info): Use it.
15438         (HANDLE_METHOD): Clear method_printed.
15439         (method_pass): New global.
15440         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
15441         (process_file): Do two passes over both fields and methods.
15442         (HANDLE_METHOD): Examine method_pass.
15443         (root): New global.
15444         (add_class_decl): New function.
15445         (print_class_decls): Don't scan over entire constant pool.
15446
15447 1999-02-23  Tom Tromey  <tromey@cygnus.com>
15448
15449         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15450         disable linking in that case.
15451
15452 1999-02-20  Tom Tromey  <tromey@cygnus.com>
15453
15454         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15455         not 0x1f.
15456
15457 1999-02-21  Per Bothner  <bothner@cygnus.com>
15458
15459         * decl.c (build_result_decl), java-tree.h:  New method.
15460         (complete_start_java_method):  Handle synchronized methods.
15461         Don't build DECL_RESULT here.  (Ordering dependency problem.)
15462         (start_java_method):  Call build_result_decl here instead  ...
15463         * parse.y (java_complete_expand_method):  ... and here.
15464         (expand_start_java_method): Don't call complete_start_java_method here.
15465         (java_complete_expand_method):  Call it here instead.
15466         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
15467         * java-tree.h:  ... here.
15468
15469         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
15470         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
15471         for ARRAY_REF - it doesn't work when array bounds are checked.
15472         (patch_array_ref):  Handle it here instead.
15473
15474         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
15475
15476 1999-02-19  Per Bothner  <bothner@cygnus.com>
15477
15478         Force left-to-right evaluation of binary operations etc.
15479         * expr.c (force_evaluation_order), java-tree.h:  New function.
15480         * parse.y (java_complete_lhs):  Pass binary operations, procedure
15481         calls, and ARRAY_REFs to force_evaluation_order.
15482         (various):  Set TREE_SIDE_EFFECTS more carefully.
15483
15484         Tolerate random (non-UTF8) encoding in comments without complaining.
15485         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
15486         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
15487
15488         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
15489         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
15490
15491         * parse.y (java_complete_lhs):  Ignore an empty statement in a
15492         COMPOUND_EXPR.  Don't complain about empty statement after return.
15493
15494 1999-02-19  Per Bothner  <bothner@cygnus.com>
15495
15496         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
15497         in TREE_LIST - just chain the POINTER_TYPEs together.
15498         (resolve_class):  If type already resolved, return decl.
15499         After resolving, update TREE_TYPE(class_type), and name (if array).
15500         * parse.h (do_resolve_class), parse.y:  Make non-static.
15501         * class.c (maybe_layout_super_class):  Take this_class argument.
15502         Do do_resolve_class if necessary.
15503         (layout_class, layout_class_methods): Adjust calls appropriately.
15504         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15505         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
15506         * typeck.c (build_java_array_type):  Don't call layout_class.
15507
15508 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15509
15510         * parse.y (check_pkg_class_access): Allow private class access
15511         within the same package.
15512         (strip_out_static_field_access_decl): New function.
15513         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
15514         operator argument before testing its nature.
15515
15516 1999-02-03  Per Bothner  <bothner@cygnus.com>
15517
15518         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
15519         (TRY_EXPR):  Simplify - it no longer has a finally clause.
15520         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
15521         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15522         * expr.c (java_lang_expand_expr):  Likewise.
15523         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
15524         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
15525         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
15526         (build_try_statement):  Remove finally parameter and handling.
15527         (build_try_finally_statement):  New function.
15528         (patch_try_statement):   No longer need to support finally clause.
15529         (try_statement):  Update grammar action rules.
15530         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
15531         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15532
15533 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
15534
15535         * jcf-parse.c (get_constant): Add braces around computation of 'd'
15536         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
15537
15538 1999-02-17  Andrew Haley  <aph@cygnus.com>
15539
15540         * class.c (build_utf8_ref): Back out broken patch which was
15541         intended to to output signatures using '.' as a separator.
15542
15543         * class.c (make_class_data): Output signatures using '.' as a
15544         separator, rather than '/'.
15545         (mangled_classname): Likewise.
15546         (make_field_value): Likewise.
15547         (make_method_value): Likewise.
15548         * constants.c (alloc_class_constant): Likewise.
15549         * expr.c (build_invokeinterface): Likewise.
15550
15551 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15552
15553         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
15554         of an ancient workaround.
15555
15556 1999-02-10  Jeffrey A Law  (law@cygnus.com)
15557
15558         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
15559         here anymore.
15560
15561 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15562
15563         * lex.c (yylex): Encode \0 as UTF8.
15564
15565 1999-02-10  Tom Tromey  <tromey@cygnus.com>
15566
15567         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
15568         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
15569         (libgcj_zip): Renamed.
15570         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
15571         LIBJAVA_ZIP_FILE.
15572         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
15573
15574         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
15575         (GC_NAME): Renamed -lgc to -lgcjgc.
15576
15577 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15578
15579         * lex.c (java_lang_cloneable): Initialize.
15580         * parse.y (java_lang_cloneable): New static variable.
15581         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
15582         doing one more qualification round.
15583         (valid_ref_assignconv_cast_p): Reject null source or
15584         destination. Allow an array to be cast into java.lang.Cloneable.
15585         (patch_cast): Swapped two first arguments to first call to
15586         valid_ref_assignconv_cast_p.
15587
15588 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15589
15590         * parse.h: DECL_P renamed JDECL_P.
15591         * parse.y: DECL_P replaced by JDECL_P.
15592         (build_array_from_name): Always use pointer's type.
15593         (patch_bc_statement): Extra code to search continue target in a
15594         for loop. Fixed comments. Continue target is current loop when
15595         unlabeled.
15596
15597 1999-02-05  Andrew Haley  <aph@cygnus.com>
15598
15599         * class.c (make_class_data): The superclass of an interface should
15600         be null, not class Object.
15601
15602         * lex.c (java_lex): Sign extend hex literals.
15603
15604 1999-02-04  Andrew Haley  <aph@cygnus.com>
15605
15606         * class.c (build_utf8_ref): Output signatures using '.' as a
15607         separator, rather than '/'.
15608         (make_class_data): Likewise.
15609
15610 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
15611
15612         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
15613         mkstemp.o.  Get them from libiberty now.
15614
15615 1999-02-02  Jeffrey A Law  (law@cygnus.com)
15616
15617         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
15618
15619 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15620
15621         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
15622         from libiberty.h
15623
15624 1999-02-02  Per Bothner  <bothner@cygnus.com>
15625
15626         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
15627         * jcf-write.c (generate_bytecode_return):  New function.
15628         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
15629
15630         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
15631         generate special [fd]const_[01] instructions.
15632
15633         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
15634
15635         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
15636         handling OPCODE_lookupswitch or OPCODE_tableswitch.
15637
15638 1999-02-01  Per Bothner  <bothner@cygnus.com>
15639
15640         * parse.y (patch_method_invocation):  Handle calling static methods,
15641         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
15642
15643         * parse.y (java_complete_lhs):  Don't complain about unreachable
15644         exit condition in a do-while statement.
15645
15646 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15647
15648         * lex.c (java_read_char): Fixed utf8 decoding.
15649         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
15650         range.
15651         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
15652         comments. Local variable `all_primitive' is gone. Broadened
15653         acceptance of `0' to floating point targets. `long' can now be
15654         widened to `double' or `float'.
15655         (valid_method_invocation_conversion_p): Added leading
15656         comment. Fixed tabulation.
15657         (build_string_concatenation): Optimize out left or right empty
15658         string constants.
15659
15660 1999-01-28  Per Bothner  <bothner@cygnus.com>
15661
15662         * jcf-write.c (localvar_alloc):  Only emit entry for
15663         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
15664         (generate_bytecode_insns):  Only call put_linenumber if
15665         debug_info_level > DINFO_LEVEL_NONE.
15666         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
15667         is specified, add -g1 (for compatibility wih javac).
15668
15669 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
15670
15671         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
15672         gjavah.o, check-init.o, jv-scan.o
15673
15674 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15675
15676         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
15677
15678         * gjavah.c: Include config.h and system.h.
15679
15680         * javaop.h (inline): Don't define, its handled by system.h.
15681         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
15682         from `inline' to `static inline'.
15683
15684         * jcf.h (inline): Don't define, its handled by system.h.
15685
15686         * lex.c (inline): Likewise.
15687
15688 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
15689
15690         * lang-specs.h: Map -Qn to -fno-ident.
15691
15692 1999-01-29  Richard Henderson  <rth@cygnus.com>
15693
15694         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
15695
15696 1999-01-29  Tom Tromey  <tromey@cygnus.com>
15697
15698         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
15699         then cast it to Object before calling `append' method.
15700
15701 1999-01-28  Per Bothner  <bothner@cygnus.com>
15702
15703         * check-init.c (check_bool2_init, check_bool_init, check_init):
15704         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
15705         * jcf-write.c (generate_bytecode_insns):  Likewise.
15706
15707 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15708
15709         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
15710         * parse.y (patch_cast): Allow a boolean to be cast into a
15711         boolean.
15712
15713 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15714
15715         * parse.y: (class_declaration:): Fixed indentation.
15716         (class_member_declaration:): Extra `;' after field declaration now
15717         accepted.
15718         (interface_declaration:): Removed debug messages in error reports.
15719         (patch_binop): Nodes created and returned inherit the orignal
15720         node's COMPOUND_ASSIGN_P flag value.
15721         (patch_cast): Fix cast from char to floating point.
15722
15723 1999-01-25  Andrew Haley  <aph@cygnus.com>
15724
15725         * except.c, java-except.h (expand_resume_after_catch): new
15726         function.
15727         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
15728         to branch back to main flow of control after a catch block.
15729
15730 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15731
15732         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
15733         $(srcdir)/../system.h.
15734         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
15735         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
15736         (jcf-write.o): Likewise.
15737         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15738         (mangle.o): Depend on $(srcdir)/../toplev.h.
15739         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15740         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15741
15742         * class.c: Include output.h and parse.h.
15743         (mangled_classname): Add the `const' keyword to a char*.
15744         (find_named_method): Hide unused function definition.
15745         (build_utf8_ref): Change type of variable `c' to unsigned char.
15746         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
15747         (build_class_ref): Add the `const' keyword to a char*.
15748         (layout_class_method): Remove unused variable `buf'.
15749
15750         * decl.c (find_local_variable): Remove unused variable `rtl'.
15751         (pushdecl): Likewise for variables `different_binding_level' and
15752         `oldglobal'.
15753         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
15754         (maybe_build_cleanup): Likewise for parameter `decl'.
15755
15756         * except.c (expand_start_java_handler): Mark parameter `range'
15757         with ATTRIBUTE_UNUSED.
15758
15759         * expr.c: Include except.h.
15760         (pop_type): Remove unused variable `i'.
15761         (pop_value): Likewise for variables `n_words' and `i'.
15762         (expand_java_arrayload): Likewise for variable `convert'.
15763         (java_lang_expand_expr): Likewise for variables `op0', `type',
15764         `mode', `unsignedp', `node' and `elements'.
15765         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
15766         `eh_ranges'.
15767         (process_jvm_instruction): Add a `const' qualifier to a char*.
15768
15769         * gjavah.c (output_directory): Add the `const' keyword to a char*.
15770         (temp_directory): Likewise.
15771         (print_c_decl): Likewise.
15772         (print_method_info): Likewise.
15773         (decode_signature_piece): Likewise.
15774         (print_mangled_classname): Likewise.
15775
15776         * java-except.h: Provide prototypes for maybe_start_try,
15777         maybe_end_try and add_handler.
15778
15779         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
15780         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
15781         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
15782         init_expr_processing, push_super_field, init_class_processing,
15783         can_widen_reference_to, class_depth, verify_jvm_instructions,
15784         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
15785         set_local_type, merge_type_state, push_type, load_type_state,
15786         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
15787         emit_unicode_mangled_name): Add prototypes.
15788
15789         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
15790         (print_signature_type): Use ISDIGIT, not isdigit.
15791         (print_signature): Remove unused variable `j'.
15792
15793         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
15794         int when comparing against one.
15795
15796         * jcf-parse.c: Include toplev.h.
15797
15798         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
15799         (localvar_free): Remove unused variable `i'.
15800         (generate_bytecode_conditional): Likewise for variable `kind'.
15801
15802         * jv-scan.c: Include config.h and system.h.  Remove redundant
15803         OS header and gansidecl.h includes.
15804         (warning): Add the `const' keyword to a char*.  Also add
15805         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
15806         __STDC__, when determining whether to use ANSI-isms.
15807         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
15808         (xmalloc): Don't redundantly prototype here.
15809         (main): Remove unused parameter `envp'.  Also fix the arguments
15810         passed to function `fatal' to match the format specifier.
15811
15812         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
15813
15814         * mangle.c: Include toplev.h.
15815         (emit_unicode_mangled_name): Declare parameter `len'.
15816
15817         * parse.y (parse_warning_context): Add the `const' keyword to a
15818         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
15819         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
15820         (issue_warning_error_from_context): Add the `const' keyword to
15821         a char*.
15822         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
15823         not `__STDC__' for whether to use ANSI-isms.
15824
15825         * typeck.c (incomplete_type_error): Mark parameters `value' and
15826         `type' with ATTRIBUTE_UNUSED.
15827         (parse_signature_type): Use ISDIGIT, not isdigit.
15828
15829         * verify.c (check_pending_block): Add the `const' keyword to a char*.
15830         (verify_jvm_instructions): Likewise.  Remove unused variables
15831         `field_name' and `default_val'.
15832
15833         * zextract.c: Include config.h and system.h.  Remove redundant
15834         OS header includes.
15835
15836         * zipfile.h: Prototype `read_zip_archive'.
15837
15838 1999-01-21  Andrew Haley  <aph@cygnus.com>
15839
15840         * typeck.c (convert): Allow conversions to void type: some
15841         optimizations in gcc do this.
15842
15843 1999-01-21  Andrew Haley  <aph@cygnus.com>
15844
15845         * typeck.c (convert_ieee_real_to_integer): New function.
15846         (convert): When not using fast-math and using hardware fp, convert
15847         an IEEE NaN to zero.
15848
15849 1999-01-18  Andrew Haley  <aph@cygnus.com>
15850
15851         * parse.y (patch_binop): Do a type conversion from signed to
15852         unsigned and then back to signed when a ">>>" is found.
15853
15854 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15855
15856         * java-tree.h: (check_for_initialization): Added prototype.
15857         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
15858         * parse.y (do_resolve_class): Removed unused locals.
15859         (read_import_dir): Likewise.
15860         (resolve_qualified_expression_name): Array creation
15861         expressions are valid primary expressions.
15862         (qualify_ambiguous_name): Likewise.
15863         (patch_synchronized_statement): Removed unused local.
15864
15865 1999-01-17  Jeffrey A Law  (law@cygnus.com)
15866
15867         * Makefile.in (zextract.o): Add dependencies.
15868
15869         * Makefile.in: Do not put ^Ls at the start of a line.
15870
15871 1999-01-15  Per Bothner  <bothner@cygnus.com>
15872
15873         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
15874         sub-type the result of the call that gets the exception value.
15875
15876         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
15877         don't call finish_class.
15878
15879         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
15880         clear found before continuing.
15881
15882         * verify.c (verify_jvm_instructions):  On an array load, allow
15883         and handle top of stack to be TYPE_NULL.
15884
15885         * gjavah.c (generate_access):  Translate Java package private or
15886         protected access to C++ public, but with a comment.
15887
15888 1999-01-13  Andrew Haley  <aph@cygnus.com>
15889
15890         * expr.c (generate_name): Name prefix changed to avoid clashes
15891         with assembler temp labels.
15892
15893         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
15894         MODIFY_EXPR.  Without this, code for the assignment may not be
15895         generated at all and the synchronized statement will read an
15896         uninitialized variable.
15897
15898 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15899
15900         * class.c (maybe_layout_super_class): Fixed returned value.
15901         * lex.c: Added 1999 to the copyright.
15902         (java_init_lex): Initialize java_lang_imported.
15903         * lex.h: Added 1999 to the copyright.
15904         * parse.h: Added 1999 to the copyright.
15905         (REGISTER_IMPORT): Fixed typo in trailing macro.
15906         (CURRENT_OSB): New macro.
15907         (struct parser_ctxt): New fields osb_depth, osb_limit.
15908         * parse.y (java_lang_id): New global variable.
15909         (type_import_on_demand_declaration): Don't import java.lang.* twice.
15910         (array_creation_expression:): Use CURRENT_OSB.
15911         (dims:): Uses a stack to keep track of array dimensions.
15912         (cast_expression:): Use CURRENT_OSB.
15913         (find_expr_with_wfl): Return NULL if node found doesn't meet the
15914         conditions.
15915         (register_fields): Fixed typos in comment.
15916         (check_method_redefinition): Fixed comment indentation.
15917         (java_check_regular_methods): Set saved found wfl to NULL after
15918         having reinstalled it in the previously found DECL_NAME.
15919
15920 1999-01-10  Richard Henderson  <rth@cygnus.com>
15921
15922         * gjavah.c (java_float_finite): Use a union to do type punning.
15923         (java_double_finite): Likewise.
15924
15925 1999-01-09  Per Bothner  <bothner@cygnus.com>
15926
15927         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
15928         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
15929         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
15930         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
15931         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
15932         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
15933
15934 1999-01-08  Per Bothner  <bothner@cygnus.com>
15935
15936         * check-init.c (check_init):  If compiling to native, we don't
15937         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
15938
15939 1999-01-08  Tom Tromey  <tromey@cygnus.com>
15940
15941         * parse-scan.y (variable_declarator_id): Set or increment
15942         bracket_count.
15943         (bracket_count): New global.
15944         (formal_parameter): Handle case where bracket pairs trail variable
15945         declarator id.
15946
15947 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
15948
15949         * jcf-parse.c (yyparse): variable len changed from a char to an
15950         int to prevent overflow.
15951
15952 1999-01-06  Per Bothner  <bothner@cygnus.com>
15953
15954         * java-tree.h:  Declare read_class.
15955         * jcf-parse.c (read_class):  New function.
15956         (load_class):  Now just call read_class.
15957
15958         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
15959         * jcf-parse.c (parse_source_file):  Declare save_error_count,
15960         which is needed by java_parse_abort_on_error macro,
15961         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
15962
15963         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
15964         constructor, if initializing a static field.
15965         (patch_new_array_init):  Set TREE_CONSTANT if it is.
15966         * expr.c (java_lang_expand_expr):  For a static array constructor
15967         of primitive elements, allocate the array itself statically.
15968         Disabled until we can set the vtable field statically.
15969
15970         * check-init.c:  New file.  Checks for definite assignment.
15971         * Makefile.in (JAVA_OBJS):  Add check-init.o.
15972         * parse.y (java_complete_expand_method): Call check_for_initialization.
15973         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
15974
15975 1999-01-06  Graham <grahams@rcp.co.uk>
15976
15977         * parse.y : include system.h instead of including
15978         standard headers directly with the exception of <dirent.h>.
15979
15980 1999-01-06  Per Bothner  <bothner@cygnus.com>
15981
15982         * lex.h:  Moved static function declarations to lex.c,
15983         to shut up some -Wall warnings.
15984         * lex.c:  Static function declarations moved here.
15985         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
15986
15987 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15988
15989         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
15990
15991 1998-12-22  Per Bothner  <bothner@cygnus.com>
15992
15993         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
15994         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
15995
15996         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
15997         (localvar_alloc):  Change return type to void,
15998         (emit_unop):  Remove unused variable size.
15999
16000         * jcf-write.c (struct jcf_block):  Add new union.
16001         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16002         (call_cleanups):  New functions.
16003         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16004         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16005         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16006         * lang.c (lang_init):  Call using_eh_for_cleanups.
16007         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16008         completing operands to patch_synchronized_statement.
16009         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16010         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16011         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16012
16013 1998-12-20  John F. Carr  <jfc@mit.edu>
16014
16015         * Make-lang.in: Comment out control-Ls; they upset some makes.
16016
16017 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16018
16019         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16020         consistently.
16021
16022 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16023
16024         * parse.y (DIR_SEPARATOR): New define.
16025         (check_class_interface_creation): Use it.
16026
16027         * parse-scan.y (report_main_declaration): Recognize
16028         `java.lang.String' in argument to main.
16029
16030 1998-12-16  Per Bothner  <bothner@cygnus.com>
16031
16032         * parse.y (create_interface):  Remove bogus test.
16033
16034 1998-12-16  Per Bothner  <bothner@cygnus.com>
16035
16036         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16037         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16038
16039 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16040
16041         * parse-scan.y (qualified_name): Use correct sprintf format.
16042
16043 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16044
16045         * gjavah.c (print_field_info): Changed how most negative number is
16046         printed.
16047
16048 1998-12-14  Per Bothner  <bothner@cygnus.com>
16049
16050         * parse.y (fold_constant_for_init):  New function.
16051         (resolve_expression_name):  Don't replace static final
16052         constant-initialized fields by its value.
16053         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16054         not replace static final constant-initialized fields by their values.
16055         (register_fields):  If there is an initializer, set DECL_INITIAL and
16056         MODIFY_EXPR_FROM_INITIALIZATION_P.
16057         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16058         Only call patch_initialized_static_field if
16059         MODIFY_EXPR_FROM_INITIALIZATION_P.
16060         (patch_initialized_static_field):  If not valid constant, clear
16061         DECL_INITIAL.
16062
16063         * parse.y (lookup_field_wrapper):  Fix thinko.
16064
16065         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16066         set and restore global lineno.
16067
16068 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16069
16070         * gjavah.c (print_field_info): If value to print is the smallest
16071         value of its size, then print as hex to avoid later warnings from
16072         C++ compiler.
16073
16074 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16075
16076         * gjavah.c (decompile_method): Decompile `return null'.
16077         (process_file): Generate `#pragma interface'.
16078         (method_declared): New global.
16079         (print_method_info): Set it.
16080         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16081         (print_method_info): Handle abstract methods.
16082
16083 1998-12-13  Per Bothner  <bothner@cygnus.com>
16084
16085         * parse.y (patch_method_invocation):  If class_decl is null
16086         (e.g. an array type), use original type.
16087
16088         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16089         errors about uncaught exception from clone (of array, specifically).
16090
16091 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16092
16093         * gjavah.c (decompile_method): Handle all types of `return'
16094         opcode.  Decompile `return this' and `return'.
16095         (method_access): New global.
16096         (print_method_info): Set it.
16097         (decompile_method): Don't decompile a synchronized method.
16098
16099 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16100
16101         * jcf-reader.c (jcf_parse_one_method): Recognize
16102         HANDLE_END_METHOD.
16103         * gjavah.c (HANDLE_END_METHOD): New macro.
16104         (HANDLE_CODE_ATTRIBUTE): New macro.
16105         (decompile_method): New function.
16106         (print_method_info): Don't print `;\n' at end of function decl.
16107         Include java-opcodes.h.
16108         (decompiled): New global.
16109
16110 1998-12-12  Per Bothner  <bothner@cygnus.com>
16111
16112         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16113         flag_emit_class_files.
16114         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16115         if flag_emit_class_files.
16116         * parse.y (java_complete_tree):  Pre-liminary support for
16117         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16118
16119         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16120         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16121
16122         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16123
16124         * zipfile.h (opendir_in_zip):  New declaration.
16125         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16126         (opendir_in_zip):  New function, using code from open_in_zip.
16127         (open_in_zip):  Call opendir_in_zip.
16128         (find_class):  Remove no-longer-used do_class_file parameter,
16129         but add source_ok parameter.  Change logic so if we find a .java file,
16130         we don't look for .class in later classpath emtries.
16131         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16132         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16133         * gjavah.c: Update call to find_class.
16134         * jcf-dump.c:  Likewise.
16135
16136         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16137         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16138         nothing if body is empty_stmt_node.
16139         Various little fixes so SP gets correctly adjusted.
16140         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16141         For CALL_EXPR, test if static first.
16142         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16143         such as the ones we create for Object and Class.
16144         Set and restore current_function_decl.
16145         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16146         (note_possible_classname):  New function.
16147         (read_import_entry):  Removed.  Merged with read_import_dir.
16148         (read_import_dir):  Don't call find_class - that only gives us
16149         the first classpath entry having the needed package.
16150         Use the struct buffer data structure from buffer.h.
16151         (read_import_dir, find_in_imports_on_demand):  The remembered
16152         class names now use '.' (not '/') as package separator.
16153
16154         * parse.y (java_complete_expand_methods):  Call write_classfile
16155         here, and not in java_expand_classes (which only gets first class).
16156
16157 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16158
16159         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
16160         (register_fields):  If a static fields has an initializer, just
16161         chain it on ctxp->static_initialized, and handle later.
16162         (java_complete_expand_methods):  Force <clinit> first.
16163         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
16164         - it's already been completed.
16165         (patch_initialized_static_field):  New function.
16166         (java_complete_field):  Call it.
16167
16168 1998-12-12  Per Bothner  <bothner@cygnus.com>
16169
16170         * expr.c (encode_newarray_type, build_new_array):  New functions.
16171         * java-tree.h:  Declare build_new_array.
16172         * jcf-write.c (patch_newarray):  Use build_new_array.
16173
16174         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
16175         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
16176
16177         * parse.y (patch_new_array_init):  Re-organize.
16178         Now is passed the actual array (pointer) type of the value.
16179         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16180         (patch_array_constructor):  Removed - merged into patch_new_array_init.
16181         (java_complete_tree):  Update patch_new_array_init.
16182
16183         * jcf-write.c (find_constant_index):  New function.
16184         (generate_bytecode_insns):  Use find_constant_index.
16185         (generate_classfile):  Use find_constant_index for ConstantValue.
16186
16187 1998-12-11  Tom Tromey  <tromey@cygnus.com>
16188
16189         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16190         * decl.c (init_decl_processing): Renamed dtable -> vtable.
16191         * class.c (make_class_data): Renamed dtable -> vtable, and
16192         dtable_method_count -> vtable_method_count.
16193
16194 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16195
16196         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16197         global variables, initialized.
16198         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16199         Declared new global variables.
16200         * lex.c (java_lex): Return long_zero_node, float_zero_node,
16201         double_zero_node, integer_zero_node upon direct matching.
16202         * parse.y (purify_type_name): Added function prototype.
16203         (duplicate_declaration_error_p): Consider new_type as potentially
16204         being a incomplete type. Use purify_type_name on type string.
16205         (method_header): saved_type: unused variable removed. Don't figure
16206         return type if method name is invalid.
16207         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16208         processed by patch_unaryop.
16209         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16210         increment/decrement node into its original type after binary
16211         numeric promotion on its operands.
16212
16213 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16214
16215         * parse.y (array_initializer:): Array init operand is NULL_TREE
16216         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16217         now an error. Fixed indentation problems.
16218         (patch_string): Handle error_mark_node as an argument.
16219         (patch_new_array_init): Fixed indentation problems.
16220         (array_constructor_check_entry): Removed check on null wfl_value.
16221         Return an error if wfl_value's walk returns an error.
16222
16223 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16224
16225         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16226         * lex.c (java_lex): Remember column position before advancing one
16227         token. Retain location information on OCB_TK.
16228         * lex.h (typedef struct java_lc): Added new field.
16229         * parse.h (GET_SKIP_TYPE): New macro.
16230         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16231         * parse.y (build_new_array_init, patch_new_array_init,
16232         patch_array_constructor, maybe_build_array_element_wfl,
16233         array_constructor_check_entry): New function prototypes.
16234         (switch_block:): Tagged <node>.
16235         (OCB_TK): Tagged <operator>.
16236         (array_initializer:): Installed actions.
16237         (variable_initializer): Build location information on element if
16238         necessary.
16239         (switch_statement:): Fixed indentation typo.
16240         (switch_block:): Redefined default action.
16241         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16242         (patch_assignment): Removed duplicate code.
16243         (maybe_build_array_element_wfl, build_new_array_init,
16244         patch_new_array_init, patch_array_constructor,
16245         array_constructor_check_entry): New functions.
16246
16247 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16248
16249         * parse.y (array_initializer): Tagged <node>.
16250         (variable_initializer:): Use default rule.
16251         (array_initializer:): Defined actions.
16252         (variable_initializers:): Likewise.
16253         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16254         non-static field accesses.
16255         (patch_invoke): Fixed indentation typo.
16256         (java_complete_tree): Likewise.
16257         (build_labeled_block): Changed leading comment. Generate an error
16258         in case of duplicate loop labels.
16259         (patch_conditional_expr): Patch results of string concatenation
16260         operations.
16261
16262 1998-12-06  Per Bothner  <bothner@cygnus.com>
16263
16264         * constants.c (find_methodref_index):  When the class is an interface,
16265         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16266
16267         * decl.c (finit_identifier_node):  Use "$finit$", rather than
16268         "<finit>" (which Sun's verifier rejects).
16269         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
16270         (generate_field_initialization_code):  Removed.
16271         (fix_constructors)  Don't add call to $finit$ here (wrong order).
16272         (patch_method_invocation):  Add $finit$ call here.
16273
16274         * java-tree.h (CALL_USING_SUPER):  New macro.
16275         * parse.y (patch_invoke):  Remove im local variable.
16276         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
16277         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
16278         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
16279
16280         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
16281
16282         * parse.y (java_complete_tree):  Don't complain about unreachable
16283         statement if it is empty_stmt_node.
16284
16285         * jcf-write.c (find_constant_wide):  New function.
16286         (push_long_const):  Use find_constant_wide.
16287
16288         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
16289         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
16290         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16291         Emit invokeinterface when calling an interface method.
16292         Emit invokespecial also when calling super or private methods.
16293
16294         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
16295
16296 1998-12-06  Per Bothner  <bothner@cygnus.com>
16297
16298         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
16299
16300 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16301
16302         * java-tree.h (java_layout_seen_class_methods): New function
16303         prototype.
16304         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16305         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16306         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16307         * parse.y (method_declarator:): Defined action.
16308         (issue_warning_error_from_context): input_filename saved, set to
16309         the appropriate value and restored after java_error is called.
16310         (build_unresolved_array_type): Fixed comment.
16311         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16312         (method_header): Deal with return type the same way type are
16313         handled for fields and method's parameters and local variables
16314         types are handled.
16315         (check_method_redefinition): Removed extra CR.
16316         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16317         (java_layout_seen_class_methods): New function.
16318         (java_layout_classes): Call java_layout_seen_class_methods.
16319
16320 1998-12-03  Per Bothner  <bothner@cygnus.com>
16321
16322         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
16323
16324 1998-12-03  Per Bothner  <bothner@cygnus.com>
16325
16326         * jcf-dump.c (main):  Fix error message.
16327         * jcf-path.c (add_entry):  Style fix.
16328
16329 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16330
16331         * class.c (layout_class_method): Call build_java_argument_signature
16332         on constructors too.
16333         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16334         (patch_method_invocation): Define a primary when resolving an
16335         expression name. Augmented comment on code checking illegal `this'
16336         usage. Loosened it test by accepting NEW_CLASS_EXPR.
16337
16338 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16339
16340         * class.c (layout_class_method): Don't report error on non-static
16341         overriding static if the method is private.
16342         * java-tree.h (finish_class): Prototype added.
16343         * lex.c (java_get_line_col): Handle col argument -2 value.
16344         * parse.h: All static method declarations moved to parse.y.
16345         * parse.y: Now contains all static method declarations previously
16346         found in parse.h.
16347         (find_expr_with_wfl, missing_return_error,
16348         unreachable_stmt_error): New functions.
16349         (java_get_real_method_name): Identify constructors bearing class
16350         names in source code compiled classes only.
16351         (java_complete_expand_methods): Call missing_return_error.
16352         (invocation_mode): Private methods invoked as static methods.
16353         (java_complete_tree): Call unreachable_stmt_error.
16354
16355 1998-12-01  Tom Tromey  <tromey@cygnus.com>
16356
16357         * Makefile.in (+target): Removed.
16358         (+xmake_file): Likewise.
16359         (+tmake_file): Likewise.
16360         (.NOEXPORT): Removed duplicate.
16361
16362 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16363
16364         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16365
16366         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
16367
16368         * jvgenmain.c: Remove the xmalloc prototype, we get it from
16369         libiberty.h.  Provide an xmalloc definition.
16370
16371         * jvspec.c: Remove the xmalloc prototype.
16372
16373         * parse-scan.y: Include config.h and system.h.  Don't include
16374         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
16375         Provide an xstrdup definition.
16376
16377 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
16378
16379         * jcf-path.c (add_entry): Recognize ".jar" too.
16380         * lang-specs.h: Likewise.
16381
16382 1998-11-26  Per Bothner  <bothner@cygnus.com>
16383
16384         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
16385         soft_monitorenter_node, soft_monitorexit_node, throw_node.
16386
16387         * jcf-write.c (generate_bytecode_insns):
16388         Handle pre/post-increment/decrement of long.
16389
16390         * jcf-write.c (generate_bytecode_insns):
16391         Handle missing exception handler (finally for synchronized).
16392
16393 1998-11-25  Per Bothner  <bothner@cygnus.com>
16394
16395         * java-tree.h (end_params_node):  Declare global.
16396         * decl.c (end_params_node):  New global.
16397         (init_decl_processing, start_java_method):  Use end_params_node for
16398         end of list of parameter types.  Follows correct gcc conventions.
16399         * expr.c (pop_argument_types, pop_arguments):  Likewise.
16400         * lang.c (put_decl_node):  Likewise.
16401         * typeck.c (various places):  Likewise.
16402         * class.y (various places):  Likewise.
16403         * parse.y (various places):  Likewise.
16404
16405         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
16406         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
16407
16408         * class.c:  Add #include flags.h, remove no-longer needed declaration.
16409
16410         * class.c (layout_class_method):  Remove commented-out code, re-format.
16411         Don't add vtable entry (or index) for private methods.
16412         * expr.c (expand_invoke):  A private method is implicitly final.
16413         * class.c (make_class_data):  If inlining or optimizing,
16414         skip private methods.
16415
16416         * class.c (finish_class):  New function.  Calls existing methods,
16417         but alls emits deferred inline functions.
16418         * jcf-parse.c (parse_class_file):  Call finish_class.
16419         * parse.y (java_complete_expand_methods):  Likewise.
16420
16421         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
16422
16423         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
16424
16425 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
16426
16427         * jcf-write.c (generate_bytecode_conditional): Fix typo.
16428
16429 1998-11-24  Per Bothner  <bothner@cygnus.com>
16430
16431         * (generate_classfile): Always write class access flag with
16432         ACC_SUPER set.
16433
16434 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16435
16436         * class.c (maybe_layout_super_class): New function.
16437         (layout_class): Reorganized. Loop on class methods dispatched into
16438         a new function. Call maybe_layout_super_class.
16439         (layout_class_methods, layout_class_method): New functions.
16440         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
16441         class.
16442         (expand_invoke): Likewise.
16443         * java-tree.h (all_class_list): New global variable declared.
16444         (layout_class_methods, layout_class_method): New function
16445         prototypes.
16446         (LAYOUT_SEEN_CLASS_METHODS): New macro.
16447         * jcf-parse.c (all_class_list): New global variable.
16448         (load_class): Extended what class_or_name can be. Use parser
16449         context mechanism to save globals before calling jcf_parse.
16450         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
16451         is set on the file name.
16452         (jcf_parse): Layout class methods when Object is loaded, otherwise
16453         record class in all_class_list for delayed method layout.
16454         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
16455         * lang.c (put_decl_node): Decode <init> into the decl context
16456         class name.
16457         * lex.c (java_allocate_new_line): Use xmalloc.
16458         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
16459         pointers, not TREE_LIST elements.
16460         (struct parser_ctxt): Fixed comment indentations, added comments
16461         and reordered some fields.
16462         (java_check_methods): Function prototype removed.
16463         * parse.y (java_push_parser_context): Use xmalloc.
16464         (java_parser_context_restore_global): Pop extra pushed ctxp only
16465         when there's nothing next.
16466         (maybe_create_class_interface_decl): Fixed comment, add new
16467         created class decl to all_class_list.
16468         (method_header): Use GET_REAL_TYPE on argument's types.
16469         (method_declarator): Use GET_REAL_TYPE, change type to the real
16470         type in TREE_LIST dependency node. Build argument list with the
16471         real type.
16472         (create_jdep_list): Use xmalloc. Removed allocation error message.
16473         (obtain_incomplete_type): Fixed leading comment. Broadened
16474         incoming argument meaning.
16475         (register_incomplete_type): Use xmalloc. Removed allocation error
16476         message.
16477         (safe_layout_class): Fixed leading comment.
16478         (jdep_resolve_class): Reversed if statement condition and switch
16479         if and else bodies.
16480         (resolve_and_layout): Fixed leading comment. Broadened incoming
16481         argument meaning.
16482         (complete_class_report_errors): New local variable name, for
16483         clarity. purify_type_name used for all error cases.
16484         (java_get_real_method_name): Stricter check on constructors.
16485         (java_check_regular_methods): Reverse methods list only if not
16486         already laid out. Layout artificial constructor.
16487         (java_check_methods): Deleted.
16488         (source_start_java_method): Obtain incomplete type for patchable
16489         method arguments.
16490         (java_layout_classes): Fixed leading comment. Use
16491         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
16492         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
16493         before returning. Fixed comments.
16494         (java_expand_classes): Check for errors up front.
16495         (patch_method_invocation): Class to search is resolved and laid
16496         out.
16497
16498 1998-11-24  Per Bothner  <bothner@cygnus.com>
16499
16500         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
16501
16502         * javaop.h (int8):  Removed - not used.
16503         (jbyte):  Redefine portably with correct signedness.
16504
16505         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
16506
16507         * jcf-write.c (generate_bytecode_insns):  Fix typo
16508         OPCODE_getstatic to OPCODE_getfield.
16509
16510         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
16511         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
16512         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
16513
16514 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16515
16516         * jcf-parse.c (jcf_parse_source): Function returned type is
16517         void. Added prototype.
16518         (jcf_parse): Function returned type is void.
16519         (yyparse): Remove call to fclose on the last parsed file.
16520
16521         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
16522
16523 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16524
16525         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
16526         (layout_class): Cope with methods featuring WFL in decl names.
16527         * decl.c (unqualified_object_id_node): New global variable,
16528         initialized.
16529         (build_decl_no_layout): Removed.
16530         * expr.c (build_primtype_type_ref): Handle Double.
16531         (java_lang_expand_expr): Fixed indentations.
16532         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
16533         (flag_wall, flag_redundant, flag_not_overriding,
16534         flag_static_local_jdk1_1, unqualified_object_id_node): Global
16535         variable declarations.
16536         (build_decl_no_layout): Removed prototype.
16537         (java_get_real_method_name): Added prototype.
16538         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
16539         (java_parse_abort_on_error): Macro now just returns.
16540         * jcf-parse.c (jcf_parse_source): Check fclose returned
16541         value. Call emit_register_classes if java_report_errors returns
16542         zero.
16543         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
16544         flag_static_local_jdk1_1): New integer flags.
16545         (lang_decode_option): New flags set here.
16546         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
16547         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
16548         the flag_redundant variable.
16549         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
16550         when parsing java.lang.Object class.
16551         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
16552         NULL_TREE to build.
16553         (resolve_qualified_expression_name): Fixed indentation.
16554         (patch_array_ref): Changed prototype.
16555         (not_initialized_as_it_should_p): Prototype removed.
16556         (java_report_errors): Added function prototype.
16557         * parse.y (formal_parameter:): Changed error message for not yet
16558         supported final parameters.
16559         (class_type_list:): Set both PURPOSE and VALUE of created
16560         TREE_LIST to be class_type.
16561         (primary_no_new_array:): Handle class literals on primitive types.
16562         (parse_warning_context): Reinstalled correct force_error and
16563         do_warning flags setups.
16564         (java_report_errors): Changed prototype. Return java_error_count
16565         value.
16566         (variable_redefinition_error): Consider treating variable type as
16567         a fake pointer.
16568         (create_interface): Warn about redundant abstract modifier if
16569         flag_redundant is set. Changed error message.
16570         (lookup_field_wrapper): Save/restore globals before/after looking
16571         up field.
16572         (duplicate_declaration_error_p): Consider treating declaration
16573         type as a fake pointer.
16574         (register_fields): Extract real type from dependency node. Check
16575         for duplicate field declaration after type adjustment. Use
16576         DECL_INITIAL to store static final initialized values.
16577         (method_header): Extract real function type from dependency node.
16578         (check_abstract_method_header): Use GET_METHOD_NAME.
16579         (obtain_incomplete_type): Layout fake pointer type.
16580         (safe_layout_class): Don't try to check for methods before layout.
16581         (java_complete_class): Don't check for correct throws clause
16582         elements inheritance here.
16583         (resolve_and_layout): Broadened name parameter meaning.
16584         (reset_method_name): Use GET_METHOD_NAME.
16585         (java_get_real_method_name): New function.
16586         (java_check_regular_methods): Don't check methods in
16587         java.lang.Object.  Verify lineage of throws clause elements. Use
16588         flag_no_overriding in warning report.
16589         (check_throws_clauses): Don't check if class was from
16590         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
16591         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
16592         (declare_local_variables): Use flag_static_local_jdk1_1 to report
16593         warning on unsupported final local variables. Use build_decl
16594         instead of build_decl_no_layout. Get real local variable type from
16595         dependency node.
16596         (source_start_java_method): Get real parameter type from
16597         dependency node. Call build_decl instead of build_decl_no_layout.
16598         (java_layout_classes): Reverse tree and layout type and class as
16599         required. Mark class as loaded when done.
16600         (resolve_field_access): Fixed indentation. Restricted condition
16601         leading to static field access code generation. Set field_type
16602         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
16603         (resolve_qualified_expression_name): Initialize type_found to
16604         null. Handle static field resolved during qualification. Fixed
16605         layout on non primitive field decl types.
16606         (not_accessible_p): Fixed typo in comment.
16607         (patch_method_invocation): Resolve and layout class to search from
16608         type.
16609         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
16610         layout non primitive type, if necessary. Make method node only to
16611         report errors.
16612         (find_applicable_accessible_methods_list): Consider WFL'ed method
16613         decl names. Fixed indentation.
16614         (argument_types_convertible): Resolve and layout target type if
16615         necessary.
16616         (java_complete_tree): Fixed indentation problems. Rewrote
16617         CALL_EXPR thrown exceptions check. Re-installed further processing
16618         of the assignment in certain cases.
16619         (patch_assignment): Call maybe_build_primttype_type_ref to perform
16620         inlining on class literals.
16621         (valid_builtin_assignconv_identity_widening_p): Cope with constant
16622         0 literal.
16623         (valid_method_invocation_conversion_p): Likewise.
16624         (patch_string): Temporary disable forbidden use of `this' in
16625         explicit constructor invocations when doing string concatenation
16626         within their scope.
16627         (patch_unaryop): Added comment. Reinstalled code to disable
16628         further check on assignment operation with cast expression RHS.
16629         (patch_switch_statement): Fixed indentation.
16630         (build_try_statement): Call build_decl instead of
16631         build_decl_no_layout.
16632         (patch_synchronized_statement): Likewise.
16633         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
16634         IS_UNCHECKED_EXPRESSION_P.
16635         (check_thrown_exceptions_do): Changed leading comment. Resolve and
16636         layout argument exception type.
16637         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
16638         of IS_UNCHECKED_EXPRESSION_P.
16639
16640 1998-11-18  Anthony Green  <green@cygnus.com>
16641
16642         * jcf-parse.c (yyparse): Open class file in binary mode.
16643
16644 1998-11-15  Per Bothner  <bothner@cygnus.com>
16645
16646         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
16647
16648         * jcf-write.c (perform_relocations):  Move check out one loop.
16649
16650 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
16651
16652         * Make-lang.in: Fix reference to srcdir.
16653         * jv-scan.c: Add missing xmalloc prototype.
16654         * jvgenmain.c: Ditto.
16655
16656 1998-11-15  Per Bothner  <bothner@cygnus.com>
16657
16658         * decl.c (error_mark_node), java-tree.h:  New global.
16659         * parse.y:  Use empty_stmt_node instead of size_zero_node.
16660         (build_if_else_statement):  If missing else, use empty_stmt_node.
16661
16662         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
16663         (java_complete_expand_method):  Complain if return is missing.
16664         (java_check_regular_methods):  Comment out incorrect error check.
16665         (not_accessible_p):  Fix incorrect handling of protected methods.
16666         (patch_method_invocation):  Pass correct context to not_accessible_p.
16667         (find_applicable_accessible_methods_list):  Likewise.
16668         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
16669         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
16670         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
16671         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
16672
16673         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
16674         (push_int_const):  Remove reundant NOTE_PUSH.
16675         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
16676         (- case SWITCH_EXPR):  Fix code generation bug.
16677         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
16678         (generate_classfile):  More robust for abstract methods.
16679
16680 1998-11-15  Anthony Green  <green@cygnus.com>
16681
16682         * Makefile.in: jv-scan and jvgenmain all require libiberty.
16683         * Make-lang.in: Ditto.
16684
16685         * jv-scan.c: Remove xmalloc and xstrdup definitions.
16686         * jvgenmain: Ditto.
16687
16688 1998-11-15  Per Bothner  <bothner@cygnus.com>
16689
16690         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
16691
16692         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
16693
16694 1998-11-14  Per Bothner  <bothner@cygnus.com>
16695
16696         Allow uses of interface types to verify.  This is not really
16697         type-safe, but it matches what Sun does, and is OK as long as
16698         there are appropriate run-time checks.
16699         * verify.c (merge_types):  If merging two interface types,
16700         just set the result to java.lang.Object.
16701         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
16702
16703 1998-11-13  Tom Tromey  <tromey@cygnus.com>
16704
16705         * gjavah.c (main): Handle --output-class-directory argument.
16706         * jvspec.c (lang_specific_driver): Translate `-d' into
16707         -foutput-class-dir.
16708         * jcf.h (jcf_write_base_directory): Declare.
16709         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
16710         * lang-options.h: Mention -foutput-class-dir.
16711         * jcf-write.c (jcf_write_base_directory): New global.
16712         (make_class_file_name): Put generated .class file into `-d'
16713         directory, or into source directory if -d not given.  Function now
16714         static.
16715         (write_classfile): Free class file name.  Handle case where class
16716         file name is NULL.
16717         (DIR_SEPARATOR): New macro.
16718         Include <sys/stat.h>
16719
16720         * Makefile.in (prefix): New macro.
16721
16722 1998-11-12  Per Bothner  <bothner@cygnus.com>
16723
16724         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
16725         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
16726         here (done in patch_invoke instead).
16727         (case_identity):  Moved here from parse.y.
16728
16729         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
16730         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
16731         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
16732         so they can be efficiently scanned without recursion.
16733         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
16734         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
16735         in BLOCK iteratively, rather than recursively.
16736
16737         * parse.y (do_unary_numeric_promotion):  New function.
16738         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
16739
16740         * parse.y (patch_newarray):  Various fixes.
16741
16742         Re-do handling of switch statements (for proper block scoping).
16743         * parse.y:  Add just a single block for the enture switch block,
16744         but don't create any "case blocks".
16745         (group_of_labels):  Rmeoved unneeded non-terminal.
16746         CASE_EXPR and DEFAULT_EXPR are added to current block.
16747         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
16748         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
16749         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
16750         * parse.y (wfl_operator, print_int_node): Make non-static.
16751         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
16752         as part of recursive scan of block.
16753         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
16754         (patch_switch_statement):  Most tests move dinto java_complete_tree.
16755
16756         * parse.y:  Make various production be non-typed (void).
16757         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
16758         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
16759         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
16760
16761         * jcf-write.c (struct jcf_handler):  New type.
16762         (struct jcf_switch_state):  New type.
16763         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
16764         (alloc_handler, emit_unop, emit_reloc):  New functions.
16765         (adjust_typed_op):  Add extra parameter ("max type" offset).
16766         (emit_switch_reloc, emit_case-reloc):  New function.
16767         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
16768         (generate_bytecode_insns):  Support REAL_CST, switch statements,
16769         exception handling, method calls, object/array creation, and more.
16770
16771         * class.c:  Remove some unused variables.
16772         * constants.c (find_string_constant):  New function.
16773         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
16774         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
16775         if flag_emit_class_files.
16776
16777 1998-11-12  Tom Tromey  <tromey@cygnus.com>
16778
16779         * jcf-io.c (find_class): Added explanatory comment.
16780
16781         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
16782         trailing slash to `.zip' entries.
16783
16784         * jvspec.c (lang_specific_driver): Correctly handle case where
16785         GC_NAME not defined.
16786
16787 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16788
16789         * jvspec.c (GC_NAME): New define.
16790         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
16791         if required.
16792         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
16793
16794 1998-11-11  Per Bothner  <bothner@cygnus.com>
16795
16796         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
16797
16798 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16799
16800         * jcf-dump.c (main): Correctly recognize `--'-style long options.
16801
16802 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16803
16804         * class.c (is_compiled_class): Call safe_layout_class for class
16805         compiled from source.
16806         * conver.h (convert_to_integer, convert_to_real,
16807         convert_to_pointer): Added prototypes.
16808         * decl.c (init_decl_processing): Non longer push the decls of
16809         `methodtable', `constants', `Class', `Field', `dispatchTable'
16810         `jexception' and `Method'.
16811         * expr.c (build_invokeinterface): New function.
16812         (expand_invoke): static variable CLASS_IDENT now in
16813         build_invokeinterface. Use build_invokeinterface.
16814         (expand_java_field_op): Moved code to inline
16815         java.lang.PRIMTYPE.TYPE into a function.
16816         (build_primtype_type_ref): New function.
16817         * java-tree.def (INSTANCEOF_EXPR): New tree code.
16818         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
16819         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
16820         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
16821         (DECL_LOCAL_STATIC_VALUE): New macro.
16822         (build_invokeinterface, build_primtype_type_ref): New function
16823         prototypes.
16824         (java_parse_abort_on_error): Macro rewritten.
16825         * jcf-parse.c (current_method): Add comment to declaration.
16826         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
16827         Function prototypes fixed.
16828         (jcf_parse_source): push/pop parser context. save/restore global.
16829         (parse_source_file): Fixed leading comment. Now take a
16830         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
16831         classes and pop the parser context anymore.
16832         (yyparse): Push parser context, save globals, parse the source
16833         file, restore globals and pop the parser context when processing a
16834         source file.
16835         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
16836         * lex.c (java_parse_doc_section): New function.
16837         (java_lex): Call java_parse_doc_section when appropriate. Build an
16838         operator around INSTANCEOF_TK.
16839         * lex.h (java_lineterminator, java_sprint_unicode,
16840         java_unicode_2_utf8, java_lex_error, java_store_unicode):
16841         Prototypes rewritten.
16842         (java_parse_escape_sequence, java_letter_or_digit_p,
16843         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
16844         java_read_unicode, java_store_unicode, java_read_char,
16845         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
16846         Added function prototypes.
16847         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
16848         define.
16849         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
16850         New macros
16851         (struct parser_ctxt): New fields: deprecated,
16852         current_parsed_class_un, gclass_list.
16853         (fix_method_argument_names, issue_warning_error_from_context,
16854         resolve_package, lookup_package_type): New function prototypes.
16855         (resolve_expression_name): Fixed function prototype.
16856         (find_applicable_accessible_methods_list): Fixed indentation, added
16857         extra argument in prototype.
16858         (check_final_assignment, build_null_of_type, check_deprecation,
16859         check_method_redefinition, reset_method_name,
16860         java_check_regular_methods, java_check_abstract_methods,
16861         maybe_build_primttype_type_ref): New function prototype.
16862         * parse.y (conver.h): Include.
16863         (INSTANCEOF_TK): Tagged <operator>.
16864         (single_type_import_declaration): Use REGISTER_IMPORT macro.
16865         (relational_expression:): Build binop for instanceof.
16866         (java_push_parser_context): Remember ctxp->gclass_list across
16867         contexts.
16868         (java_pop_parser_context): Simply return if no context
16869         exists. Remember gclass_list across contexts.
16870         (issue_warning_error_from_context): New function.
16871         (parse_error_context): Don't setup ctxp->elc here. Call
16872         issue_warning_error_from_context instead.
16873         (parse_warning_context): Likewise.
16874         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
16875         setup. Link new class/interface to ctxp->gclass_list.
16876         (add_superinterfaces): Register interface as incomplete if not
16877         loaded.
16878         (create_class): Remember class unqualified name in
16879         ctxp->current_parsed_class_un. Check class deprecation.
16880         (register_fields): Check field deprecation. Remember static final
16881         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
16882         processing INIT.
16883         (method_header): New local variable ORIG_ARG. Use unqualified
16884         current class name for check on constructor errors. Promote return
16885         type if of record type. Argument list fix moved in
16886         fix_method_argument_names, called here. Check method deprecation.
16887         (fix_method_argument_names): New function.
16888         (method_declarator): Promote record typed arguments.
16889         (safe_layout_class): Check class methods before layout.
16890         (java_complete_class): Compute field layout when patched.
16891         (do_resolve_class): Try to load class after having it renamed
16892         after the package name.
16893         (get_printable_method_name): Use DECL_CONTEXT.
16894         (reset_method_name): New function.
16895         (check_method_redefinition): Use reset_method_name.
16896         (java_check_regular_methods): New local variable
16897         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
16898         names for error report. Check for compile-time error when method
16899         found has default (package) access.
16900         (java_check_abstract_methods): Now takes an interface DECL node as
16901         an argument. Also reinstall real name on unchecked
16902         overriding/hiding methods for error report.
16903         (java_check_methods): Fixed leading comment. Get classes to verify
16904         from ctxp->gclass_list. Use CHECK_METHODS macro and set
16905         CLASS_METHOD_CHECKED_P on class verification.
16906         (lookup_java_method2): Get real method name if necessary.
16907         (find_in_imports): Don't check package class access here.
16908         (resolve_package, lookup_package_type): New functions.
16909         (java_layout_classes): Fixed leading comment. Take classes to be
16910         laid out from ctxp->gclass_list.
16911         (java_complete_expand_methods): Don't expand native and abstract
16912         methods.
16913         (java_expand_classes): New function.
16914         (resolve_expression_name): Use additional argument ORIG.  Retrieve
16915         values of static final field of primitive types.
16916         (resolve_field_access): Handles static final field of promotive
16917         type.
16918         (resolve_qualified_expression_name): Handle STRING_CST as
16919         primaries and package name resolution. Check deprecation on found
16920         decls. Set where_found and type_found on non static field resolved
16921         during qualification. Layout non primitive field decl types.
16922         (check_deprecation): New function.
16923         (maybe_access_field): Simplified.
16924         (patch_method_invocation_stmt): Local variable CLASS_TYPE
16925         removed. Reverse method's argument when primary is a type. Don't
16926         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
16927         instead. Include abstract class in the list of class searchable
16928         for constructors. Use DECL_CONTEXT of found method for access
16929         checks. Check method deprecation.
16930         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
16931         converting arguments. Handle INVOKE_INTERFACE.
16932         (lookup_method_invoke): Search constructor using existing
16933         infrastructure (don't rely on lookup_java_constructor anymore).
16934         (find_applicable_accessible_methods_list): Extra argument flag
16935         LC. Now include constructor in the search.
16936         (qualify_ambiguous_name): Conditional expression are primaries.
16937         (not_initialized_as_it_should_p): static final are always
16938         initialized.
16939         (java_complete_tree): Pass extra NULL argument to
16940         resolve_expression_name. Stricter test to carry on patching
16941         assignments. New case for INSTANCEOF_EXPR.
16942         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
16943         (check_final_assignment, maybe_build_primttype_type_ref): New
16944         functions.
16945         (patch_assignment): Detect resolved static finals and carry normal
16946         assignment error check on them. Inline PRIMTYPE.TYPE read access.
16947         (try_builtin_assignconv): Access constant 0 on all primitive
16948         types.
16949         (valid_builtin_assignconv_identity_widening_p): Accept identical
16950         types. Accept all promoted type on int type.
16951         (valid_ref_assignconv_cast_p): Accept a null pointer to be
16952         assigned to a reference.
16953         (valid_method_invocation_conversion_p): Accept to check null
16954         pointers.
16955         (build_binop): Merge declaration and initialization of local
16956         variable BINOP.
16957         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
16958         numeric types. Improved validity test for qualify operators on
16959         references.
16960         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
16961         and PREINCREMENT_EXPR. Also detect resolved static finals of a
16962         primitive type and issue the appropriate error message.
16963         (resolve_type_during_patch): Mark class loaded when resolved.
16964         (patch_cast): Allow null to be cased to reference types.
16965         (build_null_of_type): New function.
16966         (patch_array_ref): Handle array on references correctly.
16967         (patch_return): Removed unused local variable MODIFY. Force
16968         boolean to be returned as integers. Allows null to be returned by
16969         a function returning a reference.
16970         * typeck.c (convert_to_integer, convert_to_real,
16971         convert_to_pointer): Prototypes moved to convert.h
16972         (lookup_argument_method): Use method real name, if necessary.
16973
16974 1998-10-30  Tom Tromey  <tromey@cygnus.com>
16975
16976         * class.c (build_class_ref): Changed name of primitive classes to
16977         start with `_Jv_'.
16978
16979         * class.c (make_class_data): Renamed fields: nmethods to
16980         method_count, method_count to dtable_method_count.  Always set
16981         `state' field to 0.
16982         * decl.c (init_decl_processing): Likewise.
16983
16984 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16985
16986         * class.c (layout_class): Don't mangle <finit>, produce
16987         __finit<class> instead. Don't verify artificial methods.
16988         * decl.c (finit_identifier_node): New declared global.
16989         (init_decl_processing): finit_identifier_node initialized.
16990         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
16991         * java-tree.h (finit_identifier_node): Declared as extern.
16992         (struct lang_decl): New field called_constructor.
16993         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
16994         (CLASS_HAS_FINIT_P): New macro.
16995         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
16996         explicit constructor invocation.
16997         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
16998         CALL_SUPER_CONSTRUCTOR_P): New macros.
16999         (write_classfile): Added prototype.
17000         * jcf-parse.c (jcf_parse_source): Parse and remember for
17001         generation if the file was seen on the command line.
17002         (parse_source_file): Don't write the class file here.
17003         (yyparse): Loop on files rewritten. Set current_jcf.
17004         (parse_zip_file_entries): Parse class file only if it was found.
17005         * lang.c (init_parse): Don't open command line provided filename
17006         here.
17007         (lang_parse): Don't set main_jcf anymore.
17008         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17009         (JCONSTRUCTOR_CHECK): New macro.
17010         (JBSC_TYPE_P): New macro.
17011         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17012         (COMPLETE_CHECK_OP_2): New macro.
17013         (struct parse_ctxt): New field explicit_constructor_p.
17014         (check_class_interface_creation): Fixed prototype indentation.
17015         (patch_method_invocation_stmt): Prototype reflects added argument.
17016         (patch_invoke): Likewise.
17017         (complete_method_declaration, build_super_invocation,
17018         verify_constructor_circularity,
17019         build_this_super_qualified_invocation, get_printable_method_name,
17020         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17021         verify_constructor_super, create_artificial_method,
17022         start_artificial_method_body, end_artificial_method_body,
17023         generate_field_initialization_code): New function prototypes.
17024         * parse.y: Fixed leading comment
17025         (constructor_header:, constructor_body:, block_end:): Rules tagged
17026         <node>.
17027         (type_declaration:): Call maybe_generate_finit.
17028         (method_declaration:): Action for method_body: placed in new
17029         function complete_method_declaration, called here.
17030         (constructor_declaration:): Defined actions. Removed leading
17031         FIXME.
17032         (constructor_header:): New rule with action.
17033         (constructor_body:): Rule rewritten using block_begin: and
17034         block_end:. Defined actions.
17035         (constructor_declarator:, explicit_constructor_invocation:):
17036         Defined actions.
17037         (block:): Use new rules block_begin: block_end:.
17038         (block_begin:, block_end:): New rules and actions.
17039         (block_statements:): Fixed error message for explicit
17040         constructors.
17041         (method_invocation:): Call build_this_super_qualified_invocation
17042         if primary is `this' or `super' was seen.
17043         (conditional_expression:): Action defined.
17044         (extra_ctxp_pushed_p): New static global flag.
17045         (java_parser_context_save_global): Create parser context if
17046         necessary. Use extra_ctxp_pushed_p to remember it.
17047         (java_parser_context_restore_global): Pop extra parser context if
17048         one exists.
17049         (build_array_from_name): Array on primitive types are marked
17050         loaded.
17051         (register_fields): Restore new name in field initializer
17052         expression if type was altered. Non static fields initialized upon
17053         declaration marked initialized.
17054         (maybe_generate_finit): New function.
17055         (maybe_generate_clinit): Use create_artificial_method,
17056         start_artificial_method_body, end_artificial_method_body. Generate
17057         debug info for enclosed initialization statements.
17058         (method_header): Fixed leading comment. Check constructor
17059         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17060         accordingly.
17061         (complete_method_declaration, constructor_circularity_msg,
17062         verify_constructor_circularity): New functions.
17063         (get_printable_method_name): New function.
17064         (check_method_redefinition): Don't rename <finit> methods. Fix
17065         declared constructor names. Error message for
17066         constructors modified.
17067         (java_check_regular_methods): Local variable seen_constructor
17068         renamed saw_constructor. Skip verification on constructors. Create
17069         default constructor with create_artificial_method.
17070         (java_check_methods): Removed unnecessary empty line.
17071         (create_artificial_method, start_artificial_method_body,
17072         end_artificial_method_body): New functions.
17073         (java_layout_classes): Changed leading comment. Reverse fields
17074         list if necessary. Always layout java.lang.Object if being
17075         defined.
17076         (java_complete_expand_methods): Verify constructor circularity.
17077         (java_complete_expand_method): Call fix_constructor on
17078         constructors.  Local variable no_ac_found removed. Restore
17079         bindings if method body expansion failed.
17080         (fix_constructors, verify_constructor_super,
17081         generate_field_initialization_code): New function.
17082         (java_expand_classes): Fixed leading comment. Write class file
17083         here.
17084         (resolve_expression_name): Check for illegal instance variable
17085         usage within the argument scope of an explicit constructor
17086         invocation.
17087         (resolve_qualified_expression_name): Pass extra from_super flag
17088         when invoking patch_method_invocation_stmt. New case for
17089         conditional expression when used as a primary. Check for error
17090         when acquiring super.
17091         (patch_method_invocation_stmt): Added extra argument super. New
17092         local variable is_static_flag. Set class_to_search according to
17093         the nature of the constructor invocation. Don't add `this'
17094         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17095         invocation within the argument scope of explicit constructor
17096         invocation. Set is_static according to is_static_flag. Provide
17097         extra `super' argument to patch_invoke invocation.
17098         (patch_invoke): New argument from_super. Loop on arguments
17099         indentation fixed. Pass from_super to invocation_mode. New switch
17100         case INVOKE_SUPER. Fixed error message in switch default case.
17101         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17102         value.
17103         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17104         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17105         message takes constructors into account.
17106         (find_applicable_accessible_methods_list): Fixed indentation.
17107         (qualify_ambiguous_name): Take explicit constructor invocation
17108         into account. Deal with a conditional expression as a primary to
17109         a method call.
17110         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17111         case. Added extra argument to patch_method_invocation_stmt.
17112         Register calls made to explicit constructor `this'. Don't call
17113         save_expr in ARRAY_REF case when emitting class files. Check for
17114         illegal use of this when expanding explicit constructor invocation
17115         arguments.
17116         (complete_function_arguments): Set and reset parser context
17117         explicit_constructor_p field value when appropriate.
17118         (build_super_invocation, build_this_super_qualified_invocation):
17119         New functions.
17120         (patch_assignment): Fixed typo.
17121         (patch_unaryop): Check on final fields occurs only when a decl
17122         exits.
17123         (patch_return): Take constructors into account.
17124         (patch_conditional_expr): New function.
17125         * typeck.c (build_java_signature): Removed unnecessary empty line.
17126
17127 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17128
17129         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17130
17131 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17132
17133         * decl.c (init_decl_processing): Renamed fields.
17134         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17135         interface_len, msize fields.
17136
17137         * class.c (make_class_data): Removed subclass_head and
17138         subclass_next fields.
17139         * decl.c (init_decl_processing): Removed subclass_head and
17140         subclass_next fields.
17141
17142 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17143
17144         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17145         * mangle.c (emit_unicode_mangled_name): Similarly.
17146
17147 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17148
17149         * jcf-parse.c (get_constant): Place braces around code to compute
17150         'd' when REAL_ARITHMETIC is not defined.
17151
17152 1998-10-25  H.J. Lu  (hjl@gnu.org)
17153
17154         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17155         dependency.
17156
17157 1998-10-23  Tom Tromey  <tromey@cygnus.com>
17158
17159         * lang-specs.h: `.zip' files are input to jc1.
17160
17161 1998-10-22  Per Bothner  <bothner@cygnus.com>
17162
17163         * jvspecs.c:  Add (but don't enable) support for combining multiple
17164         .class and .java input filenames to a single jc1 invocation.
17165         Add support for -C flag (copile to .class files).
17166         Translate -classpath and -CLASSPATH arguments.
17167         * lang-specs.h:  Don't set %2 spec.
17168
17169 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17170
17171         * jcf-path.c (add_entry): Don't add trailing separator if entry is
17172         a .zip file.
17173         (add_path): Don't add trailing separator to non-empty path
17174         elements.
17175
17176         * lang.c (lang_decode_option): Check for -fclasspath and
17177         -fCLASSPATH before examining other `-f' options.
17178
17179         * java-tree.h (finalize_identifier_node): Don't declare.
17180         * class.c (make_class_data): Don't push "final" field.
17181         * decl.c (init_decl_processing): Don't push "final" field.
17182         (finalize_identifier_node): Removed.
17183         (init_decl_processing): Don't set finalize_identifier_node.
17184
17185         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17186
17187 1998-10-11  Anthony Green  <green@cygnus.com>
17188
17189         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17190         (JV_SCAN_SOURCES): New macro.
17191         (JCF_DUMP_SOURCES): Likewise.
17192         (jcf-dump$(exeext)): New target.
17193         (jv-scan$(exeext)): New target.
17194
17195 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17196
17197         * Makefile.in (LEX): Removed.
17198         (LEXFLAGS): Likewise.
17199         (SET_BISON): New macro.
17200         (BISON): Removed.
17201         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
17202         spurious diffs in parse.c.
17203         ($(PARSE_SCAN_C)): Likewise.
17204         (PARSE_DIR): New macro.
17205         (PARSE_C): Use it.
17206         (PARSE_SCAN_C): Likewise.
17207         (PARSE_RELDIR): New macro.
17208
17209         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17210
17211         * jcf-io.c (find_class): Use saw_java_source to determine when to
17212         look for `.java' file.
17213         * jcf-parse.c (saw_java_source): New global.
17214         (yyparse): Set it if `.java' file seen.
17215
17216         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17217         (GCJH_SOURCES): Likewise.
17218         * Makefile.in (datadir): New macro.
17219         (libjava_zip): Likewise.
17220         (JAVA_OBJS): Added jcf-path.o.
17221         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17222         (../gcjh$(exeext)): Likewise.
17223         (jcf-path.o): New target.
17224         * java-tree.h (fix_classpath): Removed decl.
17225         * jcf-parse.c (fix_classpath): Removed.
17226         (load_class): Don't call fix_classpath.
17227         * parse.y (read_import_dir): Don't call fix_classpath.
17228         * lex.h: Don't mention classpath.
17229         * lex.c (java_init_lex): Don't initialize classpath.
17230         * jcf-io.c (classpath): Removed global.
17231         (find_class): Use jcf_path iteration functions.  Correctly search
17232         class path for .java file.
17233         (open_in_zip): New argument `is_system'.
17234         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
17235         classpath-related options.
17236         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17237         and -I.
17238         (lang_init): Call jcf_path_init.
17239         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17240         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
17241         Correctly put braces around second string in each entry.
17242         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
17243         classpath-related options.
17244         (help): Updated for new options.
17245         * jcf.h: Declare functions from jcf-path.c.  Don't mention
17246         `classpath' global.
17247         * jcf-path.c: New file.
17248
17249         * jcf-depend.c: Include jcf.h.
17250
17251         * jcf-write.c (localvar_alloc): Returns `void'.
17252         (localvar_free): Removed unused variable.
17253
17254         * lang.c (OBJECT_SUFFIX): Define if not already defined.
17255         (init_parse): Use OBJECT_SUFFIX, not ".o".
17256
17257 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17258
17259         * class.c (emit_register_classes): Renamed from
17260         emit_register_class.
17261         * java-tree.h (emit_register_classes): Prototype renamed from
17262         emit_register_class.
17263         * jcf-parse.c (yyparse): Call emit_register_classes once before
17264         returning.
17265         * parse.y (java_expand_classes): No longer register classes.
17266
17267 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17268
17269         * class.c (is_compiled_class): New local variable
17270         seen_in_zip. Identify classes found in currently compiled source
17271         file(s).
17272         * decl.c (complete_start_java_method): Fixed typo.
17273         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17274         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17275         (CLASS_P): Moved around.
17276         (java_parse_abort_on_error): Macro moved from jcf-parse.c
17277         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17278         java-tree.h
17279         (jcf_parse_source): Changed leading comment. Removed unnecessary
17280         fclose and CLASS_FROM_SOURCE_P marking.
17281         (parse_source_file): New local variables remember_for_generation
17282         and filename. Mark parsed file name identifier node. Removed block
17283         executed when parse_only was null. Set remember_for_generation.
17284         Use it as an argument to java_pop_parser_context.
17285         (yyparse): New local variables several_files, list, next node and
17286         current_file_list. Split ampersand separated file names into
17287         current_file_list. Iterate through the list and parse accordingly.
17288         * parse.h (java_pop_parser_context): New function prototype.
17289         * parse.y (ctxp_for_generation): New static global variable.
17290         (java_pop_parser_context): New argument generate. Link popped ctxp
17291         to ctxp_for_generation list accordingly.
17292         (java_complete_expand_methods): Fixed indentation.
17293         (java_expand_classes): New function.
17294
17295 1998-10-17  Per Bothner  <bothner@cygnus.com>
17296
17297         * Makefile.in:  Link with libiberty.a instead of memmove.o.
17298
17299 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17300
17301         * lex.c (setjmp.h): No longer included.
17302         * lex.h (setjmp.h): Included.
17303         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17304         (duplicate_declaration_error_p): Renamed from
17305         duplicate_declaration_error.
17306         (build_array_from_name): New function prototype.
17307         * parse.y (setjmp.h): No longer included.
17308         (variable_declarator_id): Define action.
17309         (build_array_from_name): New function.
17310         (duplicate_declaration_error_p): Renamed from
17311         duplicate_declaration_error.  Fixed leading comment.
17312         (register_fields): Main `for' loop reorganized. Uses
17313         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17314         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17315         build_array_from_name.
17316         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17317         types.
17318         (read_import_dir): Don't try to skip `.' and `..'.
17319         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17320         build_array_from_name. Main `for' loop reorganized.
17321         (resolve_qualified_expression_name): When building access to a
17322         field, use the type where the field was found, not its own type.
17323         (maybe_access_field): Use field DECL_CONTEXT if the type where the
17324         field was found is null.
17325         (qualify_ambiguous_name): Sweep through all successive array
17326         dimensions.
17327
17328 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17329
17330         * java-tree.h (pop_labeled_block, lang_printable_name,
17331         maybe_add_interface, set_super_info, get_access_flags_from_decl,
17332         interface_of_p, inherits_from_p, fix_classpath,
17333         complete_start_java_method, emit_handlers, init_outgoing_cpool,
17334         make_class_data, register_class, alloc_name_constant): New
17335         function prototypes.
17336         * lang.c (lang_decode_option): Set argc argument unused. Fixed
17337         indentation. Added cast to remove warning.
17338         (lang_printable_name): Set v argument unused.
17339         (lang_print_error): Added argument to lang_printable_name call.
17340         (java_dummy_print, print_lang_decl, print_lang_type,
17341         print_lang_identifier, lang_print_xnode): All argument marked
17342         unused.
17343         * lex.c (java_unget_unicode): Removed unnecessary argument.
17344         (java_allocate_new_line): Unused local variable is gone.
17345         (java_read_char): Added parenthesis in expressions to remove
17346         warnings.  Added final return statement.
17347         (java_read_unicode): Added parenthesis in expression to remove
17348         warning.
17349         (java_parse_end_comment): Fixed java_unget_unicode invocation.
17350         (java_parse_escape_sequence): Likewise.
17351         (java_lex): Unused local variables are gone. Fixed
17352         java_unget_unicode invocation.
17353         * lex.h (set_float_handler): Prototype added when JC1_LITE not
17354         defined.
17355         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
17356         lang_printable_name invocation in macro.
17357         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
17358         Likewise.
17359         (duplicate_declaration_error): Suppressed unused argument in
17360         prototype.
17361         (identical_subpath_p): Function declaration is gone.
17362         (patch_invoke): Suppressed unused argument in prototype.
17363         (patch_cast, build_labeled_block, check_thrown_exceptions):
17364         Likewise.
17365         * parse.y (setjmp.h): Included
17366         (toplev.h): Likewise.
17367         (field_declaration:): Suppressed unused local
17368         (label_decl:): Fixed build_labeled_block invocation.
17369         (java_pop_parser_context): Put extra parenthesis around assignment
17370         in if.
17371         (yyerror): Suppressed unused local variables.
17372         (variable_redefinition_error): Fixed lang_printable_name
17373         invocation.
17374         (create_interface): Suppressed unused local variables.
17375         (create_class): Likewise.
17376         (duplicate_declaration_error): Suppressed unused argument. Fixed
17377         lang_printable_name invocation.
17378         (register_fields): Suppressed unused local variable. Fixed
17379         duplicate_declaration_error invocation.
17380         (method_header): Suppressed unused local variable.
17381         (method_declarator, parser_check_super): Likewise.
17382         (java_complete_class): Suppressed unused local variable. Fixed
17383         fatal error message.
17384         (complete_class_report_errors): Added default: in switch.
17385         (java_check_regular_methods): Fixed lang_printable_name
17386         invocations.
17387         (check_throws_clauses): Likewise.
17388         (java_check_abstract_methods): Suppressed unused local
17389         variable. Fixed lang_printable_name invocation.
17390         (read_import_entry): Added supplemental return statement.
17391         (read_import_dir): Suppressed unused local variables.
17392         (check_pkg_class_access, declare_local_variables): Likewise.
17393         (source_start_java_method): Suppressed unused extern variable
17394         declarations
17395         (expand_start_java_method): Suppressed unused extern and local
17396         variable declarations.
17397         (java_complete_expand_methods): Likewise.
17398         (java_complete_expand_method): Suppressed unused local variables.
17399         (make_qualified_name): Likewise.
17400         (resolve_qualified_expression_name): Added default: in
17401         switch. Fixed lang_printable_name invocation.
17402         (class_instance_creation_expression): Added parenthesis around
17403         expressions.
17404         (patch_method_invocation_stmt): Fixed lang_printable_name and
17405         patch_invoke invocations.
17406         (check_for_static_method_reference): Fixed lang_printable_name
17407         invocation.
17408         (patch_invoke): Suppressed unused arguments and local variables.
17409         (lookup_method_invoke): Suppressed unused local variables.
17410         (qualify_ambiguous_name): Added default: in switch.
17411         (identical_subpath_p): Function removed.
17412         (patch_assignment): Suppressed unused local variables. Suppressed
17413         unnecessary if statement. Fixed lang_printable_name invocations.
17414         (try_builtin_assignconv): Fixed lang_printable_name invocations.
17415         (valid_ref_assignconv_cast_p): Parenthesis around
17416         expression. Suppressed unused local variables.
17417         (build_binop): Suppressed unused local variables. fixed
17418         lang_printable_name invocations.
17419         (string_constant_concatenation): Suppressed unused local
17420         variables.
17421         (patch_unaryop): Fixed lang_printable_name invocation.
17422         (patch_cast): Suppressed unnecessary argument. Fixed
17423         lang_printable_name invocation.
17424         (patch_array_ref): Fixed lang_printable_name invocation.
17425         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
17426         (build_labeled_block): Suppressed unused argument.
17427         (generate_labeled_block): Fixed build_labeled_block invocation.
17428         (build_loop_body): Suppressed unused local variables.
17429         (patch_loop_statement): Likewise.
17430         (patch_exit): Fixed lang_printable_name invocation.
17431         (patch_switch_statement): Likewise.
17432         (case_identity): First argument marked unused.
17433         (patch_try_statement): Fixed lang_printable_name invocations.
17434         (patch_synchronized_statement, patch_throw_statement): Likewise.
17435         (check_thrown_exceptions): Fixed check_thrown_exceptions and
17436         lang_printable_name invocations.
17437         (check_thrown_exceptions_do): Suppressed unused argument.
17438
17439 1998-10-14  Tom Tromey  <tromey@cygnus.com>
17440
17441         * jcf-write.c (write_classfile): Add output class file as target.
17442         * lang-options.h: Added -MD, -MMD, -M, and -MM.
17443         * jcf.h: Added declarations for dependency-tracking functions.
17444         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
17445         * lang.c (lang_decode_option): Recognize -MD and -MMD.
17446         (finish_parse): Call jcf_dependency_write.
17447         (dependency_tracking): New global.
17448         (DEPEND_SET_FILE): New define.
17449         (DEPEND_ENABLE): New define.
17450         (init_parse): Enable dependency tracking if required.
17451         Include "flags.h".
17452         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
17453         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17454         (../gcjh$(exeext)): Likewise.
17455         (jcf-depend.o): New target.
17456         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
17457         (GCJH_SOURCES): Likewise.
17458         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
17459         dep_name argument.
17460         (find_classfile): Added dep_name argument.
17461         (find_class): Compute name of dependency.
17462         (open_in_zip): Call jcf_dependency_add_file.
17463         * gjavah.c (output_file): No longer global.
17464         (usage): Don't mention "gjavah".
17465         (help): Likewise.
17466         (java_no_argument): Likewise.
17467         (version): Likewise.
17468         (main): Recognize and handle -M family of options.
17469         (print_mangled_classname): Return is void.
17470         (process_file): Handle case where output is suppressed.
17471         (HANDLE_END_FIELD): Likewise.
17472         (HANDLE_METHOD): Likewise.
17473         * jcf-depend.c: New file.
17474
17475 1998-10-13  Jeffrey A Law  (law@cygnus.com)
17476
17477         * java-tree.def: Add missing newline at EOF.
17478
17479 1998-10-13  Tom Tromey  <tromey@cygnus.com>
17480
17481         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
17482         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
17483         function.
17484         Include <config.h> and "system.h".
17485         (disassemble_method): Undefine RET to avoid clash with
17486         config/i386/i386.h.
17487
17488 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17489
17490         * decl.c (runtime_exception_type_node, error_exception_type_node):
17491         New global variables.
17492         (init_decl_processing): Initialized.
17493         * expr.c (java_lang_expand_expr): Set caught exception type to
17494         null if catch handler argument doesn't exit.
17495         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
17496         tree codes.
17497         * java-tree.h (runtime_exception_type_node,
17498         error_exception_type_node): Global variables declared.
17499         (DECL_FUNCTION_THROWS): New macro.
17500         (DECL_FUNCTION_BODY): Modified comment.
17501         (DECL_SPECIFIC_COUNT): Likewise.
17502         (struct lang_decl): New field throws_list.
17503         (IS_UNCHECKED_EXPRESSION_P): New macro.
17504         * lex.c (java_lex): Generate location information for THROW_TK.
17505         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
17506         EXCEPTIONS_P): New macros.
17507         (enum jdep_code): New value JDEP_EXCEPTION.
17508         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
17509         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
17510         PATCH_METHOD_RETURN_ERROR): New macros.
17511         (patch_method_invocation_stmt): Added new argument to prototype.
17512         (patch_synchronized_statement, patch_throw_statement,
17513         check_thrown_exceptions, check_thrown_exceptions_do,
17514         purge_unchecked_exceptions, check_throws_clauses): New function
17515         prototypes.
17516         * parse.y Fixed typo in keyword section.
17517         (throw:): Rule tagged <node>.
17518         (THROW_TK): Keyword tagged <operator>.
17519         (method_header:): Last argument to call to method_header passed
17520         from throws: rule.
17521         (throws:, class_type_list:, throw_statement:,
17522         synchronized_statement:, synchronized:): Defined actions.
17523         (method_header): New local variable current. Register exceptions
17524         from throws clause.
17525         (java_complete_tree): Complete and verify exceptions from throws
17526         clause.
17527         (complete_class_report_errors): Error message on exceptions not
17528         found
17529         (java_check_regular_methods): Fixed typo. Shortcut on private
17530         overriding methods. Changed error message on method
17531         redefinition. Check for throws clause compatibility.
17532         (check_throws_clauses): New function.
17533         (java_check_abstract_methods): Use DECL_NAME for wfl or current
17534         method. Changed error message on method redefinition.
17535         (currently_caught_type_list): New static variable.
17536         (java_complete_expand_methods): Purge unchecked exceptions from
17537         throws clause list. Call PUSH_EXCEPTIONS before walk and
17538         POP_EXCEPTIONS after.
17539         (resolve_qualified_expression_name): Pass new argument as NULL to
17540         patch_method_invocation_stmt.
17541         (patch_method_invocation_stmt): New argument ref_decl. Invoke
17542         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
17543         argument list when appropriate. Use new argument if non null to
17544         store selected method decl.
17545         (patch_invoke): Convert if necessary args of builtin types before
17546         forming CALL_EXPR. Argument list no longer reversed here.
17547         (invocation_mode): Treat final methods as static methods.
17548         (java_complete_tree): New cases for THROW_EXPR: and
17549         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
17550         function call.
17551         (complete_function_arguments): No more RECORD_TYPE
17552         conversion. Function parameter nodes no longer saved.
17553         (valid_ref_assignconv_cast_p): Avoid handling null type.
17554         (patch_binop): Fixed null constant reference handling.
17555         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
17556         BUILD_THROW macros.
17557         (patch_try_statement): Fixed comments. Record caught types in
17558         list, push the list, expand try block and pop the list.
17559         (patch_synchronized_statement, patch_throw_statement,
17560         check_thrown_exceptions, check_thrown_exceptions_do,
17561         purge_unchecked_exceptions): New functions.
17562         * typeck.c (lookup_argument_method): Allow WFL in place of method
17563         DECL_NAME during method definition check
17564
17565 1998-10-09  Tom Tromey  <tromey@cygnus.com>
17566
17567         * gjavah.c (decode_signature_piece): New function.
17568         (print_c_decl): Use it.  Added `name_override' argument.
17569         (print_method_info): Use name_override argument to print_c_decl.
17570         (seen_fields): Removed.
17571         (print_field_info): Don't update seen_fields.
17572         (struct method_name): New structure.
17573         (method_name_list): New global.
17574         (print_method_info): Add new method to list of methods.
17575         (name_is_method_p): New function.
17576         (print_field_info): If field name has same name as method, then
17577         change field name.
17578         (process_file): Parse methods before fields.
17579         (field_pass): New global.
17580         (HANDLE_END_FIELD): Take field_pass into account.
17581
17582 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17583
17584         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
17585         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
17586
17587 1998-10-03  Anthony Green  <green@cygnus.com>
17588
17589         * jvspec.c: Fix bug in jvgenmain_spec patch.
17590
17591 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17592
17593         * Makefile.in (lang.o:): Install dependency on java-tree.def.
17594         * decl.c (soft_exceptioninfo_call_node): New global variable.
17595         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
17596         takes extra integer argument. soft_exceptioninfo_call_node
17597         initialized.
17598         * except.c (java_set_exception_lang_code): New function
17599         (method_init_exceptions): Called here.
17600         (prepare_eh_table_type): New function.
17601         (expand_end_java_handler): Called here.
17602         * expr.c (build_java_throw_out_of_bounds_exception): Now features
17603         one argument. Modified generation of call to
17604         soft_badarrayindex_node to use new argument.
17605         (build_java_arrayaccess): Pass faulty index value to
17606         build_java_throw_out_of_bounds_exception.
17607         (generate_name): New function.
17608         (java_lang_expand_expr): New local variables node, current,
17609         has_finally_p. Expand TRY_EXPR node.
17610         (process_jvm_instruction): Replace top of the stack with thrown
17611         object reference when entering exception handler.
17612         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
17613         specific tree codes.
17614         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
17615         global.
17616         (DECL_SPECIFIC_COUNT): New macro.
17617         (prepare_eh_table_type, java_set_exception_lang_code,
17618         generate_name): New function declarations.
17619         (match_java_method): Declaration deleted.
17620         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
17621         macros.
17622         * lex.c (TRY_TK, CATCH_TK): Generate location information.
17623         * parse.h (redefinition_error, refine_accessible_methods_list,
17624         can_cast_to_p): Function declaration removed.
17625         (classitf_redefinition_error, variable_redefinition_error,
17626         parse_jdk1_1_error, find_applicable_accessible_methods_list,
17627         find_most_specific_methods_list, argument_types_convertible,
17628         enter_a_block, valid_builtin_assignconv_identity_widening_p,
17629         valid_cast_to_p, valid_method_invocation_conversion_p,
17630         try_reference_assignconv, add_stmt_to_compound,
17631         build_jump_to_finally, build_tree_list, patch_try_statement,
17632         java_get_catch_block): New function declarations.
17633         * parse.y (string_buffer_type): Global variable deleted.
17634         (group_of_labels, catches, catch_clause, catch_clause_parameter,
17635         finally): Rules tagged <node>.
17636         (TRY_TK, CATCH_TK): Token tagged <operator>.
17637         (class_body_declaration:, class_member_declaration:,
17638         formal_parameter:, explicit_constructor_invocation:,
17639         interface_member_declaration:, constant_declaration:,
17640         primary_no_new_array:, class_instance_creation_expression:,
17641         array_creation_expression:): Issue error on unsuported JDK1.1
17642         features.
17643         (try_statement:, catches:, finally:): Define actions.
17644         (catch_clause_parameter): New rule.
17645         (catch_clause:): Use new rule catch_clause_parameter.
17646         (parse_jdk1_1_error): New function.
17647         (redefinition_error): Renamed classitf_redefinition_error.
17648         (variable_redefinition_error): New function.
17649         (check_class_interface_creation): Call
17650         classitf_redefinition_error.
17651         (java_complete_tree): Added error message on JDEP_TYPE: case.
17652         (complete_class_report_errors): Fixed indentation.
17653         (declare_local_variables): Call variable_redefinition_error.
17654         (source_end_java_method): Call java_set_exception_lang_code and
17655         emit_handlers where appropriate.
17656         (java_method_add_stmt): Call add_stmt_to_block.
17657         (add_stmt_to_block): New function.
17658         (lookup_method_invoke): Fixed outside comment. new local variable
17659         candicates.  Call find_applicable_accessible_methods_list and
17660         find_most_specific_methods_list when searching for a
17661         method. Modified error report to list possible candidates when
17662         applicable.
17663         (find_applicable_accessible_methods_list,
17664         find_most_specific_methods_list, argument_types_convertible): New
17665         function.
17666         (refine_accessible_methods_list): Function deleted.
17667         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
17668         expr (if applicable) before calling patch_array_ref.
17669         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
17670         (enter_block): Fixed comment.
17671         (enter_a_block): New function.
17672         (patch_assignment): Reorganized. Call try_reference_assignconv for
17673         references. Call valid_cast_to_p instead of can_cast_to_p.
17674         (try_reference_assignconv,
17675         valid_builtin_assignconv_identity_widening_p): New functions.
17676         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
17677         (valid_cast_to_p, valid_method_invocation_conversion_p): New
17678         functions.
17679         (build_string_concatenation): Don't resolve StringBuffer.
17680         (patch_cast): Fixed inverted arguments.
17681         (patch_array_ref): Code to save array expr deleted. Call
17682         valid_cast_to_p instead of can_cast_to_p.
17683         (generate_labeled_block): Call generate_name.
17684         (build_jump_to_finally, build_try_statement, java_get_catch_block,
17685         patch_try_statement): New functions.
17686         * typeck.c (match_java_method): Function deleted.
17687
17688 1998-10-02  Anthony Green  <green@cygnus.com>
17689
17690         * jvspec.c: jvgenmain_spec uses different temporary file names.
17691
17692 1998-10-02  Anthony Green  <green@cygnus.com>
17693
17694         * jvspec.c (lang_specific_driver): Fail if user specifies
17695         --main= when not linking.
17696
17697 1998-09-28  Tom Tromey  <tromey@cygnus.com>
17698
17699         * class.c (make_class_data): Push value for `thread' field.
17700         * decl.c (init_decl_processing): Added `thread' field to class.
17701
17702         * class.c (add_field): Always make static fields externally
17703         visible.
17704
17705 1998-09-26  Anthony Green  <green@cygnus.com>
17706
17707         * expr.c (build_java_athrow,
17708         build_java_throw_out_of_bounds_exception, expand_invoke,
17709         build_newarray, expand_java_multianewarray, build_java_monitor):
17710         Update comments to reflect _Jv_* function names.
17711
17712 1998-09-25  Per Bothner  <bothner@cygnus.com>
17713
17714         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
17715         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
17716         * parse.y (expand_start_java_method):  Likewise.
17717
17718 1998-09-24  Per Bothner  <bothner@cygnus.com>
17719
17720         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
17721
17722         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
17723         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
17724         * expr.c:  Remove no-longer-needed calls to promote_type.
17725         * decl.c (give_name_to_locals):  Liekwise.
17726         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
17727         * parse.y:  Add/remove promote_type calls as appropriate.
17728         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
17729         (parse_signature_string):  Likewise.
17730         (build_java_array_type):  Fix for now signature convenions.
17731
17732         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
17733
17734 1998-09-23  Tom Tromey  <tromey@cygnus.com>
17735
17736         * class.c (init_class_processing): libjava function renamed to
17737         _Jv_RegisterClass.
17738
17739 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17740
17741         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
17742         * java-tree.def: Fixed DEFTREECODE third argument.
17743         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
17744         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
17745         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
17746         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17747         JAVA_THIS_EXPR): Now replaced by tree code definitions.
17748         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
17749         * lang.c (java_tree_code_type, java_tree_code_length,
17750         java_tree_code_name): New arrays.
17751         (lang_init): Append Java tree node definitions to Gcc ones.
17752         * lex.c (expression_obstack): Declared as extern when JC1_LITE
17753         defined.
17754         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
17755         wfl_to_string.
17756         (java_lex): Allow declaration of empty string constants. Retain
17757         location information on CASE_TK and DEFAULT_TK.
17758         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
17759         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
17760         Modified to be more robust.
17761         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
17762         (build_new_invocation, try_builtin_assignconv,
17763         patch_switch_statement, string_constant_concatenation,
17764         build_string_concatenation, patch_string_cst, patch_string,
17765         java_expand_switch): New function declarations.
17766         * parse.y: Rules related to switch and EH tagged <node>.
17767         (label_id): Set to NULL_TREE
17768         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
17769         tree nodes.
17770         (this_or_super:): Fixed indentation.
17771         (statement:, statement_nsi:, statement_without_trailing_substatement:,
17772         statement_expression:): Removed call to RULE on all sub-rules.
17773         (switch_expression:, switch_labels:): New rules.
17774         (switch_statement:, switch_block:, switch_block_statement_groups:,
17775         switch_block_statement_group:, switch_labels:, switch_label:):
17776         Defined actions.
17777         (throw_statement:, synchronized_statement:, try_statement:):
17778         Defined temporary actions.
17779         (class_instance_creation_expression:): Call
17780         build_new_invocation. Fixed indentation.
17781         (field_access): Fixed indentation.
17782         (method_invocation): Likewise.
17783         (make_qualified_primary): Use THIS_EXPR.
17784         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
17785         resolving from SUPER, set *type_found.
17786         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
17787         (java_complete_tree): Removed unused local variable `location'. Case
17788         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
17789         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
17790         on MODIFY_EXPR: and all binary operator tree code cases. Removed
17791         STRING_CST: case. default: checks for patchable strings.
17792         (complete_function_arguments): Transform string constant or
17793         crafted StringBuffer if necessary.
17794         (build_method_invocation): Fixed comments.
17795         (build_new_invocation): New function.
17796         (patch_assignment): Call try_builtin_assignconv to figure a valid
17797         assignment conversion between builtin types.
17798         (try_builtin_assignconv): New function.
17799         (build_binop): Use URSHIFT_EXPR directly to call build.
17800         (operator_string): Use UNARY_PLUS_EXPR.
17801         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
17802         operator.
17803         (do_merge_string_cste, merge_string_cste,
17804         string_constant_concatenation, build_string_concatenation,
17805         patch_string, patch_string_cst): New function.
17806         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
17807         (patch_unaryop): Likewise. New test of valid ++/-- operands.
17808         (build_newarray_node): Use NEW_ARRAY_EXPR.
17809         (build_this): Use THIS_EXPR.
17810         (build_return): Enable debug information on return statement.
17811         (build_if_else_statement): Likewise.
17812         (complete_labeled_statement): Fixed related comment.
17813         (build_loop_body): Fixed comment.
17814         (build_bc_statement): Enable debug information on break/continue
17815         statements.
17816         (patch_bc_statement): Fixed typos. Handle SWITCH statement
17817         context.
17818         (patch_switch_statement, case_identity, java_expand_switch): New
17819         functions.
17820
17821 1998-09-21  Per Bothner  <bothner@cygnus.com>
17822
17823         * buffer.h (BUFFER_INIT):  New macro.
17824         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
17825         Pass (struct jcf_partial *state) to most functions.
17826         (jcf_block, jcf_relocation):  New types.
17827         Support labels, branches, conditionals, loops.
17828
17829 1998-09-21  Tom Tromey  <tromey@cygnus.com>
17830
17831         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
17832
17833 1998-09-21  Per Bothner  <bothner@cygnus.com>
17834
17835         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
17836         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
17837         not integer_type_node (INT_TYPE_SIZ bits).
17838
17839         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
17840
17841         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
17842         * jcf-dump.c (print_exception_table):  New function.
17843         (disassemble_method):  Better handling of wide instructions.
17844         Make more robust for bad input.
17845
17846 1998-09-30  Jeffrey A Law  (law@cygnus.com)
17847
17848         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
17849         FreeBSD.
17850
17851 1998-09-17  Jeffrey A Law  (law@cygnus.com)
17852
17853         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
17854
17855 1998-09-17  Tom Tromey  <tromey@cygnus.com>
17856
17857         * Makefile.in ($(PARSE_H)): Removed target.
17858
17859 1998-09-17  Jeffrey A Law  (law@cygnus.com)
17860
17861         * Makefile.in (JAVA_OBJS): Add memmove.o
17862         (memmove.o): New target & rules.
17863
17864 1998-09-15  Tom Tromey  <tromey@cygnus.com>
17865
17866         * expr.c (expand_invoke): Don't generate a call to the class init
17867         code.
17868
17869 1998-09-14  Jeffrey A Law  (law@cygnus.com)
17870
17871         * Makefile.in: Add many missing dependencies.
17872         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
17873         as appropriate.
17874         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
17875         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
17876
17877 1998-09-11  Per Bothner  <bothner@cygnus.com>
17878
17879         * decl.c (complete_start_java_method):  If method is static (and
17880         not private) call _Jv_InitClass.
17881         * expr.c (expand_invoke):  Don't call build_class_init.
17882
17883         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
17884
17885 1998-09-10  Jeffrey A Law  (law@cygnus.com)
17886
17887         * Make-lang.in (GCJ): Define before using.
17888
17889 1998-09-09  Jeffrey A Law  (law@cygnus.com)
17890
17891         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
17892         losing due to namespace pollution in GNU getopt.h
17893
17894 1998-09-09  Tom Tromey  <tromey@cygnus.com>
17895
17896         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
17897         (java.all.cross): Likewise.
17898         (java.rest.encap): Likewise.
17899
17900 1998-09-08  Jeffrey A Law  (law@cygnus.com)
17901
17902         * gjavah.c (print_class_decls): Fix thinko in arglist
17903         * jcv-io.c (find_classfile): Similarly.
17904
17905 1998-09-07  Jeffrey A Law  (law@cygnus.com)
17906
17907         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
17908
17909 1998-09-05  Tom Tromey  <tromey@cygnus.com>
17910
17911         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
17912         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
17913         * Makefile.in (PARSE_C): New macro.
17914         (PARSE_H): Likewise.
17915         (PARSE_SCAN_C): Likewise.
17916         ($(PARSE_C)): Target renamed from parse.c.
17917         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
17918         (clean): Remove parse-scan.c as well.
17919         (parse.o): Depend on $(PARSE_C).
17920
17921 1998-09-05  Anthony Green  <green@cygnus.com>
17922
17923         * README, license.terms: Removed.
17924
17925         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
17926         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
17927         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
17928         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
17929         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
17930         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
17931         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
17932         and Java trademark attribution.
17933
17934 1998-09-04  Tom Tromey  <tromey@cygnus.com>
17935
17936         * Makefile.in: Use gcjh, not gjavah.
17937         * config-lang.in (stagestuff): Use gcjh, not gjavah.
17938         * Make-lang.in: Changed gjavah to gcjh everywhere.
17939
17940 1998-09-03  Per Bothner  <bothner@cygnus.com>
17941
17942         * gjavah.c:  Support new -prepend -add -append flags.
17943         (print_method_info):  Method is not virtual if class is final.
17944
17945 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17946
17947         * jv-scan.c: Fixed copyright assignment.
17948         * keyword.gperf: Likewise.
17949         * keyword.h: Likewise.
17950         * lex.c: Fixed copyright assignment.
17951         (java_lex): Push unicode back when parsing '<'.
17952         * lex.h: Fixed copyright assignment.
17953         * parse-scan.y: Likewise.
17954         * parse.h: Fixed copyright assignment.
17955         (build_debugable_stmt, complete_for_loop): New function prototypes.
17956         * parse.y: Fixed copyright assignment.
17957         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
17958         size_zero_node when completing a loop with no exit condition.
17959         (for_statement_nsi:): Define action.
17960         (for_init:, for_update:): Return size_zero_node when empty.
17961         (declare_local_variables): Call build_debugable_stmt.
17962         (build_debugable_stmt): New function.
17963         (build_loop_body): Build debugable statement around loop
17964         condition part.
17965         (complete_loop_body): Take into account the debugable statement
17966         around the EXIT_EXPR.
17967         (complete_loop_body): New function.
17968         (patch_exit_expr): Fixed condition inversion.
17969
17970 1998-09-02  Tom Tromey  <tromey@cygnus.com>
17971
17972         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
17973         name of thread define.
17974         * jvspec.c (THREAD_NAME): New macro.
17975         (GCLIB): Likewise.
17976         (THREADLIB): Likewise.
17977         (lang_specific_driver): Recognize attempt to link with thread
17978         library or gc library.  Recognize -ljava on command line so it
17979         isn't linked against more than once.
17980
17981 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17982
17983         * parse-scan.y (report_main_declaration): Name of the class
17984         containing `main' can be a qualified name.
17985
17986 1998-08-31  Tom Tromey  <tromey@cygnus.com>
17987
17988         * config-lang.in: Changed gjavac to gjc everywhere.
17989         * Make-lang.in: Changed gjavac to gjc everywhere.
17990
17991 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17992
17993         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
17994         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
17995         and install the files.
17996         * Makefile.in (JAVA_OBJS_LITE): New variable.
17997         (compiler:): Now include jv-scan as a dependency.
17998         (../jv-scan$(exeext), parse-scan.c): New targets.
17999         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18000         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18001         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18002         check for errors even if parse_only.
18003         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18004         defined.
18005         (yylex): New function. Uses java_lex body.
18006         (java_lex): Removed commented out statement. Remove local variable
18007         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18008         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18009         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18010         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18011         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18012         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18013         where appropriate.
18014         (java_lex_error): Empty if JC1_LITE is defined.
18015         (java_get_line_col): Return 0 if JC1_LITE is defined.
18016         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18017         SET_MODIFIER_CTX): Moved into the section containing the macros
18018         conditionally defined by JC1_LITE.
18019         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18020         argument if JC1_LITE is defined.
18021         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18022         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18023         is defined.
18024         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18025         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18026         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18027         to different values according to JC1_LITE.
18028         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18029         declared if JC1_LITE set.
18030         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18031         defined if JC1_LITE not set.
18032         (struct parser_ctx): Reorganized and skip the jc1 front end part
18033         if JC1_LITE set.
18034         (java_layout_classes): New function definition.
18035         (java_push_parser_context, java_init_lex, yyparse, yylex,
18036         yyerror): Prototype always declared. All other static function
18037         prototypes declared only if JC1_LITE is not set.
18038         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18039         declared in parse.h.
18040         (java_layout_classes): New function.
18041         (java_complete_expand_methods): No longer layout the class here.
18042         * parse-scan.y: New file.
18043         * jv-scan.c: New file.
18044
18045 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18046
18047         * gjavah.c (main): Handle -friend option.
18048         (friend_specs): New global.
18049         (generate_access): Handle friend_specs.
18050         (process_file): Likewise.
18051         (MAX_FRIENDS): New macro.
18052         (friend_count): New global.
18053         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18054         Changed all callers.
18055
18056 1998-08-24  Per Bothner  <bothner@cygnus.com>
18057
18058         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18059         (main):  Handle processing all the entries of a named .zip archive.
18060         * jcf-io.c (jcf_trim_old_input):  New function.
18061         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18062
18063 1998-08-24  Per Bothner  <bothner@cygnus.com>
18064
18065         * lang.c (flag_assume_compiled):  Make default be on.
18066
18067 1998-08-21  Per Bothner  <bothner@cygnus.com>
18068
18069         * jcf-dump.c:  Add bunches of flags to control output more.
18070         (process_class):  New function;  support printing more than one class.
18071         (main): Support new --print-main and --javap flags.
18072         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18073         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18074
18075 1998-08-20  Per Bothner  <bothner@cygnus.com>
18076
18077         Change mangling of dispatch table to match C++ vtable (w/thunks).
18078         * class.c (build_dtable_decl), java-tree.h:  New function.
18079         (make_class_data):  Call it.
18080         * decl.c (init_decl_processing):  Likewise.
18081
18082 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18083
18084         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18085         soft_anewarray; adjust args passed.
18086         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18087         match _Jv_NewObjectArray.
18088
18089 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18090
18091         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18092         * expr.c (loopup_label): Call create_label_decl.
18093         (create_label_decl): New function.
18094         (java_lang_expand_expr): Call expand_start_bindings with argument
18095         set to zero.
18096         * java-tree.h Added space after PROTO in function declarations
18097         when necessary.
18098         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18099         (create_label_decl, push_labeled_block): New function
18100         declarations.
18101         * lex.c (label_id): Initialize.
18102         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18103         switch.
18104         * parse.h Added space after PROTO in function declarations when
18105         necessary.
18106         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18107         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18108         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18109         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18110         macros.
18111         (struct parser_ctxt): New fields current_loop,
18112         current_labeled_block.
18113         (build_if_else_statement, patch_if_else_statement,
18114         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18115         generate_labeled_block, complete_labeled_statement,
18116         build_bc_statement, patch_bc_statement, patch_loop_statement,
18117         build_new_loop, build_loop_body, complete_loop_body): New function
18118         declarations.
18119         * parse.y (java_warning_count): New global variable.
18120         (label_id): New static variable.
18121         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18122         (block:): Return size_zero_node when block is empty.
18123         (empty_statement:): Return size_zero_node.
18124         (statement:): Implement supplemental action when for_statement: is
18125         reduced.
18126         (label_decl:): New rule.
18127         (labeled_statement:): Rewritten using label_decl. Actions
18128         implemented.
18129         (labeled_statement_nsi:): Likewise.
18130         (if_then_statement): Actions implemented.
18131         (while_expression): New rule.
18132         (while_statement:): Rewritten using while_expression. Actions
18133         implemented.
18134         (while_statement_nsi:): Likewise.
18135         (do_statement_begin:): New rule.
18136         (do_statement:): Rewritten using do_statement_begin. Actions
18137         implemented.
18138         (for_statement:): Rewritten using for_begin. Actions implemented.
18139         (for_statement_nsi:): Likewise.
18140         (for_header:, for_begin:): New rules.
18141         (for_init:): Actions implemented.
18142         (statement_expression_list:, break_statement:,
18143         continue_statement:): Likewise.
18144         (yyerror): Count number of issued warning(s).
18145         (java_report_errors): Report error(s) and/or warning(s).
18146         (java_complete_class): Use build_java_argument_signature to
18147         recompute completed method signature.
18148         (java_check_regular_methods): New locals method_wfl and aflags.
18149         Use method_wfl instead of lookup_cl during error reports. Fixed
18150         indentation and modified some error messages. Use
18151         lang_printable_name in method instead of the DECL_NAME. New code
18152         to issue warnings on methods not overriding corresponding methods
18153         private to a different package.
18154         (java_method_add_stmt): Call add_stmt_to_compound.
18155         (add_stmt_to_compound): New function.
18156         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18157         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18158         (build_if_else_statement, patch_if_else_statement,
18159         build_labeled_block, generate_labeled_block,
18160         complete_labeled_statement, build_new_loop, build_loop_body,
18161         complete_loop_body, patch_loop_statement, build_bc_statement,
18162         patch_bc_statement, patch_exit_expr): New functions.
18163         * typeck.c (build_java_signature): Build argument signature before
18164         enclosing it in between parenthesis.
18165
18166 1998-08-17  Warren Levy  <warrenl@cygnus.com>
18167
18168         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18169         (JAVA_OBJS): Added reminder comment
18170
18171 1998-08-13  Nick Clifton  <nickc@cygnus.com>
18172
18173         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18174         be interpreted as a long long.
18175
18176 1998-08-13  Warren Levy  <warrenl@cygnus.com>
18177
18178         * decl.c (init_decl_processing): Use _Jv_InitClass, not
18179         soft_initialise_class.  Use _Jv_NewMultiArray, not
18180         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
18181         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
18182         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
18183         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18184
18185 1998-08-12  Per Bothner  <bothner@cygnus.com>
18186
18187         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18188         length_identifier_node):  New global tree node constants.
18189         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
18190         Replace uses by super_identifier_node etc.
18191         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
18192
18193         * parse.y (resolve_field_access):  Don't special-case ".length" if
18194         flag_emit_class_files.
18195         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
18196         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
18197         and ARRAY.length.
18198
18199 1998-08-11  Per Bothner  <bothner@cygnus.com>
18200
18201         * decl.c (init_decl_processing): Remove unused method_type_node fields.
18202         * class.c (make_method_value):  Remove init for removed fields.
18203
18204         * class.c (layout_class):  Use build_java_argument_signature.
18205         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
18206
18207         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
18208         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
18209         (build_java_signature):  Don't use push_java_argument_signature.
18210
18211         * typeck.c (lookup_argument_method):  New function.
18212         * parse.y (java_check_regular_methods):  Use lookup_argument_method
18213         instead of lookup_java_method2 followed by lookup_java_method.
18214
18215         * parse.y (check_method_redefinition):  Minor optimization.
18216
18217         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
18218         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18219
18220 1998-08-10  Tom Tromey  <tromey@cygnus.com>
18221
18222         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18223         c-pragma.o.
18224
18225         * gjavah.c (java_float_finite): Use K&R-style definition.
18226         (java_double_finite): Likewise.
18227         (generate_access): Now returns void.  Changed all callers.
18228         (last_access_generated): Removed.
18229         (process_file): Only make a single pass over the .class file.
18230
18231 1998-07-29  Per Bothner  <bothner@cygnus.com>
18232
18233         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
18234         for compatibility for G++ (with -fvtable-thunks).
18235         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
18236
18237         * gjavah.c (process_file):  Use public inheritance for super-class.
18238
18239 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18240
18241         * lex.c (java_init_lex): Initialize ctxp->package.
18242         * parse.h (struct parser_ctxt): package and package_len replaced
18243         by tree package, an identifier node. Field method_decl_list is
18244         gone. Fixed comments.
18245         (lookup_field_wrapper, merge_qualified_name, not_accessible,
18246         class_in_current_package): New function prototypes.
18247         * parse.y (array_type:): Set class loaded flag on primitive type
18248         arrays.
18249         (package_declaration:): Assign ctxp->package to the
18250         identifier node.
18251         (method_invocation:): Handle invocation of method qualified by
18252         `super'.
18253         (single_type_import_declaration:): Removed ambiguity check.
18254         (java_pop_parser_context): New local variable `next'. Reset and
18255         set IMPORT_CLASSFILE_NAME flags on current and previous import
18256         list.
18257         (java_accstring_lookup): Use new local macro COPY_RETURN.
18258         (lookup_field_wrapper): New function.
18259         (parser_qualified_classname): Use merge_qualified_name.
18260         (parser_check_super_interface): Broaden error message.
18261         (do_resolve_class): Check for qualified class name in the current
18262         compilation unit if appropriate.
18263         (process_imports): Check for already defined classes.
18264         (check_pkg_class_access): Got rid of call to
18265         get_access_flags_from_decl.
18266         (java_complete_expand_methods): Call safe_layout_class based on
18267         the current class size.
18268         (make_qualified_primary): Build a WFL qualification on primary if
18269         none exists.
18270         (merge_qualified_name): New function.
18271         (make_qualified_name): Use merge_qualified_name.
18272         (resolve_expression_name): Use safe_lookup_field.
18273         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18274         (resolve_qualified_expression_name): Likewise. Check on resolved
18275         element accessibility.
18276         (not_accessible_p, class_in_current_package): New functions.
18277         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18278         (patch_method_invocation_stmt): Merged common pieces. Check
18279         accessibility of invoked method.
18280         (check_for_static_method_reference): Add returned type in error
18281         message.
18282         (invocation_mode): Get rid of bogus check on PRIVATE methods.
18283         (refine_accessible_methods_list): Merged two conditions in test.
18284         (java_complete_class): Sanity check on stabilize_ref gone.
18285         * zextract.c (read_zip_archive): Cast lseek second argument to long.
18286
18287 1998-07-28  Per Bothner  <bothner@cygnus.com>
18288
18289         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
18290
18291 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18292
18293         * gjavah.c (F_NAN): Removed.
18294         (F_NAN_MASK): New macro.
18295         (F_POSITIVE_INFINITY): Removed.
18296         (F_NEGATIVE_INFINITY): Likewise.
18297         (java_float_finite): Rewrote.
18298         (D_NAN_MASK): Renamed.
18299         (java_double_finite): Rewrote.
18300         (D_POSITIVE_INFINITY): Removed.
18301         (D_NEGATIVE_INFINITY): Likewise.
18302
18303         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18304         If verbose, print underlying representation of value in hex.
18305
18306 1998-07-24  Per Bothner  <bothner@cygnus.com>
18307
18308         * buffer.h, buffer.c:  New files.
18309         * Makefile.in (JAVA_OBJS):  Add buffer.o.
18310
18311         Support locals variables and writing their debug entries to .class.
18312         * jcf-write.c:  Simplify some by user new buffer type.
18313         (vode_buffer_grow):  Removed.
18314         (struct localvar_info):  New type.
18315         (localsvars, localvartable):  New buffers.
18316         (localvar_alloc, localvar_free):  New functions.
18317         (generate_bytecode_insns):  Handle local variables.
18318         (generate_classfile):  Write LocalVariableTable attribute.
18319
18320 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18321
18322         * jcf-io.c (open_in_zip): Check the zipfile magic number.
18323         * zipfile.h (ZIPMAGIC): New macro.
18324
18325 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18326
18327         * Makefile.in (gjavah.o): Updated dependencies.
18328         (jcf-dump.o): Likewise.
18329         (all.indirect): Use ../gjavah.
18330         (../gjavah$(exeext)): Likewise.
18331         (clean): Don't remove gjavah.
18332         (clean): Remove parse.c, not java/parse.c.
18333         * Make-lang.in (java): Added gjavah.
18334         (gjavah$(exeext)): New target.
18335         (GJAVAH_SOURCES): New macro.
18336         (java.all.build): Added gjavah.
18337         (java.all.cross): Likewise.
18338         (java.rest.encap): Likewise.
18339         * config-lang.in (compilers, stagestuff): Added gjavah.
18340
18341 1998-07-23  Tom Tromey  <tromey@cygnus.com>
18342
18343         * gjavah.c (java_float_finite): New function.
18344         (java_double_finite): Likewise.
18345         (F_POSITIVE_INFINITY): New macro.
18346         (F_NEGATIVE_INFINITY): Likewise.
18347         (F_NAN): Likewise.
18348         (D_POSITIVE_INFINITY): Likewise.
18349         (D_NEGATIVE_INFINITY): Likewise.
18350         (D_NAN): Likewise.
18351         (print_field_info): Use java_float_finite and java_double_finite.
18352
18353 1998-07-23  Per Bothner  <bothner@cygnus.com>
18354
18355         * parse.y (method_header):  Name "this" implicit argument.
18356
18357 1998-07-22  Per Bothner  <bothner@cygnus.com>
18358
18359         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
18360         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
18361         (put_linenumber):  New function.
18362         (generate_bytecode_insns, generate_classfile):  Write line numbers.
18363
18364 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18365
18366         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
18367         (lookup_name, build_known_method_ref, build_class_init,
18368         build_invokevirtual, invoke_build_dtable, match_java_method,
18369         build_field_ref, pushdecl_force_head, build_java_binop,
18370         binary_numeric_promotion, build_decl_no_layout,
18371         build_java_arrayaccess, build_newarray, build_anewarray,
18372         build_java_array_length_access, build_java_arraynull_check): New
18373         extern function prototypes.
18374         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18375         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
18376         java-tree.h.
18377         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
18378         to NULL
18379         * jcf.h (jcf_out_of_synch): New extern function prototype.
18380         * parse.h: Static/global function implemented in parse.y
18381         prototyped and declarations moved at the end of the file.
18382         (DECL_P): Check that the argument isn't null.
18383         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18384         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
18385         (QUAL_DECL_TYPE): New macro.
18386         (PARAMS): Macro definition removed.
18387         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
18388         (return_statement:): Call build_return.
18389         (field_access:): Call make_qualified_primary in sub rule.
18390         (method_invocation:): Build method invocation and call
18391         make_qualified_primary when processing primaries.
18392         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
18393         get_type_from_signature.
18394         (java_check_regular_method): Extra integer 0 argument when calling
18395         lookup_java_method2.
18396         (lookup_java_interface_method2): Extra method DECL argument when
18397         calling lookup_java_interface_method2.
18398         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
18399         COMPOUND_EXPR node.
18400         (java_complete_expand_method): Layout current class iff not
18401         already done. Don't process interface's methods.
18402         (java_complete_expand_method): Use super class only if it
18403         exists. Use current class otherwise.
18404         (make_qualified_primary): New function.
18405         (resolve_expression_name): Process qualified expression or
18406         expression from primary the same way.
18407         (resolve_expression_name): Two last arguments to
18408         resolve_field_access are now NULL_TREEs.
18409         (resolve_field_access): New variable is_static. Local field must
18410         be DECLs. is_static computed on field DECLs only. Append code in
18411         where_found to the field access if necessary. Use QUAL_DECL_TYPE
18412         to initialize field_type.
18413         (resolve_qualified_expression_name): New local variable,
18414         previous_call_static and is_static. Handle primaries with function
18415         calls, casts, array references and `this'. `super' now handled as
18416         `(super_class)this'. Use is_static to clarify boolean expressions.
18417         Added code to handle case where a proper handle is required to
18418         access a field. Use QUAL_DECL_TYPE where applicable.
18419         (maybe_access_field): New function.
18420         (patch_method_invocation_stmt): New arguments primary, where,
18421         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
18422         deleted. Use `where' as a type to search from if specified. Check
18423         for static method reference where forbidden. Append primary or
18424         current_this to the argument list if not calling constructor nor
18425         static methods.
18426         (check_for_static_method_reference): New function.
18427         (patch_invoke): Layout the class on which new is done if
18428         necessary.
18429         (lookup_method_invoke): Changed format to report errors on
18430         methods.
18431         (qualify_ambiguous_name): New local variable this_found. Now
18432         handle things from primaries. Method call are considered
18433         expression names.
18434         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
18435         changed into NULLs.
18436         (not_initialized_as_it_should_p): Comply with the new DECL_P.
18437         (java_complete_tree): New case fo RETURN_EXPR. Process function
18438         call arguments in separate function.
18439         (complete_function_arguments): New function.
18440         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
18441         anymore.
18442         (patch_assignment): Take the return function slot into account as
18443         a RHS. Distinguish assignment from a return.
18444         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
18445         when checking methods in interfaces.
18446         (resolve_type_during_patch): NULL argument to unresolve_type_p
18447         instead of NULL_TREE.
18448         (patch_newarray): Fixed typo in comment.
18449         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
18450         (build_return, patch_return): New functions.
18451         * typeck.c (lookup_java_constructor): Fixed typo in comment.
18452
18453 1998-07-21  Per Bothner  <bothner@cygnus.com>
18454
18455         * constants.c (find_name_and_type_constant, find_fieldref_index,
18456         find_methodref_index):  New methods.
18457         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
18458         just return given method.  Also, rename to build_known_method_ref.
18459         (expand_invoke):  Rename call to build_invoke_non_interface.
18460         * java-tree.h, parse.h:  Update prototype.
18461         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
18462         (such as expand_expr_stmt) if flag_emit_class_files.
18463         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
18464         STACK_TARGET, IGNORE_TARGET):  New macros.
18465         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
18466         (generate_bytecode_insn):  New function to generate method's bytecode.
18467         (generate_classfile):  Node generate Code attribute for a method.
18468         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
18469         push_long_const, field_op, adjust_typed_op, maybe_wide):
18470         New functions used by generate_bytecode_insn.
18471
18472         * typeck.c (signature_include_return):  Remove variable.
18473         (push_java_argument_signature, build_java_argument_signature):  New.
18474         (build_java_signature):  Use push_java_argument_signature.
18475         * parse.y:  Use build_java_argument_signature instead of fiddling
18476         with signature_include_return.
18477
18478 1998-07-17  Tom Tromey  <tromey@cygnus.com>
18479
18480         * gjavah.c (print_c_decl): Always generate JArray<>* for array
18481         types.
18482
18483         * Makefile.in (all.indirect): Added gjavah$(exeext).
18484         (gjavah$(exeext)): Added $(exeext).
18485         (clean): Likewise.
18486
18487 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18488
18489         * class.c (layout_class): Call to java_layout_parsed_class replace
18490         by safe_layout_class.
18491         * expr.c (build_java_array_length_access): Removed static storage
18492         class in the function definition.
18493         (build_java_arraynull_check): Likewise.
18494         Also fixed typos in two comments.
18495         * lex.c (java_init_lex): Initialize static global kw_length.
18496         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
18497         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
18498         java_lex_error.
18499         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
18500         * parse.h (resolve_no_layout): New static function declaration.
18501         (get_identifier_in_static): Declaration removed.
18502         (java_layout_parsed_class): Function name declaration changed to
18503         safe_layout_class.
18504         (build_newarray_node, patch_newarray, resolve_type_during_patch,
18505         not_initialized_as_it_should_p, build_this): New static function
18506         declarations.
18507         (pushdecl_force_head, build_java_binop, int_fits_type_p,
18508         binary_numeric_promotion, stabilize_reference,
18509         build_decl_no_layout, build_java_arrayaccess): Extern function
18510         declarations moved into their own section.
18511         (build_newarray, build_anewarray, build_java_array_length_access,
18512         build_java_arraynull_check): New extern function declarations.
18513         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
18514         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
18515         fake tree codes.
18516         (CALL_CONSTRUCTOR_P): New macro.
18517         * parse.y (kw_length): New static global tree node.
18518         (return_statement): Tagged <node>.
18519         (RETURN_TK): Tagged <operator>.
18520         (variable_declarator_id:): Build variable declaration with an
18521         empty initialization value if a syntax error was found in the
18522         initialization part of the variable declaration.
18523         (statement_without_trailing_substatement:): return_statement: now
18524         uses the default rule.
18525         (return_statement:): Temporarily fixed to return NULL_TREE.
18526         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
18527         (class_instance_creation_expression:): Class creation rules now
18528         call build_method_invocation upon reduction.
18529         (array_creation_expression:): Rules call build_newarray_node upon
18530         reduction.
18531         (dim_exprs:): Build a list of dimension expressions.
18532         (dim_expr:): Store location of the OSB_TK in the dimension
18533         expression node.
18534         (method_invocation:): Added a new error rule.
18535         (build_unresolved_array_type): WFL argument may also be an array
18536         on a primitive type. Name of the argument changed to reflect this.
18537         (method_declarator): Insert argument type at the beginning of the
18538         argument type list and later reverse the list.
18539         (unresolved_type_p): Argument 'returned' may be optionally
18540         NULL_TREE.
18541         (java_layout_class_from_source): Function renamed
18542         safe_layout_class.
18543         (resolve_and_layout): Now call resolve_no_layout and
18544         safe_layout_class.
18545         (resolve_no_layout): New function.
18546         (purify_type_name): New function.
18547         (complete_class_report_errors): Call purify_type_name during error
18548         report on a type not found.
18549         (process_imports): error_found local variable doesn't need to be
18550         initialized to zero.
18551         (declare_local_variables): New local type_wfl. Fixed typo in error
18552         message. type_wfl assigned to unresolved type and used to register
18553         incomplete type. Build a WFL around the variable initialization
18554         statement so that debug info can be generated on it.
18555         (source_start_java_method): Reverse argument list after they've
18556         been processed.
18557         (current_this): New static global variable.
18558         (java_complete_expand_methods): Set current_this when appropriate.
18559         (resolve_expression_name): Build correct static and non static
18560         field access bearing a simple name.
18561         (resolve_field_access): Resolve the length field of arrays. Handle
18562         f.m() cases.
18563         (patch_method_invocation_stmt): Set the type of the method
18564         invocation to error_mark_node. This value is later overridden by a
18565         valid type, if any. Don't handle qualified constructor invocation
18566         as qualified method invocation. Call lookup_method_invoke with its
18567         new flag. It's no longer necessary to access the selected method
18568         as the value of a tree list. Handle constructor invocation.
18569         (patch_invoke): Reverse argument list when invoking non interface
18570         methods. Insert call to new as the first argument of the
18571         constructor.
18572         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
18573         defined within a final class. Return INVOKE_STATIC if the invoked
18574         method is a constructor.
18575         (lookup_method_invoke): New lc argument is a flag to indicate a
18576         constructor lookup. Now handle constructor lookup. Choose the most
18577         specific method in case several were matching the invocation
18578         requirements. Return a method decl instead of a tree list featuring
18579         one single method decl element.
18580         (refine_accessible_methods_list): New lc flag argument to
18581         indicate that a constructor is being looked up.
18582         (not_initialized_as_it_should_p): New function.
18583         (java_complete_tree): Now process fake tree codes
18584         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
18585         save_expr on resolved function call arguments. Case on
18586         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
18587         (patch_assignment): LHS can be a field access expression. When
18588         dealing with reference, lhs_type is the promoted type of the
18589         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
18590         applicable.
18591         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18592         (patch_binop): Use not_initialized_as_it_should_p where
18593         applicable.
18594         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18595         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
18596         where applicable.
18597         (resolve_type_during_patch): New function.
18598         (patch_cast): Call resolve_type_during_patch to resolve type and
18599         report error accordingly.
18600         (patch_array_ref): Use not_initialized_as_it_should_p where
18601         applicable. Array base expression is saved before being
18602         used. Promote the type of an array elements if it contains non
18603         builtin types.
18604         (build_newarray_node, patch_newarray, build_this): New functions.
18605
18606 1998-07-16  Tom Tromey  <tromey@cygnus.com>
18607
18608         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
18609         increment it in `for' statement.
18610         (print_field_info): If number is inf or nan, don't print it.
18611         (print_method_info): If method name is `delete', just ignore it.
18612         (print_c_decl): Special-case jstringArray.
18613
18614         * gjavah.c (help): New function.
18615         (no_argument): New function.
18616         (usage): Changed text.
18617         (main): Rewrote argument handling.  Now handles -v, --help,
18618         --version.
18619         (version): New function.
18620         (found_error): New global.
18621         (main): Return found_error.
18622         (generate_access): Set found_error.
18623         (print_c_decl): Likewise.
18624
18625 1998-07-15  Tom Tromey  <tromey@cygnus.com>
18626
18627         * gjavah.c (print_c_decl): Don't print "," when examining field.
18628         Skip type name when looking at "[L" types.
18629         (process_file): Now static.
18630         (generate_access): Now returns int.
18631         (last_access_generated): New global.
18632         (process_file): Clear last_access_generated; make multiple passes
18633         over the class.
18634         (print_field_info): Just return if generate_access returns true.
18635         (print_method_info): Likewise.  Also, allow <init> functions to
18636         pass through.
18637         (print_c_decl): Added is_init argument.  Print constructors
18638         properly.
18639         (print_cxx_classname): Use UTF8_GET to extract characters from
18640         string.
18641         (print_base_classname): New function.
18642         (print_class_decls): New function.
18643         (process_file): Use it.
18644         (utf8_cmp): New function.
18645
18646 1998-07-13  Nick Clifton  <nickc@cygnus.com>
18647
18648         * lang-options.h: Format changed to match changes in gcc/toplev.c
18649         to implement a --help option.
18650
18651 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
18652
18653         * decl.c (init_decl_processing): Revert change to dtable_type.
18654
18655 1998-07-09  Per Bothner  <bothner@cygnus.com>
18656
18657         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
18658
18659 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
18660
18661         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
18662
18663         * lang.c (lang_init): Default flag_exceptions to 1, without
18664         checking to see if it's 2 first.
18665
18666 1998-07-08  Jeffrey A Law  (law@cygnus.com)
18667
18668         * constants.c: Include "system.h".
18669         * decl.c: Likewise.
18670         * lang.c (flag_new_exceptions): Get via extern now.
18671         (lang_init_options): New functions.  Turn on flag_new_exceptions.
18672
18673 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18674
18675         * lex.c (java_lex): Return 0 when we see an invalid character in
18676         the input.
18677
18678         * lex.c (java_read_char): Specify extra argument when calling
18679         java_lex_error.
18680         (java_read_unicode, java_parse_end_comment,
18681         java_parse_escape_sequence): Likewise,
18682         (java_lex): Specify extra argument when calling
18683         java_lex_error. Test that IDs are beginning with a legal character
18684         for IDs. Handle invalid characters with an error message and a
18685         call to java_lex_error.
18686         (java_lex_error): Adjust column position by new argument
18687         `forward'. Issue an error even if in the middle of reporting an
18688         other error.
18689
18690 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
18691
18692         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
18693         we don't explicitly put a null pointer when we're copying it.
18694
18695 1998-07-07  Tom Tromey  <tromey@cygnus.com>
18696
18697         * gjavah.c (print_cxx_classname): New function.
18698         (super_class_name): Likewise.
18699         (print_super_fields): Removed.
18700         (in_super): Removed.
18701         (print_field_info): Never generate #defines.
18702         (print_c_decl): Changed generated types to match JNI.  No longer
18703         print class name before method name.
18704         (print_method_info): Print "static" before static methods.
18705         Print "virtual" before non-final methods.
18706         (usage): Use exit(1), not exit(-1).
18707         (main): Likewise.
18708         (print_field_info): Use %.17g to print a double.
18709         (last_access): New globals.
18710         (process_file): Initialize last_access.
18711         (usage): Now static.
18712         (ACC_VISIBILITY): New define.
18713         (generate_access): New function.
18714         (print_field_info): Call it.
18715         (print_method_info): Likewise.  Also, generate information for all
18716         methods, not just native methods.  Return void.
18717         (print_c_decl): Return void.
18718         (print_field_info): Return void.
18719
18720 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18721
18722         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
18723         processing the jc1 grammar file. Prefix bison functions and
18724         variables with java_.
18725         (parse.c): Dependencies on parse.h and lex.h
18726         * expr.c (build_java_arrayaccess): Function now global.
18727         * java-tree.h: Comment reorganized to carry on previous
18728         classification effort.
18729         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
18730         RESOLVE_TYPE_NAME_P): New flags on WFLs.
18731         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
18732         java_parse (new prefix java_ generated by bison).
18733         (java_layout_parsed_class, java_register_parsed_class): Function
18734         call removed.
18735         (yyparse): Removed unnecessary call to init_outgoing_cpool.
18736         * lex.c (static tree wfl_op): Variable deleted.
18737         (java_init_lex): Initialize kw_super and kw_this. Initialize more
18738         ctxp fields to NULL_TREE.
18739         (java_lex): No longer create WFL for operators. Filename caching
18740         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
18741         created as STRING_CST and later expanded. Removed extra argument
18742         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
18743         and SUPER.
18744         (build_wfl_node): Removed code in comments.
18745         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
18746         store token and location data in the current bison token.
18747         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
18748         static/extern function declaration at the beginning of the file.
18749         (struct qualification): Data structure definition deleted.
18750         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
18751         (qualify_ambiguous_name): Function declaration modified. Function
18752         now returns nothing.
18753         (build_array_ref, patch_array_ref, make_qualified_name,
18754         resolve_qualified_expression_name, maybe_generate_clinit,
18755         resolve_field_access): New static function declarations.
18756         (build_java_arrayaccess): New extern function declaration.
18757         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
18758         (CALL_EXPR_PRIMARY): Macro deleted.
18759         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
18760         (struct parser_ctxt): Field initialized_final
18761         removed. non_static_initialized, static_initialized: New fields.
18762         * parse.y (static tree kw_super, static tree kw_this): New global
18763         static.
18764         (%union): tree wfl field of operator member replaced by int
18765         location. WFLs are non longer created for operators.
18766         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
18767         (qualified_name:): Now calls make_qualified_name to build the
18768         identifier.
18769         (type_declaration:): Consider generating <clinit> when class
18770         parsing completed.
18771         (variable_declarator:): Directly build an assignment node when the
18772         variable is initialized when declared.
18773         (this_or_super:): Build a WFL and set current location when THIS
18774         or SUPER are parsed.
18775         (expression_statement:): Wrap statement around a WFL.
18776         (primary_no_new_array:): Fixed typo. Changed value returned by
18777         THIS_TK because of its new type (temporary).
18778         (dim_exprs:): Temporary fix because of OSB_TK's new type.
18779         (field_access:): Build qualified name with SUPER.
18780         (method_invocation:): Fixed returned value because of SUPER's new
18781         type.
18782         (array_access:): Use OSB_TK location information.
18783         (post_increment_expression:, post_decrement_expression:,
18784         unary_expression:, pre_increment_expression:,
18785         pre_decrement_expression:, unary_expression_not_plus_minus:,
18786         cast_expression:, multiplicative_expression:,
18787         additive_expression:, shift_expression:, relational_expression:,
18788         equality_expression:, and_expression:, exclusive_or_expression:,
18789         inclusive_or_expression:, conditional_and_expression:,
18790         conditional_or_expression:, assignment:): Use new location/token
18791         information available on operators.
18792         (create_class): Set super_decl_type to NULL_TREE when processing
18793         java.lang.Object.
18794         (register_fields): Field initialization is now a MODIFY_EXPR
18795         node. Chain initialization code to the matching lists (according
18796         to the field declaration modifiers).
18797         (maybe_generate_clinit): New function.
18798         (method_header): Don't set method's DECL_NAME to a WFL when adding
18799         methods to java.lang.Object.
18800         (resolve_and_layout): Now can return NULL_TREE if the type
18801         resolution fails. Otherwise, return the class DECL instead of its
18802         TYPE.
18803         (check_method_redefinition): Don't patch method DECL_NAME if it
18804         belongs to java.lang.Object.
18805         (process_imports): Simply assign error_found to the value returned
18806         by check_pkg_class_access.
18807         (declare_local_variables): Don't use their init statements (if
18808         any) when parsing error were previously found. Reuse MODIFY_EXPR
18809         build during parsing as an init statement.
18810         (java_method_add_stmt): Now return the current method body.
18811         (java_layout_parsed_class, java_register_parsed_class): Functions
18812         removed.
18813         (java_complete_expand_methods): Initialize the constant pool on a
18814         per class basis. Layout the classes before expanding their method
18815         bodies. Don't try expand artificial constructor code if error were
18816         found. Make the classes data and register them if no error were
18817         found.
18818         (java_complete_expand_method): Retrieve an artificial constructor
18819         argument list before entering its body. Assign the top block to
18820         the artificial constructor function body and set types of declared
18821         blocks and compound statements to void. Walk method body if not an
18822         artificial constructor.
18823         (make_qualified_name, cut_identifier_in_qualified): New functions.
18824         (resolve_expression_name): Fixed comments. Save/restore the
18825         current class CLASS_LOADED_P flag value. Build non qualified
18826         static field access and handle qualified expression names.
18827         (resolve_field_access, resolve_qualified_expression_name): New
18828         functions.
18829         (patch_method_invocation_stmt): Use the new expression resolution
18830         scheme, calling resolve_field_access when the function call is
18831         resolved as an expression.
18832         (qualify_ambiguous_name): Function rewritten to work on qualified
18833         expression produced by make_qualified_name.
18834         (java_complete_tree): Promote type when function's argument are
18835         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
18836         the assignment to discover further errors if RHS is a expression
18837         name that fails to evaluate. Declare LHS initialized even though
18838         the assignment failed. Don't use the location variable and removed
18839         extra argument in patch function calls. Now handle the ARRAY_REF
18840         case and build internal string representation when STRING_CSTs are
18841         walked.
18842         (build_method_invocation): Don't wrap function call around a WFL.
18843         (build_assignment): Likewise. Use the operator location
18844         information.
18845         (patch_assignment): Handle array access LHSs. Handle error
18846         provenance, resulting in a better error report.
18847         (build_binop): Use op_location from operator as binop location
18848         information.
18849         (build_unaryop, build_incdec, build_cast): Likewise.
18850         (patch_binop): Extract location information from the node. Fixed
18851         typo in error message.
18852         (patch_unary_op): Extract location information from the node.
18853         (build_array_ref, patch_array_ref): New functions.
18854
18855 1998-07-01  Tom Tromey  <tromey@cygnus.com>
18856
18857         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
18858         match _Jv_IsInstanceOf.
18859         * decl.c (init_decl_processing): Use _Jv_NewArray, not
18860         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
18861
18862 1998-06-30  Tom Tromey  <tromey@cygnus.com>
18863
18864         * decl.c (init_decl_processing): Functions are now named
18865         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
18866
18867 1998-06-29  Per Bothner  <bothner@cygnus.com>
18868
18869         * java-tree.h (load_class):  Add prototype.
18870         * class.c (is_compiled_class):  Add missing arg to load_class.
18871         * expr.c (expand_java_NEW):  Call load_class.
18872         * parse.y (process_import):  Removed bogus use of void return value.
18873
18874 1998-06-25  Per Bothner  <bothner@cygnus.com>
18875
18876         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
18877         Function name is "_Jv_Throw" instead of "soft_athrow".
18878         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
18879         Function name is "_Jv_AllocObject" instead of "soft_new".
18880         Takes an extra parameter (object size).
18881         * expr.c:  Update calls.
18882
18883 1998-06-24  Per Bothner  <bothner@cygnus.com>
18884
18885         * lex.c (java_get_line_col):  Handle end-of-file.
18886         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
18887
18888 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
18889
18890         * lang.c (lang_init): Make -fexceptions the default.
18891         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
18892         exception handling is not turned on.
18893
18894 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
18895
18896         * lang.c (flag_new_exceptions): Make this this default.
18897         * decl.c (end_java_method): Call emit_handlers.
18898         * except.c (method_init_exceptions): Set language code and version.
18899         (expand_start_java_handler): Enable exception, and call
18900         expand_eh_region_start.
18901         (expand_end_java_handler): Enable exception, and set up catch blocks.
18902         (emit_handlers): New routine to generate the saved handlers.
18903         * java-except.h (emit_handlers): Add prototype.
18904
18905 1998-06-12  Per Bothner  <bothner@cygnus.com>
18906
18907         We used to have three different representations of the constant pool:
18908         the CPool structure, the tree_constant_pool, and the constructures
18909         used to build the Class object (which may need class and string
18910         constants) in compiled code.  None were appropriate for compiling
18911         to .class files, so I did a major overhaul.
18912
18913         First, the tree_constant_pool array was removed.  Things were
18914         modified to the CPool structure in the JCF could be used.
18915         Second, a "capacity" field was added to the CPool, and functions
18916         written to search for a matching constant, adding one if not found.
18917         The code that generated the Class object was changed to use a CPool.
18918         The actual TREE_LISTs used to build the CONSTRUCTORs used for
18919         the static Class object are now only in build_constants_constructor.
18920         Finally, I wrote code which can generate a .class file (including its
18921         constant pool) from the RECORD_TYPE of a class.  This is a big step
18922         on the way to compiling Java source into .class files.
18923
18924         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
18925         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
18926
18927         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
18928         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
18929         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
18930         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
18931         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
18932         (lang_type):  Removed constant_pool field.
18933         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
18934         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
18935         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
18936         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
18937
18938         * constants.c (current_constant_pool_tags, current_constant_pool_data,
18939         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
18940         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
18941         (set_constant_entry, find_constant1, find_constant2,
18942         find_class_constant, count_constant_pool_bytes, write_constant_pool,
18943         find_utf8_constant, find_class_or_string_constant):  New functions.
18944
18945         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
18946         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
18947         (give_name_to_class, get_class_constant):  Likewise.
18948         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
18949         (get_name_and_type_constant, get_ref_constant):  Removed.
18950         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
18951         * parse.y:  Don't save/restore tree_constant_pool.
18952         * verify.c (verify_jvm_instructions):  Update for new approach.
18953         * expr.c (expand_invoke, expand_java_field_op): Likewise.
18954
18955         * lang-options.h:  Added -femit-class-file, -femit-class-files.
18956         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
18957         (lang_f_options):  Added "emit-class-file(s)".
18958
18959         * expr.c (build_java_arrayaccess):  Generate more efficient array
18960         bounds checking, by using unsigned compare.
18961
18962         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
18963
18964 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18965
18966         * parse.h: New comment on the handling of unresolved type
18967         identifiers. JDEPs are now part of the jdep_code enum.
18968         (typedef struct jdep): Now use enum jdep_code or int, depending on
18969         availability. Both are narrowed down to an 8 bits bitfield.
18970         (CALL_EXPR_PRIMARY): Fixed comment.
18971
18972 1998-06-10  Tom Tromey  <tromey@cygnus.com>
18973
18974         * Make-lang.in (java): Added gjavac and jvgenmain.
18975         (java.start.encap): Depend on gjavac.
18976         (java.rest.encap): Depend on jvgenmain.
18977
18978         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
18979         (JAVA_CROSS_NAME): Likewise.
18980         (java.all.build): Depend on jvgenmain and gjavac.
18981         (java.all.cross): Depend on jvgenmain and gjavac-cross.
18982         (jvgenmain$(exeext)): New target.
18983         (java.install-common): Wrote.
18984         * config-lang.in (compilers, stagestuff): Added gjavac and
18985         jvgenmain.
18986
18987 1998-06-10  Dave Brolley  <brolley@cygnus.com>
18988
18989         * lang.c (lang_decode_option): New argc/argv interface.
18990
18991 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18992
18993         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
18994         * decl.c (build_decl_no_layout): New function.
18995         * expr.c (java_lang_expand_expr): Layout declarations found in
18996         blocks before they're pushed.
18997         * jcf-parse.c (load_class): Save current line when parsing class
18998         file.
18999         (parse_source_file): Register class before expanding their
19000         methods.
19001         * lang.c (put_decl_node): Produce `null' when `void *' is
19002         processed.
19003         * lex.c (static tree wfl_op): New static global, for error report
19004         on casts.
19005         (java_init_lex): wfl_operator and wfl_op initialized
19006         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19007         parsed.
19008         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19009         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19010         build_unresolved_array_type): New static function definitions.
19011         (build_decl_no_layout): New extern function declared.
19012         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19013         faulty modifier exists.
19014         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19015         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19016         (UNARY_PLUS_EXPR): New fake operator.
19017         (struct parser_ctxt): New field osb_number.
19018         * parse.y (static tree wfl_operator): New static WFL for operator
19019         bound error messages.
19020         (DECR_TK, INCR_TK): Moved.
19021         (OP_TK): Tagged <operator>.
19022         (array_type:): Now call build_unresolved_array_type.
19023         (dim_expr:): Count the number of '[' seen.
19024         (post_increment_expression, post_decrement_expression,
19025         pre_increment_expression, pre_decrement_expression,
19026         unary_expression_not_plus_minus, unary_expression:): Actions are
19027         now building the corresponding unary expressions.
19028         (cast_expression:): Actions are now building cast expressions.
19029         (build_unresolved_array_type): New function.
19030         (create_interface): Reset the number of declared interfaces.
19031         (create_class): Likewise.
19032         (method_header): Methods declared within the scope of an interface
19033         are now implicitly set public and abstract.
19034         (java_complete_class): Variable's and parameter's type are patched
19035         with a promoted type.
19036         (declare_local_variables): Resolved non builtin types are promoted
19037         before being used to build a variable decl. Removed type patch
19038         posted on variable initialization statement.
19039         (source_start_java_method): Use build_decl_no_layout to build the
19040         decl of a parameter of incomplete type.
19041         (java_register_parsed_class): Process interfaces too. Call
19042         rest_of_decl_compilation on each processed class declarations.
19043         (java_complete_expand_methods): Don't attempt to expand things in
19044         interfaces.
19045         (java_complete_tree): Process CONVERT_EXPR, even though it always
19046         has a type. Propagate error_mark_node to node's type too. Promote
19047         method's call argument type and return error_mark_node if
19048         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19049         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19050         handle unary operator nodes.
19051         (build_assignment): Added comment.
19052         (print_int_node): New function.
19053         (patch_assignment): New second argument. New error handling. Use
19054         print_int_node. Handle references. Use can_cast_to_p to issue
19055         different error message according to the context and check upon
19056         the initialization of the RHS.
19057         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19058         (operator_string): Handle more operators.
19059         (patch_binop): No longer use a function static
19060         wfl_operator. Improved error message on shift distance.
19061         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19062         patch_cast): New functions.
19063
19064 1998-06-05  Per Bothner  <bothner@cygnus.com>
19065
19066         * jvspec.c:  New file.
19067         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19068
19069         * java-tree.h (identifier_subst):  Add declaration.
19070
19071 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19072
19073         * jvgenmain.c (main): Generate call to JvRunMain.
19074
19075         * class.c (make_class_data): Push value for "sync_info" field.
19076         * decl.c (init_decl_processing): Push "sync_info" field.
19077
19078 1998-06-03  Per Bothner  <bothner@cygnus.com>
19079
19080         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19081         Java (source) name, not signature.
19082         Set TYPE_ALIGN to (at least) that of element_type.
19083
19084 1998-06-02  Per Bothner  <bothner@cygnus.com>
19085
19086         * class.c:  Moved classname-mangling-rekated code to ...
19087         * mangle.c:  ... this new file.
19088         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19089         * Makefile.in:  Update for above changes.
19090
19091 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19092
19093         * expr.c (truthvalue_conversion): Convert integer and floating
19094         point value to their truth value.
19095         * lex.c (java_lex): Handle the `null' literal.
19096         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19097         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19098         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19099         New macros.
19100
19101         * parse.y: Reorganization/documentation on token declaration.
19102         (binop_lookup[]): New added new tree codes.
19103         (relational_expression): Build corresponding binary operators.
19104         (equality_expression, conditional_and_expression,
19105         conditional_or_expression): Likewise.
19106         (java_complete_class): Fix crash in debug message.
19107         (java_complete_tree): Check initialization of method call
19108         arguments. Further bogus node evaluation to detect more error
19109         during assignments. Handles more binary operators.
19110         (patch_assignment): Use DECL_P.
19111         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19112         code.
19113         (operator_string): Handle more case. Compacted source.
19114         (patch_binop): Changed function comment. Checking for
19115         uninitialized first operand takes the compound assignment into
19116         account and uses DECL_P. Checking for uninitialized second operand
19117         delayed to routine's end. Use macros to issue type bound error
19118         messages and issue messages on both operands if their types are
19119         different. Force fixed type into node. Handle all binary
19120         operators.
19121
19122 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19123
19124         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19125         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19126         build operator node and return tokens.
19127         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19128         * parse.h (java_complete_tree): Changed returned type in prototype.
19129         (build_method_invocation, build_assignment, patch_assignment,
19130         patch_binop): New static function declarations.
19131         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19132         BUILD_EXPR_WFL): New macros.
19133         * parse.y (enum tree_code binop_lookup[]): New static for token to
19134         TREE_CODE lookup.
19135         (%union): Parser union has new sub-structure `operator'.
19136         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19137         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19138         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19139         ASSIGN_ANY_TK): Tokens tagged `operator'.
19140         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19141         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19142         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19143         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19144         (assignment_operator:): Rule tagged `operator'.
19145         (expression_statement:): Re-installed default rule.
19146         (method_invocation:): Sub rules call build_method_invocation.
19147         (postfix_expression:): Don't attempt to resolve name here. Just
19148         return an ID.
19149         (multiplicative_expression:): Sub-rules build corresponding binop
19150         expression node.
19151         (additive_expression:, shift_expression:, and_expression:,
19152         exclusive_or_expression:, inclusive_or_expression:): Likewise.
19153         (assignment:): Sub rule invoke build_assignment.
19154         (assignment_operator:): Default rules on sub rules.
19155         (force_error): Added documentation on this variable.
19156         (declare_local_variables): Build initialization calling
19157         build_assignment.
19158         (expand_start_java_method): Removed unused rtx declaration. Mark
19159         arguments as already initialized.
19160         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19161         (java_complete_expand_methods): Don't process next method if
19162         completion of the previous one triggered errors.
19163         (java_complete_expand_method): Call source_end_java_method if no
19164         error were found during completion.
19165         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19166         locals declaratilon. Handle names found within a class. Return
19167         error_mark_node when things aren't found.
19168         (patch_method_invocation_stmt): Return error_mark_node on failures.
19169         (patch_invoke): Removed unused local. Return the correct node.
19170         (java_complete_tree): Now returns a value. The BLOCK section binds
19171         local identifiers and the type of a BLOCK is now void. Assign the
19172         result of operand completion on COMPOUND_EXPR. Assign the
19173         encapsulated node of a WFL to the result of its completion, except
19174         when the node is an identifier. Now handle MODIFY_EXPR and several
19175         binary operators. Return error_mark_node on errors.
19176         (build_method_invocation, build_assignment, patch_assignment,
19177         build_binop, operator_string, patch_binop): New functions.
19178         * typeck.c (binary_numeric_promotion): New function.
19179
19180 1998-05-21  Per Bothner  <bothner@cygnus.com>
19181
19182         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
19183         Replace most uses of ident_subst by identifier_subst.
19184
19185         * class.c (push_class_static_dummy_field):  Removed function.
19186         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
19187         instead of looking got "class" static field.  Create that decl here.
19188         (class_identifier_node):  Removed;  no longer needed.
19189         (init_class_processing):  Don't init class_identifier_node.
19190         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
19191         Do nreverse 0 times (instead of twice) for Object and Class.
19192         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19193
19194 1998-05-20  Per Bothner  <bothner@cygnus.com>
19195
19196         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
19197         while initializing linenumber_count and linenumber_table.
19198         Do it before init_function_start (which calls emit_line_note).
19199         * expr.c (expand_byte_code):  Don't need to clear lineno here.
19200
19201 1998-05-18  Tom Tromey  <tromey@cygnus.com>
19202
19203         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19204         then mangle number as _N_.
19205
19206         * class.c (mangle_class_field): New function.
19207         (build_class_ref): Set assembler name of class reference using
19208         mangle_class_field.
19209         (push_class_static_dummy_field): Likewise.
19210
19211 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
19212
19213         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19214         of assigning to TREE_CODE.  The latter method exploits a feature
19215         of GCC that is not ANSI compliant.
19216
19217 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19218
19219         * decl.c (pushdecl_force_head): New function.
19220         (pushlevel): Removed conditional printf.
19221         (complete_start_java_method): Don't enter local variable scope if
19222         function is compiled from source code.
19223         * expr.c: parse.h now included
19224         (java_lang_expand_expr): New function.
19225         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19226         printf. Terminate buffer when doing directories.
19227         * jcf-parse.c (parse_source_file): Call lang_init_source before
19228         parsing and before code generation.
19229         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19230         use printf if the macro is defined.
19231         * lang.c (lang_init): Install lang_expand_expr hook on
19232         java_lang_expand_expr.
19233         (java_dummy_print): New function.
19234         (lang_init_source): New function.
19235         * lex.c (java_lex): Remember location of an opening brace at the
19236         second nesting level.
19237         (java_is_eol): Unget character seen after a CR if it is EOF.
19238         * parse.h: Now includes lex.h
19239         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19240         printf if the macro is defined.
19241         (expand_start_java_method, build_expr_block, enter_block,
19242         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19243         New static function declarations.
19244         (pushdecl_force_head): New extern function declaration.
19245         (INCOMPLETE_TYPE_P): New macro.
19246         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19247         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19248         BLOCK_EXPR_ORIGIN): New macros.
19249         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19250         DECL_SOURCE_LINE_LAST): New macros.
19251         (struct parser_ctxt): Removed field current_method_decl, redundant
19252         with the field current_function_decl. Added fields
19253         first_ccb_indent1 and pending_block.
19254         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19255         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19256         tagged <node>
19257         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19258         (compilation_unit:): Cosmetic on sub rule.
19259         (type_declaration:): Cosmetic on sub rules. Added an error rule.
19260         (variable_initializer:): Installed default rule on expression:.
19261         (method_declaration:): method_header: starts a new
19262         method. method_body: installs the function body, absorbs blocks
19263         emitted for temporary variable scopings, pops function's body block
19264         and merges function's last statement lineno in DECL_SOURCE_LINE.
19265         (method_body:): Installed default rules.
19266         (block:): Call enter_block when an opening brace is seen.  Absorb
19267         scoping blocks and call exit_block when a closing brace is seen.
19268         (block_statement:): Cosmetic changes.
19269         (method_invocation:): Create WFL around CALL_EXPR node.
19270         (patch_stage): Added comment around definition.
19271         (method_header): Try to use first_ccb_indent1 as the first line of
19272         the method, so BP debug info are emitted at the first opening
19273         brace of the function. If the function has no body, use the
19274         location of the function's name. Override currently defined method
19275         name with the matching WFL so we can point redefinition errors
19276         using the location where the function's name was declared.
19277         (check_abstract_method_header): Interprets DECL_NAME as an
19278         identifier or as a WFL, accordingly.
19279         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19280         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19281         location and name information out of it and reinstall DECL_NAME to
19282         its original identifier node value.
19283         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19284         function's source code).
19285         (read_import_dir): Test the value returned by find_class and issue
19286         a fatal accordingly.
19287         (declare_local_variables): Push a new block for the scope of the
19288         new variable(s) if code has been already generated at that nesting
19289         level. Pinpoint redefinition errors using the variable id
19290         WFLs. Generate initialization code if necessary. If the variable
19291         type is incomplete, register a patch on its decl.
19292         (source_start_java_method): Rewritten. Define a new block for the
19293         function's parameters. Build parameter decl out of function's
19294         arguments and register them for a patch if their types are
19295         incomplete.
19296         (expand_start_java_method): Includes the part of
19297         source_start_java_method that was pushing the parameter decls and
19298         completing the method start code.
19299         (source_end_java_method): Removed call the expand_end_bindings and
19300         poplevel (already taken care of). Reinstall function's arguments
19301         and get function's last line of code before calling
19302         expand_function_end.
19303         (java_method_add_stmt): New comment before the function's
19304         code. Complement the second operand of the current COMPOUND_EXPR
19305         if necessary.
19306         (java_complete_expand_methods): Don't generate debug info on line
19307         zero when expanding a generated constructor.
19308         (java_complete_expand_method): Set start and end line numbers for
19309         a artificially generated constructor to one and manually call
19310         enter_block and exit_block when defining it. For all methods:
19311         expand function's start calling the new expand_start_java_method
19312         and invoke java_complete_tree on the effective method's body, if
19313         any.
19314         (resolve_expression_name): Now use lookup_name_in_blocks to search
19315         local variable decls and print out an error when variables are
19316         undefined.
19317         (patch_method_invocation_stmt): Inserted comment before the
19318         function's code.
19319         (lookup_method_invoke): Chain method's arguments using chainon
19320         with the current arg list as a second argument. Inserted missing
19321         IDENTIFIER_POINTER when reporting an error on methods not found.
19322         (refine_accessible_methods_list): Don't retain constructors.
19323         (patch_arguments): Function removed.
19324         (java_complete_tree): Inserted comment before the function's
19325         code. New case for BLOCKs. Moved the WFL case a bit
19326         further. Complete function's arguments.
19327         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19328         maybe_absorb_scoping_blocks): New functions.
19329
19330 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19331
19332         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19333         previously set.
19334         * jcf-parse.c (parse_source_file, java_error_count): New forward
19335         and extern declarations.
19336         (java_parse_abort_on_error): Macro moved.
19337         (jcf_parse_source): fatal called if fopen fails. Now calls
19338         parse_source_file.
19339         (parse_source_file): New parse_only parameter. Reflects the
19340         elimination of the second pass.
19341         (yyparse): parse_source_file called with argument set to 0.
19342         * jcf.h (JCF_ZERO): Sets java_source to zero.
19343         * lex.c (java_init_lex): pass argument is gone. Function modified
19344         to be called once during the analysis of a file.
19345         (java_unget_unicode): Fixed typo in fatal message.
19346         (java_get_line_col): Likewise.
19347         (java_lval): Likewise. String literals no longer built during
19348         second pass.
19349         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
19350         account.
19351         * parse.h (MODIFIER_WFL): New macro.
19352         (parse_check_super, parser_check_super_interface): Now return int.
19353         (parser_chain_incomplete_item, not_builtin_p,
19354         complete_method_decl): Declarations removed.
19355         (build_method_invocation_stmt, build_invoke): Renamed using the
19356         `patch' instead of `build'
19357         (register-incomplete_type, obtain_incomplete_type,
19358         java_complete_tree, java_complete_expand_method,
19359         unresolved_type_p, create_jdep_list): New function declarations.
19360         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
19361         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
19362         (jdep): New typedef on new struct _jdep.
19363         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
19364         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
19365         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
19366         JDEP_RESOLVED_P): New macros.
19367         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
19368         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
19369         JDEP_VARIABLE): New enum values and jdep kinds.
19370         (jdeplist): New typedef on struct _jdeplist.
19371         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
19372         macros.
19373         (CALL_EXPR_PRIMARY): New macro.
19374         (struct parser_ctxt): Fields java_pass, current_method_decl,
19375         method_decl_list deleted. New field jdeplist.
19376         (INCOMPLETE_P): Macro deleted.
19377         * parse.y (single_type_import_declaration:): Removed pass switch.
19378         (type_import_on_demand_declaration): Likewise.
19379         (field_declaration:): Removed pass switch on all sub rules.
19380         (class_declaration:): Call the complete_class_decl removed on
19381         class_body rules.
19382         (method_declaration:): Removed second pass switch. No longer chain
19383         methods decl when method_header reduced.
19384         (method_header:): Sub rules no longer depend on pass switch.
19385         (method_declarator:): Likewise.
19386         (method_body:): Likewise.
19387         (abstract_method_declaration:): Likewise.
19388         (block_statement:): Likewise.
19389         (local_variable_declaration:): Likewise.
19390         (argument_list:): Likewise.
19391         (method_invocation:): Likewise. Call to build_method_invocation_stmt
19392         removed. Partial CLASS_EXPR tree node built instead.
19393         (postfix_expression:): Removed pass switch on all sub rules.
19394         (java_pop_parser_context): Free classd_list content.
19395         (yyerror): Call obstrack_grow0 to finalize error message.
19396         (check_class_interface_creation): Comment modified to reflect new
19397         returned value meaning. Removed second pass switch. Return 1 if an
19398         error was found, 0 otherwise. Adjust pointer on filename if a
19399         leading path separator was found.
19400         (maybe_create_class_interface_decl): Removed first pass switch
19401         when linking the class decl to the class_list. Install a new
19402         jdep_list for the class.
19403         (add_superinterfaces): List of unresolved interfaces is
19404         gone. Unresolved interfaces are directly added to the current
19405         dependencies list.
19406         (create_interface): Second pass shortcut removed.
19407         ctpx->modifier_ctx access through MODIFIER_WFL.
19408         (create_class): Second pass shortcut removed. Call to
19409         register_incomplete_type replaces the call to
19410         parser_chain_incomplete_item.
19411         (complete_class_decl): Function removed.
19412         (duplicate_declaration_error): New way of retrieving redeclared
19413         item type.
19414         (register_fields): Call to lookup_modifier_cl replaced by
19415         MODIFIER_WFL. New way of handling unresolved type, using
19416         unresolved_type_p and obtain_incomplete_type.
19417         register_incomplete_type replaces call to parser_chain_incomplete_item.
19418         (patch_stage): New static global variable.
19419         (method_header): New way of handling unresolved type, using
19420         unresolved_type_p and obtain_incomplete_type. patch_stage used to
19421         indicates that the method decl needs to be patched.
19422         (check_abstract_method_header): Call to lookup_modifier_cl
19423         replaced by MODIFIER_WFL.
19424         (method_declarator): Incomplete argument type are registered
19425         calling register_incomplete_type. Patch on the declared method is
19426         issued in that case.
19427         (unresolved_type_p): New function.
19428         (parser_check_super_interface): New comment to reflect function's
19429         modified returned type (int). Function and has a new argument
19430         this_wfl. Call to parse_error_context uses this_wfl instead of
19431         relying on lookup_cl.
19432         (parser_check_super): Comment reflects function's new returned
19433         type (int). Function returns nonzero value on error.
19434         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
19435         register_incomplete_type, jdep_resolve_class): New functions to
19436         handle incomplete types in declarations.
19437         (java_complete_class): Rewritten to work with the new incomplete
19438         type handling scheme.
19439         (complete_class_report_errors): Likewise.
19440         (complete_method_decl): Removed: it jobs is now handled by
19441         java_complete_class.
19442         (do_resolve_class): Class loaded in not already loaded and not
19443         found in Java source code.
19444         (java_check_regular_methods, java_check_abstract_methods): Don't
19445         call complete_method_decl anymore.
19446         (lookup_modifier_cl, not_builtin_p): Functions deleted.
19447         (read_import_dir): Got rid of the pass number dependency.
19448         (declare_local_variables): New handling of unresolved types (patch
19449         issued).
19450         (source_start_java_method): New parameter level. Function called
19451         with level set to 1 when argument types are potentially
19452         unresolved.  Called to complete the job with level set to 2 once
19453         types are complete.
19454         (source_end_java_method): Call to permanent_allocation
19455         removed. Waiting to be replaced by a more suitable obstack
19456         management.
19457         (java_complete_expand_methods, java_complete_expand_method,
19458         java_expand_finals): New functions.
19459         (build_method_invocation_stmt): Renamed
19460         patch_method_invocation_stmt. Extracts function call expression
19461         (wfl) and arguments (args) from CALL_EXPR tree operands.
19462         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
19463         call. Patch the function and argument operand of the CALL_EXPR
19464         tree argument.
19465         (patch_argument, java_complete_tree): New functions.
19466
19467 1998-04-20  Per Bothner  <bothner@cygnus.com>
19468
19469         Recover from missing fields and methods (i.e. error instead of fatal).
19470         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
19471         * expr.c (expand_invoke):  Recover from missing method.
19472         (expand_java_field_op):  Recover from missing field.
19473         Inline references to java.lang.{Integer,Char,...}.TYPE.
19474         * typeck.c (get_type_from_signature), java-tree.h:  New function.
19475         * class.c (add_method):  Use get_type_from_signature.
19476         (build_class_ref):  Handle a class that was not found.
19477         * typeck.c (convert):  Handle conversion to pointers (for convenience).
19478         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
19479         instead of lookup_field to handle missing fields.
19480
19481         * jcf-parse.c (process_zip_dir):  Set java_source.
19482
19483 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
19484
19485         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
19486
19487 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19488
19489         * jcf-parse.c (load_class): Don't change input_filename before
19490         calling jcf_parse_source (but still do it before calling
19491         jcf_parse).
19492         (jcf_parse_source): Assign input_filename after having saved the
19493         parser context.
19494         * lex.c (java_init_lex): Chain a WFL node to the import on demand
19495         list. ctxp->modifier_ctx zeroed according to its new
19496         definition. ctxp->filename initialized. Removed
19497         JAVA_MODIFIER_CTX_UNMARK.
19498         (java_unget_unicode): Update the character based column position.
19499         (java_allocate_new_line): ref_count not used anymore. Always free
19500         ctxp->p_line. Initialize c_line->char_col to 0.
19501         (java_get_unicode): Update the character based column position.
19502         (java_lex): Use ctxp->elc to store current position in source
19503         file, at the beginning of the parsed token. Set modifier_ctx entry
19504         corresponding to the parse modifier to a WFL node. Return a WFL
19505         node when an identifier is parsed.
19506         (java_lex_error): Now uses ctxp->elc to store current position in
19507         source.
19508         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
19509         * lex.h (build_wfl_node): New function definitions.
19510         (struct java_line): ref_count and next fields are gone. New field
19511         char_col.
19512         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19513         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
19514         (JAVA_COLUMN_DELTA): New macro.
19515         (java_lc): New typedef on new struct _java_lc.
19516         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
19517         (parse_error_context, parse_warning_context): Changed prototypes.
19518         (java_get_line_col): Added as an available global function.
19519         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
19520         (IC_DECL): Replaced by macro IC_TYPE
19521         (DEPEND_WFL): New macro.
19522         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
19523         wrong modifier.
19524         (exit_java_complete_class): Removed a commented out statement.
19525         (struct parser_ctxt): Added comments on fields. modifier_ctx is
19526         now an array of tree nodes. Deleted fields line_list and
19527         e_line. New field elc, to replace e_line.
19528         * parse.y (array_type:): Build WFL node.
19529         (qualified_name:): Build a single WFL node out of two. Retain
19530         the location information of the first node in the resulting node.
19531         (package_declaration:): Use package name as a WFL node
19532         (single_type_import_declaration:): Use imported name as a WFL node.
19533         (type_import_on_demand_declaration:): Use root of the imported
19534         packages as a WFL node.
19535         (field_declaration:): Removed unused local variable cl.
19536         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
19537         (yyerror): New static elc. Removed static error_line, error_pos.
19538         New local code_from_source. Save ctxp->elc into elc at the first
19539         pass. Call java_get_line_col to get a string of the line where
19540         the error occurred.
19541         (debug_line): Removed static function.
19542         (parse_error_context, parse_warning_context): Parameter cl is now
19543         a WFL node. Use its value to initialize ctxp->elc.
19544         (redefinition_error): Parameter cl is now a WFL node.
19545         (parse_add_interface): New parameter wfl. No longer call
19546         lookup_cl, use wfl instead.
19547         (check_class_interface_creation): Parameter cl is now a WFL node.
19548         (maybe_create_class_interface_decl): Likewise.
19549         (add_superinterfaces): New function.
19550         (create_interface): Removed local cl, node, super_decl,
19551         super_decl_type.  Function now uses id as a WFL node. Better
19552         warning/error report on obsolete or forbidden mix of
19553         modifiers. Now calls add_superinterfaces to register interfaces.
19554         (create_class): Removed local cl, node. Local variable id is used
19555         as a WFL node. Better error report on forbidden modifier
19556         mix. Uses add_superinterfaces to register interfaces.
19557         (find_field): Argument cl is now a WFL node. Now store the WFL
19558         node of a fields that needs to be checked for their
19559         initialization.
19560         (method_header): Local variable node non longer used. Local
19561         variable id replaces cl.
19562         (check_modifiers_consistency): Local variable cl is now a WFL
19563         node.
19564         (method_declarator): Local variable cl replaced by parameter id.
19565         (parser_qualified_name): Now uses parameter name as a WFL node.
19566         (parser_check_super_interface): New parameter wfl, for achieve
19567         greater accuracy during error reports.
19568         (parser_chain_incomplete_item): New parameter named location. Used,
19569         along the decl, to construct the incomplete item node.
19570         (java_complete_class): resolve_class now uses WFL node extracted
19571         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
19572         where appropriate.
19573         (complete_method_decl): Unresolved function's argument types are WFL.
19574         (resolve_class): Parameter cl is now a WFL node.
19575         (resolve_and_layout): Likewise.
19576         (do_resolve_class): Likewise. Try first to use cl and then do the
19577         lookup on the decl when calling check_pkg_class_access.
19578         (complete_class_report_errors): Use IC_TYPE in place of
19579         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
19580         instead of doing a lookup over the decl.
19581         (java_check_final): Use WFL info from field tree list.
19582         (lookup_cl): Rewritten and returns a statically defined WFL node.
19583         (lookup_modifier_cl): Now uses information from WFL nodes.
19584         (process_imports): Likewise.
19585         (read_import_dir): name and cl arguments replaced by a single WFL
19586         node. Function modified accordingly.
19587         (find_in_imports_on_demand): Now uses WFL node.
19588         (check_pkg_class_access): cl argument is now a WFL node.
19589         (declare_local_variables): Fixed to use WFL nodes.
19590         (resolve_expression_name): Likewise.
19591         (build_method_invocation_stmt): name_combo argument renamed
19592         wfl. Function modified to use WFL nodes.
19593         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
19594         (lookup_method_invoke): cl is now a WFL node. Added missing
19595         IDENTIFIER_POINTER to class type decl name.
19596
19597 1998-04-14  Dave Brolley  <brolley@cygnus.com>
19598
19599         * lang.c (init_parse): Now returns char* containing the filename.
19600
19601 1998-04-10  Per Bothner  <bothner@cygnus.com>
19602
19603         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
19604
19605         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
19606         * class.c (make_class_data):  If flag_assume_compiled, initial class
19607         state is CSTATE_PREPARED; make superclass and interfaces direct
19608         references, rather than constant pool indexes.
19609
19610 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19611
19612         * parser.y: Include flags.h. Removed debug variable pl.
19613         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
19614         (block:): Likewise.
19615         (labeled_statement_nsi:): Generate debug info when reducing
19616         expression_statement:.
19617         (check_pkg_class_access): get_access_flags_from_decl invocation
19618         fixed for new CLASS_* flags location.
19619         (source_end_java_method): Save/restore parser context when
19620         entering/leaving this routine. Restore lineno to its right value
19621         before calling expand_end_bindings.
19622         (build_method_invocation_stmt): build_invoke called with the
19623         current line information.
19624         (build_invoke): New argument cl. Wrap the function call around a
19625         wfl node.
19626         (refine_accessible_methods_list): Changed comment, removed
19627         unnecessary code.
19628         * parse.h: Fixed typo in comments.
19629         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
19630         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
19631         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
19632         parser_ccb_indent.
19633         * lex.c (java_lex): Record the last closing curly bracket of a
19634         function.
19635         * jcf-parse.c (jcf_parse_source): Now calls
19636         java_check_methods. Clarified comment, fixed typo.
19637
19638 1998-04-09  Dave Brolley  <brolley@cygnus.com>
19639
19640         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
19641         (finish_parse): Expose for non USE_CPPLIB builds.
19642
19643 1998-04-08  Jeffrey A Law  (law@cygnus.com)
19644
19645         * lang.c (lang_print_xnode): New function.
19646
19647 1998-04-03  Per Bothner  <bothner@cygnus.com>
19648
19649         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
19650         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
19651         used to build a class's dispatch table.
19652         (make_class_data):  Generate dispatch table if flag_assume_compiled.
19653         Set dtable of class object to address of class_dtable_decl.
19654
19655         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
19656         be volatile and have side effects - generates better code.
19657
19658         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
19659         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
19660
19661         * expr.c (expand_invoke):  If class is final, method is
19662         effectively final, so can call it directly.
19663
19664         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
19665
19666         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
19667
19668 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19669
19670         * parse.y (build_method_invocation_stmt): Removed extra argument
19671         to build_invoke.
19672
19673 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19674
19675         * expr.c (dtable_indent): Now static global.
19676         (expand_invoke): Now call invoke_build_dtable and
19677         build_invokevirtual.
19678         (invoke_build_dtable, build_invokevirtual): New functions.
19679         * jcf-io.c (find_class): Defer issuing a warning by setting
19680         jcf->outofsynch to 1.
19681         * jcf-parse.c (jcf_out_of_synch): New function.
19682         (load_class): Test this_jcf.outofsynch flag and call
19683         jcf_out_of_synch accordingly.
19684         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
19685         comment indentation.
19686         * lex.c (java_get_unicode): Fixed code indentation.
19687         (java_lex): Create string literal. Fixed typo. Removed several
19688         premature obstack_free.
19689         * parse.h: New enums for name resolution and invocation mode.
19690         (struct qualification): New data structure.
19691         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
19692         (do_resolve_class, build_method_invocation_stmt,
19693         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
19694         debug_line, identical_subpath_p, invocation_mode,
19695         refine_accessible_methods_list, build_invoke,
19696         lookup_method_invoke): New functions declared.
19697         (build_invokevirtual, invoke_build_dtable, match_java_method,
19698         build_field_ref, jcf_out_of_synch): New references to external
19699         functions.
19700         (struct parse_ctxt): Removed artificial_constructor field.
19701         * parse.y: (array_type:): Type defined for this rule.
19702         (class_type:): Installed default rule for interface_type:.
19703         (array_type:): Now build Java array type.
19704         (qualified_name:): Now use obstack_grow0.
19705         (method_declaration:): Skip the artificial constructor added to
19706         the list, if any.
19707         (abstract_method_declaration:): Execute the code only during pass 1.
19708         (block:): Installed default rule in block_statements:.
19709         (block_statement:): Add the statement to the method during pass 2.
19710         (statement_expression): Installed default rule for
19711         method_invocation:.
19712         (argument_list:): Added code to build the argument list.
19713         (method_invocation:): Added call to create the method invocation
19714         node.
19715         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
19716         (debug_line): New function for debug.
19717         (complete_class_decl): No longer do something during pass 1.
19718         (method_header): Use BUILD_PTR_FROM_NAME.
19719         (parser_qualified_classname): Use obstack_grow0. Removed bogus
19720         obstack_free.
19721         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
19722         function's main comment.
19723         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
19724         classes.
19725         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
19726         (resolve_class): Now works with arrays.
19727         (do_resolve_class, resolve_and_layout): New functions.
19728         (java_check_regular_methods): Reverse method list before and after
19729         having processed it. No longer set ctxp->artificial_constructor.
19730         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
19731         accordingly. Fixed typo in issued error message. Now use
19732         obstack_grow0.
19733         (find_in_imports_on_demand): Now use obstack_grow0.
19734         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
19735         (source_end_java_method): Call expand_expr_stmt instead of
19736         expand_expr. Calls it before calling expand_function_end.
19737         (java_method_add_stmt): Do nothing if errors were found during
19738         parsing.
19739         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
19740         (build_method_invocation_stmt, build_invoke, invocation_mode,
19741         lookup_method_invoke, refine_accessible_methods_list,
19742         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
19743         New functions.
19744         * typeck.c (build_java_signature): Properly end method signature
19745         if return type skipped.
19746         (match_java_method): New function.
19747
19748 1998-03-16  Per Bothner  <bothner@cygnus.com>
19749
19750         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
19751
19752 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19753
19754         * expr.c (build_invoke_non_interface): New function.
19755         (methods_ident, ncode_ident): Now static globals.
19756         (expand_invoke): Use build_invoke_non_interface.
19757         * java-tree.h (struct lang_decl): New field function_decl_body.
19758         (DECL_FUNCTION_BODY): New macro.
19759         * jcf-parse.c (jcf_parse_source): Deeper check before setting
19760         CLASS_FROM_SOURCE_P.
19761         (parse_source_file): Fixed typos. Call java_layout_parsed_class
19762         before starting pass 2. Call to java_generate_parsed_class replaced
19763         by java_register_parsed_class.
19764         * lex.c: Fixed typo in header. Some line width related formating.
19765         * lex.h: Some line width related formating.
19766         * parse.h (source_end_java_method, resolve_expression_name,
19767         complete_class_decl, maybe_create_class_interface_decl,
19768         check_class_interface_creation): New static function declarations.
19769         (java_layout_parsed_class, java_method_add_stmt): New function
19770         declarations.
19771         (struct parser_ctxt): Field mark_class_generate removed. New
19772         fields class_list and artificial_constructor.
19773         * parse.y: Fixed typo in header.
19774         (class_declaration:): Call complete_class_decl when class body
19775         parsed.
19776         (method_declaration:): Call source_end_java_method in pass 2 when
19777         the method body is defined.
19778         (postfix_expression:): Do expression name resolution on sub-rule
19779         name during pass 2.
19780         (create_class, create_interface): Merged common pieces.
19781         (check_class_interface_creation, maybe_create_class_interface_decl):
19782         New functions.
19783         (complete_class_decl): New function.
19784         (register_fields): Fixed line width related typo.
19785         (method_header): Correctly skip first argument when fixing
19786         argument line. Changed the loop.
19787         (java_check_circular_reference): Now use ctxp->class_list.
19788         (java_complete_class): Removed start/stop marking.
19789         (java_check_regular_methods): Now takes a class decl as an
19790         argument.  Add default constructor if none were encountered.
19791         (java_check_methods): Now use ctxp->class_list. Changed call to
19792         java_check_regular_methods.
19793         (source_start_java_method): Set DECL_ARG_TYPE for each function
19794         arguments.
19795         (source_end_java_method, java_method_add_stmt): New functions.
19796         (java_generate_parsed_class): No longer exists.
19797         (java_layout_parsed_class, java_register_parsed_class): New functions.
19798         (resolve_expression_name): New function.
19799
19800 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19801
19802         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
19803         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
19804         until pass initializations are done. Call read_import_dir with
19805         pass set to 0.
19806         * parse.h: (lookup_modifier_cl): New function declared.
19807         (INTERFACE_FIELD_MODIFIERS): New macro.
19808         (OBSOLETE_MODIFIER_WARNING): New macro.
19809         * parse.y: (register_fields): Class type and current field name in
19810         local variables. Check modifier(s) if adding field(s) to an interface.
19811         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
19812         and report errors using the faulty modifier line context.
19813         (lookup_modifier_cl): New function.
19814         (read_import_dir): Detect and report default import processing
19815         failure.
19816
19817 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
19818
19819         Add a pair of -fassume-compiled/-fno-assume-compiled options.
19820         * class.c (is_compiled_class): Return 1 after making sure it
19821         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
19822         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
19823         * java-tree.h (flag_assume_compiled): Add decl.
19824         * lang.c (lang_f_options): Add the flag.
19825         (flag_assume_compiled): Add decl, default to 0.
19826
19827 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19828
19829         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
19830         (is_compiled_class): Likewise.
19831         (layout_class): Likewise.
19832         (layout_class): Detect and lay out classes defined in source code.
19833         (interface_of_p, add_interface_do, may_add_interface): New
19834         function.
19835         (add_interface): Now use add_interface_do.
19836         (add_method_1): New function.
19837         (add_method): Now use add_method_1.
19838         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
19839         (complete_start_java_method): New function.
19840         (start_java_mehod): Now call complete_start_java_method.
19841         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
19842         (expand_invoke): Likewise and fixed typo.
19843         *gjava.c: (print_super_field): Use new argument to find_class
19844         DO_CLASS_FILE.
19845         (main): Likewise.
19846         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
19847         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
19848         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
19849         IDENTIFIER_NODE.
19850         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
19851         (add_method_1, push_class): New prototypes.
19852         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
19853         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
19854         directory where the class was found.
19855         (find_class): New argument DO_CLASS_FILE. Function find_class
19856         modified accordingly.
19857         *jcf-parse.c: (fix_class_path): New function.
19858         (load_class): Use new VERBOSE argument. load_class now finds and
19859         loads/parses .class/.java files. Save read_state of current_jcf
19860         if necessary.
19861         (java_parser_abort_on_error): New macro.
19862         (jcf_parse_source, parse_source_file): New function.
19863         (jcf_parse): Fixed typo.
19864         (yyparse): Call parse_source_file () only.
19865         (process_zip_dir): Fixed typo, fix zdir->filename_length when
19866         writing the real class name back in the zip directory entry.
19867         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
19868         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
19869         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
19870         (find_class): Prototype fixed.
19871         *lex.c: Added 1998 time stamp.
19872         Removed all static global variables, moved into the parser
19873         context data structure.. Now include unistd.h if SEEK_SET not
19874         defined.
19875         (java_init_lex): Rewritten.
19876         (java_sneak_unicode): Modified current unicode access in current line.
19877         (java_unget_unicode): Likewise.
19878         (java_allocate_new_line): New allocation management.
19879         (java_read_char): Modified access and storage of unget_utf8_value.
19880         New way of processing current unicode.
19881         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
19882         (java_get_unicode): Now use the parser context.
19883         (java_lineterminator): Likewise.
19884         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
19885         of the reentrant parser implementation. Function now use the
19886         parser context data structure and java_lval. Fixed production of
19887         the float and double constant "out of range" error message. Fixed
19888         obstack use. Return integer value when hitting a modifier. Now
19889         return type for TRUE, FALSE and other predefined types. Return
19890         identifier as a TREE_LIST list containing the current line context
19891         as the TREE_VALUE sub-node.
19892         (java_unicode_2_utf8): Fixed typo in declaration.
19893         (java_lex_error): Now use the parser context data structure.
19894         *lex.h: Added 1998 time stamp.
19895         (struct java_line): New fields ref_count and next.
19896         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19897         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
19898         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
19899         *parse.h: Added 1998 time stamp.
19900         (java_parse_source_file): Renamed from parse_source_file.
19901         (YYERROR_NOW, YYNOT_TWICE): Fixed.
19902         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
19903         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
19904         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
19905         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
19906         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
19907         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
19908         (struct parser_ctxt): New data structure to keep the parser context.
19909         *parse.y: Added 1998 time stamp, got rid of static global variables.
19910         (java_error_count, ctxp): New global variables.
19911         (%union): New value field.
19912         (numeric_type, integral_type): Rules removed.
19913         (primitive_type): Rule defined to handle integral, float, double and
19914         boolean types.
19915         (qualified_name, package_declaration,
19916         single_type_import_declaration, type_import_on_demand_declaration,
19917         modifiers, class_declaration, super, interfaces,
19918         interface_type_list, class_body, field_declaration,
19919         field_declaration, variable_declarators, variable_declarator,
19920         variable_declarator_id, method_declaration, method_header,
19921         formal_parameter_list, formal_parameter, method_body, block,
19922         static, interface_declaration, extends_interfaces,
19923         abstract_method_declaration, local_variable_declarators): Rules now
19924         define actions.
19925         (force_error, do_warning): New global statics.
19926         (push_parser_context, parser_context_save_global,
19927         parser_context_restore_global, pop_parser_context): New functions.
19928         (yyerror): Now uses the global parser context. Fixed use of obstack.
19929         (parse_error, parse_error_context, parse_warning_context,
19930         java_accstring_lookup, redefinition_error, check_modifiers,
19931         parser_add_interface, create_interface, create_class, find_field,
19932         duplicate_declaration_error, register_fields, method_header,
19933         check_modifiers_consistency, check_abstract_method_header,
19934         method_declarator, parser_qualified_classname,
19935         parser_check_super_interface, parser_check_super,
19936         parser_chain_incomplete_item, java_check_circular_reference,
19937         layout_class_from_source, java_complete_class,
19938         complete_method_decl, resolve_class, complete_class_report_errors,
19939         java_check_final, check_method_redefinition,
19940         java_check_regular_methods, java_check_abstract_methods,
19941         java_check_methods, lookup_java_interface_method2,
19942         lookup_java_method2, lookup_cl, find_name_in_single_imports,
19943         process_imports, find_in_imports, read_import_entry,
19944         read_import_dir, find_in_imports_on_demand,
19945         check_pkg_class_access, not_builtin_p, declare_local_variables,
19946         source_start_java_method, java_generate_parsed_class): New
19947         functions.
19948         *typeck.c: (signature_include_return): New global variable.
19949         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
19950         to add the function returned type in the signature.
19951
19952 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
19953
19954         * jcf-io.c (open_in_zip): Use strncmp and LEN.
19955
19956 1998-01-29  Dave Brolley  <brolley@cygnus.com>
19957
19958         * Make-lang.in (java.info): Added.
19959         (java.install-info): Added
19960
19961 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
19962
19963         * Makefile.in (clean): Also remove java/parse.c.
19964
19965 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
19966
19967         Add a pair of -fbounds-check/-fno-bounds-check options.
19968         * lang.c (lang_decode_option): Add code to grok arguments.
19969         (flag_bounds_check): Add decl.
19970         (lang_f_options): New array w/ the option in it.
19971         * java-tree.h (flag_bounds_check): Add decl.
19972         * lang-options.h: New file.
19973         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
19974         of a static macro value.
19975         (JAVA_ARRAY_EXCEPTION): Delete macro.
19976
19977 1998-01-23  Per Bothner  <bothner@cygnus.com>
19978
19979         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
19980         * expr.c (build_anewarray):  Add missing promote_type.
19981
19982 1998-01-22  Per Bothner  <bothner@cygnus.com>
19983
19984         Add array types with known length to optimize bounds checking.
19985         * typeck.c (build_java_array_type):  Take length parameter.
19986         (java_array_type_length, build_prim_array_type):  New functions.
19987         * java-tree.h:  Update for new functions.
19988         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
19989         * class.c:  Use build_prim_array_type.
19990         * expr.c (can_widen_reference_to):  Handle known-length array types.
19991         (verify_jvm_instructions):  Keep track of integer push instructions
19992         followed by newarray/anewarray, so we can build known-length arrays.
19993         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
19994         (java_array_data_offset):  New function.
19995         (build_java_array_length_access):  New function.  Optimize if constant.
19996         (build_java_arrayaccess):  Constant fold bounds check.
19997         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
19998         (build_newarray, build_anewarray):  New functions.
19999         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20000         * verify.c (merge_types):  Handle known-lengh array types.
20001
20002 1998-01-19  Per Bothner  <bothner@cygnus.com>
20003
20004         * expr.c (expand_byte_code):  Fix performace bug, which caused
20005         searching linenumber_table to be linear rather than constant.
20006
20007 1997-12-12  Per Bothner  <bothner@cygnus.com>
20008
20009         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20010
20011         * decl.c, java-tree.h (soft_fmod_node):  New global.
20012         * decl.c (init_decl_processing):  Define __builtin_fmod.
20013         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20014         using __builtin_fmod.
20015
20016 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20017
20018         * keyword.h: New file, output of keyword.gperf as processed by
20019         gperf.
20020         * lex.c (java_lex_init): Initialize java_error_flag.
20021         * parse.c (YYERROR_NOW): Uses java_error_flag.
20022         * parse.y: New static java_error_flag. Useless definition of
20023         buffer_error gone.
20024         * parse.y (java_error): Portable error recovery using
20025         java_error_flag (not yet completely tuned).
20026
20027 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20028
20029         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20030
20031 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20032
20033         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20034         (parse.c, lex.c, keyword.h): New rules for Java source code
20035         front-end.
20036         * parse.c: Renamed into jcf-parse.c.
20037         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20038         * keyword.gperf: New file, Java keywords.
20039         * parse.y: New file, Java language grammar.
20040         * parse.h: New file, Java language grammar definitions.
20041         * lex.c: New file, Java language lexer.
20042         * lex.h: New file, Java language lexer definitions.
20043
20044 1997-12-03  Per Bothner  <bothner@cygnus.com>
20045
20046         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20047         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20048         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20049         * expr.c (expand_java_field_op):  Check for invalid assignment
20050         to final field.
20051
20052         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20053
20054 1997-10-27  Per Bothner  <bothner@cygnus.com>
20055
20056         * verify.c (verify_jvm_instructions):  When processing a handler,
20057         attempt to set the current_subr to the right value.
20058         (More complicated code combines Sep 17 and Oct 22 versions.)
20059
20060 1997-10-24  Per Bothner  <bothner@cygnus.com>
20061
20062         * class.c (push_class):  Figure out (guess) name of source file.
20063         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20064         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20065         (parse_class_file):  Change return type from int to void.
20066         Call debug_start_source_file/debug_end_source_file.
20067
20068         * expr.c (build_java_binop):  Fix masking 2nd operand.
20069         * decl.c (init_decl_processing):  Set sizetype first.
20070
20071 1997-10-22  Per Bothner  <bothner@cygnus.com>
20072
20073         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20074         (Revert Sep 17 change.)
20075
20076 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20077
20078         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20079         .class extension in their name and fix thing so we don't process
20080         them parse_zip_file_entries().
20081         (parse_zip_file_entries): Cleaned unused local variables.
20082
20083 1997-10-20  Per Bothner  <bothner@cygnus.com>
20084
20085         * expr.c (can_widen_reference_to):  Allows equal array element types.
20086         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20087         * jcf-dump.c (RET):  Get (and print) index.
20088
20089         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20090         Promote element type to POINTER_TYPE.
20091
20092 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20093
20094         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20095         find_in_current_zip, jcf_figure_file_type): Moved from
20096         jcf-reader.c to parse.c.
20097         * zextract.c: (read_zip_archive): takes file_comment_length possible
20098         field into account.
20099
20100 1997-10-20  Per Bothner  <bothner@cygnus.com>
20101
20102         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20103
20104         * verify.c (merge_types):  Handle array types even better ...
20105
20106 1997-10-17  Per Bothner  <bothner@cygnus.com>
20107
20108         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20109
20110         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20111         * class.c (make_class_data):  Don't build fields_decl if no fields.
20112         When building fields_decl, skip if DECL_ARTIFICIAL.
20113
20114         * expr.c (java_stack_swap):  Update stack_type_map.
20115         * verify.c (merge_types):  Handle array types better.
20116
20117 1997-10-15  Per Bothner  <bothner@cygnus.com>
20118
20119         * class.c (add_field):  Don't promote short integral fields to
20120         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20121         * expr.c (push_value):  Promote and convert short integral values.
20122
20123         * decl.c, java-tree.h (integer_two_node):  New constant node.
20124         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20125
20126 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20127
20128         * class.c (append_gpp_mangled_type): Use function argument
20129         unpromoted type to generate mangled name.
20130
20131 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20132
20133         * constants.c (build_constant_data_ref): Now uses current_class
20134         instead of main_class.
20135         (build_constants_constructor): Now uses current_class instead of
20136         main_class.
20137         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20138         of the global variable SeepZipFiles done here.
20139         * zextract.c (read_zip_archive): extra_field optional field taken
20140         into account while computing the position of the class file in the
20141         archive.
20142         * verify.c (verify_jvm_instructions): Use current_jcf to search
20143         the constant pool.
20144         * parse.c (load_class): First search for the class to load in the
20145         current zip file. Saves current_jcf (restored before returning
20146         from that function). Don't call JCF_FINISH in the class was found
20147         in the current ZIP file.
20148         (jcf_parse): If the class was found in the current ZIP file, save
20149         its tree_constant_pool (for later reuse).
20150         (parse_class_file): New function. Process each method defined in
20151         the current class and record the class as to be later registered.
20152         (yyparse): Rewritten. Figure the type of the current file and switch
20153         accordingly.
20154         * lang.c: New global variable current_jcf.
20155         (lang_init): Removed compiling_from_source test (done later, in
20156         yyparse). Removed call the jcf_parse ().
20157         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20158         (typedef struct JCF): New fields seen_in_zip (to mark a class found
20159         in the current ZIP file) and zip_offset (offset to the class data in
20160         the current zip file).
20161         * jcf-reader.c: zipfile.h included.
20162         localToFile: New ZipFileCache static global variable
20163         (parse_zip_file_entries): New function. Browse the current ZIP
20164         file directory and process each class found.
20165         (process_zip_dir): New function. Register each class found in the
20166         ZIP file directory. The class aren't parsed but a valid JCF is
20167         link to each of them.
20168         (find_in_current_zip): New function. Search for a class in the
20169         current ZIP file directory. If found, prepare the class so that it
20170         can be loaded.
20171         (jcf_figure_file_type): New function. Examine the file structure
20172         to figure a class file, a ZIP file. If none of these categories are
20173         matched, a source file is assumed.
20174         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20175         SeenZipFile: New global variable.
20176         (open_in_zip): Use zipmember's length to accelerate the search for
20177         a member. If zipmember was NULL and zip file successfully read,
20178         return 0.
20179         * java-tree.h: New global variable current_jcf declared.  Added
20180         declaration for current_constant_pool_tags, current_constant_pool_data,
20181         current_constant_pool_length, current_constant_pool_data_ref.
20182         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20183         store the JCF of classes seen in a zip file) and tree *constant_pool
20184         (to save a loaded class constant pool). current_class declared here.
20185         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20186         retrieve method_ref_constant.
20187         (PUSHC): java_push_constant_from_pool now uses current_jcf.
20188         (OBJECT): get_class_constant now uses current_jcf.
20189         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20190         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20191         (expand_invoke): Now uses current_class instead of main_class
20192         (build_class_init): Now uses current_class instead of main_class
20193         * class.c: New static global variable registered_class.
20194         (register_class): New function.
20195         (emit_register_class): Modified to use registered_class instead of
20196         main_class
20197         (is_compiled_class): Now take into account class seen in the archive.
20198
20199 1997-10-06  Per Bothner  <bothner@cygnus.com>
20200
20201         * except.h:  Renamed to: java-except.h.
20202         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
20203         * except.c:  Add semi-working (commented out) implementation.
20204
20205         * expr.c (expand_iinc):  Add needed flush_quick_stack.
20206         * parse.c (set_source_filename):  New function.
20207         (give_name_to_class):  Set input_filename from package.classname.java.
20208
20209         * jcf-io.c (find_class):  Don't look first in ".".
20210
20211 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20212
20213         * zextract.c (read_zip_archive): Now takes into account the
20214         extra_field field.
20215         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20216
20217 1997-09-20  Per Bothner  <bothner@cygnus.com>
20218
20219         * constants.c, java-tree.h (build_internal_class_name):  New function.
20220         (alloc_class_constant):  Re-implement using build_internal_class_name.
20221         * class.c (make_class_data):  Likewise.
20222         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
20223
20224 1997-09-17  Per Bothner  <bothner@cygnus.com>
20225
20226         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
20227         to NULL before pushing an exception handler target.
20228
20229         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
20230         (java_stack_swap, java_stack_dup):  Re-write to be safe from
20231         clobbering registers.
20232         (build_class_init):  New function.
20233
20234 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20235
20236         * typeck.c (build_java_array_type): Temporary use
20237         permanent_obstack to create the array 'length' field.
20238         * expr.c (lookup_label): Temporay use permanent_obstack to create
20239         label if not found.
20240         * class.c (push_super_field): Tempory use permanent_obstack.
20241
20242 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20243
20244         * typeck.c (type_for_mode): Now handles double_type_node and
20245         float_type_node.
20246         * verify.c (verify_jvm_instructions): The instruction following
20247         the wide bytecode is checked. OPCODE_ret added to the list of
20248         wide.
20249
20250 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20251
20252         * class.c (make_class): Temporary use permanent_obstack. Set the
20253         class CLASS_P field to 1.
20254         (push_class): Temporary use permanent_obstack.
20255         (set_super_info): Temporary use permanent_obstack.
20256         (add_method): Temporary use permanent_obstack, set
20257         METHOD_TRANSIENT().
20258         (add_field): Temporary use permanent_obstack. Sets
20259         FIELD_VOLATILE() and FIELD_TRANSIENT().
20260         (build_class_ref): Temporary use permanent_obstack if the class
20261         isn't compiled.
20262         (build_static_field_ref): Temporary use permanent_obstack when
20263         creating field's rtl.
20264         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20265         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20266         and fields. Function finalized, as far as flag handling.
20267         (push_class_static_dummy_field): Temporary use permanent_obstack.
20268         (emit_register_class): Force generation of class registration at
20269         -O3 or deeper.
20270         * decl.c (end_java_method): Call permanent_allocation() before
20271         returning.
20272         * expr.c (can_widen_reference_to): Added comment to interface
20273         handling, fixed typo.
20274         (lookup_field): Now uses CLASS_P() to correct FIXME
20275         (expand_invoke): Verification on public && !static &&
20276         !abstract moved into soft_lookupinterfacemethod (kaffe).
20277         Use Object class dtable if objectref is an array when expanding
20278         invokeinterface.
20279         (java_push_constant_from_pool): Temporary use permanent_obstack
20280         for CONSTANT_string
20281         * parse.c (get_ref_constant): Temporary use permanent_obstack to
20282         create constant references.
20283         (get_constant): Temporary use permanent_obstack to create constant.
20284         (load_class): Temporary use permanent_obstack to load class.
20285         (jcf_parse): Temporary use permanent_obstack to perform class
20286         layout.
20287         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20288         (build_java_signature): Temporary use permanent_obstack.
20289         * verify.c: (verify_jvm_instruction): removed unnecessary verification
20290         on ACC_SUPER flag.
20291         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20292         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20293         (CLASS_P): Defined
20294
20295 1997-09-11  Per Bothner  <bothner@cygnus.com>
20296
20297         * class.c (append_gpp_mangled_type):  Fix typo.
20298         (emit_register_class):  Use main_class to get class object, rather
20299         than looking for no-longer-existing static decl starting with _CL.
20300         * typeck.c (parse_signature_type):  Promote array element type
20301         if it is a RECORD_TYPE.
20302
20303 1997-09-10  Per Bothner  <bothner@cygnus.com>
20304
20305         * class.c (push_class_static_dummy_field):  New function.
20306         (mangle_static_field):  New. Do G++-style mangling of static fields.
20307         (layout_class):  Mandle static fields here, not in add_field.
20308         (build_class_ref):  The class object is now a dummy static field.
20309         * decl.c (find_local_variable):  Look for best, instead of first match.
20310         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
20311         (build_java_athrow):  Don't check here if exception is Throwable.
20312         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
20313         (TYPE_USED):  Removed.  No longer used ...
20314         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
20315         * verify.c (push_pending_label):  New function.
20316         (push_pending_block):  Renamed to check_pending_block.
20317         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
20318         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
20319         re-checking possible handlers) after a store (less wasted work).
20320         Check for null handler (finally) before calling add_handler.
20321         Various changes to (finally?) correctly handle try/finally.
20322
20323 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
20324
20325         * class.c: Include stdio.h.
20326
20327 1997-09-04  Per Bothner  <bothner@cygnus.com>
20328
20329         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20330         to make sure class is initialized before static/special invoke.
20331
20332         * verify.c (verify_jvm_instructions):  On a store instruction,
20333         call find_local_variable to force pre-allocation of decl and rtx.
20334         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
20335
20336 1997-09-03  Per Bothner  <bothner@cygnus.com>
20337
20338         * class.c (build_class_ref):   Strip off "promoted_" if need be.
20339         (make_field_value): Call build_java_signature when needed.
20340         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
20341         * expr.c (build_java_athrow):  Don't push_value of exception.
20342         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
20343         match specification of [fd]cmp[lg] for NaNs.
20344         (expand_byte_code):  Add support for exception handler ranges.
20345         * except.c:  Add skeleton for EH code-generation.
20346         * verify.c (merge_types):  Treat all promoted integral types as equal.
20347         * constants.c (build_constants_constructor):  To force creation of
20348         current_constant_pool_data_ref, call build_constant_data_ref.
20349
20350         * javaop.def (lload):  Fix typo.
20351         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
20352
20353 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
20354
20355         * parse.c: Don't include function.h.
20356
20357 1997-08-27  Per Bothner  <bothner@cygnus.com>
20358
20359         * except.[ch]:  New files.
20360         * Makefile.in (JAVA_OBJS):  Add except.o
20361         * expr.c:  Temporary warning about unimplemented exceptions.
20362         * verify.c:  Verify exception handlers.
20363
20364         * jcf-dump.c (disassemble_method):  Print exception table.
20365
20366 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20367
20368         * expr.c (verify_jvm_instructions): Started a thorough
20369         verification of invoke* bytecodes.
20370         (expand_byte_code): flush quick stack if PC is the target of a
20371         branch.  and undef RET (conflicting with config/i386/i386.h).
20372         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
20373         used.
20374         (expand_invoke): Now handles invokeinterface and do more
20375         verification according to the bytecode.
20376         (lookup_field): Don't try to load the class if processing
20377         dtable_type.
20378         (can_widen_reference_to): Now handles interfaces.
20379         * decl.c (init_decl_processing): New global variable
20380         soft_lookupinterfacemethod_node, declared in java-tree.h.
20381         Call set_super_info on string_type_node.
20382         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
20383         defined.
20384         * class.c (set_super_info): Fills the CLASS_* flags according to
20385         access_flags.
20386         (get_access_flags_from_decl): Handles all class flags.
20387
20388 1997-08-26  Per Bothner  <bothner@cygnus.com>
20389
20390         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
20391         * parse.c (yyparse):  Check for abstract method, and missing code.
20392         * expr.c (expand_byte_code):  Change interface.
20393         * lang.c (put_decl_node):  Print promoted types prettier.
20394         * verify.c (verify_jvm_instruction):  Change interface.
20395         Partial support for scanning exception table.
20396         For load instructions, handle promoted integral types.
20397
20398 1997-08-21  Per Bothner  <bothner@cygnus.com>
20399
20400         * verify.c:  New file, with contents moved from expr.c.
20401         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
20402         * typeck.c (is_array_type_p):  Moved here from expr.c.
20403         * java-tree.h:  Add some now-needed function declarations.
20404         * Makefile.in (JAVA_OBJS): Added verify.o.
20405
20406 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20407
20408         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20409         METHOD_ABSTRACT flag.
20410
20411         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
20412         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
20413         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
20414
20415         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20416         variables.
20417         (start_java_method): Hook for SYNCHRONIZED methods.
20418
20419         * expr.c (build_java_jsr, build_java_ret): New functions
20420         (JSR,PRE): New macros
20421         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
20422         (verify_jvm_instructions): tableswitch, lookupswitch,
20423         monitorenter, monitorexit, goto_w: verified.
20424         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
20425         (build_java_monitor): New function.
20426         (MONITOR_OPERATION): Modified to call build_java_monitor()
20427         (verify_jvm_instructions): Started a thorough verification of
20428         invoke* bytecodes.
20429
20430 1997-08-19  Per Bothner  <bothner@cygnus.com>
20431
20432         Support verification of jsr/ret subroutines (used for try/finally).
20433         * decl.c (return_address_type_node):  New type node.
20434         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
20435         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
20436         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
20437         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
20438         TYPE_USED):  New macros for special types in type_map.
20439
20440         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
20441         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
20442         BCODE_JUMP_TARGET.
20443         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
20444
20445         * expr.c (can_widen_reference_to):  New function.
20446         (pop_type):  Use it.
20447         (merge_type_state):  Support handling start of subroutine.
20448         (push_pending_block):  Return char* error message, instead of calling
20449         fatal on an error.  Also handle subroutines.
20450         (verify_jvm_instructions):  Handle errors from push_poending_block.
20451         Support jsr and ret instructions.
20452
20453 1997-08-19  Per Bothner  <bothner@cygnus.com>
20454
20455         * jcf-io.c (find_classfile):  Fix thinko.
20456         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
20457
20458 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
20459
20460         * Makefile.in (BISON): Remove.
20461
20462 1997-08-07  Per Bothner  <bothner@cygnus.com>
20463
20464         * Makefile.in:  Convert to autoconf.
20465         * config-lang.in (outputs):  Added java/Makefile.
20466
20467         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20468         Rename cc1java to jc1.
20469
20470         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
20471         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
20472
20473         * class.c (class_depth):  Do load_class if needed.
20474
20475         Mostly better verification.
20476         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
20477         (init_decl_processing):  Change return type of soft_checkcast.
20478         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
20479         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
20480         lang_print_error):  New functions.
20481         (lang_init):  Set global hook print_error_function to lang_print_error.
20482         * expr.c:  In the type_map ptr_type_node is only used for null now.
20483         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
20484         (merge_types):  Dererence pointer to record types before comparing.
20485         (decode_newarray_type, merge_types):  On error just return NULL.
20486         (build_java_binop):  Add preliminary implementation (with warning)
20487         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
20488         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
20489         (expand_compare, expand_java_goto, expand_java_call):  Don't
20490         push_pending_block, since that only makes sense when verifying.
20491         (merge_type_state):  Different return codes.
20492         (push_pending_block):  A block may need to be verified more than once.
20493         (expand_byte_code):  Warn about unused code at code generation time.
20494         (verify_jvm_instruction):  Changed logic, since code may need to be
20495         re-verified if type-state has changed.  Also, better error handling.
20496         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
20497         Improve newarray, anewarray, ?aload, athrow,
20498         * java-tree.h (LABEL_CHANGED):  New macro.
20499
20500 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20501
20502         * decl.c (soft_athrow_node): New global variable initialized.
20503         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
20504         * typeck.c (convert): Added support for REAL_TYPE.
20505         (convert_to_char): New function.
20506         (convert): Handle CHAR_TYPE.
20507         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
20508         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
20509         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
20510         promoted type.
20511         (verify_jvm_instructions): Added break a the end of bogus unop: label.
20512         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
20513         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
20514         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
20515         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
20516         to Use The Right Things.
20517         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
20518         compatible with INT. BOOLEAN is made equivalent to BYTE.
20519         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
20520         OPCODE_ifnonnull): Now supported.
20521         (build_java_athrow): New function.
20522
20523 1997-08-04  Per Bothner  <bothner@cygnus.com>
20524
20525         Rename method name <init> to match G++ (and fix mangling).
20526         * class.c (layout_class):  Replace method name of <init> by class name.
20527         (make_method_value):  Do inverse renaming of constructor from <init>.
20528         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
20529         * typeck.c (lookup_java_constructor):  New function.
20530         * expr.c (expand_invoke):  If method_name is <init>, call
20531         lookup_java_constructor to find constructor.
20532
20533         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
20534
20535 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20536
20537         * parse.c (get_class_constant): Modified to handle array "classes"
20538         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
20539         wide type.
20540         (convert): Modified to handle real type.
20541         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
20542         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
20543         variables declared.
20544         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
20545         soft_multianewarray, soft_newarray_node, soft_throw_node): New
20546         global variables initialized.
20547         (find_local_variable): Handles the case of a pointer
20548         (end_java_method): Restore the use of one more scope
20549         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
20550         build_java_array_length_access, expand_java_arrayload,
20551         expand_java_arraystore, expand_java_array_length,
20552         expand_java_multianewarray, expand_java_anewarray,
20553         build_java_check_indexed_type, is_array_type_p,
20554         build_java_throw_out_of_bound_exception): New functions.
20555         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
20556         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
20557         OPCODE_<t>aload): Implemented code for verification.
20558         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
20559         ARRAY_NEW_MULTI): Macro defined.
20560         (CONVERT): Modified to invoke convert().
20561         (case OPCODE_aload2): Fixed index typo from 2 to 1.
20562
20563 1997-07-31  Per Bothner  <bothner@cygnus.com>
20564
20565         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
20566         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
20567         (make_class_data):  Field name needs '/' as package prefix.
20568         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
20569
20570 1997-07-25  Per Bothner  <bothner@cygnus.com>
20571
20572         Implement debug information for local variables.
20573         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
20574         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
20575         DECL_LOCAL_SLOT_CHAIN):  New macros.
20576         (struct lang_decl_var):  New type.
20577         * parse.c (give_name_to_locals):  Move to decl.c.
20578         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
20579         (start_java_method):  Re-write parameter handling.
20580         (pending_local_decls):  New global variable.
20581         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
20582         (find_local_variable):  Accept pc so we can skips decls not in range.
20583         (struct binding_level):  Add end_pc field.
20584         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
20585         (various):  Change so current pc gets passed to find_local_variable.
20586
20587         * decl.c (init_decl_processing):  Re-arrange fields in
20588         class_type_node and and method_type_node to match kaffe 0.9.1.
20589         * class.c (make_method_value, make_class_data):  Update
20590         initializations to match.
20591
20592 1997-07-16  Per Bothner  <bothner@cygnus.com>
20593
20594         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
20595         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
20596         (push_super_field):  New function.
20597         (make_class_data):  Handle inheritance of class static initializer.
20598         (layout_class):  New name mangling.
20599         * constants.c (build_constant_data_ref):  Init type of data array
20600         to a one-element array.
20601         (build_constants_constructor):  Set DECL_SIZE from complete array type.
20602         * decl.c:  Rename class_type, object_type etc to class_type_node,
20603         object_type_node etc.  Make former inherit from latter.
20604         * expr.c (expand_invoke):  Add cast of function address.
20605         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
20606         * parse.c (yyparse):  Don't call layout_class here.
20607         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
20608
20609 1997-06-14  Per Bothner  <bothner@cygnus.com>
20610
20611         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
20612         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
20613         (alloc_class_constant):  New.
20614         * expr.c (expand_invoke):  Make sure method's class is initialized.
20615         * class.c (interits_from_p, emit_register_class):  New functions.
20616         * parse.c (yyparse):  Call emit_register_class.
20617
20618 1997-06-09  Per Bothner  <bothner@cygnus.com>
20619
20620         * constants.c:  New file, to handle constant pool.
20621         * Makefile.in (JAVA_OBJS):  Add constants.o.
20622         * decl.c (init_decl_processing):  Update, fix, finish various structs.
20623         (pushdecl_top_level):  New.
20624         * parse.c (layout_class):  Moved to class.c.
20625         * expr.c (java_push_constant_from_pool):  New function.
20626         * class.c (build_class_ref):  Make work fully
20627         (make_class_data):  Emit super-class, constant pool, interface vector.
20628
20629 1997-06-03  Per Bothner  <bothner@cygnus.com>
20630
20631         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
20632         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
20633         * class.c (class_depth):  New function.
20634         (lookup_named_class):  Replaced by new function lookup_class.
20635         * decl.c (object_type_node, string_type_node):  New.
20636         Remove various types that we no longer need.
20637         * expr.c (verify_jvm_instructions):  New separate verifier pass.
20638         (push_type, pop_type):  New functions for verifier.
20639         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
20640         (expand_byte_code):  Simplify, since we assume already verified.
20641         (expand_invoke):  Now mostly works.
20642         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
20643         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
20644         * parse.c:  Wait to allocate class object until we know its name.
20645         (layout_class):  Calculate DECL_VINDEX for each virtual method.
20646         * typeck.c (get_array_type):  Rename to ...
20647         (build_java_array_type):  ... and provide working implementation.
20648         (build_java_signature):  New function - build Java signature of type.
20649         (set_java_signature):  New function - cache signature with type.
20650         (lookup_java_method):  New function.
20651
20652 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
20653
20654         * class.c (ident_subst):  Take extra SUFFIX parameter.
20655         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
20656         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
20657         (build_class_ref):  Actually implement.
20658         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
20659         * decl.c (builtin_function):  New.
20660         (init_decl_processing):  Update for current Kaffe.  Declare some
20661         builtin Kaffe functions.
20662         * expr.c (build_address_of):  New.
20663         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
20664         Renamed (from expand_java_new etc), and added working implementations.
20665         (build_field_ref):  Now also handle static fields.
20666         (expand_invoke):  Implement invokestatic, and start implement rest.
20667         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
20668         * javaop.def:  Rename invokevirt -> invokevirtual.
20669         * lang.c (use_handles):  Removed.
20670         * parse.c:  Add support for ConstantValue attribute.
20671         Handle nested loading of a class.  (JPOOL_UTF):  New.
20672
20673 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
20674
20675         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
20676
20677 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
20678
20679         * Make-lang.in (java.install-man):  New empty rule.
20680         * typeck.c (set_local_type):  New function.
20681         * expr.c (STORE_INTERNAL):  Call find_local_variable,
20682         not find_stack_slot.  Call set_local_type.
20683
20684 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
20685
20686         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
20687         and building RECORD_TYPE CONSTRUCTORs.
20688         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
20689
20690         * lang.c (use_handles):  Change the default to 0.
20691         * decl.c:  Define and build class_type, field_type, utf8const_type.
20692         * class.c (make_class_data, make_field_value,
20693         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
20694         hashUtf8String, strLengthUtf8, mangled_classname:
20695         Functions to build reflective data structures.
20696         * parse.c (yyparse):  Call make_class_data.
20697
20698         * jcf-io.c (open_class, find_classfile):  New functions.
20699         * jcf-dump.c:  Support reading classfile from explicitly-named
20700         class file (without CLASSPATH searching).
20701
20702 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
20703
20704         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
20705         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
20706         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
20707         (get_constant):  Now trivial for CONSTANT_Utf8.
20708
20709         * jcf.h:  Make NEW_CPOOL the default.
20710         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
20711
20712 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
20713
20714         New directory.