OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2007-08-17  Tom Tromey  <tromey@redhat.com>
2
3         * java-tree.h (LABEL_TYPE_STATE): Removed.
4         (load_type_state): Removed.
5         (LABEL_PC): Removed.
6         (LABEL_VERIFIED): Removed.
7         (type_states): Declare.
8         * expr.c (type_states): New global.
9         (load_type_state): Now static.  Use type_states.  Changed
10         argument.
11         (lookup_label): Don't set LABEL_PC.
12         (expand_byte_code): Don't use LABEL_VERIFIED.
13         (note_instructions): Initialize type_states.
14         * verify-glue.c (vfy_note_stack_depth): Rewrote.
15         (vfy_note_stack_type): Use type_states.
16         (vfy_note_local_type): Likewise.
17
18 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19
20         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
21         * jcf.h (JCF_FINISH): Likewise.
22
23 2007-07-31  Nick Clifton  <nickc@redhat.com>
24
25         * java-gimplify.c: Change copyright header to refer to version 3
26         of the GNU General Public License and to point readers at the
27         COPYING3 file and the FSF's license web page.
28         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
29         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
30         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
31         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
32         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
33         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
34         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
35
36 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
37
38         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
39
40 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
41
42         * lang.c (java_get_callee_fndecl): Constify.
43
44 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
45
46         * mangle.c (set_type_package_list): Constify.
47         * verify-glue.c (vfy_make_string): Delete.
48         * verify.h (vfy_make_string): Likewise.
49
50 2007-07-26  Tom Tromey  <tromey@redhat.com>
51
52         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
53         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
54         EXIT_BLOCK_LABELED_BLOCK): Likewise.
55         * lang.c (java_tree_inlining_walk_subtrees): Update.
56         (java_dump_tree): Likewise.
57         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
58         Remove.
59         * decl.c (push_labeled_block, pop_labeled_block): Remove.
60         * java-gimplify.c (java_gimplify_labeled_block_expr,
61         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
62         (java_gimplify_expr): Update.
63
64 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
65
66         * class.c (java_treetreehash_hash, java_treetreehash_compare):
67         Constify. 
68         * expr.c (type_assertion_eq): Likewise.
69         * jcf-io.c (compare_path): Likewise.
70         * jcf-parse.c (cmpstringp): Likewise.
71         * verify-impl.c (get_one_type, compute_argument_types,
72         compute_return_type): Likewise. 
73
74 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
75
76         PR target/32462
77         PR libgcj/32465
78         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
79
80 2007-07-12  Richard Guenther  <rguenther@suse.de>
81
82         * expr.c (expand_java_return): RETURN_EXPR has void type.
83         (build_jni_stub): Likewise.  Use a comparison against zero
84         for null-pointer test in COND_EXPR.
85         (build_field_ref): Build POINTER_PLUS_EXPR with correct
86         type.  Convert result instead.
87         (build_invokevirtual): Likewise.
88
89 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
90
91         PR 32617
92         * lang.c (java_init): Remove setting of force_align_functions_log.
93         * class.c (add_method_1): Set DECL_ALIGN of non-static method
94         to cope with ptrmemfunc_vbit_in_pfn.
95
96 2007-07-03  David Daney  <ddaney@avtrex.com>
97
98         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
99         include path.
100         (doc/gcj.dvi): Same.
101         (doc/gcj.pdf): Same.
102         (java/index.html): Same.
103
104 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
105
106         * class.c (make_class_data): Build the index in sizetype.
107         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
108         adding to a pointer type.
109         (build_symbol_entry): Likewise.
110         * expr.c (build_java_arrayaccess): Likewise.
111         (build_field_ref): Likewise.
112         (build_known_method_ref): Likewise.
113         (build_invokevirtual): Likewise.
114         * except.c (build_exception_object_ref): Do a
115         NEGATIVE and then a POINTER_PLUS_EXPR instead
116         of a MINUS_EXPR.
117
118 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
119
120         * typeck.c (java_signed_type): Remove.
121         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
122         * java-tree.h (java_signed_type): Remove.
123
124 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
125
126         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
127         (print_constant): Likewise.
128
129 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
130
131         * expr.c (build_java_binop): Use unsigned_type_for instead of
132         java_unsigned_type.
133         * java-tree.h (java_unsigned_type): Remove.
134         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
135         * typeck.c (java_unsigned_type): Remove.
136
137 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
138
139         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
140         instead of checking GIMPLE_STMT_P in chain_next.
141
142 2007-04-06  Colin Walters  <walters@redhat.com>
143
144         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
145         * jcf-io.c (open_class): Copy 'filename'.
146
147 2007-04-03  Andrew Haley  <aph@redhat.com>
148
149         * jvgenmain.c (main): Change main to use class$, not class$$.
150         (do_mangle_classname): Likewise.
151         * class.c (hide): New function.
152         (add_field): Hide everything that shouldn't be visible outside a
153         DSO.
154         (build_static_class_ref): Likewise.
155         (build_classdollar_field): Likewise.
156         (make_class_data): Likewise.
157         (layout_class_method): Likewise.
158         * expr.c (special_method_p): New function.
159
160         * class.c (push_class): Don't bogusly guess the source filename.
161         * jcf-parse.c (give_name_to_class): Don't set input_location from
162         DECL_ARTIFICIAL decls.
163
164 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
165
166         * typeck.c (java_signed_or_unsigned_type): Removed.
167         (java_signed_type): use get_signed_or_unsigned_type instead of
168         java_signed_or_unsigned_type.
169         (java_unsigned_type): Ditto.
170         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
171         * java-tree.h (java_signed_or_unsigned_type): Removed.
172
173 2007-03-26  Tom Tromey  <tromey@redhat.com>
174
175         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
176         (java.maintainer-clean): Likewise.
177         (java.install-man): Likewise.
178         (.INTERMEDIATE): Removed grmiregistry.pod.
179         (grmiregistry.pod): Removed.
180         * gcj.texi (Invoking gcjh): Removed.
181         (Invoking gjnih): Likewise.
182         (Invoking grmiregistry): Likewise.
183         (direntry): Updated.
184         (Top): Likewise.
185         (which-gcj): Removed.
186
187 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
188
189         * Make-lang.in: Add install-pdf target as copied from
190         automake v1.10 rules.
191
192 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
193
194         * gcj.texi: Standardize title page.
195
196 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
197
198         * class.c: Fix a comment typo.
199
200 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
201             Brooks Moses  <brooks.moses@codesourcery.com>
202             Lee Millward  <lee.millward@codesourcery.com>
203
204         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
205         of build3.
206         (BUILD_MONITOR_EXIT): Likewise.
207
208         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
209         (java_gimplify_modify_expr): Likewise.
210
211         * class.c (cache_this_class_ref): Use build_call_expr.
212         (build_static_field_ref): Likewise.
213         (emit_indirect_register_classes): Likewise.
214         (emit_register_classes): Likewise.
215
216         * resource.c (write_resource_constructor): Use build_call_expr.
217
218         * builtins.c (builtin_creator_function): Change interpretation of
219         the second parameter to be the whole CALL_EXPR instead of the arglist.
220         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
221         (min_builtin): Likewise.
222         (abs_builtin): Likewise.
223         (java_build_function_call_expr): Likewise.
224         (convert_real): Likewise.
225         (UNMARSHAL3): Likewise.
226         (UNMARSHAL4): Likewise.
227         (UNMARSHAL5): Likewise.
228         (build_arglist_for_builtin): Delete.  Fix callers to use
229         build_call_expr instead.
230         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
231         accessors.
232         (compareAndSwapInt_builtin): Likewise.
233         (compareAndSwapLong_builtin): Likewise.
234         (compareAndSwapObject_builtin): Likewise.
235         (putVolatile_builtin): Likewise.
236         (getVolatile_builtin): Likewise.
237         (VMSupportsCS8_builtin): Likewise.
238         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
239         instead of arglist.
240
241         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
242         (build_java_throw_out_of_bounds_exception): Likewise.
243         (java_check_reference): Likewise.
244         (build_java_arraystore_check): Likewise.
245         (build_newarray): Likewise.
246         (build_anewarray): Likewise.
247         (expand_java_multinewarray): Use build_call_list instead of build3.
248         (build_java_monitor): Use build_call_nary instead of build3.
249         (java_create_object): Likewise.
250         (expand_java_NEW): Likewise.
251         (build_instanceof): Likewise.
252         (expand_java_CHECKCAST): Likewise.
253         (build_java_soft_divmod): Likewise.
254         (build_java_binop): Likewise.
255         (build_field_ref): Likewise.
256         (build_class_init): Likewise.
257         (rewrite_arglist_getcaller): Use build_call_expr.
258         (build_invokeinterface):  Use build_call_nary instead of build3.
259         (expand_invoke): Use build_call_list instead of build3.
260         (build_jni_stub): Use build_call_nary, build_call_list, or
261         build_call_expr instead of build3.
262         (expand_java_field_op): Use build_call_expr instead of build3.
263         (force_evaluation_order): Use new CALL_EXPR accessors.
264
265         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
266
267 2007-02-15  David Daney  <ddaney@avtrex.com>
268
269         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
270         (java.maintainer-clean):Add gc-analyze.1.
271         (.INTERMEDIATE): Add gc-analyze.pod.
272         (gc-analyze.pod): New rule.
273         (java.install-man): Install gc-analyze.1
274         * gcj.texi: Add new section for the gc-analyze program.
275
276 2007-02-07  Andrew Haley  <aph@redhat.com>
277
278         * class.c (uncache_this_class_ref): New.
279         * expr.c (build_jni_stub): Initialize the class.
280         (expand_byte_code): Call uncache_this_class_ref after generating
281         code.
282
283 2007-02-06  Tom Tromey  <tromey@redhat.com>
284
285         PR java/30714:
286         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
287
288 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
289
290         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
291
292 2007-02-02  Andrew Haley  <aph@redhat.com>
293
294         * expr.c (expand_byte_code): Call cache_this_class_ref() and
295         cache_cpool_data_ref().
296         Set TYPE_CPOOL_DATA_REF.
297         (cache_cpool_data_ref): New function.
298         * constants.c (build_ref_from_constant_pool): Remove special-case
299         code for flag_indirect_classes.
300         (build_constant_data_ref): Move special-case code for
301         flag_indirect_classes here from build_ref_from_constant_pool.
302         * decl.c (finish_method): Move class initialization from here to
303         cache_this_class_ref.
304         * class.c (cache_this_class_ref): New function.
305         (build_class_ref): Use this_classdollar for the ouput class.
306
307 2007-02-02  David Daney  <ddaney@avtrex.com>
308
309         * class.c (is_compiled_class): Move check to avoid reloading
310         current class.
311         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
312         already set.
313
314 2007-02-01  Andrew Haley  <aph@redhat.com>
315
316         PR java/30641
317         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
318
319 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
320
321         * class.c, jcf-parse.c: Fix comment typos.
322
323 2007-01-30  Tom Tromey  <tromey@redhat.com>
324
325         * gcj.texi (Strings): Fix documentation for JvNewString.
326
327 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
328
329         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
330         typos.
331
332 2007-01-30  Ben Elliston  <bje@au.ibm.com>
333
334         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
335
336 2007-01-29  Tom Tromey  <tromey@redhat.com>
337
338         PR java/30607:
339         * jvspec.c (lang_specific_driver): Handle separate -I argument.
340         * lang.opt (-I): Add 'Separate'.
341
342 2007-01-29  Andrew Haley  <aph@redhat.com>
343
344         * class.c (add_method_1): Mark fndecl as external unless we are
345         compiling it into this object file.
346
347 2007-01-24  Andrew Haley  <aph@redhat.com>
348
349         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
350         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
351
352 2007-01-22  Andrew Haley  <aph@redhat.com>
353
354         * builtins.c (VMSupportsCS8_builtin): New function.
355
356 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
357
358         PR java/30454
359         * jcf-io.c (opendir_in_zip): Close the file
360         and free zipf before returning after an error.
361
362 2007-01-16  Tom Tromey  <tromey@redhat.com>
363
364         * java-tree.def: Added copyright header.
365
366 2007-01-15  Tom Tromey  <tromey@redhat.com>
367
368         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
369         case.
370         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
371         Removed case.
372         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
373         (EXPR_WFL_NODE): Likewise.
374         (EXPR_WFL_LINECOL): Likewise.
375         (EXPR_WFL_FILENAME): Likewise.
376         (EXPR_WFL_LINENO): Likewise.
377         (build_expr_wfl, expr_add_location): Don't declare.
378         (build_unknown_wfl): Removed.
379         (EXPR_WFL_FILENAME_NODE): Removed.
380         (EXPR_WFL_COLNO): Removed.
381         (EXPR_WFL_SET_LINECOL): Removed.
382         (DECL_FUNCTION_WFL): Removed.
383         (DECL_FIELD_FINAL_WFL): Removed.
384         (struct lang_decl_func) <wfl>: Removed field.
385         <called_constructor>: Likewise.
386         <inner_access>: Likewise.
387         (struct lang_decl_var) <wfl>: Removed field.
388         (DECL_CONSTRUCTOR_CALLS): Removed.
389         (DECL_FUNCTION_ACCESS_DECL): Likewise.
390         (DECL_FUNCTION_INNER_ACCESS): Likewise.
391         (DECL_SPECIFIC_COUNT): Likewise.
392         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
393         * expr.c (build_expr_wfl): Removed.
394         (expr_add_location): Likewise.
395
396 2007-01-12  Tom Tromey  <tromey@redhat.com>
397
398         * jcf-dump.c (main): Updated call to find_class.
399         * lang.c (java_init): Removed dead code.
400         * jcf-parse.c (read_class): Don't use java_source field.  Removed
401         dead code.
402         (parse_zip_file_entries): Don't use java_source field.
403         (process_zip_dir): Likewise.
404         (jcf_parse): Removed dead code.
405         (java_parse_file): Likewise.
406         (read_class): Updated call to find_class.
407         * jcf-io.c (find_class): Don't use java_source field.  Removed
408         'source_ok' argument, .java logic.
409         * jcf.h (JCF) <java_source>: Removed field.
410         (JCF_ZERO): Updated.    (find_class): Updated.
411         * decl.c: Removed dead code.
412         * class.c: Removed dead code.
413
414 2007-01-11  Tom Tromey  <tromey@redhat.com>
415
416         * typeck.c (convert): Don't use flag_emit_class_files.
417         * lang.c (java_post_options): Don't use flag_emit_class_files.
418         (java_handle_option): Don't use flag_extraneous_semicolon or
419         flag_redundant.
420         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
421         flag_emit_class_files.
422         (load_class): Likewise.
423         * java-tree.h (flag_emit_class_files): Don't declare.
424         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
425         (flag_extraneous_semicolon): Don't declare.
426         (flag_not_overriding): Likewise.
427         (flag_static_local_jdk1_1): Likewise.
428         (flag_redundant): Likewise.
429         * expr.c (build_newarray): Don't use flag_emit_class_files.
430         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
431         flag_emit_class_files.
432         (build_class_ref): Likewise.
433         * builtins.c (check_for_builtin): Don't use
434         flag_emit_class_files.
435
436 2007-01-10  Tom Tromey  <tromey@redhat.com>
437
438         * lang.c (java_can_use_bit_fields_p): Removed.
439         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
440
441 2007-01-09  Andrew Haley  <aph@redhat.com>
442
443         * expr.c (build_java_arrayaccess): Rewrite to generate array
444         access in canonical form.
445         (expand_java_arraystore): Use build_fold_addr_expr() on address of
446         array access.
447
448 2007-01-03  Andrew Haley  <aph@redhat.com>
449
450         PR java/28754
451         * expr.c (expand_java_field_op): If we're initializing a field's
452         declaring interface we should not also initialize the class
453         context in which it was referenced.
454
455 2007-01-02  Tom Tromey  <tromey@redhat.com>
456
457         * java-tree.h (compiling_from_source, current_encoding,
458         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
459         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
460         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
461         JTI_WFL_OPERATOR): Removed
462         (finit_identifier_node, instinit_identifier_node,
463         length_identifier_node, super_identifier_node,
464         continue_identifier_node, access0_identifier_node, wfl_operator):
465         Removed.
466         (cyclic_inheritance_report,
467         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
468         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
469         DECL_FIXED_CONSTRUCTOR_P): Removed.
470         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
471         Removed.
472         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
473         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
474         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
475         import_list, import_demand_list>: Removed.
476         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
477         cxx_keyword_p): Removed.
478         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
479         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
480         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
481         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
482         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
483         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
484         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
485         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
486         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
487         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
488         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
489         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
490         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
491         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
492         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
493         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
494         java_parse_abort_on_error, extract_field_decl): Removed.
495         (finput): Declare.
496         * lang.c: (compiling_from_source, current_encoding): Removed.
497         (java_handle_option): Ignore -fencoding.
498         * parse.h: Don't include lex.h.
499         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
500         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
501         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
502         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
503         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
504         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
505         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
506         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
507         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
508         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
509         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
510         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
511         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
512         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
513         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
514         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
515         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
516         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
517         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
518         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
519         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
520         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
521         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
522         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
523         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
524         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
525         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
526         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
527         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
528         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
529         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
530         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
531         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
532         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
533         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
534         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
535         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
536         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
537         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
538         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
539         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
540         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
541         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
542         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
543         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
544         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
545         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
546         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
547         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
548         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
549         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
550         SET_CPC_STATIC_INITIALIZER_STMT,
551         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
552         java_complete_class, java_check_circular_reference,
553         java_fix_constructors, java_layout_classes, java_reorder_fields,
554         java_method_add_stmt, java_get_line_col, reset_report,
555         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
556         java_finish_classes, ctxp, ctxp_for_generation,
557         ctxp_for_generation_last): Removed.
558         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
559         * mangle.c (utf8_cmp): New function.
560         (cxx_keywords): New global.
561         (cxx_keyword_p): New function.
562         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
563         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
564         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
565         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
566         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
567         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
568         * Make-lang.in (java.srcextra): Do nothing.
569         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
570         (JAVA_OBJS): Don't mention deleted files.
571         (java.mostlyclean): Likewise.
572         (java.clean): Likewise.
573         (JAVA_LEX_C): Removed.
574         (buffer.o, check-init.o, parse.o): Remove unused targets.
575         (typeck.o): Updated.
576         * jcf-parse.c (read_class): Comment out unused code.
577         (java_layout_seen_class_methods): New function.
578         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
579         Removed.
580         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
581         (init_jcf_parse): Removed.
582         * config-lang.in (gtfiles): Remove deleted files.
583         * decl.c (java_init_decl_processing): Don't initialize
584         finit_identifier_node, instinit_identifier_node,
585         length_identifier_node, super_identifier_node,
586         continue_identifier_node, access0_identifier_node.  Don't call
587         init_jcf_parse.
588         * class.c (cyclic_inheritance_report): New global.
589         (add_method_1): Don't use
590         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
591         (maybe_layout_super_class): Comment out code.
592         (safe_layout_class): New function.
593         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
594         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
595         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
596         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
597         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
598         (java_gimplify_case_expr): Removed.
599         (java_gimplify_default_expr): Likewise.
600         (java_gimplify_new_array_init): Likewise.
601         * parse.y: Removed.
602         * keyword.gperf, keyword.h: Removed.
603         * chartables.h: Removed.
604         * check-init.c: Removed.
605         * buffer.c, buffer.h: Removed.
606         * convert.h: Removed.
607         * gen-table.pl: Removed.
608         * lex.c, lex.h: Removed.
609
610 2007-01-02  Andrew Haley  <aph@redhat.com>
611
612         * expr.c (expand_java_arraystore): Make sure we perform a bounds
613         check at runtime before we perform a type check.
614
615 2006-12-19  Andrew Haley  <aph@redhat.com>
616
617         * decl.c: Bump minor BC ABI version.
618
619 2006-12-13  Gary Benson  <gbenson@redhat.com>
620
621         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
622
623 2006-12-12  Tom Tromey  <tromey@redhat.com>
624
625         * lang-specs.h: Pass -M options to jc1.
626         * jcf-depend.c (jcf_dependency_add_file): Don't emit
627         dependencies.
628
629 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
630
631         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
632
633 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
634
635         * lang-specs.h: Pass '%U'-based options as separate arguments.
636
637 2006-12-05  Tom Tromey  <tromey@redhat.com>
638
639         PR java/29495:
640         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
641         classes as well.
642         * class.c (add_field): Handle ACC_SYNTHETIC.
643         (add_method_1): Likewise.  Handle bridge and varargs.
644         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
645         annotation.
646         (set_class_decl_access_flags): Handle synthetic and annotation.
647         * java-tree.h (METHOD_BRIDGE): New macro.
648         (METHOD_VARARGS): Likewise.
649         (TYPE_SYNTHETIC): Likewise.
650         (TYPE_ANNOTATION): Likewise.
651         (lang_type): New fields 'synthetic' and 'annotation'.
652         (lang_decl_func): New fields 'varargs' and 'bridge'.
653
654 2006-12-04  Andrew Haley  <aph@redhat.com>
655
656         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
657         there's no map.
658
659 2006-11-29  Gary Benson  <gbenson@redhat.com>
660
661         * expr.c (rewrite_arglist_getcaller): Reorder.
662
663 2006-11-29  Andrew Haley  <aph@redhat.com>
664
665         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
666         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
667
668 2006-11-23  Andrew Haley  <aph@redhat.com>
669
670         * expr.c (rewrite_arglist_getcaller): New.
671         (rewrite_arglist_getclass): Fix indentation.
672         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
673         gnu.classpath.VMStackWalker.getCallingClassLoader().
674         * builtins.c (initialize_builtins): Remove duplicate def'n of
675         __sync_synchronize.
676         Add __builtin_return_address.
677
678 2006-11-22  Andrew Haley  <aph@redhat.com>
679
680         * jcf-reader.c (get_attribute): Mark attr_type unused.
681
682         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
683
684 2007-01-08  Richard Guenther  <rguenther@suse.de>
685
686         * lex.c (do_java_lex): Use build_int_cst_wide_type.
687         * jcf-parse.c (get_constant): Likewise.
688
689 2006-11-12  Jan Hubicka  <jh@suse.cz>
690
691         * resource.c (compile_resource_data): Update for new varpool names.
692         * java/class.c (build_utf8_ref): Likewise.
693
694 2006-11-12  David Daney  <ddaney@avtrex.com>
695
696         PR java/29805
697         * typeck.c (build_java_array_type): Increase buffer sizes.
698
699 2006-11-11  Richard Guenther  <rguenther@suse.de>
700
701         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
702         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
703
704 2006-11-06  Andrew Haley  <aph@redhat.com>
705
706         * java-tree.h (CONSTANT_LazyFlag): New.
707         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
708         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
709         reflection_data.
710         (handle_constant): Return 0 for dummy cpool entries.
711         Handle constants of kind Class.
712         Handle constants of kind NameAndType.
713         (handle_enclosingmethod_attribute): New.
714         (handle_signature_attribute): New.
715         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
716         (HANDLE_SIGNATURE_ATTRIBUTE): New.
717         (handle_constant): Use unmangle_classname()rather than calling
718         identifier_subst() directly.
719
720 2006-11-02  Andrew Haley  <aph@redhat.com>
721
722         * java-tree.h (FIELD_ENUM): New.
723         (lang_decl_var.field_enum): New.
724         (lang_type.enum_class): New.
725         (CLASS_ENUM): New.
726         * class.c (set_class_decl_access_flags): Handle enum types.
727         (add_field): Handle enum fields.
728         (get_access_flags_from_decl): Likewise.
729
730         * class.c (make_class_data): Put reflection_data into rodata.
731
732 2006-11-01  Andrew Haley  <aph@redhat.com>
733
734         * jcf-parse.c (field_offsets, bit_obstack): New variables.
735         (jcf_parse): Write end marker to annotation_data.
736         (java_parse_file): Create field_offsets bitmap.  Destroy it.
737         (annotation_grow, annotation_rewrite_byte) 
738         (annotation_rewrite_short, annotation_rewrite_int) 
739         (annotation_read_short, annotation_write_byte) 
740         (annotation_write_short, annotation_write_int) 
741         (handle_long_constant, handle_constant, handle_element_value) 
742         (handle_annotation, handle_annotations) 
743         (handle_annotation_attribute, rewrite_reflection_indexes) 
744         (handle_member_annotations, handle_parameter_annotations) 
745         (handle_default_annotation): New functions.
746         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
747         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
748         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
749         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
750         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
751         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
752         (TYPE_REFLECTION_DATA): New.
753         (TYPE_REFLECTION_DATASIZE): New.
754         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
755         an enum.
756         * jcf-reader.c (get_attribute): Pass field/method index and
757         attribute type to get_attribute().
758         * constants.c (find_class_or_string_constant): Make nonstatic.
759         (cpool_for_class): Likewise.
760         (build_constants_constructor): Separate string and scalar types.
761         * class.c (make_class_data): Generate field_indexes permutation.
762         Pass it to rewrite_reflection_indexes().
763         (make_class_data): Generate constructor for reflection_data field.
764
765 2006-10-20  Tom Tromey  <tromey@redhat.com>
766
767         * gcj.texi (Top): Don't mention jv-scan.
768         (Invoking gcj): Likewise.
769         (Invoking gcjh): Likewise.
770         (Invoking gjnih): Likewise.
771         (Invoking gij): Likewise.
772         (Invoking gcj-dbtool): Likewise.
773         (Invoking jv-scan): Removed.
774         * parse-scan.y: Removed.
775         * jv-scan.c: Removed.
776         * config-lang.in (stagestuff): Don't mention jv-scan.
777         * Make-lang.in (java): Removed jv-scan.
778         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
779         (JVSCAN_OBJS): Removed.
780         (jv-scan$(exeext)): Likewise.
781         (JAVA_MANFILES): Removed jv-scan.1.
782         (java.uninstall): Don't mention jv-scan.
783         (java.mostlyclean): Likewise.
784         (java.maintainer-clean): Likewise.
785         (.INTERMEDIATE): Likewise.
786         (java/jv-scan.o): Removed.
787         (jv-scan.pod): Likewise.
788         (java.srcextra): Don't mention parse-scan.c.
789         (java.mostlyclean): Likewise.
790         (java/parse-scan.c): Removed.
791         (java/parse-scan.o-warn): Removed.
792         (java/parse-scan.o): Removed.
793
794 2006-10-20  Tom Tromey  <tromey@redhat.com>
795
796         * lang.c (java_handle_option): Don't use
797         jcf_write_base_directory.
798         * jcf.h (jcf_write_base_directory): Removed.
799         * parse.y (java_expand_classes): Don't call write_classfile.
800         * config-lang.in (gtfiles): Removed jcf-write.c.
801         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
802         (java/jcf-write.o): Removed.
803         * jcf-parse.c (parse_class_file): Don't call write_classfile.
804         * java-tree.h (write_classfile): Removed declaration.
805         * jcf-write.c: Removed.
806
807 2006-10-20  Tom Tromey  <tromey@redhat.com>
808
809         * Make-lang.in (java): Removed gjnih, gcjh.
810         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
811         (GCJH_OBJS): Removed.
812         (GJNIH_OBJS): Likewise.
813         (gjnih$(exeext)): Likewise.
814         (gcjh$(exeext)): Likewise.
815         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
816         (java.install-common): Don't special case gcjh.
817         (java.uninstall): Don't mention gcjh, gjnih.
818         (java.mostlyclean): Likewise.
819         (java.maintainer-clean): Likewise.
820         (.INTERMEDIATE): Likewise.
821         (gcjh.pod): Removed.
822         (gjnih.pod): Likewise.
823         (GCJH_TARGET_INSTALL_NAME): Removed.
824         (java/gjavah-jni.o): Removed.
825         (java/gjavah.o): Likewise.
826         * config-lang.in (stagestuff): Removed gjnih, gcjh.
827         * gjavah.c: Removed.
828
829 2006-10-17  Tom Tromey  <tromey@redhat.com>
830
831         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
832         "string" case.
833
834 2006-10-17  Tom Tromey  <tromey@redhat.com>
835
836         * jvgenmain.c (main): Handle -findirect-dispatch.
837         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
838         jvgenmain.
839
840 2006-10-06  Andrew Haley  <aph@redhat.com>
841
842         * builtins.c (compareAndSwapInt_builtin): Check that we really do
843         have a compare_and_swap builtin.
844         (compareAndSwapLong_builtin): Likewise.
845         (compareAndSwapObject_builtin): Likewise.
846
847 2006-10-04  Andrew Haley  <aph@redhat.com>
848
849         * builtins.c (java_builtins): Add compareAndSwapInt,
850         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
851         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
852         putObjectVolatile, getObjectVolatile, getIntVolatile,
853         getLongVolatile, getLong.
854         (UNMARSHAL3): New macro.
855         (UNMARSHAL4): Likewise.
856         (UNMARSHAL5): Likewise.
857         (build_arglist_for_builtin): New function.
858         (build_addr_sum, build_check_this): New functions.
859         (putObject_builtin. compareAndSwapInt_builtin,
860         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
861         putVolatile_builtin, getVolatile_builtin): New builtins.
862
863 2006-06-08  Andrew Haley  <aph@redhat.com>
864  
865         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
866         get_symbol_table_index().
867         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
868         private method.
869         (build_known_method_ref): New arg: special.  Pass it to
870         get_symbol_table_index.
871         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
872         the method list.
873         (build_invokevirtual): New arg: special.  Pass it to
874         get_symbol_table_index.
875         (expand_invoke): New variable: special.
876         Pass it to maybe_rewrite_invocation().
877         Pass it to build_known_method_ref().
878         * class.c (build_symbol_entry): Add new arg: special.  Use it to
879         build the symbol table conbstructor.
880         (emit_symbol_table): Extract SPECIAL from the method list and pass
881         it to build_symbol_entry().
882         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
883         special accordingly.
884  
885 2006-09-08  Andrew Haley  <aph@redhat.com>
886
887         * class.c (layout_class_method): Use build_java_signature, not
888         build_java_argument_signature.  Use lookup_java_method, not
889         lookup_argument_method.
890
891 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
892             Bryce McKinlay  <bryce@mckinlay.net.nz>
893
894         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
895
896 2006-07-18  Tom Tromey  <tromey@redhat.com>
897
898         * lang.opt: Added missing -W options.
899
900 2006-07-12  Tom Tromey  <tromey@redhat.com>
901
902         PR java/28329:
903         * lang-specs.h: Pass '%U'-based options as separate arguments.
904         Use -faux-classpath.
905         * lang.c (java_handle_option): Handle OPT_faux_classpath.
906         * lang.opt (faux-classpath): New option.
907
908 2006-07-07  Tom Tromey  <tromey@redhat.com>
909
910         * class.c (make_class_data): Set value for reflection_data field.
911         * decl.c (java_init_decl_processing): Add reflection_data field.
912
913 2006-07-07  Tom Tromey  <tromey@redhat.com>
914
915         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
916         earlier.
917         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
918
919 2006-07-07  Andrew Haley  <aph@redhat.com>
920
921         * jcf-parse.c (set_source_filename): Don't check for
922         CLASS_FROM_CURRENTLY_COMPILED_P.
923         Remove // comments.
924
925 2006-07-07  Andrew Haley  <aph@redhat.com>
926
927         * java-tree.h (java_read_sourcefilenames): Declare.
928         * lang.c (java_handle_option): Call java_read_sourcefilenames().
929         * lang.opt (fsource-filename): New opt.
930         * lang-specs.h: Add -fsource-filename.
931         * jcf-parse.c (num_files, filenames): New variables.
932         (reverse, cmpstringp, java_read_sourcefilenames,
933         find_sourcefile): New.
934         (set_source_filename): Call find_sourcefile to find the real name
935         of a source file.
936
937 2006-06-27  Tom Tromey  <tromey@redhat.com>
938
939         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
940         Signature, LocalVariableTypeTable, annotation attributes.
941         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
942         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
943         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
944         (HANDLE_METHOD): Likewise.
945         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
946         (print_annotation): New function.
947         (print_element_value): Likewise.
948         (indent): Likewise.
949         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
950         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
951         (print_parameter_annotations): New function.
952         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
953         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
954         Likewise.
955         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
956         (print_annotations): New function.
957
958 2006-06-23  Tom Tromey  <tromey@redhat.com>
959
960         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
961         emitting class files, always use 1.5.
962         * gcj.texi (Input Options): Document -fsource.
963         (Code Generation): Document -ftarget.
964
965 2006-06-21  Tom Tromey  <tromey@redhat.com>
966
967         PR java/28089:
968         * expr.c (expand_java_field_op): Initialize field's declaring
969         class.
970
971 2006-06-20  Tom Tromey  <tromey@redhat.com>
972
973         * expr.c (push_value): Always flush quick stack.
974
975 2006-06-19  Tom Tromey  <tromey@redhat.com>
976
977         * expr.c (push_value): Also flush quick stack if value is a
978         component_ref.
979
980 2006-06-19  Tom Tromey  <tromey@redhat.com>
981
982         * expr.c (push_value): Flush quick stack if value has side
983         effects.
984
985 2006-06-13  Tom Tromey  <tromey@redhat.com>
986
987         * class.c (is_compiled_class): Explicitly check for current
988         class.
989
990 2006-06-09  Tom Tromey  <tromey@redhat.com>
991
992         * gjavah.c (decompile_method): Don't decompile a static field
993         accessor method.
994
995 2006-06-06  Tom Tromey  <tromey@redhat.com>
996
997         * lang-specs.h <jc1>: Add .jar file to command line if
998         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
999
1000 2006-06-05  Tom Tromey  <tromey@redhat.com>
1001
1002         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1003         synthetic, enum, annotation.
1004         * jcf.h (ACC_BRIDGE): New macro.
1005         (ACC_VARARGS): Likewise.
1006         (ACC_SYNTHETIC): Likewise.
1007         (ACC_ENUM): Likewise.
1008         (ACC_ANNOTATION): Likewise.
1009
1010 2006-06-04  Tom Tromey  <tromey@redhat.com>
1011
1012         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1013         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1014         and -ftarget.
1015         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
1016         when needed.  Handle classpath-setting.
1017         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1018         * lang-specs.h: Rewrote.
1019
1020 2006-06-04  Tom Tromey  <tromey@redhat.com>
1021
1022         * jcf-io.c (find_class): Set source_ok to 0.
1023         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1024         (parse_class_file): Don't call java_mark_class_local.
1025         (java_parse_file): Skip .java files.  Call java_mark_class_local
1026         before lowering any code.
1027         (parse_zip_file_entries): Don't call duplicate_class_warning
1028         here.
1029         (process_zip_dir): ... call it here.
1030         * class.c (add_field): Don't mark field external if it is being
1031         compiled into this object.
1032         (make_class_data): Handle situation where class_dtable_decl is
1033         created before Class is compiled.
1034         (is_compiled_class): Don't assume files in zip are compiled into
1035         this object.
1036         (layout_class_method): Don't mark method external if it is being
1037         compiled into this object.
1038
1039 2006-06-04  Tom Tromey  <tromey@redhat.com>
1040
1041         * jcf-path.c (jcf_path_compute): New function.
1042         * jcf.h (jcf_path_compute): Declare.
1043
1044 2006-10-23 Rafael Avila de Espindola  <rafael.espindola@gmail.com>
1045
1046         * decl.c: Include langhooks.h.
1047         (builtin_function): Remove.
1048         (java_init_decl_processing): Replace calls to builtin_function
1049         with add_builtin_function.
1050         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1051         (java/decl.o): Depend on langhooks.h.
1052         * java-tree.h (builtin_function): Remove.
1053
1054 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1055
1056         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1057
1058 2006-09-12  Tom Tromey  <tromey@redhat.com>
1059
1060         * expr.c (push_value): Always flush quick stack.
1061
1062 2006-09-12  Tom Tromey  <tromey@redhat.com>
1063
1064         PR java/29013:
1065         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1066         the push of the called method's return result.
1067
1068 2006-09-12  Tom Tromey  <tromey@redhat.com>
1069
1070         * jvspec.c (lang_specific_driver): Read spec file even if
1071         -fsyntax-only.
1072
1073 2006-09-12  Tom Tromey  <tromey@redhat.com>
1074
1075         PR java/28754:
1076         * expr.c (expand_java_field_op): Initialize field's declaring
1077         interface if necessary.
1078
1079 2006-09-12  Tom Tromey  <tromey@redhat.com>
1080
1081         PR java/28892:
1082         * expr.c (expand_java_field_op): No error for assignments not in
1083         class initializer or constructor.
1084
1085 2006-08-22  Andrew Haley  <aph@redhat.com>
1086
1087         * decl.c (java_add_stmt): Give the statement list a type.
1088
1089 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1090             Bryce McKinlay  <bryce@mckinlay.net.nz>
1091
1092         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1093
1094 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
1095
1096         PR java/8923
1097         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1098         or '--' is used with a constant operand.
1099         (java_complete_lhs): When processing a '++' or '--' expression,
1100         don't call java_complete_tree but java_complete_lhs, so that a
1101         static final variable operand is never replaced by its value. This
1102         avoids an ICE later on.
1103         (patch_unaryop): Fixed typo in comment.
1104
1105 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1106
1107         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1108
1109 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1110
1111         * builtins.c (check_for_builtin): If a builtin could result in a
1112         direct call being generated, don't use it if flag_indirect_dispatch
1113         is set.
1114
1115 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1116
1117         * gcj.texi (Invocation): Corrections for Invocation API example.
1118
1119 2006-07-04  Andrew Haley  <aph@redhat.com>
1120
1121         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1122         entry.
1123
1124 2006-06-21  Andrew Haley  <aph@redhat.com>
1125
1126         * java-tree.h (update_aliases): Remove
1127         * expr.c (expand_iinc): Remove call to update_aliases().
1128         (STORE_INTERNAL): Likewise.
1129         * decl.c (update_aliases, initialize_local_variable) 
1130         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1131
1132 2006-06-19  Andrew Haley  <aph@redhat.com>
1133
1134         PR java/1305
1135         PR java/27908
1136         * expr.c (java_modify_addr_for_volatile): New function.
1137         (expand_java_field_op): Handle volatile fields.
1138         * java-gimplify.c (java_gimplify_component_ref): Call
1139         java_modify_addr_for_volatile to give the field_ref the correct
1140         volatile type.
1141         (java_gimplify_modify_expr): Likewise.
1142         * java-tree.h (java_modify_addr_for_volatile): New decl.
1143
1144 2006-06-17  Karl Berry  <karl@gnu.org>
1145
1146         * gcj.texi (@dircategory): Use "Software development" instead
1147         of "Programming", following the Free Software Directory.
1148
1149 2006-06-16  Andrew Haley  <aph@redhat.com>
1150
1151         * class.c (make_class_data): When using flag_indirect_classes,
1152         don't initialize the vtable of Class instances.
1153
1154 2006-06-09  Andrew Haley  <aph@redhat.com>
1155
1156         PR java/1305
1157         PR java/27908
1158         * builtins.c (initialize_builtins): Add __sync_synchronize().
1159         * class.c (add_field): Mark volatile fields.
1160         * java-gimplify.c (java_gimplify_expr): Call new functions to
1161         handle self-modifying exprs and COMPONENT_REFs.
1162         (java_gimplify_component_ref): New.
1163         (java_gimplify_modify_expr): Add handling for volatiles.
1164
1165 2006-06-08  Tom Tromey  <tromey@redhat.com>
1166
1167         * gcj.texi (libgcj Runtime Properties): Document
1168         gnu.gcj.user.realname.
1169
1170 2006-06-08  Andrew Haley  <aph@redhat.com>
1171
1172         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1173         get_symbol_table_index().
1174         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1175         private method.
1176         (build_known_method_ref): New arg: special.  Pass it to
1177         get_symbol_table_index.
1178         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1179         the method list.
1180         (build_invokevirtual): New arg: special.  Pass it to
1181         get_symbol_table_index.
1182         (expand_invoke): New variable: special.
1183         Pass it to maybe_rewrite_invocation().
1184         Pass it to build_known_method_ref().
1185         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1186         build the symbol table conbstructor.
1187         (emit_symbol_table): Extract SPECIAL from the method list and pass
1188         it to build_symbol_entry().
1189         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1190         special accordingly.
1191
1192 2006-06-06  David Daney  <ddaney@avtrex.com>
1193
1194         * gcj.texi (libgcj Runtime Properties): Document
1195         gnu.gcj.runtime.NameFinder.show_raw and
1196         gnu.gcj.runtime.NameFinder.remove_unknown.
1197
1198 2006-06-06  Tom Tromey  <tromey@redhat.com>
1199
1200         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1201         synthetic, enum, annotation.
1202         * jcf.h (ACC_BRIDGE): New macro.
1203         (ACC_VARARGS): Likewise.
1204         (ACC_SYNTHETIC): Likewise.
1205         (ACC_ENUM): Likewise.
1206         (ACC_ANNOTATION): Likewise.
1207
1208 2006-06-06  Mike Stump  <mrs@apple.com>
1209
1210         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1211         installing during build.
1212
1213 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
1214
1215         * gcj.texi (Extensions): Document the new gcj-dbtool-based
1216         classname-to-library resolution mechanism.
1217         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1218         mechanism deprecated.
1219         (libgcj Runtime Properties): Document
1220         gnu.gcj.runtime.VMClassLoader.library_control's new default.
1221
1222 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
1223
1224         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1225         bit wide type.
1226         (jword): Define to uint64 on 64-bit arches.
1227         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1228
1229 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
1230
1231         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1232         typos.
1233
1234 2006-05-26  Tom Tromey  <tromey@redhat.com>
1235
1236         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1237         * verify-glue.c (vfy_class_type): New function.
1238         * verify-impl.c (check_constant): Allow 'ldc class'.
1239         * verify.h (vfy_class_type): Declare.
1240
1241 2006-05-25  Andrew Haley  <aph@redhat.com>
1242
1243         PR java/27756
1244         * decl.c (maybe_pushlevels): When variable ranges are non-nested
1245         update all lifetimes, not just the first one.
1246
1247 2006-05-24  Tom Tromey  <tromey@redhat.com>
1248
1249         * java-tree.h: Fixed flag documentation.
1250
1251 2006-05-24  Tom Tromey  <tromey@redhat.com>
1252
1253         PR libgcj/27729:
1254         * jcf.h (ACC_INVISIBLE): Changed value.
1255
1256 2006-05-24  Andrew Haley  <aph@redhat.com>
1257
1258         PR java/27754
1259         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1260         COMPOUND_EXPR.
1261
1262 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1263
1264         * lang.opt (femit-class-file): Remove VarExists.
1265
1266 2006-05-16  Tom Tromey  <tromey@redhat.com>
1267
1268         * verify-impl.c (verify_instructions_0) <op_return>: Special case
1269         for Object.<init>.
1270
1271 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1272
1273         PR driver/26885
1274         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1275         $(GCC_OBJS).
1276
1277 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1278
1279         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1280         (java/expr.o): Replace target.h with $(TARGET_H).
1281         (java/parse.o): Likewise.
1282
1283 2006-05-10  Andrew Haley  <aph@redhat.com>
1284
1285         * class.c (emit_indirect_register_classes): Fix comment.
1286
1287 2006-05-04  Tom Tromey  <tromey@redhat.com>
1288
1289         * java-tree.h (uses_jv_markobj_p): Declare.
1290         * class.c (uses_jv_markobj_p): Removed.
1291         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1292         (get_boehm_type_descriptor): Use it.
1293         (uses_jv_markobj_p): Moved from class.c.  Return bool.
1294
1295 2006-05-04  Tom Tromey  <tromey@redhat.com>
1296
1297         * java-tree.def (THIS_EXPR): Now a tcc_expression.
1298
1299 2006-05-04  Andrew Haley  <aph@redhat.com>
1300
1301         * class.c (make_field_value): Always build_address_of fdecl if
1302         there is an initializer.
1303
1304 2006-05-03  Andrew Haley  <aph@redhat.com>
1305
1306         PR libgcj/27352
1307         * expr.c (maybe_rewrite_invocation): New function.
1308         (rewrite_arglist_getclass): Likewise.
1309         (rules): New.
1310         (expand_invoke): Call maybe_rewrite_invocation.
1311         * parse.y (patch_invoke): Likewise.
1312         * java-tree.h: (maybe_rewrite_invocation): New function.
1313
1314 2006-04-21  Andrew Haley  <aph@redhat.com>
1315
1316         * lang.c (java_init): Handle flag_indirect_classes.
1317         * jvgenmain.c: Use "class$$" instead of "class$".
1318         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1319         DECLs.
1320         (mangle_class_field): Special case "class$$" as well as "class$".
1321         * constants.c (build_ref_from_constant_pool): If
1322         flag_indirect_classes, generate a ref into the heap.
1323         * decl.c (constants_field_decl_node,
1324         constants_data_field_decl_node): New.
1325         * class.c (build_static_class_ref): New.
1326         (build_classdollar_field): Factor out from build_class_ref().
1327         (make_field_value): Handle static fields in heap.
1328         (make_class_data): Make sure we get a static ref to class.
1329         Make class initializer const if flag_indirect_classes.
1330         (register_class): Build a class_ref for initialization if
1331         flag_indirect_classes.
1332         (emit_indirect_register_classes): New.
1333
1334 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1335
1336         * expr.c, gjavah.c: Fix comment typos.
1337
1338 2006-04-03  Andrew Haley  <aph@redhat.com>
1339
1340         PR java/26858
1341         * expr.c (build_field_ref): Don't check the field offset if
1342         flag_syntax_only.
1343
1344 2006-03-30  Andrew Haley  <aph@redhat.com>
1345
1346         PR java/26858
1347         * lang.c (java_attribute_table): New.
1348         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1349         * expr.c (build_field_ref): Add a null pointer check for all
1350         fields of offset > 4k.  Don't do so for accesses via the this
1351         pointer, which we know can never be null.
1352         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1353         methods nonnull.
1354
1355 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1356
1357         * Make-lang.in: Rename docdir to gcc_docdir.
1358
1359 2006-03-30  Tom Tromey  <tromey@redhat.com>
1360
1361         PR java/26042:
1362         * parse.y (java_reorder_fields): Reset superclass field's size as
1363         well.
1364
1365 2006-03-28  Tom Tromey  <tromey@redhat.com>
1366
1367         PR java/26390:
1368         * parse.y (find_most_specific_methods_list): Added 'class'
1369         argument.
1370         (lookup_method_invoke): Updated.
1371
1372 2006-03-15  Tom Tromey  <tromey@redhat.com>
1373
1374         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1375         non-static method calls.
1376
1377 2006-03-15  David Daney  <ddaney@avtrex.com>
1378
1379         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1380         declaration.
1381
1382 2006-03-15  David Daney  <ddaney@avtrex.com>
1383
1384         * lang.opt (-freduced-reflection): New option.
1385         * lang.c (java_post_options): Generate an error if
1386         -freduced-reflection used with -fjni or -findirect-dispatch.
1387         * java-tree.h (flag_reduced_reflection): Declare new variable.
1388         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1389         if bitmap overflows and flag_reduced_reflection set.
1390         * class.c (uses_jv_markobj_p): New function.
1391         (make_class_data): Moved generation of vtable to before
1392         reflection data, generate less reflection data if
1393         flag_reduced_reflection set.
1394         * gcj.texi: Document -freduced-reflection.
1395
1396 2006-03-15  Tom Tromey  <tromey@redhat.com>
1397
1398         PR java/26638:
1399         * class.c (get_interface_method_index): Don't put <clinit> into
1400         interface table.
1401
1402 2006-03-15  Tom Tromey  <tromey@redhat.com>
1403
1404         * parse.y (analyze_clinit_body): Ignore empty statements.
1405
1406 2006-03-08  David Daney  <ddaney@avtrex.com>
1407
1408         * gcj.texi: Document -static-libgcj option.
1409
1410 2006-02-20  Andrew Haley  <aph@redhat.com>
1411
1412         * jcf-parse.c (parse_class_file): Set input_location from
1413         current_class.
1414
1415 2006-02-15  Andrew Haley  <aph@redhat.com>
1416
1417         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1418         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1419         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1420
1421 2006-02-09  Andrew Haley  <aph@redhat.com>
1422
1423         PR java/26192
1424         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1425         in their superclass.
1426
1427         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1428         array types.
1429         
1430 2006-02-08  Tom Tromey  <tromey@redhat.com>
1431
1432         PR java/22578:
1433         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1434         * builtins.c (convert_real): New function.
1435         (java_builtins): Handle Float.intBitsToFloat,
1436         Float.floatToRawIntBits, Double.longBitsToDouble,
1437         Double.doubleToRawLongBits.
1438
1439 2006-02-07  Andrew Haley  <aph@redhat.com>
1440
1441         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1442         class other than the one in which we expected to find it, ignore
1443         the result.
1444
1445         PR java/25535
1446         * constants.c (build_constants_constructor): move initializer into
1447         first halfword on a 64-bit big-endian machine.
1448
1449 2006-02-04  Tom Tromey  <tromey@redhat.com>
1450
1451         PR java/25676:
1452         * builtins.c (max_builtin): Skip floating point 'max'.
1453         (min_builtin): Skip floating point 'min'.
1454         (check_for_builtin): Never return NULL_TREE.
1455
1456 2006-02-04  Tom Tromey  <tromey@redhat.com>
1457
1458         PR java/26097:
1459         * expr.c (push_type): Avoid side effect in gcc_assert.
1460
1461 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1462
1463         * decl.c (java_init_decl_processing): Create char_type_node as a
1464         regular INTEGER_TYPE node.
1465         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1466         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1467         test for char_type_node and promoted_char_type_node as special
1468         instances of INTEGER_TYPE tree codes.
1469         (promote_type,build_java_signature): Likewise.
1470         * jcf-write.c (adjust_typed_op): Likewise.
1471         * mangle.c (mangle_type): Likewise.
1472         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1473         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1474
1475 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1476
1477         * expr.c (java_stack_swap): Revert gcc_assert patch.
1478
1479 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1480
1481         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1482         * typeck.c: Likewise.
1483         * verify-impl.c: Likewise.
1484         * class.c: Likewise.
1485         * decl.c: Likewise.
1486         * jcf-parse.c: Likewise.
1487         * constants.c: Likewise.
1488         * check-init.c: Likewise.
1489         * jcf-write.c: Likewise.
1490         * verify-glue.c: Likewise.
1491         * mangle.c: Likewise.
1492         * expr.c: Likewise.
1493         * lang.c: Likewise.
1494         * boehm.c: Likewise.
1495
1496 2006-02-01  Jan Hubicka  <jh@suse.cz>
1497
1498         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1499         * lang.c (java_init_options): Set no_unit_at_a_time_default.
1500
1501 2006-01-30  Andrew Haley  <aph@redhat.com>
1502
1503         PR java/21428
1504         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1505
1506 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1507
1508         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1509         Update copyright notice dates.
1510
1511 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1512
1513         * jvspec.c (lang_specific_spec_functions): Remove.
1514
1515 2006-01-06  Tom Tromey  <tromey@redhat.com>
1516
1517         * gcj.texi (Arrays): Added more documentation for
1518         JvNewObjectArray.
1519         (Primitive types): Correct information about primitive classes.
1520         (Reference types): New node.
1521         (Index): New node.
1522
1523 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
1524
1525         * jcf-parse.c (set_source_filename): Set the decl source location
1526         even when returning early.
1527
1528 2005-12-15  Tom Tromey  <tromey@redhat.com>
1529             Andrew Haley  <aph@redhat.com>
1530
1531         PR java/25429
1532         * parse.y (resolve_expression_name): Don't generate accessor
1533         methods for constant fields.
1534
1535 2005-12-13  Andrew Haley  <aph@redhat.com>
1536
1537         PR java/25366
1538         PR java/25368
1539         * class.c (maybe_layout_super_class): Update current_class before
1540         calling do_resolve_class.
1541
1542 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
1543
1544         PR java/25330
1545         * jcf-write.c (write_classfile): Use PID in temporary class
1546         file. Save/restore errno when reporting error.
1547
1548 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1549
1550         PR java/9861
1551         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1552         to bare_function_type and including the return type
1553         * builtins.c (initialize_builtins) : Change builtin mangled name
1554         constants to conform to new mangling scheme
1555
1556 2005-12-08  Andrew Haley  <aph@redhat.com>
1557
1558         PR libgcj/25265
1559         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1560         (soft_abstractmethod_node): New.
1561         * expr.c (build_field_ref): Add in-line check for missing field.
1562         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1563
1564 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1565
1566         * Make-lang.in (java.all.build, java.install-normal): Remove.
1567
1568 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1569
1570         * Make-lang.in: Remove all dependencies on s-gtype, except for
1571         gt-java-parse.h.
1572
1573 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
1574
1575         * class.c (build_utf8_ref, emit_register_classes): Use
1576         switch_to_section and get_section.
1577
1578 2005-12-06  Tom Tromey  <tromey@redhat.com>
1579
1580         PR java/25283:
1581         * parse.y (patch_new_array_init): Revert previous patch.
1582         (lookup_method_invoke): Use size-less array type when creating an
1583         anonymous constructor.
1584
1585 2005-12-05  Tom Tromey  <tromey@redhat.com>
1586
1587         * parse.y (patch_new_array_init): Don't set length on array.
1588
1589 2005-12-02  Richard Guenther  <rguenther@suse.de>
1590
1591         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1592         buildN instead of build.
1593         * class.c (finish_class): Likewise.
1594         * expr.c (java_create_object): Likewise.
1595
1596 2005-11-28  Tom Tromey  <tromey@redhat.com>
1597
1598         PR java/18278:
1599         * expr.c (build_jni_stub): Unwrap the return value.
1600         * java-tree.h (soft_unwrapjni_node): New define.
1601         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1602         * decl.c (java_init_decl_processing): Initialize
1603         soft_unwrapjni_node.
1604
1605 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
1606
1607         * gcj.texi (gij options): Add -Xss documentation.
1608
1609 2005-11-08  Wil Mahan  <wmahan@gmail.com>
1610
1611         PR java/23617
1612         * zextract.c (read_zip_archive): Fix out of memory error when
1613         reading jar files with zip-style comments.
1614
1615 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
1616
1617         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1618         formats.
1619         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1620
1621 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1622             Wil Mahan <wmahan@gmail.com>
1623
1624         PR java/23620
1625         * class.c (make_class): Create empty binfo here.
1626         (set_super_info): Only create binfo if we have superclasses.
1627
1628 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
1629
1630         PR java/24127
1631         * parse.y (method_header): Make the result of the rule a NULL_TREE
1632         when a parsing error occurs.
1633
1634 2005-09-29  Tom Tromey  <tromey@redhat.com>
1635
1636         PR java/24120:
1637         * jcf-io.c (memoized_dirlist_hash): New function.
1638         (caching_stat): Use it.
1639
1640 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
1641
1642         PR java/21418
1643         * class.c (inherits_from_p): Try to lay out super class
1644         if it is not already laid out.
1645         (maybe_layout_super_class): Handle the case where SUPER_CLASS
1646         is a NULL_TREE.
1647
1648 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
1649
1650         * builtins.c (max_builtin, min_builtin, abs_builtin,
1651         java_build_function_call_expr): Use fold_buildN.
1652         * class.c (layout_class_method): Likewise.
1653         * expr.c (java_truthvalue_conversion, build_java_jsr,
1654         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1655         build_java_binop, build_field_ref, expand_compare,
1656         build_known_method_ref, build_invokevirtual,
1657         process_jvm_instruction): Likewise.
1658         * parse.y (patch_binop, patch_exit_expr): Likewise.
1659         * typeck.c (convert_ieee_real_to_integer): Likewise.
1660         (convert): Don't call fold after convert_ieee_real_to_integer.
1661
1662 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
1663
1664         PR java/23891
1665         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1666         the newly created type. Set import lists here, not in create_class.
1667         (jdep_resolve_class): Set current_class.
1668         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
1669         the current package context, not ctxp->package.
1670         (cicp_cache): Removed.
1671         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
1672         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
1673         * java-tree.h (TYPE_PACKAGE): New macro.
1674         (struct lang_type): New member 'package'.
1675
1676 2005-09-09  Andrew Haley  <aph@redhat.com>
1677
1678         PR libgcj/23182 
1679         * expr.c (pop_type_0): If the expected type is object or ptr
1680         (i.e. void*), return the type of the object we just popped from
1681         the stack.
1682
1683 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
1684
1685         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1686         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1687
1688 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
1689
1690         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
1691         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
1692         typos.  Follow spelling conventions.
1693
1694 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
1695
1696         PR java/23431
1697         * typeck.c (lookup_do): Look up interfaces for the original class,
1698         not the base class.
1699         * parse.y (java_check_regular_methods): Fix diagnostic message for
1700         more restrictive overriding of a method from an interface.
1701
1702 2005-08-16  Tom Tromey  <tromey@redhat.com>
1703
1704         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1705         class' initial state.
1706
1707 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1708
1709         PR java/22113
1710         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1711         `literal_token' for large numeric input tokens.
1712
1713 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1714
1715         PR java/19870
1716         * parse.y (nested_field_access_p): Rename to nested_member_access_p
1717         and expand to handle method accesses across nested classes.
1718         (build_outer_method_access_method): Rename to
1719         build_nested_method_access_method.  Minor adjustments to comments.
1720         (resolve_expression_name): Use the newly-renamed
1721         nested_member_access_p method.
1722         (resolve_qualified_expression_name): Likewise.
1723         (patch_method_invocation): Also consider static methods for access
1724         method generation.  Minor adjustments to comments.
1725         (maybe_use_access_method): Use the more general
1726         nested_memeber_access_p to determine access across nested class
1727         boundaries.  Allow THIS_ARG to be NULL (for static methods).
1728
1729 2005-08-15  Tom Tromey  <tromey@redhat.com>
1730
1731         PR java/23300.
1732         * expr.c (build_field_ref): Don't generate otable reference when
1733         DECL_FIELD_OFFSET is 0.
1734         * class.c (maybe_layout_super_class): Pass outer class to
1735         do_resolve_class.
1736
1737 2005-08-15  Tom Tromey  <tromey@redhat.com>
1738
1739         * java-tree.h (LABEL_IN_SUBR): Removed.
1740         (LABEL_IN_SUBR): Likewise.
1741         (LABEL_IS_SUBR_START): Likewise.
1742         (LABEL_SUBR_START): Likewise.
1743         (LABEL_SUBR_CONTEXT): Likewise.
1744         (LABEL_CHANGED): Likewise.
1745         (LABEL_RETURN_LABEL): Likewise.
1746         (LABEL_RETURN_TYPE_STATE): Likewise.
1747         (LABEL_RETURN_LABELS): Likewise.
1748         (RETURN_MAP_ADJUSTED): Likewise.
1749         (LABEL_PENDING_CHAIN): Likewise.
1750
1751 2005-08-15  Tom Tromey  <tromey@redhat.com>
1752
1753         * Make-lang.in (JAVA_OBJS): Removed verify.o
1754         (java/verify.o): Removed.
1755         * verify.c: Removed.
1756         * lang.c (flag_new_verifier): Removed.
1757         (java_post_options): Updated.
1758         * java-tree.h (flag_new_verifier): Removed.
1759         (verify_jvm_instructions): Removed.
1760         * expr.c (pop_type_0): Assume flag_new_verifier is true.
1761         (build_java_check_indexed_type): Likewise.
1762         (expand_java_arraystore): Likewise.
1763         (expand_java_arrayload): Likewise.
1764         (pop_arguments): Likewise.
1765         (expand_byte_code): Likewise.
1766         (process_jvm_instruction): Likewise.
1767
1768 2005-08-10  Andrew Haley  <aph@redhat.com>
1769
1770         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1771         type mismatches to make legal GIMPLE.
1772
1773 2005-08-10  Robin Green <greenrd@greenrd.org>
1774
1775         PR java/23230:
1776         * parse.y (maybe_use_access_method): Generalize check from
1777         java.lang.Object to any superclass of current_class
1778
1779 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1780
1781         * class.c (build_class_ref): Wrap the primary class type in a
1782         NOP_EXPR.
1783         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1784         primary class type from the NOP_EXPR in which it was placed.
1785
1786 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
1787
1788         * expr.c (expand_load_internal): Fix missing parens in
1789         predicate.
1790
1791 2005-07-28  Andrew Haley  <aph@redhat.com>
1792
1793         * expr.c (expand_load_internal): Convert to destination type.
1794
1795 2005-07-22  Manfred Hollstein  <mh@suse.com>
1796
1797         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1798         (check_constant): Likewise.
1799         (check_wide_constant): Likewise.
1800
1801 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
1802
1803         Make CONSTRUCTOR use VEC to store initializers.
1804         * check-init.c (check_init): Update to cope with VEC in
1805         CONSTRUCTOR_ELTS.
1806         * class.c (make_field_value, make_method_value, get_dispatch_table,
1807         make_class_data, emit_symbol_table, emit_catch_table,
1808         emit_assertion_table): Use build_constructor_from_list instead of
1809         build_constructor.
1810         * constants.c (build_constants_constructor): Likewise.
1811         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
1812         VEC in CONSTRUCTOR_ELTS.
1813         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
1814         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
1815         of a TREE_LIST.
1816         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
1817         CONSTRUCTOR_ELTS.
1818         * parse.y (build_new_array_init): Use build_constructor_from_list
1819         instead of build_constructor.
1820         (patch_new_array_init): Update to cope with VEC in
1821         CONSTRUCTOR_ELTS.
1822         (array_constructor_check_entry): Likewise.
1823
1824 2005-07-12  Tom Tromey  <tromey@redhat.com>
1825
1826         * jvspec.c (lang_specific_driver): Put filelist_filename first on
1827         command line.
1828
1829 2005-07-12  Tom Tromey  <tromey@redhat.com>
1830
1831         PR java/19674:
1832         * parse-scan.y (interface_member_declaration): Added
1833         empty_statement.
1834
1835 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
1836         
1837         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
1838         (LABEL_PENDING_CHAIN): Ditto.
1839         (LABEL_PC): Ditto.
1840         (DECL_BIT_INDEX): Ditto.        
1841
1842 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1843
1844         PR java/18119
1845         * parse.y (inner_class_accessible): New function. Logic moved from
1846         check_inner_class_access.
1847         (check_inner_class_access): Use inner_class_accessible.
1848         (resolve_inner_class): Simplify arguments. Create circularity hash
1849         here. Keep looking for classes if we found one that was inaccessible. 
1850         Return the inaccessible class only if there is no other match.
1851         (do_resolve_class): Update for new resolve_inner_class arguments.
1852         Don't create circularity_hash here.
1853
1854 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
1855
1856         PR java/21045
1857         * parse.y (add_exception_to_throws): New function.
1858         (purge_unchecked_exceptions): Removed.
1859         (get_constructor_super): Renamed from verify_constructor_super. Now
1860         returns the super constructor after verification.
1861         (java_complete_expand_method): Don't use purge_unchecked_exceptions
1862         or save/restore the exception list.
1863         (check_thrown_exceptions): Add uncaught exceptions in anonymous
1864         class initializers and constructors to the throws clause of the method. 
1865
1866 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
1867
1868         PR java/19674
1869         * parse.y (interface_member_declaration): Allow empty statements in
1870         interface declarations.
1871
1872 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
1873
1874         * Makefile.in (parse.o): Adjust dependencies.
1875         * parse.y: Include tree-dump.h.
1876
1877 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
1878
1879         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
1880         flag for quoting.
1881
1882 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
1883
1884         * parse.y (issue_warning_error_from_context): Call
1885         pp_output_formatted_text to be able to get the buffer.
1886
1887 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
1888
1889         * parse.y (issue_warning_error_from_context): Update for the
1890         renaming of pp_format_text to pp_format.
1891
1892 2005-06-28  Paul Brook  <paul@codesourcery.com>
1893
1894         * decl.c (java_init_decl_processing): Call
1895         default_init_unwind_resume_libfunc.
1896
1897 2005-06-27  Tom Tromey  <tromey@redhat.com>
1898
1899         PR java/21540, PR java/13788:
1900         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
1901         fold_constant_for_init.
1902         (patch_binop): Added 'folding' argument.  Updated all callers.
1903         (patch_unaryop) <NOP_EXPR>: New case.
1904         (fold_constant_for_init) <NOP_EXPR>: Likewise.
1905         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
1906
1907 2005-06-25  Jan Hubicka  <jh@suse.cz>
1908
1909         * builtins.c (define_builtin): Accept new flags parameter.
1910         (initialize_builtins): Mark the builtins const and nothrow accordingly.
1911
1912 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
1913
1914         * all files: Update FSF address in copyright headers.
1915
1916 2005-06-24  Tom Tromey  <tromey@redhat.com>
1917
1918         * verify-impl.c (verify_instructions_0): Correctly handle
1919         situation where PC falls off end.
1920
1921 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
1922
1923         PR java/20697
1924         * parse.y (find_most_specific_methods_list): Remove special case for
1925         inner classes.
1926
1927 2005-06-15  Tom Tromey  <tromey@redhat.com>
1928
1929         PR libgcj/21906:
1930         * class.c (make_method_value): Use soft_abstractmethod_node for
1931         abstract method.
1932         * java-tree.h (soft_abstractmethod_node): New define.
1933         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
1934         * decl.c (java_init_decl_processing): Initialize
1935         soft_abstractmethod_node.
1936
1937 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
1938
1939         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
1940
1941 2005-06-13  Per Bothner  <per@bothner.com>
1942
1943         * expr.c (int highest_label_pc_this_method,
1944         start_label_pc_this_method): New globals.
1945         (lookup_label): Add start_label_pc_this_method to pc for label, and
1946         update highest_label_pc_this_method.  This prevents conflicts between
1947         labels from different methods.
1948         * java-tree.h: Declare new globals.
1949         * jcf-parse.c (parse_class_file): If needed bump
1950         start_label_pc_this_method and reset highest_label_pc_this_method.
1951
1952 2005-06-13  Tom Tromey  <tromey@redhat.com>
1953
1954         PR java/21844:
1955         * parse.y (nested_field_access_p): Handle case where outer field
1956         is inherited by enclosing class.
1957
1958 2005-06-12  Per Bothner  <per@bothner.com>
1959
1960         * class.c (inherits_from_p): Do load_class if needed.
1961
1962 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1963
1964         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
1965         * java-tree.h (parse_error_context): Move...
1966         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
1967         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
1968         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
1969
1970 2005-06-08  Roger Sayle  <roger@eyesopen.com>
1971
1972         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
1973
1974 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
1975
1976         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
1977         msgid for argument name.
1978         * gjavah.c (error): Likewise.
1979         * java-tree.h (parse_error_context): Likewise.
1980         * parse.y (parse_error_context, parse_warning_context,
1981         issue_warning_error_from_context): Likewise.
1982
1983 2005-06-01  Tom Tromey  <tromey@redhat.com>
1984
1985         PR java/21722:
1986         * class.c (build_static_field_ref): Don't fold constant fields if
1987         current class is from a .class file and we're using indirect
1988         dispatch.
1989
1990 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1991
1992         * java/verify-glue.c: Don't include errors.h and include toplev.h.
1993         * java/Make-lang.in: Updates dependencies.
1994
1995 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
1996
1997         PR java/19870.
1998         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
1999         NESTED_FIELD_ACCESS_IDENTIFIER_P.
2000         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2001         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2002         * jcf-write.c (generate_classfile): Use
2003         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2004         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2005         * parse.y (build_outer_field_access): Rename to
2006         build_nested_field_access. Support static fields and outer-to-inner
2007         class accesses.
2008         (outer_field_access_p): Rename to nested_field_access_p. Support
2009         static fields and generalise to outer-to-inner class and sibling
2010         inner class accesses.
2011         (outer_field_expanded_access_p): Rename to
2012         nested_field_expanded_access_p and support static fields.
2013         (outer_field_access_fix): Rename to nested_field_access_fix and
2014         support static fields.
2015         (build_outer_field_access_expr): Rename to
2016         build_nested_field_access_expr and support static fields.
2017         (build_outer_field_access_methods): Rename to
2018         build_nested_field_access_methods and support static fields. For
2019         static fields, generate accessors without class instance parameters.
2020         (build_outer_field_access_method): Rename to
2021         build_nested_field_access_method and support static fields.
2022         (build_outer_method_access_method): Use
2023         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2024         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2025         (resolve_expression_name): Consider static field accesses across
2026         nested classes.
2027         (resolve_qualified_expression_name): Likewise.
2028         (java_complete_lhs): Use nested_field_access_fix instead of
2029         outer_field_access_fix.
2030         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2031         Use nested_field_expanded_access_p instead of
2032         outer_field_expanded_access_p. Use nested_field_access_fix instead
2033         of outer_field_access_fix.
2034         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2035         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2036
2037 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2038
2039         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
2040         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2041         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2042         MINOR_BINARYCOMPAT_ABI_VERSION): New.
2043         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2044         (parse_version): Calculate version ID using new method. Use bit-flags
2045         for flag_indirect_dispatch and flag_bootstrap_classes.
2046
2047 2005-05-25  Richard Henderson  <rth@redhat.com>
2048
2049         PR libgcj/21692
2050         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2051         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2052         DECL_CONTEXT; avoid pushdecl_top_level.
2053         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2054         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2055         (layout_class_method): Likewise.
2056         * decl.c (java_mark_cni_decl_local): New.
2057         (java_mark_class_local): Use it.
2058         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2059         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2060         (struct lang_decl_func): Add local_cni;
2061         (struct lang_decl_var): Add class_field, vtable.
2062         (java_mangle_decl): Declare.
2063         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2064         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2065         (mangle_obstack_1): New.
2066         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
2067         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
2068         lhd_set_decl_assembler_name for things that don't need mangling.
2069         (mangle_class_field): Rename from java_mangle_class_field, make
2070         static, don't call init_mangling or finish_mangling.
2071         (mangle_vtable): Similarly.
2072         (mangle_local_cni_method_decl): New.
2073         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
2074         gcc_assert, and MANGLE_RAW_STRING.
2075         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2076
2077 2005-05-25  DJ Delorie  <dj@redhat.com>
2078
2079         * class.c (set_constant_value): Move warning control from if() to
2080         warning(OPT_*).
2081
2082 2005-05-24  Richard Henderson  <rth@redhat.com>
2083
2084         * builtins.c (define_builtin): Don't call make_decl_rtl.
2085         * constants.c (build_constant_data_ref): Likewise.
2086         * class.c (build_utf8_ref): Likewise.
2087         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2088         (get_dispatch_table, layout_class_method): Likewise.
2089         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2090         by hand.
2091         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2092         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2093         to determine if we need a non-zero address.
2094         * decl.c (builtin_function): Don't call make_decl_rtl.
2095         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2096         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2097         * resource.c (compile_resource_data): Likewise.
2098         * parse.y (resolve_field_access): Re-word comment to avoid
2099         building DECL_RTL.
2100
2101 2005-05-24  Richard Henderson  <rth@redhat.com>
2102
2103         * class.c (registered_class): Take it out of class_roots; turn into
2104         a vec of trees.
2105         (register_class): Make static.  Don't duplicate decl node.  Use
2106         VEC_safe_push.
2107         (emit_register_classes): Use VEC_iterate.  Use output_constant
2108         instead of assemble_integer.  Don't call mark_decl_referenced
2109         directly.
2110         * java-tree.h (register_class): Remove decl.
2111
2112 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
2113
2114         PR java/17845
2115
2116         * parse.y (register_package, package_list): Remove.
2117         (package_declaration): Do not call register_package.
2118         (do_resolve_class): Do not use package_list.
2119
2120 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
2121
2122         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2123         unused variable.
2124
2125 2005-05-15  Tom Tromey  <tromey@redhat.com>
2126
2127         PR java/21519:
2128         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2129         NOTE_PUSH.
2130
2131 2005-05-12  Aaron Luchko <aluchko@redhat.com>
2132
2133         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2134
2135 2005-05-11  Tom Tromey  <tromey@redhat.com>
2136
2137         * gcj.texi (Code Generation): Document -fbootstrap-classes.
2138         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2139         (parse_version): Use it.
2140         * lang.opt (-fbootstrap-classes): New option.
2141
2142 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
2143
2144         PR java/21436
2145         * class.c (maybe_layout_super_class): Look for imports in this_class.
2146         * parse.h (ctxp_for_generation_last): New.
2147         (do_resolve_class): Add a parameter.
2148         * parse.y (ctxp_for_generation_last): New.
2149         (java_pop_parser_context): Add at end of list.
2150         (find_in_imports, find_in_imports_on_demand): Look in ctxp
2151         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2152         the given type are NULL.
2153         (do_resolve_class): Look into the imports of the new second parameter.
2154         Adjust recursive calls.
2155         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2156         calls to do_resolve_class.
2157         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2158         (java_complete_class): Do not do that here.
2159
2160 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
2161
2162         PR java/20309
2163         * Make-lang.in (java): Add gjnih.
2164         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2165         (GJNIH_OBJS): New variable.
2166         (gjnih$(exeext)): New target.
2167         (JAVA_MANFILES): Add gjnih.1.
2168         (java.uninstall): Add gjnih.1.
2169         (java.mostlyclean): Add gjnih.
2170         (java.maintainer-clean): Add gjnih.1.
2171         (java/gjavah-jni.o): New target.
2172         (.INTERMEDIATE): Add gjnih.pod.
2173         (gjnih.pod): New target.
2174         * config-lang.in (stagestuff): Add gjnih.
2175         * gcj.texi (Top): Add gjnih node.
2176         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2177         -bootclasspath options.
2178         (Invoking gjnih): New node.
2179         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2180         (TOOLNAME): New macro.
2181         (error): Replace hard-coded gcjh with TOOLNAME.
2182         (process_file): Likewise.
2183         (usage): Likewise.
2184         (version): Likewise.
2185         (help): Likewise.  Add help output for -force, -old, -trace and -J
2186         options.
2187         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2188         (options): Add force, old, trace and J fields.
2189         (main): Handle -force, -old, -trace and -J options.
2190
2191 2005-05-03  Tom Tromey  <tromey@redhat.com>
2192
2193         PR java/21245:
2194         * gjavah.c (main): Unlink output file on error.
2195
2196 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
2197
2198         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2199         copyright.
2200
2201 2005-04-29  Tom Tromey  <tromey@redhat.com>
2202
2203         * expr.c (build_jni_stub): Updated for change to build_block.
2204
2205 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
2206
2207         * expr.c (force_evaluation_order): Declare 'saved' earlier.
2208
2209 2005-04-28  Andrew Haley  <aph@redhat.com>
2210
2211         PR java/19285
2212         * java-tree.h (soft_resolvepoolentry_node): New.
2213         (alloc_constant_fieldref): Declare.
2214         * expr.c (expand_java_field_op): Don't call class_init for
2215         accesses to static fields with indirect dispatch.
2216         * builtins.c (initialize_builtins): Add "__builtin_expect".
2217         * decl.c (soft_resolvepoolentry_node): New variable.
2218         (java_init_decl_processing): Create a decl for
2219         "_Jv_ResolvePoolEntry".
2220         * class.c (build_fieldref_cache_entry): New function.
2221         (build_static_field_ref): Rewrite for indirect dispatch.
2222         * constants.c (find_name_and_type_constant_tree): New function.
2223         (alloc_constant_fieldref): Likewise.
2224         (build_constants_constructor): Handle CONSTANT_Fieldref and
2225         CONSTANT_NameAndType.
2226
2227         PR java/21115
2228         * expr.c (force_evaluation_order): Convert outgoing args smaller
2229         than integer.
2230
2231 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
2232
2233         * gcj.texi (libgcj Runtime Properties): Remove obsolete
2234         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
2235         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2236
2237 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2238
2239         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2240         to `unlock_stream' with `unlock_std_streams'.
2241
2242 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
2243
2244         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2245         instead of just expr.h.
2246
2247 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2248
2249         * gjavah.c (main): Unlock the stdio streams.
2250         * jcf-dump.c (main): Likewise.
2251         * jv-scan.c (main): Likewise.
2252         * jvgenmain.c (main): Likewise.
2253
2254 2005-04-23  DJ Delorie  <dj@redhat.com>
2255
2256         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2257         parse.y: Adjust warning() callers.
2258
2259 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
2260
2261         * gcj.texi (Object fields): Change "Integer" to "Int" in example
2262         contructor.
2263
2264 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2265
2266         * gcj.texi: Fix typos and bogus example.
2267
2268 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
2269
2270         * except.c: Fix a comment typo.
2271
2272 2005-04-19  Julian Brown  <julian@codesourcery.com>
2273
2274         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2275         indirect dispatch with PIC.
2276
2277 2005-04-18  Andrew Haley  <aph@redhat.com>
2278
2279         * java-except.h (struct eh_range.handler): Remove unused field.
2280         (handle_nested_ranges): Remove function declaration.
2281         (sanity_check_exception_range): Add function declaration.       
2282         * verify.c (verify_jvm_instructions): Remove call to
2283         handle_nested_ranges.
2284         * verify-glue.c (verify_jvm_instructions_new): Call
2285         sanity_check_exception_range.
2286         * except.c (link_handler, eh_range_freelist, link_handler,
2287         handle_nested_ranges): Remove.
2288         (add_handler): Rewrite.
2289         (sanity_check_exception_range): New function.
2290         (print_ranges): New function.
2291
2292 2005-04-13  Julian Brown  <julian@codesourcery.com>
2293
2294         * decl.c (finish_method): Give methods once-only linkage.
2295
2296 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
2297
2298         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2299
2300 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2301
2302         * java-tree.h: Don't use PARAMS().
2303
2304 2005-04-07  Per Bothner  <per@bothner.com>
2305
2306         * class.c (push_class): By default, suppress debug output.
2307         (finish_class): Enable debug output for classes we're emitting.
2308
2309 2005-04-07  Andrew Haley  <aph@redhat.com>
2310
2311         * gcj.texi: Correct gcj-dbtool instructions.
2312
2313 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
2314
2315         * gcj.texi: Fix a typo.
2316         * lang.c: Fix a comment typo.
2317
2318 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
2319
2320         * gcj.texi (Invoking gij): Add descriptions of new -X options.
2321         Mention recognized-and-ignored compatibility options.
2322         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2323         JvFree.
2324         (About CNI): Add Memory allocation section.
2325
2326 2005-04-01  Tom Tromey  <tromey@redhat.com>
2327
2328         * decl.c (java_init_decl_processing): Fix types of
2329         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2330         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2331         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2332
2333 2005-03-31  Jan Hubicka  <jh@suse.cz>
2334
2335         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2336         * class.c: Include cgraph.h
2337         (make_local_functoin_alias): Mark aslias as needed.
2338         * resource.c: Include cgraph.h
2339         (compile_resource_data): Go via cgraph interface.
2340
2341 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2342
2343         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2344
2345 2005-03-30  Tom Tromey  <tromey@redhat.com>
2346
2347         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2348         inner_class_info_index==0 or outer_class_info_index==0.
2349
2350 2005-03-29  Tom Tromey  <tromey@redhat.com>
2351
2352         * gcj.texi (libgcj Runtime Properties): Document
2353         gnu.gcj.runtime.endorsed.dirs.
2354
2355 2005-03-24  Anthony Green  <green@redhat.com>
2356
2357         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2358         'gcj-dbtool -p'.
2359
2360 2005-03-23  Tom Tromey  <tromey@redhat.com>
2361
2362         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2363         (parse_version): Use it.
2364
2365 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2366
2367         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2368
2369 2005-03-18  Andrew Haley  <aph@redhat.com>
2370
2371         PR java/20522
2372         * decl.c (update_aliases): Don't update variables that are about
2373         to die.
2374         (maybe_poplevels): Add comment.
2375
2376 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2377
2378         PR java/20502
2379         * jcf-parse.c (duplicate_class_warning): New function.
2380         (java_parse_file): Call duplicate_class_warning if 
2381         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2382         (parse_zip_file_entries): Likewise. Also set
2383         CLASS_FROM_CURRENTLY_COMPILED_P.
2384
2385 2005-03-16  Andrew Haley  <aph@redhat.com>
2386
2387         * expr.c (expand_java_arrayload): Don't generate a
2388         NullPointerException based on the type of the node.
2389         (build_java_array_length_access): Likewise.
2390
2391 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2392
2393         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2394
2395 2005-03-11  Tom Tromey  <tromey@redhat.com>
2396
2397         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2398         (libgcj Runtime Properties): Document the default .db.
2399
2400 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2401
2402         PR java/20312
2403         * parse.y (checks_throws_clauses): Check exceptions list even when
2404         the base class does not come from a source file being compiled.
2405         (java_complete_lhs): Remove unused variable 'wfl'.
2406
2407 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2408
2409         PR java/20338
2410         * decl.c (finish_method): Emit _Jv_InitClass for private static
2411         methods inside inner classes as well.
2412
2413 2005-03-08  Julian Brown  <julian@codesourcery.com>
2414         * Revert patch from 2005-03-08 for causing bootstrap failure on
2415         ppc-darwin.
2416
2417 2005-03-08  Julian Brown  <julian@codesourcery.com>
2418
2419         * decl.c (finish_method): Give methods once-only linkage.
2420
2421 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2422
2423         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2424
2425 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2426
2427         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2428         can_widen_reference_to if the C++ ABI is in use.
2429         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2430         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2431         type_isresolved, init_state, set_pc, state_get_pc,
2432         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2433         (verify_fail): Report the current PC from the verifier context.
2434         (free_state): Remove #if 0 block to enable this function.
2435         (free_verifier_context): Call free_state on state_list iterator
2436         values before freeing them.
2437         * expr.c (pop_type_0): Pop correct type for error message when stack
2438         contains a multi-word type.
2439
2440 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2441
2442         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2443         for known NULL array length access.
2444
2445 2005-03-07  Tom Tromey  <tromey@redhat.com>
2446
2447         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2448
2449 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2450
2451         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2452         typeck.c: Update copyright.
2453
2454 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2455
2456         Remove xref code.
2457         * xref.c, xref.h: Remove file.
2458         * Make-lang.in (java/xref.o): Remove.
2459         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2460         * lang.c (flag_emit_xref): Remove definition.
2461         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2462         * typeck.c (convert): Remove use of do_not_fold.
2463         * parse.y (do_not_fold): Remove definition.
2464         (parser grammar): Remove xref code.
2465         (maybe_create_class_interface_decl, create_class): Likewise.
2466         (register_fields, method_header, finish_method_declaration): Likewise.
2467         (declare_local_variables, source_end_java_method): Likewise.
2468         (java_complete_expand_classes): Do not set do_not_fold.
2469         (java_complete_expand_method): Remove xref code.
2470         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2471         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2472         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2473         (patch_synchronized_statement, patch_throw_statement): Likewise.
2474         (maybe_build_class_init_for_field): Likewise.
2475
2476 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2477
2478         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2479         instead of IS_NON_TYPE_CODE_CLASS.
2480
2481 2005-03-04  Andrew Haley  <aph@redhat.com>
2482
2483         PR java/18362
2484         * class.c (set_method_index): Don't set method_index if it is
2485         NULL_TREE.
2486         (layout_class_method): Don't complain about "non-static method foo
2487         overrides static method" in the case of indirect dispatch.
2488
2489 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2490
2491         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2492         warning.
2493         * Make-lang.in: Don't elide warnings in jcf-io.c.
2494
2495 2005-03-01  Per Bothner  <per@bothner.com>
2496
2497         PR java/8608
2498         * check-init.c (wfl): Remove static.
2499         (final_assign_error, check_init): Replace calls to parse_error_context
2500         by plain error.
2501         (check_init): Save, set, and restore input_location for each exp.
2502
2503 2005-03-01  Per Bothner  <per@bothner.com>
2504
2505         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2506         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2507         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2508
2509 2005-03-01  Per Bothner  <per@bothner.com>
2510
2511         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2512
2513 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2514
2515         PR libgcj/16923
2516         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2517         JvVMOption.
2518
2519 2005-02-22  Tom Tromey  <tromey@redhat.com>
2520
2521         PR java/20056:
2522         * verify-impl.c (EITHER): New define.
2523         (types_compatible): Handle it.
2524         (check_field_constant): Use it.
2525
2526 2005-02-18  Tom Tromey  <tromey@redhat.com>
2527
2528         PR java/20056:
2529         * verify-impl.c (types_equal): Fixed test.
2530
2531         PR java/20056:
2532         * verify-glue.c (vfy_class_has_field): New function.
2533         * verify.h (vfy_class_has_field): Declare.
2534         * verify-impl.c (check_field_constant): Added 'putfield'
2535         argument.
2536         (verify_instructions_0): Updated.
2537         (types_equal): New function.
2538
2539 2005-02-14  Tom Tromey  <tromey@redhat.com>
2540
2541         PR java/19921:
2542         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2543         stack effect of multianewarray.
2544
2545 2005-02-14  Andrew Haley  <aph@redhat.com>
2546
2547         PR java/19907
2548         * expr.c (expand_byte_code): Call promote_arguments().
2549         (promote_arguments): New function.
2550         * decl.c (check_local_unnamed_variable): Remove special case for
2551         new verifier.
2552         (find_local_variable): Promote all boolean types to int
2553         when searching for local variable decls.
2554
2555 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
2556
2557         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2558         parse-scan.y: Update copyright.
2559
2560 2005-02-11  Per Bothner  <per@bothner.com>
2561
2562         PR java/15543
2563         * parse-scan.y (input_location): Remove variable.
2564         (main_input_filename): New - replaces input_filename, which isn't
2565         settable if USE_MAPPED_LOCATION.
2566         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2567         so we don't reference input_location or wfl_operator in that case.
2568         * jv-scan.c (expand_location): Remove - no longer used.
2569         (main): Set main_input_filename rather than input_filename.
2570
2571 2005-02-09  Richard Henderson  <rth@redhat.com>
2572
2573         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2574         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2575
2576 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
2577
2578         * expr.c (add_type_assertion): Use the proper enumeration type,
2579         since this is what htab_find_slot() is expecting.
2580
2581 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2582
2583         * gcj.texi: Update copyright dates.
2584
2585 2005-02-02  Tom Tromey  <tromey@redhat.com>
2586
2587         * gcj.texi (libgcj Runtime Properties): Default library_control
2588         to 'cache'.
2589
2590 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
2591
2592         PR java/15543
2593         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2594         (modifiers) when square brackets are present in a declaration for
2595         a final paramter.
2596         * jv-scan.c (main): Set input_filename and input_line.
2597
2598 2005-02-01  Tom Tromey  <tromey@redhat.com>
2599
2600         PR java/19742:
2601         * gjavah.c (get_field_name): Don't override name for JNI header.
2602
2603 2005-02-01  Roger Sayle  <roger@eyesopen.com>
2604
2605         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2606         of unsigned types using iushr and lushr JVM bytecodes.
2607
2608 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2609
2610         PR java/19738
2611         * gjavah.c (jni_print_float): Do not emit floating-point
2612         initialiser for a static final field.
2613         (jni_print_double): Likewise.
2614
2615 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
2616
2617         Revert:
2618         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2619         * gjavah.c (print_field_info): Mark static data members of
2620         floating-point type with "__extension__".
2621
2622 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2623
2624         * gjavah.c (print_field_info): Mark static data members of
2625         floating-point type with "__extension__".
2626
2627 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2628
2629         PR java/9157
2630         * parse.y (build_string_concatenation): Remove redundant if.
2631         (patch_conditional_expr): Attempt to patch_string() the condition
2632         of a ?: as well, in addition to its other operands.
2633
2634 2005-01-25  Tom Tromey  <tromey@redhat.com>
2635
2636         * Make-lang.in (java/java-tree-inline.o): Removed.
2637
2638 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
2639
2640         PR java/19070
2641         * parse.y (patch_binop): Allow comparisons against NULL only
2642         if the other operand is of a reference type.
2643
2644 2005-01-24  Tom Tromey  <tromey@redhat.com>
2645
2646         * java-tree.h (gcj_abi_version): Declare.
2647         * class.c (make_class_data): Push gcj_abi_version into "next"
2648         field.  Renamed field.
2649         * decl.c (gcj_abi_version): New global.
2650         (parse_version): New function.
2651         (java_init_decl_processing): Call it.  Renamed 'next' field.
2652         Include version.h.
2653         (GCJ_BINARYCOMPAT_ADDITION): New define.
2654
2655 2005-01-24  Roger Sayle  <roger@eyesopen.com>
2656
2657         PR java/19295
2658         * jcf-write.c (generate_bytecode_insns): Conversions between
2659         integer types of the same precision shouldn't generate widening
2660         or narrowing conversion bytecodes.
2661
2662 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
2663
2664         * java-except.h, java-tree.h: Remove unused prototypes.
2665
2666 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
2667
2668         PR java/18091:
2669         * jcf-write.c (perform_relocations): Don't call memcpy if source
2670         and destination are the same.
2671
2672 2005-01-17  Tom Tromey  <tromey@redhat.com>
2673
2674         * verify-impl.c (get_short): Sign extend.
2675         (get_int): Likewise.
2676
2677 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
2678
2679         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2680         with TYPE_SIZE.
2681
2682 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2683
2684         * verify.c: Revert to the version before the BC-ABI merge.
2685
2686 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2687
2688         PR java/19277
2689         * check-init.c (check_init): Take care of references that do not
2690         have an explicit final variable declaration (e.g. array length
2691         access) for pre/post in/de-crement operators.
2692
2693 2005-01-08  Mark Wielaard  <mark@klomp.org>
2694
2695         * parse.y (process_imports): Allocate (and free) original_name only
2696         when not already defined.
2697         * jcf-parse.c (read_class): Free results of find_class() and
2698         lrealpath().
2699         (java_parse_file): Keep pointer to head of file_list and free when
2700         done. Free result of lrealpath().
2701
2702 2005-01-05  Tom Tromey  <tromey@redhat.com>
2703
2704         * gcj.texi (Standard Properties): java.ext.dirs is now used.
2705
2706 2004-12-20  Andrew Haley  <aph@redhat.com>
2707
2708         * typeck.c: Use fold_convert for ints and booleans.
2709
2710 2004-12-17  Andrew Haley  <aph@redhat.com>
2711
2712         PR java/18931
2713         * typeck.c (convert): Use a CONVERT_EXPR when converting to
2714         BOOLEAN_TYPE or CHAR_TYPE.
2715         (convert_to_boolean, convert_to_char) : Remove.
2716         * convert.h (convert_to_boolean, convert_to_char) : Remove.
2717         * expr.c (expand_load_internal): Do type conversion if type is not
2718         as required.
2719
2720 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
2721
2722         PR target/18459
2723         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2724         Update comment.
2725
2726 2004-12-07  Andrew Haley  <aph@redhat.com>
2727
2728         PR java/18811:
2729         * jcf-parse.c (load_class): Remove sanity test for missing inner
2730         class file.
2731
2732 2004-12-06  Tom Tromey  <tromey@redhat.com>
2733
2734         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
2735         (java.uninstall): Likewise.
2736         (java.maintainer-clean): Likewise.
2737         (.INTERMEDIATE): Likewise.
2738         (java.install-man): Likewise.
2739         (gcj-dbtool.pod): New target.
2740         * gcj.texi (Code Generation): Document -findirect-dispatch.
2741         (libgcj Runtime Properties): Document
2742         gnu.gcj.precompiled.db.path.
2743         (Top): Link to "Invoking gcj-dbtool".
2744
2745 2004-12-06  Tom Tromey  <tromey@redhat.com>
2746
2747         PR java/14853:
2748         * java-tree.h (extract_field_decl): Declare.
2749         * parse.y (extract_field_decl): Renamed from
2750         strip_out_static_field_access_decl.  No longer static.
2751         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
2752
2753 2004-12-03  Tom Tromey  <tromey@redhat.com>
2754
2755         * lang.c (flag_new_verifier): Define.
2756         (java_post_options): Set flag_new_verifier if indirect dispatch
2757         is being used.
2758         * lang.opt (fnew-verifier): Removed.
2759
2760 2004-12-03  Tom Tromey  <tromey@redhat.com>
2761
2762         PR bootstrap/14614:
2763         * Make-lang.in (java.install-common): Only install transformed
2764         gcjh if gcj-cross exists.
2765
2766 2004-12-03  Andrew Haley  <aph@redhat.com>
2767
2768         PR java/18812
2769         * except.c (link_handler): Patch 'outer' field of siblings of the
2770         range we're demoting.
2771
2772 2004-12-03  Andrew Haley  <aph@redhat.com>
2773
2774         PR java/18697
2775         * class.c (layout_class_method): Don't fail to override a method
2776         simply because it has DECL_ARTIFICIAL set.
2777
2778 2004-12-02  Tom Tromey  <tromey@redhat.com>
2779
2780         PR java/16675:
2781         * parse.y (craft_constructor): Special case null_pointer_node.
2782
2783 2004-12-02  Tom Tromey  <tromey@redhat.com>
2784
2785         PR java/18741:
2786         * java-gimplify.c (java_gimplify_expr): Don't call
2787         SET_EXPR_LOCATION unless wrapped tree is an expression.
2788
2789 2004-11-27  Per Bothner  <per@bothner.com>
2790
2791         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
2792         Fix fencepost error in 'i', which got executed one too many times.
2793         Also, fold memcpy into explicit loop, as originally intended.
2794         Also, free temporary 'buf' which otherwise leaks.
2795
2796 2004-11-27  Per Bothner  <per@bothner.com>
2797
2798         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2799         local static variables if not USE_MAPPED_LOCATION.
2800
2801 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2802
2803         * class.c, decl.c, expr.c: Fix comment typos.
2804
2805 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
2806
2807         PR java/18305
2808         * decl.c (end_java_method): Call
2809         attach_init_test_initialization_flags on all the init_decls.
2810         * parse.y (attach_init_test_initialization_flags): Move to ...
2811         * expr.c (attach_init_test_initialization_flags): here and
2812         support BIND_EXPR also.
2813         * java-tree.h (attach_init_test_initialization_flags): Prototype.
2814         * jcf-parse.c (parse_class_file): Don't disable class init
2815         optimization.
2816
2817 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2818
2819         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
2820         in diagnostics.
2821
2822 2004-11-24  Richard Henderson  <rth@redhat.com>
2823
2824         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
2825         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2826
2827 2004-11-24  Tom Tromey  <tromey@redhat.com>
2828
2829         * verify.c (defer_merging): Don't use C++-style comment.
2830         * verify.h (java_opcode): Added java_opcode_end.
2831         * class.c (build_class_ref): Remove C++ comment and old FIXME.
2832
2833         * verify-impl.c (vfy_push_type): Removed bogus "return".
2834         (initialize_stack): Use vfy_alloc and vfy_free.
2835         (verify_instructions_0): Likewise.
2836
2837         * Merged gcj-abi-2-dev-branch to trunk.
2838
2839 2004-11-24  Andrew Haley  <aph@redhat.com>
2840
2841         * jcf-parse.c (parse_class_file): Set file_start_location.
2842
2843 2004-11-10  Tom Tromey  <tromey@redhat.com>
2844
2845         * class.c (make_field_value): Don't call build_static_field_ref.
2846         (build_static_field_ref): Don't emit direct references when using
2847         indirect dispatch.
2848
2849         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
2850         -verbose:class into man page synopsis.
2851
2852 2004-11-09  Tom Tromey  <tromey@redhat.com>
2853
2854         * expr.c (build_java_arraystore_check): Still generate check if
2855         element type is itself an array.
2856
2857 2004-11-08  Tom Tromey  <tromey@redhat.com>
2858
2859         * java-tree.h (soft_check_assignment_node): Removed.
2860         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
2861         * decl.c (java_init_decl_processing): Don't initialize
2862         soft_check_assignment_node.
2863
2864 2004-11-05  Tom Tromey  <tromey@redhat.com>
2865
2866         * class.c (layout_class_methods): Don't add Miranda methods when
2867         using indirect dispatch.
2868
2869 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
2870
2871         * class.c (make_class_data): Call emit_assertion_table to set the
2872         'assertion_table' field.
2873         (build_signature_for_libgcj): Move here from expr.c.
2874         (add_assertion_table_entry): New function. Callback for assertion
2875         hashtable traversal.
2876         (emit_assertion_table): New. Take class argument, and generate
2877         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
2878         * decl.c (init_decl_processing): Define assertion_entry_type record.
2879         Push 'assertion_table' class field instead of 'verify'.
2880         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
2881         (type_assertion_hash): Include 'assertion_code' in hash.
2882         (add_type_assertion): Rewritten. Take class and assertion_code
2883         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
2884         (can_widen_reference_to): Use new add_type_assertion() arguments.
2885         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
2886         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
2887         (verify_identifier_node): Removed.
2888         (assertion_entry_type, assertion_table_type): New.
2889         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
2890         assertion code definitions.
2891         (struct type_assertion): Add assertion_code. Rename 'source_type' and
2892         'target_type' to 'op1' and 'op2'.
2893         (add_type_assertion): Declare.
2894         (lang_printable_name_wls): Remove unused definition.
2895         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
2896         to emit runtime assertion.
2897         (vfy_note_stack_type): Clean up non-C90 declarations.
2898         (vfy_note_local_type): Likewise.
2899         * verify.h (vfy_is_assignable_from): Declare.
2900         * verify-impl.c (is_assignable_from_slow): Remove unused function.
2901         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
2902         instead of is_assignable_from_slow().
2903         (types_compatible): Reinstate ref_compatible() call.
2904
2905 2004-11-04  Tom Tromey  <tromey@redhat.com>
2906
2907         * class.c (build_static_field_ref): Reverted previous patch.
2908
2909         * class.c (build_static_field_ref): Don't emit direct references
2910         when using indirect dispatch.
2911
2912 2004-11-03  Tom Tromey  <tromey@redhat.com>
2913
2914         * expr.c (expand_java_arrayload): Set lhs_type_node.
2915         (expand_java_arraystore): Set rhs_type_node.
2916
2917 2004-11-02  Tom Tromey  <tromey@redhat.com>
2918
2919         * jcf-parse.c (compute_class_name): Use filename length from zip
2920         directory, not strlen.
2921
2922         * expr.c (expand_invoke): Mark new interface methods as abstract.
2923
2924 2004-11-01  Tom Tromey  <tromey@redhat.com>
2925
2926         * verify-impl.c (push_jump): Removed check for uninitialized
2927         objects.
2928         (push_exception_jump): Likewise.
2929         (handle_ret_insn): Likewise.
2930         (handle_jsr_insn): Likewise.
2931         (state_check_no_uninitialized_objects): Removed.
2932
2933         * decl.c (check_local_unnamed_variable): Recognize
2934         promoted-to-int parameters when using the new verifier.
2935         * expr.c (expand_java_arraystore): Explicitly request array type
2936         when using new verifier.
2937         (expand_java_arrayload): Likewise.
2938         (invoke_build_dtable): Don't pass object_type_node as
2939         expression argument to build_java_indirect_ref.
2940         (build_java_check_indexed_type): Do nothing.
2941         (build_java_arraystore_check): Handle case where array doesn't
2942         have array type.
2943         (build_java_array_length_access): Likewise.
2944         (expand_invoke): Handle case where interface overrides a method
2945         from Object.
2946         (pop_type_0): Always succeed for reference types.
2947         (process_jvm_instruction): Don't pop a value in a dead
2948         exception handler.
2949         (pop_arguments): Convert arguments to correct types.
2950
2951 2004-10-29  Andrew Haley  <aph@redhat.com>
2952
2953         * jcf-parse.c (give_name_to_class): Remove line that was
2954         incorrectly merged.
2955
2956 2004-10-29  Andrew Haley  <aph@redhat.com>
2957
2958         * jcf-parse.c (set_source_filename): Add code to build new sfname.
2959
2960 2004-10-20  Andrew Haley  <aph@redhat.com>
2961
2962         * decl.c (end_java_method): Don't expand if flag_syntax_only.
2963
2964 2004-10-26  Tom Tromey  <tromey@redhat.com>
2965
2966         * verify.h (vfy_notify_verified): Removed.
2967         * verify-glue.c (vfy_notify_verified): Removed.
2968
2969 2004-10-26  Tom Tromey  <tromey@redhat.com>
2970
2971         * verify-impl.c (debug_print_state): Declare `i' before code.
2972         (merge_types): Modify `t' when it is null_type.
2973
2974 2004-10-26  Tom Tromey  <tromey@redhat.com>
2975
2976         * verify-impl.c (type_print): Renamed from print.  Now static and
2977         takes an argument.
2978         (debug_print_state): Use type_print.
2979
2980 2004-10-25  Tom Tromey  <tromey@redhat.com>
2981
2982         * expr.c (build_invokeinterface): Compute correct offset for
2983         index into interface methods.
2984
2985 2004-10-20  Tom Tromey  <tromey@redhat.com>
2986
2987         * java-tree.h (verify_jvm_instructions_new): Declare.
2988
2989         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
2990         command line.
2991
2992         * verify-impl.c (verify_instructions): Correctly handle wide
2993         types on the stack.
2994         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
2995         (vfy_get_component_type): Strip pointer types.
2996         (vfy_find_class): Use get_type_from_signature.  Strip pointer
2997         types.
2998         Include java-except.h.
2999
3000 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
3001
3002         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3003         vfy_push_type_t, set_variable, add_new_state, merge_into,
3004         handle_jsr_insn, branch_prepass, check_class_constant,
3005         check_wide_constant, get_one_type, compute_static_types,
3006         verify_instructions_0): Clean up C99 declarations after statements.
3007
3008 2004-10-20  Tom Tromey  <tromey@redhat.com>
3009
3010         * verify-impl.c (merge_refs): Compare reference against iterator,
3011         not ref2.
3012
3013         * verify-glue.c (vfy_tag): Mask off resolved flag.
3014
3015 2004-10-19  Tom Tromey  <tromey@redhat.com>
3016
3017         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3018         (init_state_with_stack): Initialize `this_type' in state.
3019         (verify_method): Use debug_print.
3020         * verify-glue.c (vfy_is_primitive): Removed debugging print.
3021         (vfy_note_stack_depth): Reverted last patch.
3022         (vfy_note_stack_type): Note pointer to Object, not Object.
3023         (vfy_note_local_type): Likewise.
3024
3025         * verify.h (vfy_note_instruction_seen): Declare.
3026         * verify-glue.c (verify_jvm_instructions_new): Set
3027         BCODE_EXCEPTION_TARGET on target instruction.
3028         (vfy_note_instruction_seen): New function.
3029         * verify-impl.c (FLAG_INSN_SEEN): New define.
3030         (verify_instructions_0): Set flag on instruction.  Save state for
3031         PC=0 later.
3032         (verify_instructions): Call vfy_note_instruction_seen.
3033
3034         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3035         (verify_jvm_instructions_new): Call method_init_exceptions,
3036         add_handler, and handle_nested_ranges.
3037         * verify-impl.c (verify_method): Return 1 on success.
3038         (verify_instructions_0): Save the state at PC=0.
3039
3040         * verify-impl.c (init_type_from_class): Set is_resolved and
3041         ref_next on new ref_intersection.
3042         (init_type_from_string): Likewise.
3043
3044 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
3045
3046         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3047         if flag_new_verifier is set.
3048         * java-tree.h (flag_new_verifier): Declare.
3049         * lang.opt (fnew-verifier): New option.
3050         * verify-impl.c: Work around namespace pollution by undef'ing
3051         'current_class'.
3052         (struct verifier_context): Make 'bytecode' const.
3053         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3054         (types_compatible): For the BC-ABI, always consider reference types
3055         compatible.
3056         (check_class_constant): Use vfr->current_class.
3057         (check_constant): Likewise.
3058         (check_wide_constant): Likewise.
3059         (check_field_constant): Check for 'L' at start of type name.
3060         (get_one_type): Return pointer instead of type. Set type result in
3061         caller via passed type pointer.
3062         (compute_argument_types): Update to use new get_one_type arguments.
3063         (compute_return_type): Likewise.
3064         (make_verifier_context): New. Allocate and initialize 'vfr'.
3065         (free_verifier_context): New. Free 'vfr' and its contents.
3066         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3067         and free_verifier_context.
3068
3069 2004-10-15  Tom Tromey  <tromey@redhat.com>
3070
3071         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3072         * verify.h (vfy_fail): Fixed formatting.
3073
3074         * verify-impl.c (vfr): Fixed comment formatting.
3075         (collapse_type): New function.
3076         (verify_instructions): Notify compiler about type map.
3077         * verify.h (vfy_note_stack_depth): Updated.
3078         (vfy_note_stack_type): Likewise.
3079         (vfy_note_local_type): Likewise.
3080         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3081         Declare.
3082         * verify-glue.c (vfy_note_stack_depth): Correctly size type
3083         state.  Added `method' argument.
3084         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
3085         argument.
3086         (vfy_note_local_type): New function.
3087         (vfy_unsuitable_type): Likewise.
3088         (vfy_return_address_type): Likewise.
3089         (vfy_null_type): Likewise.
3090
3091         * verify.h (VFY_IN_GCC): Removed.
3092         (VFY_WANT_TYPEMAP): Removed.
3093         * verify-impl.c (verify_instructions_0): Removed useless "\".
3094         (struct state) <next>: Uncomment.
3095
3096 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
3097
3098         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3099         C-style.
3100
3101 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3102
3103         * Make-lang.in (verify.o): Re-enabled this target.
3104         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3105         (vfy_get_interface): Likewise.
3106         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3107         * verify.h (verify_jvm_instructions_new): Declare.
3108         * verify-impl.c (free_state): Temporarily comment out unused
3109         function.
3110
3111 2004-10-06  Tom Tromey  <tromey@redhat.com>
3112
3113         * java-tree.h (JV_STATE_READ): New enum value.
3114
3115 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3116
3117         * verify.h: New file.
3118
3119 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
3120
3121         * verify-impl.c, verify-glue.c, verify.h: New files.
3122         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3123
3124 2004-09-24  Andrew Haley  <aph@redhat.com>
3125
3126         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3127         for a slot if it's of pointer type.
3128
3129 2004-09-14  Tom Tromey  <tromey@redhat.com>
3130
3131         * class.c (make_class_data): Correctly initialize "state" field.
3132         Initialize "engine" field.
3133         * decl.c (java_init_decl_processing): Add "engine" field.
3134
3135 2004-09-10  Andrew Haley  <aph@redhat.com>
3136
3137         PR java/12760
3138         * expr.c (build_invokeinterface): Use fast method for interface
3139         dispatch.
3140         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3141         JTI_ITABLE_PTR_TYPE.
3142         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
3143         (emit_symbol_table): Add new arg, element_size.
3144         * decl.c (java_init_decl_processing): Initialize Class.itable.
3145         * class.c (GEN_TABLE): New macro.
3146         (gen_indirect_dispatch_tables): Use it.  Add itable.
3147         (make_class_data): Add new arg for emit_symbol_table().
3148         Emit itable.
3149         (add_miranda_methods): Make sure search_class has been parsed.
3150         (emit_symbol_table): Add new arg, element_size.
3151
3152 2004-09-06  Andrew Haley  <aph@redhat.com>
3153
3154         * verify.c (merge_types): Return Object for all merges of
3155         interfaces.
3156         * expr.c (add_type_assertion): Don't generate assertions when
3157         source type is array of Object.
3158
3159 2004-09-03  Andrew Haley  <aph@redhat.com>
3160
3161         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3162
3163         * lang.c (java_post_options): Force flag_verify_invocations if
3164         we're not using indirect dispatch.
3165
3166         * expr.c (pop_type_0): Move test for interfaces before call to
3167         can_widen_reference_to().
3168         (build_signature_for_libgcj): Remove generation of canonical array
3169         type.
3170         (add_type_assertion): Canonicalize both arrays.
3171         Don't assert that type X can be assigned to Object.
3172         Don't assert that type X an be assigned to type X.
3173         Don't assert that Object can be assigned to type X.
3174         (can_widen_reference_to): Warn whenever we generate an assertion.
3175         (process_jvm_instruction): Use throwable_type_node for the type of
3176         an exception class.
3177
3178 2004-09-01  Andrew Haley  <aph@redhat.com>
3179
3180         * decl.c (java_init_decl_processing): Change
3181         verify_identifier_node to "__verify".
3182         * expr.c (add_type_assertion): Use verify_identifier_node for name.
3183         * java-tree.h (verify_identifier_node): Change to "__verify".
3184
3185         * expr.c (build_signature_for_libgcj): New function.
3186         (add_type_assertion): Use it to construct signatures for
3187         source_type and target_type.
3188
3189 2004-08-27  Andrew Haley  <aph@redhat.com>
3190
3191         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3192         (verify_identifier_node): New.
3193         (TYPE_VERIFY_METHOD): New.
3194         (struct type_assertion): New type.
3195         * expr.c (type_assertion_eq): New function.
3196         (type_assertion_hash): New function.
3197         (add_type_assertion): New function.
3198         (can_widen_reference_to): Call add_type_assertion().
3199         * decl.c (java_init_decl_processing): Add verify_identifier_node.
3200         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3201         (finish_class): Output TYPE_VERIFY_METHOD (type).
3202
3203         * decl.c (end_java_method): Nullify unused fields.
3204
3205 2004-08-17  Andrew Haley  <aph@redhat.com>
3206
3207         * verify.c (defer_merging): Quieten.
3208         * jcf-parse.c (load_class): Only try to open a class file if it's
3209         java.lang.Object or if it's part of the current compilation.
3210         Check that the class we just tried to load is the class we just
3211         loaded.  Quieten.
3212         (java_parse_file): Set flag_verify_invocations off if we're
3213         compiling from .class.
3214         (parse_zip_file_entries): Abort if we try to read a dummy class.
3215         * expr.c (can_widen_reference_to): Quieten.
3216         (build_invokevirtual): Abort if we try to invokevirtual an
3217         interface.
3218         (expand_invoke): Don't build a non-interface call to an interface.
3219         (build_instanceof): Don't do premature optimization if
3220         flag_verify_invocations is not set.
3221         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3222         from superclass.
3223         (build_static_field_ref): Add correct type conversion for
3224         field_address.
3225         (add_miranda_methods): Disable generation of Miranda methods for
3226         dummy classes.
3227         (layout_class_method): Don't complain about non-static method
3228         overrides static method with dummy classes.
3229
3230 2004-08-13  Tom Tromey  <tromey@redhat.com>
3231
3232         * class.c (build_static_field_ref): Re-enable atable lookups for
3233         static fields.
3234
3235         * parse.y (strip_out_static_field_access_decl): Indentation fix.
3236
3237 2004-08-11  Tom Tromey  <tromey@redhat.com>
3238
3239         * gcj.texi (libgcj Runtime Properties): Document new properties.
3240
3241 2004-08-06  Andrew Haley  <aph@redhat.com>
3242
3243         * jcf-parse.c (load_class): Check that we really have loaded the
3244         class we're looking for.
3245
3246 2004-07-19  Andrew Haley  <aph@redhat.com>
3247
3248         * verify.c (verify_jvm_instructions): Comment change only.
3249
3250         * typeck.c (build_java_array_type): Add size field to array name.
3251
3252         * java-tree.h (LOCAL_SLOT_P): New.
3253         (update_aliases): Add PC argument.
3254         (pushdecl_function_level): New function.
3255
3256         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3257         MODIFY_EXPR, and SAVE_EXPR.
3258         (java_gimplify_modify_expr): New function.
3259
3260         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3261         (expand_iinc): Pass PC to update_aliases().
3262         (STORE_INTERNAL): Likewise.
3263         (process_jvm_instruction): Likewise.
3264
3265         * decl.c (base_decl_map): New variable.
3266         (uniq): New variable.
3267         (update_aliases): Rewrite with more thorough checking.
3268         (debug_variable_p): New function.
3269         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3270         (check_local_named_variable): Delete whole function.
3271         (initialize_local_variable): New function.
3272         (check_local_unnamed_variable): Add checks and comments.
3273         (find_local_variable): Rewrite.
3274         (java_replace_reference): New function.
3275         (function_binding_level): New variable.
3276         (pushdecl_function_level): New function.
3277         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3278         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3279         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3280         function_binding_level.
3281         (end_java_method): Null unused fields to save memory.
3282
3283 2004-06-29  Andrew Haley  <aph@redhat.com>
3284
3285         * except.c (expand_start_java_handler): Push a new binding level.
3286         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3287         register_exception_range() to register where we'll do it.
3288         (expand_end_java_handler): Remove old bogus code.  Replace with
3289         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3290         the top of the expression we're curently building.
3291         (maybe_end_try): Delete.
3292         * decl.c (binding_level.exception_range): New field.
3293         (clear_binding_level): Add field exception_range.  Reformat.
3294         (poplevel): Call expand_end_java_handler().
3295         (poplevel): Call java_add_stmt only if functionbody is false.
3296         (maybe_poplevels): Don't call maybe_end_try() from here.
3297         (end_java_method): Clear no longer used trees in function decl.
3298         (register_exception_range): New function.
3299         * java-tree.h (register_exception_range, struct eh_range): Declare.
3300
3301 2004-06-22  Andrew Haley  <aph@redhat.com>
3302
3303         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3304         the otable.
3305         * check-init.c (get_variable_decl): Teach check-init about
3306         FIELD_DECLs addressed via the otable.
3307         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3308         CLASS_PARSED_P.
3309
3310 2004-05-28  Andrew Haley  <aph@redhat.com>
3311
3312         * jcf-parse.c (load_class): Don't try to read a class that we've
3313         already read.
3314
3315         * expr.c (build_invokeinterface): Use the old-fashioned way of
3316         doing indirect dispatch: look up interfaces by name.
3317         * java-tree.h (enum java_tree_index): Add
3318         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3319         * decl.c (java_init_decl_processing): Add
3320         soft_lookupinterfacemethodbyname_node.
3321
3322         * gjavah.c (print_method_info): Final methods have vtable entries,
3323         so gjavah needs to output them.
3324         * class.c (layout_class_method): Generate vtable entries for final
3325         methods.
3326         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3327         dispatch, even if a method is final.
3328
3329 2004-05-25  Andrew Haley  <aph@redhat.com>
3330
3331         * class.c (build_symbol_entry): Convert the names of constructors
3332         to init_identifier_node when generating an entry for the indirect
3333         dispatch table.
3334
3335         * expr.c (build_known_method_ref): Generate indirect calls for
3336         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3337
3338 2004-05-24  Andrew Haley  <aph@redhat.com>
3339
3340         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3341         atable element is of the right type.
3342
3343         * class.c (build_static_field_ref): Cast pointer to correct type
3344         for field.
3345
3346 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3347
3348         * Merged with HEAD as of 20040514. Diff against
3349         gcj-abi-2-merge-20040514.
3350
3351 2004-04-16  Andrew Haley  <aph@redhat.com>
3352
3353         * verify.c (check_pending_block): Disable subroutine checks.
3354         (defer_merging): New function.
3355         (merge_types): If types are dummy, use defer_merging to combine them.
3356         (verify_jvm_instructions): If invocation is invokeinterface and
3357         target is dummy, assume target really is an interface.
3358
3359         * parse.y (patch_invoke): Break out call to java_create_object.
3360
3361         * lang.c (flag_verify_invocations): New.
3362
3363         * jcf-parse.c (load_class): If we've already failed to load a
3364         class, don't try again.
3365         (load_class): If we can't find a .class file, don't fail, but emit
3366         a warning.
3367         (parse_class_file): Don't act on dummy methods.
3368
3369         * java-tree.h (flag_verify_invocations): New.
3370         (TYPE_DUMMY): New.
3371         (lang_type.dummy_class): New field.
3372         (java_create_object): New function.
3373         (METHOD_DUMMY): New.
3374
3375         * expr.c (build_field_ref): Widen field offset.
3376         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3377         that each of its elements is compatible with the one we're
3378         popping.
3379         (pop_type_0): Issue a warning to say that we need to generate a
3380         runtime check.
3381         (java_create_object): New function.
3382         (build_field_ref): Only generate hard refs if we're not using
3383         indirect dispatch.
3384         (expand_java_field_op): If we're using !verify_invocations and we
3385         see a missing field, generate a decl for it.
3386
3387         (expand_invoke): If a class doesn't have the method we seek and
3388         we're using !flag_verify_invocations, generate a decl for the
3389         method now.
3390
3391         (build_known_method_ref): Always use indirect dispatch via the
3392         atable for static methods.
3393
3394         (expand_java_NEW): Break out object creation into new function,
3395         java_create_object.
3396
3397         (can_widen_reference_to): Issue a warning to say that we need to
3398         generate a runtime check.
3399
3400         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3401         (make_method_value): Also use index for interfaces.
3402         (make_class_data): Skip dummy field for inherited data.
3403         Don't build method array for dummy methods.
3404         Set size_in_byte to -1 when using inirect dispatch
3405         Don't build a hard class ref if we don't have a hard ref to our
3406         superclass, or if we're using inirect dispatch.
3407         Null out dispatch tables.
3408
3409         (layout_class_method): Don't complain about non-static method
3410         overrides static method is method is artificial.
3411
3412         (build_static_field_ref): Disable atable references to static
3413         fields for the time being.
3414
3415         (layout_class_methods): Check for CLASS_INTERFACE as
3416         well as CLASS_ABSTRACT.
3417
3418 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3419
3420         * class.c (make_class_data): Don't check flag_inline_functions.
3421         * lang.c (flag_really_inline): Remove unused flag.
3422         (java_handle_option): Don't set it here.  Remove special handling
3423         of flag_inline_functions for Java.
3424         (java_init): Don't set flag_inline_trees here.  Already done...
3425         (java_post_options): ...here.  Don't clear flag_inline_functions.
3426
3427 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3428
3429         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3430         (java_gimplify_exit_block_expr): New function.
3431         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3432         LABELED_BLOCK_EXPR.
3433         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3434         (EXIT_BLOCK_EXPR): Likewise.
3435         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3436         (LABELED_BLOCK_BODY): Likewise.
3437         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3438         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3439         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3440         TREE_OPERAND.
3441         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3442         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3443         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3444         second operand of EXIT_BLOCK_EXPR.
3445         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3446         TREE_OPERAND.
3447         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3448
3449 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3450
3451         * xref.h (xref_flag_value): Remove.
3452         (xref_set_data, xref_get_data): Likewise.
3453         (xref_set_current_fp): Likewise.
3454         (XREF_NONE): Likewise.
3455         (XREF_GET_DATA): Likewise.
3456         * xref.c (xref_flag_value): Remove.
3457         (xref_set_data, xref_get_data): Likewise.
3458         (xref_set_current_fp): Likewise.
3459
3460 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3461
3462         * gjavah.c (output_directory): Make static.
3463         (temp_directory): Likewise.
3464
3465 2004-11-15  Tom Tromey  <tromey@redhat.com>
3466
3467         * decl.c (instn_ptr_type_node): Removed.
3468         (lineNumbers_ptr_type_node): Removed.
3469         (jint_type): Removed.
3470         (jint_ptr_type): Removed.
3471
3472 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3473
3474         PR java/15576
3475         * check-init.c (check_init): Ignore DECL_EXPR.
3476         * expr.c (always_initialize_class_p): Reenable.
3477         (build_class_init): Use a variable to store the decl.  Also use
3478         boolean_false_node instead of integer_zero_node.
3479         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3480         to the block.
3481
3482 2004-11-08  Tom Tromey  <tromey@redhat.com>
3483
3484         PR java/16843:
3485         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3486         generating a JNI header.
3487         (print_field_info): Handle JNI headers.
3488         (jni_print_float): Likewise.
3489         (jni_print_double): Likewise.
3490
3491 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
3492
3493         * decl.c (end_java_method): Remove duplicated code.
3494
3495 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
3496             Gerald Pfeifer  <gerald@pfeifer.com>
3497
3498         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3499         as well.
3500
3501 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
3502
3503         PR java/17265
3504         * class.c: Reinstate 2004-08-18 patch.
3505         (make_local_function_alias): Don't create an alias for extern (native)
3506         functions.
3507
3508 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3509
3510         PR java/17265
3511         * class.c (make_local_function_alias): Revert 2004-08-18 change.
3512         (make_method_value): Likewise.
3513
3514 2004-10-21  Andrew Haley  <aph@redhat.com>
3515
3516         PR java/18091:
3517         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3518
3519 2004-10-20  Andrew Haley  <aph@redhat.com>
3520
3521         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3522         Remove duplicated code block.
3523
3524 2004-10-18  Steven Bosscher  <stevenb@suse.de>
3525
3526         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3527         New rules to work around old Bison warnings.
3528
3529 2004-10-17  Steven Bosscher  <stevenb@suse.de>
3530
3531         * class.c (ident_subst): Always alloca buffer.
3532         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3533         opcode after including javaop.def.
3534         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3535         conditional expression that exits, to avoid warnings.
3536         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3537         a user of an extension.
3538         * win32-host.c: Move check down to have non-empty file when
3539         WIN32 is not defined.
3540
3541         * Make-lang.in (java-warn): Add STRICT_WARN.
3542         (java/jcf-io.o-warn): Don't have Werror for this file.
3543         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3544
3545 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
3546
3547         * expr.c (expr_add_location): Move declaration to before all
3548         statements.
3549         * parse.y (java_expand_classes): Ditto.
3550         * lex.c (java_peek_unicode): Ditto.
3551
3552 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3553
3554         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3555         if possible, else convert `foo' to 'foo'.
3556         * class.c: Likewise.
3557         * decl.c: Likewise.
3558         * expr.c: Likewise.
3559         * jcf-io.c: Likewise.
3560         * jcf-parse.c: Likewise.
3561         * lang.c: Likewise.
3562         * lex.c: Likewise.
3563         * parse.h: Likewise.
3564
3565 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3566
3567         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3568         rename parameter 'msg' to 'msgid' in function declaration.
3569         (issue_warning_error_from_context): Likewise.
3570         (yyerror): Rename parameter 'msg' to 'msgid'.
3571         (all over): Use new quoting style for diagnostics.
3572
3573 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
3574
3575         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3576         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3577         Update copyright.
3578
3579 2004-10-14  Matt Austern  <austern@apple.com>
3580
3581         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3582         pointer_set_t* now.
3583
3584 2004-10-13  Tom Tromey  <tromey@redhat.com>
3585
3586         PR java/15578:
3587         * lang.opt (--extdirs): Document.
3588         * jvspec.c (lang_specific_driver): Recognize -encoding and
3589         -extdirs.
3590
3591 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
3592
3593         * parse.y (issue_warning_error_from_context): Use va_list *
3594         instead of va_list parameter.
3595         (parse_error_context): Update call.
3596         (parse_warning_context): Likewise.
3597
3598 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
3599
3600         * parse.y, parse-scan.y: Add list of diagnostic messages to
3601         insulate translation template from version of yacc/bison used
3602         to compile the grammar.
3603
3604 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
3605
3606         Prepare for %q, %< and %> in diagnostic message strings.
3607         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3608         Name second parameter 'msgid'.
3609         * parse.y: Additionally include pretty-print.h and diagnostic.h.
3610         (issue_warning_error_from_context): Use pretty-printer functions
3611         instead of vsprintf for constructing formatted messages. Rename
3612         parameter 'msg' to 'msgid'.
3613         (parse_error_context): Rename parameter 'msg' to 'msgid'.
3614         (parse_warning_context): Likewise.
3615
3616 2004-10-05  Andrew Haley  <aph@redhat.com>
3617
3618         PR java/17779
3619         * jcf-parse.c (parse_zip_file_entries): If a class has a
3620         superclass and a TYPE_SIZE of zero, lay it out.
3621
3622 2004-09-30  Andrew Haley  <aph@redhat.com>
3623
3624         PR java/17733
3625         * jcf-parse.c (compute_class_name): Rewrite.
3626
3627 2004-10-01  Jan Hubicka  <jh@suse.cz>
3628
3629         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3630
3631 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3632
3633         * lex.c: Fix a comment typo.
3634
3635 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3636
3637         * java-tree.h: Fix a comment typo.
3638
3639 2004-09-30  Per Bothner  <per@bothner.com>
3640
3641         Simplify lexer.  Implement --enable-mapped-location support.
3642         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
3643         (parse_source_file_1): Pass filename as extra parameter, so we can call
3644         linemap_add and set input_location here, rather than in both callers.
3645         (read_class): Pass copied filename to parse_source_file_1.
3646         Don't initialize wfl_operator - only needed for source compilation.
3647         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
3648         * lex.h:  Remove a bunch of debugging macros.
3649         * lex.h (struct_java_line, struct java_error):  Remove types.
3650         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
3651         (struct java_lc_s):  Remove prev_col field.
3652         (struct java_lexer):  New fields next_unicode, next_columns, and
3653         avail_unicode.  New position field, and maybe token_start field.
3654         Don't need hit_eof field - use next_unicode == -1 instead.
3655         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
3656         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
3657         * parse.h:  Various changes for USE_MAPPED_LOCATION.
3658         (EXPR_WFL_EMIT_LINE_NOTE): XXX
3659         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3660         (struct parser_ctxt):  New file_start_location field.
3661         Remove p_line, c_line fields since we no longer save lines.
3662         Remove elc, lineno, and current_jcf fields - no longer used.
3663         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
3664         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3665         source_location and is probably not needed anymore anyway.
3666         Use new expr_add_Location function.
3667         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
3668         (java_pop_parser_context):  Minor cleanup.
3669         (java_parser_context_save_global, java_parser_context_restore_global,
3670         java_pop_parser_context):  Save/restore input_location as a unit.
3671         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
3672         a source_location instead of a wfl context node.
3673         (check_class_interface_creation):  input_filename is not addressable.
3674         (create_artificial_method):  Calling java_parser_context_save_global
3675         and java_parser_context_restore_global is overkill.  Instead,
3676         temporarily set input_location from class decl.
3677         (java_layout_seen_class_methods): Set input_location from method decl.
3678         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
3679         (finish_loop_body):  Likewise.
3680         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
3681         (java_sprint_unicode):  Take a character, not index in line.
3682         (java_sneak_uncode):  Replaced by java_peek_unicode.
3683         (java_unget_unicode):  No longer used.
3684         (java_allocate_new_line. java_store_unicode):  Removed, since we
3685         no longer remember "lines".
3686         (java_new_lexer):  Update for new data structures.
3687         (java_read_char):  Move unget_value checking to java_read_unicode.
3688         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
3689         efficient functions that are used directly when lexing.
3690         (java_read_unicode_collapsing_terminators):  No longer needed.
3691         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
3692         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
3693         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
3694         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
3695         combine switch branches, and test for common token kinds earlier.
3696         (java_lex_error):  Rewrite.
3697         * jv-scan.c (expand_location): New function, copied from tree.c.
3698         (main): Set ctxp->filename instead of setting input_filename directly.
3699
3700 2004-09-30  Per Bothner  <per@bothner.com>
3701
3702         More cleanup for --enable-mapped-location.
3703         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
3704         input_location here.  Instead do it in give_name_to_class.
3705         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
3706         * expr.c (expand_byte_code): Call linemap_line_start.
3707         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
3708         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
3709         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
3710         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
3711         to USE_MAPPED_LOCATION case.
3712
3713         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
3714         * jcf-parse.c (java_parse_file): Don't set input_filename.
3715         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
3716         Create a list of TRANSLATION_UNIT_DECL.
3717         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
3718         reason is so we can set a DECL_SOURCE_LOCATION for each file.
3719         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
3720         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
3721         (file_start_location):  New static.
3722         (set_source_filename):  Avoid extra access to input_filename macro.
3723         Concatenate new name with class's package prefix.
3724         (set_source_filename, give_name_to_class): Update.
3725         (give_name_to_class):  Set class's "line 0" input_location here.
3726         (parse_class_file):  Set input_location as a unit.
3727
3728         * jcf-parse.c (load_class): Sanity test if missing inner class file.
3729
3730 2004-09-29  Per Bothner  <per@bothner.com>
3731
3732         * java-tree.h:  Redefine some macros and add some declaration
3733         to handle the USE_MAPPED_LOCATION case.
3734         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
3735         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
3736         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
3737         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
3738
3739         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
3740         * decl.c (finish_method, java_add_stmt): Likewise.
3741         * java-gimplify.c (java-gimplify.c):  Likewise.
3742         * jcf-write.c (generate_bytecode_insns):  Likewise.
3743         * lang.c (java_post_options): Likewise - call linemap_add.
3744
3745 2004-09-29  Andrew Haley  <aph@redhat.com>
3746
3747         PR java/17007
3748         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
3749         result of TRUNC_MOD_EXPR.
3750         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
3751         * decl.c (java_init_decl_processing): Mark
3752         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
3753
3754 2004-09-28  Tom Tromey  <tromey@redhat.com>
3755
3756         PR java/15710:
3757         * class.c (add_miranda_methods): Load superinterface if not
3758         already loaded.
3759
3760 2004-09-28  Andrew Haley  <aph@redhat.com>
3761
3762         PR java/17586
3763         * jcf-parse.c (load_class): Don't try to read a class that we've
3764         already read.
3765
3766 2004-09-28  Andrew Haley  <aph@redhat.com>
3767
3768         * jcf-parse.c (load_class): Back out previous broken patch.
3769
3770 2004-09-28  Andrew Haley  <aph@redhat.com>
3771
3772         PR java/17586
3773         * jcf-parse.c (load_class): Don't try to read a class that we've
3774         already read.
3775         Check that we really did read the right class.
3776
3777 2004-09-25  Tom Tromey  <tromey@redhat.com>
3778
3779         PR java/17500:
3780         * parse.y (create_artificial_method): Use add_method_1.
3781
3782 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
3783
3784         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3785         comment typos.
3786         * gcj.texi: Fix typos.
3787
3788 2004-09-24  Tom Tromey  <tromey@redhat.com>
3789
3790         PR java/15656:
3791         * parse.y (class_instance_creation_expression): Set `$$' to NULL
3792         in error parts of rule.
3793         (unary_expression): Don't call error_if_numeric_overflow when $1
3794         is NULL.
3795
3796 2004-09-24  Tom Tromey  <tromey@redhat.com>
3797
3798         PR java/16789:
3799         * parse.y (resolve_qualified_expression_name): Set
3800         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
3801         * expr.c (force_evaluation_order): Check for empty argument list
3802         after stripping COMPOUND_EXPR.
3803
3804 2004-09-23  Andrew Haley  <aph@redhat.com>
3805
3806         PR java/16927:
3807         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
3808         COND_EXPRs.
3809
3810 2004-09-23  Tom Tromey  <tromey@redhat.com>
3811
3812         PR java/17329:
3813         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
3814         where operand is null.
3815
3816 2004-09-23  Tom Tromey  <tromey@redhat.com>
3817
3818         PR java/17380:
3819         * parse.y (not_accessible_p): Allow access to protected members
3820         even when class is not static.
3821
3822 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
3823
3824         * Make-lang.in: Revert the gcc-none.o change.
3825
3826 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3827
3828         * parse.y (patch_anonymous_class): VEC_space returns true if there
3829         is space.
3830
3831 2004-09-21  Matt Austern  <austern@apple.com>
3832
3833         Fix bootstrap.
3834         * gjavah.c (free_method_name_list): Fix function definition so
3835         it's a proper C prototype.
3836
3837 2004-09-21  Tom Tromey  <tromey@redhat.com>
3838
3839         PR java/17575:
3840         * gjavah.c (free_method_name_list): New method.
3841         (main): Call it.
3842
3843 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3844             Zack Weinberg  <zack@codesourcery.com>
3845
3846         * java-tree.def: Use tree_code_class enumeration constants
3847         instead of code letters.
3848         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
3849         new tree-class enumeration constants.
3850
3851 2004-09-13  Tom Tromey  <tromey@redhat.com>
3852
3853         PR java/17216:
3854         * class.c (layout_class_method): Put synthetic methods into the
3855         vtable.
3856
3857 2004-09-11  Andrew Pinski  <apinski@apple.com>
3858
3859         * Make-lang.in (java/ggc-none.c): Change dependency
3860         for ggc.h into $(GGC_H).
3861
3862 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3863
3864         * Make-lang.in (java/win32-host.o): Add dependency on
3865         coretypes.h.
3866         * win32-host.c: Add includes for coretypes.h, jcf.h
3867
3868 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
3869
3870         * Make-lang.in (GCJH_OBJS): Change dependency from
3871         ggc-none.o to java/ggc-none.o
3872         (JCFDUMP_OBJS): Likewise.
3873         (java/ggc-none.o): New target.
3874
3875 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3876
3877         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
3878         * class.c (build_utf8_ref, build_static_field_ref,
3879         make_field_value, make_method_value, get_dispatch_table,
3880         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3881         * constants.c (get_tag_node, build_ref_from_constant_pool,
3882         build_constants_constructor): Likewise.
3883         * decl.c (java_init_decl_processing): Likewise.
3884         * expr.c (build_java_array_length_access, build_newarray,
3885         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3886         build_java_binop, build_field_ref, expand_java_add_case,
3887         expand_java_call, build_known_method_ref, build_invokevirtual,
3888         build_invokeinterface, build_jni_stub): Likewise.
3889         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3890         * jcf-parse.c (get_constant): Likewise.
3891         * lex.c (do_java_lex): Likewise.
3892         * parse.y (patch_binop, patch_unaryop, patch_cast,
3893         build_newarray_node, patch_newarray): Likewise.
3894         * resource.c (compile_resource_data): Likewise.
3895         * typeck.c (build_prim_array_type): Likewise.
3896
3897 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3898
3899         * decl.c (java_init_decl_processing): Adjust
3900         initialize_sizetypes call.
3901
3902 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3903
3904         * jv-scan.c (fancy_abort): Add.
3905
3906 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
3907
3908         * expr.c (build_java_arrayaccess): Use convert to change
3909         len's type.
3910
3911 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
3912
3913         * class.c (make_local_function_alias): Allocate extra space for 'L'
3914         in name buffer. Reported by Thomas Neumann.
3915
3916 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3917
3918         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
3919         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
3920         * lex.c (do_java_lex): Adjust.
3921         (error_if_numeric_overflow): Likewise.
3922
3923 2004-08-18  Andrew Pinski  <apinski@apple.com>
3924
3925         * class.c (make_local_function_alias): Only make a new decl if we
3926         support alias attribute on all decls.
3927
3928 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
3929
3930         * class.c (make_local_function_alias): New function. Create local
3931         alias for public method DECL.
3932         (make_method_value): Use make_local_function_alias.
3933         * parse.y (craft_constructor): Don't special-case anonymous classes.
3934         Always set ctor_name to init_identifier_node.
3935         (lookup_method_invoke): Call layout_class_method when creating
3936         anonymous class constructor.
3937
3938 2004-08-18  Richard Henderson  <rth@redhat.com>
3939
3940         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
3941         default case.  Treat '<' similarly.  Update for
3942         is_gimple_formal_tmp_var name change.
3943
3944 2004-08-17  Andrew Haley  <aph@redhat.com>
3945
3946         * lang.c (lang_printable_name): Obey verbose flag.
3947         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
3948         lang_printable_name().
3949         (verify_constructor_circularity, get_printable_method_name,
3950         check_abstract_method_definitions, java_check_regular_methods,
3951         java_check_abstract_methods, check_inner_class_access,
3952         fix_constructors, patch_method_invocation, patch_return):
3953         Likewise.
3954         * expr.c (pop_type_0): Likewise.
3955
3956         * java-tree.h (lang_printable_name_wls): Delete.
3957
3958 2004-08-16  Tom Tromey  <tromey@redhat.com>
3959
3960         PR java/8473:
3961         * parse.y (primary): Changed for initialized and uninitialized
3962         array creations.
3963         (array_access): Handle array_creation_initialized.
3964         (array_creation_expression): Split into
3965         array_creation_initialized and array_creation_uninitialized.
3966
3967 2004-08-16  Andrew Haley  <aph@redhat.com>
3968
3969         * jcf-write.c (find_constant_index): Canonicalize NaNs when
3970         generating bytecode.
3971
3972 2004-08-16  Elliot Lee <sopwith@redhat.com>
3973
3974         PR java/9677
3975         * jcf-parse.c (java_parse_file): Handle filenames with embedded
3976         spaces, and quoted filelists.
3977
3978 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3979
3980         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
3981         * class.c (build_utf8_ref, build_static_field_ref,
3982         make_field_value, make_method_value, get_dispatch_table,
3983         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3984         * constants.c (get_tag_node,  build_ref_from_constant_pool,
3985         build_constants_constructor): Likewise.
3986         * decl.c (java_init_decl_processing): Likewise.
3987         * expr.c (build_java_array_length_access, build_newarray,
3988         expand_java_multianewarray, expand_java_pushc, expand_iinc,
3989         build_java_binop, build_field_ref, expand_java_add_case,
3990         expand_java_call, build_known_method_ref, build_invokevirtual,
3991         build_invokeinterface, build_jni_stub): Likewise.
3992         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3993         * jcf-parse.c (get_constant): Likewise.
3994         * lex.c (do_java_lex): Likewise.
3995         * parse.y (patch_binop, patch_unaryop, patch_cast,
3996         build_null_of_type, patch_newarray): Likewise.
3997         * resource.c (compile_resource_data): Likewise.
3998         * typeck.c (build_prim_array_type): Likewise.
3999
4000 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
4001
4002         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4003         Don't create BLOCK here or call java_gimplify_block.
4004
4005 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4006
4007         * java-tree.h (flag_deprecated): Removed.
4008         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4009         * parse.y (check_deprecation): Check warn_deprecated instead of
4010         flag_deprecated.
4011
4012 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
4013
4014         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4015         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4016         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4017         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4018         flag_force_classes_archive_check, flag_optimize_sci,
4019         flag_indirect_dispatch): Remove explicit declarations.
4020         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
4021         final comment.
4022
4023 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
4024
4025         PR bootstrap/14893
4026         * Make-lang.in (java.install-man): Install from either build
4027         tree or source tree, whichever has the file first.
4028
4029 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4030
4031         * jcf-parse.c (get_constant): Adjust force_fit_type call.
4032         * lex.h (SET_LVAL_NODE_TYPE): Remove.
4033         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4034         (do_java_lex): Likewise. Adjust force_fit_type call.
4035
4036 2004-08-04  Roger Sayle  <roger@eyesopen.com>
4037             Andrew Haley  <aph@redhat.com>
4038
4039         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4040         checking trees as they're being built.
4041         (convert): Call convert_ieee_real_to_integer if we're
4042         converting a constant, even if we're writing a class file.
4043
4044 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
4045
4046         PR java/16701
4047         * parse.y (fold_constant_for_init): Call resolve_field_access with
4048         correct current_class context.
4049
4050 2004-08-01  Roger Sayle  <roger@eyesopen.com>
4051
4052         * decl.c (update_aliases, initialize_local_variable): Replace calls
4053         to build with calls to buildN.
4054         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4055         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4056         * parse.h (BUILD_THROW): Likewise.
4057         * parse.y (switch_expression, synchronized_statement,
4058         catch_clause_parameter, array_creation_expression,
4059         conditional_expression, make_qualified_name,
4060         resolve_qualified_expression_name, patch_method_invocation,
4061         patch_invoke, build_method_invocation, build_new_invocation,
4062         build_assignment, patch_assignment, build_binop, patch_binop,
4063         build_string_concatenation, build_incdec, patch_unaryop,
4064         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4065         patch_return, build_if_else_statement, build_labeled_block,
4066         build_new_loop, build_loop_body, build_bc_statement,
4067         build_assertion, encapsulate_with_try_catch, build_try_statement,
4068         build_try_finally_statement, patch_synchronized_statement,
4069         emit_test_initialization): Likewise, replace build with buildN.
4070
4071 2004-07-28  Eric Christopher  <echristo@redhat.com>
4072
4073         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4074         (java_unsafe_for_reeval): Ditto.
4075
4076 2004-07-26    <hp@bitrange.com>
4077
4078         * parse.y (build_super_invocation): Adjust declaration order to
4079         avoid declaration after statement.
4080
4081 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4082
4083         * decl.c: Rename all identifiers named `class' to `cl'.
4084
4085 2004-07-25  Richard Henderson  <rth@redhat.com>
4086
4087         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4088
4089 2004-07-23  Mike Stump  <mrs@apple.com>
4090
4091         * boehm.c (set_bit): Improve type safety wrt unsignedness.
4092         * gjavah.c (throwable_p, decode_signature_piece,
4093         print_full_cxx_name, print_include, add_namelet, add_class_decl,
4094         process_file): Likewise.
4095         * jcf-dump.c (main): Likewise.
4096         * jcf-io.c (read_zip_member): Likewise.
4097         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4098         give_name_to_class, get_class_constant): Likewise.
4099         * jcf-write.c (find_constant_wide, push_long_const,
4100         generate_classfile): Likewise.
4101         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4102         * parse.y (read_import_dir): Likewise.
4103         * typeck.c (parse_signature_type): Likewise.
4104         * verify.c (verify_jvm_instructions): Likewise.
4105         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4106
4107 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4108
4109         * Make-lang.in: Replace rmic and rmiregistry references with
4110         grmic and grmiregistry.
4111         * gcj.texi: Likewise.
4112
4113 2004-07-20  Andrew Haley  <aph@redhat.com>
4114
4115         PR java/16431.
4116         * verify.c (verify_jvm_instructions): Comment change only.
4117
4118         * typeck.c (build_java_array_type): Add size field to array name.
4119
4120         * java-tree.h (LOCAL_SLOT_P): New.
4121         (update_aliases): Add PC argument.
4122         (pushdecl_function_level): New function.
4123
4124         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4125         MODIFY_EXPR, and SAVE_EXPR.
4126         (java_gimplify_modify_expr): New function.
4127
4128         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4129         (expand_iinc): Pass PC to update_aliases().
4130         (STORE_INTERNAL): Likewise.
4131         (process_jvm_instruction): Likewise.
4132
4133         * decl.c (base_decl_map): New variable.
4134         (uniq): New variable.
4135         (update_aliases): Rewrite with more thorough checking.
4136         (debug_variable_p): New function.
4137         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4138         (check_local_named_variable): Delete whole function.
4139         (initialize_local_variable): New function.
4140         (check_local_unnamed_variable): Add checks and comments.
4141         (find_local_variable): Rewrite.
4142         (java_replace_reference): New function.
4143         (function_binding_level): New variable.
4144         (pushdecl_function_level): New function.
4145         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4146         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4147         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4148         function_binding_level.
4149         (end_java_method): Null unused fields to save memory.
4150
4151 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4152
4153         * class.c (add_interface_do): Remove.
4154         (set_super_info, interface_of_p, maybe_add_interface,
4155         add_interface, make_class_data, layout_class,
4156         add_miranda_methods): Adjust BINFO accessors and addition.
4157         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4158         accessors.
4159         * jcf-write.c (generate_classfile): Likewise.
4160         * parse.y (patch_anonymous_class, check_inner_circular_reference,
4161         check_circular_reference, java_complete_class,
4162         check_abstract_method_definitions,
4163         java_check_abstract_method_definitions,
4164         check_interface_throws_clauses, java_check_abstract_methods,
4165         lookup_java_interface_method2,
4166         find_applicable_accessible_methods_list): Adjust BINFO accessors
4167         and addition.
4168         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4169
4170 2004-07-18  Roger Sayle  <roger@eyesopen.com>
4171
4172         * builtins.c (max_builtin, min_builtin,
4173         java_build_function_call_expr): Replace calls to build with buildN.
4174         * class.c (build_class_ref, build_static_field_ref,
4175         get_dispatch_table, make_class_data, layout_class_method): Likewise.
4176         * constants.c (build_ref_from_constant_pool): Likewise.
4177         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4178         add_stmt_to_compound): Likewise.
4179         * except.c (build_exception_object_ref, expand_end_java_handler):
4180         Likewise.
4181         * java-gimplify.c (java_gimplify_case_expr,
4182         java_gimplify_default_expr, java_gimplify_block,
4183         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4184         * jcf-write.c (generate_bytecode_insns): Likewise.
4185         * typeck.c (convert_ieee_real_to_integer): Likewise.
4186
4187 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4188
4189         * java-tree.h (builtin_function): Declare.
4190
4191 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4192
4193         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4194         abuse restore_line_number_status.
4195
4196 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
4197
4198         g++/15861
4199         * jcf-parse.c (java_emit_static_constructor): Specify default
4200         priority.
4201
4202 2004-07-13  Per Bothner  <per@bothner.com>
4203
4204         * java-tree.h (all_class_filename):  Remove useless macro.
4205         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
4206         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
4207         * parse.y (java_parser_context_restore_global):  Replace
4208         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4209         * jcf-parse.c (read_class, java_parse_file):  Likewise.
4210
4211 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
4212
4213         PR java/16474
4214         gjavah.c (print_field_info): Emit constant only if field is static.
4215
4216 2004-07-11  Roger Sayle  <roger@eyesopen.com>
4217
4218         * expr.c (java_truthvalue_conversion, flush_quick_stack,
4219         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4220         build_java_ret, build_java_throw_out_of_bounds_exception,
4221         build_java_array_length_access, java_check_reference,
4222         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4223         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4224         expand_java_arrayload, build_java_monitor, expand_java_return,
4225         expand_load_internal, expand_java_NEW, build_get_class,
4226         build_instanceof, expand_java_CHECKCAST, expand_iinc,
4227         build_java_soft_divmod, build_java_binop, build_field_ref,
4228         expand_compare, expand_java_goto, expand_java_switch,
4229         expand_java_add_case, build_class_init, build_known_method_ref,
4230         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4231         expand_invoke, build_jni_stub, expand_java_field_op,
4232         java_expand_expr, expand_byte_code, STORE_INTERNAL,
4233         force_evaluation_order, emit_init_test_initialization): Convert
4234         calls to "build" into calls to the prefered "buildN" functions.
4235
4236 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4237
4238         * java-tree.h (set_block): Remove.
4239         * lang.c (java_clear_binding_stack): New.
4240         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4241         * decl.c (struct binding_level): Remove this_block.
4242         (clear_binding_level): Likewise.
4243         (poplevel): Don't handle this_block.
4244         (set_block): Remove.
4245
4246 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
4247
4248         * class.c (common_enclosing_context_p): Remove statement with no
4249         side-effects.
4250
4251 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4252
4253         PR java/8618
4254         * parse.y (create_anonymous_class): Remove 'location' argument. Use
4255         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4256         (craft_constructor): Inherit access flags for implicit constructor
4257         from the enclosing class.
4258         (create_class): Fix comment typo.
4259         (resolve_qualified_expression_name): Pass type of qualifier to
4260         not_accessible_p, not the type in which target field was found.
4261         (not_accessible_p): Handle inner classes. Expand protected
4262         qualifier-subtype check to enclosing instances, but don't apply this
4263         check to static members. Allow protected access to inner classes
4264         of a subtype. Allow private access within common enclosing context.
4265         (build_super_invocation): Get WFL line number info from current
4266         class decl.
4267         (build_incomplete_class_ref): Update for new create_anonymous_class
4268         signature.
4269         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4270         common_enclosing_instance_p.
4271         * class.c (common_enclosing_context_p): New. Determine if types
4272         share a common enclosing context, even across static contexts.
4273         (common_enclosing_instance_p): Renamed from
4274         common_enclosing_context_p. Determines if types share a common
4275         non-static enclosing instance.
4276         * java-tree.h (common_enclosing_instance_p): Declare.
4277         * jcf-write.c (get_method_access_flags): New. Surpress private flag
4278         for inner class constructors.
4279         (generate_classfile): Use get_method_access_flags.
4280
4281 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4282
4283         * class.c (interface_of_p): Check for null TYPE_BINFO.
4284
4285 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
4286
4287         * class.c (make_class): Do not create binfo here.
4288         (set_super_info): Create it here.
4289         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4290
4291 2004-07-08  Richard Henderson  <rth@redhat.com>
4292
4293         * expr.c (case_identity, get_primitive_array_vtable,
4294         java_expand_expr, emit_init_test_initialization): Remove.
4295         * java-tree.h (java_expand_expr): Remove.
4296         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4297
4298 2004-07-07  Per Bothner  <per@bothner.com>
4299
4300         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
4301         get internal error due to mismatched types.
4302
4303         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4304
4305         * gcj.texi (Linking):   New node.  Document -lgij usage.
4306
4307 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4308
4309         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4310         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4311         * java/class.c (set_super_info, class_depth, interface_of_p,
4312         maybe_add_interface, add_interface, make_class_data,
4313         layout_class, add_miranda_methods): Adjust BINFO macros.
4314         * expr.c (can_widen_reference_to, lookup_field): Likewise.
4315         * jcf-write.c (generate_classfile): Likewise.
4316         * parse.y (patch_anonymous_class,
4317         check_inner_circular_reference, check_circular_reference,
4318         java_complete_class, check_abstract_method_definitions,
4319         java_check_abstract_method_definitions,
4320         check_interface_throws_clauses, java_check_abstract_methods,
4321         lookup_java_interface_method2,
4322         find_applicable_accessible_methods_list): Likewise.
4323         * typeck.c (find_method_in_interface): Likewise.
4324         * verify.c (merge_types): Likewise.
4325
4326 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4327
4328         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4329         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4330
4331 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4332
4333         * class.c (make_class): Use make_tree_binfo.
4334         (set_super_info, add_interface_do): Likewise.
4335         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4336
4337 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4338
4339         * verify.c: Correct array element access formatting thinko.
4340
4341 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4342
4343         * verify.c: Insert a short blurb at the start referring to the JVMS.
4344         (merge_type_state): Remove redundant nested if statement.
4345         (verify_jvm_instructions): Ensure current_subr is initialised to
4346         NULL_TREE.
4347         Minor formatting fixes all over the place.
4348
4349 2004-07-02  Richard Henderson  <rth@redhat.com>
4350
4351         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4352
4353 2004-07-01  Richard Henderson  <rth@redhat.com>
4354
4355         * class.c (registerClass_libfunc): Remove.
4356         (init_class_processing): Don't set it.
4357         (emit_register_classes): Take list_p parameter.  Fill it in
4358         with _Jv_RegisterClass calls.
4359         * decl.c (java_init_decl_processing): Don't call
4360         init_resource_processing.
4361         * jcf-parse.c (java_emit_static_constructor): New.
4362         (java_parse_file): Call it.
4363         * resource.c (registerResource_libfunc): Remove.
4364         (init_resource_processing): Remove.
4365         (write_resource_constructor): Take list_p parameter.  Fill it in
4366         with _Jv_RegisterResource calls.
4367         * java-tree.h: Update prototypes.
4368
4369 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4370
4371         PR java/1262
4372         * class.c (layout_class_method): Do not override package-private
4373         method if its in a different package.
4374         (split_qualified_name): Move here from parse.y. Rename from
4375         breakdown_qualified. Add comment.
4376         (in_same_package): Move here from parse.y. Add comment.
4377         * java-tree.h (break_down_qualified, in_same_package): Declare.
4378         (in_same_package): Likewise.
4379         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4380         Callers updated.
4381
4382 2004-06-29  Andrew Haley  <aph@redhat.com>
4383
4384         * except.c (expand_start_java_handler): Push a new binding level.
4385         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4386         register_exception_range() to register where we'll do it.
4387         (expand_end_java_handler): Remove old bogus code.  Replace with
4388         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4389         the top of the expression we're curently building.
4390         (maybe_end_try): Delete.
4391         * decl.c (binding_level.exception_range): New field.
4392         (clear_binding_level): Add field exception_range.  Reformat.
4393         (poplevel): Call expand_end_java_handler().
4394         (poplevel): Call java_add_stmt only if functionbody is false.
4395         (maybe_poplevels): Don't call maybe_end_try() from here.
4396         (end_java_method): Clear no longer used trees in function decl.
4397         (register_exception_range): New function.
4398         * java-tree.h (register_exception_range, struct eh_range): Declare.
4399
4400 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4401
4402         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4403
4404 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4405
4406         Formatting fixes.
4407         * expr.c (class_has_finalize_method): Fix method name indentation.
4408         (expand_java_call): Remove K&R style parameter declaration.
4409         (expand_invoke): Fix statement indentation.
4410         (expand_java_field_op): Likewise.
4411         * parse-scan.y: Fix typo.
4412         (reset_report): Fix method name indentation.
4413         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4414         line. Fix typos.
4415         * verify.c (verify_jvm_instructions): Document parameters, insert
4416         page break.
4417         * lang.c (lang_init_source): Fix method name indentation.
4418         * class.c (common_enclosing_context_p): Likewise.
4419         (emit_symbol_table): Fix parameter list indentation.
4420         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4421         parameter declaration.
4422         * constants.c: Fix copyright notice indentation.
4423         * typeck.c (find_method_in_superclasses): Fix parameter list
4424         indentation.
4425         (find_method_in_interfaces): Likewise.
4426         * zextract.c (makelong): Fix method name indentation.
4427
4428 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4429
4430         PR java/15715.
4431         * parse.y (create_interface): Set correct access modifiers for
4432         interfaces.
4433         * jcf-write.c (get_classfile_modifiers): New function.
4434         (generate_classfile): Use get_classfile_modifiers, not
4435         get_access_flags.
4436
4437 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4438
4439         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4440         dependency to current parser context, not NULL_TREE, for top-level
4441         classes.
4442         (jdep_resolve_class): Enable member access check for all inner
4443         class dependencies.
4444
4445 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4446
4447         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4448         load_class.
4449
4450 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4451
4452         PR java/15734
4453         * expr.c (expand_java_field_op): Ensure that target class for static
4454         field access has been loaded.
4455
4456 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4457             Ranjit Mathew  <rmathew@hotmail.com>
4458
4459         PR java/1207, java/16178
4460         * jcf-parse.c (load_class): Return immediately if passed a type decl
4461         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4462         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4463         before calling load_class.
4464         (qualify_and_find): Likewise.
4465         (find_in_imports_on_demand): Likewise.
4466         (find_applicable_accessible_methods_list): Likewise.
4467
4468 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4469
4470         * parse.y (java_layout_seen_class_methods): Don't call load_class
4471         on class defined by source parser.
4472
4473 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4474
4475         * parse.y (set_nested_class_simple_name_value): Removed.
4476         (java_complete_expand_class): Remove calls to
4477         set_nested_class_simple_name_value.
4478
4479 2004-06-22  Andrew Haley  <aph@redhat.com>
4480             Ranjit Mathew  <rmathew@hotmail.com>
4481
4482         Fixes PR java/16113.
4483         * decl.c (force_poplevels): Remove call to expand_end_bindings.
4484
4485 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
4486
4487         * parse.y (create_class): Correct diagnostic message about
4488         java.lang.Object extending anything else.
4489
4490 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4491
4492         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4493         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4494         * constants.c (build_ref_from_constant_pool): Likewise.
4495         * expr.c (build_java_array_length_access): Likewise.
4496         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4497         (invoke_build_dtable, build_invokevirtual): Likewise.
4498         (build_invokeinterface, java_expand_expr): Likewise.
4499         (emit_init_test_initialization): Likewise.
4500         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4501         * parse.y (make_qualifed_name, build_array_ref): Likewise.
4502
4503 2004-06-21  Andrew Haley  <aph@redhat.com>
4504
4505         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4506         block.
4507
4508 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4509
4510         * jcf.h (struct JCF): Change java_source, right_zip and finished
4511         to unsigned int.
4512         * lex.h (struct java_lexer): Change hit_eof, read_anything,
4513         byte_swap and use_fallback to unsigned int.
4514         * parse.h (struct _jdep): Change flag0 to unsigned int.
4515
4516 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
4517
4518         Fixes PR java/13948
4519         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4520         before trying to lay out its methods.
4521         * jcf-parse.c (read_class): Track parsed files using canonical paths
4522         obtained via lrealpath from libiberty.
4523         (java_parse_file): Likewise.
4524         (parse_source_file_1): Rename formal parameter to reflect its
4525         modified purpose. Minor formatting fix.
4526
4527 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4528
4529         * class.c (emit_register_classes): Make the function uninlinable,
4530         do not set current_function_cannot_inline.
4531         * resource.c (write_resource_constructor): Do not reset
4532         flag_inline_functions around rest_of_compilation.
4533
4534 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
4535
4536         PR java/15769
4537         * expr.c (java_truthvalue_conversion): Handle
4538         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4539         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4540         i.e. return the expression.
4541
4542 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
4543
4544         * gjavah.c: Include version.h
4545
4546 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
4547
4548         * jcf-write.c (generate_bytecode_conditional): Correct handling
4549         of unordered conditionals. Add comment.
4550
4551 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
4552             Per Bothner  <per@bothner.com>
4553
4554         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4555         local variable was initialised upon declaration.
4556         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4557         variable was final and initialised upon declaration.
4558         * check-init.c (check_final_reassigned): Give error only if a blank
4559         final is not definitely unassigned or if an initialised final is
4560         reassigned.
4561         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4562         assignment expressions. Remove case MODIFY_EXPR, label do_default.
4563         (check_init): Perform initialised-variable-removing-optimisation
4564         only on non-final local variables.
4565
4566 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4567
4568         * jcf-write.c (generate_bytecode_conditional): Handle binops
4569         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4570         and LTGT_EXPR.
4571         (generate_bytecode_insns): Likewise.
4572
4573 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4574
4575         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4576         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4577
4578 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4579
4580         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4581         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4582
4583 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4584
4585         * decl.c (struct binding_level): Add GTY marker. Compile
4586         binding_depth unconditionally.
4587         (current_binding_level, free_binding_level, global_binding_level):
4588         Likewise.
4589         (clear_binding_level): Unconditionally set binding_depth.
4590         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4591
4592 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4593
4594         * lex.c (java_new_lexer): Set 'encoding'.
4595         (java_read_char): Improve error message for unrecognized characters.
4596         * lex.h (struct java_lexer): New field 'encoding'.
4597
4598 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4599
4600         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4601
4602 2004-05-21  Mark Wielaard  <mark@klomp.org>
4603
4604         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4605         extern.
4606
4607 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
4608
4609         * typeck.c: Remove non-printable character 160.
4610
4611 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
4612
4613         * check-init.c: Correct minor typos.
4614
4615 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4616
4617         * Make-lang.in, expr.c, java-gimplify.c: Rename
4618         tree-simple.[ch] to tree-gimple.[ch].
4619
4620 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
4621
4622         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4623
4624 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4625
4626         Merge from tree-ssa-20020619-branch.  See
4627         ChangeLog.tree-ssa for details.
4628
4629         * Make-lang.in, builtins.c, check-init.c, class.c,
4630         constants.c, decl.c, except.c, expr.c, java-except.h,
4631         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4632         lang.c, lang.opt, parse.y, resource.c: Merged.
4633         * java-gimplify.c: New file.
4634
4635 2004-05-10  Andrew Haley  <aph@redhat.com>
4636
4637         * parse.y (create_class): Set TYPE_VFIELD.
4638         * decl.c (java_init_decl_processing): Likewise.
4639
4640         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4641         * class.c (make_method_value): Replace DECL_VINDEX with call to
4642         get_method_index().
4643         (get_dispatch_vector): Likewise.
4644         (layout_class_method): Likewise.
4645         Replace set of DECL_VINDEX with call to set_method_index().
4646         (set_method_index): New function.
4647         (get_method_index): New function.
4648         * java-tree.h (set_method_index): New function decl.
4649         (get_method_index): New function decl.
4650
4651 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
4652
4653         * parse.y (check_pkg_class_access): Add new argument
4654         and use it when cl is NULL to call lookup_cl on it.
4655         (parser_check_super_interface): Do not call lookup_cl.
4656         Pass this_decl to check_pkg_class_access and NULL
4657         instead of lookup_cl.
4658         (parser_check_super): Update for change in
4659         check_pkg_class_access.
4660         (do_resolve_class): Likewise.
4661         (process_imports): Likewise.
4662         (find_in_imports_on_demand): Likewise.
4663         (resolve_qualified_expression_name): Likewise.
4664
4665 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
4666
4667         Fixes PR java/9685, PR java/15073
4668         * parse.y (accessibility_string): New method.
4669         (not_accessible_field_error): Use accessibility_string()
4670         instead of java_accstring_lookup().
4671         (resolve_qualified_expression_name): Check with
4672         check_pkg_class_access() before allowing access using
4673         qualified names.
4674         Fix comment typo.
4675         Use check_pkg_class_access() instead of not_accessible_p()
4676         for unqualified types.
4677         (not_accessible_p): Use DECL_CONTEXT (member) instead of
4678         REFERENCE for package-private access checking.
4679         (patch_method_invocation): Use accessibility_string() instead
4680         of java_accstring_lookup().
4681
4682 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
4683
4684         Fixes PR java/15133
4685         * gjavah.c (struct method_name): Add member is_native.
4686         (overloaded_jni_method_exists_p): Match candidate method only if
4687         it is native.
4688         (print_method_info): Initialise is_native flag from the method's
4689         access flags.
4690
4691 2004-04-30  Roger Sayle  <roger@eyesopen.com>
4692
4693         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4694         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4695
4696 2004-04-22  Roger Sayle  <roger@eyesopen.com>
4697
4698         * resource.c (write_resource_constructor): Guard call to possibly
4699         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4700
4701 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
4702
4703         * class.c (make_class_data): Add new field aux_info.
4704         * decl.c (java_init_decl_processing): Push type and decl for
4705         `aux_info'.
4706
4707 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
4708
4709         * expr.c (expand_java_NEW): Don't use size argument for
4710         _Jv_AllocObject calls.
4711         * parse.y (patch_invoke): Likewise.
4712
4713 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4714
4715         * expr.c (build_invokeinterface): Remove unused variables to
4716         fix warnings.
4717
4718 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4719
4720         * class.c (get_interface_method_index): New function. Return dispatch
4721         index for interface method.
4722         (make_method_value): For interface methods, set index field to
4723         iface dispatch index, not DECL_VINDEX.
4724         * expr.c (build_invokeinterface): Use get_interface_method_index.
4725
4726 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4727
4728         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4729
4730 2004-03-31  Andrew Haley  <aph@redhat.com>
4731
4732         PR java/14104
4733         * jcf-io.c (opendir_in_zip): Tidy up error handling.
4734
4735 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
4736
4737         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4738         form of GTY markers.
4739
4740 2004-03-25  Marcus Meissner  <meissner@suse.de>
4741
4742         PR java/14689:
4743         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4744
4745 2004-03-23  Tom Tromey  <tromey@redhat.com>
4746
4747         PR java/14315:
4748         * jcf-write.c (make_class_file_name): Don't report if mkdir
4749         failed with EEXIST.
4750
4751 2004-03-23  Tom Tromey  <tromey@redhat.com>
4752
4753         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4754
4755 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
4756
4757         * class.c, gjavah.c, lang.c: Fix comment typos.
4758         * gcj.texi: Fix typos.
4759
4760 2004-03-19  Per Bothner  <per@bothner.com>
4761
4762         * gcj.texi (Code Generation):  Document new flags and assert defaults.
4763
4764         * class.c (assume_compiled_node_struct):  Rename type to
4765         class_flag_node_struct, as it is now also used for enable_assertions.
4766         Rename assume_compiled_node typedef.  Rename excludep field to value.
4767         (find_assume_compiled_node):  Rename function to find_class_flag_node.
4768         Minor optimization - avoid needless strlen.
4769         (add_assume_compiled):  Some tweaking and optimization.
4770         Rename and generalize to add_class_flag takem an extra parameter.
4771         (add_assume_compled):  New just calls add_class_flag.
4772         (add_enable_assert, enable_assertions):  New functions.
4773         (enable_assert_tree):  New static.
4774         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
4775         * lang.opt (fenable-assertions, fenable-assertions=,
4776         fdisable-assertions, fdisable-assertions=):  New options.
4777         * lang.c (java_handle_option):  Handle new options.
4778         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
4779         class in an interface - create helper class nested in outer interface.
4780         (build_assertion):  Short-circuit if enable_assertions is false.
4781
4782 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4783
4784         * java-tree.h: Changes throughout to add checking to macros
4785         and numerous whitespace changes.
4786         (VAR_OR_FIELD_CHECK): New macro.
4787         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
4788         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
4789
4790 2004-03-16  Per Bothner  <per@bothner.com>
4791
4792         * jcf-jump.c (options):  New --print-constants option.
4793         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
4794
4795         * jcf-dump.c (flag_print_constant_pool):  Default to off.
4796         (print_constant_terse_with_index):  New helper function.
4797         (various places):  Check flag_print_constant_pool where missing.
4798         (main):  If verbose set flag_print_constant_pool.
4799         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
4800
4801 2004-03-15  Andrew Haley  <aph@redhat.com>
4802
4803         PR java/14581
4804         * parse.y (java_complete_lhs): Check that final variable has an
4805         initializer.
4806
4807 2004-03-12  Andrew Haley  <aph@redhat.com>
4808
4809         PR java/14551
4810         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
4811         conversion.
4812
4813 2004-02-29  Roger Sayle  <roger@eyesopen.com>
4814
4815         * jcf-parse.c (java_parse_file): Handle the case that input_filename
4816         is NULL.
4817
4818 2004-02-27  Per Bothner  <per@bothner.com>
4819
4820         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
4821         suggestion:  Use build_incomplete_class_ref.
4822         This fixes PR java/13508, java/11714.
4823
4824 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
4825
4826         * java/parse.h: Update copyright.
4827
4828 2004-02-26  Andrew Haley  <aph@redhat.com>
4829
4830         PR java/14231:
4831         * parse.y (check_interface_throws_clauses): Check for
4832         !METHOD_INVISIBLE (iface_method).
4833         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
4834         well as CLASS_ABSTRACT.
4835
4836 2004-02-25  Per Bothner  <per@bothner.com>
4837
4838         * parse.y (build_assertion):  If we're in an inner class, create the
4839         class$ helper routine in the outer class.
4840
4841 2004-02-19  Richard Henderson  <rth@redhat.com>
4842
4843         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
4844
4845 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
4846
4847         * Make-lang.in (java.install-man): Add extra dependencies.
4848
4849 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
4850
4851         * Make-lang.in: Install man pages under the same names
4852         (possibly transformed) as the program they document.
4853
4854 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
4855
4856         * gjavah.c: Include "intl.h".
4857         (error): New function.
4858         (main): Call gcc_init_libintl.
4859         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
4860         print_stub_or_jni, process_file, main): Use error rather than
4861         fprintf.
4862         (print_method_info, usage, help, version, main): Mark strings for
4863         translation with _.  Avoid splitting up sentences.  Send
4864         information messages to stdout.
4865         * jcf-dump.c: Include "intl.h".
4866         (main): Call gcc_init_libintl.
4867         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
4868         Mark error, usage and version messages for translation with _.
4869         Avoid splitting up sentences.
4870         * jv-scan.c: Include "intl.h".
4871         (fatal_error, warning): Change parameter s to msgid.  Translate
4872         messages.
4873         (main): Call gcc_init_libintl.
4874         (usage, help, version): Mark error, usage and version messages for
4875         translation with _.  Avoid splitting up sentences.
4876         * jvgenmain.c: Include "intl.h".
4877         (main): Call gcc_init_libintl.
4878         (usage, main): Mark error messages for translation with _.
4879         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
4880         JVGENMAIN_OBJS): Add intl.o.
4881         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
4882         java/jvgenmain.o): Update dependencies.
4883
4884 2004-02-08  Per Bothner  <per@bothner.com>
4885
4886         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
4887         class don't use not_accessible_field_error, which can get confused.
4888
4889 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
4890
4891         Make-lang.in (po-generated):  Delete.
4892
4893 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
4894
4895         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
4896         Depend on target.h.
4897         * decl.c: Include target.h.
4898         (start_java_method): Replace PROMOTE_PROTOTYPES with
4899         targetm.calls.promote_prototypes.
4900         * expr.c: Include target.h.
4901         (pop_arguments): Replace PROMOTE_PROTOTYPES with
4902         targetm.calls.promote_prototypes.
4903         * parse.y: Include target.h.
4904         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
4905         with targetm.calls.promote_prototypes.
4906
4907 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
4908
4909         * typeck.c: Update copyright.
4910
4911 2004-02-02  Tom Tromey  <tromey@redhat.com>
4912
4913         * decl.c (java_init_decl_processing): Remove duplicate
4914         gnu/gcj/RawData.
4915
4916 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
4917
4918         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
4919
4920 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
4921
4922         * expr.c (build_field_ref): Move variable
4923         definition up.
4924
4925 2004-01-28  Andrew Haley  <aph@redhat.com>
4926
4927         * expr.c (build_field_ref): Widen field offset.
4928
4929 2004-01-27  Andrew Haley  <aph@redhat.com>
4930
4931         java/13273
4932         * parse.y (check_interface_throws_clauses): Make sure class_decl
4933         has been loaded.
4934
4935 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
4936
4937         PR java/13733
4938         * parse.y (patch_assignment): Don't modify lhs_type for
4939         reference assignments.
4940
4941 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4942
4943         * Make-lang.in: Replace $(docdir) with doc.
4944         (java.info, java.srcinfo, java.man, java.srcman): New rules.
4945         (java.install-man): Revamp rule.
4946
4947 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
4948
4949         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
4950         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
4951         instead of deferred backquote.
4952
4953 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
4954
4955         * typeck.c (find_method_in_interfaces): Move variable
4956         definition up.
4957
4958 2004-01-16  Andrew Haley  <aph@redhat.com>
4959
4960         PR java/13273:
4961         * typeck.c (shallow_find_method): New.
4962         (find_method_in_superclasses): New.
4963         (find_method_in_interfaces): New.
4964         (lookup_do): Rewrite.
4965         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
4966
4967         * jcf-parse.c (read_class): Save and restore output_class.
4968         * decl.c (java_expand_body): Set output_class from fndecl.
4969
4970 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
4971
4972         * class.c (gen_indirect_dispatch_tables): Fix string length
4973         calculations.
4974
4975 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
4976
4977         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
4978         (java.srcextra): Copy above back to source directory if requested.
4979         (po-generated): Delete reference to $(parsedir).
4980         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
4981         Use implicit rule.
4982
4983 2004-01-14  Jan Hubicka  <jh@suse.cz>
4984
4985         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
4986         estimation.
4987
4988 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
4989
4990         * java-tree.h (java_expand_expr): Change prototype.
4991         * expr.c (java_expand_expr): Add alt_rtl parameter.
4992
4993 2004-01-09  Andrew Haley  <aph@redhat.com>
4994
4995         PR java/12755:
4996         * parse.y (java_fix_constructors):  Set output_class.
4997         (java_reorder_fields): Likewise.
4998         (java_layout_classes): Likewise.
4999         (java_expand_classes): Generate indirect dispatch tables.
5000         (java_expand_classes): Set output_class.
5001         (java_finish_classes): Likewise.
5002         * lang.c (java_init): Turn on always_initialize_class_p if we're
5003         using indirect dis[atch.
5004         (java_decl_ok_for_sibcall): Use output_class, not current_class.
5005         (java_get_callee_fndecl): Use class local atable.
5006         * jcf-parse.c
5007         (always_initialize_class_p): Decl moved to java-tree.h.
5008         (HANDLE_CLASS_INFO): Set output_class.
5009         (read_class): Likewise.
5010         (parse_class_file): Call gen_indirect_dispatch_tables.
5011         (parse_zip_file_entries): Set output_class.
5012         (java_parse_file): Set output_class.  Don't emit symbol tables.
5013         * java-tree.h (output_class): New.
5014         Remove global declarations for otable, atable, and ctable.
5015         (always_initialize_class_p): moved here from decl.c.
5016         (DECL_OWNER): New.
5017         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5018         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5019         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5020         (struct lang_type): Add otable_methods, otable_decl,
5021         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5022         ctable_decl, catch_classes, type_to_runtime_map.
5023         * expr.c (build_field_ref): Make otable, atable, and ctable class
5024         local rather than global.
5025         (build_known_method_ref): Likewise.
5026         (build_invokeinterface): Likewise.
5027         (java_expand_expr): Pass runtime type (rather than actual type) to
5028         expand_start_catch.
5029         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5030         this class.  Look up each class in that map to delete duplicates.
5031         (expand_end_java_handler): Pass runtime type (rather than actual
5032         type) to expand_start_catch.
5033         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5034         (do_nothing): New.
5035         (java_init_decl_processing): Rearrange things.  Remove global
5036         declarations of otable, atable, and ctable.
5037         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5038         (java_expand_body): Set output_class.
5039         * constants.c (build_constant_data_ref): Use output_class, not
5040         current_class.
5041         (alloc_name_constant): Likewise.
5042         * class.c (gen_indirect_dispatch_tables): New.
5043         (build_class_ref): Generate hard reference to superclass, even if
5044         using indirect dispatch.
5045         (build_static_field_ref): Use class local atable.
5046         (make_class_data): Generate hard reference to superclass, even if
5047         using indirect dispatch.
5048         Generate symbolic references to interfaces when using indirect
5049         dispatch.
5050         (make_class_data): Emit otable, atable, and ctable.
5051         Make otable, atable, and ctable class local rather than global.
5052         (emit_catch_table): Make otable, atable, and ctable class local
5053         rather than global.
5054
5055 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
5056
5057         * parse.y (catch_clause_parameter): Fix typo.
5058
5059         PR java/13404
5060         * parse.y: (catch_clause_parameter): Return early if $3, aka
5061         formal_parameter, is null.
5062
5063 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5064
5065         * class.c: Remove uses of "register" specifier in
5066         declarations of arguments and local variables.
5067         * decl.c: Likewise.
5068         * expr.c: Likewise.
5069         * gjavah.c: Likewise.
5070         * jcf-dump.c: Likewise.
5071         * jcf-io.c: Likewise.
5072         * jcf-parse.c: Likewise.
5073         * jcf-write.c: Likewise.
5074         * keyword.h: Likewise.
5075         * parse.y: Likewise.
5076         * typeck.c: Likewise.
5077         * verify.c: Likewise.
5078
5079 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
5080
5081         * Make-lang.in (GCJ_CROSS_NAME): Delete.
5082         (java.install_common, java.install-man): Adjust for above.
5083         (java.uninstall): Likewise.
5084
5085 2003-12-03  Michael Koch  <konqueror@gmx.de>
5086
5087         * class.c (make_class_data):
5088         Push field value to 'hack_signers' instead of 'signers'.
5089         * decl.c (java_init_decl_processing):
5090         Push field 'hack_signers' instead of 'signers'.
5091
5092 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
5093
5094         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5095         including iconv.h.
5096
5097 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
5098
5099         PR java/12374:
5100         * parse.y (qualify_ambiguous_name): Remove lots of broken
5101         field access processing - there's no need to do that here,
5102         because we have resolve_field_access.  Remove
5103         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5104         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5105         used.
5106
5107 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
5108
5109         Fix PR java/13237
5110         * parse.y (java_complete_lhs): Save location prior to patching
5111         CALL_EXPR.
5112
5113 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
5114
5115         PR java/12548
5116         * resource.c (write_resource_constructor): Append
5117         "_resource" to constructor identifier name.
5118
5119 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
5120
5121         Fix PR java/13183.
5122         * constants.c (cpool_for_class): New function.
5123         (outgoing_cpool): Remove global variable.
5124         (alloc_name_constant): Use cpool_for_class.
5125         (build_constants_constructor): Likewise.
5126         * decl.c (java_expand_body): Set current_class.
5127         * java-tree.h (outgoing_cpool) Remove declaration.
5128         (init_outgoing_cpool): Likewise.
5129         * jcf-parse.c (init_outgoing_cpool): Remove function.
5130         (parse_class_file): Don't call init_outgoing_cpool.
5131         * parse.y (java_complete_expand_methods): Don't call
5132         init_outgoing_cpool.  Don't save outgoing_cpool.
5133         (java_expand_classes): Don't restore outgoing_cpool.
5134         (java_finish_classes): Likewise.
5135
5136 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
5137
5138         * Make-lang.in: (java.install-common) Add
5139         symlink for $(target_noncanonical)-gcjh for
5140         native builds.
5141
5142 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5143
5144         * Make-lang.in (java.extraclean): Delete.
5145
5146 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5147
5148         * Make-lang.in (check-java): Add.
5149
5150 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
5151
5152         Fix PR java/13024.
5153         * except.c (prepare_eh_table_type): Allocate variable-sized
5154         buffer `buf' with alloca.
5155
5156 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5157
5158         Fix PR java/12857.
5159
5160         decl.c (java_init_decl_processing): Don't initialize
5161         class_not_found_type_node, no_class_def_found_type_node.
5162
5163         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5164         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5165         (class_not_found_type_node, no_class_def_found_type_node):
5166         Don't define.
5167
5168         parse.y (build_dot_class_method_invocation): Add this_class
5169         argument.  Qualify method invocations to a different class.
5170         (create_new_parser_context): Initialize saved_data_ctx to 0.
5171         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5172         (build_dot_class_method): Don't load classes.  Register
5173         incomplete types.
5174         (build_incomplete_class_ref): Special cases for interfaces
5175         and inner classes.  Move build_dot_class_method call to here...
5176         (patch_incomplete_class_ref): ...from here.  Pass current_class
5177         to build_dot_class_method_invocation.
5178         (build_assertion): Pass class_type to
5179         build_dot_class_method_invocation.
5180         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5181
5182 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5183
5184         Fix PR java/12739.
5185         * java-tree.h (BLOCK_EMPTY_P): Define.
5186         * parse.y (java_complete_lhs): Check for empty blocks
5187         in TRY_FINALLY_EXPR case.
5188
5189 2003-11-17  Andrew Haley  <aph@redhat.com>
5190
5191         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5192         (struct lang_decl_var:freed): New variable.
5193         * decl.c (poplevel): Mark local vars that have gone out of scope.
5194         (push_jvm_slot): Don't use the RTL of a var that has gone out of
5195         scope.
5196
5197 2003-11-16  Jason Merrill  <jason@redhat.com>
5198
5199         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5200         and TAGS files that include them for each front end.
5201
5202 2003-11-15  Tom Tromey  <tromey@redhat.com>
5203
5204         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5205
5206 2003-11-12  Jason Merrill  <jason@redhat.com>
5207
5208         PR optimization/12547
5209         * lang.c (java_tree_inlining_walk_subtrees): Just walk
5210         BLOCK_EXPR_BODY directly.
5211
5212 2003-11-12  Andrew Haley  <aph@redhat.com>
5213
5214         PR java/11045
5215         * parse.y (fold_constant_for_init): Check that we really do have a
5216         constant.
5217
5218         PR java/11533
5219         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5220         init_test_decls being inlined.
5221
5222         PR java/12890:
5223         * parse.y (do_resolve_class): Check return value from
5224         breakdown_qualified().
5225
5226 2003-11-11  Tom Tromey  <tromey@redhat.com>
5227
5228         PR java/12915:
5229         * parse.y (merge_string_cste): Handle case where we have a
5230         pointer that happens to be zero, not null_pointer_node.
5231
5232 2003-11-10  Tom Tromey  <tromey@redhat.com>
5233
5234         * jcf-parse.c (classify_zip_file): Correctly compare
5235         filename_length against length of manifest file's name.
5236
5237 2003-11-08  Tom Tromey  <tromey@redhat.com>
5238
5239         PR java/12894:
5240         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5241
5242 2003-11-06  Andrew Haley  <aph@redhat.com>
5243
5244         * expr.c (java_stack_swap): Make sure destination stack slots are
5245         of the correct type.
5246
5247 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
5248
5249         * Make-lang.in (dvi): Move targets to $(docobjdir).
5250         (gcj.dvi): Simplify rule and adjust target.
5251         (gcj.info): Simplify rule.
5252         (gcj.pod): New intermediate rule.
5253         (gcjh.pod): Likewise.
5254         (jv-scan.pod): Likewise.
5255         (jcf-dump.pod): Likewise.
5256         (gij.pod): Likewise.
5257         (jv-convert.pod): Likewise.
5258         (rmic.pod): Likewise.
5259         (rmiregistry.pod): Likewise.
5260         (gcj.1): Delete.
5261         (gcjh.1): Delete.
5262         (jv-scan.1): Delete.
5263         (jcf-dump.1): Delete.
5264         (gij.1): Delete.
5265         (jv-convert.1): Delete.
5266         (rmic.1): Delete.
5267         (rmiregistry.1): Delete.
5268
5269 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
5270
5271         Fixes PR java/12866.
5272         * parse.y (resolve_qualified_expression_name): Move test
5273         for outer field access methods from here...
5274         (check_thrown_exceptions) ...to here.
5275
5276 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
5277
5278         * .cvsignore: Delete.
5279
5280 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
5281
5282         * verify.c (verify_jvm_instructions): Don't warn about legal
5283         eh binding regions generated for example by jdk 1.4.1.
5284
5285 2003-10-24  David S. Miller  <davem@redhat.com>
5286
5287         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5288
5289 2003-10-22  Andrew Haley  <aph@redhat.com>
5290
5291         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5292         (java_get_callee_fndecl): New.
5293
5294         * jcf-parse.c (java_parse_file): Call emit_catch_table().
5295
5296         * java-tree.h (ctable_decl): New.
5297         (catch_classes):  New.
5298         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5299
5300         * decl.c (java_init_decl_processing): Add catch_class_type.
5301         Add ctable_decl.
5302         Add catch_classes field.
5303
5304         * class.c (build_indirect_class_ref): Break out from
5305         build_class_ref.
5306         (make_field_value): Check flag_indirect_dispatch.
5307         (make_class_data): Ditto.
5308         Tidy uses of PUSH_FIELD_VALUE.
5309         Add field catch_classes.
5310         (make_catch_class_record): New.
5311
5312         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5313
5314 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5315
5316         * jcf-write.c: Follow spelling conventions.
5317         * parse.y: Likewise.
5318
5319 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5320
5321         * ChangeLog: Fix typos.
5322         * expr.c: Fix comment typos.
5323         * jcf-write.c: Likewise.
5324         * lang.c: Likewise.
5325         * lex.c: Likewise.
5326         * mangle.c: Likewise.
5327         * parse-scan.y: Likewise.
5328         * parse.y: Likewise.
5329
5330 2003-10-22  Tom Tromey  <tromey@redhat.com>
5331
5332         * expr.c (expand_byte_code): Only warn about dead bytecode when
5333         extra_warnings is set.
5334
5335 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5336
5337         Fix for PR java/12586.
5338         * mangle.c (find_compression_record_match): Don't iterate through
5339         package namespace elements unless they all match compression_table
5340         entries.
5341
5342 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5343
5344         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5345         (generate-manpages): Likewise.
5346         (java.maintainer-clean): Likewise.
5347         (gcj.info): Likewise.
5348         (gcj.1): Likewise.
5349         (gcjh.1): Likewise.
5350         (jv-scan.1): Likewise.
5351         (jcf-dump.1): Likewise.
5352         (gij.1): Likewise.
5353         (jv-convert.1): Likewise.
5354         (rmic.1): Likewise.
5355         (rmiregistry.1): Likewise.
5356         (java.install-man): Likewise.
5357         (parse-scan.o): Move and define complete compile line.
5358         (parse.o): Likewise.
5359         (jcf-tree-inline.o): Move.
5360
5361 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5362
5363         * Make-lang.in (info): Update dependencies.
5364         (java.install-info): Remove.
5365         ($(srcdir)/java/gcj.info): Replace with ...
5366         ($(docobjdir)/gcj.info): ... this.
5367
5368 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5369
5370         * Make-lang.in: Replace uses of $(target_alias) with
5371         $(target_noncanonical).
5372
5373 2003-10-09  Tom Tromey  <tromey@redhat.com>
5374
5375         * decl.c (java_init_decl_processing): Declare signers field.
5376         * class.c (make_class_data): Set signers field.
5377
5378 2003-10-09  Jason Merrill  <jason@redhat.com>
5379
5380         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5381         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5382         POINTER_TYPE.
5383
5384 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5385
5386         * Make-lang.in (java.info): Replace with ...
5387         (info): ... this.
5388         (java.dvi): Replace with ...
5389         (dvi): ... this.
5390         (java.generated-manpages): Replace with ...
5391
5392 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5393
5394         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5395
5396 2003-10-01  Andrew Haley  <aph@redhat.com>
5397
5398         * jcf-parse.c (java_parse_file): Write otable and atable.
5399         * java-tree.h (atable_methods): New.
5400         (atable_decl): New.
5401         (atable_syms_decl): New.
5402         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5403         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5404         (symbol_*type): Rename method_symbol* to symbol*type.
5405         (emit_offset_symbol_table): Delete.
5406         (emit_symbol_table): New.
5407         (get_symbol_table_index): New.
5408         (atable_type): New.
5409         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5410         (build_known_method_ref): Likewise.
5411         (get_symbol_table_index): Rename from get_offset_table_index.
5412         Parameterize to allow re-use by differing types of symbol table.
5413         (build_invokevirtual): Pass table to get_offset_table_index.
5414         * decl.c (java_init_decl_processing): Push types and decls for
5415         atable and atable_syyms.
5416         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5417         (make_class_data): Add new fields atable and atable_syms.
5418         (emit_symbol_table): Rename from emit_offset_symbol_table.
5419         Parameterize to allow re-use by different types of symbol table.
5420         (build_symbol_entry): Renamed from build_method_symbols_entry.
5421
5422 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5423
5424         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5425         semantics for SAVE_EXPR, by caching the result in a temporary.
5426
5427 2003-09-28  Richard Henderson  <rth@redhat.com>
5428
5429         * check-init.c (check_init): Save and restore input_location
5430         instead of file and line separately.
5431         * decl.c (java_expand_body): Likewise.
5432         * jcf-write.c (generate_bytecode_insns): Likewise.
5433         * parse.y (safe_layout_class): Likewise.
5434         * jcf-parse.c (read_class, parse_class_file): Likewise.
5435         (java_parse_file): Use %H for warning locator.
5436
5437 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5438
5439         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5440         with void-type branches instead of using a COMPOUND_EXPR.
5441
5442 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5443
5444         * decl.c (java_optimize_inline, dump_function): Remove.
5445         * java-tree.h (java_optimize_inline): Remove declaration.
5446         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5447         * parse.y (source_end_java_method, java_expand_classes):
5448         Likewise.  Remove dead code.
5449
5450 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5451
5452         * lang.c (java_init_options): Set flag_evaluation_order.
5453         * expr.c (force_evaluation_order): Don't attempt to force
5454         evaluation order of binary operations using save_expr.
5455         * parse.y (java_complete_lhs): No longer need to call
5456         force_evaluation_order when constructing binary operators.
5457
5458 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5459             Bryce McKinlay  <bryce@mckinlay.net.nz>
5460
5461         PR java/1333:
5462         * parse.y (not_accessible_field_error): New function.
5463         (resolve_expression_name): Check field access permissions.
5464         (resolve_qualified_expression_name): Use
5465         not_accessible_field_error.
5466         (resolve_qualified_expression_name): Likewise.
5467
5468 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5469
5470         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5471
5472 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5473
5474         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5475         with equal operands without side-effects.
5476
5477 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5478
5479         * decl.c (java_init_decl_processing): Don't emit otable decls
5480         if flag_indirect_dispatch is not set.
5481
5482 2003-09-21  Richard Henderson  <rth@redhat.com>
5483
5484         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5485         resource.c: Revert.
5486
5487 2003-09-21  Richard Henderson  <rth@redhat.com>
5488
5489         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5490         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5491
5492 2003-09-20  Richard Henderson  <rth@redhat.com>
5493
5494         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5495
5496 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5497
5498         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5499         * check-init.c (check_init): Likewise.
5500
5501 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5502
5503         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5504
5505 2003-09-16  Andrew Haley  <aph@redhat.com>
5506
5507         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5508
5509 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
5510
5511         Fixes PR java/9577
5512         * mangle.c (find_compression_record_match): Skip
5513         over a "6JArray" (the array template mangled string)
5514         IDENTIFIER_NODE.
5515         (mangle_array_type): Correct minor typo.
5516         (atms): Move definition to the beginning.
5517
5518 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
5519
5520         * class.c (add_miranda_methods): Ensure super-interfaces are laid
5521         out. Fix for PR java/12254.
5522
5523 2003-09-11  Richard Henderson  <rth@redhat.com>
5524
5525         * parse.y (source_end_java_method): Update for new
5526         cgraph_finalize_function argument.
5527
5528 2003-09-09  Richard Henderson  <rth@redhat.com>
5529
5530         * parse.y (source_end_java_method): Update call to
5531         cgraph_finalize_function.
5532
5533 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
5534
5535         * decl.c (java_expand_body): New function.
5536         * expr.c (build_class_init): Set DECL_IGNORED_P.
5537         * java-tree.h (start_complete_expand_method,
5538         java_expand_body): Declare.
5539         * jcf-parse.c (cgraph.h): Include.
5540         (java_parse_file): Handle flag_unit_at_a_time.
5541         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5542         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5543         (java_estimate_num_insns): Use walk_tree_without_duplicates.
5544         (java_start_inlining): New function.
5545         * parse.h (java_finish_classes): Declare.
5546         * parse.y: Include cgraph.h.
5547         (block): Don't special-case empty block production.
5548         (craft_constructor): Set DECL_INLINE.
5549         (source_end_java_method): Handle flag_unit_at_a_time.
5550         Replace inline code with call to java_expand_body.
5551         (start_complete_expand_method): Remove static modifier.
5552         (java_expand_method_bodies): Patch function tree for
5553         class initialization and/or synchronization as needed.
5554         Don't begin RTL expansion yet.
5555         (java_expand_classes): Check flag_unit_at_a_time before
5556         calling finish_class.
5557         (java_finish_classes): New function.
5558         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5559         (patch_assignment): Set DECL_CONTEXT on temporary variable.
5560         (emit_test_initialization): Set DECL_IGNORED_P.
5561
5562 2003-09-03  Roger Sayle  <roger@eyesopen.com>
5563
5564         * builtins.c (enum builtin_type): Delete unused enumeration.
5565         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5566
5567 2003-08-28  Tom Tromey  <tromey@redhat.com>
5568
5569         * gcj.texi (Extensions): Document gcjlib URLs.
5570
5571 2003-08-20  Tom Tromey  <tromey@redhat.com>
5572
5573         * gcj.texi (Extensions): Added xref.
5574         (libgcj Runtime Properties): Document
5575         gnu.gcj.runtime.VMClassLoader.library_control.
5576
5577 2003-08-20  Andrew Haley  <aph@redhat.com>
5578
5579         * except.c (prepare_eh_table_type): Use new encoding for exception
5580         handlers when using -fno-assume-compiled.
5581
5582 2003-08-13  Tom Tromey  <tromey@redhat.com>
5583
5584         * gcj.texi (Invoking gij): Document -X and -?.
5585
5586 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
5587
5588         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5589         GCJH_OBJS, JCFDUMP_OBJS
5590         * win32-host.c: Removed the unnecessary and broken dependency
5591         on jcf.h
5592
5593 2003-08-11  Tom Tromey  <tromey@redhat.com>
5594
5595         * parse.y (java_check_regular_methods): Typo fixes.  Call
5596         check_interface_throws_clauses.  Use
5597         check_concrete_throws_clauses.
5598         (check_interface_throws_clauses): New function.
5599         (check_concrete_throws_clauses): New function.
5600         (hack_is_accessible_p): New function.
5601         (find_most_specific_methods_list): Added FIXME.
5602         * typeck.c (lookup_do): Use `flags' argument to decide what to
5603         do.  Reimplemented.
5604         (lookup_argument_method_generic): New function.
5605         (lookup_argument_method2): Removed.
5606         * jcf.h (ACC_INVISIBLE): New define.
5607         * jcf-write.c (generate_classfile): Skip invisible methods.
5608         * class.c (add_miranda_methods): New function.
5609         (layout_class_methods): Use it.
5610         (get_access_flags_from_decl): Use ACC_INVISIBLE.
5611         * java-tree.h (METHOD_INVISIBLE): New define.
5612         (lang_decl_func) [invisible]: New field.
5613         (lookup_argument_method_generic): Declare.
5614         (SEARCH_INTERFACE): New define.
5615         (SEARCH_SUPER): Likewise.
5616         (SEARCH_ONLY_INTERFACE): Likewise.
5617         (SEARCH_VISIBLE): Likewise.
5618         (lookup_argument_method2): Removed declaration.
5619
5620 2003-08-05  Tom Tromey  <tromey@redhat.com>
5621
5622         Fix for PR java/11600:
5623         * parse.y (java_complete_lhs): See whether we're calling a method
5624         on an array.
5625         (check_thrown_exceptions): Added `is_array_call' argument;
5626         fixed `clone' checking; updated all callers.
5627
5628 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
5629
5630         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5631
5632 2003-08-03  Tom Tromey  <tromey@redhat.com>
5633
5634         * java-tree.h (METHOD_TRANSIENT): Removed.
5635         * decl.c (pushdecl): Removed some dead code.
5636         * class.c (get_access_flags_from_decl): Can't have transient
5637         method.
5638         (add_method_1): Can't have a transient method.
5639
5640 2003-07-28  Andreas Jaeger  <aj@suse.de>
5641
5642         * jvspec.c: Convert to ISO C90 prototypes.
5643
5644 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5645
5646         * decl.c (force_poplevels): Fix warning call.
5647
5648 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5649
5650         * expr.c (expand_java_field_op): Don't use xxx_with_decl
5651         (expand_java_field_op): Likewise.
5652         * class.c (layout_class_method): Likewise
5653         (emit_register_classes): Likewise.
5654         * decl.c (pushdecl): Likewise.
5655         (poplevel): Likewise.
5656         (force_poplevels): Likewise.
5657         (give_name_to_locals): Likewise.
5658         * check-init.c (check_for_initialization): Likewise.
5659
5660 2003-07-24  Jason Merrill  <jason@redhat.com>
5661
5662         * java-tree.h: Move boolean_type_node et al to the back end.
5663
5664 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5665
5666         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5667         casts.
5668
5669 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
5670
5671         * lang.opt: Don't show -MD_ and -MDD_.
5672
5673 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
5674
5675         * lang-options.h: Remove.
5676         * lang.opt: Add help text.
5677
5678 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
5679
5680         * expr.c: Remove the last argument to expand_assignment().
5681
5682 2003-07-09  Jan Hubicka  <jh@suse.cz>
5683
5684         * java-tree.h (DECL_NUM_STMTS): Rename to...
5685         (DECL_ESTIMATED_INSNS): ... this.
5686         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
5687         New static functions.
5688         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
5689         * parser.y (add_stmt_to_compound): Do not account statements.
5690
5691 2003-07-08  Mark Wielaard  <mark@klomp.org>
5692
5693         * gcj.texi: CNI now expands to Compiled Native Interface.
5694
5695 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5696
5697         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5698
5699 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5700
5701         * expr.c (expand_byte_code): Adjist emit_line_note call.
5702
5703 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
5704
5705         * lang.c (java_handle_option): Don't handle filenames.
5706
5707 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
5708
5709         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5710         DIR_SEPARATOR.
5711         Use FILENAME_CMP.
5712         * jcf-write.c: Don't default-define DIR_SEPARATOR.
5713         * jcf.h: Delete COMPARE_FILENAMES definition.
5714
5715 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
5716
5717         * lang.c (java_init_options): Update prototype.
5718
5719 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
5720
5721         * decl.c (poplevel): Adjust define_label call.
5722
5723 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
5724
5725         * gjavah.c (flag_jni): Make non-static.
5726         * parse-scan.y (ctxp): Make non-static.
5727
5728         * class.c (build_method_symbols_entry)
5729         * expr.c (get_offset_table_index)
5730         * jcf-parse.c (jcf_parse):
5731         Mark the definition static, matching the forward declaration.
5732
5733 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
5734
5735         * lang.c (java_handle_option): Don't check for missing arguments.
5736
5737 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
5738
5739         * class.c (push_class): Use a location_t to save place.
5740         (emit_register_classes): Set input_location. Adjust
5741         expand_function_end call.
5742         * resource.c (write_resource_constructor): Likewise.
5743         * decl.c (end_java_method): Adjust expand_function_end call.
5744         * parse.y (source_end_java_method): Likewise.
5745
5746 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
5747
5748         * lang.c (java_handle_option): Likewise.
5749
5750 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
5751
5752         * lang.c (java_handle_option): Special-casing of optional
5753         joined arguments no longer needed.
5754         * lang.opt: Update switches that take optional argument.
5755
5756 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5757
5758         * lang.opt: Declare Java.
5759         * lang.c (java_init_options): Update.
5760
5761 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5762
5763         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5764
5765 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5766
5767         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
5768         * lang.c (java_handle_option): -MD and -MMD have an underscore.
5769         * lang.opt: -MD and -MMD have an underscore.
5770
5771 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
5772
5773         * class.c (emit_register_classes): Adjust init_function_start
5774         call.
5775         * decl.c (complete_start_java_method): Likewise.
5776         * resource.c (write_resource_constructor): Likewise.
5777
5778 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5779
5780         * Make-lang.in: Update to use options.c and options.h.
5781         * lang.c: Include options.h not j-options.h.
5782         (java_handle_option): Abort on unrecognized option.
5783         (java_init_options): Request Java switches.
5784
5785 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
5786
5787         * Make-lang.in: Handle mostlyclean.
5788
5789 2003-06-11  Tom Tromey  <tromey@redhat.com>
5790
5791         * lang.c (java_handle_option): Update dependency_tracking for
5792         OPT_MF case.
5793
5794         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5795         empty argument.
5796
5797 2003-06-10  Andrew Haley  <aph@redhat.com>
5798
5799         * resource.c (write_resource_constructor): Use expand_expr to
5800         generate the address of the label attached to a resource.
5801         * Make-lang.in (java/resource.o): Add expr.h
5802
5803 2003-06-10  Andrew Haley  <aph@redhat.com>
5804
5805         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
5806         (java_decl_ok_for_sibcall): New.
5807
5808 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
5809
5810         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
5811         (java/j-options.c, java/j-options.h): New.
5812         * java-tree.h (resource_name, compile_resource_file,
5813         compile_resource_data): Constify.
5814         * jcf-write.c (jcf_write_base_directory): Similarly.
5815         * jcf.h (jcf_write_base_directory): Similarly.
5816         * lang.c: Include j-options.h.
5817         (cl_options_count, cl_options, string_option, java_decode_option,
5818         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
5819         process_option_with_no): Remove.
5820         (resource_name): Constify.
5821         (LANG_HOOKS_HANDLE_OPTION): Override.
5822         (java_handle_option): New.
5823         (java_init): Don't call jcf_path_init.
5824         (java_init_options): Call jcf_path_init.
5825         * lang.opt: New.
5826         * resource.c (compile_resource_data, compile_resource_file): Constify.
5827
5828 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
5829
5830         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
5831         (struct lang_decl_func): Add last_line field.
5832         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
5833         DECL_SOURCE_LINE_LAST): Remove.
5834         * parse.y (missing_return_error, finish_method_declaration,
5835         lookup_cl, start_artificial_method_body, source_end_java_method,
5836         start_complete_expand_method): Adjust.
5837
5838 2003-06-08  Tom Tromey  <tromey@redhat.com>
5839
5840         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
5841         fno-assume-compiled.
5842
5843 2003-06-08  Roger Sayle  <roger@eyesopen.com>
5844
5845         * builtins.c (define_builtin_type, builtin_types): Delete.
5846         (define_builtin): Rewritten to take just the built-in code,
5847         the function's name, type and fallback library function name.
5848         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
5849         (initialize_builtins): Overhaul to define the GCC builtins
5850         used by gcj manually, providing the Java run-time's
5851         implementations as the fallback library function.
5852
5853 2003-06-08  Anthony Green  <green@redhat.com>
5854
5855         * parse.y (patch_cast): Fix conversions from floating-point to
5856         integral types.
5857
5858 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
5859
5860         * Make-lang.in: Update.
5861         * lang.c: Include opts.h. Define cl_options_count and cl_options.
5862
5863 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
5864
5865         * lang.c (java_init_options): Update.
5866
5867 2003-06-05  Jan Hubicka  <jh@suse.cz>
5868
5869         * Make-lang.in:  Add support for stageprofile and stagefeedback
5870
5871 2003-05-31  Roger Sayle  <roger@eyesopen.com>
5872
5873         * lang.c (java_init_options): Prescribe wrap-around two's
5874         complement arithmetic overflow by setting flag_wrapv.
5875
5876 2003-05-29  Roger Sayle  <roger@eyesopen.com>
5877
5878         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
5879         (builtin_record): Add an additional builtin_code field to
5880         record which GCC built-in corresponds to the Java function.
5881         (java_builtins):  Add new entries for atan, atan2, exp, log,
5882         pow and tan.
5883         (max_builtin, min_builtin, abs_builtin): Perform constant
5884         folding on the resulting tree.
5885         (java_build_function_call_expr): Likewise, perform constant
5886         folding on the resulting tree.
5887         (initialize_builtins): The NULL creators are now allowed in
5888         the java_builtins table, which is now terminated by an entry
5889         with builtin_code == END_BUILTINS.
5890         (check_for_builtin): Likewise.  If the matching creator is
5891         NULL, construct the call using java_build_function_call_expr
5892         directly with the decl for the corresponding builtin_code.
5893
5894 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5895
5896         * win32-host.c: Normalize copyright boilerplate.
5897
5898 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5899
5900         * parse.y (print_int_node): Use string concatentation on
5901         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
5902         function calls into one.
5903
5904 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
5905
5906         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
5907         fatal_io_error with calls to fatal_error; add ": %m" to the end of
5908         all the affected error messages.
5909
5910 2003-05-13  Richard Henderson  <rth@redhat.com>
5911
5912         * class.c (layout_class_method): Set DECL_EXTERNAL.
5913         * decl.c (java_mark_decl_local, java_mark_class_local): New.
5914         * java-tree.h (java_mark_class_local): Declare.
5915         * jcf-parse.c (parse_class_file): Use it.
5916         * parse.y (java_expand_classes): Likewise.
5917
5918 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
5919
5920         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
5921         * lex.h: #include input.h.
5922         * jv-scan.c (input_filename): Remove.
5923
5924 2003-05-02  Tom Tromey  <tromey@redhat.com>
5925
5926         PR java/10491:
5927         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5928         (handle_inner_classes): New function.
5929
5930 2003-05-01  Tom Tromey  <tromey@redhat.com>
5931
5932         PR java/10459:
5933         * parse.y (finish_for_loop): Do nothing if update expression is a
5934         EXPR_WFL_NODE wrapping nothing.
5935         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
5936
5937 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
5938
5939         * lex.h (input_lineno): Remove declaration.
5940         * parse-scan.y: #include input.h.
5941         (input_filename): Remove declaration.
5942         (input_location): Add definition.
5943         (input_line): Remove definition.
5944
5945 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
5946
5947         * lex.h (lineno): Rename to ...
5948         (input_line): ... here
5949         * parse-scan.y (lineno): Rename to ...
5950         (input_line): ... here.
5951         (reset_report): Rename lineno to input_line.
5952         * check-init.c (check_init): Likewise.
5953         * class.c (push_class): Likewise.
5954         * decl.c (complete_start_java_method, end_java_method): Likewise.
5955         * expr.c (expand_byte_code): Likewise.
5956         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
5957         * jcf-write.c (generate_bytecode_insns): Likewise.
5958         * lex.c (java_init_lex, java_allocate_new_line,
5959         do_java_lex): Likewise.
5960         * parse.h (YYNOT_TWICE): Likewise.
5961         * parse.y (empty_statement, expression_statement,
5962         java_pop_parser_context, java_parser_context_save_global,
5963         yyerror, register_fields, method_header, safe_layout_class,
5964         find_in_imports_on_demand, create_artificial_method,
5965         source_end_java_method, start_complete_expand_method,
5966         build_thisn_assign, java_complete_lhs,
5967         maybe_absorb_scoping_block): Likewise.
5968
5969 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
5970
5971         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
5972         '/' when computing java source filename
5973
5974 2003-04-13  Tom Tromey  <tromey@redhat.com>
5975
5976         * gjavah.c (print_c_decl): Indentation fix.
5977
5978 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
5979
5980         * class.c (make_field_value, make_method_value, get_dispatch_table)
5981         (make_class_data, emit_offset_symbol_table)
5982         * constants.c (build_constants_constructor)
5983         * java-tree.h (START_RECORD_CONSTRUCTOR)
5984         * parse.y (maybe_build_array_element_wfl):
5985         Use build_constructor.
5986
5987 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
5988
5989         PR java/10253:
5990         * parse.y (string_convert_int_cst): Always use at least one digit
5991         in string conversion. Remove ASCII dependence.
5992         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
5993
5994 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
5995
5996         * Make-lang.in: added win32-host.c
5997         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
5998         resolves to open() on non-Win32 platforms and
5999         Win32-specific jcf_open_exact_case() on Win32
6000         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6001         when trying .java and .class files
6002         * win32-host.c: added to repository. Defines
6003         Win32-specific jcf_open_exact_case()
6004
6005 2003-04-10  Andrew Haley  <aph@redhat.com>
6006
6007         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6008         (maybe_free_localvar): Renamed from localvar_free.
6009         Add new arg, really.
6010         (generate_bytecode_insns): Set new variable, jsrs.
6011         Only free local vars if no jsr insns have been emittted.
6012         Call maybe_free_localvar, not localvar_free.
6013
6014 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
6015
6016         * gcj.texi: Remove @ at start of file.
6017
6018 2003-03-25  Tom Tromey  <tromey@redhat.com>
6019
6020         * parse.y (create_interface): Call CHECK_DEPRECATED.
6021
6022 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
6023
6024         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6025
6026 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
6027
6028         * javaop.h (jfloat, jdouble): Make them structures mirroring
6029         the bit fields of IEEE float and double respectively.
6030         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6031         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6032         (union Word, union DWord): Delete.
6033         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6034
6035         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6036         D_NAN_MASK): Delete.
6037         (jni_print_float, jni_print_double): New.  Generate
6038         hexadecimal floating constants.
6039         (print_field_info): Use jni_print_float/double.
6040
6041         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
6042         finite floating point numbers for output; special case
6043         non-finite floats.
6044
6045 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
6046
6047         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6048         Replace 0 and 1 with true and false in return statements.
6049
6050 2003-03-19  Tom Tromey  <tromey@redhat.com>
6051
6052         * lex.c (do_java_lex): Renamed from java_lex.
6053         (java_lex): New function.
6054         Include timevar.h.
6055
6056 2003-03-13  Tom Tromey  <tromey@redhat.com>
6057
6058         * parse.y (resolve_inner_class): Error if qualifier is a primitive
6059         type.
6060
6061 2003-03-04  Andrew Haley  <aph@redhat.com>
6062
6063         * gjavah.c (is_first_data_member): New global variable.
6064         (print_c_decl): If it's the first data member, align it as the
6065         superclass.
6066         (process_file): Set is_first_data_member.
6067
6068 2003-03-11  Tom Tromey  <tromey@redhat.com>
6069
6070         * parse.y (resolve_field_access): Initialize class if field is
6071         found in another static field.
6072         * expr.c (build_class_init): Don't optimize out initialization of
6073         implemented interface.
6074
6075 2003-03-11  Andrew Haley  <aph@redhat.com>
6076
6077         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6078         warning.
6079
6080 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
6081
6082         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6083         and DIR_SEPARATOR_2 for a target.
6084         Correct minor typos.
6085
6086         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6087         and DIR_SEPARATOR_2 for a target into account.
6088
6089 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
6090
6091         * lang.c (java_init): Update prototype, move code to java_post_options.
6092         (java_post_options): Similarly.
6093
6094 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
6095
6096         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6097         compare file name components depending on the case-sensitivity
6098         or otherwise of the host file system.
6099
6100         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6101         "strcmp" to compare file name components.
6102         Use IS_DIR_SEPARATOR instead of comparing directly against
6103         DIR_SEPARATOR.
6104         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6105         comparing directly against DIR_SEPARATOR.
6106
6107 2003-03-04  Tom Tromey  <tromey@redhat.com>
6108
6109         * Make-lang.in (java.tags): New target.
6110
6111 2003-03-01  Roger Sayle  <roger@eyesopen.com>
6112
6113         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6114         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6115
6116 2003-03-01  Tom Tromey  <tromey@redhat.com>
6117
6118         * parse.y (jdep_resolve_class): Only check deprecation if we found
6119         a decl.
6120
6121 2003-02-28  Tom Tromey  <tromey@redhat.com>
6122
6123         PR java/9695:
6124         * class.c (maybe_layout_super_class): Always pass a WFL to
6125         do_resolve_class.
6126         * parse.y (do_resolve_class): Updated comment to explain
6127         parameters.
6128
6129 2003-02-26  Tom Tromey  <tromey@redhat.com>
6130
6131         * jcf-write.c (generate_classfile): Check whether class is
6132         deprecated before writing attribute count.
6133
6134 2003-02-25  Roger Sayle  <roger@eyesopen.com>
6135
6136         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6137         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6138
6139 2003-02-23  Tom Tromey  <tromey@redhat.com>
6140
6141         * lang-options.h: Added -Wdeprecated.
6142         * gcj.texi (Warnings): Document -Wdeprecated.
6143         * java-tree.h (flag_deprecated): Declare.
6144         * lang.c (lang_W_options): Added deprecated.
6145         (flag_deprecated): New global.
6146         * chartables.h: Rebuilt.
6147         * gen-table.pl (process_one): Look at whitespace.
6148         (print_tables): Define LETTER_SPACE, LETTER_MASK.
6149         * parse.h (CLEAR_DEPRECATED): New macro.
6150         (CHECK_DEPRECATED_NO_RESET): New macro.
6151         * jcf-parse.c (handle_deprecated): New function.
6152         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6153         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6154         * parse.y (resolve_type_during_patch): Check deprecation.
6155         (jdep_resolve_class): Likewise.
6156         (process_imports): Likewise.
6157         (resolve_expression_name): Likewise.
6158         (check_deprecation): Strip arrays from decl.  Check
6159         flag_deprecated.
6160         (patch_method_invocation): Also check the particular constructor
6161         for deprecation.
6162         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6163         * jcf-write.c (append_deprecated_attribute): New function.
6164         (generate_classfile): Generate deprecated attribute when
6165         appropriate.
6166         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
6167         (java_lex) [case '*']: Simplify logic.
6168         (java_start_char_p): Use LETTER_MASK.
6169         (java_part_char_p): Likewise.
6170         (java_space_char_p): New function.
6171
6172 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
6173
6174         Change base class access representation.
6175         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6176         (add_interface_do): Likewise.
6177
6178 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
6179
6180         * decl.c (java_init_decl_processing): Change
6181         soft_lookupjnimethod_node to reflect the change in
6182         signature of _Jv_LookupJNIMethod in libjava/jni.cc
6183         * expr.c (build_jni_stub): Calculate and pass the size
6184         on the stack of the arguments to a JNI function. Use
6185         new target macro MODIFY_JNI_METHOD_CALL to allow a
6186         target to modify the call to a JNI method.
6187
6188 2003-02-08  Roger Sayle  <roger@eyesopen.com>
6189
6190         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6191         instead of basename to avoid compiler warnings on Tru64.
6192
6193 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6194
6195         * gcj.texi: Update to GFDL 1.2.
6196
6197 2003-01-31  Andrew Haley  <aph@redhat.com>
6198
6199         * parse.y (java_expand_classes): Scan the whole class list looking
6200         for access methods that haven't yet been expanded.
6201
6202 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6203
6204         Fix for java/4269:
6205
6206         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6207         to fix bootstrap on sparc-unknown-netbsdelf1.5.
6208         * jcf-parse.c: Likewise.
6209
6210 2003-01-31  Mark Wielaard  <mark@klomp.org>
6211
6212         * gjavah.c (throwable_p): Allocate 1 more byte for string.
6213
6214 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
6215
6216         * class.c (make_class): Use BINFO_ELTS.
6217         (set_super_info): Likewse.
6218         (add_interface_do): Likewise.
6219
6220 2003-01-30  Tom Tromey  <tromey@redhat.com>
6221
6222         * jcf-parse.c (read_class): Update identifier's class value if it
6223         changed during parsing.
6224
6225 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
6226
6227         * Make-lang.in (po-generated): Find the targets in $(parsedir).
6228         Propagate change to all other rules as required.
6229         (java/parse-scan.o): Add explicit dependency on
6230         $(parsedir)/java/parse-scan.c .
6231
6232 2003-01-29  Tom Tromey  <tromey@redhat.com>
6233
6234         * parse.y (patch_assignment): Only transform the rhs of an
6235         assignment when compiling to native.
6236
6237 2003-01-28  Tom Tromey  <tromey@redhat.com>
6238
6239         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6240
6241 2003-01-28  Tom Tromey  <tromey@redhat.com>
6242
6243         * lex.c (java_lex): Don't include UEOF as part of token.
6244         (java_read_unicode): Error if \u sequence prematurely terminated.
6245
6246 2003-01-27  Tom Tromey  <tromey@redhat.com>
6247
6248         * parse.y (java_check_regular_methods): Check for construct after
6249         checking types in throws clause.
6250
6251 2003-01-24  Tom Tromey  <tromey@redhat.com>
6252
6253         * class.c (build_static_field_ref): Only a String or numeric field
6254         can fold to a constant.
6255
6256 2003-01-23  Tom Tromey  <tromey@redhat.com>
6257
6258         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6259         file name in resource buffer.
6260
6261 2003-01-23  Tom Tromey  <tromey@redhat.com>
6262
6263         * expr.c (build_known_method_ref): Use method's context to find
6264         method table index.
6265
6266 2003-01-23  Tom Tromey  <tromey@redhat.com>
6267
6268         * constants.c (set_constant_entry): Allocated cleared memory.
6269
6270 2003-01-22  Tom Tromey  <tromey@redhat.com>
6271
6272         * java-tree.h: Don't use PARAMS.
6273         * resource.c: Add prototypes for all functions.
6274         (write_resource_constructor): Use `const char *' to avoid
6275         warning.
6276
6277 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
6278
6279         * jcf-parse.c (process_zip_dir): Remove unused variable.
6280
6281 2003-01-22  Tom Tromey  <tromey@redhat.com>
6282
6283         * expr.c (build_invokeinterface): Abort if method's context is not
6284         an interface.
6285
6286 2003-01-22  Tom Tromey  <tromey@redhat.com>
6287
6288         * gcj.texi (Input and output files): Mention non-class entries.
6289         * decl.c (java_init_decl_processing): Call
6290         init_resource_processing.
6291         * java-tree.h (compile_resource_data, write_resource_constructor,
6292         compile_resource_file, init_resource_processing): Declare.
6293         * config-lang.in (gtfiles): Added resource.c.
6294         * Make-lang.in (gt-java-resource.h): New target.
6295         (JAVA_OBJS): Added resource.o.
6296         (java/resource.o): New target.
6297         * resource.c: New file.
6298         * class.c (compile_resource_file): Moved to resource.c.
6299         (registerResource_libfunc): Likewise.
6300         (utf8_decl_list): Mark with GTY; now static.
6301         * jcf-parse.c (classify_zip_file): New function.
6302         (parse_zip_file_entries): Use it; compile .properties files.
6303         (process_zip_dir): Use classify_zip_file and compute_class_name.
6304         Don't write class name into zip directory.
6305         (java_parse_file): Call write_resource_constructor.
6306         (compute_class_name): New function.
6307         * jcf-io.c (read_zip_member): Reindented.
6308
6309 2003-01-21  Tom Tromey  <tromey@redhat.com>
6310
6311         * class.c (supers_all_compiled): New function.
6312         (make_class_data): Use it.
6313
6314 2003-01-21  Tom Tromey  <tromey@redhat.com>
6315
6316         * parse.y (method_header): Native method can't be strictfp.
6317         No method can be transient or volatile.
6318
6319 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6320
6321         Make-lang.in (jvspec.o-warn): Add -Wno-error.
6322
6323 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6324
6325         * check-init.c: Fix comment typos.
6326         * class.c: Likewise.
6327         * constants.c: Likewise.
6328         * decl.c: Likewise.
6329         * except.c: Likewise.
6330         * expr.c: Likewise.
6331         * java-except.h: Likewise.
6332         * java-tree.h: Likewise.
6333         * javaop.h: Likewise.
6334         * jcf-dump.c: Likewise.
6335         * jcf-io.c: Likewise.
6336         * jcf-parse.c: Likewise.
6337         * jcf-write.c: Likewise.
6338         * lang.c: Likewise.
6339         * mangle.c: Likewise.
6340         * typeck.c: Likewise.
6341         * verify.c: Likewise.
6342
6343 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6344
6345         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6346         * jcf-write.c: Include "tm_p.h".
6347
6348 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6349
6350         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6351
6352 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6353
6354         * builtins.c (java_build_function_call_expr): Renamed from
6355         build_function_call_expr.  All callers changed.
6356
6357         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6358         * jcf-parse.c: Include tm_p.h.
6359
6360         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6361         warning.
6362
6363 2003-01-14  Tom Tromey  <tromey@redhat.com>
6364
6365         * class.c (make_class_data): Check that super is compiled before
6366         building class reference to it.
6367
6368 2003-01-14  Andrew Haley  <aph@redhat.com>
6369
6370         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6371         varargs function -- correct.
6372
6373 2003-01-14  Andrew Haley  <aph@redhat.com>
6374
6375         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6376
6377 2003-01-14  Andrew Haley  <aph@redhat.com>
6378
6379         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6380         varargs function -- correct.
6381
6382         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6383         temporary if the RHS is a reference.
6384
6385 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6386
6387         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6388         * keyword.h: Regenerated.
6389
6390         * All Files: Convert to ISO C style function definitions.
6391
6392 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6393
6394         * parse.y (check_pkg_class_access): ANSIfy definition.
6395
6396 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6397
6398         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6399         xmalloc et al.
6400
6401         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6402
6403 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6404
6405         Merge from pch-branch:
6406
6407         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6408
6409         * Make-lang.in (java/gjavah.o): Update dependencies.
6410         * gjavah.c: Include ggc.h.
6411
6412         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6413
6414         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6415         (JCFDUMP_OBJS): Add ggc-none.o.
6416         (java/jcf-dump.o): Depend on GGC_H.
6417         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6418         CPool substructures.
6419         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6420         * jcf-dump.c: Include ggc.h.
6421
6422         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6423
6424         * jcf.h (union cpool_entry): New.
6425         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6426         an array of unions.
6427         (struct JCF): Use gengtype to mark.
6428         (CPOOL_UINT): Update for new cpool_entry type.
6429         (CPOOL_USHORT1): Likewise.
6430         (CPOOL_USHORT2): Likewise.
6431         (CPOOL_FINISH): Use GC to free cpool subfields.
6432         * parse.h (struct parser_ctxt): Mark field current_jcf.
6433         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6434         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6435         (main_jcf): Use gengtype to mark.
6436         (ggc_mark_jcf): Delete.
6437         (get_constant): Update for new cpool_entry type.
6438         (give_name_to_class): Likewise.
6439         (get_class_constant): Likewise.
6440         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6441         (java_parse_file): Use GGC to allocate struct JCF.
6442         (init_jcf_parse): Don't call ggc_add_root.
6443         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6444         cpool_entry type.
6445         * java-tree.h (current_jcf): Use gengtype to mark.
6446         (CPOOL_UTF): Update for new cpool_entry type.
6447         (outgoing_cpool): Use gengtype to mark.
6448         (struct lang_type): GC struct JCF and struct CPool.
6449         * config-lang.in (gtfiles): Add jcf.h.
6450         * constants.c (find_tree_constant): New.
6451         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6452         for new cpool_entry type.
6453         (find_constant1): Update for new cpool_entry type.
6454         (find_constant2): Likewise.
6455         (find_utf8_constant): Use find_tree_constant.
6456         (find_class_or_string_constant): Remove unnecessary cast to jword.
6457         Update for new cpool_entry type.
6458         (count_constant_pool_bytes): Update for new cpool_entry type.
6459         (write_constant_pool): Likewise.
6460         (alloc_name_constant): Use find_tree_constant.
6461         (build_constants_constructor): Update for new cpool_entry type.
6462
6463         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6464
6465         * parse.y (mark_parser_ctxt): Delete.
6466         (goal): Don't use ggc_add_root.
6467         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6468         (java_pop_parser_context): Let GC free parser_ctxt.
6469         (java_parser_context_resume): Likewise.
6470         * parse.h (struct parser_ctxt): Use gengtype to mark.
6471         (ctxp): Likewise.
6472         (ctxp_for_generation): Likewise.
6473         * lex.h (struct java_lc_s): Mark for gengtype.
6474         (java_lexer): Rearrange for gengtype.
6475         * config-lang.in (gtfiles): Add lex.h, parse.h.
6476
6477 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6478
6479         * All Files: Remove PARAMS macro.
6480
6481         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6482         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6483         `__STDC__' macros.
6484
6485         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6486         VA_CLOSE.
6487
6488 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6489
6490         * Make-lang.in (java.install-common, java.uninstall,
6491         java.install-info, java.install-man): Prepend $(DESTDIR)
6492         to destination paths in all (un)installation commands.
6493         (java.install-common): Rewrite $(LN) command to support
6494         DESTDIR with "ln" as well as with "ln -s".
6495
6496 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6497
6498         * java-tree.h: Protect against multiple inclusion.
6499
6500 2003-01-07  Tom Tromey  <tromey@redhat.com>
6501
6502         * class.c (add_assume_compiled): Don't adjust parent if we're
6503         already at the root of tree.
6504
6505 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6506
6507         * lang.c (dump_compound_expr): Prototype.
6508
6509 2003-01-03  Tom Tromey  <tromey@redhat.com>
6510
6511         Fix for PR java/8712:
6512         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6513         when simply checking against `null'.
6514
6515 2003-01-03  Tom Tromey  <tromey@redhat.com>
6516
6517         * gcj.texi (Standard Properties): Document http.proxyHost and
6518         http.proxyPort.
6519
6520         * gcj.texi (GNU Classpath Properties): Document new properties.
6521
6522 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6523
6524         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6525         java/lang-options.h, java/mangle.c, java/mangle_name.c,
6526         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6527
6528 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6529
6530         * Make-lang.in, boehm.c, buffer.c,
6531           buffer.h, builtins.c, class.c,
6532           config-lang.in, constants.c,
6533           convert.h, decl.c, except.c,
6534           expr.c, java-except.h,
6535           java-tree.h, javaop.def,
6536           jcf-parse.c, jcf-write.c,
6537           jv-scan.c, jvgenmain.c,
6538           jvspec.c, keyword.gperf,
6539           keyword.h, lang-options.h,
6540           lang-specs.h, lang.c, lex.c,
6541           lex.h, mangle.c, mangle_name.c,
6542           parse-scan.y, parse.h, parse.y,
6543           typeck.c, verify.c, xref.c,
6544           xref.h: Replace "GNU CC" with
6545           "GCC" in the copyright header.
6546
6547         * check-init.c, gjavah.c, javaop.h,
6548           jcf-depend.c, jcf-dump.c, jcf-io.c,
6549           jcf-path.c, jcf-reader.c, jcf.h,
6550           zextract.c, zipfile.h: These files are
6551           "part of GCC". Also say "GCC" not "GNU CC".
6552
6553 2002-12-30  DJ Delorie  <dj@redhat.com>
6554
6555         * Make-lang.in: Protect against texi2pod/pod2man failing.
6556
6557 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
6558
6559         * gcj.texi: Use @copying.
6560
6561 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6562
6563         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6564         print_cxx_classname.
6565         (print_cxx_classname): Add add_scope parameter.
6566         (print_class_decls): Do not emit a semicolon after the extern
6567         "Java" block.
6568         (process_file): Adjust calls to print_cxx_classname.
6569
6570 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6571
6572         * gcj.texi: Include Cover Texts in man page.
6573
6574 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
6575
6576         * class.c (build_static_field_ref): Check FIELD_FINAL.
6577
6578         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6579         instead of current_constant_pool_data_ref.
6580         * java-tree.h (current_constant_pool_data_ref): Undefine.
6581         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6582         * jcf-parse.c (init_outgoing_cpool): Don't initialize
6583         current_constant_pool_data_ref.
6584
6585         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6586         not build_internal_class_name.
6587
6588         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6589         Use it when class ref isn't certain to be compiled.
6590
6591 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6592
6593         * gcj.texi: Include gcc-common.texi.
6594         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6595         $(srcdir)/doc/include/gcc-common.texi.
6596
6597 2002-12-22  Anthony Green  <green@redhat.com>
6598
6599         * gcj.texi (Limitations): Add note about org.xml.sax and
6600         org.w3c.dom.
6601
6602 2002-12-20  Tom Tromey  <tromey@redhat.com>
6603
6604         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6605         where minimum case value is Integer.MIN_VALUE.
6606         Fixes PR java/8955.
6607
6608 2002-12-18  Andrew Haley  <aph@redhat.com>
6609
6610         * parse.y (patch_invoke): Force evaluation order when `check' is
6611         set.  For PR libgcj/8945.
6612
6613 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
6614
6615         * gcj.texi: Change version number to 3.4.
6616
6617 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
6618         Andrew Haley <aph@redhat.com>
6619
6620         * parse.y (source_end_java_method): Remove custom encoding of line
6621         numbers for a function decl before passing it to the back end.
6622
6623 2002-12-03  Andrew Haley  <aph@redhat.com>
6624
6625         * class.c (make_class_data): New field, "chain".
6626         * decl.c (java_init_decl_processing): Likewise.
6627
6628 2002-12-02  Tom Tromey  <tromey@redhat.com>
6629
6630         For PR java/8740:
6631         * parse.y (do_resolve_class): Handle qualified name via
6632         recursion.
6633
6634 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6635
6636         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6637         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6638         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6639         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6640         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6641         Include coretypes.h and tm.h.
6642         * Make-lang.in: Update dependencies.
6643
6644 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6645
6646         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6647
6648 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6649
6650         * jcf-reader.c: Don't expand JCF_readu4 inside the
6651         expansion of JCF_SKIP.
6652
6653 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6654
6655         * jcf-reader.c: Don't expand JCF_readu4 inside the
6656         expansion of JCF_SKIP.
6657
6658 2002-11-22  Tom Tromey  <tromey@redhat.com>
6659
6660         * parse.y (patch_binop): Cast right hand side of shift expression
6661         to `int'.  Fixes PR java/8676.
6662
6663 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
6664             Andrew Haley <aph@redhat.com>
6665
6666         * gcc/java/jcf-write.c (write_classfile): Remove target
6667         class file, if it exists, before renaming the temporary
6668         class file to it.
6669
6670 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6671
6672         * jvspec.c (lang_specific_spec_functions): New.
6673
6674 2002-11-18  Tom Tromey  <tromey@redhat.com>
6675
6676         Fix for PR java/7912:
6677         * expr.c (can_widen_reference_to): Allow cast of array to
6678         Cloneable or Serializable.
6679         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
6680         (java_io_serializable_identifier_node): Likewise.
6681         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
6682         (valid_ref_assignconv_cast_p): Use new identifier nodes.
6683         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
6684         java_io_serializable.
6685         * decl.c (java_init_decl_processing): Initialize
6686         java_lang_cloneable_identifier_node and
6687         java_io_serializable_identifier_node.
6688         (java_lang_cloneable_identifier_node): New global.
6689         (java_io_serializable_identifier_node): Likewise.
6690
6691 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
6692
6693         * buffer.c: Remove unnecessary casts.
6694         * check-init.c: Likewise.
6695         * class.c: Likewise.
6696         * constants.c: Likewise.
6697         * decl.c: Likewise.
6698         * except.c: Likewise.
6699         * gjavah.c: Likewise.
6700         * jcf-io.c: Likewise.
6701         * jcf-parse.c: Likewise.
6702         * jcf-path.c: Likewise.
6703         * jvspec.c: Likewise.
6704         * lang.c: Likewise.
6705         * lex.c: Likewise.
6706         * verify.c: Likewise.
6707
6708 2002-11-06  Tom Tromey  <tromey@redhat.com>
6709
6710         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6711         a JNI header.
6712
6713 2002-11-05  Tom Tromey  <tromey@redhat.com>
6714
6715         Fix for PR java/6388.
6716         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
6717         * java-tree.h (enum java_tree_index): New values
6718         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
6719         (decimal_int_max, decimal_long_max): New defines.
6720         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
6721         (error_if_numeric_overflow): Rewrote range checking.
6722         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
6723         decimal_long_max.
6724
6725 2002-11-02  Tom Tromey  <tromey@redhat.com>
6726
6727         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6728
6729         * class.c (make_method_value): Put class name, not signature, into
6730         `throws' field.  For PR java/8415.
6731
6732 2002-10-24  Tom Tromey  <tromey@redhat.com>
6733
6734         * gcj.texi (Invoking gij): Document --showversion.
6735         (Standard Properties): java.library.path now set.
6736
6737 2002-10-23  Tom Tromey  <tromey@redhat.com>
6738
6739         * gjavah.c (decode_signature_piece): In JNI mode, print
6740         `jobjectArray' when array depth is nonzero.
6741         Fixes PR java/8296.
6742
6743 2002-10-15  Andrew Haley  <aph@redhat.com>
6744
6745         * parse.y (patch_invoke): Call force_evaluation_order on a static
6746         arg list.
6747         (resolve_qualified_expression_name): Call force_evaluation_order
6748         on a arg list that is part of a Qualified Expression Name.
6749
6750         * lang.c (dump_compound_expr): New.
6751         (java_dump_tree): New.
6752
6753 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
6754
6755         * gcj.texi: Added item describing the GCJ runtime property
6756         "gnu.gcj.progname".
6757
6758 2002-10-15  Richard Henderson  <rth@redhat.com>
6759
6760         * jcf-parse.c (get_constant): Fix type warning.
6761
6762 2002-10-15  Andrew Haley  <aph@redhat.com>
6763
6764         * java-tree.h (java_inlining_merge_static_initializers): Declare.
6765         (java_inlining_map_static_initializers): Declare.
6766
6767 2002-10-14  Andrew Haley  <aph@redhat.com>
6768
6769         * tree-inline.c (remap_block): All local class initialization
6770         flags go in the outermost scope.
6771         (expand_call_inline): Call java_inlining_map_static_initializers.
6772         (expand_call_inline): Call java_inlining_merge_static_initializers.
6773         * java/lang.c (merge_init_test_initialization): New.
6774         (java_inlining_merge_static_initializers): New.
6775         (inline_init_test_initialization): New.
6776         (java_inlining_map_static_initializers): New.
6777
6778 2002-10-11  Mark Wielaard  <mark@klomp.org>
6779
6780         * gcj.texi (Compatibility): Add Limitations and Extensions section.
6781
6782 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6783
6784         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6785
6786 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6787
6788         * parse.y (merge_string_cste): Add parentheses around & within |.
6789
6790 2002-10-08  Tom Tromey  <tromey@redhat.com>
6791
6792         * parse.y (variable_declarator_id): Simplify error path for
6793         array declarator error.  For PR java/8003.
6794
6795 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
6796
6797         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6798         bug_report_url.
6799
6800 2002-10-08  Andrew Haley  <aph@redhat.com>
6801
6802         * parse.y (attach_init_test_initialization_flags): Check for
6803         error_mark_node.
6804
6805 2002-10-07  Anthony Green  <green@redhat.com>
6806
6807         * parse.y (merge_string_cste): Fix bug in string concatenation.
6808
6809 2002-10-03  Michael Koch  <konqueror@gmx.de>
6810
6811         * gcj.texi (Standard properties):
6812         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
6813
6814 2002-10-02  Roger Sayle  <roger@eyesopen.com>
6815
6816         PR optimization/6627
6817         * lang.c (java_init): If storing the vbit in function
6818         pointers, ensure that force_align_functions_log is atleast
6819         one to aid compatability with g++ vtables.
6820
6821 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
6822
6823         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
6824         foul of type-based aliasing.
6825
6826 2002-09-30  Anthony Green  <green@redhat.com>
6827
6828         * gcj.texi (Invoking jv-scan): Fix texinfo.
6829
6830 2002-09-28  Anthony Green  <green@redhat.com>
6831
6832         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
6833         (Code Generation): Add -fno-assert documentation.
6834         * jv-scan.c (flag_assert): New global.
6835         (options): Add assert option.
6836         (help): Add --no-assert documentation.
6837         * parse-scan.y (flag_assert): New global.
6838         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
6839         (flag_assert): New global.
6840         * java-tree.h (flag_assert): New global.
6841         * lex.c (java_lex): Obey flag_assert.
6842         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
6843         calling cc1.
6844
6845 2002-09-26  Andrew Haley  <aph@redhat.com>
6846
6847         * expr.c (build_java_array_length_access): Check for null pointer.
6848         * expr.c (expand_java_arrayload): Likewise.
6849
6850 2002-09-21  Richard Henderson  <rth@redhat.com>
6851
6852         * jcf-parse.c (get_constant): Decode from IEEE no matter
6853         what the target format.
6854
6855 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
6856
6857         * ChangeLog: Follow spelling conventions.
6858         * class.c: Likewise.
6859         * decl.c: Likewise.
6860         * expr.c: Likewise.
6861         * gjavah.c: Likewise.
6862         * java-tree.h: Likewise.
6863         * jcf-dump.c: Likewise.
6864         * jcf-parse.c: Likewise.
6865         * jvspec.c: Likewise.
6866         * lang.c: Likewise.
6867         * mangle.c: Likewise.
6868         * parse.y: Likewise.
6869
6870 2002-09-17  Tom Tromey  <tromey@redhat.com>
6871
6872         * lex.c (java_read_unicode_collapsing_terminators): Handle case
6873         where \r appears at EOF.  Fixes PR java/7950.
6874
6875 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6876
6877         * jvspec.c (lang_specific_driver): Remove unused variable.
6878
6879 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
6880
6881         * java-tree.h (union lang_tree_node): Add chain_next option.
6882
6883 2002-09-16  Richard Henderson  <rth@redhat.com>
6884
6885         * jcf-parse.c (get_constant): Runtime check for IEEE format;
6886         use new real.h interface.
6887         * jcf-write.c (find_constant_index): Use new real.h interface.
6888         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
6889
6890 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
6891
6892         * lang.c: Follow spelling conventions.
6893
6894 2002-09-11  Per Bothner  <per@bothner.com>
6895
6896         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
6897         constant to the type of the field.
6898         (java_complete_tree):  Remove now-redundant code.
6899
6900         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
6901
6902 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
6903
6904         For PR java/5794:
6905         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
6906         return label if a ret instruction for the jsr has been reached.
6907
6908 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
6909
6910         * parse.y (DIR_SEPARATOR): Don't define.
6911         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
6912
6913 2002-08-28  Andrew Haley  <aph@redhat.com>
6914
6915         * verify.c (verify_jvm_instructions): Allow exception handler
6916         inside code that is being protected, but generate a warning.
6917         * except.c (link_handler): Initialize `expanded' in new eh_range.
6918         (binding_depth, is_class_level, current_pc): Declare extern.
6919
6920 2002-09-01  Mark Wielaard <mark@klomp.org>
6921
6922         * gcj.texi: Add chapter about system properties.
6923         Fixed some typos.
6924
6925 2002-08-26  Tom Tromey  <tromey@redhat.com>
6926
6927         * parse.y (try_builtin_assignconv): Allow narrowing primitive
6928         conversion if RHS_TYPE is byte, short, or char.
6929
6930 2002-08-22  Tom Tromey  <tromey@redhat.com>
6931
6932         * gcj.texi (Invoking gij): Document -cp and -classpath.
6933
6934 2002-08-21  Tom Tromey  <tromey@redhat.com>
6935
6936         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
6937         $(prefix)/share.  For PR libgcj/7633.
6938
6939         For PR java/6005 and PR java/7611:
6940         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
6941         (java_can_use_bit_fields_p): New function.
6942
6943 2002-08-16  Tom Tromey  <tromey@redhat.com>
6944
6945         * gcj.texi (Class Initialization): Mention class initialization of
6946         arrays.
6947
6948 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
6949
6950         * Make-lang.in (java-tree-inline.o): New.
6951         (JAVA_OBJS): Add java-tree-inline.o.
6952         * parse.y (source_end_java_method): Call java_optimize_inline.
6953         (java_expand_method_bodies): Save method's tree in
6954         DECL_SAVED_TREE.
6955         (add_stmt_to_compound): Keep track of the number of statments.
6956         * lang.c (java_init): Enable flag_inline_trees.
6957         (java_post_options): If flag_inline_functions is on, enable
6958         flag_inline_trees instread.
6959         (decl_constant_value): New.
6960         (java_tree_inlining_walk_subtrees): New.
6961         * java-tree.h (DECL_NUM_STMTS): New macro.
6962         (java_optimize_inline): Declare.
6963         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
6964         Handle a LABEL_EXPR.
6965         * decl.c (build_result_decl): If we already have a DECL_RESULT
6966         don't make another.
6967         (dump_function): New.
6968         (java_optimize_inline): New.
6969         (dump_function): New.
6970
6971 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
6972
6973         For PR java/7483:
6974         * parse.y (build_assertion): Invert return from
6975         desiredAssertionStatus.
6976
6977 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6978
6979         * jcf-write.c (get_access_flags): Return correct access flags for
6980         private and protected inner classes.
6981
6982 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6983
6984         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
6985
6986 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
6987
6988         * mangle_name.c: Don't include obstack.h twice.
6989         * xref.c: Don't include obstack.h.
6990
6991 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
6992
6993         * class.c: (permanent_obstack): Delete declaration.
6994         * constants.c: (permanent_obstack): Delete declaration.
6995         * except.c: (permanent_obstack): Delete declaration.
6996         * expr.c: (permanent_obstack): Delete declaration.
6997         * jcf-parse.c: (permanent_obstack): Delete declaration.
6998         (saveable_obstack): Delete declaration.
6999         * parse.h: (permanent_obstack): Delete declaration.
7000         * typeck.c: (permanent_obstack): Delete declaration.
7001
7002 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7003
7004         * gcj.texi (version-gcc): Increase to 3.3.
7005
7006 2002-07-22  Tom Tromey  <tromey@redhat.com>
7007
7008         * lex.c (java_lex): Check for `e' or `E' after 0.
7009
7010 2002-07-21  Richard Henderson  <rth@redhat.com>
7011
7012         * lang.c (java_unsafe_for_reeval): New.
7013         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7014
7015 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
7016
7017         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7018         (jcf_path_init): Use GET_ENVIRONMENT.
7019
7020 2002-07-10  Roger Sayle  <roger@eyesopen.com>
7021             Zack Weinberg <zack@codesourcery.com>
7022
7023         * builtins.c (initialize_builtins): Remove defines that
7024         handled C/C++ specific junk hereby removed from builtins.def.
7025
7026 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
7027
7028         * lang.c (java_post_options): Update prototype.
7029
7030 2002-07-05  Roger Sayle  <roger@eyesopen.com>
7031
7032         * builtins.c (initialize_builtins): Ignore the additional
7033         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
7034         the builtins.def file.
7035
7036 2002-07-01  Tom Tromey  <tromey@redhat.com>
7037
7038         For PR libgcj/7073:
7039         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7040         specially.
7041
7042 2002-07-01  Roger Sayle  <roger@eyesopen.com>
7043
7044         * java/decl.c (builtin_function): Accept additional parameter.
7045         (java_init_decl_processing): Pass an additional NULL_TREE
7046         argument to builtin_function.
7047
7048 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
7049
7050         * gcj.texi: Fixed gcj invocation example so that it compiles.
7051
7052 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7053
7054         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7055         * parse.y (mark_parser_ctxt): Likewise.
7056         (check_modifiers, declare_local_variables): Avoid incorrect
7057         hardcoded constant 10.
7058
7059         * lex.c (java_read_char): Avoid "comparison is always true"
7060         warning.
7061
7062 2002-06-25  Andreas Schwab  <schwab@suse.de>
7063
7064         * expr.c (JSR): Avoid undefined operation on PC.
7065
7066 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7067
7068         * decl.c (clear_binding_level): Const-ify.
7069
7070 2002-06-13  Akim Demaille  <akim@epita.fr>
7071
7072         * parse.y (class_declaration, interface_declaration): Make sure
7073         all their rules have an action, in order to avoid meaningless `$$
7074         = $1' and their type clashes.
7075
7076 2002-06-11  Tom Tromey  <tromey@redhat.com>
7077
7078         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7079         * parse-scan.y (statement_without_trailing_substatement): Added
7080         assert_statement.
7081         (assert_statement): New rule.
7082         * java-tree.h (struct lang_type) [assertions]: New field.
7083         (TYPE_USES_ASSERTIONS): New macro.
7084         (CLASS_USES_ASSERTIONS): Likewise.
7085         (FIELD_SYNTHETIC): New define.
7086         * lex.c (java_lval;): Added ASSERT_TK.
7087         * parse.y (ASSERT_TK): Added.
7088         (statement_without_trailing_substatement): Added assert_statement.
7089         (assert_statement): New rule.
7090         (build_assertion): New function.
7091         (maybe_generate_pre_expand_clinit): Create and initialize
7092         $assertionsDisabled.
7093         (lookup_package_type): Removed decl.
7094         * keyword.h: Rebuilt.
7095         * keyword.gperf (assert): New token.
7096
7097 2002-06-10  Akim Demaille  <akim@epita.fr>
7098
7099         * parse.y (interface_type_list, class_member_declaration)
7100         (unary_expression_not_plus_minus): Remove duplicate %type.
7101         Whitespace changes.
7102
7103 2002-06-09  Tom Tromey  <tromey@redhat.com>
7104
7105         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7106
7107         * parse.y (method_header): Give error message in all cases.
7108         Fixes PR java/6865.
7109
7110 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7111
7112         Don't use RTL inlining. Fix for PR java/6820.
7113         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7114         (flag_really_inline): New.
7115         (java_decode_option): Set flag_really_inline if -finline-functions
7116         is seen.
7117         (java_post_options): New function. Turn off inlining unless
7118         flag_really_inline is set.
7119
7120 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7121
7122         * gjavah.c (throwable_p): Accept argument as either a classname or
7123         signature fragment. Create null-terminated classname string for super
7124         when calling itself recursively.
7125         (decode_signature_piece): Skip first character from class name
7126         signature when calling throwable_p.
7127
7128 2002-06-08  H.J. Lu  (hjl@gnu.org)
7129
7130         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7131
7132 2002-06-04  Tom Tromey  <tromey@redhat.com>
7133
7134         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7135
7136 2002-06-04  Michael Koch  <konqueror@gmx.de>
7137
7138         * gcj.texi (Input Options): Fixed typo.
7139
7140 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
7141
7142         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7143         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7144         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7145         and all now-pointless local variables.  Rename other local
7146         variables to reflect their not being handles.
7147
7148         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7149         #if JCF_USE_STDIO blocks.
7150
7151         * parse.y: Add missing semicolon at end of rule.
7152
7153 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7154
7155         * check-init.c (attach_initialized_static_class): Delete, unused.
7156         * parse.y: Use htab_t instead of struct hashtable, update
7157         all uses.
7158         * java-tree.h: Include hashtab.h instead of hash.h.
7159         (struct lang_decl_func): Use htab_t, set up for gengtype.
7160         (struct init_test_hash_entry): Delete.
7161         (struct treetreehash_entry): New.
7162         (java_treetreehash_find): New
7163         (java_treetreehash_new): New prototype.
7164         (java_treetreehash_create): New prototype.
7165         (java_mark_tree): Delete prototype.
7166         (java_hash_hash_tree_node): Delete prototype.
7167         (java_hash_compare_tree_node): Delete prototype.
7168         (attach_initialized_static_class): Delete prototype.
7169         * expr.c (build_class_init): Update to use java_treetreehash
7170         functions.
7171         (java_expand_expr): Update to use htab_t.
7172         (emit_init_test_initialization): Likewise.
7173         * decl.c (java_mark_tree): Delete.
7174         * class.c (init_test_hash_newfunc): Delete.
7175         (java_hash_hash_tree_node): Delete.
7176         (java_hash_compare_tree_node): Delete.
7177         (add_method_1): Update to use java_treetreehash functions.
7178         (JAVA_TREEHASHHASH_H): New macro.
7179         (java_treetreehash_hash): New function.
7180         (java_treetreehash_compare): New function.
7181         (java_treetreehash_find): New function.
7182         (java_treetreehash_new): New function.
7183         (java_treetreehash_create): New function.
7184         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7185
7186         * Make-lang.in (java/parse.o): Depend on debug.h.
7187         * java-tree.h (struct lang_identifier): Use gengtype.
7188         (union lang_tree_node): New.
7189         (struct lang_decl_func): Use gengtype.
7190         (struct lang_decl_var): Likewise.
7191         (struct lang_decl): Likewise.
7192         * parse.y: Include debug.h.
7193         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7194
7195         * lang.c (struct language_function): New dummy structure.
7196
7197         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7198         descriminator for DECL_LANG_SPECIFIC.
7199         (struct lang_decl_func): Rename from struct lang_decl.
7200         (enum lang_decl_desc): New.
7201         (struct lang_decl): Make it a union.  Update all the accessor macros.
7202         (struct lang_type): Use gengtype.
7203         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7204         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7205         are now the same size.
7206         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7207         use discriminator to mark DECL_LANG_SPECIFIC.
7208
7209         * Make-lang.in (gt-java-builtins.h): New rule.
7210         (java/builtins.o): Add dependency on gt-<filename>.h.
7211         * builtins.c: Use gengtype for roots.
7212         (union string_or_tree): Use gengtype.
7213         (struct builtin_record): Use gengtype.
7214         * config-lang.in (gtfiles): Add builtins.c.
7215
7216         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7217         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7218         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7219         gt-java-parse.h, gtype-java.h): Add rules to generate.
7220         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7221         (class.o): Add dependency on gt-*.h.
7222         (constants.o): Likewise.
7223         (decl.o): Likewise.
7224         (expr.o): Likewise.
7225         (jcf-parse.o): Likewise.
7226         (jcf-write.o): Likewise.
7227         (lang.o): Likewise.
7228         * config-lang.in (gtfiles): New.
7229         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7230         * constants.c: Replace uses of ggc_add_* with GTY markers.
7231         Include gt-*.h.
7232         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7233         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7234         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7235         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7236         Include gt-*.h.
7237         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7238         Include gt-*.h.
7239         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7240         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
7241         gt-*.h.
7242         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7243         Include gtype-java.h.
7244
7245 2002-06-02  Tom Tromey  <tromey@redhat.com>
7246
7247         Fix for PR java/5913:
7248         * parse.y (patch_binop): Call patch_string on op1.
7249
7250 2002-06-02  Tom Tromey  <tromey@redhat.com>
7251
7252         Fix for PR java/1343, PR java/6336:
7253         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7254         formatting.  Changed return type.
7255         (anonymous_class_counter): Moved to top of file.
7256         (maybe_make_nested_class_name): Append number to class name for
7257         function-local classes.
7258
7259 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7260
7261         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7262         * Make-lang.in: Update dependency lists.
7263
7264 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
7265
7266         * gjavah.c (throwable_p): Do not free the name of the class after
7267         passing it to find_class.
7268         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7269         * jcf-io.c (dirent.h): Include it.
7270         (fnmatch.h): Likewise.
7271         (compare_path): New function.
7272         (java_or_class_file): Likewise.
7273         (memoized_dirlist_entry): New type.
7274         (memoized_dirlist_lookup_eq): New function.
7275         (memoized_dirlists): New variable.
7276         (caching_stat): New function.
7277         (memoized_class_lookup_eq): New function.
7278         (memoized_class_lookups): Likewise.
7279         (find_class): Use memoized_class_lookups and caching_stat.
7280         * jcf.h (JCF_USE_SCANDIR): Define.
7281         * parse.y (java_expand_classes): Write the class files in reverse
7282         order.
7283
7284 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7285
7286         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7287
7288 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
7289
7290         * jcf-write.c (write_classfile): Unlink the temporary file if it
7291         cannot be renamed.  Use concat to build up the name of the
7292         temporary file.
7293
7294 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
7295
7296         * jcf-write.c (write_classfile): Write the file to a
7297         temporary file and then rename it.
7298
7299 2002-05-07  Tom Tromey  <tromey@redhat.com>
7300
7301         * gjavah.c (throwable_p): Use xstrdup, not strdup.
7302
7303         Fix for PR java/1200:
7304         * gjavah.c (throwable_p): New function.
7305         (decode_signature_piece): Use it.  A `WeakReference' isn't the
7306         same as a `jweak'.
7307         Include hashtab.h.
7308         (gcjh_streq): New function.
7309
7310 2002-05-07  Andreas Jaeger  <aj@suse.de>
7311
7312         * parse.y (finish_for_loop): Fix if statement.
7313
7314 2002-05-06  Tom Tromey  <tromey@redhat.com>
7315
7316         Fix for PR java/5941:
7317         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7318         loop update expression.
7319         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7320         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7321
7322 2002-05-04  Mark Wielaard  <mark@klomp.org>
7323
7324         For PR java/6519:
7325         * parse.y (build_string_concatenation): Return just op1 only when op2
7326         is null and op1 is a STRING_CST, otherwise always construct a
7327         StringBuffer.
7328
7329 2002-04-27  Tom Tromey  <tromey@redhat.com>
7330
7331         For PR java/6382:
7332         * parse.y (string_convert_int_cst): New function.
7333         (merge_string_cste): Use it.
7334
7335 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7336
7337         * java-tree.h (java_parse_file): Update.
7338         (java_set_yydebug): Remove.
7339         * jcf-parse.c (yydebug): Remove.
7340         (java_set_yydebug): Die.
7341         (java_parse_file): Update.
7342         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7343
7344 2002-04-24  Tom Tromey  <tromey@redhat.com>
7345
7346         For PR java/6425:
7347         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7348         EXPR_WFL_QUALIFICATION of qual_wfl.
7349
7350 2002-04-23  Per Bothner  <per@bothner.com>
7351
7352         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7353         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7354         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7355
7356 2002-04-23  Tom Tromey  <tromey@redhat.com>
7357
7358         For PR java/6314:
7359         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7360         recognize `-fcompile-resource='.
7361         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7362         a bit.
7363
7364 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7365
7366         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7367         paths. Fixes PR java/2791.
7368
7369 2002-04-19  Andrew Haley  <aph@redhat.com>
7370
7371         * jcf-write.c (push_long_const): lo, hi: New variables.
7372         Use rshift_double to extract the high part of a 64-bit long.
7373         Use WORD_TO_INT to extract the low part.
7374
7375         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7376         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7377         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7378
7379 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7380
7381         * typeck.c (incomplete_type_error): Remove.
7382
7383 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7384
7385         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7386         for hash synchronization.
7387         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7388         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7389         class_type_node.
7390
7391 2002-04-16  Mark Wielaard  <mark@klomp.org>
7392
7393         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7394         negative zero.
7395
7396 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7397
7398         Fix for PR java/6294:
7399         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7400         interfaces.
7401
7402 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7403
7404         Fix for PR java/6085:
7405         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7406         to get enclosing "this" argument for inner-class constructor
7407         invocation. Pass correct arguments to build_access_to_thisn.
7408
7409 2002-04-10  Andreas Jaeger  <aj@suse.de>
7410
7411         * gcj.texi (Input Options): Fix extdirs patch.
7412
7413 2002-04-10  Anthony Green  <green@redhat.com>
7414
7415         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7416
7417 2002-04-09  Anthony Green  <green@redhat.com>
7418
7419         * gcj.texi (Input Options): Add --extdirs documentation.
7420         * jcf-dump.c (OPT_extdirs): New macro.
7421         (options): Add extdirs option.
7422         (help): Describe --extdirs.
7423         (main): Handle OPT_extdirs.
7424         * gjavah.c (OPT_extdirs): New macro.
7425         (options): Add extdirs option.
7426         (help): Describe --extdirs.
7427         (main): Handle OPT_extdirs.
7428         * jcf-path.c (jcf_path_init): Add extdirs support.
7429         (jcf_path_extdirs_arg): New function.
7430         (extensions): New variable to hold extensions path entries.
7431         * jvspec.c: Remove -fextdirs= when compiling main().
7432         * lang.c (java_decode_option): Handle -fextdirs=.
7433         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7434         * Make-lang.in: Compile jcf-path with version info for use in
7435         identifying the appropriate libgcj.jar.
7436
7437 2002-04-08  Tom Tromey  <tromey@redhat.com>
7438
7439         For PR libgcj/5303:
7440         * .cvsignore: Added rmic.1 and rmiregistry.1.
7441         * gcj.texi (Top): Link to new nodes.
7442         (Invoking rmic): New node.
7443         (Invoking rmiregistry): Likewise.
7444         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7445         rmiregistry.1.
7446         (java.maintainer-clean): Likewise.
7447         ($(srcdir)/java/rmic.1): New target.
7448         ($(srcdir)/java/rmiregistry.1): Likewise.
7449         (java.install-man): Handle rmic.1 and rmiregistry.1.
7450
7451 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7452
7453         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7454         Add note about handling uncaught exceptions. Add an exception handler
7455         to example.
7456
7457 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7458
7459         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7460         after using it to patch CALL_EXPR.
7461
7462 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7463
7464         * gcj.texi (Invocation): Document CNI invocation API.
7465
7466 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7467
7468         * expr.c (truthvalue_conversion): Rename.  Update.
7469         (expand_compare): Update.
7470         * java-tree.h (java_truthvalue_conversion): New.
7471         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7472
7473 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7474
7475         * java-tree.h (java_mark_addressable): New.
7476         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7477         * typeck.c (mark_addressable): Rename, update.
7478
7479 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7480
7481         * expr.c (build_java_binop): Update.
7482         * java-tree.h (java_signed_type, java_unsigned_type,
7483         java_signed_or_unsigned_type): Update.
7484         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7485         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7486         * parse.y (patch_binop): Update.
7487         * typeck.c (signed_or_unsigned_type, unsigned_type,
7488         signed_type): Update.
7489
7490 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7491
7492         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7493         (java_dummy_print): Remove.
7494         (lang_print_error): Rename.  Exit early if inhibiting output.
7495         (inhibit_error_printing_function): New.
7496         (java_init): Don't set hook.
7497         (lang_init_source): Use new boolean.
7498
7499 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7500
7501         * parse.y (do_resolve_class): Fix infinite recursion.
7502
7503 2002-03-29  Tom Tromey  <tromey@redhat.com>
7504
7505         * parse.y (check_inner_circular_reference): Ignore incomplete
7506         types.
7507
7508 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7509
7510         * Make-lang.in (builtins.o): Update.
7511         * boehm.c (get_boehm_type_descriptor): Update.
7512         * builtins.c: Include langhooks.h.
7513         * decl.c (java_init_decl_processing): Update.
7514         * java-tree.h (java_type_for_mode, java_type_for_size): New.
7515         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7516         Redefine.
7517         * typeck.c (type_for_mode, type_for_size): Update.
7518
7519 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7520
7521         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7522
7523 2002-03-28  Tom Tromey  <tromey@redhat.com>
7524
7525         * except.c (expand_end_java_handler): If the handler type is NULL,
7526         use java.lang.Throwable.  Fixes PR java/5986.
7527
7528 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7529
7530         Fix for PR java/4715:
7531         * jcf-parse.c (parse_source_file_3): New function.
7532         (read_class): Call it.
7533         (java_parse_file): Likewise.
7534
7535 2002-03-28  Jan Hubicka  <jh@suse.cz>
7536
7537         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7538
7539 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7540
7541         * parse.y (resolve_package): Initialize "decl".
7542         (lookup_package_type): Remove unused function.
7543
7544 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7545
7546         Fix for PR java/5993:
7547         * parse.y (resolve_package): Return the decl if resolution was
7548         successful. Don't special case "java.lang" and "java.lang.reflect"
7549         packages. Set type_name to the merged identifier.
7550         (resolved_qualified_expression_name): Print error using "name" if
7551         resolve_package returns NULL_TREE.
7552
7553 2002-03-27  Tom Tromey  <tromey@redhat.com>
7554
7555         * expr.c (expand_invoke): Don't generate null pointer check if
7556         we're calling <init>.
7557
7558 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7559
7560         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7561         fix prototype.
7562         * java-tree.h (java_lang_expand_expr): Similarly.
7563         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7564         (java_init): Don't set hook.
7565
7566 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7567
7568         Fix for PR java/5850:
7569         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7570         context if field was not found in the current scope.
7571         * expr.c (lookup_field): Don't look in enclosing contexts.
7572
7573 2002-03-26  Tom Tromey  <tromey@redhat.com>
7574
7575         Fix for PR java/5942:
7576         * parse.y (init_src_parse): Added sanity check.
7577         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7578         elements, not 11.
7579
7580 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7581
7582         * decl.c (lang_mark_tree): Rename java_mark_tree.
7583         * java-tree.h (java_mark_tree): New.
7584         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7585
7586 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
7587
7588         * lex.c: Change java_perform_atof to take normal parameters
7589         instead of a pointer to a parameter block.  Call it directly
7590         from java_lex.
7591
7592 2002-03-22  Mark Wielaard  <mark@klomp.org>
7593
7594         Fix for PR java/5368:
7595         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7596         when printing error message.
7597
7598 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7599
7600         * decl.c (maybe_build_cleanup): Remove.
7601
7602 2002-03-22  Tom Tromey  <tromey@redhat.com>
7603
7604         Andrew Haley  <aph@cambridge.redhat.com>
7605
7606         * expr.c (build_field_ref): Don't build a check if the field is a
7607         member of `this'.
7608
7609 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
7610
7611         Fix for PR java/6026:
7612         * lex.c (java_lex): Fix parsing of consecutive floats.
7613
7614 2002-03-21  Tom Tromey  <tromey@redhat.com>
7615
7616         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7617         class.
7618
7619 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7620
7621         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7622         insert_block, getdecls, kept_level_p, global_bindings_p): New.
7623
7624 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7625
7626         * gcj.texi: @code{gcj} becomes @command{gcj}.
7627         @code{gcc} becomes @command{gcc}.
7628         GcjRaw changed to gnu.gcc.RawData.
7629
7630 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7631
7632         * decl.c (start_java_method): Use new hook.
7633         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7634         (java_init): Remove old hook.
7635
7636 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7637
7638         * builtins.c (define_builtin): Do nothing if `type' is null.
7639         Fixes PR java/5876.
7640
7641 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7642
7643         * parse.y (parser_check_super_interface): Fix error message
7644         grammar/order.
7645
7646 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7647
7648         * jcf-parse.c (get_constant): Delete unused variables.
7649
7650 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7651
7652         * java-tree.h (java_parse_file): New.
7653         * jcf-parse.c (yyparse): Rename java_parse_file.
7654         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7655
7656 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7657
7658         * parse.y (craft_constructor): Return the constructor decl.
7659         (java_expand_classes): Update comments.
7660         (lookup_method_invoke): Call fix_constructors immediately for
7661         anonymous class. Fixes PR java/5935.
7662
7663 2002-03-15  Anthony Green  <green@redhat.com>
7664
7665         * jcf-parse.c (yyparse): Don't emit class registration
7666         constructor when compiling resource files.
7667
7668 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7669
7670         * lang.c (java_tree_code_type, java_tree_code_length,
7671         tree_code_name): Delete.
7672         (tree_code_type, tree_code_length, tree_code_name): Define.
7673         (java_init): Don't try to copy into the various tree_code
7674         arrays.
7675
7676 2002-03-12  Tom Tromey  <tromey@redhat.com>
7677
7678         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7679         UTF-8, not UCS-2.  Fixes PR java/5923.
7680
7681         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7682         a call_expr wrapped in a convert.  Fixes PR java/5848.
7683
7684 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7685
7686         * jcf-write.c (write_classfile): Improve error strings.
7687
7688 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7689
7690         * lex.c: Adjust comments to GNU standards.
7691
7692 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7693
7694         Fix for PR java/5902:
7695         * lex.c (java_lex): Fix parsing of literals.
7696
7697 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7698
7699         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
7700         to prevent it getting evaluated twice in the store checking case.
7701         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
7702         examining OBJECT.
7703
7704 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7705
7706         * decl.c (java_init_decl_processing): Make sure class_type_node
7707         alignment is not less than 64 bits if hash synchronization is enabled.
7708
7709 2002-03-08  Per Bothner  <per@bothner.com>
7710
7711         * parse.y (java_complete_lhs):  Check if patch_assignment
7712         returned an error-mark.
7713
7714         * parse.y (try_builtin_assignconv):  Don't special-case zero.
7715
7716 2002-03-08  Per Bothner  <per@bothner.com>
7717
7718         Fix for PR java/5812.
7719         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
7720         here instead of in JSR macro.  Likewise with load_type_state call.
7721         Do the latter on if the return_pc has been verified (the jsr returns).
7722         (JSR):  Now just call build_java_jsr.
7723
7724 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
7725
7726         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7727         (java.install-common): Link native driver to
7728         JAVA_TARGET_INSTALL_NAME.
7729
7730 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
7731
7732         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7733         * builtins.c(sin_builtin): Likewise
7734         * builtins.c(sqrt_builtin): Likewise
7735
7736 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
7737
7738         * java/expr.c, java/jcf-parse.c, java/lex.c:
7739         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
7740         REAL_ARITHMETIC blocks unconditional.  Delete some further
7741         #ifdef blocks predicated on REAL_ARITHMETIC.
7742
7743 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7744
7745         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
7746         explicit sizeof/sizeof.
7747         * decl.c (java_init_decl_processing): Likewise.
7748         * jcf-parse.c (init_jcf_parse): Likewise.
7749         * parse.y (init_src_parse): Likewise.
7750
7751 2002-03-02  Per Bothner  <per@bothner.com>
7752
7753         Make --CLASSPATH by a synonym for --classpath and -classpath.
7754         Implement --bootclasspath.
7755         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
7756         (classpath_l):  Remove.
7757         (jcf_path_CLASSPATH_arg):  Remove.
7758         (jcf_path_bootclasspath_arg):  New function.
7759         (jcf_path_seal):  Simplify accordingly.
7760
7761         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
7762         (jcf_path_CLASSPATH):  Remove declaration.
7763         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
7764         (lang_specific_driver):  Translate -bootclasspath.
7765         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
7766         * lang.c (decode_lang_options):  Do jcf_path_init first.
7767         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
7768         * gjavah.c:  Also handle --bootclasspath.
7769         Handle --CLASSPATH as a synonum for --classpath.
7770         * jcf-dump.c: Likewise.
7771
7772         "." is not part of system path, but is the default for --classpath.
7773         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
7774         (jcf_path_seal):  Add "." if no CLASSPATH specified.
7775
7776         * gcj.texi:  Document changes.
7777
7778 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7779
7780         * expr.c (build_java_arraystore_check): Fix formatting.
7781
7782 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7783
7784         Fix for PR java/5758, java/5632:
7785         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
7786         inner-class separator too.
7787         * parse.y (do_resolve_class): New local `decl_result.'
7788         Progressively build a name for what can have been loaded.
7789
7790 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7791
7792         * expr.c (java_array_data_offset): Removed function.
7793         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
7794         (build_java_array_length_access): Obtain "length" value using a
7795         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
7796         (build_java_arrayaccess): Correct comment. Access "data" using a
7797         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
7798         (build_java_arraystore_check): New function.
7799         (expand_java_arraystore): Use build_java_arraystore_check.
7800         * parse.y (patch_assignment): Simplify code to insert a store check
7801         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
7802         * check-init.c (check_init): Update to reflect that an array length
7803         access is now a COMPONENT_REF.
7804         * gcj.texi (Code Generation): Improve documentation of
7805         -fno-bounds-check. Add documentation for -fno-store-check.
7806         * java-tree.h (flag_store_check): Declare.
7807         (build_java_arraystore_check): Declare.
7808         * lang.c (flag_store_check): Initialize to 1.
7809         (lang_f_options): Add store-check option.
7810         * jvspec.c: Don't pass store-check option to jvgenmain.
7811         * lang-options.h: Add help string for -fno-store-check.
7812
7813 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
7814
7815         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
7816         * java-tree.h (java_dup_lang_specific_decl): New.
7817         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7818
7819 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
7820
7821         * builtins.c, decl.c: Delete traditional-mode-related code
7822         copied from the C front end but not used, or used only to
7823         permit the compiler to link.
7824
7825 2002-02-22  Tom Tromey  <tromey@redhat.com>
7826
7827         Fix for PR java/2369:
7828         * jvspec.c (verify_class_name): New function.
7829         (lang_specific_driver): Call it.
7830         (JAVA_START_CHAR_P): New macro.
7831         (JAVA_PART_CHAR_P): Likewise.
7832
7833 2002-02-22  Per Bothner  <per@bothner.com>
7834
7835         * class.c:  Change vtable to be more compatible with g++ v3 abi.
7836         (get_dispatch_table):  Prepend offset-to-top (always 0) and
7837         type_info pointer (currently unimplemented hence NULL) to vtable.
7838         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
7839         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
7840         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
7841         (build_dtable_decl):  Add declarations for new fields.
7842
7843 2002-02-20  Per Bothner  <per@bothner.com>
7844
7845         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
7846         to finit$ (otherwise generate_bytecode_insns drops it). However, we
7847         don't need to set it on the COMPOUND_EXPR - the caller does that.
7848
7849 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7850
7851         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
7852         `--CLASSPATH' becomes `--classpath.'
7853         * gjavah.c: Likewise.
7854         * jcf-dump.c: Likewise.
7855         * lang-options.h: Likewise.
7856         * lang.c: Likewise.
7857         * jcf-path.c: Updated comment.
7858         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
7859         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
7860         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
7861         (jcf_path_CLASSPATH_arg): Ditto.
7862         (classpath_u): Updated leading comment.
7863
7864 2002-02-20  Per Bothner  <per@bothner.com>
7865
7866         * builtins.c (check_for_builtin):  New function.
7867         (build_call_or_builtin):  Remove.
7868         * java-tree.h:  Update accordingly.
7869         * expr.c (expand_invoke):  Use build + check_for_builtin instead
7870         of build_call_or_builtin.
7871         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
7872         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
7873         flag (which had caused jcf-write to incorrectly emit invokevirtual).
7874
7875 2002-02-17  Tom Tromey  <tromey@redhat.com>
7876
7877         * java-tree.h (TYPE_STRICTFP): New macro.
7878         (struct lang_type) [strictfp]: New field.
7879         (CLASS_STRICTFP): New macro.
7880         (METHOD_STRICTFP): New macro.
7881         (struct lang_decl) [strictfp]: New field.
7882         * parse.y (method_header): Disallow strictfp constructor or
7883         abstract method.
7884         (STRICT_TK): Move before MODIFIER_TK.
7885         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
7886         (METHOD_MODIFIERS): Likewise.
7887         (INTERFACE_MODIFIERS): Likewise.
7888         * jcf-write.c (get_access_flags): Likewise.
7889         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
7890         (add_method_1): Likewise.
7891         (get_access_flags_from_decl): Likewise.
7892         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
7893         recognize strictfp flag.
7894         * jcf.h (ACC_STRICT): New define.
7895
7896 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
7897
7898         * class.c(build_utf8_ref): Move declaration of decl_size
7899
7900 2002-02-07  Tom Tromey  <tromey@redhat.com>
7901
7902         * gcj.texi (Input Options): --CLASSPATH does not suppress system
7903         path.
7904
7905 2002-02-04  Anthony Green  <green@redhat.com>
7906
7907         * class.c (build_utf8_ref): Put UTF-8 constants into merged
7908         sections if available.
7909
7910 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7911
7912         * parse.y (java_expand_classes): Fix typo in static field loop.
7913
7914 2002-02-02  Richard Henderson  <rth@redhat.com>
7915
7916         * class.c (add_field): Mark static fields external.
7917         (build_class_ref): Remove redundant set.
7918         * parse.y (java_expand_classes): Mark static fields of classes
7919         to be compiled as local.
7920         * jcf-parse.c (parse_class_file): Likewise.
7921
7922 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7923
7924         * gcj.texi (About CNI): New node.
7925
7926 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7927
7928         PR java/5080
7929         * jcf-parse.c : Check for HAVE_LOCALE_H before using
7930         setlocale() with LC_CTYPE as a parameter.
7931         * jv-scan.c: Same.
7932
7933 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
7934
7935         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7936         Follow GNU Coding Standards for --version.
7937
7938 2002-01-28  Tom Tromey  <tromey@redhat.com>
7939
7940         * expr.c (build_jni_stub): Ensure storage for `meth' is
7941         generated.
7942         * parse.y (java_complete_expand_methods): Set
7943         current_function_decl before building JNI stub.
7944
7945 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
7946
7947         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
7948         BUILT_IN_SQRTF.
7949
7950 2002-01-22  Tom Tromey  <tromey@redhat.com>
7951
7952         * decl.c (java_init_decl_processing): Use add_predefined_file.
7953         Predefine RawData.java.
7954         (predef_filenames): Removed.
7955         (java_init_decl_processing): Don't register predef_filenames.
7956         * jcf-parse.c (add_predefined_file): New function.
7957         (predefined_filename_p): Rewrote.
7958         (predefined_filename_p): No longer static.
7959         * decl.c (java_init_decl_processing): Call initialize_builtins.
7960         * Make-lang.in (JAVA_OBJS): Added builtins.o.
7961         (java/builtins.o): New target.
7962         * builtins.c: New file.
7963         * parse.y (patch_invoke): Use build_call_or_builtin.
7964         * java-tree.h (build_call_or_builtin): Declare.
7965         (initialize_builtins): Declare.
7966         (java_set_exception_lang_code): Removed unused declaration.
7967         (PREDEF_FILENAMES_SIZE): Removed.
7968         (java_tree_index): Added JTI_PREDEF_FILENAMES.
7969         (predef_filenames): New define.
7970         (add_predefined_file): Declare.
7971         (predefined_filename_p): Declare.
7972         * expr.c (expand_invoke): Use build_call_or_builtin.
7973
7974 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7975
7976         * parse.y (patch_switch_statement): Fix format specifier.
7977
7978 2002-01-16  Tom Tromey  <tromey@redhat.com>
7979
7980         More for PR java/5365:
7981         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
7982         default.
7983         (process_file): Generate include for
7984         java.lang.UnsupportedOperationExceptions.
7985
7986 2002-01-15  Andreas Jaeger  <aj@suse.de>
7987
7988         * .cvsignore: Add man pages.
7989
7990 2002-01-15  Tom Tromey  <tromey@redhat.com>
7991
7992         Fix for PR java/5365:
7993         * gjavah.c (process_file): Turn class name into a file name.
7994
7995 2002-01-14  Matthias Klose  <doko@debian.org>
7996
7997         * gcj.texi: Fix whitespace and formatting errors in the
7998         synopsis of the man pages. Update copyright.
7999
8000 2002-01-14  Tom Tromey  <tromey@redhat.com>
8001
8002         For PR libgcj/5303:
8003         * Make-lang.in (java.install-man): Handle jv-convert man page.
8004         (java.generated-manpages): Added jv-convert.1.
8005         (java.uninstall): Remove jv-convert.1.
8006         (java.maintainer-clean): Likewise.
8007         ($(srcdir)/java/jv-convert.1): New target.
8008         * gcj.texi (Top): Link to jv-convert node.
8009         (Individual utilities): Likewise.
8010         (Invoking jv-convert): New node.
8011
8012 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
8013             Martin Kahlert  <martin.kahlert@infineon.com>
8014
8015         * jcf-parse.c (get_constant): Don't swap lo/hi for big
8016         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8017
8018 2002-01-03  Graham Stott  <grahams@redhat.com>
8019
8020         * class.c (compile_resource_file): Update copyright date.
8021         Constify filename parameter.
8022         (java-tree.h): Update copyright date.
8023         (compile_resource_file): Constify filename parameter.
8024
8025 2002-01-03  Graham Stott  <grahams@redhat.com>
8026
8027         * gcc/jcf-parse.c: Update copyright date.
8028         (yyparse): Constify resource_filename.
8029
8030 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8031
8032         * parse.y (src_parse_roots): Don't needlessly zero init.
8033
8034 2001-12-31  Tom Tromey  <tromey@redhat.com>
8035
8036         * parse.y (dump_java_tree): New function.
8037         (source_end_java_method): Call it.
8038         (end_class_declaration): Likewise.
8039         * lang.c (java_decode_option): Call dump_switch_p.
8040
8041 2001-12-28  Tom Tromey  <tromey@redhat.com>
8042
8043         * gen-table.pl: Don't process characters after \uffff.  Added
8044         comment pointing to input file.
8045
8046 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8047
8048         * gen-table.pl: Const-ify output.  Document the location of a
8049         suitable unicode input file.
8050
8051         * chartables.h: Regenerate.
8052
8053 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8054
8055         * chartables.h: Const-ify.
8056         * gjavah.c (options): Likewise.
8057         * jcf-dump.c (options): Likewise.
8058         * jv-scan.c (options): Likewise.
8059         * lex.c (java_start_char_p, java_part_char_p): Likewise.
8060         * parse.y (binop_lookup): Likewise.
8061
8062 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8063
8064         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8065         the static arrays that are output.
8066         * jvspec.c (jvgenmain_spec): Make static.
8067         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8068         * keyword.h: Regenerate.
8069         * lang.c (string_option, process_option_with_no, lang_f_options,
8070         lang_W_options): Const-ify.
8071         * lex.c (java_lex): Likewise.
8072
8073 2001-12-21  Richard Henderson  <rth@redhat.com>
8074
8075         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8076         (get_boehm_type_descriptor): ... here.  Arrange for the
8077         TREE_TYPE to get set properly.
8078
8079 2001-12-21  Richard Henderson  <rth@redhat.com>
8080
8081         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8082         only if the target requires collect2.
8083
8084         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8085
8086 2001-12-20  Tom Tromey  <tromey@redhat.com>
8087
8088         For PR java/4509:
8089         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8090         CAN_COMPLETE_NORMALLY for the node.
8091         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8092         generate code for second branch if first branch can't complete
8093         normally.
8094         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8095         the loop head if the loop body can't complete normally.
8096
8097 2001-12-20  Tom Tromey  <tromey@redhat.com>
8098
8099         For PR java/4766:
8100         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8101         case where `finally' clause can't complete normally.
8102
8103 2001-12-20  Tom Tromey  <tromey@redhat.com>
8104
8105         Fixes PR java/5057:
8106         * parse.y (analyze_clinit_body): Added this_class parameter.
8107         Check for more cases where we must keep <clinit>.
8108         (maybe_yank_clinit): Cleaned up flow control.
8109
8110 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8111
8112         * decl.c (java_init_decl_processing): Don't initialize
8113         finit_leg_identifier_node.
8114         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8115         (finit_leg_identifier_node): Remove.
8116         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8117
8118 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8119
8120         * mangle.c (mangle_member_name): Don't special-case for
8121         NO_DOLLAR_IN_LABEL.
8122         * mangle_name.c (unicode_mangling_length): Likewise.
8123         (append_unicode_mangled_name): Likewise.
8124         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8125         code.
8126
8127 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8128
8129         * expr.c (build_java_array_length_access): Don't force null pointer
8130         check unless flag_check_references is set.
8131
8132 2001-12-20  Tom Tromey  <tromey@redhat.com>
8133
8134         Fix for PR java/3417:
8135         * parse.y (patch_assignment): Added special processing for
8136         `return'.
8137         (patch_return): Don't convert booleans to integers, and don't
8138         special-case `null'.
8139
8140 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8141
8142         * config-lang.in (diff_excludes): Remove.
8143
8144 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8145
8146         * gcj.texi: Update link to GCC manual.
8147
8148 2001-12-17  Tom Tromey  <tromey@redhat.com>
8149
8150         * parse.y (link_nested_class_to_enclosing): Removed useless
8151         statement.
8152
8153 2001-12-16  Tom Tromey  <tromey@redhat.com>
8154
8155         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8156         Fixes PR java/5088.
8157
8158 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8159
8160         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8161         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8162         spelling errors.
8163
8164 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8165
8166         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8167
8168 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8169
8170         * decl.c (java_init_decl_processing): Build otable_type correctly.
8171         otable_decl is an otable_type.
8172
8173 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8174
8175         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8176         otable_type, otable_ptr_type, method_symbol_type,
8177         method_symbols_array_type, method_symbols_array_ptr_type): New
8178         field/global tree definitions.
8179         (flag_indirect_dispatch): New flag.
8180         * decl.c (java_init_decl_processing): Initialize new otable and
8181         otable_syms type nodes and decls. Add new field "index" to
8182         method_type_node.
8183         * class.c (build_method_symbols_entry): New function.
8184         (make_method_value): Set "index" to to method's vtable index for
8185         virtual methods when indirect-dispatch is not used.
8186         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8187         and set vtable_method_count to -1. Set otable and otable_syms field
8188         if indirect-dispatch is used and there was something to put in them.
8189         (build_method_symbols_entry): New function.
8190         (emit_offset_symbol_table): New function.
8191         * expr.c (get_offset_table_index): New function.
8192         (build_invokevirtual): Build array reference to otable at the index
8193         returned by get_offset_table_index, and use the result as the vtable
8194         offset.
8195         (build_invokeinterface): Similar.
8196         * jcf-parse.c (yyparse): If indirect-dispatch, call
8197         emit_offset_symbol_table at the end of compilation, after all classes
8198         have been generated.
8199         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8200         * lang.c (flag_indirect_dispatch): Define.
8201         (lang_f_options): Add indirect-dispatch flag.
8202
8203 2001-12-14  Matthias Klose  <doko@debian.org>
8204
8205         * gcj.texi: Markup for man page generation. Document missing
8206         options printed by <tool> --help.
8207         Terminate description of gij's -ms option with a dot.
8208         * Make-lang.in ($(srcdir)/java/*.1): New targets.
8209         (java.generated-manpages java.install-man, java.uninstall,
8210         java-maintainer-clean) Updated.
8211
8212 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
8213
8214         * class.c (get_dispatch_table): Fix java vtable layout
8215         for TARGET_VTABLE_USES_DESCRIPTORS.
8216         * decl.c (java_init_decl_processing): Initialize
8217         alloc_no_finalizer_node, finalize_identifier_node.
8218         * expr.c (class_has_finalize_method): New function.
8219         (expand_java_NEW): Generate calls for finalizer-free allocation.
8220         (build_invokevirtual): Fix java vtable layout for
8221         TARGET_VTABLE_USES_DESCRIPTORS.
8222         * java-tree.h (enum java_tree_index): New entries:
8223         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8224         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8225         (class_has_finalize_method): declare.
8226         (HAS_FINALIZER_P): New macro.
8227         * parse.y (patch_invoke): Generate calls for finalizer-free
8228         allocation.
8229
8230 2001-12-12  Matthias Klose  <doko@debian.org>
8231
8232         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8233         whitespace at end of line.
8234
8235 2001-12-11  Tom Tromey  <tromey@redhat.com>
8236
8237         * lex.c (java_init_lex): Define wfl_to_string as
8238         gnu.gcj.runtime.StringBuffer unless generating bytecode.
8239
8240 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
8241
8242         * class.c (make_method_value): Use null_pointer_node to
8243         represent empty exception table.
8244
8245 2001-12-10  Tom Tromey  <tromey@redhat.com>
8246
8247         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8248
8249 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
8250
8251         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8252
8253 2001-12-09  Per Bothner  <per@bothner.com>
8254
8255         * check-init.c (current_switch_has_default):  New static field.
8256         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
8257         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
8258         DEFAULT_EXPR seen, simulate a default alternative that copies state.
8259
8260 2001-12-09  Tom Tromey  <tromey@redhat.com>
8261
8262         * check-init.c (check_init): Don't allow pre- or post- increment
8263         or decrement of final variable.
8264         (final_assign_error): Minor error message rewording.
8265
8266 2001-12-08  Tom Tromey  <tromey@redhat.com>
8267
8268         * java-tree.h: Fixed typo.
8269
8270         * gjavah.c (decompile_method): Don't decompile to `return this'
8271         for static methods.
8272
8273         * gjavah.c (cxx_keywords): Re-sorted.
8274         * lex.c (cxx_keywords): Re-sorted.
8275
8276         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8277         else.
8278
8279         * gjavah.c (print_namelet): Clear subnamelets.
8280         (HANDLE_METHOD): Set `method_printed' earlier.
8281
8282 2001-12-07  Tom Tromey  <tromey@redhat.com>
8283
8284         * lang.c (lang_f_options): Added
8285         optimize-static-class-initialization.
8286         (java_decode_option): Removed special case.
8287
8288 2001-12-07  Per Bothner  <per@bothner.com>
8289
8290         * check-init.c (check_init):  Fix typo freeing memory twice.
8291
8292 2001-12-05  Per Bothner  <per@bothner.com>
8293
8294         Restore support for static class initialization optimization.
8295         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8296         * check-init.c (check_int):  At end of BLOCK handle initialization
8297         blocks, which used to be done in java_complete_expand_method but did
8298         not handle the case where check_for_initialization might allocate
8299         more than a word of bits.
8300         * decl.c (lang_make_tree):  The smic field is now a tree.
8301         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
8302         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
8303
8304         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
8305
8306         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8307         Change from a hash table to a list.
8308         (struct_lang_decl):  Change field 'smic' to match.
8309         * class.c (add_method_1):  Initialize
8310         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8311         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
8312         (java_expand_method_bodies): -here, since 'smic' is now a list.
8313         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
8314
8315         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
8316
8317         * class.c (java_hash_compare_tree_node):  Fix casts.
8318
8319 2001-12-04  Per Bothner  <per@bothner.com>
8320
8321         * check-init.c:   Handle definite unassignment to finals in addition
8322         to definite assignment.
8323         (loop_current_locals):  New field.
8324         (num_current_locals, int start_current_locals, num_current_words):
8325         Make static.
8326         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
8327         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8328         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
8329         (get_variable_decl, check_final_reassigned):  New functions.
8330         (check_init, check_bool_init):  Modify as needed for checking finals.
8331         (check_for_initialization):  Take extra parameter and return void.
8332         Do extra start-up logic to check final fields for assignment.
8333         * parse.y (check_static_final_variable_assignment_flag,
8334         reset_static_final_variable_assignment_flag, check_final_assignment,
8335         check_final_variable_local_assignment_flag,
8336         reset_final_variable_indirect_assignment_flag,
8337         reset_final_variable_global_assignment_flag):  Remove functions.
8338         (java_complete_expand_methods, outer_field_access_fix,
8339         patch_assignment): Remove no-longer used logic.
8340         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8341         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8342
8343         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8344         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8345         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8346
8347         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8348
8349         * java-tree.h (DECL FINAL):  New bit-field.
8350         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8351         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8352         (DECL_INIT_CALLS_THIS):  New macro.
8353         (struct lang_decl):  New bit-field init_calls_this.
8354         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8355         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8356         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8357         use it for both local variables and final fields.
8358         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8359         and local_final.
8360         (struct lang_type):  Remove hfv bit-field.
8361         (check_for_initialization):  Change to return void.
8362
8363         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8364         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8365         * check-init.c (final_assign_error):  New helper function.
8366         (check_final_reassigned, check_init):  Use it.
8367         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8368
8369         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8370         bit-fields to unsigned.
8371
8372 2001-12-03  Per Bothner  <per@bothner.com>
8373
8374         * parse.y (patch_binop):  Minor constant folding.
8375
8376         * parse.y (build_current_thisn):  Shorter 'buffer'.
8377
8378 2001-12-03  Per Bothner  <per@bothner.com>
8379
8380         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8381         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8382         * jcf-write.c (generate_bytecode_insns):  Remove support for
8383         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8384         * check-init.c (check_init):  Likewise.
8385
8386 2001-12-03  Per Bothner  <per@bothner.com>
8387
8388         * verify.c (subroutine_nesting):  New function.
8389         (verify_jvm_instructions):  Use it to fix logic for checking that
8390         we're done with the current subroutine.
8391
8392         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8393         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8394
8395 2001-12-03  Per Bothner  <per@bothner.com>
8396
8397         * jcf.h:  Fix obvious typo in comment.
8398         * typeck.c (build_null_signature):  Add comment.
8399
8400 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8401
8402         * expr.c: Remove leading capital from diagnostic messages, as
8403         per GNU coding standards.
8404         * jcf-io.c: Similarly.
8405         * jcf-parse.c: Similarly.
8406         * jv-scan.c: Similarly.
8407         * jvspec.c: Similarly.
8408         * mangle.c: Similarly.
8409
8410 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8411             Alexandre Petit-Bianco  <apbianco@redhat.com>
8412
8413         * expr.c (build_java_arrayaccess): Call save_expr on array for
8414         correct evaluation order, modified comment, fixed indentation.
8415         * parse.y: (patch_assignment): Correctly extract the array base
8416         from the tree generate by build_java_arrayaccess, added comments.
8417         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8418         Fixes PR java/3096, PR java/3803, PR java/3965.
8419
8420 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8421
8422         * expr.c (expand_byte_code): Remove trailing periods from messages.
8423         * jcf-parse.c (load_class, jcf_parse): Similarly.
8424         * jcf-write.c (generate_classfile): Similarly.
8425         * lex.c (java_lex): Similarly.
8426
8427 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8428
8429         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8430
8431 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8432
8433         * Make-lang.in (java.generated-manpages): New dummy target.
8434
8435 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8436
8437         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8438         ASM_FINAL_SPEC.
8439         (lang_specific_pre_link): Use set_input to set input_filename.
8440         Append `main' here.
8441         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8442         (main): Fix definition.
8443         Strip `main' from classname.
8444         Fixes PR java/227.
8445
8446 2001-11-18  Roger Sayle <roger@eyesopen.com>
8447
8448         * parse.h (java_expand_switch): Remove old prototype.
8449
8450 2001-11-18  Tom Tromey  <tromey@redhat.com>
8451
8452         Fix for PR java/1401:
8453         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8454         arg0 is null.
8455         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8456         correctly.
8457
8458 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8459
8460         * lang.c (finish_parse): Rename to java_finish.
8461         (LANG_HOOKS_FINISH, java_finish): New.
8462
8463 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8464
8465         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8466         * java-tree.h: New prototype.
8467         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8468
8469 2001-11-13  Tom Tromey  <tromey@redhat.com>
8470
8471         * gjavah.c (method_signature): New global.
8472         (HANDLE_METHOD): Set it.
8473         (decompile_return_statement): New function.
8474         (decompile_method): Use it.
8475         (print_method_info): Removed `synth' argument.
8476
8477 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8478
8479         * java-tree.h (java_set_yydebug): New.
8480         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8481         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8482         (print_lang_decl, print_lang_type, print_lang_identifier,
8483         print_lang_statistics, lang_print_xnode): Remove.
8484
8485 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8486
8487         * jcf-parse.c (init_lex): Remove.
8488         * lang.c (language_string, lang_identify): Remove.
8489         (struct lang_hooks): Constify.
8490         (LANG_HOOKS_NAME): Override.
8491         (init_parse): Update.
8492
8493 2001-11-08  Andreas Franck  <afranck@gmx.de>
8494
8495         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8496         program_transform_name the way suggested by autoconf.
8497         (java.install-common): Also transform auxiliary program names with
8498         program_transform_name.
8499
8500 2001-11-08  Tom Tromey  <tromey@cygnus.com>
8501
8502         * parse.y (trap_overflow_corner_case): New rule.
8503         (unary_expression): Use it.
8504         * lex.c (java_init_lex): Don't set minus_seen.
8505         (yylex): Don't use minus_seen.  Communicate overflow to parser for
8506         it to handle.
8507         (error_if_numeric_overflow): New function.
8508         * parse.h (minus_seen): Removed field.
8509         (JAVA_RADIX10_FLAG): New define.
8510
8511 2001-11-07  Tom Tromey  <tromey@redhat.com>
8512
8513         Patch for PR java/1414:
8514         * parse.y (case_label_list): New global.
8515         (goal): Register case_label_list with GC.
8516         (java_complete_lhs): Save new case on case_label_list.
8517         (patch_switch_statement): Check for duplicate case labels.
8518
8519 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8520
8521         * parse.y (patch_assignment): Removed unused third argument.
8522         (java_complete_lhs): Removed unused third argument to patch_assignment.
8523
8524 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8525
8526         * lang.c: Include langhooks-def.h.
8527         * Make-lang.in: Update.
8528
8529 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8530
8531         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8532
8533 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8534
8535         * mangle.c (find_compression_record_match): Don't match compression
8536         records for package name elements unless they occur at the start of
8537         the name. Fix for PR java/4717.
8538
8539 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8540
8541         * expr.c (expand_java_field_op): Don't special-case references to
8542         java.lang.PRIMTYPE.TYPE.
8543         (build_primtype_type_ref): Removed.
8544         * java-tree.h (build_primtype_type_ref): Remove prototype.
8545         * parse.y (maybe_build_primttype_type_ref): Removed.
8546         (complete_function_arguments): Don't special-case references to
8547         java.lang.PRIMTYPE.TYPE.
8548         (patch_assignment): Likewise.
8549         (array_constructor_check_entry): Likewise.
8550
8551 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8552
8553         * mangle.c (static tree compression_table): Fixed leading comment.
8554         * parse.h (struct parser_ctxt): Fixed field comment.
8555         * parse.y (check_pkg_class_access): New prototype, fixed leading
8556         comment, new parameter used to emit error only if passed as true.
8557         (parse_check_super): Pass extra argument to check_pkg_class_access.
8558         (do_resolve_class): Likewise.
8559         (process_imports): Likewise.
8560         (read_import_dir): Fixed indentation.
8561         (find_in_imports_on_demand): New local class_type_name. Local
8562         node_to_use deleted. while loop changed into for loop. Report
8563         multiple definition only for accessible classes. Improved error
8564         message.
8565         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8566         assigned to parameter list, fixed indentation. while loop changed
8567         into for loop, restore TREE_CHAIN on local `tem' before the next
8568         iteration.
8569
8570 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8571
8572         * lang.c (lang_get_alias_set): Deleted.
8573
8574 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8575
8576         * gjavah.c (jni_print_char): Fix thinko in last change.
8577
8578         * gjavah.c (jni_print_char, decode_signature_piece): Use
8579         safe-ctype macros and/or fold extra calls into fewer ones.
8580         * lex.c (java_read_unicode, java_lex): Likewise.
8581         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8582         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8583         * mangle_name.c (append_unicode_mangled_name,
8584         unicode_mangling_length): Likewise.
8585
8586 2001-10-17  Richard Henderson  <rth@redhat.com>
8587
8588         * Make-lang.in (java/lang.o): Depend on langhooks.h.
8589
8590 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8591
8592         * lang.c (langhooks.h): Included.
8593         (LANG_HOOKS_INIT): Redefined.
8594         (LANG_HOOKS_INIT_OPTIONS): Likewise.
8595         (LANG_HOOKS_DECODE_OPTION): Likewise.
8596         (struct lang_hooks lang_hooks): New initialization.
8597
8598 2001-10-11  Per Bothner  <per@bothner.com>
8599
8600         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
8601         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8602         The former is simpler, and jcf-write.c handles it better.
8603         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
8604         or WITH_CLEANUP_EXPR.
8605         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
8606         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8607
8608         * parse.y (patch_if_else_statement):  If the condition is constant,
8609         optimize away the test.
8610
8611 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8612
8613         * parse.y (patch_cast): Call patch_string on the first operand of
8614         the incoming node, update it if necessary. Fixes PR java/4510.
8615
8616 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8617
8618         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8619         when name qualifier matches a package name.
8620
8621 2001-10-08  Tom Tromey  <tromey@redhat.com>
8622
8623         Fix for PR java/4489:
8624         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8625         force a new label when computing `body_block'.
8626
8627 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8628
8629         * jcf-io.c (format_uint): Const-ify.
8630         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8631         * lex.c (java_get_line_col): Likewise.
8632         * parse.y (build_incdec): Likewise.
8633
8634 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8635
8636         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8637         a NULL enclosing context if appropriate. Fixes PR java/4466.
8638
8639 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8640
8641         * parse.y (patch_assignment): Use lvalue's original TYPE when
8642         building the final COMPOUND_EXPR.
8643         (try_reference_assignconv): Fixed leading comment.
8644
8645 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8646
8647         * parse.y (check_final_variable_indirect_assignment): For
8648         COMPOUND_EXPR, return only if finals were found initialized
8649         properly, if not, keep on checking.
8650         (check_final_variable_global_assignment_flag): New local
8651         error_found, set when appropriate and used to decide whether to
8652         report uninitialized finals. Fixed typo in comment.
8653
8654 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8655
8656         * decl.c (init_decl_processing): Fixed typo in predef_filenames
8657         last three initializations. Fixes PR java/4360.
8658
8659 2001-09-21  Richard Henderson  <rth@redhat.com>
8660
8661         * class.c (get_dispatch_table): Handle function descriptors.
8662         (build_dtable_decl): Likewise.
8663         * expr.c (build_invokevirtual): Likewise.
8664
8665 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8666
8667         * parse.y (patch_method_invocation): Build class initialization
8668         when static finals are used to qualify method invocation.
8669         Fixes PR java/4366.
8670
8671 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
8672
8673         * parse.h: (WFL_STRIP_BRACKET): Re-written using
8674         build_type_name_from_array_name.
8675         (STRING_STRIP_BRACKETS): New macro.
8676         * parse.y (build_type_name_from_array_name): New function.
8677         (array_creation_expression:): Accumulate []s instead of [s.
8678         (cast_expression:): Accumulate []s instead of [s after cast type
8679         name.
8680         (build_array_from_name): Local string deleted, use
8681         build_type_name_from_array_name.
8682         (build_unresolved_array_type): Accumulate []s instead of [s after
8683         type name.
8684         (register_fields): Fixed comment.
8685         (resolve_class): Local name, base deleted, new locals tname and
8686         array_dims. Use build_type_name_from_array_name. Use array_dims to
8687         build array type.
8688         (purify_type_name): Use STRING_STRIP_BRACKETS.
8689
8690 2001-09-18  Andreas Jaeger  <aj@suse.de>
8691
8692         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8693         * jv-scan.c: Likewise.
8694
8695 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8696
8697         * parse.y (patch_method_invocation): Inner class creation context
8698         check not enforced within constructors. Fixes PR java/1873.
8699
8700 2001-09-16  Tom Tromey  <tromey@redhat.com>
8701
8702         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8703         NOTE_PUSH for single-case push.  Fixes PR java/4189.
8704
8705 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8706
8707         * java-tree.h (TYPE_IMPORT_LIST): New macro.
8708         (TYPE_IMPORT_DEMAND_LIST): Likewise.
8709         (struct lang_type): New fields import_list and import_demand_list.
8710         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
8711         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
8712         (do_resolve_class): New local saved_enclosing_type, initialized,
8713         passed as parameter to find_in_imports and find_in_imports_on_demand.
8714         (find_in_imports): Added paramater enclosing_type, use its
8715         TYPE_IMPORT_LIST when applicable.
8716         (find_in_imports_on_demand): Added parameter enclosing_type, use
8717         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
8718         declaration and initialization.
8719         (fold_constant_for_init): Switch/restore current_class to the
8720         appropriate context.
8721
8722 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
8723
8724         * verify.c (verify_jvm_instructions): Fix typo.
8725
8726 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8727
8728         * expr.c (expand_invoke): Const-ification.
8729         * parse.y (patch_method_invocation): Likewise.
8730
8731 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8732
8733         * gjavah.c (cxx_keywords): Const-ification.
8734         * keyword.gperf (java_keyword): Likewise.
8735         * lang.c (java_tree_code_name): Likewise.
8736         * lex.c (cxx_keywords): Likewise.
8737         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
8738
8739 2001-09-11  Richard Henderson  <rth@redhat.com>
8740
8741         * parse.h (ctxp_for_generation): Mark extern.
8742
8743 2001-09-10  Richard Henderson  <rth@redhat.com>
8744
8745         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8746
8747 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8748
8749         * typeck.c (java_array_type_length, build_prim_array_type):
8750         Represent empty arrays by NULL index.
8751
8752 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
8753
8754         * java-tree.h (compile_resource_file): Grouped with other prototypes.
8755         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8756
8757 2001-09-06  Anthony Green  <green@redhat.com>
8758
8759         * class.c (O_BINARY): Define if necessary.
8760         (registerResource_libfunc): Declare.
8761         (init_class_processing): Initilize registerResource_libfunc.
8762         (compile_resource_file): New function.
8763         * java-tree.h (resource_name): Declare.
8764         (compile_resource_file): Declare.
8765         * jcf-parse.c (yyparse): Handle compiling java resource files.
8766         * lang.c (java_decode_option): Handle -fcompile-resource option.
8767         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
8768         resource files.
8769         * gcj.texi (Code Generation): Add documentation for -R flag.
8770
8771 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
8772
8773         * jcf-write.c (generate_classfile): Issue an error in case of
8774         field/initial value mismatch.
8775         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
8776         being initialized and we're generating bytecode.
8777         (java_complete_lhs): In MODIFY_EXPR section: added comments,
8778         set DECL_INITIAL properly when appropriate.
8779         Fixes PR java/4230
8780         Fixes PR java/4204
8781
8782 2001-09-01  Per Bothner  <per@bothner.com>
8783
8784         * parse.y (maybe_yank_clinit):  A field without an initializer is not
8785         relevant.  All initializers except static final and constant require
8786         <clinit>, regardless of flag_emit_class_files.
8787
8788 2001-08-31  Per Bothner  <per@bothner.com>
8789
8790         * class.c (set_constant_value):  When not emitting class files, then a
8791         String ConstantValue is a utf8const_ptr_type.
8792
8793 2001-08-30  Per Bothner  <per@bothner.com>
8794
8795         * jcf-write.c (generate_classfile):  Check that field is primitive
8796         or string before emitting ConstantValue attribute.
8797
8798 2001-08-30  Per Bothner  <per@bothner.com>
8799
8800         * parse.y (resolve_qualified_expression_name):  If creating a
8801         COMPOUND_EXPR, set it's type correctly.
8802
8803 2001-08-30  Per Bothner  <per@bothner.com>
8804
8805         * jcf-io.c (open_class):  Set filename field.
8806
8807         * jcf-parse,c (parse_class_file):  Set current_function_decl
8808         for better error message when Code attribute is missing.
8809
8810         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
8811         better diagnostics, especially for constructors.
8812
8813 2001-08-30  Per Bothner  <per@bothner.com>
8814
8815         * jcf-write.c (generate_classfile):  Don't write ConstantValue
8816         attribute if field is not final, for compatibility with jdk.
8817
8818         * jcf-write.c (generate_classfile):  Convert ConstantValue values
8819         to correct type.  Work-around for front-end bug.
8820         * class.c (set_constant_value):  Error if constant has wrong type.
8821
8822 2001-08-30  Per Bothner  <per@bothner.com>
8823
8824         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
8825         "Double" are printed at verbosity 1.
8826
8827         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
8828
8829         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
8830
8831 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
8832
8833         * parse.y (patch_assignment): Don't verify final re-assignment here.
8834         (java_complete_lhs): Verify assignments to finals calling
8835         patch_assignment. Verify re-assignments to finals before calling
8836         patch_assignment.
8837
8838 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
8839
8840         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
8841         Fixes PR java/1413
8842
8843 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8844
8845         * lex.c (java_lex): new local found_hex_digits. Set and then used
8846         in test to reject invalid hexadecimal numbers.
8847         * parse.y (java_complete_tree): Prevent unwanted cast with
8848         initialized floating point finals.
8849         (patch_binop): Emit a warning when detecting a division by zero,
8850         mark result not constant, don't simplify non integer division.
8851
8852 2001-08-28  Per Bothner  <per@bothner.com>
8853
8854         * jcf-write.c  (generate_bytecode_insns):  For increments and
8855         decrements just recurse to push constant.  Improvement on Mark's patch.
8856
8857 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
8858
8859         * jcf-write.c (generate_bytecode_insns): Generate an integer to
8860         real conversion for increments and decrements of reals.
8861
8862 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8863
8864         * parse.y (resolve_qualified_expression_name): Handle unresolved
8865         qualified expressions, prevent numerical qualifiers, fixed typo.
8866         Fixes PR java/4141
8867
8868 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8869
8870         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
8871         don't report anything but deprecated class when marked so. Handle
8872         VAR_DECL.
8873         (patch_method_invocation): Check deprecation on methods and types.
8874         (patch_binop): code becomes an enum tree_code, added default: to
8875         switch to handle that. Detect division by zero, try to fold and
8876         return before using a subroutine.
8877
8878 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
8879
8880         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
8881         file smaller than 4 bytes.
8882         * parse.y (check_inner_circular_reference): New function.
8883         (check_circular_reference): Likewise.
8884         (array_initializer:): Accept {,}.
8885         (java_check_circular_reference): Rewritten using
8886         check_circular_reference and check_inner_circular_reference.
8887         (java_complete_expand_method): Unconditionally save and restore
8888         the unpurged exception list.
8889         (build_dot_class_method_invocation): Unmangle signature parameter.
8890
8891 2001-08-21  Tom Tromey  <tromey@redhat.com>
8892
8893         * decl.c (init_decl_processing): Add `throws' field to method
8894         descriptor.
8895         * class.c (make_method_value): Compute `throws' field for method.
8896
8897 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8898
8899         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
8900         circularity is detected.
8901         (ctors_unchecked_throws_clause_p): Fixed leading comment.
8902
8903 2001-08-17  Richard Henderson  <rth@redhat.com>
8904
8905         * class.c (emit_register_classes): Add align parameter to
8906         call to assemble_integer.
8907
8908 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
8909
8910         * jcf-parse.c (load_class): New locals saved and class_loaded. If
8911         loading a class_or_name fails, try considering an innerclass name
8912         and load the enclosing context.
8913         * parse.y (resolve_inner_class): New function.
8914         (find_as_inner_class): Added leading comment.
8915         (register_incomplete_type): Keep the current context as enclosing
8916         context for JDEP_FIELD dependencies.
8917         (do_resolve_class): Locals new_class_decl and super initialized to
8918         NULL. Call resolve_inner_class, explore the enclosing context
8919         superclass if necessary.
8920         Fixes PR java/4007
8921
8922 2001-08-16  Tom Tromey  <tromey@redhat.com>
8923
8924         * jcf-dump.c (main): Updated for change to jcf_path_seal.
8925         * gjavah.c (main): Updated for change to jcf_path_seal.
8926         * lang.c (version_flag): New global.
8927         (java_decode_option): Recognize `-version'.
8928         (java_init): Update for change to jcf_path_seal.
8929         * jcf.h (jcf_path_seal): Added `print' argument.
8930         * jcf-path.c (jcf_path_seal): Added `print' argument.
8931
8932 2001-08-13  Zack Weinberg  <zackw@panix.com>
8933
8934         * Make-lang.in (java/decl.o): Update dependencies.
8935         * decl.c: Include libfuncs.h, don't include toplev.h.
8936
8937 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8938
8939         * decl.c (init_decl_processing): exception_type_node,
8940         class_not_found_type_node, and no_class_def_found_type_node
8941         initialized. predef_filenames augmented accordingly.
8942         instinit_identifier_node initialized.
8943         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
8944         * java-tree.h (enum java_tree_index): New entries
8945         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
8946         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
8947         (exception_type_node): New macro.
8948         (class_not_found_type_node): Likewise.
8949         (no_class_def_found_type_node): Likewise.
8950         (instinit_identifier_node): Likewise.
8951         (PREDEF_FILENAMES_SIZE): Adjusted.
8952         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
8953         (struct lang_type): Fixed typo in bitfield name.
8954         (DECL_INSTINIT_P): New macro.
8955         (ID_INSTINIT_P): Likewise.
8956         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
8957         attribute.
8958         * parse.y (encapsulate_with_try_catch): New function.
8959         (generate_instinit): Likewise.
8960         (build_instinit_invocation): Likewise.
8961         (ctors_unchecked_throws_clause_p): Likewise.
8962         (add_instance_initializer): Deleted.
8963         (build_instance_initializer): Likewise.
8964         (in_instance_initializer): Likewise.
8965         (check_method_redefinition): instinit$ not to be verified.
8966         (java_complete_expand_methods): Generate instinit$, simplified code.
8967         (build_dot_class_method): Eliminated unnecessary locals. Use
8968         encapsulate_with_try_catch, removed unnecessary code.
8969         (fix_constructors): New local iii. Use build_instinit_invocation.
8970         (patch_method_invocation): Added comment.
8971         (maybe_use_access_method): Don't consider instinit$.
8972         (find_applicable_accessible_methods_list): Shorten the search for
8973         instinit$ too.
8974         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
8975         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
8976         (patch_throw_statement): Likewise. Fixed typo.
8977
8978 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
8979
8980         Revert:
8981         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8982         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8983         ASM_FINAL_SPEC.
8984         (lang_specific_pre_link): Use set_input to set input_filename.
8985         Append `main' here.
8986         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8987         (main): Fix definition.
8988         Strip `main' from classname.
8989         Fixes PR java/227.
8990
8991 2001-08-11  Zack Weinberg  <zackw@panix.com>
8992
8993         * lex.h: Don't include setjmp.h.  Don't define
8994         SET_FLOAT_HANDLER or prototype set_float_handler.
8995
8996 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8997
8998         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
8999         `poplevel' in the right order.
9000
9001 2001-08-09  Richard Henderson  <rth@redhat.com>
9002
9003         * Make-lang.in (class.o): Depend on TARGET_H.
9004         * class.c (emit_register_classes): Use target hooks instead of
9005         assemble_constructor and assemble_destructor.
9006
9007 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
9008
9009         * check-init.c (flags.h): Include
9010         (check_init): Don't report uninitialized static class
9011         initialization flags, don't free bit index when doing static class
9012         initialization optimization.
9013         (check_for_initialization): Return type changed to `unsigned int.'
9014         (attach_initialized_static_class): New function.
9015         * class.c (add_method_1): Create the initialized static class
9016         table if necessary.
9017         (finish_class): Always emit deferred inline methods.
9018         * decl.c (emit_init_test_initialization): Moved to expr.c
9019         (complete_start_java_method): Don't traverse
9020         DECL_FUNCTION_INIT_TEST_TABLE.
9021         (lang_mark_tree): Mark hash tables in function decls.
9022         * expr.c (emit_init_test_initialization): Moved from decl.c.
9023         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9024         initialization flag, set DECL_CONTEXT and
9025         LOCAL_CLASS_INITIALIZATION_FLAG.
9026         (java_lang_expand_expr): Emit initialization code for static class
9027         initialized flags when entering block, if necessary.
9028         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9029         * java-tree.h (flag_optimize_sci): New global variable declaration.
9030         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9031         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9032         (LOCAL_FINAL_P): Fixed typo in comment.
9033         (FINAL_VARIABLE_P): Likewise.
9034         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9035         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9036         (struct lang_decl): New fields `ict', `smic' and `cif.'
9037         (check_for_initialization): New returned value for global.
9038         (attach_initialized_static_class): New global function.
9039         (STATIC_CLASS_INIT_OPT_P): New macro.
9040         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9041         * lang.c (java_decode_option): Handle
9042         `-fno-optimize-static-class-initialization'
9043         * parse.y (start_complete_expand_method): New function.
9044         (java_expand_method_bodies): Likewise.
9045         (attach_init_test_initialization_flags): Likewise.
9046         (adjust_init_test_initialization): Likewise.
9047         (emit_test_initialization): Likewise.
9048         (java_complete_expand_methods): Nullify abstract and native method
9049         bodies.
9050         (java_complete_expand_method): New locals `fbody', `block_body'
9051         and `exception_copy.' Reorganized: directly return on empty method
9052         bodies, call `start_complete_expand_method', remember definitely
9053         initialized static class in function, don't expand method bodies.
9054         (java_expand_classes): Call `java_expand_method_bodies' before
9055         `finish_class' when compiling to native.
9056         (resolve_expression_name): Use `orig' after building outer class
9057         field access.
9058         (patch_invoke): Remember static method invocations.
9059
9060 2001-08-06  Richard Henderson  <rth@redhat.com>
9061
9062         * class.c (emit_register_classes): Pass a symbol_ref and priority
9063         to assemble_constructor.
9064
9065 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
9066
9067         * java-tree.h (all_class_filename): New macro.
9068         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9069         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9070         newly created IDENTIFIER_NODE to `all_class_filename.'
9071
9072 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
9073
9074         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9075         Use ggc_add_tree_root to register roots.
9076
9077 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9078
9079         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9080         second operand calling check_init.
9081         * decl.c (complete_start_java_method): Swaped second and third
9082         arguments while creating WITH_CLEANUP_EXPR node.
9083         * jcf-write.c (generate_bytecode_insns): Use second operand
9084         instead of third when handling WITH_CLEANUP_EXPR.
9085         * parse.y (java_complete_lhs): Expand second operand of
9086         WITH_CLEANUP_EXPR nodes.
9087         (patch_synchronized_statement): Swaped second and third arguments
9088         while creating WITH_CLEANUP_EXPR node.
9089
9090 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9091
9092         * parse.y (create_interface): Avoid cyclic inheritance report when
9093         syntax error encountered during class definition.
9094         Fixes PR java/2956
9095
9096 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9097
9098         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9099         ASM_FINAL_SPEC.
9100         (lang_specific_pre_link): Use set_input to set input_filename.
9101         Append `main' here.
9102         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9103         (main): Fix definition.
9104         Strip `main' from classname.
9105         Fixes PR java/227.
9106
9107 2001-07-18  Tom Tromey  <tromey@redhat.com>
9108
9109         For PR java/2812:
9110         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9111         * lex.c (java_new_lexer): Use ICONV_CONST.
9112         (java_read_char): Likewise.
9113         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9114         (jv-scan$(exeext)): Likewise.
9115
9116 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9117
9118         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9119         * parse.y (check_class_interface_creation): Allow `private' if the
9120         enclosing is not an interface.
9121         (create_interface): Interface tagged public if the enclosing
9122         context is an interface.
9123         (create_class): Class tagged public if the enclosing context
9124         is an interface.
9125         Fixes PR java/2959
9126
9127 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9128
9129         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9130         Fixes PR java/2665
9131
9132 2001-07-14  Tim Josling  <tej@melbpc.org.au>
9133
9134         * check-init.c (check_init): Remove references to EXPON_EXPR.
9135
9136 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9137
9138         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9139         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9140         Fixes PR java/3602
9141
9142 2001-07-13  Tom Tromey  <tromey@redhat.com>
9143
9144         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9145         invocation.
9146
9147 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9148
9149         * parse.y (patch_method_invocation): Don't override primary if one
9150         is already provided, but let this$<n> be built. Fixed comment.
9151
9152 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9153
9154         * parse.y (empty_statement:): Report empty statement error only
9155         when found at class declaration level.
9156         Fixes PR java/3635
9157
9158 2001-07-12  Tom Tromey  <tromey@redhat.com>
9159
9160         * expr.c (expand_load_internal): New function.
9161         (LOAD_INTERNAL): Use it.
9162
9163 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
9164
9165         * parse.y (verify_constructor_super): Compare anonymous class ctor
9166         args with `valid_method_invocation_conversion_p.'
9167         Fixes PR java/3285
9168
9169 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9170
9171         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9172         `-fsyntax-only.' Fixes PR java/3248
9173
9174 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9175
9176         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9177
9178 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9179
9180         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9181         current function is static. Fixes PR java/1970
9182
9183 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9184
9185         * parse.y (patch_method_invocation): Add enclosing context to ctor
9186         calls if necessary. Fixes PR java/2953
9187
9188 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9189
9190         * parse.y (resolve_package): Abort if qualified expression member
9191         isn't right.
9192         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9193         Fixes PR java/1391
9194
9195 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
9196
9197         * verify.c: Don't use // comments.
9198
9199 2001-07-05  Tom Tromey  <tromey@redhat.com>
9200
9201         * lang.c (flag_assume_compiled): Removed.
9202         * java-tree.h (flag_assume_compiled): Removed.
9203         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9204         -fhash-synchronization, -fuse-divide-subroutine,
9205         -fcheck-references, -femit-class-file, -femit-class-files,
9206         -fassume-compiled.  Updated --encoding information.  Changed
9207         -foutput-class-dir to `-d'.
9208
9209 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
9210
9211         * jcf-parse.c (parse_class_file): Add lineno parameter to
9212         debug_start_source_file call.
9213
9214 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9215
9216         * gcj.texi: Use gpl.texi.
9217         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9218         dependencies and use doc/include in search path.
9219
9220 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
9221
9222         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9223         `this'.  If so, don't build instance initializers.
9224
9225 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9226
9227         * parse.y (resolve_expression_name): Improved error message for
9228         inner class cases. Fixes PR java/1958
9229
9230 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
9231
9232         * lang.c: #include diagnostic.h
9233         (lang_print_error): Add a `diagnostic_context *' parameter.
9234         (java_dummy_print): Likewise.
9235         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9236
9237 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9238
9239         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9240         * jcf.h (typedef struct JCF): New bitfield `finished.'
9241         (JCF_FINISH): Set `finished.'
9242         (JCF_ZERO): Reset `finished.'
9243         Fixes PR java/2633
9244
9245 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9246
9247         * parse.y (class_body_declaration:): Don't install empty instance
9248         initializers.
9249         Fixes PR java/1314
9250
9251 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9252
9253         * class.c (set_super_info): Call `set_class_decl_access_flags.'
9254         (set_class_decl_access_flags): New function.
9255         * java-tree.h (set_class_decl_access_flags): New prototype.
9256         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9257         (parse_class_file): New local `decl_max_locals.' Take wide types
9258         into account to compute DECL_MAX_LOCALS.
9259         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9260         imports on demand.
9261
9262 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
9263
9264         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9265
9266 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9267
9268         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9269         * parse.y (do_resolve_class): Moved comments out to leading comment
9270         section. Removed local `start', New local `_ht' and
9271         `circularity_hash.'  Record `enclosing' in hash table and search
9272         it to detect circularity.  Use `enclosing' as an argument to
9273         `lookup_cl.' Free the hash table when done.
9274
9275 2001-06-19  Tom Tromey  <tromey@redhat.com>
9276
9277         * lex.c (java_read_char): Disallow invalid and overlong
9278         sequences.  Fixes PR java/2319.
9279
9280 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
9281
9282         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9283
9284 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9285
9286         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9287         arguments accordingly.
9288
9289 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9290
9291         * gcj.texi: Move contents to just after title page.
9292
9293 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
9294
9295         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9296         builtin type.
9297         (patch_incomplete_class_ref): Build the class ref, build the class
9298         init if necessary, complete the tree.
9299         Fixes PR java/2605
9300
9301 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9302
9303         * parse.y (lookup_field_wrapper): Test `name' code.
9304         (resolve_qualified_expression_name): Test `qual_wfl' code.
9305         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9306         handle `qual_wfl' by code.
9307         (maybe_build_primttype_type_ref): Test `wfl' code.
9308
9309 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9310
9311         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9312         fdl.texi.
9313         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
9314         the dvi file in the java directory.
9315
9316 2001-05-25  Sam TH  <sam@uchicago.edu>
9317
9318         * gen-table.pl javaop.h jcf.h lex.h,
9319         parse.h: Fix header include guards.
9320
9321 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
9322
9323         * jv-scan.c (version): Update copyright year.
9324
9325 2001-05-21  Per Bothner  <per@bothner.com>
9326
9327         * jcf-parse.c (read_class):  If class is from .class or .zip file
9328         and it's already been read, don't push/pop parser context.
9329
9330 2001-05-18  Per Bothner  <per@bothner.com>
9331
9332         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9333         command line so the jvgenmain-generated main program comes first.
9334
9335 2001-05-15  Tom Tromey  <tromey@redhat.com>
9336
9337         * class.c (build_utf8_ref): Don't generate identifier based on
9338         utf8const contents.
9339
9340 2001-05-12  Richard Henderson  <rth@redhat.com>
9341
9342         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9343         * expr.c (java_lang_expand_expr): Expand it.
9344         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9345         calling build_exception_object_ref.
9346         * parse.y (catch_clause_parameter): Likewise.
9347         (build_dot_class_method): Likewise.
9348         (try_reference_assignconv): Likewise.
9349         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9350         * jcf-write.c (generate_bytecode_insns): Likewise.
9351
9352 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9353
9354         * parse.y (build_unresolved_array_type): Set
9355         EXPR_WFL_QUALIFICATION on the newly created wfl.
9356         Fixes PR java/2538. Fixes PR java/2535.
9357
9358 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9359
9360         * parse.y (fix_constructors): Removed unnecessary assignment to
9361         local. Moved assignment to `this$<n>', fixed comments and
9362         indentation.
9363         (build_wfl_wrap): Fixed indentation.
9364         Fixes PR java/2598, java/2579 and java/2658.
9365
9366 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9367
9368         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9369         check for byte swap.
9370
9371 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9372
9373         * expr.c (build_class_init): Move MODIFY_EXPR
9374         outside of COND_EXPR.  Remove variable `call'.
9375
9376 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9377
9378         * decl.c: NULL_PTR -> NULL.
9379         * jcf-write.c: Likewise.
9380
9381 2001-05-01  Tom Tromey  <tromey@redhat.com>
9382
9383         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9384         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9385         * gcj.texi: Updated copyright text.  Include fdl.texi.
9386         (Top): Link to new node.
9387
9388 2001-05-01  Per Bothner  <per@bothner.com>
9389
9390         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9391
9392 2001-05-01  Per Bothner  <per@bothner.com>
9393
9394         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9395         import_list contains the name, not the TREE_PURPOSE.
9396
9397 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9398
9399         * jcf-io.c (read_zip_member): Cast to long in comparison with
9400         signed value.
9401
9402         * jvspec.c (lang_specific_driver): Initialize variables.
9403
9404         * mangle.c (find_compression_record_match): Likewise.
9405
9406         * typeck.c (build_null_signature): Provide static prototype.  Mark
9407         parameter with ATTRIBUTE_UNUSED.
9408
9409         * verify.c (verify_jvm_instructions): Initialize variable.
9410
9411 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9412
9413         * parse.y (do_resolve_class): Check for cyclic inheritance during
9414         inner class resolution.
9415
9416 2001-04-27  Per Bothner  <per@bothner.com>
9417
9418         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9419         while iterating, since that could cause gc to lose stuff.
9420
9421 2001-04-26  Per Bothner  <per@bothner.com>
9422
9423         Fix method search wrt scope of inner classes to match JLS2.
9424         * typeck.c (build_null_signature):  New static function.
9425         (has_method):  New function.  Uses build_null_signature and lookup_do.
9426         * java-tree.h (has_method):  New declaration.
9427         * parse.y (find_applicable_accessible_methods_list):  Do not search
9428         context of inner classes here.
9429         (patch_method_invocation):  Search scope, ie. current and outer clases,
9430         for method matching simple name, to find class.
9431
9432 2001-04-26  Per Bothner  <per@bothner.com>
9433
9434         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9435         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9436
9437         * constants.c (find_methodref_with_class_index):  New function.
9438         (find_methodref_index):  Use find_methodref_with_class_index.
9439         * java-tree.h (find_methodref_with_class_index):  New declaration.
9440         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9441         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9442         If context changed from interface to class, don't use invokeinterface.
9443
9444 2001-04-25  Per Bothner  <per@bothner.com>
9445
9446         * verify.c (verify_jvm_instructions):  For field instructions,
9447         check that field index is valid.  For invoke instructions, check that
9448         method index is valid.
9449
9450 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9451
9452         * config-lang.in (target_libs): Copy from $libgcj_saved.
9453
9454 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9455
9456         * decl.c (init_decl_processing): Add new class "protectionDomain"
9457         field.
9458         * class.c (make_class_data): Set initial value for "protectionDomain".
9459
9460 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9461
9462         * jvspec.c (lang_specific_driver): Fix memory allocation
9463         deficit, by using concat in lieu of xmalloc/sprintf.
9464
9465 2001-04-20  Per Bothner  <per@bothner.com>
9466
9467         Fixes to compile multiple .class files at once.
9468         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9469         * java-tree.h (CLASS_PARSED_P):  New macro.
9470         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9471         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9472         (read_class):  Avoid some code duplication.
9473         Don't call JCF_FINISH for a .class file - might be needed later.
9474         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9475         rather than CLASS_LOADED_P, since latter implies class laid out.
9476         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9477         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9478
9479 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9480
9481         * Make-lang.in (java/boehm.o): Depend on toplev.h.
9482
9483         * boehm.c: Include toplev.h.
9484
9485 2001-04-06  Tom Tromey  <tromey@redhat.com>
9486             Alexandre Petit-Bianco  <apbianco@redhat.com>
9487
9488         Fix for PR gcj/1404 and PR gcj/2332:
9489         * parse.y (build_array_from_name): If we use the type_wfl then
9490         accumulate dimensions from the original type as well.
9491         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9492
9493 2001-04-06  Tom Tromey  <tromey@redhat.com>
9494
9495         * parse.y (analyze_clinit_body): Return true if the second operand
9496         of a METHOD_EXPR is nonzero.
9497
9498 2001-04-06  Tom Tromey  <tromey@redhat.com>
9499
9500         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9501         directory.
9502         ($(srcdir)/java/parse.c): Likewise.
9503
9504 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9505
9506         * gcj.texi: Use `which-gcj' instead of `which-g77.'
9507         (version-gcc): Initialized.
9508         (which-gcj): Likewise.
9509
9510 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9511
9512         * java-tree.h (struct lang_decl): New macro
9513         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9514         * parse.y (build_instance_initializer): New function.
9515         (add_instance_initializer): Use it.
9516         (java_fix_constructors): Set `current_class' before fix pass.
9517         (fix_constructors): Just return if already fixed. Move `super()'
9518         invocation ahead. Use `build_instance_initializer.'
9519         Fixes PR java/1315.
9520
9521 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9522
9523         * parse.y (resolve_qualified_expression_name): Pass field's
9524         DECL_CONTEXT to `not_accessible_p.'
9525         (not_accessible_p): Changed parameters order in `inherits_from_p'
9526         invocation.
9527
9528 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
9529
9530         * lang-options.h: Add flag_check_references.
9531
9532 2001-04-04  Per Bothner  <per@bothner.com>
9533
9534         * java-tree.h (CONSTANT_VALUE_P):  New macro.
9535         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
9536         * parse.y (maybe_build_class_init_for_field):  New static function.
9537         (resolve_expression_name, resolve_field_access):  Use
9538         maybe_build_class_init_for_field instead of build_class_init
9539         This does not do the init if the field is compile-time-constant.
9540         (resolve_field_access):  Simplify.
9541
9542         * parse.y (fold_constant_for_init):  Merge test into switch.
9543
9544 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
9545
9546         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9547         on gansidecl.h.
9548         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9549
9550 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
9551
9552         * expr.c (pop_type_0): Save the result of the first
9553         lang_printable_name call in a scratch buffer, so it
9554         won't be clobbered by the second call.
9555
9556 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9557
9558         * parse-scan.y (array_type:): Rewritten.
9559         (type_declaration:): `empty_statement' replaces `SC_TK.'
9560         (class_member_declaration:): `empty statement' added.
9561         (method_body:): Simplified.
9562         (static_initializer:): Likewise.
9563         (primary_no_new_array:): Use `type_literals.'
9564         (type_literals:): New rule.
9565         (dims:): Set and update `bracket_count.'
9566         Fixes PR java/1074. Fixes PR java/2412.
9567
9568 2001-03-28  Hans Boehm  <boehm@acm.org>
9569
9570         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9571         (get_boehm_type_descriptor): Set type on returned value to be a
9572         pointer length integer.
9573
9574 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9575
9576         * expr.c (pop_type_0): Call `concat' rather than building the
9577         string manually.
9578         (pop_type): Add format specifier in call to `error'.
9579
9580         * parse.y (patch_method_invocation): Avoid casting away
9581         const-ness.
9582
9583 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
9584
9585         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9586
9587 2001-03-28  Richard Henderson  <rth@redhat.com>
9588
9589         IA-64 ABI Exception Handling:
9590         * Make-lang.in (except.o): Don't depend on eh-common.h.
9591         * check-init.c (check_init): Handle EXC_PTR_EXPR.
9592         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9593         [soft_exceptioninfo_call_node]: Remove.
9594         [eh_personality_libfunc, lang_eh_runtime_type]: New.
9595         (end_java_method): No emit_handlers.
9596         * except.c (java_set_exception_lang_code): Remove.
9597         (method_init_exceptions): Don't call it.
9598         (prepare_eh_table_type): No CATCH_ALL_TYPE.
9599         (build_exception_object_ref): New.
9600         (expand_end_java_handler): Update for except.h name changes.
9601         (emit_handlers, expand_resume_after_catch): Remove.
9602         * expr.c (java_lang_expand_expr): Update for except.h name changes.
9603         (process_jvm_instruction): Use build_exception_object_ref.
9604         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9605         (soft_exceptioninfo_call_node): Remove.
9606         (build_exception_object_ref): Declare.
9607         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9608         soft_exceptioninfo_call_node.  Move processing ...
9609         [EXC_PTR_EXPR]: ... here.
9610         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9611         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9612         (source_end_java_method): No java_set_exception_lang_code or
9613         emit_handlers.
9614         (build_dot_class_method): Use build_exception_object_ref.
9615         (try_reference_assignconv): Check EXC_PTR_EXPR not
9616         soft_exceptioninfo_call_node.
9617
9618 2001-03-28  Richard Henderson  <rth@redhat.com>
9619
9620         * java-tree.h (throw_node): Define as a single member of
9621         java_global_trees instead of a separate array.
9622         (JTI_THROW_NODE): New.
9623         * decl.c (throw_node): Don't declare.
9624         (init_decl_processing): Init a scalar throw_node.
9625         Don't register it for gc.
9626         * check-init.c (check_init): Reference scalar throw_node.
9627         * expr.c (build_java_athrow): Likewise.
9628         * jcf-write.c (generate_bytecode_insns): Likewise.
9629         * parse.h (BUILD_THROW): Likewise.
9630
9631 2001-03-28  Richard Henderson  <rth@redhat.com>
9632
9633         * decl.c (end_java_method): Do not save and restore
9634         flag_non_call_exceptions.
9635         * parse.y (source_end_java_method): Likewise.
9636         * lang.c (flag_exceptions): Don't declare.
9637         (java_init_options): Set flag_non_call_exceptions.  Set
9638         flag_exceptions here ...
9639         (java_init): ... not here.
9640
9641 2001-03-27  Richard Henderson  <rth@redhat.com>
9642
9643         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9644         exceptions_via_longjmp.
9645
9646         * lang.c (flag_new_exceptions): Don't declare it.
9647         (java_init_options): Or set it.
9648
9649 2001-03-27  Richard Henderson  <rth@redhat.com>
9650
9651         * decl.c (end_java_method): Rename asynchronous_exceptions to
9652         flag_non_call_exceptions.
9653         * parse.y (source_end_java_method): Likewise.
9654
9655 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9656
9657         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9658
9659 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9660
9661         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9662
9663 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9664
9665         * parse.y (find_as_inner_class): Follow current package
9666         indications not to mistakingly load an unrelated class.
9667
9668 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9669
9670         * constants.c (PUTN): Use memcpy, not bcopy.
9671
9672         * lex.c (java_read_char): Use memmove, not bcopy.
9673
9674         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9675
9676 2001-03-23  Per Bothner  <per@bothner.com>
9677
9678         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
9679         macro for better error pin-pointing.
9680         * java-tree.h:  Fix typo in comment.
9681
9682         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
9683         Don't include jsr/goto in exception range.
9684         Check if start and end of exception range are the same (also TRY_EXPR).
9685         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
9686         However, do emit the following goto even if try_block is empty.
9687         Defer freeing exception_decl until after the finalizer, to make
9688         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
9689
9690         * parse.y (java_complete_lhs):  If the try-clause is empty, just
9691         return the finally-clause and vice versa.
9692
9693 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9694
9695         * gcj.texi (Input Options): documented the check for attribute
9696         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
9697         * java-tree.h (flag_force_classes_archive_check): Declared extern.
9698         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
9699         (jcf_parse): Check for the right classes archive if necessary.
9700         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
9701         (jcf_parse_fields): Fixed indentation.
9702         * jcf-write.c (append_gcj_attribute): New function.
9703         (generate_classfile): Compute the attribute count, invoke
9704         `append_gcj_attribute'.
9705         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
9706         turned into bit-fields. New bit-field `right_zip.'
9707         (JCF_ZERO): Set `right_zip' to zero.
9708         * lang-options.h (-fforce-classes-archive-check): Added flag.
9709         * lang.c (flag_force_classes_archive_check): New flag.
9710         (lang_f_options): New entry `force-classes-archive-check.'
9711         Fixes PR java/1213.
9712
9713 2001-02-07  Andrew Haley  <aph@redhat.com>
9714
9715         * gcj.texi (Configure-time Options): Add -fcheck-references.
9716         * expr.c (build_java_indirect_ref): New function.
9717         (java_check_reference): New function.
9718         (build_java_array_length_access): Use build_java_indirect_ref to
9719         check for null references.
9720         (build_java_arrayaccess): Likewise.
9721         (build_get_class): Likewise.
9722         (build_field_ref): Likewise.
9723         (invoke_build_dtable): Likewise.
9724         (build_invokeinterface): Likewise.
9725         * lang.c (lang_f_options): Add flag_check_references.
9726         * jvspec.c (jvgenmain_spec): Add flag_check_references.
9727         * java-tree.h (flag_check_references): New variable.
9728         * lang.c (flag_check_references): Likewise.
9729         * parse.y (patch_invoke): Use java_check_reference.
9730         (patch_assignment): Allow for extra nesting in
9731         _Jv_CheckArrayStore.
9732
9733 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
9734
9735         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9736         * lex.c (cxx_keywords): Likewise.
9737
9738 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9739
9740         * parse.y (qualify_ambiguous_name): Broaden `length'
9741         recognition. Help MODIFY_EXPR be resolved as expression names.
9742         Fixes PR java/2066. Fixes PR java/2400.
9743
9744 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
9745
9746         * gjavah.c (process_file): Mark interface definitions with
9747         "__attribute__ ((java_interface))".
9748
9749 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9750
9751         * class.c (layout_class): Fixed push_super_field's second
9752         argument. Fixes PR java/2333.
9753         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
9754         too early to lay innerclasses out.
9755
9756 2001-03-20  Tom Tromey  <tromey@redhat.com>
9757             Alexandre Petit-Bianco <apbianco@redhat.com>
9758
9759         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
9760         inside an array reference. Insertion of the array store check
9761         rewritten. Fixes PR java/2299.
9762
9763 2001-03-20  Tom Tromey  <tromey@redhat.com>
9764
9765         * lex.c (java_read_unicode): Only accept leading `u's.
9766
9767 2001-03-20  Tom Tromey  <tromey@redhat.com>
9768
9769         * jcf-parse.c (read_class): Initialize `class'.
9770
9771 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9772
9773         * jcf_parse.c (jcf_parse): Eliminate unused variable.
9774
9775 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9776
9777         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
9778         (layout_class): Likewise.
9779         (layout_class_method): Likewise.
9780         (emit_register_classes): Likewise.
9781         * decl.c (builtin_function): Likewise.
9782         (give_name_to_locals): Likewise.
9783
9784 2001-03-19  Per Bothner  <per@bothner.com>
9785
9786         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
9787         before trying to load an inner class.
9788
9789         Fixes to process to command-line .class files in two passes.
9790         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
9791         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
9792         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
9793         * class.c (is_compiled_class):  Fix for renamed flag.
9794         * parse.y (maybe_create_class_interface_decl):  Likewise.
9795         * jcf-parse.c (yyparse):  Also set if compiling .class files.
9796         * jcf-parse.c (read_class);  Read current_class.
9797         (jcf_parse):  Make static.
9798         (load_inner_classes):  New function, with code moved from jcf_parse,
9799         because we need to inner classes after the command-line files are read.
9800         (yyparse):  Set finput to NULL when it doesn't need to be closed.
9801         Reduce use of main_jcf (basically only for archive) and
9802         use finput instead of main_jcf->read_state.
9803         Inline jcf_figure_file_type into yyparse.
9804         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
9805         Defer load_inner_classes and parse_class_file to a second pass,
9806         after we've correctly mapped command-line .clas fiels to classes.
9807         (jcf_figure_file_type):  Removed.
9808         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
9809         (JCF_ZERO):  Also clear zipd field.
9810         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
9811
9812 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9813
9814         * jcf-parse.c (yyparse): Change ch from char * to char.
9815
9816 2001-03-19  Per Bothner  <per@bothner.com>
9817
9818         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
9819         Add constructed filelist-file at end, following -xjava.  Thus any .o
9820         and library files are not affected by the -xjava.  Also wrap
9821         explicit @FILE with -xjava and -xnone.
9822
9823 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
9824
9825         * class.c (build_static_field_ref): Call make_decl_rtl() after
9826         setting the DECL_EXTERNAL flag.
9827
9828 2001-03-17  Per Bothner  <per@bothner.com>
9829
9830         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
9831
9832         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
9833         when result is is needed (target is STACK_TARGET).
9834
9835         * parse.h (JDEP_SOLV):  Removed.
9836         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
9837
9838         * parse.y (incomplete_class_list): Removed.
9839         (obtain_incomplete_type): Don't use or set incomplete_class_list.
9840         It doesn't work if resolve_class changes the name of an array type
9841         that is on the list and then someone else looks for the modified name.
9842         Also, seems liable to break when compiling multiple source files at
9843         once.  So the simplest is to just remove incomplete_class_list -
9844         it is only a minor space win and it is not even clear it saves time.
9845
9846         * parse.y (resolve_class):  Remove unneeded promote_type.
9847
9848 2001-03-15  Per Bothner  <per@bothner.com>
9849
9850         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
9851         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
9852         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
9853         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
9854
9855         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
9856         * parse.y (java_expand_classes):  Likewise.
9857
9858         * parse.y (expand_start_java_method):  Was only called once and had a
9859         misleading name, so inline in caller java_complete_expand_method.
9860         (enter_a_block):  Likewise inline in enter_block and remove.
9861
9862         Remove junk from when gcc/java was created (by copying from C/C++).
9863         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
9864         (struct binding_level):  Remove fields keep, keep_if_subblocks,
9865         more_cleanups_ok, have_cleanups (which have never been used).
9866         (pushlevel, poplevel):  Remove related useless code.
9867
9868         * class.c (make_class_data):  The class_dtable_decl (i.e. the
9869         vtable for Class) should be external, except when compiling Class.
9870
9871         * jvspec.c (lang_specific_driver):  Fix -C handling.
9872         Check -save-temps to see if temp @FILE should be deleted.
9873         Follow-up to/fix for February 16 patch.
9874
9875         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
9876         (type_stack_dup):  Remove no-longer neded error check.
9877
9878 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
9879
9880         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
9881         to 'for_pointer'. If this type is for a pointer (argument) mangling,
9882         don't surround the element with 'N..E' if the type name is
9883         unqualified.
9884
9885 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9886
9887         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
9888         DECL_RTL_SET_P, etc.
9889         (make_method_value): Likewise.
9890         (get_dispatch_table): Likewise.
9891
9892         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9893
9894 2001-03-07  Tom Tromey  <tromey@redhat.com>
9895
9896         * config-lang.in (lang_requires): Define.
9897
9898 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
9899
9900         * typeck.c (convert): Check flag_unsafe_math_optimizations,
9901         not flag_fast_math.
9902
9903 2001-03-05  Per Bothner  <per@bothner.com>
9904
9905         Fix a problem where rest_of_decl_compilation applied to
9906         class_dtable_decl causes problems because it was done too early,
9907         before output file was opened.
9908         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
9909         * class.c (class_dtable_decl):  Add macro - element of class_roots.
9910         (make_class_data):  Define class_dtable_decl.
9911         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
9912
9913 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9914
9915         * java/class.c, java/decl.c, java/java-tree.h: Replace all
9916         uses of 'boolean' with 'bool'.
9917
9918 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9919
9920         * lang-specs.h: Add zero initializer for cpp_spec field to all
9921         array elements.
9922
9923 2001-02-16  Per Bothner  <per@bothner.com>
9924
9925         Handle compiling multiple input files at once, and @FILE syntax.
9926         * gcj.texi:  Updated documentation to match.
9927         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
9928         * jcf-parse.c (parse_source_file):  Split into ...
9929         (parse_source_file_1):  New function - and:
9930         (parse_source_file_2):  New function.
9931         (yyparse):  On -ffilelist-file, open and scan named file.
9932         On first pass over files, only do parse_source_file_1.
9933         A new second pass calls parse_source_file_2 for each file to compile.
9934         (init_jcf_parse):  Call init_src_parse.
9935         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
9936         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
9937         as multiple input file combined in one compilation.
9938         * lang-options.h:  Add -ffilelist-file
9939         * lang.c (flag_filelist_file):  New flag variable.
9940         (lang_f_options):  Handle -ffilelist-file.
9941         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
9942         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
9943         gclass_list - use global fields of src_parse_roots instead.
9944         * parse.y (src_parse_roots):  New array.
9945         (incomplete_class_list, gclass_list):  New macros.
9946         (push_parser_context, java_pop_parser_context,
9947         java_parser_context_resume):  Don't fiddle with deleted fields.
9948         (various):  Use incomplete_class gclass_list and global macros
9949         instead of parse_ctxt fields - the lists are global.
9950         (init_src_parse):  New function.
9951
9952 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9953
9954         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
9955
9956 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9957
9958         * parse.y (check_inner_class_access): Moved declaration of local
9959         `enclosing_decl_type' to the right location.
9960
9961 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
9962
9963         * parse.y (parser_check_super_interface): Don't call
9964         check_pkg_class_access for an inner interface.
9965         (parser_check_super): Don't call check_pkg_class_access for inner
9966         class.
9967         (do_resolve_class): Simplify enclosing type loop. Don't call
9968         check_pkg_class_access if CL and DECL are not set.
9969         (find_in_imports_on_demand): Set DECL if class_type needed to be
9970         loaded. Don't call check_pkg_class_access for an inner class.
9971         (check_inner_class_access): Rewritten to implement member access
9972         rules as per spec 6.6.1.
9973         (check_pkg_class_access): Handle the empty package correctly.
9974         (in_same_package): New function. Determine if two classes are in the
9975         same package.
9976
9977 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
9978
9979         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
9980         method into array types.
9981         * parse.y (patch_method_invocation): Bypass access check on clone call
9982         to array instance.
9983
9984 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9985
9986         * expr.c (build_instanceof): Check for arrays when trying fold to
9987         false.
9988
9989 2001-02-15  Jim Meyering  <meyering@lucent.com>
9990
9991         * Make-lang.in (java.install-common): Depend on `installdirs'.
9992         (java.install-info): Likewise.
9993
9994 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
9995
9996         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
9997
9998 2001-02-14  Tom Tromey  <tromey@redhat.com>
9999             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10000
10001         Fix for PR java/1261.
10002         * typeck.c (build_java_array_type): Add public `clone' method to
10003         arrays.
10004         * parse.y (resolve_qualified_expression_name): Use current_class
10005         when checking for inaccessibility.
10006         (patch_method_invocation): Fixed error message when accessibility
10007         denied.  Added `from_super' argument.
10008
10009 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10010
10011         * parse.y (resolve_class): Don't build a fake decl. Use the one
10012         already built.
10013         * typeck.c (build_java_array_type): Build and assign decl to array
10014         type.
10015
10016 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10017
10018         * parse.y (not_accessible_p): Changed leading comment. Added extra
10019         `where' argument. Use it to enforce protected access rules.
10020         (resolve_qualified_expression_name): Added extra argument to
10021         not_accessible_p.
10022         (patch_method_invocation): Use argument `primary' to provide
10023         not_accessible_p with an extra argument.
10024         (lookup_method_invoke): Added extra argument to not_accessible_p.
10025         (search_applicable_method_list): Likewise.
10026
10027 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10028
10029         * parse.y (resolve_qualified_expression_name): Try to resolve as
10030         an inner class access only if `decl' is a TYPE_DECL.
10031
10032 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10033
10034         * decl.c (classdollar_identifier_node): Initialize.
10035         * java-tree.h (enum java_tree_index): New entry
10036         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10037         (classdollar_identifier_node): New macro.
10038         (ID_CLASSDOLLAR_P): Likewise.
10039         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10040         (build_dot_class_method_invocation): Likewise.
10041         (find_applicable_accessible_methods_list): `class$' can't be
10042         inherited.
10043
10044 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
10045
10046         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10047
10048 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10049
10050         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10051         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10052         gone.
10053
10054 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10055
10056         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10057         outside of the `__U' sequence too.
10058         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10059         sequence too.
10060
10061 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10062
10063         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10064
10065 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10066
10067         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10068         (JVGENMAIN_OBJS): Likewise.
10069         * java-tree.h (append_gpp_mangled_name): New prototype.
10070         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10071         Removed cast calling `gcc_add_root.'
10072         * jvgenmain.c (mangle_obstack): New global, initialized.
10073         (main): Use it.
10074         (do_mangle_class): Constify local `ptr.'
10075         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10076         append_gpp_mangle_name and update `count' if necessary.
10077         Use `mangle_obstack.'
10078         * mangle.c (append_unicode_mangled_name): Removed.
10079         (append_gpp_mangled_name): Likewise.
10080         (unicode_mangling_length): Likewise.
10081         (mangle_member_name): Return type set to `void.'
10082         (mangle_field_decl): Don't append `U' in escaped names.
10083         (mangle_method_decl): Likewise.
10084         (mangle_member_name): Just use `append_gpp_mangled_name.'
10085         * mangle_name.c: New file.
10086
10087 2001-02-07  Per Bothner  <per@bothner.com>
10088
10089         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
10090
10091         * check-init.c (check_init):  Don't call done_alternative after
10092         processing loop code, as a LOOP_EXPR never terminates normally.
10093
10094 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10095
10096         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10097
10098 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10099
10100         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10101         DECLs.
10102
10103 2001-02-06  Tom Tromey  <tromey@redhat.com>
10104
10105         * lex.c (java_new_lexer): Longer error message.
10106
10107 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
10108             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10109
10110         * typeck.c (build_prim_array_type): Added leading comment.
10111         (build_java_array_type): Moved locals out of
10112         block. Always create the `data' field, fixed alignment to match
10113         C++.
10114
10115 2001-02-04  Tom Tromey  <tromey@redhat.com>
10116
10117         * expr.c (java_lang_expand_expr): Don't bother recomputing
10118         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
10119         Fixes PR java/1866.
10120
10121 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10122
10123         * parse.y (process_imports): Save the original name of the import
10124         for better error report.
10125
10126 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
10127
10128         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10129         of macros used when compiling jvspec.c.
10130         * jvspec.c (lang_specific_driver): Link with the shared
10131         libgcc by default.
10132
10133 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10134
10135         * check-init.c (check_init): Call internal_error instead of fatal.
10136         * expr.c (java_lang_expand_expr): Likewise.
10137         * jcf-parse.c (get_constant): Likewise.
10138         * mangle.c (java_mangle_decl): Likewise.
10139         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10140         (operator_string): Likewise.
10141         * check-init.c (check_init): Call abort instead of fatal.
10142         * class.c (build_class_ref): Likewise.
10143         * constants.c (write_constant_pool): Likewise.
10144         * decl.c (start_java_method): Likewise.
10145         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10146         (java_stack_dup, encode_newarray_type): Likewise.
10147         (build_java_array_length_access): Likewise.
10148         (build_java_check_indexed_type, expand_java_pushc): Likewise.
10149         (build_java_soft_divmod, build_invokeinterface): Likewise.
10150         * java-tree.h (INNER_CLASS_P): Likewise.
10151         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10152         (give_name_to_class, get_class_constant): Likewise.
10153         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10154         (find_constant_index, generate_bytecode_conditional): Likewise.
10155         (generate_bytecode_insns, perform_relocations): Likewise.
10156         * lex.c (java_unget_unicode, java_lex): Likewise.
10157         * mangle.c (mangle_type, mangle_record_type): Likewise.
10158         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10159         (finish_mangling): Likewise.
10160         * parse.h (MARK_FINAL_PARMS): Likewise.
10161         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10162         (obtain_incomplete_type, java_complete_class): Likewise.
10163         (java_check_regular_methods, java_complete_expand_method): Likewise.
10164         (cut_identifier_in_qualified, check_deprecation): Likewise.
10165         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10166         (java_complete_lhs, lookup_name_in_blocks): Likewise.
10167         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10168         * typeck.c (set_local_type, parse_signature_type): Likewise.
10169         (parse_signature_string, build_java_signature): Likewise;
10170         (set_java_signature): Likewise.
10171         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10172         * class.c (add_method): Call fatal_error instead of fatal.
10173         (build_static_field_ref): Likewise.
10174         * expr.c (build_known_method_ref, expand_invoke): Likewise.
10175         * jcf-parse.c (get_constant, jcf_parse): Likewise.
10176         * lex.c (java_new_new_lexer): Likewise.
10177         * jv-scan.c (main): Likewise.
10178         (fatal_error): Renamed from fatal.
10179         * jcf-parse.c (yyparse): Call fatal_io_error instead of
10180         pfatal_with_name.
10181         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10182         (yyparse): Likewise.
10183         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10184         * lex.c (java_get_line_col): Likewise.
10185         * jcf-parse.c (load_class): Make errors non-fatal.
10186         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10187
10188 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
10189
10190         * jvgenmain.c (class_mangling_suffix): Remove unused string.
10191         (error): Remove unused function.
10192         (main): Don't use "__attribute__ alias" on generated class symbol.
10193
10194 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10195
10196         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10197         argument.
10198         * parse.y (finish_method_declaration): Code accounting for WFLed
10199         method DECL_NAMEs deleted.
10200         (check_abstract_method_definitions): Likewise.
10201         (resolve_type_during_patch): Layout resolved type.
10202         * typeck.c (lookup_do): Removed unused local.
10203
10204 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
10205
10206         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10207         * decl.c (init_decl_processing): Use integer_minus_one_node, not
10208         integer_negative_one_node.
10209         * expr.c (build_java_binop): Likewise.
10210
10211 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
10212
10213         * zextract.c (read_zip_archive): Read file_offset before writing
10214         zipd and consequently clobbering the header contents.
10215
10216 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10217
10218         * Make-lang.in: Remove all dependencies on defaults.h.
10219         * decl.c: Don't include defaults.h.
10220         * expr.c: Likewise.
10221         * parse.y: Likewise.
10222
10223 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10224
10225         * ChangeLog (2001-01-21): Fixed typo.
10226         * class.c (layout_class_method): Code accounting for WFLed
10227         method DECL_NAMEs deleted.
10228         * constant.c (find_methodref_index): Likewise.
10229         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10230         * java-tree.h (DECL_FUNCTION_WFL): New macro.
10231         (struct lang_decl): New field `wfl'.
10232         (java_get_real_method_name): Prototype deleted.
10233         * mangle.c (mangle_method_decl): Code accounting for WFLed
10234         method DECL_NAMEs deleted.
10235         * parse.h (GET_METHOD_NAME): Macro deleted.
10236         * parse.y (reset_method_name): Deleted.
10237         (method_header): Set DECL_FUNCTION_WFL.
10238         (check_abstract_method_header): Code accounting for WFLed method
10239         DECL_NAMEs deleted.
10240         (java_get_real_method_name): Deleted.
10241         (check_method_redefinition): Code accounting for WFLed method
10242         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10243         (java_check_regular_methods): Likewise.
10244         (java_check_abstract_methods): Likewise.
10245         (java_expand_classes): Don't call `reset_method_name.'
10246         (search_applicable_method_list): Use DECL_NAMEs instead of
10247         GET_METHOD_NAME.
10248         * typeck.c (lookup_do): Code accounting for WFLed method
10249         DECL_NAMEs deleted.
10250
10251 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
10252
10253         * lex.c (java_read_char): Check for EOF from getc first.
10254
10255 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10256
10257         * class.c (layout_class): Don't lay the superclass out if it's
10258         already being laid out.
10259         * jcf-parse.c (handle_innerclass_attribute): New function.
10260         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10261         handle_innerclasses_attribute.
10262         (jcf_parse): Don't load an innerclasses if it's already being
10263         laid out.
10264         * jcf-write.c (append_innerclass_attribute_entry): Static
10265         `anonymous_name' and its initialization deleted. `ocii' and `ini'
10266         to be zero for anonymous classes.
10267
10268 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10269
10270         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10271         necessary.
10272         * jcf-parse.c (set_source_filename): Use
10273         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10274
10275 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10276
10277         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10278         gets a unique asm name.
10279
10280 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10281
10282         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10283         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10284         if necessary.
10285         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10286         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10287         * parse.y (lookup_package_type_and_set_next): Deleted.
10288         (resolve_package): Removed unnecessary code.
10289         (find_applicable_accessible_methods_list): `finit$' can't be
10290         inherited.
10291         * verify.c (pop_argument_types): Added missing prototype.
10292
10293 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
10294
10295         * config-lang.in: Disable java by default.
10296
10297 2001-01-23  Tom Tromey  <tromey@redhat.com>
10298
10299         * gcj.texi (Copying): New node.
10300         Added copyright information.
10301
10302 2001-01-21  Per Bothner  <per@bothner.com>
10303
10304         Various fixes to allow compiling a compressed .jar/.zip archive.
10305         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
10306         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
10307         (struct ZipDirectory):  New field zipf points to owning ZipFile.
10308         * jcf.h (struct ZipDirectory):  Add forward declaration.
10309         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
10310         Remove seen_in_zip and zip_offset fields.
10311         (JCF_SEEN_IN_ZIP):  New macro.
10312         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
10313         * jcf-io.c:  Change all ZipFileCache to ZipFile.
10314         (read_zip_member):  New function.
10315         (open_in_zip):  Call read_zip_member.
10316         * jcf-parse.c (find_in_current_zip):  Remove function.
10317         (read_class):  Merge in find_in_current_zip functionality.
10318         Call read_zip_member if needed.
10319         (parse_zip_file_entries):  Use read_zip_member.
10320         (process_zip_dir):  Update for removed and added JCF fields.
10321         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
10322
10323 2001-01-21  Per Bothner  <per@bothner.com>
10324
10325         Minor optimization of static ggc roots.
10326         * jcf-parse.c (parse_roots):  New static field.
10327         (current_field, current_method, current_file_list):  Replace by macros
10328         naming fields of parse_roots.
10329         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
10330         * class.c (class_roots):  New static field.
10331         (registered_class, fields_ident, info_ident, class_list):
10332         New macros naming fields of parse_roots.
10333         (build_static_field_ref):  Don't register roots here.
10334         (layout_class):  Static field list replaced by macro class_list.
10335         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10336         Initialize fields_ident and info_ident here.
10337
10338 2001-01-21  Per Bothner  <per@bothner.com>
10339
10340         * jcf-parse.c (ggc_mark_jcf):  New function.
10341         (init_jcf_parse):  Register current_jcf as ggc root.
10342
10343 2001-01-21  Per Bothner  <per@bothner.com>
10344
10345         * lang.c (put_decl_node):  Print method's name.
10346
10347 2001-01-21  Per Bothner  <per@bothner.com>
10348
10349         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10350         (verify_jvm_instructions):  Use it, for better error messages on loads.
10351
10352 2001-01-21  Per Bothner  <per@bothner.com>
10353
10354         * verify.c (merge_type_state):  Still may have to merge even if
10355         LABEL_VERIFIED (label).
10356
10357 2001-01-21  Per Bothner  <per@bothner.com>
10358
10359         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10360         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10361
10362 2001-01-19  Per Bothner  <per@bothner.com>
10363
10364         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10365         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10366
10367 2001-01-18  Per Bothner  <per@bothner.com>
10368
10369         * gcj.texi (Input Options): Mention .java files.
10370
10371 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10372
10373         * lang-options.h (-Wunsupported-jdk11): Removed.
10374         * lang.c (flag_not_overriding): Deleted.
10375         (flag_static_local_jdk1_1): Likewise.
10376         (lang_W_options): Removed "unsupported-jdk11" entry.
10377         * parse.y (java_check_methods): Removed dead code.
10378
10379 2001-01-17  Tom Tromey  <tromey@redhat.com>
10380
10381         Changes suggested by Per Bothner:
10382         * gcj.texi (Input Options): Don't mention input files.
10383         (Code Generation): Updated --main information.
10384         (Invoking jcf-dump): Mention that --javap is incomplete.
10385         From Alexandre Petit-Bianco:
10386         (Warnings): Don't mention -Wunsupported-jdk11.
10387         My stuff:
10388         (Compatibility): Mention JDK 1.2-ness of libraries.
10389         (Resources): Mention resources used when writing gcj.
10390
10391 2001-01-17  Tom Tromey  <tromey@redhat.com>
10392
10393         * gcj.texi: New file.
10394         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10395         (java.info): Depend on gcj.info.
10396         (java/gcj.dvi): New target.
10397         (java.dvi): Depend on gcj.dvi.
10398         (java.install-info): Wrote.
10399
10400 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10401
10402         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10403         having called make_decl_rtl.
10404
10405 2001-01-14  Per Bothner  <per@bothner.com>
10406
10407         Various patches to emit better messages on verification errors.
10408         * expr.c (push_type_0):  Return error indication on stack overflow,
10409         instead of callinfg fatal.
10410         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10411         (pop_type_0):  Return detailed error message (in a char** argument).
10412         (pop_type):  If pop_type_0 fails, print error message.
10413         (pop_argument_types):  Moved to verify.c.
10414         * verify.c (pop_argument_types):  Moved from expr.c.
10415         Return a (possible) error message, rather than void.
10416         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10417         (verify_jvm_instruction):  Use new macros, improving error messages.
10418         For case OPCODE_astore use object_ptr_type_node.
10419         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10420         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10421
10422         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10423         constant, return body without wrapper.  (Improves constant folding.)
10424         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10425
10426 2001-01-13  Per Bothner  <per@bothner.com>
10427
10428         * expr.c (expand_java_field_op):  Assigning to a final field outside
10429         an initializer does not violate JVM spec, so should be warning, not
10430         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10431
10432 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10433
10434         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10435         to 2001.
10436
10437 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10438
10439         * parse.y (resolve_expression_name): Permit instance variables from
10440         enclosing context in super constructor call.
10441         (resolve_qualified_expression_name): Permit enclosing class's qualified
10442         "this" in super constructor call.
10443
10444 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10445
10446         * class.c (build_utf8_ref): Remove last argument in call to
10447         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10448         (build_class_ref): Likewise.
10449         (build_static_field_ref): Likewise.
10450         (get_dispatch_table): Likewise.
10451         (layout_class_method): Likewise.
10452         (emit_register_classes): Likewise.
10453         * constants.c (build_constant_data_ref): Likewise.
10454         * decl.c (builtin_function): Likewise.
10455         (create_primitive_vtable): Likewise.
10456         * expr.c (build_known_method_def): Likewise.
10457         (build_jni_stub): Likewise.
10458         (java_lang_expand_expr): Likewise.
10459
10460 2001-01-10  Tom Tromey  <tromey@redhat.com>
10461
10462         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10463
10464 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10465
10466         * java-tree.h (lang_printable_name_wls): New prototype.
10467         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10468         rather than `current_class' to print type name. Don't prepend type
10469         names when printing constructor names.
10470         (lang_printable_name_wls): New function.
10471         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10472         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10473         * parse.y (patch_method_invocation): Message tuned for constructors.
10474         (not_accessible_p): Grant `private' access from within
10475         enclosing contexts.
10476
10477 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10478
10479         All files with updated copyright when applicable.
10480         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10481         * class.c (mangle_class_field): Function removed.
10482         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10483         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10484         (build_class_ref): Call `java_mangle_class_field' instead of
10485         `mangle_class_field.'
10486         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10487         (layout_class): Call `java_mangle_decl' instead of
10488         `mangle_static_field.'
10489         (cxx_keywords): Initialized static array moved to `lex.c.'
10490         (layout_class_method): Changed leading comment. Simplified to
10491         call `java_mangle_decl.' Local `ptr' moved in for loop body.
10492         * decl.c (lang_mark_tree): Mark field `package_list.'
10493         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10494         (struct lang_type): New field `package_list.'
10495         (unicode_mangling_length): Prototype removed.
10496         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10497         emit_unicode_mangled_name): Likewise.
10498         (cxx_keyword_p): New prototype.
10499         (java_mangle_decl, java_mangle_class_field,
10500         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10501         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10502         `build_expr_wfl.'
10503         * jvgenmain.c (main_method_prefix): Global variable removed.
10504         (main_method_suffix): Likewise.
10505         (do_mangle_classname): New function.
10506         (main): Call it. Format changed to accommodate new mangling scheme.
10507         * lex.c: (utf8_cmp): Conditionally prototyped.
10508         (cxx_keywords): Moved from class.c, conditionally defined.
10509         (utf8_cmp, cxx_keyword_p): Likewise.
10510         * mangle.c (obstack.h, ggc.h): Included.
10511         (mangle_field_decl): New function.
10512         (mangle_method_decl, mangle_type, mangle_pointer_type,
10513         mangle_array_type, mangle_record_type,
10514         find_compression_pointer_match, find_compression_array_match,
10515         find_compression_record_match,
10516         find_compression_array_template_match, set_type_package_list,
10517         entry_match_pointer_p, emit_compression_string, init_mangling,
10518         finish_mangling, compression_table_add, mangle_member_name): Likewise.
10519         (mangle_obstack): New global.
10520         (MANGLE_RAW_STRING): New macro.
10521         (unicode_mangling_length): Turned static.
10522         (append_unicode_mangled_name): Renamed from
10523         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
10524         replaces `obstack', removed from the parameter list.
10525         (append_gpp_mangled_name): Turned static. `mangle_obstack'
10526         replaces parameter `obstack', removed from the parameter list. Call
10527         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10528         (append_gpp_mangled_classtype): Removed.
10529         (compression_table, compression_next): New static variables.
10530         * parse.y (temporary_obstack): Extern declaration removed.
10531
10532 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10533
10534         * parse.y (patch_binop): Compute missing type in error situations.
10535
10536 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10537
10538         * class.c (make_class_data): Push initial value for "arrayclass".
10539         * decl.c (init_decl_processing): Add new class field "arrayclass".
10540
10541 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10542
10543         From patha@softlab.ericsson.se:
10544         * parse.y (switch_label): Use build, not build1, to construct
10545         DEFAULT_EXPR.
10546
10547 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10548
10549         * lang.c (lang_decode_option): Change -MA to -MP.
10550         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10551         Update to new prototype; do quote targets.
10552         (jcf_dependency_write): Update.
10553
10554 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
10555
10556         Shorten primitive array allocation path:
10557         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10558         to create new primitive arrays.
10559         * expr.c (build_newarray): If generating native code, call
10560         soft_newarray_node with a reference to the primitive TYPE identifier
10561         instead of type_value.
10562
10563 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
10564
10565         Fix for PRs gcj/312 and gcj/253:
10566         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10567         dest if they arn't already.
10568         * class.c (layout_class): Call maybe_layout_super_class on
10569         superinterfaces also, but only if compiling from bytecode.
10570
10571         Fix for PR gcj/373:
10572         * parse.y (create_class): Set ACC_STATIC if class is declared in an
10573         interface.
10574
10575 2000-12-15  Tom Tromey  <tromey@redhat.com>
10576
10577         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10578         set.
10579
10580 2000-12-14  Andrew Haley  <aph@redhat.com>
10581
10582         * boehm.c (mark_reference_fields): Change test to correctly detect
10583         bitmap overflow.
10584
10585 2000-12-15  Andreas Jaeger  <aj@suse.de>
10586
10587         * config-lang.in (lang_dirs): Added.
10588
10589 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10590
10591         * parse.y (end_artificial_method_body): Fixed undefined behavior.
10592         Credits go to rth for finding it.
10593
10594 2000-12-13  Mike Stump  <mrs@wrs.com>
10595
10596         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10597
10598 2000-11-07  Tom Tromey  <tromey@cygnus.com>
10599
10600         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10601         * lex.c (java_ignorable_control_p): Removed.
10602         (java_letter_or_digit_p): Removed.
10603         (java_start_char_p): New function.
10604         (java_read_char): Return `int', not `unicode_t'.  Changed
10605         callers.
10606         (java_read_unicode): Likewise.
10607         (java_read_unicode_collapsing_terminators): Likewise.
10608         (java_get_unicode): Likewise.
10609         (java_new_lexer): Initialize hit_eof.
10610         (java_parse_end_comment): Take `int' argument.
10611         (java_parse_doc_section): Likewise.
10612         (java_parse_escape_sequence): Don't allow backlash-newline.
10613         Return `int'.
10614         * lex.h (JAVA_DIGIT_P): Removed.
10615         (_JAVA_LETTER_OR_DIGIT_P): Removed.
10616         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10617         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10618         (JAVA_PART_CHAR_P): New macro.
10619         (UEOF): Now -1.
10620         (JAVA_CHAR_ERROR): Now -2.
10621         (java_lexer): New field `hit_eof'.
10622         * chartables.h: New file.
10623         * gen-table.pl: new file.
10624
10625 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10626             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10627
10628         * parse.y (java_complete_lhs): Only allow compound assignment of
10629         reference type if type is String.
10630
10631 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10632
10633         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10634         jcf-path.c: Likewise.
10635
10636 2000-12-09  Anthony Green  <green@redhat.com>
10637
10638         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10639         filestart and filename_length as int values.
10640
10641 2000-12-07  Mo DeJong  <mdejong@redhat.com>
10642
10643         * jcf-io.c (find_class): Correct the logic that tests to see if a
10644         .java file is newer than its .class file. The compiler was
10645         incorrectly printing a warning when file mod times were equal.
10646
10647 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
10648
10649         * jvgenmain.c: Use ISPRINT not isascii.
10650
10651 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10652
10653         * parse.y (end_artificial_method_body): Fixed typo.
10654
10655 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10656
10657         * parse.y (patch_method_invocation): Pick the correct enclosing
10658         context when creating inner class instances.
10659         Fixes gcj/332.
10660
10661 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
10662
10663         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10664         Update copyright year to 2000.
10665
10666 2000-11-23  Anthony Green  <green@redhat.com>
10667
10668         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10669         Move current_file_list out of yyparse and make it static.
10670
10671         * expr.c: Declare quick_stack and tree_list_free_list as static
10672         (init_expr_processing): Register quick_stack and
10673         tree_list_free_list roots.
10674
10675 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10676
10677         * parse.y (build_outer_field_access): New local `decl_ctx', use
10678         it. Check for field's context and current class immediate outer
10679         context inheritance.
10680         (outer_field_access_p): Consider fields inherited from the last
10681         enclosing context.
10682         (build_access_to_thisn): Stop at the last enclosing context if
10683         necessary.
10684         Fixes gcj/367.
10685
10686 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
10687
10688         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10689
10690 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
10691
10692         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10693         scratch buffer.
10694
10695 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10696
10697         * jv-scan.c (help): Document --complexity.
10698         (options): Added --complexity.
10699         (flag_complexity): New global.
10700         (main): Call `report'.
10701         * parse-scan.y (complexity): New global.
10702         (if_then_statement, if_then_else_statement,
10703         if_then_else_statement_nsi, switch_block_statement_group,
10704         while_expression, do_statement, for_begin, continue_statement,
10705         throw_statement, catch_clause, finally, method_invocation,
10706         conditional_and_expression, conditional_or_expression,
10707         conditional_expression): Update complexity.
10708         (reset_report): Reset complexity.
10709         (report): New function.
10710
10711 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10712
10713         * lex.c (yylex): Added STRICT_TK case.
10714         * parse.y (STRICT_TK): Added.
10715         * parse-scan.y (STRICT_TK): Added.
10716         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
10717         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
10718         file.
10719         * keyword.h: Rebuilt.
10720         * keyword.gperf (strictfp): Added.
10721
10722 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10723
10724         * lex.c (yylex): Recognize floating point constants with leading
10725         0.
10726
10727 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10728
10729         * java-tree.h (cyclic_inheritance_report): Constify.
10730         * parse.y (cyclic_inheritance_report): Likewise.
10731
10732 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10733
10734         * parse.y (goal): Remove call to ggc_add_string_root.
10735
10736 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10737
10738         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10739         Create string in scratch buffer, then pass to build_string.
10740
10741 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10742
10743         * parse.y (issue_warning_error_from_context): Add
10744         ATTRIBUTE_PRINTF.
10745
10746 2000-11-11  Anthony Green  <green@redhat.com>
10747
10748         * jcf-parse.c (process_zip_dir): Add finput parameter.
10749         (jcf_figure_file_type): Call process_zip_dir with appropriate
10750         argument.
10751
10752 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10753
10754         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10755         * jcf-parse.c (jcf_figure_file_type): Likewise.
10756
10757 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10758
10759         * parse.y (create_new_parser_context): Use memset () instead of
10760         bzero ().
10761
10762 2000-11-08  Tom Tromey  <tromey@cygnus.com>
10763
10764         * gjavah.c (process_file): Only include gcj/cni.h when generating
10765         CNI stubs.
10766
10767 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10768
10769         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
10770         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
10771         instead of bzero ().
10772
10773 2000-11-05  Tom Tromey  <tromey@cygnus.com>
10774
10775         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
10776         * lex.c (IS_ZERO): New define.
10777         (java_perform_atof): Error on floating point underflow.
10778
10779 2000-11-04  Tom Tromey  <tromey@cygnus.com>
10780
10781         * lex.c (java_parse_escape_sequence): Only read two octal
10782         characters if the first one is greater than 3.  Don't allow
10783         "octal" numbers to include the digits 8 or 9.
10784
10785 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10786
10787         * Make-lang.in (java.distdir): Remove.
10788
10789 2000-11-03  Tom Tromey  <tromey@cygnus.com>
10790
10791         * Make-lang.in (java.dvi): New target.
10792         Partial fix for PR other/567.
10793
10794         * lang-options.h: Mention -Wout-of-date.
10795         * jcf-dump.c (flag_newer): New global.
10796         * gjavah.c (flag_newer): New global.
10797         * jcf-io.c (find_class): Only warn when flag_newer set.
10798         * lang.c (flag_newer): New global.
10799         (struct string_option): New declaration.
10800         (lang_W_options): New global.
10801         (process_option_with_no): New function.
10802         (lang_decode_option): Use it.
10803
10804         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
10805         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
10806         `$'.
10807
10808         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
10809         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
10810         * lex.c (java_read_unicode): Removed `term_context' argument.
10811         Recognize any number of `u' in `\u'.
10812         (java_read_unicode_collapsing_terminators): New function.
10813         (java_get_unicode): Use it.
10814         (java_lineterminator): Removed.
10815         (yylex): Produce error if character literal is newline or single
10816         quote.  Return if eof found in middle of `//' comment.  EOF in
10817         `//' comment is only an error if pedantic.
10818         (java_ignorable_control_p): New function.
10819         (java_parse_end_comment): Return if eof found in middle of
10820         comment.
10821         Include flags.h.
10822         * jv-scan.c (pedantic): New global.
10823
10824 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10825
10826         * parse.y (outer_field_access_p): Inherited fields aren't
10827         consider outer fields.
10828         (maybe_build_thisn_access_method): Use
10829         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
10830         (resolve_expression_name): Trigger an error if a static field
10831         is being accessed as an outer field.
10832
10833 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10834
10835         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
10836         Fixes gcj/365.
10837
10838 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10839
10840         * Make-lang.in: Move all build rules here from Makefile.in,
10841         adapt to new context.  Wrap all rules that change the current
10842         directory in parentheses.  Expunge all references to $(P).
10843         When one command depends on another and they're run all at
10844         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10845         all object-file generation rules.  Delete obsolete variables.
10846
10847         * Makefile.in: Delete.
10848         * config-lang.in: Delete outputs= line.
10849
10850 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10851
10852         * parse.y (patch_method_invocation): NULLify this_arg when already
10853         inserted.
10854         (maybe_use_access_method): Handle call to methods unrelated to the
10855         current class. Fixed comment.
10856         Fixes gcj/361.
10857
10858 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10859
10860         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
10861         scope.
10862
10863 2000-10-24  Tom Tromey  <tromey@cygnus.com>
10864
10865         * lex.c (java_new_lexer): Initialize new fields.  Work around
10866         broken iconv() implementations.
10867         (java_read_char): Swap bytes if required.  Use fallback decoder if
10868         required.
10869         (byteswap_init, need_byteswap): New globals.
10870         (java_destroy_lexer): Only close iconv handle if it is in use.
10871         * lex.h (java_lexer): New fields read_anything, byte_swap,
10872         use_fallback.
10873         Made out_buffer unsigned.
10874
10875 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10876
10877         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
10878         where an enclosing context can be set on the jdep.
10879         (do_resolve_class): Fixed identation.
10880
10881 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10882
10883         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
10884
10885         * jcf-reader.c (peek_attribute, skip_attribute): Only define
10886         when requested.
10887
10888         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
10889
10890         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
10891
10892 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10893
10894         * jcf-write.c (OP1): Update `last_bc'.
10895         (struct jcf_block): Fixed indentation and typo in comments.  New
10896         field `last_bc'.
10897         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
10898         follows `monitorenter'.
10899         * parse.y (patch_synchronized_statement): New local `tmp'. Call
10900         `patch_string'.
10901         Fixes gcj/232.
10902
10903 2000-10-16  Tom Tromey  <tromey@cygnus.com>
10904
10905         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
10906         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
10907         * lang-options.h: Added -MA, -MT, -MF..
10908         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
10909         (DEPEND_TARGET_SET): New macro.
10910         (DEPEND_FILE_ALREADY_SET): Likewise.
10911         (init_parse): Handle new flags.
10912         * jcf.h (jcf_dependency_print_dummies): Declare.
10913         * Make-lang.in (s-java): Added mkdeps.o.
10914         * Makefile.in (BACKEND): Added mkdeps.o.
10915         (../gcjh$(exeext)): Added mkdeps.o.
10916         (../jcf-dump$(exeext)): Added mkdeps.o.
10917         * jcf-depend.c: Include mkdeps.h.
10918         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
10919         add_entry): Removed.
10920         (jcf_dependency_reset): Rewrote.
10921         (dependencies): New global.
10922         (jcf_dependency_set_target): Rewrote.
10923         (jcf_dependency_add_target): Likewise.
10924         (jcf_dependency_add_file): Likewise.
10925         (munge): Removed.
10926         (print_ents): Removed.
10927         (jcf_dependency_write): Rewrote.
10928         (print_dummies): New global.
10929         (jcf_dependency_print_dummies): New function
10930         (jcf_dependency_write): Call deps_dummy_targets if required.
10931
10932 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10933
10934         * gjavah.c (add_class_decl): Removed unused variables `tname',
10935         `tlen' and `name_index'.
10936         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
10937         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
10938         in `wfl_operator' with value.
10939         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
10940         (jcf_figure_file_type): Fixed identation.
10941         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
10942         * parse.y (analyze_clinit_body): New function.
10943         (static_initializer:): Reset `current_static_block'.
10944         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
10945         `wfl_operator' with new value.
10946         (lookup_cl): Use EXPR_WFL_FILENAME.
10947         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
10948         analyze_clinit_body.
10949         (build_outer_field_access): Access to this$<n> built from
10950         current_class, not its outer context.
10951         (build_access_to_thisn): Fixed leading comment. Tidied things up.
10952         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
10953         (patch_method_invocation): Use `is_static_flag' when already
10954         initialized.
10955         (patch_newarray): Removed assignment in ternary operator.
10956
10957 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10958
10959         * except.c (free_eh_ranges): Don't free `whole_range'.
10960
10961 2000-10-15  Anthony Green  <green@redhat.com>
10962
10963         * decl.c (init_decl_processing): Call init_class_processing before
10964         anything else.
10965
10966 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10967
10968         * check-init.c (check_init): Fixed leading comment. Use
10969         LOCAL_FINAL_P.
10970         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10971         (give_name_to_locals): Likewise.
10972         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
10973         fields in lang_decl_var.
10974         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
10975         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
10976         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
10977         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
10978         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
10979         (LOCAL_FINAL): Rewritten.
10980         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
10981         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
10982         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
10983         `init_final' fields.
10984         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
10985         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
10986         (TYPE_HAS_FINAL_VARIABLE): New macro.
10987         (struct lang_type): Added `afv' field.
10988         * parse.y (check_static_final_variable_assignment_flag): New function.
10989         (reset_static_final_variable_assignment_flag): Likewise.
10990         (check_final_variable_local_assignment_flag): Likewise.
10991         (reset_final_variable_local_assignment_flag): Likewise.
10992         (check_final_variable_indirect_assignment): Likewise.
10993         (check_final_variable_global_assignment_flag): Likewise.
10994         (add_inner_class_fields): Use LOCAL_FINAL_P.
10995         (register_fields): Handle local finals and final variables.
10996         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
10997         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10998         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10999         on local finals.
11000         (java_complete_expand_methods): Loop to set
11001         TYPE_HAS_FINAL_VARIABLE. Call
11002         `reset_final_variable_local_assignment_flag' and
11003         `check_final_variable_local_assignment_flag' accordingly before
11004         and after constructor expansion. Call
11005         `reset_static_final_variable_assignment_flag'
11006         before expanding <clinit> and after call
11007         `check_static_final_variable_assignment_flag' if the
11008         current_class isn't an interface. After all methods have been
11009         expanded, call `check_final_variable_global_assignment_flag' and
11010         `check_static_final_variable_assignment_flag' if the current class
11011         is an interface.
11012         (maybe_yank_clinit): Fixed typo in comment.
11013         (build_outer_field_access_methods): Removed old sanity check. Use
11014         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11015         Don't create access methods for finals.
11016         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11017         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11018         existing DECL_INIT has been processed.
11019         (java_complete_lhs): Likewise.
11020         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11021         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11022         logic.
11023         (patch_assignment): Use LOCAL_FINAL_P.
11024         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11025         DECL_INITIAL is nullified.
11026         Fixes gcj/163.
11027
11028 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11029
11030         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11031
11032         * Makefile.in (parse.c, parse-scan.c): Likewise.
11033
11034 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11035
11036         * class.c (temporary_obstack): Remove.
11037         (make_class): Don't mess with obstascks.
11038         (push_class): Likewise.
11039         (set_super_info): Likewise.
11040         (add_method_1): Likewise.
11041         (add_method): Likewise.
11042         (add_field): Likewise.
11043         (build_utf8_ref): Likewise.
11044         (build_class_ref): Likewise.
11045         (build_static_field_ref): Likewise.
11046         (finish_class): Likewise.
11047         (push_super_field): Likewise.
11048         (layout_class): Likewise.
11049         (layout_class_methods): Likewise.
11050         (init_class_processing): Likewise.
11051         * constants.c (get_tag_node): Likewise.
11052         (build_constant_data_ref): Likewise.
11053         * decl.c (ggc_p): Remove.
11054         (copy_lang_decl): Use ggc_alloc.
11055         (complete_start_java_method): Don't mess with obstacks.
11056         (start_java_method): Likewise.
11057         (end_java_method): Likewise.
11058         * except.c (link_handler): Use xmalloc.
11059         (free_eh_ranges): New function.
11060         (method_init_exceptions): Use it.
11061         (add_handler): Use xmalloc.
11062         (expand_start_java_handler): Don't mess with obstacks.
11063         (prepare_eh_table_type): Likewise.
11064         (expand_end_java_handler): Likewise.
11065         * expr.c (push_value): Likewise.
11066         (create_label_decl): Likewise.
11067         (build_jni_stub): Likewise.
11068         (java_lang_expand_expr): Likewise.
11069         (note_instructions): Use xrealloc.
11070         (java_push_constant_from_pool): Don't mess with obstacks.
11071         (process_jvm_instruction): Likewise.
11072         * java-tree.h (cyclic_inheritance_report): Remove duplicate
11073         declaration.
11074         * jcf-parse.c (get_constant): Don't mess with obstacks.
11075         (read_class): Likewise.
11076         (jcf_parse): Likewise.
11077         * lex.c (expression_obstack): Remove.
11078         (java_lex): Don't use obstack_free.
11079         * parse.h (exit_java_complete_class): Don't mess with obstacks.
11080         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11081         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11082         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11083         * parse.y (gaol): Add more GC roots.
11084         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11085         (lookup_field_wrapper): Likewise.
11086         (obtain_incomplete_type): Don't mess with obstacks.
11087         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11088         macros.
11089         (craft_constructor): Don't mess with obstacks.
11090         (safe_layout_class): Likewise.
11091         (java_complete_class): Likewise.
11092         (source_end_java_method): Likewise.
11093         (build_outer_field_access_methods): Likewise.
11094         (build_outer_method_access_method): Likewise.
11095         (maybe_build_thisn_access_method): Likewise.
11096         (build_dot_class_method_invocation): Likewise.
11097         (java_complete_tree): Likewise.
11098         (java_complete_lhs): Likewise.
11099         (do_merge_string_cste): Likewise.
11100         (patch_string_cst): Likewise.
11101         (array_constructor_check_entry): Likewise.
11102         * typeck.c (build_java_array_type): Likewise.
11103         (parse_signature_string): Likewise.
11104         (build_java_signature): Likewise.
11105
11106 2000-10-12  Tom Tromey  <tromey@cygnus.com>
11107
11108         Fix for PR gcj/356:
11109         * gjavah.c (add_class_decl): Don't special-case inner classes.
11110         (add_namelet): Likewise.
11111
11112 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
11113
11114         * java-tree.h: Constify current_encoding.
11115         * lang.c: Constify current_encoding.
11116
11117 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
11118
11119         * jvgenmain.c (class_mangling_suffix): Omit `.'.
11120         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11121
11122 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11123
11124         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11125         patch. Fixes gcj/340.
11126
11127 2000-10-10  Tom Tromey  <tromey@cygnus.com>
11128
11129         * lex.c (java_new_lexer): Initialize out_first and out_last
11130         fields.
11131         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11132
11133 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11134
11135         * parse.y (pop_current_osb): New function.
11136         (array_type:): Use `dims:', changed actions
11137         accordingly. Suggested by Anthony Green.
11138         (array_creation_expression:): Used pop_current_osb.
11139         (cast_expression:): Likewise.
11140         (search_applicable_method_list): Fixed indentation.
11141
11142 2000-10-08  Anthony Green  <green@redhat.com>
11143
11144         * parse.y (array_type_literal): Remove production.
11145         (type_literals): Refer to array_type, not array_type_literal.
11146
11147 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11148
11149         Patch contributed by Corey Minyard.
11150         * decl.c (check_local_named_variable): New function.
11151         (tree check_local_unnamed_variable): Likewise.
11152         (find_local_variable): Splitted. Call check_local_{un}named_variable.
11153
11154 2000-10-07  Anthony Green  <green@redhat.com>
11155
11156         * class.c (layout_class): Handle case where superclass can't be
11157         layed out yet.
11158
11159 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11160
11161         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11162         gperf.
11163
11164 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11165
11166         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11167         * jvgenmain.c (class_mangling_prefix): Removed.
11168         (class_mangling_suffix): New global.
11169         (main): Use it.
11170         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11171         `$'.
11172         (print_method_info): Handle overrides for static and final
11173         methods.
11174         (process_file): Generate declaration for class object field.
11175         * class.c (cxx_keywords): New array.
11176         (utf8_cmp): New function.
11177         (cxx_keyword_p): New function.
11178         (layout_class_method): Mangle C++ keywords by appending `$'.
11179         (mangle_field): New function.
11180         (mangle_class_field): Use mangle_field.  Mangle class name as
11181         `class$'.
11182         (mangle_static_field): Use mangle_field.
11183
11184 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11185
11186         * decl.c (find_local_variable): Removed uncessary type check and
11187         fixed range check typo. From Corey Minyard.
11188
11189 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11190
11191         * decl.c (give_name_to_locals): New local `code_offset'. Call
11192         `maybe_adjust_start_pc'.
11193         * expr.c (note_instructions): New function.
11194         (expand_byte_code): Don't collect insn starts here.
11195         (peek_opcode_at_pc): New function.
11196         (maybe_adjust_start_pc): Likewise.
11197         * java-tree.h (maybe_adjust_start_pc): Declare.
11198         (note_instructions): Likewise.
11199         * jcf-parse.c (parse_class_file): Call `note_instructions'.
11200
11201 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11202
11203         * parse.y (field_access:): Fixed indentation.
11204         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11205
11206 2000-09-07  Tom Tromey  <tromey@cygnus.com>
11207
11208         Fix for PR gcj/307:
11209         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11210         JPRIMITIVE_TYPE_P, for arithmetic operators.
11211         (patch_method_invocation): Indentation fix.
11212         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
11213         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11214         (do_unary_numeric_promotion): Cleaned up code.
11215         (valid_cast_to_p): Handle boolean correctly.
11216
11217 2000-09-27  Tom Tromey  <tromey@cygnus.com>
11218
11219         * lex.c (java_read_unicode): Reset bs_count when finished with
11220         `\u' sequence.
11221
11222 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11223
11224         Convert to GC.
11225         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11226         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11227         (typeck.o): Depend on ggc.h.
11228         * class.c (add_method_1): Use GC functions for allocation.
11229         (init_class_processing): Register roots.
11230         * decl.c (ggc_p): Set to 1.
11231         (pending_local_decls): Make it static.
11232         (push_jvm_slot): Use GC functions for allocation.
11233         (init_decl_processing): Register roots.
11234         (give_name_to_locals): Use GC functions for allocation.
11235         (lang_mark_tree): New function.
11236         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11237         functions for allocation.
11238         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11239         * lex.c (java_lex): Use build_string, rather than replicating it
11240         inline.
11241         * parse.y (goal): Add more roots.
11242         (mark_parser_ctxt): New function.
11243         * typeck.c: Include ggc.h.
11244
11245 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11246
11247         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11248         contains something else than MODIFY_EXPR.
11249
11250 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
11251
11252         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11253         * Makefile.in (parse.o): Depend on ggc.h.
11254         (class.o): Likewise.
11255         (constants.o): Likewise.
11256         (decl.o): Likewise.
11257         (expr.o): Likewise.
11258         (jcf-parse.o): Likewise.
11259         (jcf-write.o): Likewise.
11260         (mangle.o): Likewise.
11261         * class.c: Include ggc.h.
11262         (build_static_field_ref): Register GC roots.
11263         (layout_class): Likewise.
11264         (init_class_processing): Likewise.
11265         * constants.c: Include ggc.h.
11266         (current_constant_pool_data_ref): Remove.
11267         (tag_nodes): Move it to ...
11268         (get_tag_node): ... here.  Register GC roots.
11269         * decl.c: Include ggc.h.  Remove many global tree definitions.
11270         (throw_node): Define.
11271         (java_global_trees): Likewise.
11272         (predef_filenames): Make the size a constant.
11273         (init_decl_processing): Adjust accordingly.
11274         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
11275         * expr.c: Include ggc.h.
11276         (init_expr_processing): Register GC roots.
11277         (build_invokeinterface): Likewise.
11278         * java-tree.h: Replace extern tree declarations with macros.
11279         (java_global_trees): New variable.
11280         (java_tree_index): New enumeration.
11281         (init_jcf_parse): Declare.
11282         * jcf-parse.c: Include ggc.h.
11283         (current_class): Remove declaration.
11284         (main_class): Likewise.
11285         (all_class_list): Likewise.
11286         (predefined_filename_p): Adjust for constant size of
11287         predef_filenames.
11288         (init_jcf_parse): New function.
11289         * jcf-write.c: Include ggc.h.
11290         (generate_classfile): Register GC roots.
11291         (append_synthetic_attribute): Likewise.
11292         (append_innerclass_attribute_entry): Likewise.
11293         * lang.c: Include ggc.h.
11294         (lang_print_error): Register GC roots.
11295         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11296         with macros.
11297         * parse.y: Include ggc.h.
11298         (wfl_operator): Remove.
11299         (goal): Register GC roots.
11300         (java_pop_parser_context): Adjust for new field names.
11301         (java_parser_context_save_global): Likewse.
11302         (java_parser_context_restore_global): Likewise.
11303         (java_parser_context_suspend): Likewise.
11304         (java_parser_context_resume): Likewise.
11305         (verify_constructor_circularity): Register GC roots.
11306         (lookup_cl): Likewise.
11307         (java_reorder_fields): Likewise.
11308         (build_current_this): Likewise.
11309         (class_in_current_package): Likewise.
11310         (argument_types_convertible): Likewise.
11311         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11312
11313 2000-09-14  Tom Tromey  <tromey@cygnus.com>
11314
11315         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11316
11317 2000-09-13  Tom Tromey  <tromey@cygnus.com>
11318
11319         * jcf-parse.c: Include <locale.h>.
11320         * jv-scan.c: Include <locale.h>.
11321
11322 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11323
11324         * expr.c (pop_type_0): Return `Object' if trying to merge two
11325         interface types.
11326         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11327         interface types; `Object' is always a valid supertype.
11328
11329 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11330
11331         Fix for PR gcj/33:
11332         * jv-scan.c (help): Document --encoding.
11333         (options): Added `encoding' entry.
11334         (OPT_ENCODING): New define.
11335         (main): Handle --encoding.
11336         Include <langinfo.h> if nl_langinfo exists.
11337         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11338         --encoding.
11339         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11340         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11341         argument.  Use nl_langinfo to determine default encoding.
11342         * java-tree.h (current_encoding): Declare.
11343         * parse.y (java_parser_context_restore_global): Don't restore
11344         `finput'.
11345         (java_parser_context_save_global): Don't set `finput' field.
11346         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11347         if required.
11348         * lang.c (current_encoding): New global.
11349         (lang_decode_option): Recognize `-fencoding='.
11350         (finish_parse): Don't close finput.
11351         * parse.h (struct parser_ctxt): Removed `finput' and
11352         `unget_utf8_value' fields.  Added `lexer' field.
11353         (java_init_lex): Fixed declaration.
11354         * lex.c (java_new_lexer): New function.
11355         (java_destroy_lexer): Likewise.
11356         (java_read_char): Added `lex' argument.  Handle iconv case.
11357         (java_read_unicode): Added `lex' argument.  Count backslashes in
11358         lexer structure.
11359         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11360         `lexer' field in ctxp.
11361         (BAD_UTF8_VALUE): Removed.
11362         (java_lex): Handle seeing UEOF in the middle of a string literal.
11363         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11364         (java_lexer): New structure.
11365         (UNGETC): Removed.
11366         (GETC): Removed.
11367         (DEFAULT_ENCODING): New define.
11368         (java_destroy_lexer): Declare.
11369
11370 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11371
11372         Fix for PR gcj/343:
11373         * lex.c (java_init_lex): Initialize java_io_serializable.
11374         * parse.y (java_io_serializable): New global.
11375         (valid_ref_assignconv_cast_p): An array can be cast to
11376         serializable.
11377
11378 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11379
11380         * decl.c, expr.c: Include defaults.h if not already included.
11381         Don't define the *_TYPE_SIZE macros.
11382
11383 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11384
11385         * typeck.c (build_java_array_type): Correct first parameter
11386         in ADJUST_FIELD_ALIGN invocation.
11387
11388 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11389
11390         * lang-specs.h: Also recognize `-femit-class-files'.
11391
11392 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11393
11394         * verify.c (merge_types): Load the types to merge if necessary.
11395
11396 2000-09-02  Anthony Green  <green@redhat.com>
11397
11398         * jcf-io.c: Include zlib.h.
11399         (open_in_zip): Read compressed class file archives.
11400         * zipfile.h (ZipDirectory): Add uncompressed_size and
11401         compression_method fields.
11402         * zextract.c (read_zip_archive): Collect file compression info.
11403
11404 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11405
11406         * parse.y (do_resolve_class): Also explore superclasses of
11407         intermediate enclosing contexts when searching for inner classes.
11408
11409 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11410
11411         * parse.y (variable_declarator_id:): Better error message.
11412         (expression_statement:): Use YYNOT_TWICE.
11413         (cast_expression:): Likewise.
11414         (assignment:): Likewise.
11415
11416 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11417
11418         * parse.y (do_merge_string_cste): New locals. Create new
11419         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11420
11421 2000-08-07  Hans Boehm  <boehm@acm.org>
11422
11423         * boehm.c (mark_reference_fields): Set marking bits for all words in
11424         a multiple-word record.
11425         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11426         java.lang.Class.
11427
11428 2000-08-31  Mike Stump  <mrs@wrs.com>
11429
11430         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11431         jcf-dump$(exeext)): Make parallel safe.
11432
11433 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11434
11435         * jcf-parse.c (set_source_filename): Constify a char *.
11436         * jcf-write.c (append_innerclasses_attribute,
11437         make_class_file_name): Constify a char *.  Don't recycle a
11438         variable for an unrelated purpose.
11439         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11440         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11441
11442 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11443
11444         * expr.c (can_widen_reference_to): Fixed indentation.
11445         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11446         * parse.y: `finit$' replaces `$finit$' in comments.
11447         (try_builtin_assignconv): Fixed leading comment.
11448
11449 2000-08-25  Greg McGary  <greg@mcgary.org>
11450
11451         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11452
11453 2000-08-24  Greg McGary  <greg@mcgary.org>
11454
11455         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11456         * parse.y (BINOP_LOOKUP): Likewise.
11457
11458 2000-08-22  Andrew Haley  <aph@cygnus.com>
11459
11460         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11461         sign extending. Fixes gcj/321.
11462         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11463         combining to make a jlong. Fixes gcj/321.
11464
11465 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11466
11467         * lang-specs.h: Do not process -o or run the assembler if
11468         -fsyntax-only.
11469
11470 2000-08-16  Andrew Haley  <aph@cygnus.com>
11471
11472         * typeck.c (build_java_array_type): Rewrite code to do array
11473         alignment.  Take into account back-end macros when aligning array
11474         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11475         user to set alignment. Fixes gcj/252 and 160.
11476
11477 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11478
11479         * parse.y (check_abstract_method_definitions): Now return `int'.
11480         Check implemented interfaces.  Fixes PR gcj/305.
11481
11482         * parse.y (patch_switch_statement): Disallow `long' in switch
11483         expressions.  Fixes PR gcj/310.
11484
11485 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11486
11487         * decl.c (finit_leg_identifier_node): New global.
11488         (init_decl_processing): Use `finit$' to initialize
11489         finit_identifier_node. Use `$finit$' to initialize
11490         finit_leg_identifier_node.
11491         * expr.c (expand_java_field_op): Use ID_FINIT_P.
11492         * java-tree.h (finit_identifier_node): Changed attached comment.
11493         (finit_leg_identifier_node): New declaration.
11494         (ID_FINIT_P): Take finit_identifier_node and
11495         finit_leg_identifier_node into account. This is a backward
11496         compatibility hack.
11497
11498 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11499
11500         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11501         Jan 6 2000 patch.
11502         (generate_bytecode_insns): Check `nargs' before emitting it.
11503         * verify.c (merge_type_state): Fixed typo.
11504         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11505         generate_bytecode_{conditional,insns}.
11506
11507 2000-08-13  Anthony Green  <green@redhat.com>
11508
11509         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11510         for -pg builds).
11511
11512 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11513
11514         * class.c (maybe_layout_super_class): Fixed indentation.
11515         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11516         (java_check_methods): New function declaration.
11517         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11518         instead of `str_ptr'.
11519         * jcf-write.c (generate_bytecode_insns): Emit number the of args
11520         of a `invokeinterface' at the right time.
11521         * parse.h (WFL_STRIP_BRACKET): New macro.
11522         (SET_TYPE_FOR_RESOLUTION): Use it.
11523         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11524         (check_class_interface_creation): Don't check for cross package
11525         innerclass name clashes.
11526         (method_header): Behave properly if MDECL is `error_mark_node'.
11527         (method_declarator): Return `error_mark_node' if bogus current
11528         class.
11529         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11530         (resolve_and_layout): New local `decl_type', set and used. Call
11531         java_check_methods.
11532         (java_check_methods): New method.
11533         (java_layout_classes): Use it.
11534         (resolve_qualified_expression_name): No EH check necessary in
11535         access$<n>.
11536         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11537         `case' statement.
11538         (patch_assignment): Set DECL_INITIAL on integral final local.
11539
11540 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11541
11542         * java-tree.h (flag_extraneous_semicolon): New extern.
11543         * lang-options.h: (-Wextraneous-semicolon): New option.
11544         * lang.c (flag_redundant): Fixed typo in leading comment.
11545         (flag_extraneous_semicolon): New global.
11546         (lang_decode_option): Set `flag_extraneous_semicolon' when
11547         -Wall. Decode `-Wextraneous-semicolon'.
11548         * parse.y (type_declaration:): Removed `SC_TK' hack, added
11549         `empty_statement' rule.
11550         (class_body_declaration): Likewise.
11551         (method_body:): Accept `;' as a method body.
11552         (static_initializer:): Removed `SC_TK' hack.
11553         (constructor_block_end:): Likewise.
11554         (empty_statement:): Report deprecated empty declaration. Fixes
11555         gcj/295
11556
11557 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11558
11559         * parse.y (build_dot_class_method_invocation): Changed parameter
11560         name to `type'. Build signature from `type' and convert it to a
11561         STRING_CST if it's an array.
11562         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11563         to use `ref_type' directly.
11564
11565 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
11566
11567         * lang-options.h: Added a comma after the last element to avoid
11568         syntax errors when other languages define additional options.
11569
11570 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11571
11572         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11573         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11574         (jc1): Link with $(BACKEND).
11575         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11576
11577 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11578
11579         * jvspec.c: Adjust type of second argument to
11580         lang_specific_driver, and update code as necessary.
11581
11582         * class.c (build_dtable_decl): Initialize dummy.
11583
11584 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11585
11586         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11587         method bodies not to rule out discarding `<clinit>'; don't use
11588         <clinit> to initialize static fields with constant initializers.
11589
11590 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11591
11592         * gjavah.c (print_method_info): Added `synth' parameter. Skip
11593         synthetic methods.
11594         (method_synthetic): New global.
11595         (HANDLE_METHOD): Recognize synthetic method and tell
11596         `print_method_info' about it.
11597         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11598         processing a synthetic method.
11599         * jcf-reader.c (skip_attribute): New function.
11600         ( skip_attribute): Likewise.
11601
11602 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11603
11604         * parse.y (build_outer_field_access): Fixed comments.
11605         (fix_constructors): Emit the initialization of this$<n> before
11606         calling $finit$.
11607         (resolve_qualified_expression_name): Build an access to `decl' if
11608         necessary.
11609
11610 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11611
11612         * parse-scan.y (curent_class): Non longer const.
11613         (inner_qualifier, inner_qualifier_length): Deleted.
11614         (current_class_length): New global.
11615         (bracket_count): Fixed typo in leading comment.
11616         (anonymous_count): New global.
11617         (class_instance_creation_expression:): Handle anonymous classes.
11618         (anonymous_class_creation:): New rule.
11619         (push_class_context): Rewritten.
11620         (pop_class_context): Likewise.
11621         (INNER_QUALIFIER): Macro deleted.
11622         (report_class_declaration): call `push_class_context' when
11623         entering the function. `fprintf' format modified not to use
11624         INNER_QUALIFIER.
11625         (report_class_declaration): Assign `package_name' and
11626         `current_class' to NULL separately.
11627
11628 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11629
11630         * expr.c (build_invokeinterface): Call layout_class_methods on
11631         target interface.
11632
11633 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11634             Anthony Green  <green@cygnus.com>
11635             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11636
11637         * class.c (make_class_data): Create vtable for abstract classes.
11638         (get_dispatch_table): Changed to cope with abstract classes.
11639
11640 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11641
11642         * parse.y (patch_method_invocation): Don't reverse the argument
11643         list when dealing with anonymous class constructors. Fixed typo in
11644         comment.
11645
11646 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11647
11648         * parse.y (build_alias_initializer_parameter_list): Reverse
11649         crafted list when building aliases for anonymous class
11650         constructors.
11651
11652 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11653
11654         * parse.y (jdep_resolve_class): Don't bother checking potential
11655         innerclass access if `decl' is NULL.
11656         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11657         WFL.
11658
11659 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11660
11661         * parse.c: Remove (again.)
11662
11663 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11664
11665         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11666         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
11667         outside the `if' statement, alias to innerclass removed, `decl'
11668         used to mark the class complete.
11669
11670 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11671
11672         * parse.y (simple_name:): Fixed typo in error message.
11673
11674 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11675
11676         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11677         or its first operand can be error marks.
11678
11679 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11680
11681         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11682         * parse.y (method_header): Likewise.
11683
11684 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11685
11686         * parse.y (process_imports): Consider that one might be trying to
11687         import an innerclass. Fixes gcj/254
11688
11689 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11690
11691         * parse.y (find_as_inner_class): Handle the case where the
11692         enclosing context of an innerclass has been loaded as bytecode.
11693
11694 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11695
11696         * parse.y (simple_name:): Reject `$' in type names.
11697         (resolve_type_during_patch): Use `type' as a second
11698         argument to resolve_no_layout. Fixes gcj/257.
11699
11700 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
11701
11702         * parse.y (find_most_specific_methods_list): Select the only
11703         non-abstract method even if max has been set.
11704         Fixes gcj/285, gcj/298.
11705
11706 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
11707
11708         * lang-specs.h: Added %(jc1) to java compiler options.
11709
11710 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11711
11712         * .cvsignore: New file.
11713
11714 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11715
11716         * parse.y (not_accessible_p): Access granted to innerclasses
11717         (indirectly) extending the reference type. Fixes gcj/249.
11718
11719 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11720
11721         * parse.y (patch_method_invocation): Fixed comment.
11722         (maybe_use_access_method): Build this$<n>s to the context of the
11723         target method, or a type that extends it. Fixes gcj/242.
11724
11725 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11726
11727         * parse.c: Remove.
11728
11729 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11730
11731         * parse.y (fold_constant_for_init): Avoid bullish conversion.
11732
11733 2000-07-13  Tom Tromey  <tromey@cygnus.com>
11734
11735         * lang-specs.h: Added %{I*}.
11736
11737 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11738
11739         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11740
11741 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11742
11743         * parse-scan.c: Remove.
11744
11745 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11746
11747         * class.c (set_super_info): Handled protected inner classes.
11748         (common_enclosing_context_p): Bail early if arguments aren't both
11749         inner classes.
11750         (get_access_flags_from_decl): Handle private and protected inner
11751         classes.
11752         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
11753         (CLASS_PROTECTED): Likewise.
11754         (struct lang_type): New bitfield `poic'.
11755         * parse.y (jdep_resolve_class): Call check_inner_class_access on
11756         inner classes only.
11757         (check_inner_class_access): Renamed arguments, added
11758         comments. Handles protected inner classes (fixes gcj/225)
11759         (not_accessible_p): Fixed comments. Avoid handling inner classes.
11760
11761 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11762
11763         * parse.y (resolve_qualified_expression_name): Verify qualified
11764         access to `this'. Fixes gcj/239.
11765
11766 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11767
11768         * jcf-write.c (generate_classfile): Don't install ConstantValue
11769         for null pointers.
11770
11771 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11772
11773         * parse.y (resolve_qualified_expression_name): Handle inner class
11774         access. Fixes gcj/256.
11775
11776 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11777
11778         * jcf-write.c (generate_classfile): Properly install the
11779         ConstantValue attribute and the initial value constant pool index
11780         on string constants.
11781         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
11782         class files.
11783
11784 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11785
11786         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
11787         construct.
11788         * parse.y (find_as_inner_class): Fixed typo.
11789         (do_resolve_class): Explore enclosing contexts when searching for
11790         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
11791         (check_inner_class_access): Check `decl' which can be null in case
11792         of previous errors.
11793
11794 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11795
11796         * java-tree.h (java_debug_context): Declared `extern'.
11797         (safe_layout_class): Likewise.
11798         * parse.y (resolve_field_access): Field must be `static' in order
11799         to be replaced by its initial value. Added comments.
11800         (find_applicable_accessible_methods_list): Fixed typo.
11801         (find_most_specific_methods_list): Methods found in innerclasses
11802         take over methods founds in the enclosing contexts.
11803         (java_complete_tree): Loosen restrictions on the type of DECLs
11804         that can be replaced by their initialization values.
11805         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
11806
11807 2000-07-05  Tom Tromey  <tromey@cygnus.com>
11808
11809         * Make-lang.in (PARSE_DIR): New macro.
11810         (PARSE_RELDIR): Likewise.
11811         (PARSE_C): Likewise.
11812         (PARSE_SCAN_C): Likewise.
11813         ($(PARSE_C)): New target.
11814         ($(PARSE_SCAN_C)): Likewise.
11815         (SET_BISON): New macro.
11816         (BISONFLAGS): Likewise.
11817         (JAVABISONFLAGS): Likewise.
11818
11819 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
11820
11821         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
11822         argument on the first pass for CNI as well as JNI.
11823         (print_method_info): Set up method name on the first pass only.
11824
11825 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11826
11827         * parse.y (parser_qualified_classname): Removed parameter
11828         `is_static'.
11829         (create_interface): Removed first passed parameter to
11830         parser_qualified_classname.
11831         (create_class): Likewise. Don't install alias on static
11832         innerclasses. Fixes gcj/275.
11833
11834 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11835
11836         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
11837         debugable statement with empty_stmt_node. Fixes gcj/272
11838
11839 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11840
11841         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
11842         gcj/271.
11843
11844 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11845
11846         * jcf-write.c (push_long_const): Appropriately cast short negative
11847         constant to jword.
11848
11849 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11850
11851         * parse.y (verify_constructor_super): Use loop variable
11852         `m_arg_type' initialized with `mdecl_arg_type'.
11853
11854 2000-06-29  Tom Tromey  <tromey@cygnus.com>
11855
11856         * parse.y (resolve_field_access): Handle case where `type_found'
11857         is NULL.
11858
11859 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11860
11861         * expr.c (lookup_field): The same field can be found through two
11862         different interface. Don't declare it ambiguous in that case.
11863
11864 2000-06-27  Tom Tromey  <tromey@cygnus.com>
11865
11866         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
11867         follows \r, then unget it at a lower level.
11868
11869 2000-06-26  Tom Tromey  <tromey@cygnus.com>
11870
11871         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
11872         java_complete_tree.
11873
11874 2000-06-25  Tom Tromey  <tromey@cygnus.com>
11875
11876         * parse.y (for_statement): Wrap expression in a WFL if it is a
11877         constant.  For PR gcj/268.
11878
11879 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11880
11881         * parse.y (do_resolve_class): Minor optimiztion in the package
11882         list search. Removed unnecessary test and return statement.
11883         (valid_ref_assignconv_cast_p): Order of arguments to
11884         enclosing_context_p fixed.
11885
11886 2000-06-24  Tom Tromey  <tromey@cygnus.com>
11887
11888         * expr.c (lookup_field): Print error and return error_mark_node if
11889         field reference is ambiguous.
11890
11891         * parse.y (check_abstract_method_definitions): Also check if
11892         `other_method' is abstract.
11893
11894 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11895
11896         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
11897         classes.
11898         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
11899         (struct lang_type): New field `pic'.
11900         (CLASS_PRIVATE): New macro.
11901         * parse.y (check_inner_class_access): New function.
11902         (jdep_resolve_class): Call it.
11903
11904 2000-06-23  Tom Tromey  <tromey@cygnus.com>
11905
11906         * parse.y (patch_incomplete_class_ref): Initialize the returned
11907         class.  For PR gcj/260.
11908
11909 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11910
11911         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
11912
11913 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11914
11915         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11916         Java specific checks.
11917         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
11918         screened by DECL_P.
11919         * java-tree.def (CASE_EXPR): Marked 'e'.
11920         (DEFAULT_EXPR): Likewise.
11921         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
11922         screened by DECL_P.
11923         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11924         Java specific checks.
11925         (generate_bytecode_insns): Test try_block for BLOCK before using
11926         BLOCK_EXPR_BODY.
11927         * parse.y (build_wfl_wrap): Added `location' argument. Set
11928         EXPR_WFL_LINECOL accordingly.
11929         (dim_expr:): Wrap constants with WFLs.
11930         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
11931         (resolve_package): Check for `stmt' not being a BLOCK before
11932         building a debuggable statement with it.
11933         (make_qualified_primary): Added extra parameter to build_wfl_wrap
11934         invocation.
11935         (resolve_field_access): Make sure `decl' is a DECL before treating
11936         it as such.
11937         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
11938         IDENTIFIER_NODE before treating it as such.
11939         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
11940         treating it as such.
11941         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
11942         to be applied only on non array types.
11943
11944 2000-06-16  Per Bothner  <per@bothner.com>
11945
11946         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
11947         define in terms of DECL_RESULT, as that fails when --enable-checking.
11948
11949 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11950
11951         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
11952         types the same in comparison.
11953         (CHECK_OP): Add static prototype.
11954
11955 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
11956
11957         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
11958         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
11959         * parse.c: Rebuilt.
11960
11961 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11962
11963         * decl.c (create_primitive_vtable): Prototype.
11964
11965         * jcf-write.c (generate_bytecode_insns): Initialize variable
11966         `saved_context'.
11967
11968         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
11969
11970 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11971
11972         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
11973         to track searched classes, and do not search the same class more than
11974         once. Call find_applicable_accessible_methods_list on immediate
11975         superclass, instead of search_applicable_method_list on all ancestors.
11976         Fix for PR gcj/238.
11977
11978 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
11979
11980         * parse.y (register_fields): Permit static fields in inner classes
11981         if they are final. Fix for PR gcj/255.
11982
11983 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11984
11985         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
11986         * parse.y (find_in_imports): Returned type changed to void,
11987         leading comment fixed.
11988         (register_package): New function.
11989         (qualify_and_find): Likewise.
11990         (package_declaration:): Use `register_package'.
11991         (single_type_import_declaration:): Removed local variable
11992         `node'. Added missing `;' for consistency.
11993         (type_import_on_demand_declaration:): Use `chainon' to link new
11994         entries.
11995         (lookup_field_wrapper): Lookup local variables defined in outer
11996         contexts first.
11997         (java_complete_class): Don't reverse the list of imported on demand.
11998         (do_resolve_class): Reorganized. Removed local variable
11999         `original_name'. Call `qualify_and_find' with the current package
12000         name, invoke `find_in_imports_on_demand' right after. Call
12001         `qualify_and_find' with the packages we've seen so far. Fixed
12002         operations numbering in comments.
12003         (java_expand_class): Don't reverse `package_list'.
12004         (find_most_specific_methods_list): New local variables `abstract'
12005         and `candidates'. Use them to pick the right method.
12006
12007 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
12008
12009         * parse.y (check_modifiers_consistency): Don't subtract out
12010         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12011
12012 2000-06-04  Philipp Thomas  <pthomas@suse.de>
12013
12014         * Makefile.in (INTLLIBS): New.
12015         (LIBS): Add above.
12016         (DEPLIBS): Ditto.
12017
12018 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12019
12020         * class.c (get_dispatch_table): Build the vtable dummy entry list
12021         element with a null purpose. Fixed leading comment.
12022         (build_dtable_decl): Build an accurate dtable type when appropriate
12023         and use it.
12024
12025 2000-06-02  Richard Henderson  <rth@cygnus.com>
12026
12027         * lang.c (lang_get_alias_set): New.
12028
12029 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12030
12031         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12032         before using it as the accessed field.
12033
12034 2000-05-31  Tom Tromey  <tromey@cygnus.com>
12035
12036         * java-tree.h (boolean_array_vtable, byte_array_vtable,
12037         char_array_vtable, short_array_vtable, int_array_vtable,
12038         long_array_vtable, float_array_vtable, double_array_vtable):
12039         Declare.
12040         * expr.c (get_primitive_array_vtable): New function.
12041         (create_primitive_vtable): New function.
12042         (java_lang_expand_expr): Enable code to statically generate
12043         arrays.
12044         * decl.c (init_decl_processing): Create primitive vtables.
12045         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12046         short_array_vtable, int_array_vtable, long_array_vtable,
12047         float_array_vtable, double_array_vtable): Define.
12048
12049 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
12050
12051         * java/parse.y (find_applicable_accessible_methods_list):
12052         Don't add an uninitialized value to the list.
12053
12054 2000-05-25  Tom Tromey  <tromey@cygnus.com>
12055
12056         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12057         when trying to see if field's class should be initialized.  Always
12058         initialize field's declaring class, not qualified class.
12059         For PR gcj/162.
12060
12061         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12062         `wfl_operator', to maybe_build_primttype_type_ref.
12063         Fixes PR gcj/235.
12064
12065 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
12066
12067         * parse.y (patch_method_invocation): Don't try to lookup methods
12068         in primitive types.
12069
12070 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12071
12072         * parse.y (resolve_field_access): Call the appropriate <clinit>
12073         before accessing the length of a static array. Craft a decl for
12074         the field while its time. Fixes PR gcj/129.
12075
12076 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12077
12078         * parse.y (resolve_package): Correctly set `*next' (was off by
12079         one.)
12080         (resolve_qualified_expression_name): Fixed comment.
12081
12082 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12083
12084         * jcf-parse.c (jcf_parse_source): Reset current_class and
12085         current_function_decl to NULL before parsing a new file.
12086
12087 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12088
12089         * parse.y (block_end:): If the collected block doesn't feature a
12090         statement, insert an empty statement.
12091
12092 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12093
12094         * parse.y (maybe_yank_clinit): New function.
12095         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12096         end of the list of methods belonging to a class.
12097         (java_complete_expand_method): Check whether <clinit> is really
12098         necessary and expand it accordingly.
12099
12100 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12101
12102         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12103         processed by the method's switch statement.
12104
12105 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12106
12107         * java-tree.h: Added init state enum.
12108         * decl.c (emit_init_test_initialization): Initialize class
12109         initialization check variable by looking at class' state.
12110
12111 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12112
12113         * java-tree.h (build_instanceof): Declare.
12114         (build_get_class): Declare.
12115         * parse.y (patch_binop): Use build_instanceof.
12116         * expr.c (build_instanceof): New function.  If class is final,
12117         don't make a function call.
12118         (expand_java_INSTANCEOF): Use it.
12119         (build_get_class): New function.
12120
12121 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
12122
12123         * jcf-write.c (generate_classfile): Scan the source_file for
12124         slashes with the right pointer variable.
12125
12126 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
12127
12128         * lang.c (lang_decode_option): Update -Wunused flags by calling
12129         set_Wunused.
12130         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12131
12132 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12133
12134         * check_init.c (check_init): Constify local char *.
12135         * class.c (push_class): Constify local char *.
12136         * java_tree.h: Update prototypes.
12137         * jcf-io.c (open_class): Constify filename parameter and
12138         return value.
12139         (find_class): Remove redundant string copy.  Cast return from
12140         open_class.
12141         * jcf-parse.c (read_class, parse_class_file, yyparse):
12142         Constify local char *.
12143         * jcf-write.c (generate_bytecode_insns, generate_classfile):
12144         Constify local char *.
12145         * jcf.h (JCF): Constify filename and classname.
12146         (JCF_FINISH): Cast args to FREE to char * when appropriate.
12147         * lang.c (init_parse): Constify parameter and return value.
12148         * lex.c (java_get_line_col): Constify filename parameter.
12149         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
12150         * parse.y (java_parser_context_suspend,
12151         issue_warning_error_from_context, safe_layout_class): Constify
12152         local char *.
12153         * parse.c: Regenerate.
12154
12155 2000-05-08  Tom Tromey  <tromey@cygnus.com>
12156
12157         * expr.c (build_jni_stub): Cache the result of
12158         _Jv_LookupJNIMethod.
12159
12160 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12161
12162         * decl.c (predef_filenames_size): Now 7.
12163         (predef_filenames): New seventh entry.
12164
12165 2000-05-04  Tom Tromey  <tromey@cygnus.com>
12166
12167         * boehm.c (mark_reference_fields): Don't mark RawData fields.
12168         Keep track of when we've seen a reference field after a
12169         non-reference field.
12170         (get_boehm_type_descriptor): Handle case where we see
12171         non-reference fields but no trailing reference field.
12172         * decl.c (rawdata_ptr_type_node): Define.
12173         (init_decl_processing): Initialize rawdata_ptr_type_node.
12174         * java-tree.h (rawdata_ptr_type_node): Declare.
12175
12176 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12177
12178         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12179         specifiers in calls to fprintf.
12180
12181 2000-05-03  Andrew Haley  <aph@cygnus.com>
12182
12183         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12184
12185         * javaop.h (WORD_TO_INT): New function.
12186         (IMMEDIATE_s4): Use WORD_TO_INT.
12187         * jcf.h (JPOOL_INT): Ditto.
12188
12189         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12190         separator.
12191
12192 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12193
12194         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12195         on native function.
12196         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12197         JNI methods.
12198         * expr.c (build_jni_stub): New function.
12199         * lang-specs.h: -fjni and -femit-class-file are incompatible.
12200         * parse.c: Rebuilt.
12201         * parse.y (java_complete_expand_methods): Expand a native method
12202         and call build_jni_stub if -fjni given.
12203         * lang-options.h: Document -fjni.
12204         * lang.c (flag_jni): New global.
12205         (lang_f_options): Added `jni' entry.
12206         * java-tree.h (soft_lookupjnimethod_node,
12207         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12208         Declare.
12209         (flag_jni): Declare.
12210         (build_jni_stub): Declare.
12211         (struct lang_decl): Added `native' flag.
12212         (METHOD_NATIVE): Redefined to use `native' field of lang specific
12213         structure.
12214         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12215         soft_jnipopsystemframe_node): New globals.
12216         (init_decl_processing): Set them.  _Jv_InitClass only takes one
12217         argument.
12218
12219         * java-tree.def: Put into `C' mode.
12220
12221 2000-04-27  Tom Tromey  <tromey@cygnus.com>
12222
12223         Fix for PR gcj/2:
12224         * expr.c (expand_invoke): Generate check to see if object pointer
12225         is null in nonvirtual invocation case.
12226         * java-tree.h (soft_nullpointer_node): Declare.
12227         * decl.c (soft_nullpointer_node): New global.
12228         (init_decl_processing): Initialize soft_nullpointer_node.
12229         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12230         or `private' methods.
12231         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12232
12233 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12234
12235         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12236         from <clinit>
12237
12238 2000-04-26  Tom Tromey  <tromey@cygnus.com>
12239
12240         * zextract.c (find_zip_file_start): New function.
12241         (read_zip_archive): Use it.
12242
12243 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12244
12245         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12246
12247 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12248
12249         * class.c (common_enclosing_context_p): New function.
12250         * java-tree.h (common_enclosing_context_p): Added prototype.
12251         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12252         classes sharing an outer context with the current instance.
12253         * parse.y (build_access_to_thisn): Fixed leading comment.
12254         (verify_constructor_super): New local `supper_inner'. Skip
12255         enclosing context argument in the case of inner class constructors.
12256         (patch_method_invocation): Insert proper context as second
12257         parameter to pure inner class constructor super invocations.
12258
12259 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12260
12261         * parse.y (end_class_declaration): Reset the interface number
12262         counter.
12263
12264 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12265
12266         * parse.y (source_start_java_method): Deleted unnecessary code.
12267         (patch_method_invocation): Fixed comment.
12268
12269 2000-04-24  Robert Lipe <robertlipe@usa.net>
12270
12271         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12272
12273 2000-04-23  Tom Tromey  <tromey@cygnus.com>
12274
12275         * boehm.c (mark_reference_fields): Use int_byte_position.
12276
12277 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12278
12279         * boehm.c (mark_reference_fields): Only call byte_position on
12280         non-static fields.
12281
12282 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12283
12284         * boehm.c (mark_reference_fields): Added `last_view_index'
12285         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
12286
12287 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
12288
12289         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12290         * parse.y (check_class_interface_creation): Fixed comments. Select
12291         permitted modifiers for (inner) interfaces. Changed error message
12292         to report rejected modifiers used with local classes.
12293
12294 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12295
12296         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12297         of directly inherited type considered in scope.
12298         * parse.y (do_resolve_class): Search inherited classes for inner
12299         classes.
12300
12301 2000-04-20  Tom Tromey  <tromey@cygnus.com>
12302
12303         * parse.y (not_accessible_p): Use member's class, not current
12304         class, when doing inheritance check for protected reference.
12305         Fixes PR gcj/124.
12306
12307 2000-04-20  Jason Schroeder  <shrode@subnature.com>
12308
12309         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12310
12311 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12312
12313         * parse.y (lookup_field_wrapper): Search for final local aliases.
12314         (resolve_expression_name): Let lookup_field_wrapper search for
12315         final local aliases. Force the value of `name' if one is found.
12316         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12317         an expression name. Fixed comments.
12318
12319 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12320
12321         * parse.y (yyerror): `msg' can be null, don't use it in that case.
12322
12323 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12324
12325         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12326
12327 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12328
12329         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12330
12331 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12332
12333         PR gcj/211:
12334         * gjavah.c (utf8_cmp): Changed return value.
12335         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12336         result.
12337         (cxx_keywords): New global.
12338         (get_field_name): Handle new result of cxx_keyword_subst.
12339         (print_method_info): Likewise.
12340
12341 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12342
12343         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12344         with a newline, for CNI.
12345         (print_stub_or_jni): Print a space or newline before method name for
12346         CNI as well as JNI.
12347         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12348         (process_file): Include gcj/cni.h if generating CNI stubs.
12349
12350 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12351
12352         * gjavah.c (decompile_method): Use print_field_name.
12353         Fixes PR gcj/205.
12354
12355 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12356
12357         * parse.y (java_expand_classes): Reverse the package list once.
12358         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12359         reduction.
12360         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12361         the `==' and `!=' operators.
12362
12363 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12364
12365         * jcf-write.c (generate_bytecode_insns): At invocation time,
12366         always relate an interface method to the type of its selector.
12367
12368 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12369
12370         Fix for PR gcj/2:
12371         * expr.c (expand_invoke): Generate check to see if object pointer
12372         is null in nonvirtual invocation case.
12373         * java-tree.h (soft_nullpointer_node): Declare.
12374         * decl.c (soft_nullpointer_node): New global.
12375         (init_decl_processing): Initialize soft_nullpointer_node.
12376         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12377         or `private' methods.
12378         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12379
12380 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12381
12382         Fix for PR gcj/140:
12383         * parse.y (check_final_assignment): Recognize assignments to the
12384         `length' field of an array when generating class files.
12385
12386 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12387
12388         * class.c (decl_hash): Prototype removed.
12389         (decl_compare): Likewise.
12390
12391 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12392
12393         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12394         * parse.y (check_modifiers_consistency): Check for final/volatile
12395         clash.  Fixes PR gcj/164.
12396
12397 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12398
12399         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12400         made global.
12401         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12402         global.
12403         (add_method_1): Use `java_hash_hash_tree_node' and
12404         `java_hash_compare_tree_node'.
12405         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12406         (java_hash_compare_tree_node): Likewise.
12407         * parse.y (find_applicable_accessible_methods_list): Create,
12408         delete and use a hash table to remember already searched interfaces.
12409
12410 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12411
12412         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12413         with latest entry.
12414
12415 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12416
12417         * boehm.c (mark_reference_fields, set_bit): Prototype.
12418         (set_bit): Un-ANSI-fy definition.
12419
12420         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12421         Prototype.
12422
12423         * decl.c (emit_init_test_initialization): Likewise.
12424
12425         * gjavah.c (jni_print_char): Likewise.
12426
12427         * parse.y (create_new_parser_context): Likewise.
12428
12429 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12430
12431         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12432         patch missing hunk. Fixed indentation.
12433
12434 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12435
12436         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12437         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12438
12439 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12440
12441         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12442         when negative *before* using it as an array index.
12443         * ChangeLog: Fixed typo.
12444
12445 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12446
12447         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12448         to 0 when it reaches -1.
12449
12450 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12451
12452         * jcf-parse.c (get_constant): Properly cast `num' during the
12453         invocation of `add_double'.
12454         * jcf-write.c (push_long_const): Properly cast `lo' before
12455         comparing it to short bounds.
12456         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12457         `interface_body:' is reduced after the current interface is
12458         pushed.
12459
12460 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12461
12462         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12463         Java-specific `-f' option.
12464
12465 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12466
12467         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12468         Adjust order of making types.
12469         Make bitsize_*_node values.
12470
12471 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12472
12473         * class.c (make_field_value): Use byte_position.
12474         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12475         (java_array_data_offset): Likewise.
12476         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12477         bzero call.
12478
12479 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12480
12481         * parse.y (check_abstract_method_definitions): New local
12482         `end_type_reached'. Make sure we also consider `end_type'.
12483         (java_check_abstract_method_definitions): Make sure we eventually
12484         consider `java.lang.Object'.
12485         (maybe_use_access_method): Don't use access method if not in the
12486         context of a pure inner class or if the method's context is right.
12487         (find_applicable_accessible_methods_list): New static flag
12488         `object_done'. Don't search abstract classes as interfaces. Fixed
12489         indentation. Fixed the `java.lang.Object' only search. Search
12490         class interface(s) first, then fully search enclosing contexts.
12491         (find_most_specific_methods_list): Pick the closest candidate when
12492         they're all abstract.
12493
12494 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12495
12496         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12497         properly initialize `finished_label'. Don't emit gotos for empty
12498         try statements.
12499
12500 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12501
12502         * except.c (emit_handlers): Clear catch_clauses_last.
12503
12504 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12505
12506         * parse.y (check_method_types_complete): New function.
12507         (create_class): Reset anonymous class counter only when seeing an
12508         non inner classe.
12509         (java_complete_class): JDEP_METHOD: Don't recompute signature
12510         if incomplete.
12511
12512 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12513
12514         * class.c (build_static_ref): Fixed indentation in comment.
12515         * java-tree.def (TRY_EXPR): Fixed typo in name.
12516         (CLASS_LITERAL): Likewise.
12517         * java-tree.h: (TYPE_DOT_CLASS): New macro.
12518         (struct lang_type): New field `dot_class'.
12519         * jcf-write.c (generate_bytecode_insns): Fixed error message.
12520         (generate_classfile): Method `class$' is synthetic.
12521         * parse.y (build_do_class_method): New function.
12522         (build_dot_class_method_invocation): Likewise.
12523         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12524         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12525         (qualify_ambiguous_name): Likewise.
12526         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12527         (build_try_statement): Fixed leading comment.
12528
12529 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12530
12531         * class.c (make_field_value): Properly handle sizes.
12532         (get_dispatch_vector): Use tree_low_cst and host_integerp.
12533         (layout_class_method): Count using trees.
12534         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12535         * expr.c (java_array_data_offset): Use int_bit_position.
12536         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12537         (build_invokevirtual): Use tree_low_cst and do computations with trees.
12538
12539 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12540
12541         * lang.c (flag_hash_synchronization): New global.
12542         (lang_f_options): Added `hash-synchronization'.
12543         * lang-options.h: Mention -fhash-synchronization.
12544         * java-tree.h (flag_hash_synchronization): Declare.
12545         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12546         hash table synchronization is disabled.
12547         * decl.c (init_decl_processing): Only push `sync_info' value when
12548         hash table synchronization is disabled.
12549         * class.c (make_class_data): Only push `sync_info' field when hash
12550         table synchronization is disabled.  Removed dead code.
12551
12552 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12553
12554         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12555
12556 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12557
12558         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12559         classes.
12560         * parse.y (patch_method_invocation): Handle anonymous classes
12561         creation in static context.
12562
12563 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12564
12565         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12566         * parse.y (resolve_qualified_expression_name): Use it.
12567         (patch_method_invocation): Likewise.
12568
12569 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12570
12571         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12572         depending on the type of dependency which dictates what the
12573         current class is.
12574         (unresolved_type_p): Resolved types limited to the current class.
12575
12576 2000-03-15  Tom Tromey  <tromey@cygnus.com>
12577
12578         * decl.c (init_decl_processing): Set type of `sync_info' to be
12579         pointer to Object.
12580
12581         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12582         Correctly compute bit number for current slot.  Zero `high' and
12583         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
12584         mark_reference_fields.
12585         (mark_reference_fields): New function.
12586
12587 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12588
12589         * parse.y (register_incomplete_type): Fixed initialization of
12590         JDEP_ENCLOSING.
12591
12592 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12593
12594         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12595         static globals.
12596         (push_class_context, pop_class_context): New function.
12597         (class_body:): Call pop_class_context.
12598         (interface_body:): Likewise.
12599         (INNER_QUALIFIER): New macro.
12600         (report_class_declaration): Changed output format and use
12601         INNER_QUALIFIER. Call push_class_context.
12602
12603 2000-02-14  Andrew Haley  <aph@cygnus.com>
12604
12605         * check-init.c (check_init): Add new cases for unary and binary
12606         tree nodes.
12607
12608 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12609
12610         * parse.y (resolve_package): Set `next' once a type name has been
12611         progressively discovered.
12612         (resolve_qualified_expression_name): Propagate resolution only if
12613         there are remaining qualifiers. Take into account `q' might have
12614         been cleared after re-qualification.
12615         * parse.y (patch_method_invocation): New local `resolved'.
12616         Section dealing with qualified expression rewritten to use
12617         resolve_field_access.
12618
12619 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12620
12621         * parse.h (PUSH_CPC): Fixed indentation.
12622         (DEBUG_CPC): New macro.
12623         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12624         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12625         * parse.y (class_body_declaration:): Use
12626         SET_CPC_INSTANCE_INITIALIZER_STMT.
12627         (method_declaration:): Check for null current_function_decl.
12628         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12629         (java_parser_context_pop_initialized_field): Better handling of
12630         empty lists.
12631         (maybe_make_nested_class_name): Mark nested class name as
12632         qualified when necessary.
12633         (end_class_declaration): Don't call java_parse_context_resume when
12634         one or more error occurred.
12635         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12636         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12637         SET_CPC_INITIALIZER_STMT.
12638         (method_header): Check for inner classes declaring static methods.
12639         (resolve_qualified_expression_name): Handle situation where `this'
12640         is implied.
12641
12642 2000-03-13  Hans Boehm <boehm@acm.org>
12643
12644         * typeck.c (build_prim_array_type): Correctly set the high word too.
12645
12646 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12647
12648         * parse.y (java_complete_expand_methods): Leave <clinit> out of
12649         ordinary methods.
12650         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12651         list of methods for interfaces.
12652
12653 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12654
12655         * parse.y (qualify_ambiguous_name): Properly handle expressions
12656         using `null'.
12657
12658 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12659
12660         * parse.y (check_final_assignment): Extended to process
12661         COMPOUND_EXPR.
12662         (patch_assignment): Have check_final_assignment called only once.
12663
12664 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12665
12666         * java-tree.h (IS_INIT_CHECKED): New flag.
12667         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
12668         * parse.y (patch_string): Call force_evaluation_order on the
12669         completed string concatenation tree.
12670         * expr.c (force_evaluation_order): Call force_evaluation_order on
12671         function's arguments too.
12672
12673 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12674
12675         * decl.c (emit_init_test_initialization): Mark KEY as unused.
12676         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12677         (build_anewarray): Likewise.
12678         * parse.y (patch_newarray): Likewise.
12679         * parse.c: Regenerated.
12680
12681 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
12682
12683         * decl.c (init_decl_processing): Added new class fields `depth',
12684         `ancestors', and `idt' to class_type_node. Use
12685         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
12686         * class.c (make_class_data): Push initial values for new fields.
12687         * java-tree.h: Updated prototype for `build_invokeinterface'.
12688         * expr.c (build_invokeinterface): Changed parameters to accept
12689         `method' tree. Calculate index of `method' in its declaring
12690         interface. Build call to _Jv_LookupInterfaceMethodIdx.
12691         (expand_invoke): Call `build_invokeinterface' with new parameters.
12692         * parse.y (patch_invoke): Call `build_invokeinterface' with new
12693         parameters.
12694
12695 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
12696
12697         * typeck.c (lookup_do): Search superinterfaces first
12698         when looking up an interface method. From Godmar Back
12699         <gback@cs.utah.edu>
12700
12701 2000-03-06  Tom Tromey  <tromey@cygnus.com>
12702
12703         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12704
12705 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12706
12707         * java-tree.h (lookup_argument_method2): Declared.
12708         (safe_layout_class): Prototype moved from parse.h.
12709         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
12710         * parse.y (java_check_regular_methods): Local `super_class' gone.
12711         Call lookup_argument_method2 instead of lookup_argument_method.
12712         Perform modifier match for methods found declared in implemented
12713         interfaces. Fixed indentation problem. Overriding/hiding error
12714         report to take place only for methods found in classes.
12715         * typeck.c (lookup_argument_method): Changed leading
12716         comment. Re-written by calling lookup_do.
12717         (lookup_argument_method2): New function.
12718         (lookup_java_method): Re-written by calling lookup_do.
12719         (lookup_do): New function.
12720
12721 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12722
12723         * check-init.c (check_init): Removed dead code. Handle (blank)
12724         final variables.
12725         * parse.y (declare_local_variables): New local `final_p', set it
12726         and use it to initialize LOCAL_FINAL.
12727         (check_final_assignment): Only check FIELD_DECLs.
12728
12729 2000-02-17  Tom Tromey  <tromey@cygnus.com>
12730
12731         * Makefile.in (JAVA_OBJS): Added boehm.o.
12732         (boehm.o): New target.
12733         * Make-lang.in (JAVA_SRCS): Added boehm.c.
12734         * java-tree.h (flag_use_boehm_gc): Declare.
12735         (get_boehm_type_descriptor): Declare.
12736         * lang.c (lang_f_options): Added `use-boehm-gc'.
12737         (flag_use_boehm_gc): New global.
12738         * lang-options.h: Added -fuse-boehm-gc.
12739         * boehm.c: New file.
12740         * class.c (get_dispatch_table): If class uses a Boehm type
12741         descriptor, put it in the vtable.
12742         (make_class_data): Removed dead code.
12743
12744 2000-03-03  Per Bothner  <per@bothner.com>
12745
12746         * decl.c (init_decl_processing):  Initialize sizetype properly.
12747
12748 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12749
12750         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
12751         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
12752         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12753         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
12754         (jcf_parse): New local `current'. Load innerclasses seen in outer
12755         context being processed.
12756         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12757         * jcf-write.c (append_innerclasses_attribute): New function.
12758         (append_innerclasses_attribute_entry): Likewise.
12759         (get_access_flags): Handle static classes. Set anonymous and local
12760         classes to be private.
12761         (generate_classfile): Attribute count adjusted. Call
12762         append_innerclasses_attribute.
12763         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
12764         PURE_INNER_CLASS_TYPE_P.
12765         * parse.y (parser_qualified_classname): New parameter `is_static',
12766         produce non qualified name accordingly.
12767         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
12768         (create_interface): Added argument to parser_qualified_classname.
12769         (create_class): Added argument to parser_qualified_classname. Setup
12770         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
12771         (add_inner_class_fields): Fixed indentation.
12772         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
12773         (method_declarator): Fixed typo in comment.
12774         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
12775         (build_current_thisn): Likewise.
12776         (patch_method_invocation): Likewise.
12777
12778 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12779
12780         * decl.c (current_function_decl): Move to toplev.c.
12781
12782 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12783
12784         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
12785         (DECL_BIT_INDEX): Use underlying representation.
12786         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
12787
12788 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12789
12790         * expr.c (build_java_ret): Pass proper type to size_binop.
12791
12792 2000-02-25  Anthony Green  <green@cygnus.com>
12793
12794         * expr.c (build_class_init): Mark the decl to be ignored by
12795         check_init.
12796         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
12797         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
12798         * class.c (init_test_hash_newfunc): New function.
12799         (decl_hash): New function.
12800         (decl_compare): New function.
12801         * decl.c (emit_init_test_initialization): New function.
12802         (complete_start_java_method): Traverse the init test hashtable,
12803         calling emit_init_test_initialization.
12804         (always_initialize_class_p): Define.
12805         * expr.c (build_class_init): Use initialization tests when
12806         emitting class initialization code.
12807         (always_initialize_class_p): Declare.
12808         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
12809         1.
12810         * java-tree.h: Include hash.h.
12811         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
12812         (struct lang_decl): Add init_test_table field.
12813         (init_test_hash_entry): Define.
12814
12815 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12816
12817         * gjavah.c (main): Avoid using `argi' to report unimplemented
12818         options.
12819
12820 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12821
12822         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12823         initialize locals to avoid warnings. Local `exception_type' moved
12824         into if statement.
12825
12826 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12827
12828         * parse.y (resolve_expression_name): Use `orig' as a second
12829         argument to resolve_field_access.
12830         (resolve_field_access): Removed unnecessary code when dealing with
12831         static fields.
12832
12833 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12834
12835         * class.c (push_super_field): Don't push the field twice.
12836         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
12837         * parse.h (java_reorder_fields): Prototyped.
12838         * parse.y (java_reorder_fields): New function.
12839         (java_layout_class): Simplified not to worry about re-ordering.
12840
12841 2000-02-23  Tom Tromey  <tromey@cygnus.com>
12842
12843         * gjavah.c (print_name): In JNI case, correctly quote string.
12844         (print_method_info): Don't handle overrides in JNI mode.
12845
12846 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12847
12848         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
12849         value type set to `boolean_type_node'.
12850
12851 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12852
12853         * jcf-dump.c (main): Test for correct condition after
12854         output file creation.
12855
12856 2000-02-19  Anthony Green  <green@cygnus.com>
12857
12858         * jcf-depend.c (add_entry): Fix test for first list entry.
12859
12860 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12861
12862         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
12863         * constants.c (build_constants_constructor): Likewise.
12864
12865 2000-02-19  Anthony Green  <green@cygnus.com>
12866
12867         * jcf-depend.c (add_entry): Add entries to the end of the list.
12868
12869 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
12870
12871         * decl.c (INT_TYPE_SIZE): Define if necessary.
12872         (expand_java_return): Handle the case of a native integer smaller
12873         than a JVM integer.
12874
12875 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12876
12877         * gjavah.c (help): Use GCCBUGURL.
12878         * jv-scan.c (help): Likewise.
12879         * jcf-dump.c (help): Likewise.
12880
12881 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12882
12883         * jcf-write.c (generate_bytecode_insns): Don't generate empty
12884         `finally' clauses.
12885
12886 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12887
12888         * jcf-parse.c (load_class): Call `fatal' if no file containing
12889         the target class are found.
12890
12891 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
12892
12893         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
12894         lex.c, lex.h, and PARSE_H to...
12895         (parse.o, parse-scan.o): ...here, respectively.
12896
12897         * lex.c: Split out code that may trigger SIGFPE from yylex()
12898         to its own function.
12899         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
12900
12901 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12902
12903         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
12904
12905 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12906
12907         * parse.y (outer_field_access_p): Stop in time when outer contexts
12908         are exhausted.
12909         (resolve_qualified_expression_name): Properly qualify *everything*
12910         after a package.type to be resoled as expression names.
12911         (find_applicable_accessible_methods_list): Save/restore `class' to
12912         isolate it from a possible outer context search.
12913
12914 2000-02-15  Tom Tromey  <tromey@cygnus.com>
12915
12916         * gjavah.c (jni_print_char): New function.
12917         (print_full_cxx_name): Use it.
12918         (decode_signature_piece): Likewise.
12919         (print_cxx_classname): Likewise.
12920
12921 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12922
12923         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
12924         version.o.
12925         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
12926
12927         * gjavah.c: Include version.h.
12928
12929         * jcf-dump.c: Likewise.
12930
12931         * jv-scan.c: Likewise.
12932
12933 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12934
12935         * parse.y (outer_field_access_fix): First parameter now a tree
12936         node. Check for assignment to final. First argument to
12937         build_outer_field_access_fix modified to accommodate prototype.
12938         (build_outer_field_access): Don't check for assignment to final
12939         here.
12940         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
12941         possibly returned by outer_field_access_fix. Changed
12942         outer_field_access_fix's first argument.
12943         (check_final_assignment): $finit$'s context is OK.
12944         (patch_unaryop): Use node instead of its line/column value when
12945         calling outer_field_access_fix.
12946
12947 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12948
12949         * parse.y (interface_declaration:): No longer tagged
12950         <node>. Re-installed default action.
12951         (class_member_declaration:): Handle inner interfaces.
12952         (interface_member_declaration): Handle inner interfaces and
12953         classes.
12954         (create_interface): Push error if one seen. Suspend parsing
12955         context when processing an inner interface.
12956         (register_fields): Inner class static field limitations not to
12957         apply to inner interfaces.
12958
12959 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12960
12961         * jcf-parse.c (load_class): Update `java_error_count' when a
12962         class' file can't be found.
12963         (parse.y): Avoid (byte)code generation when errors seen.
12964
12965 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12966
12967         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
12968         decodes a valid node.
12969         (patch_binop): Handle TRUNC_DIV_EXPR.
12970
12971 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12972
12973         * parse.y (resolve_package): New local `acc'. Try to progressively
12974         build and guess a package and type name.
12975
12976 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12977
12978         * parse.y (find_applicable_accessible_methods_list): Load and
12979         layout the search class if necessary.
12980         (java_complete_tree): Keep to original type of the folded initial
12981         value.
12982
12983 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12984
12985         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
12986         Generate error message if circularity is detected. New static
12987         local `list'.
12988         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
12989         * jcf-write.c (generate_bytecode_insns): Very simply handle
12990         SAVE_EXPR.
12991         * parse.y (java_check_circular_reference): Use
12992         `cyclic_inheritance_report' during report, if necessary.
12993         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
12994         walking NEW_ARRAY_INIT twice.
12995
12996 2000-02-09  Tom Tromey  <tromey@cygnus.com>
12997
12998         * parse.y (check_class_interface_creation): Allow inner classes to
12999         be `private' or `protected', check modifiers' consistency. Prevent
13000         block local classes from bearing any modifiers.
13001
13002 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13003
13004         * except.c (check_start_handlers): Re-add prototype lost in last
13005         patch.
13006         (maybe_start_try): Remove excess argument to `check_start_handlers'.
13007
13008 2000-02-09  Andrew Haley  <aph@cygnus.com>
13009
13010         * decl.c (clear_binding_level): Remove excess initializer.
13011         (maybe_poplevels): Remove unused variable.
13012         (force_poplevels): Ditto.
13013         (struct binding_level): Add comment.
13014
13015 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13016
13017         * jcf-write.c (generate_classfile): Don't consider
13018         pre-initialization with reference value (use <clinit> instead.)
13019         * parse.y (java_fix_constructors): No generated constructor for
13020         interfaces.
13021         (build_outer_field_access): Removed debug message.
13022         (outer_field_expanded_access_p): Adapted to bytecode generation.
13023         (build_outer_field_access_method): Use fix_method_argument_names.
13024         (build_outer_method_access_method): Fixed indentation. Added
13025         comment. Handle access method generation for static and also void
13026         methods.
13027         (build_access_to_thisn): Inserted debug message.
13028         (maybe_build_thisn_access_method): Use fix_method_argument_names.
13029         (resolve_qualified_expression_name): Fixed comment.
13030         (not_accessible_p): Adapted to bytecode generation. Added comment.
13031         (patch_method_invocation): Added comment.
13032         (maybe_use_access_method): Fixed leading comment. Handle static
13033         methods.
13034         (java_complete_lhs): Don't shortcut handling of initialized upon
13035         declaration String type static fields when generating bytecode.
13036         (patch_unaryop): Handle outer field access when generating
13037         bytecode.
13038
13039 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13040
13041         * java-tree.h (FIELD_THISN): New macro.
13042         * jcf-write.c (append_synthetic_attribute): New function.
13043         (generate_classfile): Set "Synthetic" attribute on this$<n>,
13044         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13045         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13046         this$<n> fields.
13047         (build_outer_field_access): Turned on access functions usage and
13048         generation when compiling to bytecode.
13049         (maybe_use_access_method): Likewise.
13050
13051 2000-01-25  Andrew Haley  <aph@cygnus.com>
13052
13053         * java-except.h (struct eh_range): Add `expanded' field.
13054         (maybe_start_try): Add end_pc arg.
13055         (maybe_end_try): Ditto.
13056         * java-tree.h (force_poplevels): new function.
13057         * expr.c (expand_byte_code): Don't call maybe_start_try or
13058         maybe_end_try.
13059         * except.c (add_handler): Reset expanded.
13060         (expand_start_java_handler): Set expanded.
13061         (check_start_handlers): Don't expand a start handler that's
13062         already been expanded.
13063         (maybe_start_try): Add end_pc arg.  Only expand a handler which
13064         ends after end_pc.
13065         (expand_end_java_handler): call force_poplevels.
13066         (force_poplevels): new function.
13067         * decl.c (binding_level): Add start_pc of binding level.
13068         (maybe_pushlevels): Call maybe_start_try when pushing binding
13069         levels.
13070         (maybe_poplevels): Call maybe_end_try when popping binding levels.
13071         (LARGEST_PC): Define.
13072         (clear_binding_level): Use LARGEST_PC.
13073
13074         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13075         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13076         (binding_depth, is_class_level, current_pc): new variables.
13077         (struct binding_level): ditto.
13078         (indent): new function.
13079         (push_jvm_slot): add debugging info.
13080         (maybe_pushlevels): ditto.
13081         (maybe_poplevels): ditto.
13082         (pushlevel): ditto.
13083         (poplevel): ditto.
13084         (start_java_method): ditto.
13085         (give_name_to_locals): comment only.
13086         * except.c (binding_depth, is_class_level, current_pc):
13087         new variables.
13088         (expand_start_java_handler): add debugging info.
13089         (expand_end_java_handler): ditto.
13090
13091 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13092
13093         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13094         (print_name_for_stub_or_jni, process_file): Constify a char*.
13095
13096 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13097
13098         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13099
13100 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13101
13102         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13103         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13104         defined to be 1.
13105
13106 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13107
13108         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13109         * java-tree.h (TYPE_II_STMT_LIST): New macro.
13110         (struct lang_type): New field `ii_block'.
13111         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13112         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13113         * parse.h (struct parser_ctxt): New field `instance_initializers'.
13114         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13115         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13116         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13117         macros.
13118         * parse.y (add_instance_initializer): New function.
13119         (in_instance_initializer): New static global.
13120         (class_body_declaration:): Link instance initializer block.
13121         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13122         (array_creation_expression:): Remove unused local.
13123         (java_parser_context_push_initialized_field): Fixed leading
13124         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13125         CPC_INSTANCE_INITIALIZER_LIST.
13126         (java_parser_context_pop_initialized_field): Likewise.
13127         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13128         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13129         CPC_INITIALIZER_STMT.
13130         (fix_constructors): New local `class_type'. Use it. Call
13131         add_instance_initializer.
13132         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13133         (patch_return): Forbid return in instance initializers.
13134         (patch_throw_statement): Enforce exception handling in the context
13135         of instance initializers.
13136
13137 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13138
13139         * Make-lang.in (java.mostlyclean): Remove executables in
13140         `mostlyclean'.
13141
13142 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13143
13144         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13145         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13146         (java_float_finite): Convert to use union Word from javaop.h.
13147         (java_double_finite): Convert to use union DWord from javaop.h.
13148
13149 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13150
13151         * gjavah.c (options): Added `jni' entry.
13152         (help): Document -jni.
13153         (flag_jni): New global.
13154         (process_file): Handle JNI output.  Don't print text from
13155         -prepend, -add, etc, when generating stubs.  Only remove `.class'
13156         suffix if it actually exists.
13157         (main): Create a `.c' file when run with `--jni --stubs'.  Create
13158         correct output file name with `--jni'.
13159         (print_include): Mangle header name differently in JNI case.
13160         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13161         method list.
13162         (print_method_info): Handle JNI case.  Put signature info into
13163         method name.  Handle case when STREAM is NULL.
13164         (print_name_for_stub_or_jni): New function.
13165         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
13166         (print_cxx_classname): Handle JNI.
13167         (print_full_cxx_name): Likewise.
13168         (decode_signature_piece): Likewise.
13169         (overloaded_jni_method_exists_p): New function.
13170         (struct method_name): Added `signature' and `sig_length' fields.
13171         (HANDLE_END_FIELD): Do nothing in JNI mode.
13172
13173 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13174
13175         * jv-scan.c: Include version.c, <getopt.h>.
13176         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13177         (options): New array.
13178         (usage): New function.
13179         (version): New function.
13180         (main): Use getopt_long to parse command line.
13181         * jcf-dump.c: Include version.c, <getopt.h>.
13182         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13183         OPT_JAVAP): New macros.
13184         (options): New array.
13185         (usage): Return `void'.  Changed message.
13186         (help): New function.
13187         (version): New function.
13188         (main): Use getopt_long_only to parse command line.
13189         * gjavah.c: Include <getopt.h>.
13190         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13191         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13192         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13193         (options): New array.
13194         (java_no_argument): Removed.
13195         (help): Updated with missing options.
13196         (main): Use getopt_long_only to parse command line.
13197         (usage): Changed message.
13198
13199 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13200
13201         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13202         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13203         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13204         * parse.y (array_creation_expression:): Handle anonymous arrays.
13205         (build_array_from_name): Don't set `ret_name' if null.
13206         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13207         (qualify_ambiguous_name): Likewise.
13208         (java_complete_expand_class): Likewise.
13209
13210 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13211
13212         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13213         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13214         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13215         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13216         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13217         AIPL_FUNCTION_COMPLETED_INVOCATION.
13218         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13219         AIPL_FUNCTION_INVOCATION_READY.
13220         (AIPL_FUNCTION_DECLARATION): New enum entry.
13221         * parse.y (reorder_static_initialized): New function.
13222         (java_parser_context_pop_initialized_field): Use it.
13223         (add_inner_class_fields): Use
13224         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13225         augmented. Install marker after last alias initializer, if any.
13226         (generate_finit): Fixed typo. Don't try to retain only the used
13227         fields.
13228         (method_header): Compute and set DECL_FUNCTION_NAP.
13229         (method_declarator): Fixed comment. Insert alias initializer in
13230         parameter list.
13231         (build_alias_initializer_parameter_list): Fixed leading
13232         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13233         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13234         (java_complete_expand_class): Code to retain only used aliases
13235         removed.
13236         (java_complete_expand_methods): New local `first_decl'. Generate
13237         $finit$ first, then expand the constructors, regular methods and
13238         <clinit>.
13239         (java_complete_expand_method): Don't report error on missing
13240         return statement if previously detected bogus.
13241         (fix_constructors): Don't patch constructor parameters list.
13242         (patch_method_invocation): Use new AIPL enum values. Reverse
13243         alias initializer list for anonymous classes.
13244
13245 2000-01-30  Anthony Green  <green@redhat.com>
13246
13247         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13248         determine how many stack slots to pop.
13249
13250 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13251
13252         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13253         error handling/recovery.
13254         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13255
13256 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13257
13258         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13259         FIELD_LOCAL_ALIAS_USED): New macros.
13260         (DECL_FUNCTION_NAP): New macro.
13261         (struct lang_decl): New field `nap'.
13262         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13263         (struct lang_type): New fields `finit_stmt_list' and
13264         `clinit_stmt_list'.
13265         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13266         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13267         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13268         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13269         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13270         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13271         (BUILD_THROW): Macro line separator re-indented.
13272         * parse.y (end_class_declaration): New function.
13273         (maybe_generate_pre_expand_clinit): New name for
13274         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13275         pre-expand static fields.
13276         (maybe_generate_clinit): Function deleted.
13277         (check_for_static_method_reference): Prototype's parameter list
13278         indented.
13279         (generate_finit): New name for maybe_generate_finit. Changed
13280         leading comment. Function rewritten to use
13281         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13282         (build_alias_initializer_parameter_list): New function.
13283         (java_parser_context_pop_initialized_field): Likewise.
13284         (add_inner_class_fields): Likewise.
13285         (type_declaration:): Call end_class_declaration.
13286         (class_member_declaration:): Likewise.
13287         (formal_parameter_list:): Fixed typos.
13288         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13289         element. Improved error handling.
13290         (block_statement:): Call end_class_declaration.
13291         (anonymous_class_creation:): Likewise.
13292         (create_anonymous_class): Fixed comments.
13293         (create_class): Call add_inner_class_fields.
13294         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13295         (method_header): Use MARK_FINAL_PARMS.
13296         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13297         (method_declarator): Propagate final argument flag.
13298         (craft_constructor): New local `artificial'. Call
13299         build_alias_initializer_parameter_list. Use
13300         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13301         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13302         necessary.
13303         (complete_expand_class): Get rid of unused outer context local
13304         alias fields.
13305         (java_complete_expand_methods): Fixed leading
13306         comment. Generate/pre-expand <clinit> first. Changed method
13307         expansion order to regular, $finit$, constructors, <clinit>.
13308         (java_complete_expand_method): Set current_function_decl.
13309         (fix_constructors): Fix constructor parameter list to account for
13310         outer context local alias initializers.
13311         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13312         (resolve_expression_name): Lookup outer context local aliases. New
13313         local `access', use it.
13314         (patch_method_invocation): Patch inner class ctor invocation with
13315         outer context local aliases initialization values. $finit$
13316         invocation patching now includes things generated with
13317         build_alias_initializer_parameter_list.
13318         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13319         (build_super_invocation): Likewise.
13320         (patch_assignment): Changed comment.
13321
13322 2000-01-27  Andrew Haley  <aph@cygnus.com>
13323
13324         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13325         (emit_if): Ditto.
13326         (emit_jsr): Ditto.
13327
13328 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13329
13330         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13331         concatenation.
13332         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13333
13334         * parse.y (register_fields): Don't pass a format specifier to
13335         OBSOLETE_MODIFIER_WARNING.
13336         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13337         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13338         specifier.
13339         (check_modifiers): Change function into a macro.
13340         (check_class_interface_creation): Pass a literal format string.
13341
13342 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13343
13344         * buffer.h: PROTO -> PARAMS.
13345         * check-init.c: Likewise.
13346         * class.c: Likewise.
13347         * constants.c: Likewise.
13348         * convert.h: Likewise.
13349         * decl.c: Likewise.
13350         * except.c: Likewise.
13351         * expr.c: Likewise.
13352         * gjavah.c: Likewise.
13353         * java-except.h: Likewise.
13354         * java-tree.h: Likewise.
13355         * jcf-depend.c: Likewise.
13356         * jcf-dump.c: Likewise.
13357         * jcf-parse.c: Likewise.
13358         * jcf-path.c: Likewise.
13359         * jcf-reader.c: Likewise.
13360         * jcf-write.c: Likewise.
13361         * jcf.h: Likewise.
13362         * jv-scan.c: Likewise.
13363         * jvgenmain.c: Likewise.
13364         * jvspec.c: Likewise.
13365         * lang.c: Likewise.
13366         * lex.c: Likewise.
13367         * lex.h: Likewise.
13368         * parse-scan.y: Likewise.
13369         * parse.h: Likewise.
13370         * parse.y: Likewise.
13371         * typeck.c: Likewise.
13372         * verify.c: Likewise.
13373         * xref.c: Likewise.
13374         * xref.h: Likewise.
13375         * zextract.c: Likewise.
13376         * zipfile.h: Likewise.
13377
13378 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13379
13380         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13381         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13382         * constants.c (build_constant_data_ref): Check for cached
13383         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13384         in TYPE_CPOOL_DATE_REF.
13385         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13386         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13387         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13388         (LOCAL_FINAL): New macro.
13389         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13390         constant pool -- don't try to reuse.
13391         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13392         TYPE_LANG_SPECIFIC.
13393         (find_in_current_zip): Use TYPE_JCF.
13394         * parse.h (java_check_final): Prototype removed.
13395         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13396         (maybe_create_class_interface_decl,
13397         check_class_interface_creation): Likewise.
13398         (java_expand_finals): Function removed.
13399         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13400         (block_statement:): Fixed comment.
13401         (anonymous_class_creation:): Likewise.
13402         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13403         argument patch.
13404         (check_class_interface_creation): Loosened error report on (inner)
13405         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13406         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13407         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13408         argument patch.
13409         (create_interface): Likewise.
13410         (anonymous_class_counter): New static global.
13411         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13412         patch. Fixed comments.
13413         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13414         anonymous_class_counter when declaring a toplevel class.
13415         (craft_constructor): Fixed constructor name when handling
13416         anonymous classes. Anonymous class constructors to feature hidden
13417         this$<n> parameter.
13418         (java_fix_constructors): Added comment.
13419         (java_check_final): Function removed.
13420         (java_complete_expand_methods): Fixed comment. Don't generate
13421         class data, save its outgoing constant pool instead.
13422         (verify_constructor_super): Skip anonymous class constructor
13423         hidden this$<n> parameter.
13424         (java_expand_classes): New local `saved_ctxp'. Removed call to
13425         java_expand_finals and java_check_final. Expand anonymous class
13426         constructors. Generate class data.
13427         (build_super_invocation): Skip anonymous class hidden this$<n>
13428         parameter.
13429         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13430         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13431         (set_java_signature): Likewise.
13432
13433 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13434
13435         * gjavah.c: Delete ACC_VISIBILITY define.
13436         * jcf.h: Add ACC_VISIBILITY define.
13437         * parse.y: final: rule tagged <value>.
13438         (java_check_regular_methods): Use ACC_VISIBILITY define for
13439         default package access check.
13440         (local_variable_declaration_statement): Use final: rule.
13441
13442 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13443
13444         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13445         (final:): New rule.
13446
13447 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13448
13449         * gjavah.c (print_field_info): Allow non-static final fields.
13450
13451 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13452
13453         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13454         * parse.y (patch_anonymous_class): New function.
13455         (create_anonymous_class): Register incomplete type when the
13456         class/interface to extends/implement isn't known yet.
13457         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13458         (verify_constructor_super): Tuned error message.
13459
13460 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13461
13462         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13463         (ANONYMOUS_CLASS_P): New macro.
13464         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13465         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13466         * parse.y (create_class): Added leading argument.
13467         (maybe_create_class_interface_decl,
13468         check_class_interface_creation): Likewise.
13469         (craft_constructor): New function.
13470         (verify_constructor_super): Added argument in prototype.
13471         (class_declaration:): Inserted leading argument.
13472         (for_begin:): Use FOR_LOOP_P.
13473         (anonymous_class_creation): Create WFL of the anonymous class to
13474         instantiate. Call build_new_invocation. Added comments.
13475         (check_class_interface_creation): Handle parameter `anonymous' in
13476         verbose mode class creation announce.
13477         (link_nested_class_to_enclosing): Exclude anonymous classes.
13478         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13479         anonymous class, even though they appear to have an enclosing
13480         context.
13481         (create_interface): Pass extra argument to
13482         check_class_interface_creation.
13483         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13484         (create_class): Call check_class_interface_creation and
13485         maybe_create_class_interface_decl with extra new argument. Don't
13486         add private this$<n> to anonymous classes.
13487         (method_declarator): Insert hidden this$<n> to anonymous class
13488         constructors.
13489         (java_fix_constructors): Deleted code creating default
13490         constructor. Call craft_constructor instead.
13491         (java_check_regular_methods): Set `saw_constructor' to 1 for
13492         anonymous classes.
13493         (fix_constructors): Pass extra argument to verify_constructor_super.
13494         (verify_constructor_super): New local `sdecl', use it. Search for
13495         matching constructor (possibly featuring arguments) in super
13496         class.
13497         (lookup_method_invoke): Craft constructor according to arguments
13498         list when dealing with anonymous class constructors.
13499         (build_super_invocation): Pass arguments to anonymous class super
13500         constructors.
13501         (search_loop): Use FOR_LOOP_P.
13502         (labeled_block_contains_loop_p): Likewise.
13503
13504 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13505
13506         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13507         (enclosing_context_p): New function.
13508         (get_access_flags_from_decl): Handle CLASS_STATIC.
13509         (maybe_layout_super_class): Extra first argument passed to
13510         do_resolve_class.
13511         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13512         ID_INIT_P.
13513         * decl.c (access0_identifier_node): New global.
13514         (init_decl_processing): access0_identifier_node initialized.
13515         (pushdecl): Set DECL_CONTEXT only on non type decls.
13516         * expr.c (lookup_field): Lookup inner class fields in enclosing
13517         contexts.
13518         (expand_invoke): Use ID_INIT_P.
13519         (expand_java_field_op): Use DECL_CLINIT_P.
13520         * java-tree.def (CLASS_LITERAL): New tree code.
13521         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13522         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13523         (struct lang_decl): New field `inner_access'.
13524         (enclosing_context_p): Prototyped.
13525         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13526         ID_CLINIT_P): New macros.
13527         (CLASS_STATIC): New macro.
13528         (CLASS_ACCESS0_GENERATED_P): New macro.
13529         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13530         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13531         INNER_CLASS_P): New macros.
13532         (DECL_INNER_CLASS_LIST): New macro.
13533         * jcf-parse.c (yyparse): Avoid the use of ANSI string
13534         concatenation.
13535         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13536         the shift value to int. Fixed typo in comment.
13537         * lex.c (inst_id, wpv_id): Initialize.
13538         * mangle.c (unicode_mangling_length): Take `$' into account.
13539         * parse.h (DRECOVER, RECOVER): Terminate properly.
13540         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13541         (typedef struct _jdep): New field `enclosing'.
13542         (JDEP_ENCLOSING): New macro.
13543         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13544         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13545         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13546         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13547         GET_ENCLOSING_CPC_CONTEXT): New macros.
13548         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13549         (do_resolve_class): Added extra argument in prototype.
13550         * parse.y (resolve_class): Added extra argument in prototype.
13551         (maybe_create_class_interface_decl): Likewise.
13552         (maybe_use_access_method, build_wfl_wrap): New functions.
13553         (java_complete_expand_classes, java_complete_expand_class):
13554         Likewise.
13555         (java_parser_context_push_initialized_field,
13556         java_parser_context_suspend, java_parser_context_resume):
13557         Likewise.
13558         (maybe_make_nested_class_name, make_nested_class_name,
13559         set_nested_class_simple_name_value,
13560         link_nested_class_to_enclosing, find_as_inner_class,
13561         find_as_inner_class_do, check_inner_class_redefinition,
13562         build_thisn_assign, build_current_thisn, build_access_to_thisn,
13563         maybe_build_thisn_access_method, build_outer_field_access,
13564         build_outer_field_access_methods, build_outer_field_access_expr,
13565         build_outer_method_access_method, build_new_access_id,
13566         build_outer_field_access_method, outer_field_access_p,
13567         outer_field_expanded_access_p, outer_field_access_fix,
13568         build_incomplete_class_ref, patch_incomplete_class_ref,
13569         create_anonymous_class): Likewise.
13570         (inst_id, wpv_id): New static global variables.
13571         (synchronized:): New rule, tagged <node>.
13572         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13573         rules.
13574         (anonymous_class_creation:): New rule, tagged <node>.
13575         (NEW_TK): Tagged <node>.
13576         (type_literals, array_type_literal): New rules, tagged <node>.
13577         (class_declaration:): Removed action when reducing by class_body:
13578         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13579         using GET_CPC in sub-rules.
13580         (class_member_declaration): Handle inner classes.
13581         (method_declaration): When reducing method_header:, reset
13582         current_function_decl when appropriate.
13583         (method_declarator:): Set the number of formal parameter to 0 for
13584         method declared without arguments.
13585         (constructor_declarator:): Likewise.
13586         (static_initializer:): List of elements kept in a list.
13587         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13588         use of the keyword `static' for type declarations.
13589         (block_statement:): Handle inner class declarations.
13590         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13591         type qualified `this'.
13592         (class_instance_creation_expression): Use anonymous_class_creation:
13593         to handle inner class instances creation. Handle qualified `new'.
13594         (something_dot_new): Added appropriate actions.
13595         (create_new_parser_context): New function.
13596         (java_push_parser_context, java_parser_context_save_global,
13597         java_parser_context_suspend): Use create_new_parser_context.
13598         (check_modifiers): Changed leading comment.
13599         (check_class_interface_creation): Handle interclasses.
13600         (add_superinterfaces): Fixed comment.
13601         (create_interface): Build qualified name from the raw_name instead
13602         of its matching WFL. Push the initialized fields list. raw_name added
13603         as an extra argument to maybe_create_class_interface_decl.
13604         (create_class): Build qualified name from the raw_name instead of
13605         its matching WFL. Removed assignment to current_parsed_class_un.
13606         Call PUSH_ERROR before returning an error. Suspend the current
13607         parser context when processing an inner class. Push the
13608         initialized fields list. raw_name added as an extra argument to
13609         maybe_create_class_interface_decl. Add the private this$<n>
13610         field.
13611         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13612         (register_fields): Get the class type from GET_CPC and handle
13613         previous errors.  Added code to handle the creation of static
13614         fields in inner classes. Initialized fields initialization
13615         statements kept in a list of lists.
13616         (maybe_generate_finit): Initialized fields initialization
13617         statements kept in a list of lists. Use GET_CPC.
13618         (maybe_generate_clinit): Likewise.
13619         (method_header): Use GET_CPC and GET_CPC_UN.
13620         (parser_qualified_classname): Handle inner classes.
13621         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13622         (java_fix_constructors): Hide pointer to enclosing context
13623         instance in constructor list when dealing with inner classes.
13624         (jdep_resolve_class): Call resolve_class with extra first argument
13625         JDEP_ENCLOSING.
13626         (resolve_class): Add enclosing context as a first extra argument
13627         to do_resolve_class.
13628         (do_resolve_class): Call find_as_inner_class. Handle WFLs
13629         properly.
13630         (resolve_no_layout): Extra argument added to resolve_class
13631         invocation.
13632         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13633         (java_get_real_method_name): Use GET_CPC_UN.
13634         (check_abstract_method_definitions): Use DECL_CLINIT_P.
13635         (java_check_abstract_methods): Handle static method declared in
13636         inner classes by an error.
13637         (java_check_regular_methods): Use DECL_CLINIT_P.
13638         (source_start_java_method): Also set DECL_MAX_LOCALS.
13639         (create_artificial_method): Call java_parser_context_save_global
13640         and java_parser_context_restore_global instead of saving/restoring
13641         the context by hand.
13642         (expand_start_java_method): Improved verbose mode message.
13643         (java_complete_expand_methods): Fixed leading comment. Use
13644         DECL_CLINIT_P.
13645         (fix_constructors): Added assignment to this$<n> if necessary.
13646         (java_expand_classes): Call java_complete_expand_classes instead
13647         of java_complete_expand_methods.
13648         (make_qualified_primary): Simplified.
13649         (merge_qualified_name): Optimized for missing left or right parts.
13650         (resolve_expression_name): Handle access to outer class fields from
13651         interclasses.
13652         (resolve_qualified_expression_name): New macro
13653         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13654         classes. Report error on non appropriate qualification of
13655         `new'. Handle qualified `this'.
13656         (not_accessible_p): Allow access to outer class private fields from
13657         inner classes.
13658         (patch_method_invocation): Handle method invocations through
13659         access methods and inner class constructor invocations.
13660         (find_applicable_accessible_methods_list): Search enclosing
13661         contexts of an inner class.
13662         (search_applicable_methods_list): Fixed typo.
13663         (argument_types_convertible): Handle inner class constructors'
13664         hidden outer context reference argument.
13665         (qualify_ambiguous_name): Handle qualified `this'.
13666         (java_complete_lhs): Handle use of field accessed through
13667         artificial access methods in various cases of assignments. Handle
13668         CLASS_LITERAL node.
13669         (check_final_assignment): Use DECL_CLINIT_P.
13670         (valid_ref_assignconv_cast_p): Handle the destination being an
13671         enclosing context of the source.
13672         (patch_unaryop): Handle use of field accessed through artificial
13673         access methods.
13674         (patch_return): Use DECL_CLINIT_P.
13675         (patch_throw_statement): Use DECL_CLINIT_P.
13676         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
13677         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
13678         ID_INIT_P.
13679
13680 2000-01-16  Anthony Green  <green@cygnus.com>
13681
13682         * parse.y (build_string_concatenation): Only use
13683         StringBuffer(String) shortcut if String arg is constant.
13684
13685 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13686
13687         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13688         the shift value to int. Fixed typo in comment.
13689
13690 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
13691
13692         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13693         * jcf-write.c: Likewise.
13694         * parse.y: Likewise.
13695         * parse.c: Regenerate.
13696
13697 2000-01-09  Anthony Green  <green@cygnus.com>
13698
13699         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13700         bytecodes in the correct order.
13701
13702 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13703
13704         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13705
13706 2000-01-06  Anthony Green  <green@cygnus.com>
13707
13708         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13709         before building constant array decl.
13710
13711 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13712
13713         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
13714         method invocation and typo in conditional expression.
13715         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
13716         the appropriate NOTE_POP.
13717         * parse.y (patch_binop): Shift value mask to feature the right
13718         type.
13719
13720 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13721
13722         * class.c (assume_compiled, assume_compiled_node): Add static
13723         prototype.
13724         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13725
13726         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13727
13728         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13729
13730         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13731         to `__modifier' to avoid stringifying it.
13732
13733         * parse.y (verify_constructor_circularity): Don't call a variadic
13734         function with a non-literal format string.
13735         (java_check_abstract_methods): Move unreachable code inside
13736         `continue' statement.
13737         (lookup_method_invoke): Call xstrdup, not strdup.
13738
13739         * expr.c (expand_java_field_op): Avoid the use of ANSI string
13740         concatenation.
13741
13742         * jcf-parse.c (yyparse): Likewise.
13743
13744         * jv-scan.c (main): Likewise.
13745
13746 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13747
13748         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
13749         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13750         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
13751         concatenation.
13752
13753         * parse.y (synchronized, variable_redefinition_error,
13754         check_class_interface_creation, create_interface, create_class,
13755         method_header, finish_method_declaration,
13756         check_modifiers_consistency, method_declarator,
13757         complete_class_report_errors, check_abstract_method_definitions,
13758         java_check_regular_methods, check_throws_clauses,
13759         java_check_abstract_methods, read_import_dir,
13760         check_pkg_class_access, declare_local_variables, fix_constructors,
13761         cut_identifier_in_qualified, resolve_expression_name,
13762         resolve_qualified_expression_name, patch_method_invocation,
13763         java_complete_lhs, patch_assignment, try_builtin_assignconv,
13764         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
13765         patch_exit_expr, patch_exit_expr, patch_switch_statement,
13766         patch_try_statement, patch_synchronized_statement,
13767         patch_throw_statement, check_thrown_exceptions,
13768         patch_conditional_expr): Likewise.
13769
13770 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13771
13772         * Makefile.in (LIBDEPS): Added gcc's errors.o
13773         (../jcf-dump$(exeext):): Link with gcc's errors.o
13774         (../gcjh$(exeext):): Likewise.
13775         * expr.c (expand_java_NEW): Layout the entire target type instead of
13776         laying out its methods only.
13777         (lookup_field): Layout the class after having loaded it.
13778         * java-tree.h (java_debug_context): Declared.
13779         * jcf-io.c (toplev.h): Included.
13780         (find_class): Removed assignment to jcf's outofsynch
13781         field. Force source file to be read if newer than its matching
13782         class file. Tweaked debug messages.
13783         * jcf-parse.c (jcf_out_of_synch): Deleted.
13784         (read_class): Call to jcf_out_of_synch removed.
13785         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
13786         (jcf_out_of_synch): Prototype deleted.
13787         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
13788         `deprecated' and `class_err': integer turned into bit-fields.
13789         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
13790         * parse.y (package_list): New global.
13791         (package_declaration:): Record newly parsed package name.
13792         (extra_ctxp_pushed_p): Static global deleted.
13793         (java_parser_context_save_global): Create buffer context for the
13794         purpose of saving globals, if necessary.
13795         (java_parser_context_restore_global): Pop context pushed for the
13796         purpose of saving globals, if necessary.
13797         (java_debug_context_do): New prototype and function.
13798         (java_debug_context): Likewise.
13799         (do_resolve_class): Use already parsed package names to qualify
13800         and lookup class candidate.
13801         (java_pre_expand_clinit): Removed unnecessary local variable.
13802
13803 1999-12-17  Tom Tromey  <tromey@cygnus.com>
13804
13805         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
13806         fixes PR gcj/119.
13807         (process_file): Use `\n\' at end of each line in string.
13808
13809 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13810
13811         * expr.c (expand_invoke): Layout the loaded class before
13812         attempting to use it.
13813         (expand_java_field_op): Allow final field assignments to take
13814         place in $finit$.
13815         * typeck.c (convert): Return error_mark_node if expr is null.
13816
13817 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13818
13819         * class.c (class_depth): Return -1 if the class doesn't load
13820         properly.
13821         * expr.c (can_widen_reference_to): Check for errors during depth
13822         computation and return 0 accordingly.
13823         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
13824         create default constructors and add an other error check.
13825         * parse.h (java_fix_constructors): Prototyped.
13826         * parse.y (java_pre_expand_clinit): Likewise.
13827         (build_super_invocation): Re-prototyped to feature one argument.
13828         (java_check_circular_reference): Directly use `current'.
13829         (java_fix_constructors): New function.
13830         (java_check_regular_methods): Don't create default constructors
13831         here, but abort if none were found.
13832         (java_complete_expand_methods): Pre-process <clinit> calling
13833         java_pre_expand_clinit.
13834         (java_pre_expand_clinit): New function.
13835         (fix_constructors): build_super_invocation invoked with the
13836         current method declaration as an argument.
13837         (build_super_invocation): Use the context of the processed method
13838         decl argument instead of current_class.
13839         * typeck.c (lookup_java_method): Take WFLs in method names into
13840         account.
13841
13842 1999-12-14  Per Bothner  <per@bothner.com>
13843
13844         * class.c (make_class_data): flag_keep_inline_functions to keep
13845         private methods in the method array.
13846
13847 1999-12-15  Anthony Green  <green@cygnus.com>
13848
13849         * check-init.c (check_init): Take into account both types of
13850         `throw's when checking for uninitialized variables.
13851
13852 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13853
13854         * parse.y (java_complete_lhs): Force conversion of array
13855         dimensions to int_type_node, that's what runtime's ABI expects.
13856
13857 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13858
13859         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
13860         operand of a WFL, until the Java front-end gets fixed with regard
13861         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
13862
13863 1999-12-10  Andrew Haley  <aph@cygnus.com>
13864
13865         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
13866         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
13867         expr.c (build_java_athrow): Add support for sjlj-exceptions.
13868         java-tree.h: Ditto.
13869         jcf-write.c: Ditto.
13870
13871 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13872
13873         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13874         before calling expand_eh_region_start and expand_start_all_catch.
13875         * except.c (expand_start_java_handler): Switch to permanent
13876         obstack before calling expand_eh_region_start.
13877         (expand_end_java_handler): Switch to permanent obstack before
13878         calling expand_start_all_catch.
13879
13880 1999-12-5  Anthony Green  <green@cygnus.com>
13881
13882         * decl.c (init_decl_processing): Mark throw_node as a noreturn
13883         function with side effects.
13884         (init_decl_processing): Mark all memory allocating DECLs with
13885         DECL_IS_MALLOC.
13886
13887 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13888
13889         * except.c (expand_end_java_handler): Call
13890         expand_resume_after_catch and end_catch_handler.
13891
13892 1999-11-30  Anthony Green  <green@cygnus.com>
13893
13894         * verify.c (verify_jvm_instructions): Create new return label
13895         chain if non existent (don't rely on the verified state of the jsr
13896         target.)
13897
13898 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13899
13900         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
13901         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
13902
13903         * parse.y (patch_assignment): Removed bogus final class test on
13904         lhs when checking on whether to emit an ArrayStoreException runtime
13905         check.
13906         * expr.c (expand_java_arraystore): Likewise.
13907
13908 1999-11-28 Anthony Green <green@cygnus.com>
13909
13910         * decl.c (find_local_variable): Reuse single slot decls when
13911           appropriate.
13912
13913 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13914
13915         * jcf-parse.c (saw_java_source): Global variable removed.
13916         (read_class): Don't use `saw_java_source'. Added extra braces.
13917         (yyparse): Code setting `saw_java_source' removed.
13918
13919 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
13920
13921         * except.c (emit_handlers): Zero catch_clauses after emitting them.
13922
13923 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13924
13925         * verify.c (merge_type_state): Non verified subroutines being
13926         considered more than once to trigger passive type merge.
13927
13928 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13929
13930         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
13931         in case of error. Error message tuned.
13932
13933 1999-11-21  Anthony Green  <green@cygnus.com>
13934
13935         * constants.c (find_methodref_index): Unwrap method names before
13936         inserting them in the constant pool.
13937
13938         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
13939
13940         * class.c (assume_compiled_node): New typedef.
13941         (assume_compiled_tree): New static data.
13942         (find_assume_compiled_node): New function.
13943         (add_assume_compiled): New function.
13944         (assume_compiled): New function.
13945         * class.c (make_class_data): Use assume_compiled.
13946         (is_compiled_class): Use assume_compiled.
13947
13948         * java-tree.h (add_assume_compiled): Declare.
13949
13950         * lang.c (lang_decode_option): Parse new options.
13951
13952 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13953
13954         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
13955         int_type_node: that's what `_Jv_AllocObject' expects.
13956
13957 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13958
13959         * parse.y (lookup_method_invoke): Use lang_printable_name to
13960         reliably build the type name during error report. Fixes PR gcj/97.
13961
13962 1999-11-09  Tom Tromey  <tromey@cygnus.com>
13963
13964         * jcf-path.c: Include <sys/stat.h>.
13965         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
13966         (DIR_UP): New macro.
13967
13968 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13969
13970         * parse.y (source_end_java_method): Resume permanent allocation,
13971         reversing Apr 27 1998 patch.
13972         (patch_string_cst): Pop obstacks after having pushed the permanent
13973         ones.
13974
13975 1999-11-05  Tom Tromey  <tromey@cygnus.com>
13976
13977         * class.c (finish_class): Emit inlined methods if any native
13978         methods exist in the class.  Fixes PR gcj/85.
13979
13980 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13981
13982         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
13983         (qualify_ambiguous_name): Likewise.
13984
13985 1999-11-03  Godmar Back <gback@cs.utah.edu>
13986
13987         * typeck.c: (lookup_java_method):  search all inherited
13988         interfaces when looking up interface method.
13989
13990 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13991
13992         * parse.y (method_header:): Issue error message for rule `type
13993         error'.
13994         (synchronized:): Error report when not using synchronized.
13995
13996 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13997
13998         * parse.y (resolve_qualified_expression_name): Prevent `this' from
13999         being used before the superclass constructor has been called.
14000         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14001         instead of `CALL_THIS_CONSTRUCTOR_P'.
14002
14003 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
14004
14005         * check-init.c: Fix typo in comment.
14006
14007 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14008
14009         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14010         and final method.
14011
14012 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14013
14014         * parse.y (expression_statement:): Call function to report
14015         improper invocation of a constructor.
14016         (parse_ctor_invocation_error): New function.
14017
14018 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
14019
14020         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14021         remember_end_note.
14022
14023 1999-10-21  Tom Tromey  <tromey@cygnus.com>
14024
14025         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14026         in generated `main'.
14027
14028 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14029
14030         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14031         (qualify_ambiguous_name): Likewise.
14032
14033 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14034
14035         * parse.y (java_complete_tree): fold_constant_for_init to work on
14036         permanent_obstack.
14037         (java_complete_lhs): Likewise.
14038         (array_constructor_check_entry): Complete an initializer element
14039         on permanent_obstack.
14040
14041 1999-10-19  Tom Tromey  <tromey@cygnus.com>
14042
14043         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14044         From Mike Moreton <mike@pillim.demon.co.uk>.
14045
14046 1999-10-15  Greg McGary  <gkm@gnu.org>
14047
14048         * java-tree.h (flag_bounds_check): Remove extern decl.
14049         * lang.c (flag_bounds_check): Remove global variable.
14050         (lang_f_options): Remove "bounds-check" entry.
14051         (lang_init_options): Default flag_bounds_check to "on".
14052
14053 1999-10-14  Tom Tromey  <tromey@cygnus.com>
14054
14055         * jvgenmain.c (usage): New function.
14056         (main): Use it.  Also, handle `-D' options.
14057         * jvspec.c (lang_specific_driver): Recognize -D.
14058         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14059
14060         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14061
14062 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14063
14064         * jcf-dump.c (print_constant, disassemble_method): Don't call a
14065         variadic function with a non-literal format string.
14066
14067         * parse-scan.y (report_main_declaration): Likewise.
14068
14069         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14070
14071         * parse.y (read_import_dir, patch_assignment, patch_binop,
14072         patch_array_ref): Likewise.
14073
14074         * typeck.c (build_java_array_type): Likewise.
14075
14076         * verify.c (verify_jvm_instructions): Likewise.
14077
14078 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14079
14080         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14081
14082 1999-10-07  Anthony Green  <green@cygnus.com>
14083
14084         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14085         where CHECK_PUT may fail for valid reasons.
14086
14087         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14088         UNSAFE_PUTN): New macros.
14089
14090 1999-10-04  Tom Tromey  <tromey@cygnus.com>
14091
14092         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14093         well.  Fixes Java PR gcj/59.
14094         * parse-scan.y (yyerror): Report errors.
14095
14096 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
14097
14098         * decl.c (insert_block): Remove unconditional `abort'.
14099
14100 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
14101
14102         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
14103         FUNCTION_CODE now of type int.  All callers changed.
14104         Set the builtin's DECL_BUILT_IN_CLASS.
14105
14106 1999-09-23  Tom Tromey  <tromey@cygnus.com>
14107
14108         * jvspec.c (lang_specific_driver): Don't read spec file if
14109         -fsyntax-only given.
14110
14111 1999-09-22  Tom Tromey  <tromey@cygnus.com>
14112
14113         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14114
14115         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14116         (WORDS_TO_LONG): Likewise.
14117         (WORDS_TO_DOUBLE): Likewise.
14118
14119 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14120
14121         * jcf-write.c (RELOCATION_VALUE_0): New macro.
14122         (RELOCATION_VALUE_1): Likewise.
14123         (emit_iinc, emit_reloc, push_constant1, push_constant2,
14124         push_in_const, push_long_const): Prototyped.
14125         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14126         (push_constant2): Likewise.
14127         (push_int_const): Cast find_constant1's integer arguments to `jword'.
14128         (find_constant_wide): Cast find_constant2's integer arguments to
14129         `jword'.
14130         (find_constant_index): Cast find_constant2's and find_constant2's
14131         integer arguments to `jword'.
14132         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14133         (emit_switch_reloc): Use RELOCATION_VALUE_0.
14134         (emit_if): Use RELOCATION_VALUE_1.
14135         (emit_goto): Likewise.
14136         (emit_jsr): Likewise.
14137         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14138         argument to push_long_const to HOST_WIDE_INT.
14139
14140 1999-09-15  Andreas Schwab  <schwab@suse.de>
14141
14142         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14143
14144 1999-09-20  Nick Clifton  <nickc@cygnus.com>
14145
14146         * lang.c (lang_decode_option): Extend comment.
14147
14148 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14149
14150         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14151         instead of fndecl.
14152
14153 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14154
14155         * gjavah.c (get_field_name, print_method_info, print_include,
14156         add_namelet): Use xmalloc, not malloc.
14157
14158         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
14159         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14160         NULL pointer.
14161
14162         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14163
14164         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14165
14166         * jcf-path.c (add_entry): Likewise.
14167
14168         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14169
14170         * jv-scan.c (xmalloc): Remove definition.
14171
14172         * jvgenmain.c (xmalloc): Likewise.
14173
14174         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14175
14176         * lex.c (java_store_unicode): Use xrealloc, not realloc.
14177
14178         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
14179         concat, not xmalloc/sprintf.
14180         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14181         (xstrdup): Remove definition.
14182
14183         * parse.y (duplicate_declaration_error_p,
14184         constructor_circularity_msg, verify_constructor_circularity,
14185         check_abstract_method_definitions, java_check_regular_methods,
14186         java_check_abstract_methods, patch_method_invocation,
14187         check_for_static_method_reference, patch_assignment, patch_binop,
14188         patch_cast, array_constructor_check_entry, patch_return,
14189         patch_conditional_expr): Use xstrdup, not strdup.
14190
14191         * zextract.c (ALLOC): Use xmalloc, not malloc.
14192
14193 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14194
14195         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14196
14197         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
14198         (do_spec, lang_specific_pre_link, lang_specific_driver,
14199         input_filename, input_filename_length): Don't declare.
14200         (main_class_name, jvgenmain_spec, lang_specific_driver):
14201         Constify a char*.
14202         (lang_specific_driver): All calls to the function pointer
14203         parameter now explicitly call `fatal'.
14204
14205 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14206
14207         * parse.y (find_applicable_accessible_methods_list): Search
14208         abstract classes as interfaces.
14209
14210 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14211
14212         * class.c (finish_class): We're now outside a valid method
14213         declaration. Tell the rest of gcc so.
14214
14215 1999-09-08  Bruce Korb  autogen@linuxbox.com
14216
14217         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14218
14219 1999-09-07  Tom Tromey  <tromey@cygnus.com>
14220
14221         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14222         java-array.h.
14223         (decode_signature_piece): Don't emit "::" in JArray<>.
14224         (print_namelet): Only print trailing `;' when printing a class.
14225
14226 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
14227
14228         * java-tree.h: Delete declarations for all tree nodes now moved to
14229         global_trees.
14230         * decl.c: Delete their definitions.
14231
14232 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
14233
14234         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14235         * Makefile.in (OBJS): Add ggc-callbacks.o.
14236         (OBJDEPS): Likewise.
14237
14238 1999-09-03  Tom Tromey  <tromey@cygnus.com>
14239
14240         * parse.y (strip_out_static_field_access_decl): Return operand if
14241         it satisfies JDECL_P.
14242
14243 1999-09-02  Tom Tromey  <tromey@cygnus.com>
14244
14245         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14246         Handle nested arrays, like `[[I'.
14247
14248 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14249
14250         * class.c (finish_class): Remove unused parameter, all callers
14251         changed.
14252
14253         * expr.c (build_java_athrow): Change return type to void.
14254         (java_lang_expand_expr): Make sure each case in switch returns a
14255         value.
14256
14257         * java-tree.h (finish_class): Fix prototype to take void args.
14258
14259         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14260         (main): Issue return from main, not exit.
14261
14262         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14263
14264         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14265
14266         * jv-scan.c (main): Issue return from main, not exit.
14267
14268         * parse.y (check_abstract_method_definitions,
14269         java_check_abstract_method_definitions): Add static prototypes.
14270         (java_complete_expand_methods): Fix call to `finish_class'.
14271
14272         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14273         and `prevpc'.
14274
14275 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14276
14277         * lang.c (language_string): Constify.
14278
14279 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14280
14281         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14282         Remove hacks for stuff which comes from libiberty.
14283
14284         * Make-lang.in: Likewise.
14285
14286 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
14287
14288         * Makefile.in (xref.o): Depend on xref.c explicitly.
14289
14290 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14291
14292         * java-tree.h (lang_printable_name): Constify a char*.
14293
14294         * lang.c (lang_printable_name): Likewise.
14295
14296 1999-08-27  Jeffrey A Law  (law@cygnus.com)
14297
14298         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14299         comments in C code.
14300
14301 1999-08-26  Tom Tromey  <tromey@cygnus.com>
14302
14303         * gjavah.c (print_cxx_classname): Print "::" before qualified
14304         name.
14305
14306 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14307
14308         * parse.y (lookup_cl): Changed leading comment. Now does its best
14309         to set the column number.
14310         (qualify_ambiguous_name): Take WFL wrappers into account.
14311
14312 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
14313
14314         * verify.c (verify_jvm_instructions): Don't check instruction
14315         validity beyond end of method.
14316
14317 1999-08-25  Tom Tromey  <tromey@cygnus.com>
14318
14319         * jvspec.c (lang_specific_driver): Correctly handle --help again.
14320
14321 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14322
14323         * gjavah.c (print_name, print_base_classname, utf8_cmp,
14324         cxx_keyword_subst, generate_access, name_is_method_p,
14325         get_field_name, print_field_name, super_class_name, print_include,
14326         decode_signature_piece, print_class_decls, usage, help,
14327         java_no_argument, version, add_namelet, print_namelet): Add static
14328         prototype.
14329         (print_base_classname, utf8_cmp, cxx_keyword_subst,
14330         name_is_method_p): Constify a char*.
14331         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14332         Provide a final else clause in an if-else-if.
14333         (print_field_info): Add missing final arg in function call to
14334         `print_field_name'.
14335         (print_method_info, decompile_method, decode_signature_piece,
14336         print_c_decl, print_full_cxx_name, print_stub,
14337         print_mangled_classname, super_class_name, print_include,
14338         add_namelet, add_class_decl, print_class_decls, process_file,
14339         help): Constify a char*.
14340
14341         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14342         push_int_const, find_constant_wide, find_constant_index,
14343         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14344         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14345         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14346         emit_if, emit_goto, emit_jsr, call_cleanups,
14347         make_class_file_name): Add static prototypes.
14348         (generate_bytecode_return, generate_bytecode_insns): Pass a
14349         NULL_PTR, not a NULL_TREE.
14350
14351         * jv-scan.c: Include "jcf.h".
14352         (main): Declare using DEFUN macro.
14353
14354         * jvspec.c (find_spec_file, lang_specific_pre_link,
14355         lang_specific_driver): Add prototypes.
14356         (find_spec_file): Constify a char*.
14357
14358         * keyword.gperf (hash, java_keyword): Add prototypes.
14359
14360         * lang.c (lang_print_error): Add static prototype.
14361         (lang_init): Prefer memcpy over bcopy to avoid casts.
14362
14363         * lex.c (yylex): Add static prototype.
14364
14365         * parse-scan.y: Include "lex.c" earlier.
14366
14367         * parse.h: Remove redundant declaration for `yylex'.
14368
14369         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14370         labeled_block_contains_loop_p): Add static prototypes.
14371         (not_accessible_p): Make static to match prototype.
14372
14373         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14374
14375 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14376
14377         * parse.y (check_method_redefinition): Changed leading comment.
14378         (check_abstract_method_definitions): New function.
14379         (java_check_abstract_method_definitions): New function.
14380         (java_check_regular_methods): Call it.
14381         (verify_constructor_super): Fixed indentation.
14382         (lookup_method_invoke): Likewise.
14383
14384 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14385
14386         * parse.y (method_header): Return a null pointer if the current
14387         class node is null.
14388         (finish_method_declaration): Return if the current function decl
14389         is null.
14390         (source_start_java_method): Likewise.
14391         (java_method_add_stmt): Likewise.
14392
14393 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14394
14395         * class.c (emit_register_class): Removed unnecessary call to
14396         start_sequence.
14397         * parse.y (labeled_block_contains_loop_p): Removed unused local
14398         variable.
14399
14400 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14401
14402         * parse.y (java_refold): Added prototype.
14403
14404 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14405
14406         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14407         (java_stabilize_reference): Removed unnecessary `else'.
14408         (java_complete_lhs): Set flag to remember boolean. Call
14409         java_refold. Added comments.
14410         (java_decl_equiv): New function.
14411         (binop_compound_p): Likewise.
14412         (java_refold): Likewise.
14413         (patch_unaryop): Striped static field access assigned to decl and
14414         op. Changed promotion scheme for ++/-- operators.
14415         (search_loop): New function.
14416         (labeled_block_contains_loop_p): Likewise.
14417         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14418         comment.
14419         (patch_bc_statement): Call search_loop. Fixed comment.
14420
14421 1999-08-14  Anthony Green  <green@cygnus.com>
14422
14423         * expr.c (java_lang_expand_expr): Mark static array data as
14424         referenced.
14425
14426 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14427
14428         * jvgenmain.c (main): NUL-terminate name_obstack.
14429
14430 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14431
14432         * check-init.c (check_bool2_init, done_alternative): Add static
14433         prototypes.
14434
14435         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14436         (add_method, build_utf8_ref, build_class_ref,
14437         append_gpp_mangled_type, layout_class_method): Constify a char*.
14438
14439         * decl.c (push_promoted_type, make_binding_level): Add static
14440         prototypes.
14441         (push_promoted_type, pushdecl): Constify a char*.
14442
14443         * except.c (find_handler_in_range, link_handler,
14444         check_start_handlers): Add static prototypes.
14445
14446         * expr.c (process_jvm_instruction): Constify a char*.
14447
14448         * gjavah.c (main): Constify a char*.
14449
14450         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14451         Constify a char*.
14452
14453         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14454         static prototypes.
14455         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14456         munge, print_ents): Constify a char*.
14457
14458         * jcf-dump.c (disassemble_method): Constify a char*.
14459         (print_constant_pool, print_exception_table): Add static prototypes.
14460         (print_constant, print_exception_table, main, disassemble_method):
14461         Constify a char*.
14462
14463         * jcf-io.c (find_classfile, find_class): Likewise.
14464
14465         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14466         (set_source_filename, predefined_filename_p): Add static prototypes.
14467         (set_source_filename, get_constant, get_class_constant,
14468         find_in_current_zip): Constify a char*.
14469
14470         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14471         static prototypes.
14472         (add_entry, add_path, jcf_path_classpath_arg,
14473         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14474
14475         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14476         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14477         jcf_parse_one_method, jcf_parse_methods,
14478         jcf_parse_final_attributes): Add static prototypes.
14479         (get_attribute): Constify a char*.
14480
14481         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14482         jcf_dependency_add_target, jcf_path_classpath_arg,
14483         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14484
14485         * jv-scan.c (main): Constify a char*.
14486         (gcc_obstack_init): Add prototype arguments.
14487
14488         * jvgenmain.c (gcc_obstack_init): Likewise.
14489         (main): Constify a char*.
14490
14491         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14492         static prototypes.
14493         (put_decl_string, lang_print_error): Constify a char*.
14494         (lang_init): Remove redundant extern prototype.
14495
14496         * mangle.c (emit_unicode_mangled_name): Constify a char*.
14497
14498         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14499         Add static prototypes.
14500         (get_type_from_signature): Constify a char*.
14501
14502         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14503         Add static prototypes.
14504         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14505         (verify_jvm_instructions): Constify a char*.
14506
14507         * xref.c (xref_flag_value): Likewise.
14508
14509         * xref.h (xref_flag_value): Likewise.
14510
14511         * zextract.c (makeword, makelong): Add static prototypes.
14512         (makeword, makelong): Constify a uch*.
14513
14514 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14515
14516         * lang.c (java_dummy_print): Constify a char*.
14517         (lang_print_error): Likewise.
14518         (lang_init): Remove redundant prototype for `print_error_function'.
14519         (lang_init_source): Likewise.
14520         (lang_identify): Constify a char*.
14521
14522 1999-08-09  Tom Tromey  <tromey@cygnus.com>
14523
14524         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14525         (WORDS_TO_LONG): Likewise.
14526         (WORDS_TO_DOUBLE): Likewise.
14527
14528 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14529
14530         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14531
14532         * expr.c (java_stack_pop, java_array_data_offset,
14533         build_java_throw_out_of_bounds_exception, case_identity,
14534         build_java_check_indexed_type): Add static prototypes.
14535         (linenumber_table, expand_invoke, expand_java_field_op,
14536         build_primtype_type_ref, expand_byte_code): Constify a char*.
14537
14538         * java-tree.h (build_primtype_type_ref, linenumber_table):
14539         Constify a char*.
14540         (java_lang_expand_expr): Add prototype.
14541
14542         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
14543         `java_lang_expand_expr'.
14544
14545         * lex.c (java_lex_error): Constify a char*.
14546         (java_get_unicode, java_read_char, java_allocate_new_line,
14547         java_unget_unicode, java_sneak_unicode): Prototype.
14548
14549         * parse-scan.y (current_class, package_name, method_declarator,
14550         report_class_declaration, yyerror): Constify a char*.
14551
14552         * parse.h (java_report_errors): Prototype.
14553         (yyerror): Constify a char*.
14554
14555         * parse.y (classitf_redefinition_error, check_modifiers,
14556         parse_jdk1_1_error, lookup_package_type,
14557         lookup_package_type_and_set_next, get_printable_method_name,
14558         purify_type_name): Constify a char*.
14559         (build_super_invocation, maybe_generate_finit,
14560         verify_constructor_super, parser_add_interface,
14561         add_superinterfaces, jdep_resolve_class, note_possible_classname,
14562         java_complete_expand_methods, java_expand_finals,
14563         cut_identifier_in_qualified, java_stabilize_reference,
14564         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14565         merge_string_cste): Prototype.
14566         (single_type_import_declaration, yyerror,
14567         variable_redefinition_error, build_array_from_name,
14568         build_unresolved_array_type, check_class_interface_creation,
14569         resolve_class, complete_class_report_errors,
14570         note_possible_classname, read_import_dir,
14571         find_in_imports_on_demand, resolve_package, fix_constructors,
14572         check_deprecation, lookup_method_invoke,
14573         maybe_build_primttype_type_ref, array_constructor_check_entry):
14574         Constify a char*.
14575         (java_complete_expand_methods, java_expand_finals): Make static.
14576         (convert_narrow): Remove static prototype.
14577
14578 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
14579
14580         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14581
14582 1999-08-02  Richard Henderson  <rth@cygnus.com>
14583
14584         * decl.c: Include defaults.h instead of expr.h.
14585         * parse.y: Likewise.
14586
14587 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
14588
14589         * java/decl.c (start_java_method): Change all uses of
14590         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14591         Ensure expr.h is included.
14592         * java/expr.c (pop_arguments): Ditto.
14593         * java/parse.y (expand_start_java_method): Ditto.
14594
14595 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14596
14597         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14598
14599 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
14600
14601         * decl.c: Include "function.h".
14602         * except.c: Likewise.
14603         * parse.y: Likewise.
14604         * Makefile.in: Update dependencies.
14605
14606 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14607
14608         * expr.c (build_java_soft_divmod): Provide a default case in switch.
14609         (java_lang_expand_expr): Mark parameters `target', `tmode' and
14610         `modifier' with ATTRIBUTE_UNUSED.
14611
14612         * gjavah.c (process_file): Add braces around ambiguous `else'.
14613
14614         * jcf-dump.c (print_access_flags, localvar_free): Change return
14615         type to void.
14616
14617         * parse.y (java_complete_expand_method): Initialize variable
14618         `exception_copy'.
14619         (resolve_qualified_expression_name): Likewise for `field_decl'.
14620         (patch_method_invocation): Likewise for `class_to_search'.
14621         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14622         (patch_assignment): Likewise for `lhs_type'.
14623
14624         * verify.c (verify_jvm_instructions): Remove unused variable
14625         `caller'.
14626
14627 1999-07-25  Richard Henderson  <rth@cygnus.com>
14628
14629         * decl.c (va_list_type_node): New.
14630
14631 1999-07-25  Anthony Green  <green@cygnus.com>
14632
14633         * gjavah.c (print_stub): New function.
14634         (METHOD_IS_NATIVE): New macro.
14635         (print_mangled_classname): Make static.
14636         (HANDLE_END_FIELD): Don't emit fields during stub generation.
14637         (process_file): Perform stub generation.
14638         (HANDLE_METHOD): Don't emit class decls during stub
14639         generation.
14640         (HANDLE_END_METHOD): Take into account stub generation.
14641         (print_method_info): Handle stub generation.
14642         (print_stub): New function.
14643         (print_cxx_classname): Make signature consistant with others.
14644         (help): Describe -stubs option.
14645         (main): Create stub file.
14646         (version): Use version.c.
14647         (print_full_cxx_name): New function.
14648         (print_c_decl): Use print_full_cxx_name.
14649
14650 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14651
14652         * check-init.c (check_init): Handle MAX_EXPR.
14653
14654 1999-07-15  Andrew Haley  <aph@cygnus.com>
14655
14656         * lang.c (flag_use_divide_subroutine): New variable.
14657         * typeck.c: (convert_ieee_real_to_integer): Bounds check
14658         fp-to-integer conversion.
14659         (convert): Call convert_ieee_real_to_integer when flag_fast_math
14660         is not set.
14661
14662         * expr.c (build_java_soft_divmod): New function.
14663         (build_java_binop): Call build_java_soft_divmod if
14664         flag_use_divide_subroutine is set.
14665         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14666         soft_lrem_node: new builtin functions.
14667         (init_decl_processing) Initialize the new builtins.
14668         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14669         soft_lrem_node: new builtin functions.
14670         (build_java_soft_divmod): New function.
14671         * parse.y: Call build_java_soft_divmod if
14672         flag_use_divide_subroutine is set.
14673         * parse.c: Rebuilt.
14674
14675         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
14676         a --specs= arg) even if not linking.
14677         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
14678         -fuse-divide-subroutine
14679
14680 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14681
14682         * parse.y (resolve_and_layout): Check methods only once.
14683         (resolve_qualified_expression_name): Verify thrown exceptions
14684         compatibility.
14685         (check_thrown_exceptions): Reject exceptions thrown in
14686         initializer. Error message tuned.
14687
14688 1999-07-14  Andrew Haley  <aph@cygnus.com>
14689
14690         * expr.c (expand_expr): Do not return the last statement in a
14691         block as the block's value.
14692
14693 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14694
14695         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14696         CALL_EXPR, to avoid order of evaluation changes.
14697
14698 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14699
14700         * parse.y (qualify_ambiguous_name): Do not use
14701         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14702
14703 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14704
14705         * check-init.c (check_init): Handle MAX_EXPR.
14706         * expr.c (force_evaluation_order): Force method call arguments to
14707         be evaluated in left-to-right order.
14708         * parse.y (qualify_ambiguous_name): Loop again to qualify
14709         NEW_ARRAY_EXPR properly.
14710
14711 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14712
14713         * parse.y (patch_invoke): Resolve unresolved invoked method
14714         returned type.
14715         (qualify_ambiguous_name): STRING_CST to qualify expression for
14716         type name resolution.
14717
14718 1999-06-24  Andrew Haley  <aph@cygnus.com>
14719
14720         * class.c (finish_class): Whenever a deferred method is
14721         output, rescan the list of methods to see if a new candidate for
14722         output can be found.
14723
14724 1999-06-28  Tom Tromey  <tromey@cygnus.com>
14725
14726         * jvspec.c (lang_specific_driver): Recognize --help.
14727
14728 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14729
14730         * parse.y (resolve_package): Fixed bogus return statement.
14731         (patch_method_invocation): Resolve method invocation beginning with
14732         a package name qualifier.
14733
14734 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14735
14736         * Make-lang.in (java.stage1): Depend on stage1-start.
14737         (java.stage2): Likewise for stage2-start.
14738         (java.stage3): Likewise for stage3-start.
14739         (java.stage4): Likewise for stage4-start.
14740
14741 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14742
14743         * parse.y (java_complete_lhs): When doing cross referencing, don't
14744         try to keep file location on a WFL expanded as a CALL_EXPR.
14745
14746 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14747
14748         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
14749         compiling to class file a void method with an empty method body.
14750         As a side effect, the bytecode backend will generate the
14751         appropriate `return' instruction.
14752
14753 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14754
14755         * parse.y (lookup_package_type_and_set_next): New function prototype.
14756         (resolve_package): Search current and imported packages.
14757         (lookup_package_type_and_set_next): New function.
14758
14759 1999-06-22  Andrew Haley  <aph@cygnus.com>
14760
14761         * verify.c (verify_jvm_instructions): Check for pending blocks
14762         before invalid PC test and opcode switch, not after.
14763
14764 1999-06-21  Andrew Haley  <aph@cygnus.com>
14765
14766         * except.c (find_handler_in_range): The upper limit for exception
14767         ranges is exclusive, not inclusive: (start <= pc < end).
14768         (link_handler): find child pointer which points to outer by
14769         searching sibling list: previous code incorrectly assumed that
14770         outer->outer->first_child must point to outer.
14771         * verify.c (verify_jvm_instructions): FIXME added to code for
14772         `athrow'.
14773         (verify_jvm_instructions): Do not assume that the last block
14774         processed in a subroutine is a block which ends with a `ret'
14775         instruction.  With some control flows it is possible that the last
14776         block ends with an `athrow'.
14777
14778 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14779
14780         * parse.y (qualify_ambiguous_name): Reorganized the post
14781         evaluation of non WFL leading expression nodes.
14782
14783 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14784
14785         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14786         CONVERT_EXPR.
14787
14788 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14789
14790         * parse.y (qualify_ambiguous_name): Handle qualified expression
14791         beginning with a STRING_CST.
14792
14793 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14794
14795         * parse.y (register_fields): Set DECL_INITIAL on both
14796         pre-initialized static and public fields.
14797         (resolve_field_access): Static field access expressions to always
14798         use pointer types.
14799         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
14800         qualification. CONVERT_EXPR to be resolved as an expression name.
14801         (java_complete_lhs): Identify and access qualified final
14802         initialized field in switch statement case expression.
14803         (fold_constant_for_init): Pre-initialized field decl constant to
14804         be folded.
14805
14806 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14807
14808         * parse.y (note_possible_classname): Mark returned node with
14809         QUALIFIED_P only if the original class name contained a '/'.
14810
14811 1999-06-05  Anthony Green  <green@cygnus.com>
14812
14813         * Make-lang.in (gcjh): More parallel build fixes.
14814
14815 1999-06-03  Mike Stump  <mrs@wrs.com>
14816
14817         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
14818
14819 1999-06-02  Anthony Green  <green@cygnus.com>
14820
14821         * except.c (link_handler): Chain exception handlers in order.
14822
14823 1999-06-02  Anthony Green  <green@cygnus.com>
14824
14825         * expr.c (expand_byte_code): Fill unreachable bytecode regions
14826         with nops and process as usual in order to always set correct EH
14827         ranges.  Emit detailed warnings about unreachable bytecodes.
14828
14829 1999-06-02  Anthony Green  <green@cygnus.com>
14830
14831         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
14832         constant.
14833
14834 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14835
14836         * parse.y (lookup_field_wrapper): Unified returned value to NULL
14837           or the searched field decl.
14838
14839 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14840
14841         * parse.y (fold_constant_for_init): Convert numerical constant
14842         values to the type of the assigned field.
14843
14844 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14845
14846         * expr.c (lookup_field): Relaxed the test on class loading error
14847         detection.
14848         * parse.y (fold_constant_for_init): Enabeled old code.
14849
14850 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14851
14852         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
14853         decide the validity of the cast of a java.lang.Cloneable reference
14854         to an array.
14855         (patch_conditional_expr): Fixed first argument passed to
14856         binary_numeric_promotion.
14857
14858 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14859
14860         * parse.y (qualify_ambiguous_name): Take into account that a
14861         CONVERT_EXPR might specify a type as a WFL.
14862
14863 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14864
14865         * parse.y (patch_assignment): Save the rhs before using it as an
14866         argument to _Jv_CheckArrayStore.
14867
14868 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14869
14870         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
14871
14872 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14873
14874         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
14875         floating point literal only when the exponent indicator has been
14876         parsed.
14877
14878 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14879
14880         * parse.y (formal_parameter:): Construct argument tree list
14881         element even if a yet unsupported final parameter was encountered.
14882
14883 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14884
14885         * parse.y (finish_method_declaration): Issue errors for native or
14886         abstract methods declared with a method body, as well as for non
14887         native or non abstract methods with no method body.
14888
14889 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14890
14891         * class.c (build_utf8_ref): Initialize variable `field'.
14892
14893         * decl.c (init_decl_processing): Initialize variable `field'.
14894
14895         * expr.c (build_known_method_ref): Mark parameters `method_type',
14896         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
14897         (process_jvm_instruction): Likewise for parameter `length'.
14898
14899         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
14900         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
14901         ATTRIBUTE_UNUSED.
14902
14903         * parse.y (maybe_generate_clinit): Remove unused variable
14904         `has_non_primitive_fields'.
14905         (find_in_imports_on_demand): Initialize variables `node_to_use'
14906         and `cl'.
14907         (patch_binop): Likewise for variable `prom_type'.
14908         (patch_unaryop): Likewise for variable `prom_type'.
14909
14910         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
14911
14912         * xref.c (xref_table): Add missing initializer.
14913
14914 1999-05-14  Tom Tromey  <tromey@cygnus.com>
14915
14916         * java-except.h (struct eh_range): Removed unused `next' member.
14917         * verify.c (verify_jvm_instructions): Call check_nested_ranges
14918         after adding all exception handlers.  Sort exception ranges in
14919         order of start PC.
14920         (struct pc_index): New structure.
14921         (start_pc_cmp): New function.
14922         * except.c (add_handler): Return `void'.  Don't call link_handler;
14923         instead construct an ordinary linked list and do range
14924         coalescing.
14925         (check_nested_ranges): New function.
14926         (link_handler): Changed interface to allow merging of eh_ranges.
14927         Split overlapping ranges.  Return `void'.
14928
14929 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14930
14931         * parse.y (constructor_block_end:): New rule, tagged <node>.
14932         (constructor_body:): Use `constructor_block_end' instead of
14933         `block_end'.
14934
14935 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14936
14937         * parse.y (statement_nsi:): Pop `for' statement block.
14938         (java_complete_lhs): Labeled blocks containing no statement are
14939         marked as completing normally.
14940
14941 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14942
14943         * xref.c (xref_set_current_fp): New function, defined.
14944         * xref.h (xref_set_current_fp): New function, prototyped.
14945
14946 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14947
14948         * check-init.c (check_init): Take into account that
14949         LABELED_BLOCK_STMT can be empty.
14950
14951 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14952
14953         * parse.y (java_check_regular_methods): Warning check on not
14954         overriding methods with default access in other packages does not
14955         apply to `<clinit>'.
14956         (java_complete_lhs): If block body is an empty_stmt_node, replace
14957         it by NULL_TREE. This prevents gcc from generating an irrelevant
14958         warning.
14959
14960 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14961
14962         * check-init.c (check_init): Removed code accepting to see things
14963         falling through default:, when doing xrefs.
14964         * java-tree.h (do_not_fold): New global variable, declared.
14965         * parse.y (do_not_fold): New global variable, defined.
14966         (java_complete_expand_method): Set `do_not_fold' to the value of
14967         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
14968         and reinstall them after them have been purged; do not check for
14969         initializations; do not issue missing return errors.
14970         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
14971         when doing xrefs.
14972         (patch_binop): Skip the fold part when doing xrefs.
14973         (build_string_concatenation): Skip the concatenation part when
14974         doing xrefs.
14975         (patch_synchronized_statement): Do not generate a try-finally when
14976         doing xrefs.
14977         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
14978         and keep the location where the throw was seen.
14979         * typeck.c (convert): When `do_not_fold' is set, do not attempt
14980         any treatment on the converted node an simply return a NOP_EXPR of
14981         the targeted type.
14982         * xref.c (xref_get_data): New function, defined.
14983         * xref.h (xref_get_data): New function, declared.
14984         (XREF_GET_DATA): Use xref_get_data.
14985
14986 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14987
14988         * gjavah.c (print_include): Cast the result of `strlen' to int
14989         when comparing against a signed value.
14990         (add_namelet): Likewise.
14991
14992 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14993
14994         * expr.c (expand_invoke): Mark parameter `nargs' with
14995         ATTRIBUTE_UNUSED.
14996         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
14997
14998         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
14999         ATTRIBUTE_UNUSED.
15000
15001         * jcf-reader.c (get_attribute): Cast a value to long
15002         when comparing against a signed expression.  Likewise.
15003
15004         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15005         HOST_BITS_PER_CHAR.
15006
15007 1999-05-11  Andrew Haley  <aph@cygnus.com>
15008
15009         * parse.y (source_end_java_method): If the current method contains
15010         any exception handlers, force asynchronous_exceptions: this is
15011         necessary because signal handlers in libjava may throw exceptions.
15012         * decl.c (end_java_method): Ditto.
15013
15014 1999-05-11  Tom Tromey  <tromey@cygnus.com>
15015
15016         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15017         flags.
15018         * jvspec.c (THREAD_NAME): Removed.
15019         (GC_NAME): Likewise.
15020         (MATHLIB): Likewise.
15021         (WITHLIBC): Likewise.
15022         (GCLIB): Likewise.
15023         (THREADLIB): Likewise.
15024         (MATH_LIBRARY): Likewise.
15025         (lang_specific_driver): Don't add `-l' options to command line.
15026         Instead, add a single --specs option.  Recognize `-L' options and
15027         use them to search for spec file.
15028         (find_spec_file): New function.
15029         (SPEC_FILE): New define.
15030
15031 1999-05-11  Dave Brolley  <brolley@cygnus.com>
15032
15033         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15034         cpplib-enabled build.
15035
15036 1999-05-05  Per Bothner  <bothner@cygnus.com>
15037
15038         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
15039         temporarily zero it while calling rest_of_decl_compilation.
15040
15041         * java-tree.h (string_ptr_type_node):  Add declaration.
15042         * decl.c:  Define and initialize string_ptr_type_node.
15043         * parse.y (patch_string_cst):  Use string_ptr_type_node.
15044
15045         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
15046         * parse.y (for_statement):  Now unconditionally exit_block.
15047         (finish_labeled_statement):  No longer exit_block if for-loop.
15048         (patch_loop_statement):  Check harder if the loop is already labeled.
15049
15050         * parse.y (patch_initialized_static_field):  Removed function.
15051         (maybe_generate_clinit):  Removed special handling for interfaces.
15052         (java_complete_expand_methods):  Do a preliminary java_complete_tree
15053         on <clinit> to determine if it can be removed.
15054         (java_complete_expand_method):  Remove special handling for <clinit>.
15055         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
15056         optimize if we get back empty_stmt_node.
15057         For MODIFY_EXPR, re-do checking of static initializers.
15058         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
15059         For VAR_DECL, pass correct context.
15060
15061         * verify.c (verify_jvm_instructions):  Better error messages.
15062
15063 1999-05-03  Tom Tromey  <tromey@cygnus.com>
15064
15065         * parse-scan.y (interface_declaration): Call
15066         report_class_declaration for interfaces.
15067
15068 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
15069
15070         * Makefile.in: Remove -v from bison command lines.
15071
15072 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15073
15074         * check-init.c (check_init): Exclude a case of error when doing
15075         xrefs.
15076         * class.c (layout_class_method): Don't generate the error message
15077         twice when compiling from source.
15078         * lang-options.h: Added `-Wredundant-modifers' and
15079         `-Wunusupported-jdk11' flags and help text.
15080         * lang.c (lang_decode_option): Added support for
15081         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15082         flag_static_local_jdk11 and flag_redundant set accordingly.
15083         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15084         * parse.h (EXPR_WFL_ADD_COL): New macro.
15085         (DECL_END_SOURCE_LINE): Likewise.
15086         (DECL_INHERITED_SOURCE_LINE): Likewise.
15087         * parse.y (static_ref_err): New function, prototyped.
15088         (CCB_TK): Now tagged <operator>.
15089         (class_body:): Remember the location of the closing '}' of a class
15090         definition when doing xrefs.
15091         (block:): Likewise.
15092         (block_end:): Likewise.
15093         (create_class): Remember the location of the inherited class
15094         identifier when doing xrefs.
15095         (register_fields): Added test on first operand of `init' before
15096         testing it TREE_CODE.
15097         (method_header): Store the location of the class identifier in the
15098         class decl when doing xrefs.
15099         (finish_method_declaration): Don't combine first/last method line
15100         when doing xref.
15101         (java_check_regular_methods): Warning check on not overriding
15102         methods with default access on other packages move before check on
15103         static methods. Initialization of `aflags' also moved up.
15104         (resolve_expression_name): Call static_ref_err to report the error.
15105         (static_ref_err): New function, implemented.
15106         (resolve_field_access): Returned simplified static field access
15107         when doing xrefs.
15108         (resolve_qualified_expression_name): Check for illegal use of
15109         static fields in a non static context. Call static_ref_err to
15110         report error in various places.
15111         (java_complete_tree): Do not fold initialized static fields when
15112         doing xrefs.
15113         (java_complete_lhs): Likewise.
15114
15115 1999-04-29  Anthony Green  <green@cygnus.com>
15116
15117         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15118         create internal labels.
15119         (lookup_label): Ditto.
15120
15121 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15122
15123         * class.c (layout_class_method): Generate <clinit>'s rtl for
15124         interfaces.
15125         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15126         for interfaces' <clinit>.
15127         * expr.c (lookup_field): Search for fields in interfaces.
15128         (expand_invoke): Fixed indentation.
15129         (expand_java_field_op): Likewise. Use IS_CLINIT.
15130         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15131         (IS_CLINIT): New macro.
15132         * parse.y (type_declaration:): Call maybe_generate_clinit after an
15133         interface was parsed.
15134         (maybe_generate_clinit): Don't generate if the current class is an
15135         interface with only fields of primitive types.
15136         (reset_method_name): Use IS_CLINIT.
15137         (java_complete_expand_method): Expand <clinit> when it exists for
15138         interfaces. Use IS_CLINIT.
15139         (resolve_expression_name): Use DECL_CONTEXT instead of
15140         current_class to build static field references.
15141         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15142         ARRAY_REF when doing xreferencing.
15143         (check_final_assignment): Fixed typo in leading comment. Use
15144         IS_CLINIT.
15145         (patch_array_ref): Don't fully expand array references when
15146         xreferencing.
15147         (patch_return): Use IS_CLINIT.
15148         (patch_throw_statement): Likewise.
15149
15150 1999-04-22  Tom Tromey  <tromey@cygnus.com>
15151
15152         * Make-lang.in (JAVA_SRCS): Added check-init.c.
15153
15154 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15155
15156         * decl.c (predef_filenames, predef_filenames_size): New globals
15157         (init_decl_processing): predef_filenames and predef_filenames_size
15158         initialized.
15159         * java-tree.h (predef_filenames, predef_filenames_size): Declared
15160         extern.
15161         * jcf-parse.c (predefined_filename_p): New function.
15162         (yyparse): Check that files on the command line are specified only
15163         once and issue a warning otherwise.
15164         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15165         * parse.y (source_end_java_method): Nullify NOP method bodies, to
15166         avoid a gcc warning with -W -Wall turned on.
15167         (java_expand_classes): Abort if errors were encountered.
15168         (java_complete_lhs): If the cross reference flag is set, wrap
15169         field DECL node around a WFL when resolving expression name.
15170
15171 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15172
15173         * lang.c (lang_decode_option): Fixed returned value when parsing
15174         `-fxref=...' and `-Wall'.
15175         * parse.y (source_end_java_method): Do not generate code when
15176         flag_emit_xref is set.
15177         (resolve_expression_name): Do not build static field access when
15178         flag_emit_xref is set.
15179         (resolve_field_access): No special treatment on `length' when
15180         flag_emit_xref is set. Do not build qualified static field access
15181         when flag_emit_xref is set.
15182         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15183         when flag_emit_xref is set.
15184         (patch_assignment): Do not generate array store runtime check when
15185         flag_emit_xref is set.
15186         * xref.c (xref_flag_value): Fixed function declaration
15187         indentation.
15188         (xset_set_data): New function.
15189         * xref.h (xref_set_data): Added prototype for new function.
15190         (typedef struct xref_flag_table): New field data.
15191         (XREF_GET_DATA): New macro.
15192
15193 1999-04-19  Tom Tromey  <tromey@cygnus.com>
15194
15195         * xref.h (enum): Removed trailing comma.
15196
15197         * parse.y (resolve_qualified_expression_name): Added missing
15198         `break'.
15199
15200 1999-04-15  Anthony Green  <green@cygnus.com>
15201
15202         * gjavah.c: New prototypes for java_float_finite and
15203         java_double_finite.
15204
15205 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15206
15207         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15208         references.
15209
15210 1999-04-06  Jeffrey A Law  (law@cygnus.com)
15211
15212         * Makefile.in (TREE_H): Add tree-check.h.
15213         (RTL_H): Add genrtl.h.
15214
15215 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15216
15217         * parse.y (patch_assignment): Added ArrayStoreException runtime
15218         check.
15219
15220 1999-04-06  Per Bothner  <bothner@cygnus.com>
15221
15222         * expr.c (pop_type_0):  New function.
15223         (pop_type):  Use pop_type_0.
15224         * java-tree.h (pop_type_0):  New declaration.
15225         * verify.c (verify_jvm_instructions):  Check return instructions.
15226
15227         * parse.y (patch_binop):  Don't fold if non-constant and emiting
15228         class files.
15229
15230 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15231
15232         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15233
15234         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
15235         (main_jcf): Don't define.
15236         (process_file): Don't set `main_jcf'.
15237
15238         * java-tree.h (main_jcf): Don't declare.
15239
15240         * jcf-parse.c (main_jcf): Add static definition.
15241
15242         * lang.c (main_jcf): Don't define.
15243
15244 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15245
15246         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15247
15248         * decl.c (copy_lang_decl): Likewise for `bcopy'.
15249
15250         * jcf-depend.c: Include "config.h", not <config.h>.
15251
15252         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15253         `bcopy' to PTR.
15254
15255         * jcf-path.c: Include "config.h", not <config.h>.
15256
15257         * lex.c: Don't include various system header files.
15258         (java_init_lex): Cast the argument of `bzero' to PTR
15259
15260         * parse-scan.y (java_push_parser_context): Likewise.
15261
15262         * parse.y (java_push_parser_context): Likewise.
15263         (patch_bc_statement): Match format specifier to variable argument.
15264
15265         * xref.c: Don't include <stdio.h>.
15266
15267 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15268
15269         * parse.y (struct parser_ctxt *ctxp): Now global.
15270         (declare_local_variables): Use WFL compound value for the
15271         declaration source line value, when doing cross-referencing.
15272
15273 1999-03-31  Tom Tromey  <tromey@cygnus.com>
15274
15275         * gjavah.c (print_field_info): Allow constants of other types.
15276         (print_include): Generate include when new name is proper prefix
15277         of already printed name.
15278         (add_namelet): Likewise.
15279         (cxx_keyword_subst): New function.
15280         (print_method_info): Use it.
15281         (print_field_name): New function.
15282         (get_field_name): New function.
15283         (print_field_info): Use get_field_name and print_field_name.
15284
15285 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15286
15287         * Makefile.in (keyword.h): Generate using gperf language 'C', not
15288         'KR-C', so gperf uses the `const' keyword on strings.
15289
15290         * keyword.gperf (java_keyword): Const-ify a char*.
15291
15292 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15293
15294         * parse.y (patch_bc_statement): Fixed identation and a bogus
15295         `printf' format.
15296
15297 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15298
15299         * parse.y (patch_assignment): Allow static variables in other
15300         classes to be assigned.
15301
15302 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15303
15304         * class.c (maybe_add_interface): Remove unused variable
15305         `interface_binfo'.
15306         (make_class_data): Use = for assignment, not ==.  Likewise.
15307         (emit_register_classes): Remove unused variable `decl'.
15308
15309         * lex.c: Fix comment so as not to contain an embedded `/*'.
15310
15311         * verify.c (verify_jvm_instructions): Remove unused variable
15312         `self_type'.
15313
15314 1999-03-27  Per Bothner  <bothner@cygnus.com>
15315
15316         * parse.y (complete_loop_body):  Rename to finish_loop_body.
15317         (complete_labeled_statement):  Rename to finish_labeled_statement.
15318         (complete_for_loop):  Rename to finish_for_loop.
15319         (complete_method_declaration):  Rename to finish_method_declaration.
15320
15321         * java-tree.h (continue_identifier_node):  New global node.
15322         * decl.c:  Define and initialize continue_identifier_node.
15323         * parse.y (generate_labeled_block):  Remove - no longer needed.
15324         (build_loop_body):  Use continue_identifier_node for continue block.
15325         (finish_labeled_statement):  Also do pop_labeled_block actions.
15326         (java_complete_lhs):  POP_LOOP even if error.
15327         (build_labeled_block):  Special handling for continue_identifier_node.
15328         (patch_loop_statement):  Re-organize.
15329         (patch_bc_statement):  Re-write.
15330
15331 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15332
15333         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15334         using a WFL compound value.
15335         * parse.y (xref.h): Include.
15336         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15337         WFL compound value.
15338         (register_fields): Set WFL compound value to lineno if doing
15339         xrefs.
15340         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15341         is set.
15342         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15343         * xref.h (expand_xref): Prototype renamed from xref_generate.
15344
15345 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15346
15347         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15348         (GET_CURRENT_BLOCK): New macro.
15349         * parse.y (current_static_block): New global variable.
15350         (method_body:): Define action.
15351         (complete_method_declaration): Set current_function_decl to NULL
15352         when work on the current method is done.
15353         (declare_local_variables): Use GET_CURRENT_BLOCK.
15354         (java_method_add_stmt): Likewise.
15355         (java_complete_expand_method): Disable the use of `this' when
15356         expanding <clinit>.
15357         (enter_a_block): If no current method exist, use
15358         current_static_block to link static initializer blocks.
15359         (exit_block): Rewritten to use current_static_block when no current
15360         method decl exists.
15361         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15362         (patch_return): Forbid the use of `return' in static initializers.
15363         (patch_throw_statement): Fixed indentation. Issue specific error
15364         for uncaught thrown checked exception in static initializer
15365         blocks. Removed FIXME.
15366
15367 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15368
15369         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15370         Link gcj from gcc.o.
15371
15372 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15373
15374         * parse.y (find_applicable_accessible_methods_list): When dealing
15375         with interface: ensure that a given interface or java.lang.Object
15376         are searched only once.
15377
15378 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15379
15380         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15381
15382         * jcf-dump.c (print_access_flags): Add braces around if-else.
15383
15384         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15385         COMBINE_INPUTS.
15386
15387         * lex.c (build_wfl_node): Add static prototype.
15388
15389         * lex.h (build_wfl_node): Remove static prototype.
15390
15391         * parse.y: Include lex.c early enough to declare everything needed.
15392         Ensure calls to `build_wfl_node' pass the proper arguments.
15393         (create_class): Remove unused variable `super_decl'.
15394         (get_printable_method_name): Initialize variable `name'.
15395
15396 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15397
15398         * Changelog: Fixed 1999-03-22 typos.
15399         * lang.c (lang_decode_option): Fixed typo in error string in the
15400         XARG section.
15401
15402 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15403
15404         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15405         (xref.o): New rule.
15406         * java-tree.h (flag_emit_xref): Declared extern.
15407         * lang.c (xref.h): Included.
15408         (flag_emit_xref): New global variable.
15409         (lang_decode_option): Added support for -fxref.
15410         * xref.c: Created.
15411         * xref.h: Likewise.
15412
15413 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15414
15415         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15416         linked with.
15417
15418 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15419
15420         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15421         $(srcdir)/../system.h and $(JAVA_TREE_H).
15422         (jcf-io.o): Depend on $(JAVA_TREE_H).
15423         (mangle.o): Likewise.
15424
15425         * check-init.c (check_cond_init): Add static prototype.
15426
15427         * class.c (build_java_method_type, hashUtf8String,
15428         make_field_value, get_dispatch_vector, get_dispatch_table,
15429         append_gpp_mangled_type, mangle_static_field): Likewise.
15430         (strLengthUtf8): Hide unused definition.
15431         (hashUtf8String): Const-ify.
15432         (make_field_value): Un-ANSI-fy.
15433
15434         * constants.c: Move inclusion of jcf.h above java-tree.h.
15435         (set_constant_entry, find_class_or_string_constant,
15436         find_name_and_type_constant, get_tag_node,
15437         build_constant_data_ref): Add static prototype.
15438
15439         * decl.c (push_jvm_slot, builtin_function,
15440         lookup_name_current_level): Likewise.
15441         (builtin_function): Const-ify.
15442
15443         * except.c (expand_start_java_handler, expand_end_java_handler):
15444         Add static prototype.
15445
15446         * expr.c (flush_quick_stack, push_value, pop_value,
15447         java_stack_swap, java_stack_dup, build_java_athrow,
15448         build_java_jsr, build_java_ret, expand_java_multianewarray,
15449         expand_java_arraystore, expand_java_arrayload,
15450         expand_java_array_length, build_java_monitor, expand_java_pushc,
15451         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15452         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15453         expand_compare, expand_test, expand_cond, expand_java_goto,
15454         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15455         expand_java_field_op, java_push_constant_from_pool): Likewise.
15456
15457         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15458         (build_java_arraynull_check): Mark parameters `node' and `type'
15459         with ATTRIBUTE_UNUSED.
15460         (note_label): Likewise for parameter `current_pc'.
15461         (expand_java_call, expand_java_ret): Hide unused definition.
15462
15463         * java-tree.h (make_class, build_constants_constructor,
15464         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15465         init_outgoing_cpool, register_class, emit_register_classes,
15466         java_layout_seen_class_methods): Prototype.
15467         (unicode_mangling_length): Const-ify.
15468         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15469         emit_unicode_mangled_name, format_int, format_uint,
15470         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15471         jcf_print_utf8_replace, open_class): Prototype.
15472
15473         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15474         <stdio.h>.  Include tree.h/java-tree.h.
15475         (utf8_equal_string usage, process_class): Add static prototype.
15476         (open_class): Don't prototype this here.
15477         (utf8_equal_string): Match arguments to format specifiers.
15478         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15479         TABLE_SWITCH, disassemble_method): Likewise.
15480
15481         * jcf-io.c: Include tree.h/java-tree.h.
15482         (open_class, find_classfile, jcf_print_utf8,
15483         jcf_print_utf8_replace): Const-ify.
15484
15485         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15486         parse_class_file): Add static prototype.
15487         (find_in_current_zip): Match definition to existing static
15488         prototype.
15489
15490         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15491         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15492         finish_jcf_block, define_jcf_label, get_jcf_label_here,
15493         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15494         write_chunks, adjust_typed_op, generate_bytecode_conditional,
15495         generate_bytecode_return, perform_relocations, init_jcf_state,
15496         init_jcf_method, release_jcf_state, generate_classfile):
15497         Add static prototype.
15498         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15499         (make_class_file_name): Const-ify.
15500
15501         * jcf.h (find_classfile): Const-ify.
15502
15503         * jv-scan.c (reset_report): Remove prototype.
15504
15505         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15506         (error): Rewrite to allow varargs.
15507
15508         * lang.c (lang_f_options): Const-ify.
15509
15510         * lex.c (java_parse_escape_sequence): Add static prototype.
15511         (java_allocate_new_line): Match definition to existing static
15512         prototype.
15513
15514         * mangle.c Include tree.h/java-tree.h.
15515         (unicode_mangling_length, emit_unicode_mangled_name,
15516         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15517
15518         * parse.h (jdep_code): Remove trailing comma in enumeration.
15519         (java_get_line_col): Move prototype outside of !JC1_LITE test.
15520         (reset_report): Add prototype.
15521
15522         * verify.c (push_pending_label, merge_types): Add static
15523         prototypes.
15524
15525         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15526
15527 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15528
15529         * parse.y (find_applicable_accessible_methods_list): Extend the
15530         search to superinterfaces when relevant.
15531         (search_applicable_methods_list): New function.
15532
15533 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15534
15535         * class.c (unmangle_classname): Implemented stricter testing
15536         before setting the QUALIFIED_P flag on an identifier.
15537
15538 1999-03-16  Per Bothner  <bothner@cygnus.com>
15539
15540         * parse.y (java_complete_lhs):  Call force_evaluation_order
15541         after patch_newarray.
15542         (patch_binop):  Don't call fold if there are side effects.
15543
15544 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15545
15546         * parse.y (java_stabilize_reference): Use save_expr instead of
15547         building a SAVE_EXPR node.
15548         (java_complete_lhs): Patch the resulting string of the `+='
15549         operator (if necessary) and complete the RHS after having built
15550         the cast.
15551
15552 1999-03-15  Per Bothner  <bothner@cygnus.com>
15553
15554         * class.c (make_class):  Don't set CLASS_P here (because
15555         this function is also called by build_java_array_type).
15556         (push_class):  Set CLASS_P here instead.
15557         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
15558
15559         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
15560         context.  If the context is class, perfer "super" over "synchronized".
15561         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
15562
15563         * parse.y (create_class):  Don't call parser_check_super here;
15564         it is not robust.  Always wait until later.
15565
15566         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
15567         match what JDK 1.2 does), but don't set ACC_PUBLIC.
15568
15569 1999-03-13  Per Bothner  <bothner@cygnus.com>
15570
15571         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
15572         * lex.h (UNGETC):  Change misleading macro.
15573
15574 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15575
15576         * parse.y (java_stabilize_reference): Return NODE when patching a
15577         COMPOUND_EXPR.
15578         (java_complete_lhs): Put parenthesis around truth values.
15579
15580 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15581
15582         * class.c (layout_class_method): Don't make rtl for interface
15583         methods.
15584         * parse.h (GET_TYPE_NAME): New macro.
15585         * parse.y (if_then_statement:): Fixed indentation.
15586         (if_then_else_statement:): Likewise.
15587         (for_statement:): Fixed spacing.
15588         (try_statement:): Fixed indentation.
15589         (create_interface): Don't force interfaces to be abstract.
15590         (method_header): Abstract methods are OK in interfaces.
15591         (declare_local_variables): Fixed typo in comment.
15592         (java_complete_expand_method): Fixed indentation.
15593         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15594         non accessible fields.
15595         (java_stabilize_reference): New function.
15596         (java_complete_lhs): Fixed indentation. Use
15597         java_stabilize_reference in compound assignment. Insert the
15598         cast. If not processing `+' fix string constants before processing
15599         binop.
15600
15601 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15602
15603         * constants.c (find_class_or_string_constant): Cast variable `j'
15604         to a `jword' when comparing against one.
15605
15606         * expr.c (java_lang_expand_expr): Remove unused variables
15607         `has_finally_p' and `op0'.
15608
15609         * gjavah.c (print_field_info): Cast a value to jint when comparing
15610         against one.  Likewise for a jlong.
15611         (add_namelet): Likewise cast a `sizeof' to an int when comparing
15612         against a signed quantity.
15613
15614         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15615         (print_signature): Don't needlessly dereference variable `str'
15616
15617         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15618         `max_locals' with ATTRIBUTE_UNUSED.
15619         (jcf_parse_class): Likewise for variable `index'.
15620
15621         * parse.h (reverse_jdep_list): Remove static prototype.
15622
15623         * parse.y (build_jump_to_finally): Remove prototype and definition.
15624         (reverse_jdep_list): Add static prototype.
15625
15626         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15627         `assignment' and `expr_decl'.
15628
15629         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15630
15631 1999-03-12  Andrew Haley  <aph@cygnus.com>
15632
15633         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15634         we'll need a directory separator and a null character.
15635
15636 1999-03-10  Per Bothner  <bothner@cygnus.com>
15637
15638         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
15639
15640 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15641
15642         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15643         interfaces.
15644
15645 1999-03-05  Per Bothner  <bothner@cygnus.com>
15646
15647         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
15648
15649         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
15650
15651         * class.c (layout_class_method):  A static method in a base class
15652         is never overridden, so treat it like it doesn't exist.
15653         However, do complain about private non-static method overriding
15654         public static method.
15655
15656         * parse.y:  Don't set unused INITIALIZED_P flag.
15657         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
15658
15659         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
15660         (build_array_from_name):  Re-order &index[string] to &string[index].
15661
15662         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
15663         error_mark (it might catch more errors, but it is more likely to lose).
15664
15665 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15666
15667         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15668         (parse-scan.o): Depend on toplev.h.
15669
15670         * class.c (make_method_value): Add prototype.  Make it static.
15671         Remove unused second argument, caller changed.
15672
15673         * expr.c (java_lang_expand_expr): Remove unused variable
15674         `return_label'.
15675
15676         * java-tree.h: Don't prototype find_in_current_zip.
15677         Add prototypes for verify_constant_pool, start_java_method,
15678         end_java_method, give_name_to_locals, expand_byte_code,
15679         open_in_zip, set_constant_value, find_constant1, find_constant2,
15680         find_utf8_constant, find_string_constant, find_class_constant,
15681         find_fieldref_index, find_methodref_index, write_constant_pool,
15682         count_constant_pool_bytes and encode_newarray_type.
15683
15684         * jcf-dump.c: Remove unused variable `LONG_temp'.
15685
15686         * jcf-parse.c: Include parse.h.
15687         (jcf_parse_source): Remove unused parameter, all callers changed.
15688         (jcf_figure_file_type): Add static prototype.
15689         (find_in_current_zip): Likewise.  Also remove unused parameter,
15690         all callers changed.
15691         (read_class): Initialize variable `saved_pos'.
15692
15693         * jcf-reader.c (jcf_parse_preamble): Mark variables
15694         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
15695
15696         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
15697         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
15698         (java_parse_doc_section): Initialize variable `seen_star'.
15699         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
15700         (java_lex_error): Mark parameters `msg' and `forward' with
15701         ATTRIBUTE_UNUSED.
15702         (java_get_line_col): Mark parameters `filename' and `line' with
15703         ATTRIBUTE_UNUSED.
15704
15705         * parse-scan.y: Include toplev.h.
15706         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
15707
15708         * parse.h: use `struct JCF', not plain `JCF'.
15709         (java_parser_context_save_global, java_expand_classes
15710         java_parser_context_restore_global, java_parse): Add prototypes.
15711
15712         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15713         `node'.
15714
15715 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
15716
15717         *  check-init.c (check_init):  COPYN takes word count, not bit count.
15718
15719 1999-02-26  Per Bothner  <bothner@cygnus.com>
15720
15721         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
15722         explicit build_decl.  (Avoids crash in reload when optimizing.)
15723
15724 1999-02-25  Per Bothner  <bothner@cygnus.com>
15725
15726         * decl.c (complete_start_java_method):  Handle synchronized method
15727         even when compiling from bytecode.
15728
15729 1999-02-26  Tom Tromey  <tromey@cygnus.com>
15730
15731         * gjavah.c (add_class_decl): Only generate `#include' if outer
15732         class is not the name of the class we are processing.  Correctly
15733         append `.h' in #include.
15734         (process_file): Clean up newlines around generated `#include's.
15735         (decode_signature_piece): Correctly handle inner classes.
15736         (struct include): New structure.
15737         (all_includes): New global.
15738         (print_include): New function.
15739         (add_class_decl): Use it.
15740         (process_file): Likewise.
15741         (add_class_decl): Generate include for java-array.h if array
15742         seen.
15743         (process_file): Don't generate java-array.h include.
15744
15745         * gjavah.c (add_namelet): Check for standard package names here.
15746         (add_class_decl): Don't check for standard package names here.
15747
15748 1999-02-25  Tom Tromey  <tromey@cygnus.com>
15749
15750         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
15751         When reading a zip file, only use strncmp if both strings are
15752         bigger than the buffer length.  Initialize `k' when looping
15753         through zip file.
15754
15755 1999-02-24  Tom Tromey  <tromey@cygnus.com>
15756
15757         * gjavah.c (struct namelet): New structure.
15758         (add_namelet): New function.
15759         (print_namelet): New function.
15760         (print_class_decls): Use add_namelet and print_namelet to generate
15761         namespaces and not classes.
15762         (method_printed): New global.
15763         (HANDLE_END_METHOD): Examine method_printed.
15764         (print_method_info): Set method_printed when required.  Print
15765         error if function to be ignored is marked virtual.  Handle $finit$
15766         method.
15767         (METHOD_IS_FINAL): New macro.
15768         (print_field_info): Use it.
15769         (HANDLE_METHOD): Clear method_printed.
15770         (method_pass): New global.
15771         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
15772         (process_file): Do two passes over both fields and methods.
15773         (HANDLE_METHOD): Examine method_pass.
15774         (root): New global.
15775         (add_class_decl): New function.
15776         (print_class_decls): Don't scan over entire constant pool.
15777
15778 1999-02-23  Tom Tromey  <tromey@cygnus.com>
15779
15780         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15781         disable linking in that case.
15782
15783 1999-02-20  Tom Tromey  <tromey@cygnus.com>
15784
15785         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15786         not 0x1f.
15787
15788 1999-02-21  Per Bothner  <bothner@cygnus.com>
15789
15790         * decl.c (build_result_decl), java-tree.h:  New method.
15791         (complete_start_java_method):  Handle synchronized methods.
15792         Don't build DECL_RESULT here.  (Ordering dependency problem.)
15793         (start_java_method):  Call build_result_decl here instead  ...
15794         * parse.y (java_complete_expand_method):  ... and here.
15795         (expand_start_java_method): Don't call complete_start_java_method here.
15796         (java_complete_expand_method):  Call it here instead.
15797         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
15798         * java-tree.h:  ... here.
15799
15800         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
15801         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
15802         for ARRAY_REF - it doesn't work when array bounds are checked.
15803         (patch_array_ref):  Handle it here instead.
15804
15805         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
15806
15807 1999-02-19  Per Bothner  <bothner@cygnus.com>
15808
15809         Force left-to-right evaluation of binary operations etc.
15810         * expr.c (force_evaluation_order), java-tree.h:  New function.
15811         * parse.y (java_complete_lhs):  Pass binary operations, procedure
15812         calls, and ARRAY_REFs to force_evaluation_order.
15813         (various):  Set TREE_SIDE_EFFECTS more carefully.
15814
15815         Tolerate random (non-UTF8) encoding in comments without complaining.
15816         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
15817         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
15818
15819         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
15820         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
15821
15822         * parse.y (java_complete_lhs):  Ignore an empty statement in a
15823         COMPOUND_EXPR.  Don't complain about empty statement after return.
15824
15825 1999-02-19  Per Bothner  <bothner@cygnus.com>
15826
15827         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
15828         in TREE_LIST - just chain the POINTER_TYPEs together.
15829         (resolve_class):  If type already resolved, return decl.
15830         After resolving, update TREE_TYPE(class_type), and name (if array).
15831         * parse.h (do_resolve_class), parse.y:  Make non-static.
15832         * class.c (maybe_layout_super_class):  Take this_class argument.
15833         Do do_resolve_class if necessary.
15834         (layout_class, layout_class_methods): Adjust calls appropriately.
15835         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15836         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
15837         * typeck.c (build_java_array_type):  Don't call layout_class.
15838
15839 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15840
15841         * parse.y (check_pkg_class_access): Allow private class access
15842         within the same package.
15843         (strip_out_static_field_access_decl): New function.
15844         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
15845         operator argument before testing its nature.
15846
15847 1999-02-03  Per Bothner  <bothner@cygnus.com>
15848
15849         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
15850         (TRY_EXPR):  Simplify - it no longer has a finally clause.
15851         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
15852         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15853         * expr.c (java_lang_expand_expr):  Likewise.
15854         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
15855         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
15856         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
15857         (build_try_statement):  Remove finally parameter and handling.
15858         (build_try_finally_statement):  New function.
15859         (patch_try_statement):   No longer need to support finally clause.
15860         (try_statement):  Update grammar action rules.
15861         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
15862         Simpler handling of TRY_EXPR, which no longer has a finally clause.
15863
15864 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
15865
15866         * jcf-parse.c (get_constant): Add braces around computation of 'd'
15867         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
15868
15869 1999-02-17  Andrew Haley  <aph@cygnus.com>
15870
15871         * class.c (build_utf8_ref): Back out broken patch which was
15872         intended to to output signatures using '.' as a separator.
15873
15874         * class.c (make_class_data): Output signatures using '.' as a
15875         separator, rather than '/'.
15876         (mangled_classname): Likewise.
15877         (make_field_value): Likewise.
15878         (make_method_value): Likewise.
15879         * constants.c (alloc_class_constant): Likewise.
15880         * expr.c (build_invokeinterface): Likewise.
15881
15882 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15883
15884         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
15885         of an ancient workaround.
15886
15887 1999-02-10  Jeffrey A Law  (law@cygnus.com)
15888
15889         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
15890         here anymore.
15891
15892 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15893
15894         * lex.c (yylex): Encode \0 as UTF8.
15895
15896 1999-02-10  Tom Tromey  <tromey@cygnus.com>
15897
15898         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
15899         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
15900         (libgcj_zip): Renamed.
15901         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
15902         LIBJAVA_ZIP_FILE.
15903         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
15904
15905         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
15906         (GC_NAME): Renamed -lgc to -lgcjgc.
15907
15908 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15909
15910         * lex.c (java_lang_cloneable): Initialize.
15911         * parse.y (java_lang_cloneable): New static variable.
15912         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
15913         doing one more qualification round.
15914         (valid_ref_assignconv_cast_p): Reject null source or
15915         destination. Allow an array to be cast into java.lang.Cloneable.
15916         (patch_cast): Swapped two first arguments to first call to
15917         valid_ref_assignconv_cast_p.
15918
15919 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15920
15921         * parse.h: DECL_P renamed JDECL_P.
15922         * parse.y: DECL_P replaced by JDECL_P.
15923         (build_array_from_name): Always use pointer's type.
15924         (patch_bc_statement): Extra code to search continue target in a
15925         for loop. Fixed comments. Continue target is current loop when
15926         unlabeled.
15927
15928 1999-02-05  Andrew Haley  <aph@cygnus.com>
15929
15930         * class.c (make_class_data): The superclass of an interface should
15931         be null, not class Object.
15932
15933         * lex.c (java_lex): Sign extend hex literals.
15934
15935 1999-02-04  Andrew Haley  <aph@cygnus.com>
15936
15937         * class.c (build_utf8_ref): Output signatures using '.' as a
15938         separator, rather than '/'.
15939         (make_class_data): Likewise.
15940
15941 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
15942
15943         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
15944         mkstemp.o.  Get them from libiberty now.
15945
15946 1999-02-02  Jeffrey A Law  (law@cygnus.com)
15947
15948         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
15949
15950 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15951
15952         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
15953         from libiberty.h
15954
15955 1999-02-02  Per Bothner  <bothner@cygnus.com>
15956
15957         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
15958         * jcf-write.c (generate_bytecode_return):  New function.
15959         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
15960
15961         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
15962         generate special [fd]const_[01] instructions.
15963
15964         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
15965
15966         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
15967         handling OPCODE_lookupswitch or OPCODE_tableswitch.
15968
15969 1999-02-01  Per Bothner  <bothner@cygnus.com>
15970
15971         * parse.y (patch_method_invocation):  Handle calling static methods,
15972         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
15973
15974         * parse.y (java_complete_lhs):  Don't complain about unreachable
15975         exit condition in a do-while statement.
15976
15977 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15978
15979         * lex.c (java_read_char): Fixed utf8 decoding.
15980         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
15981         range.
15982         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
15983         comments. Local variable `all_primitive' is gone. Broadened
15984         acceptance of `0' to floating point targets. `long' can now be
15985         widened to `double' or `float'.
15986         (valid_method_invocation_conversion_p): Added leading
15987         comment. Fixed tabulation.
15988         (build_string_concatenation): Optimize out left or right empty
15989         string constants.
15990
15991 1999-01-28  Per Bothner  <bothner@cygnus.com>
15992
15993         * jcf-write.c (localvar_alloc):  Only emit entry for
15994         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
15995         (generate_bytecode_insns):  Only call put_linenumber if
15996         debug_info_level > DINFO_LEVEL_NONE.
15997         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
15998         is specified, add -g1 (for compatibility wih javac).
15999
16000 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
16001
16002         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16003         gjavah.o, check-init.o, jv-scan.o
16004
16005 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16006
16007         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16008
16009         * gjavah.c: Include config.h and system.h.
16010
16011         * javaop.h (inline): Don't define, its handled by system.h.
16012         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16013         from `inline' to `static inline'.
16014
16015         * jcf.h (inline): Don't define, its handled by system.h.
16016
16017         * lex.c (inline): Likewise.
16018
16019 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
16020
16021         * lang-specs.h: Map -Qn to -fno-ident.
16022
16023 1999-01-29  Richard Henderson  <rth@cygnus.com>
16024
16025         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16026
16027 1999-01-29  Tom Tromey  <tromey@cygnus.com>
16028
16029         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16030         then cast it to Object before calling `append' method.
16031
16032 1999-01-28  Per Bothner  <bothner@cygnus.com>
16033
16034         * check-init.c (check_bool2_init, check_bool_init, check_init):
16035         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16036         * jcf-write.c (generate_bytecode_insns):  Likewise.
16037
16038 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16039
16040         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16041         * parse.y (patch_cast): Allow a boolean to be cast into a
16042         boolean.
16043
16044 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16045
16046         * parse.y: (class_declaration:): Fixed indentation.
16047         (class_member_declaration:): Extra `;' after field declaration now
16048         accepted.
16049         (interface_declaration:): Removed debug messages in error reports.
16050         (patch_binop): Nodes created and returned inherit the orignal
16051         node's COMPOUND_ASSIGN_P flag value.
16052         (patch_cast): Fix cast from char to floating point.
16053
16054 1999-01-25  Andrew Haley  <aph@cygnus.com>
16055
16056         * except.c, java-except.h (expand_resume_after_catch): new
16057         function.
16058         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16059         to branch back to main flow of control after a catch block.
16060
16061 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16062
16063         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16064         $(srcdir)/../system.h.
16065         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16066         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16067         (jcf-write.o): Likewise.
16068         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16069         (mangle.o): Depend on $(srcdir)/../toplev.h.
16070         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16071         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16072
16073         * class.c: Include output.h and parse.h.
16074         (mangled_classname): Add the `const' keyword to a char*.
16075         (find_named_method): Hide unused function definition.
16076         (build_utf8_ref): Change type of variable `c' to unsigned char.
16077         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16078         (build_class_ref): Add the `const' keyword to a char*.
16079         (layout_class_method): Remove unused variable `buf'.
16080
16081         * decl.c (find_local_variable): Remove unused variable `rtl'.
16082         (pushdecl): Likewise for variables `different_binding_level' and
16083         `oldglobal'.
16084         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16085         (maybe_build_cleanup): Likewise for parameter `decl'.
16086
16087         * except.c (expand_start_java_handler): Mark parameter `range'
16088         with ATTRIBUTE_UNUSED.
16089
16090         * expr.c: Include except.h.
16091         (pop_type): Remove unused variable `i'.
16092         (pop_value): Likewise for variables `n_words' and `i'.
16093         (expand_java_arrayload): Likewise for variable `convert'.
16094         (java_lang_expand_expr): Likewise for variables `op0', `type',
16095         `mode', `unsignedp', `node' and `elements'.
16096         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16097         `eh_ranges'.
16098         (process_jvm_instruction): Add a `const' qualifier to a char*.
16099
16100         * gjavah.c (output_directory): Add the `const' keyword to a char*.
16101         (temp_directory): Likewise.
16102         (print_c_decl): Likewise.
16103         (print_method_info): Likewise.
16104         (decode_signature_piece): Likewise.
16105         (print_mangled_classname): Likewise.
16106
16107         * java-except.h: Provide prototypes for maybe_start_try,
16108         maybe_end_try and add_handler.
16109
16110         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16111         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
16112         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16113         init_expr_processing, push_super_field, init_class_processing,
16114         can_widen_reference_to, class_depth, verify_jvm_instructions,
16115         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16116         set_local_type, merge_type_state, push_type, load_type_state,
16117         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16118         emit_unicode_mangled_name): Add prototypes.
16119
16120         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16121         (print_signature_type): Use ISDIGIT, not isdigit.
16122         (print_signature): Remove unused variable `j'.
16123
16124         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16125         int when comparing against one.
16126
16127         * jcf-parse.c: Include toplev.h.
16128
16129         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
16130         (localvar_free): Remove unused variable `i'.
16131         (generate_bytecode_conditional): Likewise for variable `kind'.
16132
16133         * jv-scan.c: Include config.h and system.h.  Remove redundant
16134         OS header and gansidecl.h includes.
16135         (warning): Add the `const' keyword to a char*.  Also add
16136         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
16137         __STDC__, when determining whether to use ANSI-isms.
16138         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
16139         (xmalloc): Don't redundantly prototype here.
16140         (main): Remove unused parameter `envp'.  Also fix the arguments
16141         passed to function `fatal' to match the format specifier.
16142
16143         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16144
16145         * mangle.c: Include toplev.h.
16146         (emit_unicode_mangled_name): Declare parameter `len'.
16147
16148         * parse.y (parse_warning_context): Add the `const' keyword to a
16149         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
16150         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16151         (issue_warning_error_from_context): Add the `const' keyword to
16152         a char*.
16153         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
16154         not `__STDC__' for whether to use ANSI-isms.
16155
16156         * typeck.c (incomplete_type_error): Mark parameters `value' and
16157         `type' with ATTRIBUTE_UNUSED.
16158         (parse_signature_type): Use ISDIGIT, not isdigit.
16159
16160         * verify.c (check_pending_block): Add the `const' keyword to a char*.
16161         (verify_jvm_instructions): Likewise.  Remove unused variables
16162         `field_name' and `default_val'.
16163
16164         * zextract.c: Include config.h and system.h.  Remove redundant
16165         OS header includes.
16166
16167         * zipfile.h: Prototype `read_zip_archive'.
16168
16169 1999-01-21  Andrew Haley  <aph@cygnus.com>
16170
16171         * typeck.c (convert): Allow conversions to void type: some
16172         optimizations in gcc do this.
16173
16174 1999-01-21  Andrew Haley  <aph@cygnus.com>
16175
16176         * typeck.c (convert_ieee_real_to_integer): New function.
16177         (convert): When not using fast-math and using hardware fp, convert
16178         an IEEE NaN to zero.
16179
16180 1999-01-18  Andrew Haley  <aph@cygnus.com>
16181
16182         * parse.y (patch_binop): Do a type conversion from signed to
16183         unsigned and then back to signed when a ">>>" is found.
16184
16185 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16186
16187         * java-tree.h: (check_for_initialization): Added prototype.
16188         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16189         * parse.y (do_resolve_class): Removed unused locals.
16190         (read_import_dir): Likewise.
16191         (resolve_qualified_expression_name): Array creation
16192         expressions are valid primary expressions.
16193         (qualify_ambiguous_name): Likewise.
16194         (patch_synchronized_statement): Removed unused local.
16195
16196 1999-01-17  Jeffrey A Law  (law@cygnus.com)
16197
16198         * Makefile.in (zextract.o): Add dependencies.
16199
16200         * Makefile.in: Do not put ^Ls at the start of a line.
16201
16202 1999-01-15  Per Bothner  <bothner@cygnus.com>
16203
16204         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
16205         sub-type the result of the call that gets the exception value.
16206
16207         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
16208         don't call finish_class.
16209
16210         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
16211         clear found before continuing.
16212
16213         * verify.c (verify_jvm_instructions):  On an array load, allow
16214         and handle top of stack to be TYPE_NULL.
16215
16216         * gjavah.c (generate_access):  Translate Java package private or
16217         protected access to C++ public, but with a comment.
16218
16219 1999-01-13  Andrew Haley  <aph@cygnus.com>
16220
16221         * expr.c (generate_name): Name prefix changed to avoid clashes
16222         with assembler temp labels.
16223
16224         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16225         MODIFY_EXPR.  Without this, code for the assignment may not be
16226         generated at all and the synchronized statement will read an
16227         uninitialized variable.
16228
16229 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16230
16231         * class.c (maybe_layout_super_class): Fixed returned value.
16232         * lex.c: Added 1999 to the copyright.
16233         (java_init_lex): Initialize java_lang_imported.
16234         * lex.h: Added 1999 to the copyright.
16235         * parse.h: Added 1999 to the copyright.
16236         (REGISTER_IMPORT): Fixed typo in trailing macro.
16237         (CURRENT_OSB): New macro.
16238         (struct parser_ctxt): New fields osb_depth, osb_limit.
16239         * parse.y (java_lang_id): New global variable.
16240         (type_import_on_demand_declaration): Don't import java.lang.* twice.
16241         (array_creation_expression:): Use CURRENT_OSB.
16242         (dims:): Uses a stack to keep track of array dimensions.
16243         (cast_expression:): Use CURRENT_OSB.
16244         (find_expr_with_wfl): Return NULL if node found doesn't meet the
16245         conditions.
16246         (register_fields): Fixed typos in comment.
16247         (check_method_redefinition): Fixed comment indentation.
16248         (java_check_regular_methods): Set saved found wfl to NULL after
16249         having reinstalled it in the previously found DECL_NAME.
16250
16251 1999-01-10  Richard Henderson  <rth@cygnus.com>
16252
16253         * gjavah.c (java_float_finite): Use a union to do type punning.
16254         (java_double_finite): Likewise.
16255
16256 1999-01-09  Per Bothner  <bothner@cygnus.com>
16257
16258         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
16259         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16260         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
16261         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
16262         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16263         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
16264
16265 1999-01-08  Per Bothner  <bothner@cygnus.com>
16266
16267         * check-init.c (check_init):  If compiling to native, we don't
16268         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
16269
16270 1999-01-08  Tom Tromey  <tromey@cygnus.com>
16271
16272         * parse-scan.y (variable_declarator_id): Set or increment
16273         bracket_count.
16274         (bracket_count): New global.
16275         (formal_parameter): Handle case where bracket pairs trail variable
16276         declarator id.
16277
16278 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
16279
16280         * jcf-parse.c (yyparse): variable len changed from a char to an
16281         int to prevent overflow.
16282
16283 1999-01-06  Per Bothner  <bothner@cygnus.com>
16284
16285         * java-tree.h:  Declare read_class.
16286         * jcf-parse.c (read_class):  New function.
16287         (load_class):  Now just call read_class.
16288
16289         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
16290         * jcf-parse.c (parse_source_file):  Declare save_error_count,
16291         which is needed by java_parse_abort_on_error macro,
16292         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
16293
16294         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
16295         constructor, if initializing a static field.
16296         (patch_new_array_init):  Set TREE_CONSTANT if it is.
16297         * expr.c (java_lang_expand_expr):  For a static array constructor
16298         of primitive elements, allocate the array itself statically.
16299         Disabled until we can set the vtable field statically.
16300
16301         * check-init.c:  New file.  Checks for definite assignment.
16302         * Makefile.in (JAVA_OBJS):  Add check-init.o.
16303         * parse.y (java_complete_expand_method): Call check_for_initialization.
16304         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
16305
16306 1999-01-06  Graham <grahams@rcp.co.uk>
16307
16308         * parse.y : include system.h instead of including
16309         standard headers directly with the exception of <dirent.h>.
16310
16311 1999-01-06  Per Bothner  <bothner@cygnus.com>
16312
16313         * lex.h:  Moved static function declarations to lex.c,
16314         to shut up some -Wall warnings.
16315         * lex.c:  Static function declarations moved here.
16316         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
16317
16318 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16319
16320         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16321
16322 1998-12-22  Per Bothner  <bothner@cygnus.com>
16323
16324         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
16325         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
16326
16327         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
16328         (localvar_alloc):  Change return type to void,
16329         (emit_unop):  Remove unused variable size.
16330
16331         * jcf-write.c (struct jcf_block):  Add new union.
16332         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16333         (call_cleanups):  New functions.
16334         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16335         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16336         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16337         * lang.c (lang_init):  Call using_eh_for_cleanups.
16338         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16339         completing operands to patch_synchronized_statement.
16340         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16341         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16342         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16343
16344 1998-12-20  John F. Carr  <jfc@mit.edu>
16345
16346         * Make-lang.in: Comment out control-Ls; they upset some makes.
16347
16348 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16349
16350         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16351         consistently.
16352
16353 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16354
16355         * parse.y (DIR_SEPARATOR): New define.
16356         (check_class_interface_creation): Use it.
16357
16358         * parse-scan.y (report_main_declaration): Recognize
16359         `java.lang.String' in argument to main.
16360
16361 1998-12-16  Per Bothner  <bothner@cygnus.com>
16362
16363         * parse.y (create_interface):  Remove bogus test.
16364
16365 1998-12-16  Per Bothner  <bothner@cygnus.com>
16366
16367         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16368         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16369
16370 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16371
16372         * parse-scan.y (qualified_name): Use correct sprintf format.
16373
16374 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16375
16376         * gjavah.c (print_field_info): Changed how most negative number is
16377         printed.
16378
16379 1998-12-14  Per Bothner  <bothner@cygnus.com>
16380
16381         * parse.y (fold_constant_for_init):  New function.
16382         (resolve_expression_name):  Don't replace static final
16383         constant-initialized fields by its value.
16384         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16385         not replace static final constant-initialized fields by their values.
16386         (register_fields):  If there is an initializer, set DECL_INITIAL and
16387         MODIFY_EXPR_FROM_INITIALIZATION_P.
16388         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16389         Only call patch_initialized_static_field if
16390         MODIFY_EXPR_FROM_INITIALIZATION_P.
16391         (patch_initialized_static_field):  If not valid constant, clear
16392         DECL_INITIAL.
16393
16394         * parse.y (lookup_field_wrapper):  Fix thinko.
16395
16396         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16397         set and restore global lineno.
16398
16399 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16400
16401         * gjavah.c (print_field_info): If value to print is the smallest
16402         value of its size, then print as hex to avoid later warnings from
16403         C++ compiler.
16404
16405 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16406
16407         * gjavah.c (decompile_method): Decompile `return null'.
16408         (process_file): Generate `#pragma interface'.
16409         (method_declared): New global.
16410         (print_method_info): Set it.
16411         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16412         (print_method_info): Handle abstract methods.
16413
16414 1998-12-13  Per Bothner  <bothner@cygnus.com>
16415
16416         * parse.y (patch_method_invocation):  If class_decl is null
16417         (e.g. an array type), use original type.
16418
16419         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16420         errors about uncaught exception from clone (of array, specifically).
16421
16422 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16423
16424         * gjavah.c (decompile_method): Handle all types of `return'
16425         opcode.  Decompile `return this' and `return'.
16426         (method_access): New global.
16427         (print_method_info): Set it.
16428         (decompile_method): Don't decompile a synchronized method.
16429
16430 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16431
16432         * jcf-reader.c (jcf_parse_one_method): Recognize
16433         HANDLE_END_METHOD.
16434         * gjavah.c (HANDLE_END_METHOD): New macro.
16435         (HANDLE_CODE_ATTRIBUTE): New macro.
16436         (decompile_method): New function.
16437         (print_method_info): Don't print `;\n' at end of function decl.
16438         Include java-opcodes.h.
16439         (decompiled): New global.
16440
16441 1998-12-12  Per Bothner  <bothner@cygnus.com>
16442
16443         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16444         flag_emit_class_files.
16445         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16446         if flag_emit_class_files.
16447         * parse.y (java_complete_tree):  Pre-liminary support for
16448         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16449
16450         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16451         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16452
16453         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16454
16455         * zipfile.h (opendir_in_zip):  New declaration.
16456         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16457         (opendir_in_zip):  New function, using code from open_in_zip.
16458         (open_in_zip):  Call opendir_in_zip.
16459         (find_class):  Remove no-longer-used do_class_file parameter,
16460         but add source_ok parameter.  Change logic so if we find a .java file,
16461         we don't look for .class in later classpath emtries.
16462         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16463         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16464         * gjavah.c: Update call to find_class.
16465         * jcf-dump.c:  Likewise.
16466
16467         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16468         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16469         nothing if body is empty_stmt_node.
16470         Various little fixes so SP gets correctly adjusted.
16471         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16472         For CALL_EXPR, test if static first.
16473         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16474         such as the ones we create for Object and Class.
16475         Set and restore current_function_decl.
16476         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16477         (note_possible_classname):  New function.
16478         (read_import_entry):  Removed.  Merged with read_import_dir.
16479         (read_import_dir):  Don't call find_class - that only gives us
16480         the first classpath entry having the needed package.
16481         Use the struct buffer data structure from buffer.h.
16482         (read_import_dir, find_in_imports_on_demand):  The remembered
16483         class names now use '.' (not '/') as package separator.
16484
16485         * parse.y (java_complete_expand_methods):  Call write_classfile
16486         here, and not in java_expand_classes (which only gets first class).
16487
16488 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16489
16490         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
16491         (register_fields):  If a static fields has an initializer, just
16492         chain it on ctxp->static_initialized, and handle later.
16493         (java_complete_expand_methods):  Force <clinit> first.
16494         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
16495         - it's already been completed.
16496         (patch_initialized_static_field):  New function.
16497         (java_complete_field):  Call it.
16498
16499 1998-12-12  Per Bothner  <bothner@cygnus.com>
16500
16501         * expr.c (encode_newarray_type, build_new_array):  New functions.
16502         * java-tree.h:  Declare build_new_array.
16503         * jcf-write.c (patch_newarray):  Use build_new_array.
16504
16505         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
16506         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
16507
16508         * parse.y (patch_new_array_init):  Re-organize.
16509         Now is passed the actual array (pointer) type of the value.
16510         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16511         (patch_array_constructor):  Removed - merged into patch_new_array_init.
16512         (java_complete_tree):  Update patch_new_array_init.
16513
16514         * jcf-write.c (find_constant_index):  New function.
16515         (generate_bytecode_insns):  Use find_constant_index.
16516         (generate_classfile):  Use find_constant_index for ConstantValue.
16517
16518 1998-12-11  Tom Tromey  <tromey@cygnus.com>
16519
16520         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16521         * decl.c (init_decl_processing): Renamed dtable -> vtable.
16522         * class.c (make_class_data): Renamed dtable -> vtable, and
16523         dtable_method_count -> vtable_method_count.
16524
16525 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16526
16527         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16528         global variables, initialized.
16529         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16530         Declared new global variables.
16531         * lex.c (java_lex): Return long_zero_node, float_zero_node,
16532         double_zero_node, integer_zero_node upon direct matching.
16533         * parse.y (purify_type_name): Added function prototype.
16534         (duplicate_declaration_error_p): Consider new_type as potentially
16535         being a incomplete type. Use purify_type_name on type string.
16536         (method_header): saved_type: unused variable removed. Don't figure
16537         return type if method name is invalid.
16538         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16539         processed by patch_unaryop.
16540         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16541         increment/decrement node into its original type after binary
16542         numeric promotion on its operands.
16543
16544 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16545
16546         * parse.y (array_initializer:): Array init operand is NULL_TREE
16547         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16548         now an error. Fixed indentation problems.
16549         (patch_string): Handle error_mark_node as an argument.
16550         (patch_new_array_init): Fixed indentation problems.
16551         (array_constructor_check_entry): Removed check on null wfl_value.
16552         Return an error if wfl_value's walk returns an error.
16553
16554 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16555
16556         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16557         * lex.c (java_lex): Remember column position before advancing one
16558         token. Retain location information on OCB_TK.
16559         * lex.h (typedef struct java_lc): Added new field.
16560         * parse.h (GET_SKIP_TYPE): New macro.
16561         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16562         * parse.y (build_new_array_init, patch_new_array_init,
16563         patch_array_constructor, maybe_build_array_element_wfl,
16564         array_constructor_check_entry): New function prototypes.
16565         (switch_block:): Tagged <node>.
16566         (OCB_TK): Tagged <operator>.
16567         (array_initializer:): Installed actions.
16568         (variable_initializer): Build location information on element if
16569         necessary.
16570         (switch_statement:): Fixed indentation typo.
16571         (switch_block:): Redefined default action.
16572         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16573         (patch_assignment): Removed duplicate code.
16574         (maybe_build_array_element_wfl, build_new_array_init,
16575         patch_new_array_init, patch_array_constructor,
16576         array_constructor_check_entry): New functions.
16577
16578 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16579
16580         * parse.y (array_initializer): Tagged <node>.
16581         (variable_initializer:): Use default rule.
16582         (array_initializer:): Defined actions.
16583         (variable_initializers:): Likewise.
16584         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16585         non-static field accesses.
16586         (patch_invoke): Fixed indentation typo.
16587         (java_complete_tree): Likewise.
16588         (build_labeled_block): Changed leading comment. Generate an error
16589         in case of duplicate loop labels.
16590         (patch_conditional_expr): Patch results of string concatenation
16591         operations.
16592
16593 1998-12-06  Per Bothner  <bothner@cygnus.com>
16594
16595         * constants.c (find_methodref_index):  When the class is an interface,
16596         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16597
16598         * decl.c (finit_identifier_node):  Use "$finit$", rather than
16599         "<finit>" (which Sun's verifier rejects).
16600         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
16601         (generate_field_initialization_code):  Removed.
16602         (fix_constructors)  Don't add call to $finit$ here (wrong order).
16603         (patch_method_invocation):  Add $finit$ call here.
16604
16605         * java-tree.h (CALL_USING_SUPER):  New macro.
16606         * parse.y (patch_invoke):  Remove im local variable.
16607         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
16608         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
16609         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
16610
16611         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
16612
16613         * parse.y (java_complete_tree):  Don't complain about unreachable
16614         statement if it is empty_stmt_node.
16615
16616         * jcf-write.c (find_constant_wide):  New function.
16617         (push_long_const):  Use find_constant_wide.
16618
16619         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
16620         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
16621         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16622         Emit invokeinterface when calling an interface method.
16623         Emit invokespecial also when calling super or private methods.
16624
16625         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
16626
16627 1998-12-06  Per Bothner  <bothner@cygnus.com>
16628
16629         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
16630
16631 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16632
16633         * java-tree.h (java_layout_seen_class_methods): New function
16634         prototype.
16635         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16636         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16637         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16638         * parse.y (method_declarator:): Defined action.
16639         (issue_warning_error_from_context): input_filename saved, set to
16640         the appropriate value and restored after java_error is called.
16641         (build_unresolved_array_type): Fixed comment.
16642         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16643         (method_header): Deal with return type the same way type are
16644         handled for fields and method's parameters and local variables
16645         types are handled.
16646         (check_method_redefinition): Removed extra CR.
16647         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16648         (java_layout_seen_class_methods): New function.
16649         (java_layout_classes): Call java_layout_seen_class_methods.
16650
16651 1998-12-03  Per Bothner  <bothner@cygnus.com>
16652
16653         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
16654
16655 1998-12-03  Per Bothner  <bothner@cygnus.com>
16656
16657         * jcf-dump.c (main):  Fix error message.
16658         * jcf-path.c (add_entry):  Style fix.
16659
16660 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16661
16662         * class.c (layout_class_method): Call build_java_argument_signature
16663         on constructors too.
16664         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16665         (patch_method_invocation): Define a primary when resolving an
16666         expression name. Augmented comment on code checking illegal `this'
16667         usage. Loosened it test by accepting NEW_CLASS_EXPR.
16668
16669 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16670
16671         * class.c (layout_class_method): Don't report error on non-static
16672         overriding static if the method is private.
16673         * java-tree.h (finish_class): Prototype added.
16674         * lex.c (java_get_line_col): Handle col argument -2 value.
16675         * parse.h: All static method declarations moved to parse.y.
16676         * parse.y: Now contains all static method declarations previously
16677         found in parse.h.
16678         (find_expr_with_wfl, missing_return_error,
16679         unreachable_stmt_error): New functions.
16680         (java_get_real_method_name): Identify constructors bearing class
16681         names in source code compiled classes only.
16682         (java_complete_expand_methods): Call missing_return_error.
16683         (invocation_mode): Private methods invoked as static methods.
16684         (java_complete_tree): Call unreachable_stmt_error.
16685
16686 1998-12-01  Tom Tromey  <tromey@cygnus.com>
16687
16688         * Makefile.in (+target): Removed.
16689         (+xmake_file): Likewise.
16690         (+tmake_file): Likewise.
16691         (.NOEXPORT): Removed duplicate.
16692
16693 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16694
16695         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16696
16697         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
16698
16699         * jvgenmain.c: Remove the xmalloc prototype, we get it from
16700         libiberty.h.  Provide an xmalloc definition.
16701
16702         * jvspec.c: Remove the xmalloc prototype.
16703
16704         * parse-scan.y: Include config.h and system.h.  Don't include
16705         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
16706         Provide an xstrdup definition.
16707
16708 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
16709
16710         * jcf-path.c (add_entry): Recognize ".jar" too.
16711         * lang-specs.h: Likewise.
16712
16713 1998-11-26  Per Bothner  <bothner@cygnus.com>
16714
16715         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
16716         soft_monitorenter_node, soft_monitorexit_node, throw_node.
16717
16718         * jcf-write.c (generate_bytecode_insns):
16719         Handle pre/post-increment/decrement of long.
16720
16721         * jcf-write.c (generate_bytecode_insns):
16722         Handle missing exception handler (finally for synchronized).
16723
16724 1998-11-25  Per Bothner  <bothner@cygnus.com>
16725
16726         * java-tree.h (end_params_node):  Declare global.
16727         * decl.c (end_params_node):  New global.
16728         (init_decl_processing, start_java_method):  Use end_params_node for
16729         end of list of parameter types.  Follows correct gcc conventions.
16730         * expr.c (pop_argument_types, pop_arguments):  Likewise.
16731         * lang.c (put_decl_node):  Likewise.
16732         * typeck.c (various places):  Likewise.
16733         * class.y (various places):  Likewise.
16734         * parse.y (various places):  Likewise.
16735
16736         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
16737         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
16738
16739         * class.c:  Add #include flags.h, remove no-longer needed declaration.
16740
16741         * class.c (layout_class_method):  Remove commented-out code, re-format.
16742         Don't add vtable entry (or index) for private methods.
16743         * expr.c (expand_invoke):  A private method is implicitly final.
16744         * class.c (make_class_data):  If inlining or optimizing,
16745         skip private methods.
16746
16747         * class.c (finish_class):  New function.  Calls existing methods,
16748         but alls emits deferred inline functions.
16749         * jcf-parse.c (parse_class_file):  Call finish_class.
16750         * parse.y (java_complete_expand_methods):  Likewise.
16751
16752         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
16753
16754         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
16755
16756 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
16757
16758         * jcf-write.c (generate_bytecode_conditional): Fix typo.
16759
16760 1998-11-24  Per Bothner  <bothner@cygnus.com>
16761
16762         * (generate_classfile): Always write class access flag with
16763         ACC_SUPER set.
16764
16765 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16766
16767         * class.c (maybe_layout_super_class): New function.
16768         (layout_class): Reorganized. Loop on class methods dispatched into
16769         a new function. Call maybe_layout_super_class.
16770         (layout_class_methods, layout_class_method): New functions.
16771         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
16772         class.
16773         (expand_invoke): Likewise.
16774         * java-tree.h (all_class_list): New global variable declared.
16775         (layout_class_methods, layout_class_method): New function
16776         prototypes.
16777         (LAYOUT_SEEN_CLASS_METHODS): New macro.
16778         * jcf-parse.c (all_class_list): New global variable.
16779         (load_class): Extended what class_or_name can be. Use parser
16780         context mechanism to save globals before calling jcf_parse.
16781         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
16782         is set on the file name.
16783         (jcf_parse): Layout class methods when Object is loaded, otherwise
16784         record class in all_class_list for delayed method layout.
16785         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
16786         * lang.c (put_decl_node): Decode <init> into the decl context
16787         class name.
16788         * lex.c (java_allocate_new_line): Use xmalloc.
16789         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
16790         pointers, not TREE_LIST elements.
16791         (struct parser_ctxt): Fixed comment indentations, added comments
16792         and reordered some fields.
16793         (java_check_methods): Function prototype removed.
16794         * parse.y (java_push_parser_context): Use xmalloc.
16795         (java_parser_context_restore_global): Pop extra pushed ctxp only
16796         when there's nothing next.
16797         (maybe_create_class_interface_decl): Fixed comment, add new
16798         created class decl to all_class_list.
16799         (method_header): Use GET_REAL_TYPE on argument's types.
16800         (method_declarator): Use GET_REAL_TYPE, change type to the real
16801         type in TREE_LIST dependency node. Build argument list with the
16802         real type.
16803         (create_jdep_list): Use xmalloc. Removed allocation error message.
16804         (obtain_incomplete_type): Fixed leading comment. Broadened
16805         incoming argument meaning.
16806         (register_incomplete_type): Use xmalloc. Removed allocation error
16807         message.
16808         (safe_layout_class): Fixed leading comment.
16809         (jdep_resolve_class): Reversed if statement condition and switch
16810         if and else bodies.
16811         (resolve_and_layout): Fixed leading comment. Broadened incoming
16812         argument meaning.
16813         (complete_class_report_errors): New local variable name, for
16814         clarity. purify_type_name used for all error cases.
16815         (java_get_real_method_name): Stricter check on constructors.
16816         (java_check_regular_methods): Reverse methods list only if not
16817         already laid out. Layout artificial constructor.
16818         (java_check_methods): Deleted.
16819         (source_start_java_method): Obtain incomplete type for patchable
16820         method arguments.
16821         (java_layout_classes): Fixed leading comment. Use
16822         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
16823         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
16824         before returning. Fixed comments.
16825         (java_expand_classes): Check for errors up front.
16826         (patch_method_invocation): Class to search is resolved and laid
16827         out.
16828
16829 1998-11-24  Per Bothner  <bothner@cygnus.com>
16830
16831         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
16832
16833         * javaop.h (int8):  Removed - not used.
16834         (jbyte):  Redefine portably with correct signedness.
16835
16836         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
16837
16838         * jcf-write.c (generate_bytecode_insns):  Fix typo
16839         OPCODE_getstatic to OPCODE_getfield.
16840
16841         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
16842         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
16843         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
16844
16845 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16846
16847         * jcf-parse.c (jcf_parse_source): Function returned type is
16848         void. Added prototype.
16849         (jcf_parse): Function returned type is void.
16850         (yyparse): Remove call to fclose on the last parsed file.
16851
16852         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
16853
16854 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16855
16856         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
16857         (layout_class): Cope with methods featuring WFL in decl names.
16858         * decl.c (unqualified_object_id_node): New global variable,
16859         initialized.
16860         (build_decl_no_layout): Removed.
16861         * expr.c (build_primtype_type_ref): Handle Double.
16862         (java_lang_expand_expr): Fixed indentations.
16863         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
16864         (flag_wall, flag_redundant, flag_not_overriding,
16865         flag_static_local_jdk1_1, unqualified_object_id_node): Global
16866         variable declarations.
16867         (build_decl_no_layout): Removed prototype.
16868         (java_get_real_method_name): Added prototype.
16869         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
16870         (java_parse_abort_on_error): Macro now just returns.
16871         * jcf-parse.c (jcf_parse_source): Check fclose returned
16872         value. Call emit_register_classes if java_report_errors returns
16873         zero.
16874         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
16875         flag_static_local_jdk1_1): New integer flags.
16876         (lang_decode_option): New flags set here.
16877         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
16878         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
16879         the flag_redundant variable.
16880         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
16881         when parsing java.lang.Object class.
16882         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
16883         NULL_TREE to build.
16884         (resolve_qualified_expression_name): Fixed indentation.
16885         (patch_array_ref): Changed prototype.
16886         (not_initialized_as_it_should_p): Prototype removed.
16887         (java_report_errors): Added function prototype.
16888         * parse.y (formal_parameter:): Changed error message for not yet
16889         supported final parameters.
16890         (class_type_list:): Set both PURPOSE and VALUE of created
16891         TREE_LIST to be class_type.
16892         (primary_no_new_array:): Handle class literals on primitive types.
16893         (parse_warning_context): Reinstalled correct force_error and
16894         do_warning flags setups.
16895         (java_report_errors): Changed prototype. Return java_error_count
16896         value.
16897         (variable_redefinition_error): Consider treating variable type as
16898         a fake pointer.
16899         (create_interface): Warn about redundant abstract modifier if
16900         flag_redundant is set. Changed error message.
16901         (lookup_field_wrapper): Save/restore globals before/after looking
16902         up field.
16903         (duplicate_declaration_error_p): Consider treating declaration
16904         type as a fake pointer.
16905         (register_fields): Extract real type from dependency node. Check
16906         for duplicate field declaration after type adjustment. Use
16907         DECL_INITIAL to store static final initialized values.
16908         (method_header): Extract real function type from dependency node.
16909         (check_abstract_method_header): Use GET_METHOD_NAME.
16910         (obtain_incomplete_type): Layout fake pointer type.
16911         (safe_layout_class): Don't try to check for methods before layout.
16912         (java_complete_class): Don't check for correct throws clause
16913         elements inheritance here.
16914         (resolve_and_layout): Broadened name parameter meaning.
16915         (reset_method_name): Use GET_METHOD_NAME.
16916         (java_get_real_method_name): New function.
16917         (java_check_regular_methods): Don't check methods in
16918         java.lang.Object.  Verify lineage of throws clause elements. Use
16919         flag_no_overriding in warning report.
16920         (check_throws_clauses): Don't check if class was from
16921         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
16922         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
16923         (declare_local_variables): Use flag_static_local_jdk1_1 to report
16924         warning on unsupported final local variables. Use build_decl
16925         instead of build_decl_no_layout. Get real local variable type from
16926         dependency node.
16927         (source_start_java_method): Get real parameter type from
16928         dependency node. Call build_decl instead of build_decl_no_layout.
16929         (java_layout_classes): Reverse tree and layout type and class as
16930         required. Mark class as loaded when done.
16931         (resolve_field_access): Fixed indentation. Restricted condition
16932         leading to static field access code generation. Set field_type
16933         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
16934         (resolve_qualified_expression_name): Initialize type_found to
16935         null. Handle static field resolved during qualification. Fixed
16936         layout on non primitive field decl types.
16937         (not_accessible_p): Fixed typo in comment.
16938         (patch_method_invocation): Resolve and layout class to search from
16939         type.
16940         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
16941         layout non primitive type, if necessary. Make method node only to
16942         report errors.
16943         (find_applicable_accessible_methods_list): Consider WFL'ed method
16944         decl names. Fixed indentation.
16945         (argument_types_convertible): Resolve and layout target type if
16946         necessary.
16947         (java_complete_tree): Fixed indentation problems. Rewrote
16948         CALL_EXPR thrown exceptions check. Re-installed further processing
16949         of the assignment in certain cases.
16950         (patch_assignment): Call maybe_build_primttype_type_ref to perform
16951         inlining on class literals.
16952         (valid_builtin_assignconv_identity_widening_p): Cope with constant
16953         0 literal.
16954         (valid_method_invocation_conversion_p): Likewise.
16955         (patch_string): Temporary disable forbidden use of `this' in
16956         explicit constructor invocations when doing string concatenation
16957         within their scope.
16958         (patch_unaryop): Added comment. Reinstalled code to disable
16959         further check on assignment operation with cast expression RHS.
16960         (patch_switch_statement): Fixed indentation.
16961         (build_try_statement): Call build_decl instead of
16962         build_decl_no_layout.
16963         (patch_synchronized_statement): Likewise.
16964         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
16965         IS_UNCHECKED_EXPRESSION_P.
16966         (check_thrown_exceptions_do): Changed leading comment. Resolve and
16967         layout argument exception type.
16968         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
16969         of IS_UNCHECKED_EXPRESSION_P.
16970
16971 1998-11-18  Anthony Green  <green@cygnus.com>
16972
16973         * jcf-parse.c (yyparse): Open class file in binary mode.
16974
16975 1998-11-15  Per Bothner  <bothner@cygnus.com>
16976
16977         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
16978
16979         * jcf-write.c (perform_relocations):  Move check out one loop.
16980
16981 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
16982
16983         * Make-lang.in: Fix reference to srcdir.
16984         * jv-scan.c: Add missing xmalloc prototype.
16985         * jvgenmain.c: Ditto.
16986
16987 1998-11-15  Per Bothner  <bothner@cygnus.com>
16988
16989         * decl.c (error_mark_node), java-tree.h:  New global.
16990         * parse.y:  Use empty_stmt_node instead of size_zero_node.
16991         (build_if_else_statement):  If missing else, use empty_stmt_node.
16992
16993         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
16994         (java_complete_expand_method):  Complain if return is missing.
16995         (java_check_regular_methods):  Comment out incorrect error check.
16996         (not_accessible_p):  Fix incorrect handling of protected methods.
16997         (patch_method_invocation):  Pass correct context to not_accessible_p.
16998         (find_applicable_accessible_methods_list):  Likewise.
16999         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
17000         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
17001         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
17002         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
17003
17004         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
17005         (push_int_const):  Remove reundant NOTE_PUSH.
17006         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
17007         (- case SWITCH_EXPR):  Fix code generation bug.
17008         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
17009         (generate_classfile):  More robust for abstract methods.
17010
17011 1998-11-15  Anthony Green  <green@cygnus.com>
17012
17013         * Makefile.in: jv-scan and jvgenmain all require libiberty.
17014         * Make-lang.in: Ditto.
17015
17016         * jv-scan.c: Remove xmalloc and xstrdup definitions.
17017         * jvgenmain: Ditto.
17018
17019 1998-11-15  Per Bothner  <bothner@cygnus.com>
17020
17021         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
17022
17023         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
17024
17025 1998-11-14  Per Bothner  <bothner@cygnus.com>
17026
17027         Allow uses of interface types to verify.  This is not really
17028         type-safe, but it matches what Sun does, and is OK as long as
17029         there are appropriate run-time checks.
17030         * verify.c (merge_types):  If merging two interface types,
17031         just set the result to java.lang.Object.
17032         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
17033
17034 1998-11-13  Tom Tromey  <tromey@cygnus.com>
17035
17036         * gjavah.c (main): Handle --output-class-directory argument.
17037         * jvspec.c (lang_specific_driver): Translate `-d' into
17038         -foutput-class-dir.
17039         * jcf.h (jcf_write_base_directory): Declare.
17040         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17041         * lang-options.h: Mention -foutput-class-dir.
17042         * jcf-write.c (jcf_write_base_directory): New global.
17043         (make_class_file_name): Put generated .class file into `-d'
17044         directory, or into source directory if -d not given.  Function now
17045         static.
17046         (write_classfile): Free class file name.  Handle case where class
17047         file name is NULL.
17048         (DIR_SEPARATOR): New macro.
17049         Include <sys/stat.h>
17050
17051         * Makefile.in (prefix): New macro.
17052
17053 1998-11-12  Per Bothner  <bothner@cygnus.com>
17054
17055         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
17056         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
17057         here (done in patch_invoke instead).
17058         (case_identity):  Moved here from parse.y.
17059
17060         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
17061         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
17062         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
17063         so they can be efficiently scanned without recursion.
17064         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17065         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
17066         in BLOCK iteratively, rather than recursively.
17067
17068         * parse.y (do_unary_numeric_promotion):  New function.
17069         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
17070
17071         * parse.y (patch_newarray):  Various fixes.
17072
17073         Re-do handling of switch statements (for proper block scoping).
17074         * parse.y:  Add just a single block for the enture switch block,
17075         but don't create any "case blocks".
17076         (group_of_labels):  Rmeoved unneeded non-terminal.
17077         CASE_EXPR and DEFAULT_EXPR are added to current block.
17078         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
17079         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17080         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
17081         * parse.y (wfl_operator, print_int_node): Make non-static.
17082         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
17083         as part of recursive scan of block.
17084         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
17085         (patch_switch_statement):  Most tests move dinto java_complete_tree.
17086
17087         * parse.y:  Make various production be non-typed (void).
17088         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
17089         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
17090         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
17091
17092         * jcf-write.c (struct jcf_handler):  New type.
17093         (struct jcf_switch_state):  New type.
17094         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
17095         (alloc_handler, emit_unop, emit_reloc):  New functions.
17096         (adjust_typed_op):  Add extra parameter ("max type" offset).
17097         (emit_switch_reloc, emit_case-reloc):  New function.
17098         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
17099         (generate_bytecode_insns):  Support REAL_CST, switch statements,
17100         exception handling, method calls, object/array creation, and more.
17101
17102         * class.c:  Remove some unused variables.
17103         * constants.c (find_string_constant):  New function.
17104         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
17105         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
17106         if flag_emit_class_files.
17107
17108 1998-11-12  Tom Tromey  <tromey@cygnus.com>
17109
17110         * jcf-io.c (find_class): Added explanatory comment.
17111
17112         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
17113         trailing slash to `.zip' entries.
17114
17115         * jvspec.c (lang_specific_driver): Correctly handle case where
17116         GC_NAME not defined.
17117
17118 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17119
17120         * jvspec.c (GC_NAME): New define.
17121         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
17122         if required.
17123         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17124
17125 1998-11-11  Per Bothner  <bothner@cygnus.com>
17126
17127         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
17128
17129 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17130
17131         * jcf-dump.c (main): Correctly recognize `--'-style long options.
17132
17133 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17134
17135         * class.c (is_compiled_class): Call safe_layout_class for class
17136         compiled from source.
17137         * conver.h (convert_to_integer, convert_to_real,
17138         convert_to_pointer): Added prototypes.
17139         * decl.c (init_decl_processing): Non longer push the decls of
17140         `methodtable', `constants', `Class', `Field', `dispatchTable'
17141         `jexception' and `Method'.
17142         * expr.c (build_invokeinterface): New function.
17143         (expand_invoke): static variable CLASS_IDENT now in
17144         build_invokeinterface. Use build_invokeinterface.
17145         (expand_java_field_op): Moved code to inline
17146         java.lang.PRIMTYPE.TYPE into a function.
17147         (build_primtype_type_ref): New function.
17148         * java-tree.def (INSTANCEOF_EXPR): New tree code.
17149         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17150         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17151         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17152         (DECL_LOCAL_STATIC_VALUE): New macro.
17153         (build_invokeinterface, build_primtype_type_ref): New function
17154         prototypes.
17155         (java_parse_abort_on_error): Macro rewritten.
17156         * jcf-parse.c (current_method): Add comment to declaration.
17157         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17158         Function prototypes fixed.
17159         (jcf_parse_source): push/pop parser context. save/restore global.
17160         (parse_source_file): Fixed leading comment. Now take a
17161         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17162         classes and pop the parser context anymore.
17163         (yyparse): Push parser context, save globals, parse the source
17164         file, restore globals and pop the parser context when processing a
17165         source file.
17166         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17167         * lex.c (java_parse_doc_section): New function.
17168         (java_lex): Call java_parse_doc_section when appropriate. Build an
17169         operator around INSTANCEOF_TK.
17170         * lex.h (java_lineterminator, java_sprint_unicode,
17171         java_unicode_2_utf8, java_lex_error, java_store_unicode):
17172         Prototypes rewritten.
17173         (java_parse_escape_sequence, java_letter_or_digit_p,
17174         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17175         java_read_unicode, java_store_unicode, java_read_char,
17176         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17177         Added function prototypes.
17178         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17179         define.
17180         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17181         New macros
17182         (struct parser_ctxt): New fields: deprecated,
17183         current_parsed_class_un, gclass_list.
17184         (fix_method_argument_names, issue_warning_error_from_context,
17185         resolve_package, lookup_package_type): New function prototypes.
17186         (resolve_expression_name): Fixed function prototype.
17187         (find_applicable_accessible_methods_list): Fixed indentation, added
17188         extra argument in prototype.
17189         (check_final_assignment, build_null_of_type, check_deprecation,
17190         check_method_redefinition, reset_method_name,
17191         java_check_regular_methods, java_check_abstract_methods,
17192         maybe_build_primttype_type_ref): New function prototype.
17193         * parse.y (conver.h): Include.
17194         (INSTANCEOF_TK): Tagged <operator>.
17195         (single_type_import_declaration): Use REGISTER_IMPORT macro.
17196         (relational_expression:): Build binop for instanceof.
17197         (java_push_parser_context): Remember ctxp->gclass_list across
17198         contexts.
17199         (java_pop_parser_context): Simply return if no context
17200         exists. Remember gclass_list across contexts.
17201         (issue_warning_error_from_context): New function.
17202         (parse_error_context): Don't setup ctxp->elc here. Call
17203         issue_warning_error_from_context instead.
17204         (parse_warning_context): Likewise.
17205         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17206         setup. Link new class/interface to ctxp->gclass_list.
17207         (add_superinterfaces): Register interface as incomplete if not
17208         loaded.
17209         (create_class): Remember class unqualified name in
17210         ctxp->current_parsed_class_un. Check class deprecation.
17211         (register_fields): Check field deprecation. Remember static final
17212         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17213         processing INIT.
17214         (method_header): New local variable ORIG_ARG. Use unqualified
17215         current class name for check on constructor errors. Promote return
17216         type if of record type. Argument list fix moved in
17217         fix_method_argument_names, called here. Check method deprecation.
17218         (fix_method_argument_names): New function.
17219         (method_declarator): Promote record typed arguments.
17220         (safe_layout_class): Check class methods before layout.
17221         (java_complete_class): Compute field layout when patched.
17222         (do_resolve_class): Try to load class after having it renamed
17223         after the package name.
17224         (get_printable_method_name): Use DECL_CONTEXT.
17225         (reset_method_name): New function.
17226         (check_method_redefinition): Use reset_method_name.
17227         (java_check_regular_methods): New local variable
17228         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17229         names for error report. Check for compile-time error when method
17230         found has default (package) access.
17231         (java_check_abstract_methods): Now takes an interface DECL node as
17232         an argument. Also reinstall real name on unchecked
17233         overriding/hiding methods for error report.
17234         (java_check_methods): Fixed leading comment. Get classes to verify
17235         from ctxp->gclass_list. Use CHECK_METHODS macro and set
17236         CLASS_METHOD_CHECKED_P on class verification.
17237         (lookup_java_method2): Get real method name if necessary.
17238         (find_in_imports): Don't check package class access here.
17239         (resolve_package, lookup_package_type): New functions.
17240         (java_layout_classes): Fixed leading comment. Take classes to be
17241         laid out from ctxp->gclass_list.
17242         (java_complete_expand_methods): Don't expand native and abstract
17243         methods.
17244         (java_expand_classes): New function.
17245         (resolve_expression_name): Use additional argument ORIG.  Retrieve
17246         values of static final field of primitive types.
17247         (resolve_field_access): Handles static final field of promotive
17248         type.
17249         (resolve_qualified_expression_name): Handle STRING_CST as
17250         primaries and package name resolution. Check deprecation on found
17251         decls. Set where_found and type_found on non static field resolved
17252         during qualification. Layout non primitive field decl types.
17253         (check_deprecation): New function.
17254         (maybe_access_field): Simplified.
17255         (patch_method_invocation_stmt): Local variable CLASS_TYPE
17256         removed. Reverse method's argument when primary is a type. Don't
17257         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17258         instead. Include abstract class in the list of class searchable
17259         for constructors. Use DECL_CONTEXT of found method for access
17260         checks. Check method deprecation.
17261         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17262         converting arguments. Handle INVOKE_INTERFACE.
17263         (lookup_method_invoke): Search constructor using existing
17264         infrastructure (don't rely on lookup_java_constructor anymore).
17265         (find_applicable_accessible_methods_list): Extra argument flag
17266         LC. Now include constructor in the search.
17267         (qualify_ambiguous_name): Conditional expression are primaries.
17268         (not_initialized_as_it_should_p): static final are always
17269         initialized.
17270         (java_complete_tree): Pass extra NULL argument to
17271         resolve_expression_name. Stricter test to carry on patching
17272         assignments. New case for INSTANCEOF_EXPR.
17273         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17274         (check_final_assignment, maybe_build_primttype_type_ref): New
17275         functions.
17276         (patch_assignment): Detect resolved static finals and carry normal
17277         assignment error check on them. Inline PRIMTYPE.TYPE read access.
17278         (try_builtin_assignconv): Access constant 0 on all primitive
17279         types.
17280         (valid_builtin_assignconv_identity_widening_p): Accept identical
17281         types. Accept all promoted type on int type.
17282         (valid_ref_assignconv_cast_p): Accept a null pointer to be
17283         assigned to a reference.
17284         (valid_method_invocation_conversion_p): Accept to check null
17285         pointers.
17286         (build_binop): Merge declaration and initialization of local
17287         variable BINOP.
17288         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17289         numeric types. Improved validity test for qualify operators on
17290         references.
17291         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17292         and PREINCREMENT_EXPR. Also detect resolved static finals of a
17293         primitive type and issue the appropriate error message.
17294         (resolve_type_during_patch): Mark class loaded when resolved.
17295         (patch_cast): Allow null to be cased to reference types.
17296         (build_null_of_type): New function.
17297         (patch_array_ref): Handle array on references correctly.
17298         (patch_return): Removed unused local variable MODIFY. Force
17299         boolean to be returned as integers. Allows null to be returned by
17300         a function returning a reference.
17301         * typeck.c (convert_to_integer, convert_to_real,
17302         convert_to_pointer): Prototypes moved to convert.h
17303         (lookup_argument_method): Use method real name, if necessary.
17304
17305 1998-10-30  Tom Tromey  <tromey@cygnus.com>
17306
17307         * class.c (build_class_ref): Changed name of primitive classes to
17308         start with `_Jv_'.
17309
17310         * class.c (make_class_data): Renamed fields: nmethods to
17311         method_count, method_count to dtable_method_count.  Always set
17312         `state' field to 0.
17313         * decl.c (init_decl_processing): Likewise.
17314
17315 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17316
17317         * class.c (layout_class): Don't mangle <finit>, produce
17318         __finit<class> instead. Don't verify artificial methods.
17319         * decl.c (finit_identifier_node): New declared global.
17320         (init_decl_processing): finit_identifier_node initialized.
17321         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17322         * java-tree.h (finit_identifier_node): Declared as extern.
17323         (struct lang_decl): New field called_constructor.
17324         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17325         (CLASS_HAS_FINIT_P): New macro.
17326         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17327         explicit constructor invocation.
17328         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17329         CALL_SUPER_CONSTRUCTOR_P): New macros.
17330         (write_classfile): Added prototype.
17331         * jcf-parse.c (jcf_parse_source): Parse and remember for
17332         generation if the file was seen on the command line.
17333         (parse_source_file): Don't write the class file here.
17334         (yyparse): Loop on files rewritten. Set current_jcf.
17335         (parse_zip_file_entries): Parse class file only if it was found.
17336         * lang.c (init_parse): Don't open command line provided filename
17337         here.
17338         (lang_parse): Don't set main_jcf anymore.
17339         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17340         (JCONSTRUCTOR_CHECK): New macro.
17341         (JBSC_TYPE_P): New macro.
17342         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17343         (COMPLETE_CHECK_OP_2): New macro.
17344         (struct parse_ctxt): New field explicit_constructor_p.
17345         (check_class_interface_creation): Fixed prototype indentation.
17346         (patch_method_invocation_stmt): Prototype reflects added argument.
17347         (patch_invoke): Likewise.
17348         (complete_method_declaration, build_super_invocation,
17349         verify_constructor_circularity,
17350         build_this_super_qualified_invocation, get_printable_method_name,
17351         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17352         verify_constructor_super, create_artificial_method,
17353         start_artificial_method_body, end_artificial_method_body,
17354         generate_field_initialization_code): New function prototypes.
17355         * parse.y: Fixed leading comment
17356         (constructor_header:, constructor_body:, block_end:): Rules tagged
17357         <node>.
17358         (type_declaration:): Call maybe_generate_finit.
17359         (method_declaration:): Action for method_body: placed in new
17360         function complete_method_declaration, called here.
17361         (constructor_declaration:): Defined actions. Removed leading
17362         FIXME.
17363         (constructor_header:): New rule with action.
17364         (constructor_body:): Rule rewritten using block_begin: and
17365         block_end:. Defined actions.
17366         (constructor_declarator:, explicit_constructor_invocation:):
17367         Defined actions.
17368         (block:): Use new rules block_begin: block_end:.
17369         (block_begin:, block_end:): New rules and actions.
17370         (block_statements:): Fixed error message for explicit
17371         constructors.
17372         (method_invocation:): Call build_this_super_qualified_invocation
17373         if primary is `this' or `super' was seen.
17374         (conditional_expression:): Action defined.
17375         (extra_ctxp_pushed_p): New static global flag.
17376         (java_parser_context_save_global): Create parser context if
17377         necessary. Use extra_ctxp_pushed_p to remember it.
17378         (java_parser_context_restore_global): Pop extra parser context if
17379         one exists.
17380         (build_array_from_name): Array on primitive types are marked
17381         loaded.
17382         (register_fields): Restore new name in field initializer
17383         expression if type was altered. Non static fields initialized upon
17384         declaration marked initialized.
17385         (maybe_generate_finit): New function.
17386         (maybe_generate_clinit): Use create_artificial_method,
17387         start_artificial_method_body, end_artificial_method_body. Generate
17388         debug info for enclosed initialization statements.
17389         (method_header): Fixed leading comment. Check constructor
17390         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17391         accordingly.
17392         (complete_method_declaration, constructor_circularity_msg,
17393         verify_constructor_circularity): New functions.
17394         (get_printable_method_name): New function.
17395         (check_method_redefinition): Don't rename <finit> methods. Fix
17396         declared constructor names. Error message for
17397         constructors modified.
17398         (java_check_regular_methods): Local variable seen_constructor
17399         renamed saw_constructor. Skip verification on constructors. Create
17400         default constructor with create_artificial_method.
17401         (java_check_methods): Removed unnecessary empty line.
17402         (create_artificial_method, start_artificial_method_body,
17403         end_artificial_method_body): New functions.
17404         (java_layout_classes): Changed leading comment. Reverse fields
17405         list if necessary. Always layout java.lang.Object if being
17406         defined.
17407         (java_complete_expand_methods): Verify constructor circularity.
17408         (java_complete_expand_method): Call fix_constructor on
17409         constructors.  Local variable no_ac_found removed. Restore
17410         bindings if method body expansion failed.
17411         (fix_constructors, verify_constructor_super,
17412         generate_field_initialization_code): New function.
17413         (java_expand_classes): Fixed leading comment. Write class file
17414         here.
17415         (resolve_expression_name): Check for illegal instance variable
17416         usage within the argument scope of an explicit constructor
17417         invocation.
17418         (resolve_qualified_expression_name): Pass extra from_super flag
17419         when invoking patch_method_invocation_stmt. New case for
17420         conditional expression when used as a primary. Check for error
17421         when acquiring super.
17422         (patch_method_invocation_stmt): Added extra argument super. New
17423         local variable is_static_flag. Set class_to_search according to
17424         the nature of the constructor invocation. Don't add `this'
17425         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17426         invocation within the argument scope of explicit constructor
17427         invocation. Set is_static according to is_static_flag. Provide
17428         extra `super' argument to patch_invoke invocation.
17429         (patch_invoke): New argument from_super. Loop on arguments
17430         indentation fixed. Pass from_super to invocation_mode. New switch
17431         case INVOKE_SUPER. Fixed error message in switch default case.
17432         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17433         value.
17434         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17435         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17436         message takes constructors into account.
17437         (find_applicable_accessible_methods_list): Fixed indentation.
17438         (qualify_ambiguous_name): Take explicit constructor invocation
17439         into account. Deal with a conditional expression as a primary to
17440         a method call.
17441         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17442         case. Added extra argument to patch_method_invocation_stmt.
17443         Register calls made to explicit constructor `this'. Don't call
17444         save_expr in ARRAY_REF case when emitting class files. Check for
17445         illegal use of this when expanding explicit constructor invocation
17446         arguments.
17447         (complete_function_arguments): Set and reset parser context
17448         explicit_constructor_p field value when appropriate.
17449         (build_super_invocation, build_this_super_qualified_invocation):
17450         New functions.
17451         (patch_assignment): Fixed typo.
17452         (patch_unaryop): Check on final fields occurs only when a decl
17453         exits.
17454         (patch_return): Take constructors into account.
17455         (patch_conditional_expr): New function.
17456         * typeck.c (build_java_signature): Removed unnecessary empty line.
17457
17458 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17459
17460         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17461
17462 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17463
17464         * decl.c (init_decl_processing): Renamed fields.
17465         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17466         interface_len, msize fields.
17467
17468         * class.c (make_class_data): Removed subclass_head and
17469         subclass_next fields.
17470         * decl.c (init_decl_processing): Removed subclass_head and
17471         subclass_next fields.
17472
17473 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17474
17475         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17476         * mangle.c (emit_unicode_mangled_name): Similarly.
17477
17478 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17479
17480         * jcf-parse.c (get_constant): Place braces around code to compute
17481         'd' when REAL_ARITHMETIC is not defined.
17482
17483 1998-10-25  H.J. Lu  (hjl@gnu.org)
17484
17485         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17486         dependency.
17487
17488 1998-10-23  Tom Tromey  <tromey@cygnus.com>
17489
17490         * lang-specs.h: `.zip' files are input to jc1.
17491
17492 1998-10-22  Per Bothner  <bothner@cygnus.com>
17493
17494         * jvspecs.c:  Add (but don't enable) support for combining multiple
17495         .class and .java input filenames to a single jc1 invocation.
17496         Add support for -C flag (copile to .class files).
17497         Translate -classpath and -CLASSPATH arguments.
17498         * lang-specs.h:  Don't set %2 spec.
17499
17500 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17501
17502         * jcf-path.c (add_entry): Don't add trailing separator if entry is
17503         a .zip file.
17504         (add_path): Don't add trailing separator to non-empty path
17505         elements.
17506
17507         * lang.c (lang_decode_option): Check for -fclasspath and
17508         -fCLASSPATH before examining other `-f' options.
17509
17510         * java-tree.h (finalize_identifier_node): Don't declare.
17511         * class.c (make_class_data): Don't push "final" field.
17512         * decl.c (init_decl_processing): Don't push "final" field.
17513         (finalize_identifier_node): Removed.
17514         (init_decl_processing): Don't set finalize_identifier_node.
17515
17516         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17517
17518 1998-10-11  Anthony Green  <green@cygnus.com>
17519
17520         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17521         (JV_SCAN_SOURCES): New macro.
17522         (JCF_DUMP_SOURCES): Likewise.
17523         (jcf-dump$(exeext)): New target.
17524         (jv-scan$(exeext)): New target.
17525
17526 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17527
17528         * Makefile.in (LEX): Removed.
17529         (LEXFLAGS): Likewise.
17530         (SET_BISON): New macro.
17531         (BISON): Removed.
17532         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
17533         spurious diffs in parse.c.
17534         ($(PARSE_SCAN_C)): Likewise.
17535         (PARSE_DIR): New macro.
17536         (PARSE_C): Use it.
17537         (PARSE_SCAN_C): Likewise.
17538         (PARSE_RELDIR): New macro.
17539
17540         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17541
17542         * jcf-io.c (find_class): Use saw_java_source to determine when to
17543         look for `.java' file.
17544         * jcf-parse.c (saw_java_source): New global.
17545         (yyparse): Set it if `.java' file seen.
17546
17547         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17548         (GCJH_SOURCES): Likewise.
17549         * Makefile.in (datadir): New macro.
17550         (libjava_zip): Likewise.
17551         (JAVA_OBJS): Added jcf-path.o.
17552         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17553         (../gcjh$(exeext)): Likewise.
17554         (jcf-path.o): New target.
17555         * java-tree.h (fix_classpath): Removed decl.
17556         * jcf-parse.c (fix_classpath): Removed.
17557         (load_class): Don't call fix_classpath.
17558         * parse.y (read_import_dir): Don't call fix_classpath.
17559         * lex.h: Don't mention classpath.
17560         * lex.c (java_init_lex): Don't initialize classpath.
17561         * jcf-io.c (classpath): Removed global.
17562         (find_class): Use jcf_path iteration functions.  Correctly search
17563         class path for .java file.
17564         (open_in_zip): New argument `is_system'.
17565         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
17566         classpath-related options.
17567         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17568         and -I.
17569         (lang_init): Call jcf_path_init.
17570         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17571         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
17572         Correctly put braces around second string in each entry.
17573         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
17574         classpath-related options.
17575         (help): Updated for new options.
17576         * jcf.h: Declare functions from jcf-path.c.  Don't mention
17577         `classpath' global.
17578         * jcf-path.c: New file.
17579
17580         * jcf-depend.c: Include jcf.h.
17581
17582         * jcf-write.c (localvar_alloc): Returns `void'.
17583         (localvar_free): Removed unused variable.
17584
17585         * lang.c (OBJECT_SUFFIX): Define if not already defined.
17586         (init_parse): Use OBJECT_SUFFIX, not ".o".
17587
17588 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17589
17590         * class.c (emit_register_classes): Renamed from
17591         emit_register_class.
17592         * java-tree.h (emit_register_classes): Prototype renamed from
17593         emit_register_class.
17594         * jcf-parse.c (yyparse): Call emit_register_classes once before
17595         returning.
17596         * parse.y (java_expand_classes): No longer register classes.
17597
17598 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17599
17600         * class.c (is_compiled_class): New local variable
17601         seen_in_zip. Identify classes found in currently compiled source
17602         file(s).
17603         * decl.c (complete_start_java_method): Fixed typo.
17604         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17605         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17606         (CLASS_P): Moved around.
17607         (java_parse_abort_on_error): Macro moved from jcf-parse.c
17608         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17609         java-tree.h
17610         (jcf_parse_source): Changed leading comment. Removed unnecessary
17611         fclose and CLASS_FROM_SOURCE_P marking.
17612         (parse_source_file): New local variables remember_for_generation
17613         and filename. Mark parsed file name identifier node. Removed block
17614         executed when parse_only was null. Set remember_for_generation.
17615         Use it as an argument to java_pop_parser_context.
17616         (yyparse): New local variables several_files, list, next node and
17617         current_file_list. Split ampersand separated file names into
17618         current_file_list. Iterate through the list and parse accordingly.
17619         * parse.h (java_pop_parser_context): New function prototype.
17620         * parse.y (ctxp_for_generation): New static global variable.
17621         (java_pop_parser_context): New argument generate. Link popped ctxp
17622         to ctxp_for_generation list accordingly.
17623         (java_complete_expand_methods): Fixed indentation.
17624         (java_expand_classes): New function.
17625
17626 1998-10-17  Per Bothner  <bothner@cygnus.com>
17627
17628         * Makefile.in:  Link with libiberty.a instead of memmove.o.
17629
17630 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17631
17632         * lex.c (setjmp.h): No longer included.
17633         * lex.h (setjmp.h): Included.
17634         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17635         (duplicate_declaration_error_p): Renamed from
17636         duplicate_declaration_error.
17637         (build_array_from_name): New function prototype.
17638         * parse.y (setjmp.h): No longer included.
17639         (variable_declarator_id): Define action.
17640         (build_array_from_name): New function.
17641         (duplicate_declaration_error_p): Renamed from
17642         duplicate_declaration_error.  Fixed leading comment.
17643         (register_fields): Main `for' loop reorganized. Uses
17644         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17645         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17646         build_array_from_name.
17647         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17648         types.
17649         (read_import_dir): Don't try to skip `.' and `..'.
17650         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17651         build_array_from_name. Main `for' loop reorganized.
17652         (resolve_qualified_expression_name): When building access to a
17653         field, use the type where the field was found, not its own type.
17654         (maybe_access_field): Use field DECL_CONTEXT if the type where the
17655         field was found is null.
17656         (qualify_ambiguous_name): Sweep through all successive array
17657         dimensions.
17658
17659 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17660
17661         * java-tree.h (pop_labeled_block, lang_printable_name,
17662         maybe_add_interface, set_super_info, get_access_flags_from_decl,
17663         interface_of_p, inherits_from_p, fix_classpath,
17664         complete_start_java_method, emit_handlers, init_outgoing_cpool,
17665         make_class_data, register_class, alloc_name_constant): New
17666         function prototypes.
17667         * lang.c (lang_decode_option): Set argc argument unused. Fixed
17668         indentation. Added cast to remove warning.
17669         (lang_printable_name): Set v argument unused.
17670         (lang_print_error): Added argument to lang_printable_name call.
17671         (java_dummy_print, print_lang_decl, print_lang_type,
17672         print_lang_identifier, lang_print_xnode): All argument marked
17673         unused.
17674         * lex.c (java_unget_unicode): Removed unnecessary argument.
17675         (java_allocate_new_line): Unused local variable is gone.
17676         (java_read_char): Added parenthesis in expressions to remove
17677         warnings.  Added final return statement.
17678         (java_read_unicode): Added parenthesis in expression to remove
17679         warning.
17680         (java_parse_end_comment): Fixed java_unget_unicode invocation.
17681         (java_parse_escape_sequence): Likewise.
17682         (java_lex): Unused local variables are gone. Fixed
17683         java_unget_unicode invocation.
17684         * lex.h (set_float_handler): Prototype added when JC1_LITE not
17685         defined.
17686         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
17687         lang_printable_name invocation in macro.
17688         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
17689         Likewise.
17690         (duplicate_declaration_error): Suppressed unused argument in
17691         prototype.
17692         (identical_subpath_p): Function declaration is gone.
17693         (patch_invoke): Suppressed unused argument in prototype.
17694         (patch_cast, build_labeled_block, check_thrown_exceptions):
17695         Likewise.
17696         * parse.y (setjmp.h): Included
17697         (toplev.h): Likewise.
17698         (field_declaration:): Suppressed unused local
17699         (label_decl:): Fixed build_labeled_block invocation.
17700         (java_pop_parser_context): Put extra parenthesis around assignment
17701         in if.
17702         (yyerror): Suppressed unused local variables.
17703         (variable_redefinition_error): Fixed lang_printable_name
17704         invocation.
17705         (create_interface): Suppressed unused local variables.
17706         (create_class): Likewise.
17707         (duplicate_declaration_error): Suppressed unused argument. Fixed
17708         lang_printable_name invocation.
17709         (register_fields): Suppressed unused local variable. Fixed
17710         duplicate_declaration_error invocation.
17711         (method_header): Suppressed unused local variable.
17712         (method_declarator, parser_check_super): Likewise.
17713         (java_complete_class): Suppressed unused local variable. Fixed
17714         fatal error message.
17715         (complete_class_report_errors): Added default: in switch.
17716         (java_check_regular_methods): Fixed lang_printable_name
17717         invocations.
17718         (check_throws_clauses): Likewise.
17719         (java_check_abstract_methods): Suppressed unused local
17720         variable. Fixed lang_printable_name invocation.
17721         (read_import_entry): Added supplemental return statement.
17722         (read_import_dir): Suppressed unused local variables.
17723         (check_pkg_class_access, declare_local_variables): Likewise.
17724         (source_start_java_method): Suppressed unused extern variable
17725         declarations
17726         (expand_start_java_method): Suppressed unused extern and local
17727         variable declarations.
17728         (java_complete_expand_methods): Likewise.
17729         (java_complete_expand_method): Suppressed unused local variables.
17730         (make_qualified_name): Likewise.
17731         (resolve_qualified_expression_name): Added default: in
17732         switch. Fixed lang_printable_name invocation.
17733         (class_instance_creation_expression): Added parenthesis around
17734         expressions.
17735         (patch_method_invocation_stmt): Fixed lang_printable_name and
17736         patch_invoke invocations.
17737         (check_for_static_method_reference): Fixed lang_printable_name
17738         invocation.
17739         (patch_invoke): Suppressed unused arguments and local variables.
17740         (lookup_method_invoke): Suppressed unused local variables.
17741         (qualify_ambiguous_name): Added default: in switch.
17742         (identical_subpath_p): Function removed.
17743         (patch_assignment): Suppressed unused local variables. Suppressed
17744         unnecessary if statement. Fixed lang_printable_name invocations.
17745         (try_builtin_assignconv): Fixed lang_printable_name invocations.
17746         (valid_ref_assignconv_cast_p): Parenthesis around
17747         expression. Suppressed unused local variables.
17748         (build_binop): Suppressed unused local variables. fixed
17749         lang_printable_name invocations.
17750         (string_constant_concatenation): Suppressed unused local
17751         variables.
17752         (patch_unaryop): Fixed lang_printable_name invocation.
17753         (patch_cast): Suppressed unnecessary argument. Fixed
17754         lang_printable_name invocation.
17755         (patch_array_ref): Fixed lang_printable_name invocation.
17756         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
17757         (build_labeled_block): Suppressed unused argument.
17758         (generate_labeled_block): Fixed build_labeled_block invocation.
17759         (build_loop_body): Suppressed unused local variables.
17760         (patch_loop_statement): Likewise.
17761         (patch_exit): Fixed lang_printable_name invocation.
17762         (patch_switch_statement): Likewise.
17763         (case_identity): First argument marked unused.
17764         (patch_try_statement): Fixed lang_printable_name invocations.
17765         (patch_synchronized_statement, patch_throw_statement): Likewise.
17766         (check_thrown_exceptions): Fixed check_thrown_exceptions and
17767         lang_printable_name invocations.
17768         (check_thrown_exceptions_do): Suppressed unused argument.
17769
17770 1998-10-14  Tom Tromey  <tromey@cygnus.com>
17771
17772         * jcf-write.c (write_classfile): Add output class file as target.
17773         * lang-options.h: Added -MD, -MMD, -M, and -MM.
17774         * jcf.h: Added declarations for dependency-tracking functions.
17775         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
17776         * lang.c (lang_decode_option): Recognize -MD and -MMD.
17777         (finish_parse): Call jcf_dependency_write.
17778         (dependency_tracking): New global.
17779         (DEPEND_SET_FILE): New define.
17780         (DEPEND_ENABLE): New define.
17781         (init_parse): Enable dependency tracking if required.
17782         Include "flags.h".
17783         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
17784         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17785         (../gcjh$(exeext)): Likewise.
17786         (jcf-depend.o): New target.
17787         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
17788         (GCJH_SOURCES): Likewise.
17789         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
17790         dep_name argument.
17791         (find_classfile): Added dep_name argument.
17792         (find_class): Compute name of dependency.
17793         (open_in_zip): Call jcf_dependency_add_file.
17794         * gjavah.c (output_file): No longer global.
17795         (usage): Don't mention "gjavah".
17796         (help): Likewise.
17797         (java_no_argument): Likewise.
17798         (version): Likewise.
17799         (main): Recognize and handle -M family of options.
17800         (print_mangled_classname): Return is void.
17801         (process_file): Handle case where output is suppressed.
17802         (HANDLE_END_FIELD): Likewise.
17803         (HANDLE_METHOD): Likewise.
17804         * jcf-depend.c: New file.
17805
17806 1998-10-13  Jeffrey A Law  (law@cygnus.com)
17807
17808         * java-tree.def: Add missing newline at EOF.
17809
17810 1998-10-13  Tom Tromey  <tromey@cygnus.com>
17811
17812         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
17813         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
17814         function.
17815         Include <config.h> and "system.h".
17816         (disassemble_method): Undefine RET to avoid clash with
17817         config/i386/i386.h.
17818
17819 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17820
17821         * decl.c (runtime_exception_type_node, error_exception_type_node):
17822         New global variables.
17823         (init_decl_processing): Initialized.
17824         * expr.c (java_lang_expand_expr): Set caught exception type to
17825         null if catch handler argument doesn't exit.
17826         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
17827         tree codes.
17828         * java-tree.h (runtime_exception_type_node,
17829         error_exception_type_node): Global variables declared.
17830         (DECL_FUNCTION_THROWS): New macro.
17831         (DECL_FUNCTION_BODY): Modified comment.
17832         (DECL_SPECIFIC_COUNT): Likewise.
17833         (struct lang_decl): New field throws_list.
17834         (IS_UNCHECKED_EXPRESSION_P): New macro.
17835         * lex.c (java_lex): Generate location information for THROW_TK.
17836         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
17837         EXCEPTIONS_P): New macros.
17838         (enum jdep_code): New value JDEP_EXCEPTION.
17839         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
17840         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
17841         PATCH_METHOD_RETURN_ERROR): New macros.
17842         (patch_method_invocation_stmt): Added new argument to prototype.
17843         (patch_synchronized_statement, patch_throw_statement,
17844         check_thrown_exceptions, check_thrown_exceptions_do,
17845         purge_unchecked_exceptions, check_throws_clauses): New function
17846         prototypes.
17847         * parse.y Fixed typo in keyword section.
17848         (throw:): Rule tagged <node>.
17849         (THROW_TK): Keyword tagged <operator>.
17850         (method_header:): Last argument to call to method_header passed
17851         from throws: rule.
17852         (throws:, class_type_list:, throw_statement:,
17853         synchronized_statement:, synchronized:): Defined actions.
17854         (method_header): New local variable current. Register exceptions
17855         from throws clause.
17856         (java_complete_tree): Complete and verify exceptions from throws
17857         clause.
17858         (complete_class_report_errors): Error message on exceptions not
17859         found
17860         (java_check_regular_methods): Fixed typo. Shortcut on private
17861         overriding methods. Changed error message on method
17862         redefinition. Check for throws clause compatibility.
17863         (check_throws_clauses): New function.
17864         (java_check_abstract_methods): Use DECL_NAME for wfl or current
17865         method. Changed error message on method redefinition.
17866         (currently_caught_type_list): New static variable.
17867         (java_complete_expand_methods): Purge unchecked exceptions from
17868         throws clause list. Call PUSH_EXCEPTIONS before walk and
17869         POP_EXCEPTIONS after.
17870         (resolve_qualified_expression_name): Pass new argument as NULL to
17871         patch_method_invocation_stmt.
17872         (patch_method_invocation_stmt): New argument ref_decl. Invoke
17873         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
17874         argument list when appropriate. Use new argument if non null to
17875         store selected method decl.
17876         (patch_invoke): Convert if necessary args of builtin types before
17877         forming CALL_EXPR. Argument list no longer reversed here.
17878         (invocation_mode): Treat final methods as static methods.
17879         (java_complete_tree): New cases for THROW_EXPR: and
17880         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
17881         function call.
17882         (complete_function_arguments): No more RECORD_TYPE
17883         conversion. Function parameter nodes no longer saved.
17884         (valid_ref_assignconv_cast_p): Avoid handling null type.
17885         (patch_binop): Fixed null constant reference handling.
17886         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
17887         BUILD_THROW macros.
17888         (patch_try_statement): Fixed comments. Record caught types in
17889         list, push the list, expand try block and pop the list.
17890         (patch_synchronized_statement, patch_throw_statement,
17891         check_thrown_exceptions, check_thrown_exceptions_do,
17892         purge_unchecked_exceptions): New functions.
17893         * typeck.c (lookup_argument_method): Allow WFL in place of method
17894         DECL_NAME during method definition check
17895
17896 1998-10-09  Tom Tromey  <tromey@cygnus.com>
17897
17898         * gjavah.c (decode_signature_piece): New function.
17899         (print_c_decl): Use it.  Added `name_override' argument.
17900         (print_method_info): Use name_override argument to print_c_decl.
17901         (seen_fields): Removed.
17902         (print_field_info): Don't update seen_fields.
17903         (struct method_name): New structure.
17904         (method_name_list): New global.
17905         (print_method_info): Add new method to list of methods.
17906         (name_is_method_p): New function.
17907         (print_field_info): If field name has same name as method, then
17908         change field name.
17909         (process_file): Parse methods before fields.
17910         (field_pass): New global.
17911         (HANDLE_END_FIELD): Take field_pass into account.
17912
17913 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17914
17915         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
17916         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
17917
17918 1998-10-03  Anthony Green  <green@cygnus.com>
17919
17920         * jvspec.c: Fix bug in jvgenmain_spec patch.
17921
17922 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17923
17924         * Makefile.in (lang.o:): Install dependency on java-tree.def.
17925         * decl.c (soft_exceptioninfo_call_node): New global variable.
17926         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
17927         takes extra integer argument. soft_exceptioninfo_call_node
17928         initialized.
17929         * except.c (java_set_exception_lang_code): New function
17930         (method_init_exceptions): Called here.
17931         (prepare_eh_table_type): New function.
17932         (expand_end_java_handler): Called here.
17933         * expr.c (build_java_throw_out_of_bounds_exception): Now features
17934         one argument. Modified generation of call to
17935         soft_badarrayindex_node to use new argument.
17936         (build_java_arrayaccess): Pass faulty index value to
17937         build_java_throw_out_of_bounds_exception.
17938         (generate_name): New function.
17939         (java_lang_expand_expr): New local variables node, current,
17940         has_finally_p. Expand TRY_EXPR node.
17941         (process_jvm_instruction): Replace top of the stack with thrown
17942         object reference when entering exception handler.
17943         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
17944         specific tree codes.
17945         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
17946         global.
17947         (DECL_SPECIFIC_COUNT): New macro.
17948         (prepare_eh_table_type, java_set_exception_lang_code,
17949         generate_name): New function declarations.
17950         (match_java_method): Declaration deleted.
17951         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
17952         macros.
17953         * lex.c (TRY_TK, CATCH_TK): Generate location information.
17954         * parse.h (redefinition_error, refine_accessible_methods_list,
17955         can_cast_to_p): Function declaration removed.
17956         (classitf_redefinition_error, variable_redefinition_error,
17957         parse_jdk1_1_error, find_applicable_accessible_methods_list,
17958         find_most_specific_methods_list, argument_types_convertible,
17959         enter_a_block, valid_builtin_assignconv_identity_widening_p,
17960         valid_cast_to_p, valid_method_invocation_conversion_p,
17961         try_reference_assignconv, add_stmt_to_compound,
17962         build_jump_to_finally, build_tree_list, patch_try_statement,
17963         java_get_catch_block): New function declarations.
17964         * parse.y (string_buffer_type): Global variable deleted.
17965         (group_of_labels, catches, catch_clause, catch_clause_parameter,
17966         finally): Rules tagged <node>.
17967         (TRY_TK, CATCH_TK): Token tagged <operator>.
17968         (class_body_declaration:, class_member_declaration:,
17969         formal_parameter:, explicit_constructor_invocation:,
17970         interface_member_declaration:, constant_declaration:,
17971         primary_no_new_array:, class_instance_creation_expression:,
17972         array_creation_expression:): Issue error on unsuported JDK1.1
17973         features.
17974         (try_statement:, catches:, finally:): Define actions.
17975         (catch_clause_parameter): New rule.
17976         (catch_clause:): Use new rule catch_clause_parameter.
17977         (parse_jdk1_1_error): New function.
17978         (redefinition_error): Renamed classitf_redefinition_error.
17979         (variable_redefinition_error): New function.
17980         (check_class_interface_creation): Call
17981         classitf_redefinition_error.
17982         (java_complete_tree): Added error message on JDEP_TYPE: case.
17983         (complete_class_report_errors): Fixed indentation.
17984         (declare_local_variables): Call variable_redefinition_error.
17985         (source_end_java_method): Call java_set_exception_lang_code and
17986         emit_handlers where appropriate.
17987         (java_method_add_stmt): Call add_stmt_to_block.
17988         (add_stmt_to_block): New function.
17989         (lookup_method_invoke): Fixed outside comment. new local variable
17990         candicates.  Call find_applicable_accessible_methods_list and
17991         find_most_specific_methods_list when searching for a
17992         method. Modified error report to list possible candidates when
17993         applicable.
17994         (find_applicable_accessible_methods_list,
17995         find_most_specific_methods_list, argument_types_convertible): New
17996         function.
17997         (refine_accessible_methods_list): Function deleted.
17998         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
17999         expr (if applicable) before calling patch_array_ref.
18000         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18001         (enter_block): Fixed comment.
18002         (enter_a_block): New function.
18003         (patch_assignment): Reorganized. Call try_reference_assignconv for
18004         references. Call valid_cast_to_p instead of can_cast_to_p.
18005         (try_reference_assignconv,
18006         valid_builtin_assignconv_identity_widening_p): New functions.
18007         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18008         (valid_cast_to_p, valid_method_invocation_conversion_p): New
18009         functions.
18010         (build_string_concatenation): Don't resolve StringBuffer.
18011         (patch_cast): Fixed inverted arguments.
18012         (patch_array_ref): Code to save array expr deleted. Call
18013         valid_cast_to_p instead of can_cast_to_p.
18014         (generate_labeled_block): Call generate_name.
18015         (build_jump_to_finally, build_try_statement, java_get_catch_block,
18016         patch_try_statement): New functions.
18017         * typeck.c (match_java_method): Function deleted.
18018
18019 1998-10-02  Anthony Green  <green@cygnus.com>
18020
18021         * jvspec.c: jvgenmain_spec uses different temporary file names.
18022
18023 1998-10-02  Anthony Green  <green@cygnus.com>
18024
18025         * jvspec.c (lang_specific_driver): Fail if user specifies
18026         --main= when not linking.
18027
18028 1998-09-28  Tom Tromey  <tromey@cygnus.com>
18029
18030         * class.c (make_class_data): Push value for `thread' field.
18031         * decl.c (init_decl_processing): Added `thread' field to class.
18032
18033         * class.c (add_field): Always make static fields externally
18034         visible.
18035
18036 1998-09-26  Anthony Green  <green@cygnus.com>
18037
18038         * expr.c (build_java_athrow,
18039         build_java_throw_out_of_bounds_exception, expand_invoke,
18040         build_newarray, expand_java_multianewarray, build_java_monitor):
18041         Update comments to reflect _Jv_* function names.
18042
18043 1998-09-25  Per Bothner  <bothner@cygnus.com>
18044
18045         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
18046         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
18047         * parse.y (expand_start_java_method):  Likewise.
18048
18049 1998-09-24  Per Bothner  <bothner@cygnus.com>
18050
18051         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
18052
18053         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18054         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
18055         * expr.c:  Remove no-longer-needed calls to promote_type.
18056         * decl.c (give_name_to_locals):  Liekwise.
18057         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
18058         * parse.y:  Add/remove promote_type calls as appropriate.
18059         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
18060         (parse_signature_string):  Likewise.
18061         (build_java_array_type):  Fix for now signature convenions.
18062
18063         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
18064
18065 1998-09-23  Tom Tromey  <tromey@cygnus.com>
18066
18067         * class.c (init_class_processing): libjava function renamed to
18068         _Jv_RegisterClass.
18069
18070 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18071
18072         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18073         * java-tree.def: Fixed DEFTREECODE third argument.
18074         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18075         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18076         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18077         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18078         JAVA_THIS_EXPR): Now replaced by tree code definitions.
18079         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18080         * lang.c (java_tree_code_type, java_tree_code_length,
18081         java_tree_code_name): New arrays.
18082         (lang_init): Append Java tree node definitions to Gcc ones.
18083         * lex.c (expression_obstack): Declared as extern when JC1_LITE
18084         defined.
18085         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18086         wfl_to_string.
18087         (java_lex): Allow declaration of empty string constants. Retain
18088         location information on CASE_TK and DEFAULT_TK.
18089         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18090         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18091         Modified to be more robust.
18092         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18093         (build_new_invocation, try_builtin_assignconv,
18094         patch_switch_statement, string_constant_concatenation,
18095         build_string_concatenation, patch_string_cst, patch_string,
18096         java_expand_switch): New function declarations.
18097         * parse.y: Rules related to switch and EH tagged <node>.
18098         (label_id): Set to NULL_TREE
18099         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18100         tree nodes.
18101         (this_or_super:): Fixed indentation.
18102         (statement:, statement_nsi:, statement_without_trailing_substatement:,
18103         statement_expression:): Removed call to RULE on all sub-rules.
18104         (switch_expression:, switch_labels:): New rules.
18105         (switch_statement:, switch_block:, switch_block_statement_groups:,
18106         switch_block_statement_group:, switch_labels:, switch_label:):
18107         Defined actions.
18108         (throw_statement:, synchronized_statement:, try_statement:):
18109         Defined temporary actions.
18110         (class_instance_creation_expression:): Call
18111         build_new_invocation. Fixed indentation.
18112         (field_access): Fixed indentation.
18113         (method_invocation): Likewise.
18114         (make_qualified_primary): Use THIS_EXPR.
18115         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18116         resolving from SUPER, set *type_found.
18117         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18118         (java_complete_tree): Removed unused local variable `location'. Case
18119         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18120         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18121         on MODIFY_EXPR: and all binary operator tree code cases. Removed
18122         STRING_CST: case. default: checks for patchable strings.
18123         (complete_function_arguments): Transform string constant or
18124         crafted StringBuffer if necessary.
18125         (build_method_invocation): Fixed comments.
18126         (build_new_invocation): New function.
18127         (patch_assignment): Call try_builtin_assignconv to figure a valid
18128         assignment conversion between builtin types.
18129         (try_builtin_assignconv): New function.
18130         (build_binop): Use URSHIFT_EXPR directly to call build.
18131         (operator_string): Use UNARY_PLUS_EXPR.
18132         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18133         operator.
18134         (do_merge_string_cste, merge_string_cste,
18135         string_constant_concatenation, build_string_concatenation,
18136         patch_string, patch_string_cst): New function.
18137         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18138         (patch_unaryop): Likewise. New test of valid ++/-- operands.
18139         (build_newarray_node): Use NEW_ARRAY_EXPR.
18140         (build_this): Use THIS_EXPR.
18141         (build_return): Enable debug information on return statement.
18142         (build_if_else_statement): Likewise.
18143         (complete_labeled_statement): Fixed related comment.
18144         (build_loop_body): Fixed comment.
18145         (build_bc_statement): Enable debug information on break/continue
18146         statements.
18147         (patch_bc_statement): Fixed typos. Handle SWITCH statement
18148         context.
18149         (patch_switch_statement, case_identity, java_expand_switch): New
18150         functions.
18151
18152 1998-09-21  Per Bothner  <bothner@cygnus.com>
18153
18154         * buffer.h (BUFFER_INIT):  New macro.
18155         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
18156         Pass (struct jcf_partial *state) to most functions.
18157         (jcf_block, jcf_relocation):  New types.
18158         Support labels, branches, conditionals, loops.
18159
18160 1998-09-21  Tom Tromey  <tromey@cygnus.com>
18161
18162         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18163
18164 1998-09-21  Per Bothner  <bothner@cygnus.com>
18165
18166         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
18167         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
18168         not integer_type_node (INT_TYPE_SIZ bits).
18169
18170         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
18171
18172         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
18173         * jcf-dump.c (print_exception_table):  New function.
18174         (disassemble_method):  Better handling of wide instructions.
18175         Make more robust for bad input.
18176
18177 1998-09-30  Jeffrey A Law  (law@cygnus.com)
18178
18179         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18180         FreeBSD.
18181
18182 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18183
18184         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18185
18186 1998-09-17  Tom Tromey  <tromey@cygnus.com>
18187
18188         * Makefile.in ($(PARSE_H)): Removed target.
18189
18190 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18191
18192         * Makefile.in (JAVA_OBJS): Add memmove.o
18193         (memmove.o): New target & rules.
18194
18195 1998-09-15  Tom Tromey  <tromey@cygnus.com>
18196
18197         * expr.c (expand_invoke): Don't generate a call to the class init
18198         code.
18199
18200 1998-09-14  Jeffrey A Law  (law@cygnus.com)
18201
18202         * Makefile.in: Add many missing dependencies.
18203         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18204         as appropriate.
18205         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18206         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18207
18208 1998-09-11  Per Bothner  <bothner@cygnus.com>
18209
18210         * decl.c (complete_start_java_method):  If method is static (and
18211         not private) call _Jv_InitClass.
18212         * expr.c (expand_invoke):  Don't call build_class_init.
18213
18214         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
18215
18216 1998-09-10  Jeffrey A Law  (law@cygnus.com)
18217
18218         * Make-lang.in (GCJ): Define before using.
18219
18220 1998-09-09  Jeffrey A Law  (law@cygnus.com)
18221
18222         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18223         losing due to namespace pollution in GNU getopt.h
18224
18225 1998-09-09  Tom Tromey  <tromey@cygnus.com>
18226
18227         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18228         (java.all.cross): Likewise.
18229         (java.rest.encap): Likewise.
18230
18231 1998-09-08  Jeffrey A Law  (law@cygnus.com)
18232
18233         * gjavah.c (print_class_decls): Fix thinko in arglist
18234         * jcv-io.c (find_classfile): Similarly.
18235
18236 1998-09-07  Jeffrey A Law  (law@cygnus.com)
18237
18238         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18239
18240 1998-09-05  Tom Tromey  <tromey@cygnus.com>
18241
18242         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18243         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18244         * Makefile.in (PARSE_C): New macro.
18245         (PARSE_H): Likewise.
18246         (PARSE_SCAN_C): Likewise.
18247         ($(PARSE_C)): Target renamed from parse.c.
18248         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18249         (clean): Remove parse-scan.c as well.
18250         (parse.o): Depend on $(PARSE_C).
18251
18252 1998-09-05  Anthony Green  <green@cygnus.com>
18253
18254         * README, license.terms: Removed.
18255
18256         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18257         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18258         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18259         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18260         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18261         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18262         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18263         and Java trademark attribution.
18264
18265 1998-09-04  Tom Tromey  <tromey@cygnus.com>
18266
18267         * Makefile.in: Use gcjh, not gjavah.
18268         * config-lang.in (stagestuff): Use gcjh, not gjavah.
18269         * Make-lang.in: Changed gjavah to gcjh everywhere.
18270
18271 1998-09-03  Per Bothner  <bothner@cygnus.com>
18272
18273         * gjavah.c:  Support new -prepend -add -append flags.
18274         (print_method_info):  Method is not virtual if class is final.
18275
18276 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18277
18278         * jv-scan.c: Fixed copyright assignment.
18279         * keyword.gperf: Likewise.
18280         * keyword.h: Likewise.
18281         * lex.c: Fixed copyright assignment.
18282         (java_lex): Push unicode back when parsing '<'.
18283         * lex.h: Fixed copyright assignment.
18284         * parse-scan.y: Likewise.
18285         * parse.h: Fixed copyright assignment.
18286         (build_debugable_stmt, complete_for_loop): New function prototypes.
18287         * parse.y: Fixed copyright assignment.
18288         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18289         size_zero_node when completing a loop with no exit condition.
18290         (for_statement_nsi:): Define action.
18291         (for_init:, for_update:): Return size_zero_node when empty.
18292         (declare_local_variables): Call build_debugable_stmt.
18293         (build_debugable_stmt): New function.
18294         (build_loop_body): Build debugable statement around loop
18295         condition part.
18296         (complete_loop_body): Take into account the debugable statement
18297         around the EXIT_EXPR.
18298         (complete_loop_body): New function.
18299         (patch_exit_expr): Fixed condition inversion.
18300
18301 1998-09-02  Tom Tromey  <tromey@cygnus.com>
18302
18303         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18304         name of thread define.
18305         * jvspec.c (THREAD_NAME): New macro.
18306         (GCLIB): Likewise.
18307         (THREADLIB): Likewise.
18308         (lang_specific_driver): Recognize attempt to link with thread
18309         library or gc library.  Recognize -ljava on command line so it
18310         isn't linked against more than once.
18311
18312 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18313
18314         * parse-scan.y (report_main_declaration): Name of the class
18315         containing `main' can be a qualified name.
18316
18317 1998-08-31  Tom Tromey  <tromey@cygnus.com>
18318
18319         * config-lang.in: Changed gjavac to gjc everywhere.
18320         * Make-lang.in: Changed gjavac to gjc everywhere.
18321
18322 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18323
18324         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18325         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18326         and install the files.
18327         * Makefile.in (JAVA_OBJS_LITE): New variable.
18328         (compiler:): Now include jv-scan as a dependency.
18329         (../jv-scan$(exeext), parse-scan.c): New targets.
18330         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18331         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18332         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18333         check for errors even if parse_only.
18334         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18335         defined.
18336         (yylex): New function. Uses java_lex body.
18337         (java_lex): Removed commented out statement. Remove local variable
18338         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18339         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18340         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18341         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18342         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18343         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18344         where appropriate.
18345         (java_lex_error): Empty if JC1_LITE is defined.
18346         (java_get_line_col): Return 0 if JC1_LITE is defined.
18347         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18348         SET_MODIFIER_CTX): Moved into the section containing the macros
18349         conditionally defined by JC1_LITE.
18350         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18351         argument if JC1_LITE is defined.
18352         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18353         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18354         is defined.
18355         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18356         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18357         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18358         to different values according to JC1_LITE.
18359         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18360         declared if JC1_LITE set.
18361         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18362         defined if JC1_LITE not set.
18363         (struct parser_ctx): Reorganized and skip the jc1 front end part
18364         if JC1_LITE set.
18365         (java_layout_classes): New function definition.
18366         (java_push_parser_context, java_init_lex, yyparse, yylex,
18367         yyerror): Prototype always declared. All other static function
18368         prototypes declared only if JC1_LITE is not set.
18369         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18370         declared in parse.h.
18371         (java_layout_classes): New function.
18372         (java_complete_expand_methods): No longer layout the class here.
18373         * parse-scan.y: New file.
18374         * jv-scan.c: New file.
18375
18376 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18377
18378         * gjavah.c (main): Handle -friend option.
18379         (friend_specs): New global.
18380         (generate_access): Handle friend_specs.
18381         (process_file): Likewise.
18382         (MAX_FRIENDS): New macro.
18383         (friend_count): New global.
18384         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18385         Changed all callers.
18386
18387 1998-08-24  Per Bothner  <bothner@cygnus.com>
18388
18389         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18390         (main):  Handle processing all the entries of a named .zip archive.
18391         * jcf-io.c (jcf_trim_old_input):  New function.
18392         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18393
18394 1998-08-24  Per Bothner  <bothner@cygnus.com>
18395
18396         * lang.c (flag_assume_compiled):  Make default be on.
18397
18398 1998-08-21  Per Bothner  <bothner@cygnus.com>
18399
18400         * jcf-dump.c:  Add bunches of flags to control output more.
18401         (process_class):  New function;  support printing more than one class.
18402         (main): Support new --print-main and --javap flags.
18403         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18404         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18405
18406 1998-08-20  Per Bothner  <bothner@cygnus.com>
18407
18408         Change mangling of dispatch table to match C++ vtable (w/thunks).
18409         * class.c (build_dtable_decl), java-tree.h:  New function.
18410         (make_class_data):  Call it.
18411         * decl.c (init_decl_processing):  Likewise.
18412
18413 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18414
18415         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18416         soft_anewarray; adjust args passed.
18417         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18418         match _Jv_NewObjectArray.
18419
18420 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18421
18422         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18423         * expr.c (loopup_label): Call create_label_decl.
18424         (create_label_decl): New function.
18425         (java_lang_expand_expr): Call expand_start_bindings with argument
18426         set to zero.
18427         * java-tree.h Added space after PROTO in function declarations
18428         when necessary.
18429         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18430         (create_label_decl, push_labeled_block): New function
18431         declarations.
18432         * lex.c (label_id): Initialize.
18433         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18434         switch.
18435         * parse.h Added space after PROTO in function declarations when
18436         necessary.
18437         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18438         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18439         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18440         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18441         macros.
18442         (struct parser_ctxt): New fields current_loop,
18443         current_labeled_block.
18444         (build_if_else_statement, patch_if_else_statement,
18445         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18446         generate_labeled_block, complete_labeled_statement,
18447         build_bc_statement, patch_bc_statement, patch_loop_statement,
18448         build_new_loop, build_loop_body, complete_loop_body): New function
18449         declarations.
18450         * parse.y (java_warning_count): New global variable.
18451         (label_id): New static variable.
18452         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18453         (block:): Return size_zero_node when block is empty.
18454         (empty_statement:): Return size_zero_node.
18455         (statement:): Implement supplemental action when for_statement: is
18456         reduced.
18457         (label_decl:): New rule.
18458         (labeled_statement:): Rewritten using label_decl. Actions
18459         implemented.
18460         (labeled_statement_nsi:): Likewise.
18461         (if_then_statement): Actions implemented.
18462         (while_expression): New rule.
18463         (while_statement:): Rewritten using while_expression. Actions
18464         implemented.
18465         (while_statement_nsi:): Likewise.
18466         (do_statement_begin:): New rule.
18467         (do_statement:): Rewritten using do_statement_begin. Actions
18468         implemented.
18469         (for_statement:): Rewritten using for_begin. Actions implemented.
18470         (for_statement_nsi:): Likewise.
18471         (for_header:, for_begin:): New rules.
18472         (for_init:): Actions implemented.
18473         (statement_expression_list:, break_statement:,
18474         continue_statement:): Likewise.
18475         (yyerror): Count number of issued warning(s).
18476         (java_report_errors): Report error(s) and/or warning(s).
18477         (java_complete_class): Use build_java_argument_signature to
18478         recompute completed method signature.
18479         (java_check_regular_methods): New locals method_wfl and aflags.
18480         Use method_wfl instead of lookup_cl during error reports. Fixed
18481         indentation and modified some error messages. Use
18482         lang_printable_name in method instead of the DECL_NAME. New code
18483         to issue warnings on methods not overriding corresponding methods
18484         private to a different package.
18485         (java_method_add_stmt): Call add_stmt_to_compound.
18486         (add_stmt_to_compound): New function.
18487         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18488         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18489         (build_if_else_statement, patch_if_else_statement,
18490         build_labeled_block, generate_labeled_block,
18491         complete_labeled_statement, build_new_loop, build_loop_body,
18492         complete_loop_body, patch_loop_statement, build_bc_statement,
18493         patch_bc_statement, patch_exit_expr): New functions.
18494         * typeck.c (build_java_signature): Build argument signature before
18495         enclosing it in between parenthesis.
18496
18497 1998-08-17  Warren Levy  <warrenl@cygnus.com>
18498
18499         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18500         (JAVA_OBJS): Added reminder comment
18501
18502 1998-08-13  Nick Clifton  <nickc@cygnus.com>
18503
18504         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18505         be interpreted as a long long.
18506
18507 1998-08-13  Warren Levy  <warrenl@cygnus.com>
18508
18509         * decl.c (init_decl_processing): Use _Jv_InitClass, not
18510         soft_initialise_class.  Use _Jv_NewMultiArray, not
18511         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
18512         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
18513         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
18514         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18515
18516 1998-08-12  Per Bothner  <bothner@cygnus.com>
18517
18518         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18519         length_identifier_node):  New global tree node constants.
18520         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
18521         Replace uses by super_identifier_node etc.
18522         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
18523
18524         * parse.y (resolve_field_access):  Don't special-case ".length" if
18525         flag_emit_class_files.
18526         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
18527         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
18528         and ARRAY.length.
18529
18530 1998-08-11  Per Bothner  <bothner@cygnus.com>
18531
18532         * decl.c (init_decl_processing): Remove unused method_type_node fields.
18533         * class.c (make_method_value):  Remove init for removed fields.
18534
18535         * class.c (layout_class):  Use build_java_argument_signature.
18536         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
18537
18538         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
18539         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
18540         (build_java_signature):  Don't use push_java_argument_signature.
18541
18542         * typeck.c (lookup_argument_method):  New function.
18543         * parse.y (java_check_regular_methods):  Use lookup_argument_method
18544         instead of lookup_java_method2 followed by lookup_java_method.
18545
18546         * parse.y (check_method_redefinition):  Minor optimization.
18547
18548         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
18549         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18550
18551 1998-08-10  Tom Tromey  <tromey@cygnus.com>
18552
18553         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18554         c-pragma.o.
18555
18556         * gjavah.c (java_float_finite): Use K&R-style definition.
18557         (java_double_finite): Likewise.
18558         (generate_access): Now returns void.  Changed all callers.
18559         (last_access_generated): Removed.
18560         (process_file): Only make a single pass over the .class file.
18561
18562 1998-07-29  Per Bothner  <bothner@cygnus.com>
18563
18564         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
18565         for compatibility for G++ (with -fvtable-thunks).
18566         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
18567
18568         * gjavah.c (process_file):  Use public inheritance for super-class.
18569
18570 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18571
18572         * lex.c (java_init_lex): Initialize ctxp->package.
18573         * parse.h (struct parser_ctxt): package and package_len replaced
18574         by tree package, an identifier node. Field method_decl_list is
18575         gone. Fixed comments.
18576         (lookup_field_wrapper, merge_qualified_name, not_accessible,
18577         class_in_current_package): New function prototypes.
18578         * parse.y (array_type:): Set class loaded flag on primitive type
18579         arrays.
18580         (package_declaration:): Assign ctxp->package to the
18581         identifier node.
18582         (method_invocation:): Handle invocation of method qualified by
18583         `super'.
18584         (single_type_import_declaration:): Removed ambiguity check.
18585         (java_pop_parser_context): New local variable `next'. Reset and
18586         set IMPORT_CLASSFILE_NAME flags on current and previous import
18587         list.
18588         (java_accstring_lookup): Use new local macro COPY_RETURN.
18589         (lookup_field_wrapper): New function.
18590         (parser_qualified_classname): Use merge_qualified_name.
18591         (parser_check_super_interface): Broaden error message.
18592         (do_resolve_class): Check for qualified class name in the current
18593         compilation unit if appropriate.
18594         (process_imports): Check for already defined classes.
18595         (check_pkg_class_access): Got rid of call to
18596         get_access_flags_from_decl.
18597         (java_complete_expand_methods): Call safe_layout_class based on
18598         the current class size.
18599         (make_qualified_primary): Build a WFL qualification on primary if
18600         none exists.
18601         (merge_qualified_name): New function.
18602         (make_qualified_name): Use merge_qualified_name.
18603         (resolve_expression_name): Use safe_lookup_field.
18604         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18605         (resolve_qualified_expression_name): Likewise. Check on resolved
18606         element accessibility.
18607         (not_accessible_p, class_in_current_package): New functions.
18608         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18609         (patch_method_invocation_stmt): Merged common pieces. Check
18610         accessibility of invoked method.
18611         (check_for_static_method_reference): Add returned type in error
18612         message.
18613         (invocation_mode): Get rid of bogus check on PRIVATE methods.
18614         (refine_accessible_methods_list): Merged two conditions in test.
18615         (java_complete_class): Sanity check on stabilize_ref gone.
18616         * zextract.c (read_zip_archive): Cast lseek second argument to long.
18617
18618 1998-07-28  Per Bothner  <bothner@cygnus.com>
18619
18620         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
18621
18622 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18623
18624         * gjavah.c (F_NAN): Removed.
18625         (F_NAN_MASK): New macro.
18626         (F_POSITIVE_INFINITY): Removed.
18627         (F_NEGATIVE_INFINITY): Likewise.
18628         (java_float_finite): Rewrote.
18629         (D_NAN_MASK): Renamed.
18630         (java_double_finite): Rewrote.
18631         (D_POSITIVE_INFINITY): Removed.
18632         (D_NEGATIVE_INFINITY): Likewise.
18633
18634         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18635         If verbose, print underlying representation of value in hex.
18636
18637 1998-07-24  Per Bothner  <bothner@cygnus.com>
18638
18639         * buffer.h, buffer.c:  New files.
18640         * Makefile.in (JAVA_OBJS):  Add buffer.o.
18641
18642         Support locals variables and writing their debug entries to .class.
18643         * jcf-write.c:  Simplify some by user new buffer type.
18644         (vode_buffer_grow):  Removed.
18645         (struct localvar_info):  New type.
18646         (localsvars, localvartable):  New buffers.
18647         (localvar_alloc, localvar_free):  New functions.
18648         (generate_bytecode_insns):  Handle local variables.
18649         (generate_classfile):  Write LocalVariableTable attribute.
18650
18651 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18652
18653         * jcf-io.c (open_in_zip): Check the zipfile magic number.
18654         * zipfile.h (ZIPMAGIC): New macro.
18655
18656 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18657
18658         * Makefile.in (gjavah.o): Updated dependencies.
18659         (jcf-dump.o): Likewise.
18660         (all.indirect): Use ../gjavah.
18661         (../gjavah$(exeext)): Likewise.
18662         (clean): Don't remove gjavah.
18663         (clean): Remove parse.c, not java/parse.c.
18664         * Make-lang.in (java): Added gjavah.
18665         (gjavah$(exeext)): New target.
18666         (GJAVAH_SOURCES): New macro.
18667         (java.all.build): Added gjavah.
18668         (java.all.cross): Likewise.
18669         (java.rest.encap): Likewise.
18670         * config-lang.in (compilers, stagestuff): Added gjavah.
18671
18672 1998-07-23  Tom Tromey  <tromey@cygnus.com>
18673
18674         * gjavah.c (java_float_finite): New function.
18675         (java_double_finite): Likewise.
18676         (F_POSITIVE_INFINITY): New macro.
18677         (F_NEGATIVE_INFINITY): Likewise.
18678         (F_NAN): Likewise.
18679         (D_POSITIVE_INFINITY): Likewise.
18680         (D_NEGATIVE_INFINITY): Likewise.
18681         (D_NAN): Likewise.
18682         (print_field_info): Use java_float_finite and java_double_finite.
18683
18684 1998-07-23  Per Bothner  <bothner@cygnus.com>
18685
18686         * parse.y (method_header):  Name "this" implicit argument.
18687
18688 1998-07-22  Per Bothner  <bothner@cygnus.com>
18689
18690         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
18691         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
18692         (put_linenumber):  New function.
18693         (generate_bytecode_insns, generate_classfile):  Write line numbers.
18694
18695 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18696
18697         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
18698         (lookup_name, build_known_method_ref, build_class_init,
18699         build_invokevirtual, invoke_build_dtable, match_java_method,
18700         build_field_ref, pushdecl_force_head, build_java_binop,
18701         binary_numeric_promotion, build_decl_no_layout,
18702         build_java_arrayaccess, build_newarray, build_anewarray,
18703         build_java_array_length_access, build_java_arraynull_check): New
18704         extern function prototypes.
18705         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18706         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
18707         java-tree.h.
18708         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
18709         to NULL
18710         * jcf.h (jcf_out_of_synch): New extern function prototype.
18711         * parse.h: Static/global function implemented in parse.y
18712         prototyped and declarations moved at the end of the file.
18713         (DECL_P): Check that the argument isn't null.
18714         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18715         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
18716         (QUAL_DECL_TYPE): New macro.
18717         (PARAMS): Macro definition removed.
18718         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
18719         (return_statement:): Call build_return.
18720         (field_access:): Call make_qualified_primary in sub rule.
18721         (method_invocation:): Build method invocation and call
18722         make_qualified_primary when processing primaries.
18723         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
18724         get_type_from_signature.
18725         (java_check_regular_method): Extra integer 0 argument when calling
18726         lookup_java_method2.
18727         (lookup_java_interface_method2): Extra method DECL argument when
18728         calling lookup_java_interface_method2.
18729         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
18730         COMPOUND_EXPR node.
18731         (java_complete_expand_method): Layout current class iff not
18732         already done. Don't process interface's methods.
18733         (java_complete_expand_method): Use super class only if it
18734         exists. Use current class otherwise.
18735         (make_qualified_primary): New function.
18736         (resolve_expression_name): Process qualified expression or
18737         expression from primary the same way.
18738         (resolve_expression_name): Two last arguments to
18739         resolve_field_access are now NULL_TREEs.
18740         (resolve_field_access): New variable is_static. Local field must
18741         be DECLs. is_static computed on field DECLs only. Append code in
18742         where_found to the field access if necessary. Use QUAL_DECL_TYPE
18743         to initialize field_type.
18744         (resolve_qualified_expression_name): New local variable,
18745         previous_call_static and is_static. Handle primaries with function
18746         calls, casts, array references and `this'. `super' now handled as
18747         `(super_class)this'. Use is_static to clarify boolean expressions.
18748         Added code to handle case where a proper handle is required to
18749         access a field. Use QUAL_DECL_TYPE where applicable.
18750         (maybe_access_field): New function.
18751         (patch_method_invocation_stmt): New arguments primary, where,
18752         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
18753         deleted. Use `where' as a type to search from if specified. Check
18754         for static method reference where forbidden. Append primary or
18755         current_this to the argument list if not calling constructor nor
18756         static methods.
18757         (check_for_static_method_reference): New function.
18758         (patch_invoke): Layout the class on which new is done if
18759         necessary.
18760         (lookup_method_invoke): Changed format to report errors on
18761         methods.
18762         (qualify_ambiguous_name): New local variable this_found. Now
18763         handle things from primaries. Method call are considered
18764         expression names.
18765         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
18766         changed into NULLs.
18767         (not_initialized_as_it_should_p): Comply with the new DECL_P.
18768         (java_complete_tree): New case fo RETURN_EXPR. Process function
18769         call arguments in separate function.
18770         (complete_function_arguments): New function.
18771         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
18772         anymore.
18773         (patch_assignment): Take the return function slot into account as
18774         a RHS. Distinguish assignment from a return.
18775         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
18776         when checking methods in interfaces.
18777         (resolve_type_during_patch): NULL argument to unresolve_type_p
18778         instead of NULL_TREE.
18779         (patch_newarray): Fixed typo in comment.
18780         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
18781         (build_return, patch_return): New functions.
18782         * typeck.c (lookup_java_constructor): Fixed typo in comment.
18783
18784 1998-07-21  Per Bothner  <bothner@cygnus.com>
18785
18786         * constants.c (find_name_and_type_constant, find_fieldref_index,
18787         find_methodref_index):  New methods.
18788         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
18789         just return given method.  Also, rename to build_known_method_ref.
18790         (expand_invoke):  Rename call to build_invoke_non_interface.
18791         * java-tree.h, parse.h:  Update prototype.
18792         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
18793         (such as expand_expr_stmt) if flag_emit_class_files.
18794         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
18795         STACK_TARGET, IGNORE_TARGET):  New macros.
18796         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
18797         (generate_bytecode_insn):  New function to generate method's bytecode.
18798         (generate_classfile):  Node generate Code attribute for a method.
18799         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
18800         push_long_const, field_op, adjust_typed_op, maybe_wide):
18801         New functions used by generate_bytecode_insn.
18802
18803         * typeck.c (signature_include_return):  Remove variable.
18804         (push_java_argument_signature, build_java_argument_signature):  New.
18805         (build_java_signature):  Use push_java_argument_signature.
18806         * parse.y:  Use build_java_argument_signature instead of fiddling
18807         with signature_include_return.
18808
18809 1998-07-17  Tom Tromey  <tromey@cygnus.com>
18810
18811         * gjavah.c (print_c_decl): Always generate JArray<>* for array
18812         types.
18813
18814         * Makefile.in (all.indirect): Added gjavah$(exeext).
18815         (gjavah$(exeext)): Added $(exeext).
18816         (clean): Likewise.
18817
18818 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18819
18820         * class.c (layout_class): Call to java_layout_parsed_class replace
18821         by safe_layout_class.
18822         * expr.c (build_java_array_length_access): Removed static storage
18823         class in the function definition.
18824         (build_java_arraynull_check): Likewise.
18825         Also fixed typos in two comments.
18826         * lex.c (java_init_lex): Initialize static global kw_length.
18827         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
18828         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
18829         java_lex_error.
18830         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
18831         * parse.h (resolve_no_layout): New static function declaration.
18832         (get_identifier_in_static): Declaration removed.
18833         (java_layout_parsed_class): Function name declaration changed to
18834         safe_layout_class.
18835         (build_newarray_node, patch_newarray, resolve_type_during_patch,
18836         not_initialized_as_it_should_p, build_this): New static function
18837         declarations.
18838         (pushdecl_force_head, build_java_binop, int_fits_type_p,
18839         binary_numeric_promotion, stabilize_reference,
18840         build_decl_no_layout, build_java_arrayaccess): Extern function
18841         declarations moved into their own section.
18842         (build_newarray, build_anewarray, build_java_array_length_access,
18843         build_java_arraynull_check): New extern function declarations.
18844         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
18845         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
18846         fake tree codes.
18847         (CALL_CONSTRUCTOR_P): New macro.
18848         * parse.y (kw_length): New static global tree node.
18849         (return_statement): Tagged <node>.
18850         (RETURN_TK): Tagged <operator>.
18851         (variable_declarator_id:): Build variable declaration with an
18852         empty initialization value if a syntax error was found in the
18853         initialization part of the variable declaration.
18854         (statement_without_trailing_substatement:): return_statement: now
18855         uses the default rule.
18856         (return_statement:): Temporarily fixed to return NULL_TREE.
18857         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
18858         (class_instance_creation_expression:): Class creation rules now
18859         call build_method_invocation upon reduction.
18860         (array_creation_expression:): Rules call build_newarray_node upon
18861         reduction.
18862         (dim_exprs:): Build a list of dimension expressions.
18863         (dim_expr:): Store location of the OSB_TK in the dimension
18864         expression node.
18865         (method_invocation:): Added a new error rule.
18866         (build_unresolved_array_type): WFL argument may also be an array
18867         on a primitive type. Name of the argument changed to reflect this.
18868         (method_declarator): Insert argument type at the beginning of the
18869         argument type list and later reverse the list.
18870         (unresolved_type_p): Argument 'returned' may be optionally
18871         NULL_TREE.
18872         (java_layout_class_from_source): Function renamed
18873         safe_layout_class.
18874         (resolve_and_layout): Now call resolve_no_layout and
18875         safe_layout_class.
18876         (resolve_no_layout): New function.
18877         (purify_type_name): New function.
18878         (complete_class_report_errors): Call purify_type_name during error
18879         report on a type not found.
18880         (process_imports): error_found local variable doesn't need to be
18881         initialized to zero.
18882         (declare_local_variables): New local type_wfl. Fixed typo in error
18883         message. type_wfl assigned to unresolved type and used to register
18884         incomplete type. Build a WFL around the variable initialization
18885         statement so that debug info can be generated on it.
18886         (source_start_java_method): Reverse argument list after they've
18887         been processed.
18888         (current_this): New static global variable.
18889         (java_complete_expand_methods): Set current_this when appropriate.
18890         (resolve_expression_name): Build correct static and non static
18891         field access bearing a simple name.
18892         (resolve_field_access): Resolve the length field of arrays. Handle
18893         f.m() cases.
18894         (patch_method_invocation_stmt): Set the type of the method
18895         invocation to error_mark_node. This value is later overridden by a
18896         valid type, if any. Don't handle qualified constructor invocation
18897         as qualified method invocation. Call lookup_method_invoke with its
18898         new flag. It's no longer necessary to access the selected method
18899         as the value of a tree list. Handle constructor invocation.
18900         (patch_invoke): Reverse argument list when invoking non interface
18901         methods. Insert call to new as the first argument of the
18902         constructor.
18903         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
18904         defined within a final class. Return INVOKE_STATIC if the invoked
18905         method is a constructor.
18906         (lookup_method_invoke): New lc argument is a flag to indicate a
18907         constructor lookup. Now handle constructor lookup. Choose the most
18908         specific method in case several were matching the invocation
18909         requirements. Return a method decl instead of a tree list featuring
18910         one single method decl element.
18911         (refine_accessible_methods_list): New lc flag argument to
18912         indicate that a constructor is being looked up.
18913         (not_initialized_as_it_should_p): New function.
18914         (java_complete_tree): Now process fake tree codes
18915         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
18916         save_expr on resolved function call arguments. Case on
18917         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
18918         (patch_assignment): LHS can be a field access expression. When
18919         dealing with reference, lhs_type is the promoted type of the
18920         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
18921         applicable.
18922         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18923         (patch_binop): Use not_initialized_as_it_should_p where
18924         applicable.
18925         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18926         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
18927         where applicable.
18928         (resolve_type_during_patch): New function.
18929         (patch_cast): Call resolve_type_during_patch to resolve type and
18930         report error accordingly.
18931         (patch_array_ref): Use not_initialized_as_it_should_p where
18932         applicable. Array base expression is saved before being
18933         used. Promote the type of an array elements if it contains non
18934         builtin types.
18935         (build_newarray_node, patch_newarray, build_this): New functions.
18936
18937 1998-07-16  Tom Tromey  <tromey@cygnus.com>
18938
18939         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
18940         increment it in `for' statement.
18941         (print_field_info): If number is inf or nan, don't print it.
18942         (print_method_info): If method name is `delete', just ignore it.
18943         (print_c_decl): Special-case jstringArray.
18944
18945         * gjavah.c (help): New function.
18946         (no_argument): New function.
18947         (usage): Changed text.
18948         (main): Rewrote argument handling.  Now handles -v, --help,
18949         --version.
18950         (version): New function.
18951         (found_error): New global.
18952         (main): Return found_error.
18953         (generate_access): Set found_error.
18954         (print_c_decl): Likewise.
18955
18956 1998-07-15  Tom Tromey  <tromey@cygnus.com>
18957
18958         * gjavah.c (print_c_decl): Don't print "," when examining field.
18959         Skip type name when looking at "[L" types.
18960         (process_file): Now static.
18961         (generate_access): Now returns int.
18962         (last_access_generated): New global.
18963         (process_file): Clear last_access_generated; make multiple passes
18964         over the class.
18965         (print_field_info): Just return if generate_access returns true.
18966         (print_method_info): Likewise.  Also, allow <init> functions to
18967         pass through.
18968         (print_c_decl): Added is_init argument.  Print constructors
18969         properly.
18970         (print_cxx_classname): Use UTF8_GET to extract characters from
18971         string.
18972         (print_base_classname): New function.
18973         (print_class_decls): New function.
18974         (process_file): Use it.
18975         (utf8_cmp): New function.
18976
18977 1998-07-13  Nick Clifton  <nickc@cygnus.com>
18978
18979         * lang-options.h: Format changed to match changes in gcc/toplev.c
18980         to implement a --help option.
18981
18982 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
18983
18984         * decl.c (init_decl_processing): Revert change to dtable_type.
18985
18986 1998-07-09  Per Bothner  <bothner@cygnus.com>
18987
18988         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
18989
18990 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
18991
18992         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
18993
18994         * lang.c (lang_init): Default flag_exceptions to 1, without
18995         checking to see if it's 2 first.
18996
18997 1998-07-08  Jeffrey A Law  (law@cygnus.com)
18998
18999         * constants.c: Include "system.h".
19000         * decl.c: Likewise.
19001         * lang.c (flag_new_exceptions): Get via extern now.
19002         (lang_init_options): New functions.  Turn on flag_new_exceptions.
19003
19004 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19005
19006         * lex.c (java_lex): Return 0 when we see an invalid character in
19007         the input.
19008
19009         * lex.c (java_read_char): Specify extra argument when calling
19010         java_lex_error.
19011         (java_read_unicode, java_parse_end_comment,
19012         java_parse_escape_sequence): Likewise,
19013         (java_lex): Specify extra argument when calling
19014         java_lex_error. Test that IDs are beginning with a legal character
19015         for IDs. Handle invalid characters with an error message and a
19016         call to java_lex_error.
19017         (java_lex_error): Adjust column position by new argument
19018         `forward'. Issue an error even if in the middle of reporting an
19019         other error.
19020
19021 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
19022
19023         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19024         we don't explicitly put a null pointer when we're copying it.
19025
19026 1998-07-07  Tom Tromey  <tromey@cygnus.com>
19027
19028         * gjavah.c (print_cxx_classname): New function.
19029         (super_class_name): Likewise.
19030         (print_super_fields): Removed.
19031         (in_super): Removed.
19032         (print_field_info): Never generate #defines.
19033         (print_c_decl): Changed generated types to match JNI.  No longer
19034         print class name before method name.
19035         (print_method_info): Print "static" before static methods.
19036         Print "virtual" before non-final methods.
19037         (usage): Use exit(1), not exit(-1).
19038         (main): Likewise.
19039         (print_field_info): Use %.17g to print a double.
19040         (last_access): New globals.
19041         (process_file): Initialize last_access.
19042         (usage): Now static.
19043         (ACC_VISIBILITY): New define.
19044         (generate_access): New function.
19045         (print_field_info): Call it.
19046         (print_method_info): Likewise.  Also, generate information for all
19047         methods, not just native methods.  Return void.
19048         (print_c_decl): Return void.
19049         (print_field_info): Return void.
19050
19051 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19052
19053         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19054         processing the jc1 grammar file. Prefix bison functions and
19055         variables with java_.
19056         (parse.c): Dependencies on parse.h and lex.h
19057         * expr.c (build_java_arrayaccess): Function now global.
19058         * java-tree.h: Comment reorganized to carry on previous
19059         classification effort.
19060         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19061         RESOLVE_TYPE_NAME_P): New flags on WFLs.
19062         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19063         java_parse (new prefix java_ generated by bison).
19064         (java_layout_parsed_class, java_register_parsed_class): Function
19065         call removed.
19066         (yyparse): Removed unnecessary call to init_outgoing_cpool.
19067         * lex.c (static tree wfl_op): Variable deleted.
19068         (java_init_lex): Initialize kw_super and kw_this. Initialize more
19069         ctxp fields to NULL_TREE.
19070         (java_lex): No longer create WFL for operators. Filename caching
19071         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19072         created as STRING_CST and later expanded. Removed extra argument
19073         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19074         and SUPER.
19075         (build_wfl_node): Removed code in comments.
19076         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19077         store token and location data in the current bison token.
19078         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19079         static/extern function declaration at the beginning of the file.
19080         (struct qualification): Data structure definition deleted.
19081         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19082         (qualify_ambiguous_name): Function declaration modified. Function
19083         now returns nothing.
19084         (build_array_ref, patch_array_ref, make_qualified_name,
19085         resolve_qualified_expression_name, maybe_generate_clinit,
19086         resolve_field_access): New static function declarations.
19087         (build_java_arrayaccess): New extern function declaration.
19088         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19089         (CALL_EXPR_PRIMARY): Macro deleted.
19090         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19091         (struct parser_ctxt): Field initialized_final
19092         removed. non_static_initialized, static_initialized: New fields.
19093         * parse.y (static tree kw_super, static tree kw_this): New global
19094         static.
19095         (%union): tree wfl field of operator member replaced by int
19096         location. WFLs are non longer created for operators.
19097         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19098         (qualified_name:): Now calls make_qualified_name to build the
19099         identifier.
19100         (type_declaration:): Consider generating <clinit> when class
19101         parsing completed.
19102         (variable_declarator:): Directly build an assignment node when the
19103         variable is initialized when declared.
19104         (this_or_super:): Build a WFL and set current location when THIS
19105         or SUPER are parsed.
19106         (expression_statement:): Wrap statement around a WFL.
19107         (primary_no_new_array:): Fixed typo. Changed value returned by
19108         THIS_TK because of its new type (temporary).
19109         (dim_exprs:): Temporary fix because of OSB_TK's new type.
19110         (field_access:): Build qualified name with SUPER.
19111         (method_invocation:): Fixed returned value because of SUPER's new
19112         type.
19113         (array_access:): Use OSB_TK location information.
19114         (post_increment_expression:, post_decrement_expression:,
19115         unary_expression:, pre_increment_expression:,
19116         pre_decrement_expression:, unary_expression_not_plus_minus:,
19117         cast_expression:, multiplicative_expression:,
19118         additive_expression:, shift_expression:, relational_expression:,
19119         equality_expression:, and_expression:, exclusive_or_expression:,
19120         inclusive_or_expression:, conditional_and_expression:,
19121         conditional_or_expression:, assignment:): Use new location/token
19122         information available on operators.
19123         (create_class): Set super_decl_type to NULL_TREE when processing
19124         java.lang.Object.
19125         (register_fields): Field initialization is now a MODIFY_EXPR
19126         node. Chain initialization code to the matching lists (according
19127         to the field declaration modifiers).
19128         (maybe_generate_clinit): New function.
19129         (method_header): Don't set method's DECL_NAME to a WFL when adding
19130         methods to java.lang.Object.
19131         (resolve_and_layout): Now can return NULL_TREE if the type
19132         resolution fails. Otherwise, return the class DECL instead of its
19133         TYPE.
19134         (check_method_redefinition): Don't patch method DECL_NAME if it
19135         belongs to java.lang.Object.
19136         (process_imports): Simply assign error_found to the value returned
19137         by check_pkg_class_access.
19138         (declare_local_variables): Don't use their init statements (if
19139         any) when parsing error were previously found. Reuse MODIFY_EXPR
19140         build during parsing as an init statement.
19141         (java_method_add_stmt): Now return the current method body.
19142         (java_layout_parsed_class, java_register_parsed_class): Functions
19143         removed.
19144         (java_complete_expand_methods): Initialize the constant pool on a
19145         per class basis. Layout the classes before expanding their method
19146         bodies. Don't try expand artificial constructor code if error were
19147         found. Make the classes data and register them if no error were
19148         found.
19149         (java_complete_expand_method): Retrieve an artificial constructor
19150         argument list before entering its body. Assign the top block to
19151         the artificial constructor function body and set types of declared
19152         blocks and compound statements to void. Walk method body if not an
19153         artificial constructor.
19154         (make_qualified_name, cut_identifier_in_qualified): New functions.
19155         (resolve_expression_name): Fixed comments. Save/restore the
19156         current class CLASS_LOADED_P flag value. Build non qualified
19157         static field access and handle qualified expression names.
19158         (resolve_field_access, resolve_qualified_expression_name): New
19159         functions.
19160         (patch_method_invocation_stmt): Use the new expression resolution
19161         scheme, calling resolve_field_access when the function call is
19162         resolved as an expression.
19163         (qualify_ambiguous_name): Function rewritten to work on qualified
19164         expression produced by make_qualified_name.
19165         (java_complete_tree): Promote type when function's argument are
19166         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19167         the assignment to discover further errors if RHS is a expression
19168         name that fails to evaluate. Declare LHS initialized even though
19169         the assignment failed. Don't use the location variable and removed
19170         extra argument in patch function calls. Now handle the ARRAY_REF
19171         case and build internal string representation when STRING_CSTs are
19172         walked.
19173         (build_method_invocation): Don't wrap function call around a WFL.
19174         (build_assignment): Likewise. Use the operator location
19175         information.
19176         (patch_assignment): Handle array access LHSs. Handle error
19177         provenance, resulting in a better error report.
19178         (build_binop): Use op_location from operator as binop location
19179         information.
19180         (build_unaryop, build_incdec, build_cast): Likewise.
19181         (patch_binop): Extract location information from the node. Fixed
19182         typo in error message.
19183         (patch_unary_op): Extract location information from the node.
19184         (build_array_ref, patch_array_ref): New functions.
19185
19186 1998-07-01  Tom Tromey  <tromey@cygnus.com>
19187
19188         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19189         match _Jv_IsInstanceOf.
19190         * decl.c (init_decl_processing): Use _Jv_NewArray, not
19191         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
19192
19193 1998-06-30  Tom Tromey  <tromey@cygnus.com>
19194
19195         * decl.c (init_decl_processing): Functions are now named
19196         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19197
19198 1998-06-29  Per Bothner  <bothner@cygnus.com>
19199
19200         * java-tree.h (load_class):  Add prototype.
19201         * class.c (is_compiled_class):  Add missing arg to load_class.
19202         * expr.c (expand_java_NEW):  Call load_class.
19203         * parse.y (process_import):  Removed bogus use of void return value.
19204
19205 1998-06-25  Per Bothner  <bothner@cygnus.com>
19206
19207         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
19208         Function name is "_Jv_Throw" instead of "soft_athrow".
19209         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
19210         Function name is "_Jv_AllocObject" instead of "soft_new".
19211         Takes an extra parameter (object size).
19212         * expr.c:  Update calls.
19213
19214 1998-06-24  Per Bothner  <bothner@cygnus.com>
19215
19216         * lex.c (java_get_line_col):  Handle end-of-file.
19217         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
19218
19219 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
19220
19221         * lang.c (lang_init): Make -fexceptions the default.
19222         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19223         exception handling is not turned on.
19224
19225 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
19226
19227         * lang.c (flag_new_exceptions): Make this this default.
19228         * decl.c (end_java_method): Call emit_handlers.
19229         * except.c (method_init_exceptions): Set language code and version.
19230         (expand_start_java_handler): Enable exception, and call
19231         expand_eh_region_start.
19232         (expand_end_java_handler): Enable exception, and set up catch blocks.
19233         (emit_handlers): New routine to generate the saved handlers.
19234         * java-except.h (emit_handlers): Add prototype.
19235
19236 1998-06-12  Per Bothner  <bothner@cygnus.com>
19237
19238         We used to have three different representations of the constant pool:
19239         the CPool structure, the tree_constant_pool, and the constructures
19240         used to build the Class object (which may need class and string
19241         constants) in compiled code.  None were appropriate for compiling
19242         to .class files, so I did a major overhaul.
19243
19244         First, the tree_constant_pool array was removed.  Things were
19245         modified to the CPool structure in the JCF could be used.
19246         Second, a "capacity" field was added to the CPool, and functions
19247         written to search for a matching constant, adding one if not found.
19248         The code that generated the Class object was changed to use a CPool.
19249         The actual TREE_LISTs used to build the CONSTRUCTORs used for
19250         the static Class object are now only in build_constants_constructor.
19251         Finally, I wrote code which can generate a .class file (including its
19252         constant pool) from the RECORD_TYPE of a class.  This is a big step
19253         on the way to compiling Java source into .class files.
19254
19255         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
19256         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
19257
19258         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19259         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
19260         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19261         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19262         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
19263         (lang_type):  Removed constant_pool field.
19264         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
19265         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19266         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
19267         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19268
19269         * constants.c (current_constant_pool_tags, current_constant_pool_data,
19270         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19271         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
19272         (set_constant_entry, find_constant1, find_constant2,
19273         find_class_constant, count_constant_pool_bytes, write_constant_pool,
19274         find_utf8_constant, find_class_or_string_constant):  New functions.
19275
19276         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
19277         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
19278         (give_name_to_class, get_class_constant):  Likewise.
19279         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
19280         (get_name_and_type_constant, get_ref_constant):  Removed.
19281         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
19282         * parse.y:  Don't save/restore tree_constant_pool.
19283         * verify.c (verify_jvm_instructions):  Update for new approach.
19284         * expr.c (expand_invoke, expand_java_field_op): Likewise.
19285
19286         * lang-options.h:  Added -femit-class-file, -femit-class-files.
19287         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
19288         (lang_f_options):  Added "emit-class-file(s)".
19289
19290         * expr.c (build_java_arrayaccess):  Generate more efficient array
19291         bounds checking, by using unsigned compare.
19292
19293         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
19294
19295 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19296
19297         * parse.h: New comment on the handling of unresolved type
19298         identifiers. JDEPs are now part of the jdep_code enum.
19299         (typedef struct jdep): Now use enum jdep_code or int, depending on
19300         availability. Both are narrowed down to an 8 bits bitfield.
19301         (CALL_EXPR_PRIMARY): Fixed comment.
19302
19303 1998-06-10  Tom Tromey  <tromey@cygnus.com>
19304
19305         * Make-lang.in (java): Added gjavac and jvgenmain.
19306         (java.start.encap): Depend on gjavac.
19307         (java.rest.encap): Depend on jvgenmain.
19308
19309         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19310         (JAVA_CROSS_NAME): Likewise.
19311         (java.all.build): Depend on jvgenmain and gjavac.
19312         (java.all.cross): Depend on jvgenmain and gjavac-cross.
19313         (jvgenmain$(exeext)): New target.
19314         (java.install-common): Wrote.
19315         * config-lang.in (compilers, stagestuff): Added gjavac and
19316         jvgenmain.
19317
19318 1998-06-10  Dave Brolley  <brolley@cygnus.com>
19319
19320         * lang.c (lang_decode_option): New argc/argv interface.
19321
19322 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19323
19324         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19325         * decl.c (build_decl_no_layout): New function.
19326         * expr.c (java_lang_expand_expr): Layout declarations found in
19327         blocks before they're pushed.
19328         * jcf-parse.c (load_class): Save current line when parsing class
19329         file.
19330         (parse_source_file): Register class before expanding their
19331         methods.
19332         * lang.c (put_decl_node): Produce `null' when `void *' is
19333         processed.
19334         * lex.c (static tree wfl_op): New static global, for error report
19335         on casts.
19336         (java_init_lex): wfl_operator and wfl_op initialized
19337         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19338         parsed.
19339         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19340         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19341         build_unresolved_array_type): New static function definitions.
19342         (build_decl_no_layout): New extern function declared.
19343         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19344         faulty modifier exists.
19345         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19346         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19347         (UNARY_PLUS_EXPR): New fake operator.
19348         (struct parser_ctxt): New field osb_number.
19349         * parse.y (static tree wfl_operator): New static WFL for operator
19350         bound error messages.
19351         (DECR_TK, INCR_TK): Moved.
19352         (OP_TK): Tagged <operator>.
19353         (array_type:): Now call build_unresolved_array_type.
19354         (dim_expr:): Count the number of '[' seen.
19355         (post_increment_expression, post_decrement_expression,
19356         pre_increment_expression, pre_decrement_expression,
19357         unary_expression_not_plus_minus, unary_expression:): Actions are
19358         now building the corresponding unary expressions.
19359         (cast_expression:): Actions are now building cast expressions.
19360         (build_unresolved_array_type): New function.
19361         (create_interface): Reset the number of declared interfaces.
19362         (create_class): Likewise.
19363         (method_header): Methods declared within the scope of an interface
19364         are now implicitly set public and abstract.
19365         (java_complete_class): Variable's and parameter's type are patched
19366         with a promoted type.
19367         (declare_local_variables): Resolved non builtin types are promoted
19368         before being used to build a variable decl. Removed type patch
19369         posted on variable initialization statement.
19370         (source_start_java_method): Use build_decl_no_layout to build the
19371         decl of a parameter of incomplete type.
19372         (java_register_parsed_class): Process interfaces too. Call
19373         rest_of_decl_compilation on each processed class declarations.
19374         (java_complete_expand_methods): Don't attempt to expand things in
19375         interfaces.
19376         (java_complete_tree): Process CONVERT_EXPR, even though it always
19377         has a type. Propagate error_mark_node to node's type too. Promote
19378         method's call argument type and return error_mark_node if
19379         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19380         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19381         handle unary operator nodes.
19382         (build_assignment): Added comment.
19383         (print_int_node): New function.
19384         (patch_assignment): New second argument. New error handling. Use
19385         print_int_node. Handle references. Use can_cast_to_p to issue
19386         different error message according to the context and check upon
19387         the initialization of the RHS.
19388         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19389         (operator_string): Handle more operators.
19390         (patch_binop): No longer use a function static
19391         wfl_operator. Improved error message on shift distance.
19392         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19393         patch_cast): New functions.
19394
19395 1998-06-05  Per Bothner  <bothner@cygnus.com>
19396
19397         * jvspec.c:  New file.
19398         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19399
19400         * java-tree.h (identifier_subst):  Add declaration.
19401
19402 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19403
19404         * jvgenmain.c (main): Generate call to JvRunMain.
19405
19406         * class.c (make_class_data): Push value for "sync_info" field.
19407         * decl.c (init_decl_processing): Push "sync_info" field.
19408
19409 1998-06-03  Per Bothner  <bothner@cygnus.com>
19410
19411         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19412         Java (source) name, not signature.
19413         Set TYPE_ALIGN to (at least) that of element_type.
19414
19415 1998-06-02  Per Bothner  <bothner@cygnus.com>
19416
19417         * class.c:  Moved classname-mangling-rekated code to ...
19418         * mangle.c:  ... this new file.
19419         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19420         * Makefile.in:  Update for above changes.
19421
19422 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19423
19424         * expr.c (truthvalue_conversion): Convert integer and floating
19425         point value to their truth value.
19426         * lex.c (java_lex): Handle the `null' literal.
19427         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19428         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19429         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19430         New macros.
19431
19432         * parse.y: Reorganization/documentation on token declaration.
19433         (binop_lookup[]): New added new tree codes.
19434         (relational_expression): Build corresponding binary operators.
19435         (equality_expression, conditional_and_expression,
19436         conditional_or_expression): Likewise.
19437         (java_complete_class): Fix crash in debug message.
19438         (java_complete_tree): Check initialization of method call
19439         arguments. Further bogus node evaluation to detect more error
19440         during assignments. Handles more binary operators.
19441         (patch_assignment): Use DECL_P.
19442         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19443         code.
19444         (operator_string): Handle more case. Compacted source.
19445         (patch_binop): Changed function comment. Checking for
19446         uninitialized first operand takes the compound assignment into
19447         account and uses DECL_P. Checking for uninitialized second operand
19448         delayed to routine's end. Use macros to issue type bound error
19449         messages and issue messages on both operands if their types are
19450         different. Force fixed type into node. Handle all binary
19451         operators.
19452
19453 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19454
19455         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19456         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19457         build operator node and return tokens.
19458         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19459         * parse.h (java_complete_tree): Changed returned type in prototype.
19460         (build_method_invocation, build_assignment, patch_assignment,
19461         patch_binop): New static function declarations.
19462         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19463         BUILD_EXPR_WFL): New macros.
19464         * parse.y (enum tree_code binop_lookup[]): New static for token to
19465         TREE_CODE lookup.
19466         (%union): Parser union has new sub-structure `operator'.
19467         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19468         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19469         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19470         ASSIGN_ANY_TK): Tokens tagged `operator'.
19471         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19472         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19473         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19474         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19475         (assignment_operator:): Rule tagged `operator'.
19476         (expression_statement:): Re-installed default rule.
19477         (method_invocation:): Sub rules call build_method_invocation.
19478         (postfix_expression:): Don't attempt to resolve name here. Just
19479         return an ID.
19480         (multiplicative_expression:): Sub-rules build corresponding binop
19481         expression node.
19482         (additive_expression:, shift_expression:, and_expression:,
19483         exclusive_or_expression:, inclusive_or_expression:): Likewise.
19484         (assignment:): Sub rule invoke build_assignment.
19485         (assignment_operator:): Default rules on sub rules.
19486         (force_error): Added documentation on this variable.
19487         (declare_local_variables): Build initialization calling
19488         build_assignment.
19489         (expand_start_java_method): Removed unused rtx declaration. Mark
19490         arguments as already initialized.
19491         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19492         (java_complete_expand_methods): Don't process next method if
19493         completion of the previous one triggered errors.
19494         (java_complete_expand_method): Call source_end_java_method if no
19495         error were found during completion.
19496         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19497         locals declaratilon. Handle names found within a class. Return
19498         error_mark_node when things aren't found.
19499         (patch_method_invocation_stmt): Return error_mark_node on failures.
19500         (patch_invoke): Removed unused local. Return the correct node.
19501         (java_complete_tree): Now returns a value. The BLOCK section binds
19502         local identifiers and the type of a BLOCK is now void. Assign the
19503         result of operand completion on COMPOUND_EXPR. Assign the
19504         encapsulated node of a WFL to the result of its completion, except
19505         when the node is an identifier. Now handle MODIFY_EXPR and several
19506         binary operators. Return error_mark_node on errors.
19507         (build_method_invocation, build_assignment, patch_assignment,
19508         build_binop, operator_string, patch_binop): New functions.
19509         * typeck.c (binary_numeric_promotion): New function.
19510
19511 1998-05-21  Per Bothner  <bothner@cygnus.com>
19512
19513         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
19514         Replace most uses of ident_subst by identifier_subst.
19515
19516         * class.c (push_class_static_dummy_field):  Removed function.
19517         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
19518         instead of looking got "class" static field.  Create that decl here.
19519         (class_identifier_node):  Removed;  no longer needed.
19520         (init_class_processing):  Don't init class_identifier_node.
19521         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
19522         Do nreverse 0 times (instead of twice) for Object and Class.
19523         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19524
19525 1998-05-20  Per Bothner  <bothner@cygnus.com>
19526
19527         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
19528         while initializing linenumber_count and linenumber_table.
19529         Do it before init_function_start (which calls emit_line_note).
19530         * expr.c (expand_byte_code):  Don't need to clear lineno here.
19531
19532 1998-05-18  Tom Tromey  <tromey@cygnus.com>
19533
19534         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19535         then mangle number as _N_.
19536
19537         * class.c (mangle_class_field): New function.
19538         (build_class_ref): Set assembler name of class reference using
19539         mangle_class_field.
19540         (push_class_static_dummy_field): Likewise.
19541
19542 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
19543
19544         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19545         of assigning to TREE_CODE.  The latter method exploits a feature
19546         of GCC that is not ANSI compliant.
19547
19548 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19549
19550         * decl.c (pushdecl_force_head): New function.
19551         (pushlevel): Removed conditional printf.
19552         (complete_start_java_method): Don't enter local variable scope if
19553         function is compiled from source code.
19554         * expr.c: parse.h now included
19555         (java_lang_expand_expr): New function.
19556         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19557         printf. Terminate buffer when doing directories.
19558         * jcf-parse.c (parse_source_file): Call lang_init_source before
19559         parsing and before code generation.
19560         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19561         use printf if the macro is defined.
19562         * lang.c (lang_init): Install lang_expand_expr hook on
19563         java_lang_expand_expr.
19564         (java_dummy_print): New function.
19565         (lang_init_source): New function.
19566         * lex.c (java_lex): Remember location of an opening brace at the
19567         second nesting level.
19568         (java_is_eol): Unget character seen after a CR if it is EOF.
19569         * parse.h: Now includes lex.h
19570         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19571         printf if the macro is defined.
19572         (expand_start_java_method, build_expr_block, enter_block,
19573         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19574         New static function declarations.
19575         (pushdecl_force_head): New extern function declaration.
19576         (INCOMPLETE_TYPE_P): New macro.
19577         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19578         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19579         BLOCK_EXPR_ORIGIN): New macros.
19580         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19581         DECL_SOURCE_LINE_LAST): New macros.
19582         (struct parser_ctxt): Removed field current_method_decl, redundant
19583         with the field current_function_decl. Added fields
19584         first_ccb_indent1 and pending_block.
19585         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19586         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19587         tagged <node>
19588         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19589         (compilation_unit:): Cosmetic on sub rule.
19590         (type_declaration:): Cosmetic on sub rules. Added an error rule.
19591         (variable_initializer:): Installed default rule on expression:.
19592         (method_declaration:): method_header: starts a new
19593         method. method_body: installs the function body, absorbs blocks
19594         emitted for temporary variable scopings, pops function's body block
19595         and merges function's last statement lineno in DECL_SOURCE_LINE.
19596         (method_body:): Installed default rules.
19597         (block:): Call enter_block when an opening brace is seen.  Absorb
19598         scoping blocks and call exit_block when a closing brace is seen.
19599         (block_statement:): Cosmetic changes.
19600         (method_invocation:): Create WFL around CALL_EXPR node.
19601         (patch_stage): Added comment around definition.
19602         (method_header): Try to use first_ccb_indent1 as the first line of
19603         the method, so BP debug info are emitted at the first opening
19604         brace of the function. If the function has no body, use the
19605         location of the function's name. Override currently defined method
19606         name with the matching WFL so we can point redefinition errors
19607         using the location where the function's name was declared.
19608         (check_abstract_method_header): Interprets DECL_NAME as an
19609         identifier or as a WFL, accordingly.
19610         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19611         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19612         location and name information out of it and reinstall DECL_NAME to
19613         its original identifier node value.
19614         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19615         function's source code).
19616         (read_import_dir): Test the value returned by find_class and issue
19617         a fatal accordingly.
19618         (declare_local_variables): Push a new block for the scope of the
19619         new variable(s) if code has been already generated at that nesting
19620         level. Pinpoint redefinition errors using the variable id
19621         WFLs. Generate initialization code if necessary. If the variable
19622         type is incomplete, register a patch on its decl.
19623         (source_start_java_method): Rewritten. Define a new block for the
19624         function's parameters. Build parameter decl out of function's
19625         arguments and register them for a patch if their types are
19626         incomplete.
19627         (expand_start_java_method): Includes the part of
19628         source_start_java_method that was pushing the parameter decls and
19629         completing the method start code.
19630         (source_end_java_method): Removed call the expand_end_bindings and
19631         poplevel (already taken care of). Reinstall function's arguments
19632         and get function's last line of code before calling
19633         expand_function_end.
19634         (java_method_add_stmt): New comment before the function's
19635         code. Complement the second operand of the current COMPOUND_EXPR
19636         if necessary.
19637         (java_complete_expand_methods): Don't generate debug info on line
19638         zero when expanding a generated constructor.
19639         (java_complete_expand_method): Set start and end line numbers for
19640         a artificially generated constructor to one and manually call
19641         enter_block and exit_block when defining it. For all methods:
19642         expand function's start calling the new expand_start_java_method
19643         and invoke java_complete_tree on the effective method's body, if
19644         any.
19645         (resolve_expression_name): Now use lookup_name_in_blocks to search
19646         local variable decls and print out an error when variables are
19647         undefined.
19648         (patch_method_invocation_stmt): Inserted comment before the
19649         function's code.
19650         (lookup_method_invoke): Chain method's arguments using chainon
19651         with the current arg list as a second argument. Inserted missing
19652         IDENTIFIER_POINTER when reporting an error on methods not found.
19653         (refine_accessible_methods_list): Don't retain constructors.
19654         (patch_arguments): Function removed.
19655         (java_complete_tree): Inserted comment before the function's
19656         code. New case for BLOCKs. Moved the WFL case a bit
19657         further. Complete function's arguments.
19658         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19659         maybe_absorb_scoping_blocks): New functions.
19660
19661 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19662
19663         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19664         previously set.
19665         * jcf-parse.c (parse_source_file, java_error_count): New forward
19666         and extern declarations.
19667         (java_parse_abort_on_error): Macro moved.
19668         (jcf_parse_source): fatal called if fopen fails. Now calls
19669         parse_source_file.
19670         (parse_source_file): New parse_only parameter. Reflects the
19671         elimination of the second pass.
19672         (yyparse): parse_source_file called with argument set to 0.
19673         * jcf.h (JCF_ZERO): Sets java_source to zero.
19674         * lex.c (java_init_lex): pass argument is gone. Function modified
19675         to be called once during the analysis of a file.
19676         (java_unget_unicode): Fixed typo in fatal message.
19677         (java_get_line_col): Likewise.
19678         (java_lval): Likewise. String literals no longer built during
19679         second pass.
19680         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
19681         account.
19682         * parse.h (MODIFIER_WFL): New macro.
19683         (parse_check_super, parser_check_super_interface): Now return int.
19684         (parser_chain_incomplete_item, not_builtin_p,
19685         complete_method_decl): Declarations removed.
19686         (build_method_invocation_stmt, build_invoke): Renamed using the
19687         `patch' instead of `build'
19688         (register-incomplete_type, obtain_incomplete_type,
19689         java_complete_tree, java_complete_expand_method,
19690         unresolved_type_p, create_jdep_list): New function declarations.
19691         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
19692         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
19693         (jdep): New typedef on new struct _jdep.
19694         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
19695         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
19696         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
19697         JDEP_RESOLVED_P): New macros.
19698         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
19699         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
19700         JDEP_VARIABLE): New enum values and jdep kinds.
19701         (jdeplist): New typedef on struct _jdeplist.
19702         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
19703         macros.
19704         (CALL_EXPR_PRIMARY): New macro.
19705         (struct parser_ctxt): Fields java_pass, current_method_decl,
19706         method_decl_list deleted. New field jdeplist.
19707         (INCOMPLETE_P): Macro deleted.
19708         * parse.y (single_type_import_declaration:): Removed pass switch.
19709         (type_import_on_demand_declaration): Likewise.
19710         (field_declaration:): Removed pass switch on all sub rules.
19711         (class_declaration:): Call the complete_class_decl removed on
19712         class_body rules.
19713         (method_declaration:): Removed second pass switch. No longer chain
19714         methods decl when method_header reduced.
19715         (method_header:): Sub rules no longer depend on pass switch.
19716         (method_declarator:): Likewise.
19717         (method_body:): Likewise.
19718         (abstract_method_declaration:): Likewise.
19719         (block_statement:): Likewise.
19720         (local_variable_declaration:): Likewise.
19721         (argument_list:): Likewise.
19722         (method_invocation:): Likewise. Call to build_method_invocation_stmt
19723         removed. Partial CLASS_EXPR tree node built instead.
19724         (postfix_expression:): Removed pass switch on all sub rules.
19725         (java_pop_parser_context): Free classd_list content.
19726         (yyerror): Call obstrack_grow0 to finalize error message.
19727         (check_class_interface_creation): Comment modified to reflect new
19728         returned value meaning. Removed second pass switch. Return 1 if an
19729         error was found, 0 otherwise. Adjust pointer on filename if a
19730         leading path separator was found.
19731         (maybe_create_class_interface_decl): Removed first pass switch
19732         when linking the class decl to the class_list. Install a new
19733         jdep_list for the class.
19734         (add_superinterfaces): List of unresolved interfaces is
19735         gone. Unresolved interfaces are directly added to the current
19736         dependencies list.
19737         (create_interface): Second pass shortcut removed.
19738         ctpx->modifier_ctx access through MODIFIER_WFL.
19739         (create_class): Second pass shortcut removed. Call to
19740         register_incomplete_type replaces the call to
19741         parser_chain_incomplete_item.
19742         (complete_class_decl): Function removed.
19743         (duplicate_declaration_error): New way of retrieving redeclared
19744         item type.
19745         (register_fields): Call to lookup_modifier_cl replaced by
19746         MODIFIER_WFL. New way of handling unresolved type, using
19747         unresolved_type_p and obtain_incomplete_type.
19748         register_incomplete_type replaces call to parser_chain_incomplete_item.
19749         (patch_stage): New static global variable.
19750         (method_header): New way of handling unresolved type, using
19751         unresolved_type_p and obtain_incomplete_type. patch_stage used to
19752         indicates that the method decl needs to be patched.
19753         (check_abstract_method_header): Call to lookup_modifier_cl
19754         replaced by MODIFIER_WFL.
19755         (method_declarator): Incomplete argument type are registered
19756         calling register_incomplete_type. Patch on the declared method is
19757         issued in that case.
19758         (unresolved_type_p): New function.
19759         (parser_check_super_interface): New comment to reflect function's
19760         modified returned type (int). Function and has a new argument
19761         this_wfl. Call to parse_error_context uses this_wfl instead of
19762         relying on lookup_cl.
19763         (parser_check_super): Comment reflects function's new returned
19764         type (int). Function returns nonzero value on error.
19765         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
19766         register_incomplete_type, jdep_resolve_class): New functions to
19767         handle incomplete types in declarations.
19768         (java_complete_class): Rewritten to work with the new incomplete
19769         type handling scheme.
19770         (complete_class_report_errors): Likewise.
19771         (complete_method_decl): Removed: it jobs is now handled by
19772         java_complete_class.
19773         (do_resolve_class): Class loaded in not already loaded and not
19774         found in Java source code.
19775         (java_check_regular_methods, java_check_abstract_methods): Don't
19776         call complete_method_decl anymore.
19777         (lookup_modifier_cl, not_builtin_p): Functions deleted.
19778         (read_import_dir): Got rid of the pass number dependency.
19779         (declare_local_variables): New handling of unresolved types (patch
19780         issued).
19781         (source_start_java_method): New parameter level. Function called
19782         with level set to 1 when argument types are potentially
19783         unresolved.  Called to complete the job with level set to 2 once
19784         types are complete.
19785         (source_end_java_method): Call to permanent_allocation
19786         removed. Waiting to be replaced by a more suitable obstack
19787         management.
19788         (java_complete_expand_methods, java_complete_expand_method,
19789         java_expand_finals): New functions.
19790         (build_method_invocation_stmt): Renamed
19791         patch_method_invocation_stmt. Extracts function call expression
19792         (wfl) and arguments (args) from CALL_EXPR tree operands.
19793         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
19794         call. Patch the function and argument operand of the CALL_EXPR
19795         tree argument.
19796         (patch_argument, java_complete_tree): New functions.
19797
19798 1998-04-20  Per Bothner  <bothner@cygnus.com>
19799
19800         Recover from missing fields and methods (i.e. error instead of fatal).
19801         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
19802         * expr.c (expand_invoke):  Recover from missing method.
19803         (expand_java_field_op):  Recover from missing field.
19804         Inline references to java.lang.{Integer,Char,...}.TYPE.
19805         * typeck.c (get_type_from_signature), java-tree.h:  New function.
19806         * class.c (add_method):  Use get_type_from_signature.
19807         (build_class_ref):  Handle a class that was not found.
19808         * typeck.c (convert):  Handle conversion to pointers (for convenience).
19809         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
19810         instead of lookup_field to handle missing fields.
19811
19812         * jcf-parse.c (process_zip_dir):  Set java_source.
19813
19814 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
19815
19816         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
19817
19818 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19819
19820         * jcf-parse.c (load_class): Don't change input_filename before
19821         calling jcf_parse_source (but still do it before calling
19822         jcf_parse).
19823         (jcf_parse_source): Assign input_filename after having saved the
19824         parser context.
19825         * lex.c (java_init_lex): Chain a WFL node to the import on demand
19826         list. ctxp->modifier_ctx zeroed according to its new
19827         definition. ctxp->filename initialized. Removed
19828         JAVA_MODIFIER_CTX_UNMARK.
19829         (java_unget_unicode): Update the character based column position.
19830         (java_allocate_new_line): ref_count not used anymore. Always free
19831         ctxp->p_line. Initialize c_line->char_col to 0.
19832         (java_get_unicode): Update the character based column position.
19833         (java_lex): Use ctxp->elc to store current position in source
19834         file, at the beginning of the parsed token. Set modifier_ctx entry
19835         corresponding to the parse modifier to a WFL node. Return a WFL
19836         node when an identifier is parsed.
19837         (java_lex_error): Now uses ctxp->elc to store current position in
19838         source.
19839         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
19840         * lex.h (build_wfl_node): New function definitions.
19841         (struct java_line): ref_count and next fields are gone. New field
19842         char_col.
19843         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19844         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
19845         (JAVA_COLUMN_DELTA): New macro.
19846         (java_lc): New typedef on new struct _java_lc.
19847         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
19848         (parse_error_context, parse_warning_context): Changed prototypes.
19849         (java_get_line_col): Added as an available global function.
19850         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
19851         (IC_DECL): Replaced by macro IC_TYPE
19852         (DEPEND_WFL): New macro.
19853         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
19854         wrong modifier.
19855         (exit_java_complete_class): Removed a commented out statement.
19856         (struct parser_ctxt): Added comments on fields. modifier_ctx is
19857         now an array of tree nodes. Deleted fields line_list and
19858         e_line. New field elc, to replace e_line.
19859         * parse.y (array_type:): Build WFL node.
19860         (qualified_name:): Build a single WFL node out of two. Retain
19861         the location information of the first node in the resulting node.
19862         (package_declaration:): Use package name as a WFL node
19863         (single_type_import_declaration:): Use imported name as a WFL node.
19864         (type_import_on_demand_declaration:): Use root of the imported
19865         packages as a WFL node.
19866         (field_declaration:): Removed unused local variable cl.
19867         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
19868         (yyerror): New static elc. Removed static error_line, error_pos.
19869         New local code_from_source. Save ctxp->elc into elc at the first
19870         pass. Call java_get_line_col to get a string of the line where
19871         the error occurred.
19872         (debug_line): Removed static function.
19873         (parse_error_context, parse_warning_context): Parameter cl is now
19874         a WFL node. Use its value to initialize ctxp->elc.
19875         (redefinition_error): Parameter cl is now a WFL node.
19876         (parse_add_interface): New parameter wfl. No longer call
19877         lookup_cl, use wfl instead.
19878         (check_class_interface_creation): Parameter cl is now a WFL node.
19879         (maybe_create_class_interface_decl): Likewise.
19880         (add_superinterfaces): New function.
19881         (create_interface): Removed local cl, node, super_decl,
19882         super_decl_type.  Function now uses id as a WFL node. Better
19883         warning/error report on obsolete or forbidden mix of
19884         modifiers. Now calls add_superinterfaces to register interfaces.
19885         (create_class): Removed local cl, node. Local variable id is used
19886         as a WFL node. Better error report on forbidden modifier
19887         mix. Uses add_superinterfaces to register interfaces.
19888         (find_field): Argument cl is now a WFL node. Now store the WFL
19889         node of a fields that needs to be checked for their
19890         initialization.
19891         (method_header): Local variable node non longer used. Local
19892         variable id replaces cl.
19893         (check_modifiers_consistency): Local variable cl is now a WFL
19894         node.
19895         (method_declarator): Local variable cl replaced by parameter id.
19896         (parser_qualified_name): Now uses parameter name as a WFL node.
19897         (parser_check_super_interface): New parameter wfl, for achieve
19898         greater accuracy during error reports.
19899         (parser_chain_incomplete_item): New parameter named location. Used,
19900         along the decl, to construct the incomplete item node.
19901         (java_complete_class): resolve_class now uses WFL node extracted
19902         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
19903         where appropriate.
19904         (complete_method_decl): Unresolved function's argument types are WFL.
19905         (resolve_class): Parameter cl is now a WFL node.
19906         (resolve_and_layout): Likewise.
19907         (do_resolve_class): Likewise. Try first to use cl and then do the
19908         lookup on the decl when calling check_pkg_class_access.
19909         (complete_class_report_errors): Use IC_TYPE in place of
19910         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
19911         instead of doing a lookup over the decl.
19912         (java_check_final): Use WFL info from field tree list.
19913         (lookup_cl): Rewritten and returns a statically defined WFL node.
19914         (lookup_modifier_cl): Now uses information from WFL nodes.
19915         (process_imports): Likewise.
19916         (read_import_dir): name and cl arguments replaced by a single WFL
19917         node. Function modified accordingly.
19918         (find_in_imports_on_demand): Now uses WFL node.
19919         (check_pkg_class_access): cl argument is now a WFL node.
19920         (declare_local_variables): Fixed to use WFL nodes.
19921         (resolve_expression_name): Likewise.
19922         (build_method_invocation_stmt): name_combo argument renamed
19923         wfl. Function modified to use WFL nodes.
19924         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
19925         (lookup_method_invoke): cl is now a WFL node. Added missing
19926         IDENTIFIER_POINTER to class type decl name.
19927
19928 1998-04-14  Dave Brolley  <brolley@cygnus.com>
19929
19930         * lang.c (init_parse): Now returns char* containing the filename.
19931
19932 1998-04-10  Per Bothner  <bothner@cygnus.com>
19933
19934         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
19935
19936         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
19937         * class.c (make_class_data):  If flag_assume_compiled, initial class
19938         state is CSTATE_PREPARED; make superclass and interfaces direct
19939         references, rather than constant pool indexes.
19940
19941 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19942
19943         * parser.y: Include flags.h. Removed debug variable pl.
19944         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
19945         (block:): Likewise.
19946         (labeled_statement_nsi:): Generate debug info when reducing
19947         expression_statement:.
19948         (check_pkg_class_access): get_access_flags_from_decl invocation
19949         fixed for new CLASS_* flags location.
19950         (source_end_java_method): Save/restore parser context when
19951         entering/leaving this routine. Restore lineno to its right value
19952         before calling expand_end_bindings.
19953         (build_method_invocation_stmt): build_invoke called with the
19954         current line information.
19955         (build_invoke): New argument cl. Wrap the function call around a
19956         wfl node.
19957         (refine_accessible_methods_list): Changed comment, removed
19958         unnecessary code.
19959         * parse.h: Fixed typo in comments.
19960         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
19961         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
19962         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
19963         parser_ccb_indent.
19964         * lex.c (java_lex): Record the last closing curly bracket of a
19965         function.
19966         * jcf-parse.c (jcf_parse_source): Now calls
19967         java_check_methods. Clarified comment, fixed typo.
19968
19969 1998-04-09  Dave Brolley  <brolley@cygnus.com>
19970
19971         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
19972         (finish_parse): Expose for non USE_CPPLIB builds.
19973
19974 1998-04-08  Jeffrey A Law  (law@cygnus.com)
19975
19976         * lang.c (lang_print_xnode): New function.
19977
19978 1998-04-03  Per Bothner  <bothner@cygnus.com>
19979
19980         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
19981         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
19982         used to build a class's dispatch table.
19983         (make_class_data):  Generate dispatch table if flag_assume_compiled.
19984         Set dtable of class object to address of class_dtable_decl.
19985
19986         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
19987         be volatile and have side effects - generates better code.
19988
19989         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
19990         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
19991
19992         * expr.c (expand_invoke):  If class is final, method is
19993         effectively final, so can call it directly.
19994
19995         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
19996
19997         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
19998
19999 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20000
20001         * parse.y (build_method_invocation_stmt): Removed extra argument
20002         to build_invoke.
20003
20004 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20005
20006         * expr.c (dtable_indent): Now static global.
20007         (expand_invoke): Now call invoke_build_dtable and
20008         build_invokevirtual.
20009         (invoke_build_dtable, build_invokevirtual): New functions.
20010         * jcf-io.c (find_class): Defer issuing a warning by setting
20011         jcf->outofsynch to 1.
20012         * jcf-parse.c (jcf_out_of_synch): New function.
20013         (load_class): Test this_jcf.outofsynch flag and call
20014         jcf_out_of_synch accordingly.
20015         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20016         comment indentation.
20017         * lex.c (java_get_unicode): Fixed code indentation.
20018         (java_lex): Create string literal. Fixed typo. Removed several
20019         premature obstack_free.
20020         * parse.h: New enums for name resolution and invocation mode.
20021         (struct qualification): New data structure.
20022         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20023         (do_resolve_class, build_method_invocation_stmt,
20024         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20025         debug_line, identical_subpath_p, invocation_mode,
20026         refine_accessible_methods_list, build_invoke,
20027         lookup_method_invoke): New functions declared.
20028         (build_invokevirtual, invoke_build_dtable, match_java_method,
20029         build_field_ref, jcf_out_of_synch): New references to external
20030         functions.
20031         (struct parse_ctxt): Removed artificial_constructor field.
20032         * parse.y: (array_type:): Type defined for this rule.
20033         (class_type:): Installed default rule for interface_type:.
20034         (array_type:): Now build Java array type.
20035         (qualified_name:): Now use obstack_grow0.
20036         (method_declaration:): Skip the artificial constructor added to
20037         the list, if any.
20038         (abstract_method_declaration:): Execute the code only during pass 1.
20039         (block:): Installed default rule in block_statements:.
20040         (block_statement:): Add the statement to the method during pass 2.
20041         (statement_expression): Installed default rule for
20042         method_invocation:.
20043         (argument_list:): Added code to build the argument list.
20044         (method_invocation:): Added call to create the method invocation
20045         node.
20046         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20047         (debug_line): New function for debug.
20048         (complete_class_decl): No longer do something during pass 1.
20049         (method_header): Use BUILD_PTR_FROM_NAME.
20050         (parser_qualified_classname): Use obstack_grow0. Removed bogus
20051         obstack_free.
20052         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20053         function's main comment.
20054         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20055         classes.
20056         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20057         (resolve_class): Now works with arrays.
20058         (do_resolve_class, resolve_and_layout): New functions.
20059         (java_check_regular_methods): Reverse method list before and after
20060         having processed it. No longer set ctxp->artificial_constructor.
20061         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20062         accordingly. Fixed typo in issued error message. Now use
20063         obstack_grow0.
20064         (find_in_imports_on_demand): Now use obstack_grow0.
20065         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20066         (source_end_java_method): Call expand_expr_stmt instead of
20067         expand_expr. Calls it before calling expand_function_end.
20068         (java_method_add_stmt): Do nothing if errors were found during
20069         parsing.
20070         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20071         (build_method_invocation_stmt, build_invoke, invocation_mode,
20072         lookup_method_invoke, refine_accessible_methods_list,
20073         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20074         New functions.
20075         * typeck.c (build_java_signature): Properly end method signature
20076         if return type skipped.
20077         (match_java_method): New function.
20078
20079 1998-03-16  Per Bothner  <bothner@cygnus.com>
20080
20081         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
20082
20083 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20084
20085         * expr.c (build_invoke_non_interface): New function.
20086         (methods_ident, ncode_ident): Now static globals.
20087         (expand_invoke): Use build_invoke_non_interface.
20088         * java-tree.h (struct lang_decl): New field function_decl_body.
20089         (DECL_FUNCTION_BODY): New macro.
20090         * jcf-parse.c (jcf_parse_source): Deeper check before setting
20091         CLASS_FROM_SOURCE_P.
20092         (parse_source_file): Fixed typos. Call java_layout_parsed_class
20093         before starting pass 2. Call to java_generate_parsed_class replaced
20094         by java_register_parsed_class.
20095         * lex.c: Fixed typo in header. Some line width related formating.
20096         * lex.h: Some line width related formating.
20097         * parse.h (source_end_java_method, resolve_expression_name,
20098         complete_class_decl, maybe_create_class_interface_decl,
20099         check_class_interface_creation): New static function declarations.
20100         (java_layout_parsed_class, java_method_add_stmt): New function
20101         declarations.
20102         (struct parser_ctxt): Field mark_class_generate removed. New
20103         fields class_list and artificial_constructor.
20104         * parse.y: Fixed typo in header.
20105         (class_declaration:): Call complete_class_decl when class body
20106         parsed.
20107         (method_declaration:): Call source_end_java_method in pass 2 when
20108         the method body is defined.
20109         (postfix_expression:): Do expression name resolution on sub-rule
20110         name during pass 2.
20111         (create_class, create_interface): Merged common pieces.
20112         (check_class_interface_creation, maybe_create_class_interface_decl):
20113         New functions.
20114         (complete_class_decl): New function.
20115         (register_fields): Fixed line width related typo.
20116         (method_header): Correctly skip first argument when fixing
20117         argument line. Changed the loop.
20118         (java_check_circular_reference): Now use ctxp->class_list.
20119         (java_complete_class): Removed start/stop marking.
20120         (java_check_regular_methods): Now takes a class decl as an
20121         argument.  Add default constructor if none were encountered.
20122         (java_check_methods): Now use ctxp->class_list. Changed call to
20123         java_check_regular_methods.
20124         (source_start_java_method): Set DECL_ARG_TYPE for each function
20125         arguments.
20126         (source_end_java_method, java_method_add_stmt): New functions.
20127         (java_generate_parsed_class): No longer exists.
20128         (java_layout_parsed_class, java_register_parsed_class): New functions.
20129         (resolve_expression_name): New function.
20130
20131 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20132
20133         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20134         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20135         until pass initializations are done. Call read_import_dir with
20136         pass set to 0.
20137         * parse.h: (lookup_modifier_cl): New function declared.
20138         (INTERFACE_FIELD_MODIFIERS): New macro.
20139         (OBSOLETE_MODIFIER_WARNING): New macro.
20140         * parse.y: (register_fields): Class type and current field name in
20141         local variables. Check modifier(s) if adding field(s) to an interface.
20142         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20143         and report errors using the faulty modifier line context.
20144         (lookup_modifier_cl): New function.
20145         (read_import_dir): Detect and report default import processing
20146         failure.
20147
20148 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
20149
20150         Add a pair of -fassume-compiled/-fno-assume-compiled options.
20151         * class.c (is_compiled_class): Return 1 after making sure it
20152         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20153         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20154         * java-tree.h (flag_assume_compiled): Add decl.
20155         * lang.c (lang_f_options): Add the flag.
20156         (flag_assume_compiled): Add decl, default to 0.
20157
20158 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20159
20160         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20161         (is_compiled_class): Likewise.
20162         (layout_class): Likewise.
20163         (layout_class): Detect and lay out classes defined in source code.
20164         (interface_of_p, add_interface_do, may_add_interface): New
20165         function.
20166         (add_interface): Now use add_interface_do.
20167         (add_method_1): New function.
20168         (add_method): Now use add_method_1.
20169         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20170         (complete_start_java_method): New function.
20171         (start_java_mehod): Now call complete_start_java_method.
20172         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20173         (expand_invoke): Likewise and fixed typo.
20174         *gjava.c: (print_super_field): Use new argument to find_class
20175         DO_CLASS_FILE.
20176         (main): Likewise.
20177         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20178         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20179         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20180         IDENTIFIER_NODE.
20181         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20182         (add_method_1, push_class): New prototypes.
20183         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20184         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20185         directory where the class was found.
20186         (find_class): New argument DO_CLASS_FILE. Function find_class
20187         modified accordingly.
20188         *jcf-parse.c: (fix_class_path): New function.
20189         (load_class): Use new VERBOSE argument. load_class now finds and
20190         loads/parses .class/.java files. Save read_state of current_jcf
20191         if necessary.
20192         (java_parser_abort_on_error): New macro.
20193         (jcf_parse_source, parse_source_file): New function.
20194         (jcf_parse): Fixed typo.
20195         (yyparse): Call parse_source_file () only.
20196         (process_zip_dir): Fixed typo, fix zdir->filename_length when
20197         writing the real class name back in the zip directory entry.
20198         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20199         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20200         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20201         (find_class): Prototype fixed.
20202         *lex.c: Added 1998 time stamp.
20203         Removed all static global variables, moved into the parser
20204         context data structure.. Now include unistd.h if SEEK_SET not
20205         defined.
20206         (java_init_lex): Rewritten.
20207         (java_sneak_unicode): Modified current unicode access in current line.
20208         (java_unget_unicode): Likewise.
20209         (java_allocate_new_line): New allocation management.
20210         (java_read_char): Modified access and storage of unget_utf8_value.
20211         New way of processing current unicode.
20212         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20213         (java_get_unicode): Now use the parser context.
20214         (java_lineterminator): Likewise.
20215         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20216         of the reentrant parser implementation. Function now use the
20217         parser context data structure and java_lval. Fixed production of
20218         the float and double constant "out of range" error message. Fixed
20219         obstack use. Return integer value when hitting a modifier. Now
20220         return type for TRUE, FALSE and other predefined types. Return
20221         identifier as a TREE_LIST list containing the current line context
20222         as the TREE_VALUE sub-node.
20223         (java_unicode_2_utf8): Fixed typo in declaration.
20224         (java_lex_error): Now use the parser context data structure.
20225         *lex.h: Added 1998 time stamp.
20226         (struct java_line): New fields ref_count and next.
20227         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20228         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20229         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20230         *parse.h: Added 1998 time stamp.
20231         (java_parse_source_file): Renamed from parse_source_file.
20232         (YYERROR_NOW, YYNOT_TWICE): Fixed.
20233         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20234         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20235         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20236         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20237         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20238         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20239         (struct parser_ctxt): New data structure to keep the parser context.
20240         *parse.y: Added 1998 time stamp, got rid of static global variables.
20241         (java_error_count, ctxp): New global variables.
20242         (%union): New value field.
20243         (numeric_type, integral_type): Rules removed.
20244         (primitive_type): Rule defined to handle integral, float, double and
20245         boolean types.
20246         (qualified_name, package_declaration,
20247         single_type_import_declaration, type_import_on_demand_declaration,
20248         modifiers, class_declaration, super, interfaces,
20249         interface_type_list, class_body, field_declaration,
20250         field_declaration, variable_declarators, variable_declarator,
20251         variable_declarator_id, method_declaration, method_header,
20252         formal_parameter_list, formal_parameter, method_body, block,
20253         static, interface_declaration, extends_interfaces,
20254         abstract_method_declaration, local_variable_declarators): Rules now
20255         define actions.
20256         (force_error, do_warning): New global statics.
20257         (push_parser_context, parser_context_save_global,
20258         parser_context_restore_global, pop_parser_context): New functions.
20259         (yyerror): Now uses the global parser context. Fixed use of obstack.
20260         (parse_error, parse_error_context, parse_warning_context,
20261         java_accstring_lookup, redefinition_error, check_modifiers,
20262         parser_add_interface, create_interface, create_class, find_field,
20263         duplicate_declaration_error, register_fields, method_header,
20264         check_modifiers_consistency, check_abstract_method_header,
20265         method_declarator, parser_qualified_classname,
20266         parser_check_super_interface, parser_check_super,
20267         parser_chain_incomplete_item, java_check_circular_reference,
20268         layout_class_from_source, java_complete_class,
20269         complete_method_decl, resolve_class, complete_class_report_errors,
20270         java_check_final, check_method_redefinition,
20271         java_check_regular_methods, java_check_abstract_methods,
20272         java_check_methods, lookup_java_interface_method2,
20273         lookup_java_method2, lookup_cl, find_name_in_single_imports,
20274         process_imports, find_in_imports, read_import_entry,
20275         read_import_dir, find_in_imports_on_demand,
20276         check_pkg_class_access, not_builtin_p, declare_local_variables,
20277         source_start_java_method, java_generate_parsed_class): New
20278         functions.
20279         *typeck.c: (signature_include_return): New global variable.
20280         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20281         to add the function returned type in the signature.
20282
20283 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
20284
20285         * jcf-io.c (open_in_zip): Use strncmp and LEN.
20286
20287 1998-01-29  Dave Brolley  <brolley@cygnus.com>
20288
20289         * Make-lang.in (java.info): Added.
20290         (java.install-info): Added
20291
20292 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
20293
20294         * Makefile.in (clean): Also remove java/parse.c.
20295
20296 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
20297
20298         Add a pair of -fbounds-check/-fno-bounds-check options.
20299         * lang.c (lang_decode_option): Add code to grok arguments.
20300         (flag_bounds_check): Add decl.
20301         (lang_f_options): New array w/ the option in it.
20302         * java-tree.h (flag_bounds_check): Add decl.
20303         * lang-options.h: New file.
20304         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20305         of a static macro value.
20306         (JAVA_ARRAY_EXCEPTION): Delete macro.
20307
20308 1998-01-23  Per Bothner  <bothner@cygnus.com>
20309
20310         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
20311         * expr.c (build_anewarray):  Add missing promote_type.
20312
20313 1998-01-22  Per Bothner  <bothner@cygnus.com>
20314
20315         Add array types with known length to optimize bounds checking.
20316         * typeck.c (build_java_array_type):  Take length parameter.
20317         (java_array_type_length, build_prim_array_type):  New functions.
20318         * java-tree.h:  Update for new functions.
20319         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20320         * class.c:  Use build_prim_array_type.
20321         * expr.c (can_widen_reference_to):  Handle known-length array types.
20322         (verify_jvm_instructions):  Keep track of integer push instructions
20323         followed by newarray/anewarray, so we can build known-length arrays.
20324         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
20325         (java_array_data_offset):  New function.
20326         (build_java_array_length_access):  New function.  Optimize if constant.
20327         (build_java_arrayaccess):  Constant fold bounds check.
20328         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
20329         (build_newarray, build_anewarray):  New functions.
20330         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20331         * verify.c (merge_types):  Handle known-lengh array types.
20332
20333 1998-01-19  Per Bothner  <bothner@cygnus.com>
20334
20335         * expr.c (expand_byte_code):  Fix performace bug, which caused
20336         searching linenumber_table to be linear rather than constant.
20337
20338 1997-12-12  Per Bothner  <bothner@cygnus.com>
20339
20340         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20341
20342         * decl.c, java-tree.h (soft_fmod_node):  New global.
20343         * decl.c (init_decl_processing):  Define __builtin_fmod.
20344         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20345         using __builtin_fmod.
20346
20347 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20348
20349         * keyword.h: New file, output of keyword.gperf as processed by
20350         gperf.
20351         * lex.c (java_lex_init): Initialize java_error_flag.
20352         * parse.c (YYERROR_NOW): Uses java_error_flag.
20353         * parse.y: New static java_error_flag. Useless definition of
20354         buffer_error gone.
20355         * parse.y (java_error): Portable error recovery using
20356         java_error_flag (not yet completely tuned).
20357
20358 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20359
20360         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20361
20362 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20363
20364         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20365         (parse.c, lex.c, keyword.h): New rules for Java source code
20366         front-end.
20367         * parse.c: Renamed into jcf-parse.c.
20368         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20369         * keyword.gperf: New file, Java keywords.
20370         * parse.y: New file, Java language grammar.
20371         * parse.h: New file, Java language grammar definitions.
20372         * lex.c: New file, Java language lexer.
20373         * lex.h: New file, Java language lexer definitions.
20374
20375 1997-12-03  Per Bothner  <bothner@cygnus.com>
20376
20377         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20378         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20379         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20380         * expr.c (expand_java_field_op):  Check for invalid assignment
20381         to final field.
20382
20383         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20384
20385 1997-10-27  Per Bothner  <bothner@cygnus.com>
20386
20387         * verify.c (verify_jvm_instructions):  When processing a handler,
20388         attempt to set the current_subr to the right value.
20389         (More complicated code combines Sep 17 and Oct 22 versions.)
20390
20391 1997-10-24  Per Bothner  <bothner@cygnus.com>
20392
20393         * class.c (push_class):  Figure out (guess) name of source file.
20394         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20395         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20396         (parse_class_file):  Change return type from int to void.
20397         Call debug_start_source_file/debug_end_source_file.
20398
20399         * expr.c (build_java_binop):  Fix masking 2nd operand.
20400         * decl.c (init_decl_processing):  Set sizetype first.
20401
20402 1997-10-22  Per Bothner  <bothner@cygnus.com>
20403
20404         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20405         (Revert Sep 17 change.)
20406
20407 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20408
20409         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20410         .class extension in their name and fix thing so we don't process
20411         them parse_zip_file_entries().
20412         (parse_zip_file_entries): Cleaned unused local variables.
20413
20414 1997-10-20  Per Bothner  <bothner@cygnus.com>
20415
20416         * expr.c (can_widen_reference_to):  Allows equal array element types.
20417         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20418         * jcf-dump.c (RET):  Get (and print) index.
20419
20420         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20421         Promote element type to POINTER_TYPE.
20422
20423 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20424
20425         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20426         find_in_current_zip, jcf_figure_file_type): Moved from
20427         jcf-reader.c to parse.c.
20428         * zextract.c: (read_zip_archive): takes file_comment_length possible
20429         field into account.
20430
20431 1997-10-20  Per Bothner  <bothner@cygnus.com>
20432
20433         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20434
20435         * verify.c (merge_types):  Handle array types even better ...
20436
20437 1997-10-17  Per Bothner  <bothner@cygnus.com>
20438
20439         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20440
20441         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20442         * class.c (make_class_data):  Don't build fields_decl if no fields.
20443         When building fields_decl, skip if DECL_ARTIFICIAL.
20444
20445         * expr.c (java_stack_swap):  Update stack_type_map.
20446         * verify.c (merge_types):  Handle array types better.
20447
20448 1997-10-15  Per Bothner  <bothner@cygnus.com>
20449
20450         * class.c (add_field):  Don't promote short integral fields to
20451         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20452         * expr.c (push_value):  Promote and convert short integral values.
20453
20454         * decl.c, java-tree.h (integer_two_node):  New constant node.
20455         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20456
20457 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20458
20459         * class.c (append_gpp_mangled_type): Use function argument
20460         unpromoted type to generate mangled name.
20461
20462 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20463
20464         * constants.c (build_constant_data_ref): Now uses current_class
20465         instead of main_class.
20466         (build_constants_constructor): Now uses current_class instead of
20467         main_class.
20468         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20469         of the global variable SeepZipFiles done here.
20470         * zextract.c (read_zip_archive): extra_field optional field taken
20471         into account while computing the position of the class file in the
20472         archive.
20473         * verify.c (verify_jvm_instructions): Use current_jcf to search
20474         the constant pool.
20475         * parse.c (load_class): First search for the class to load in the
20476         current zip file. Saves current_jcf (restored before returning
20477         from that function). Don't call JCF_FINISH in the class was found
20478         in the current ZIP file.
20479         (jcf_parse): If the class was found in the current ZIP file, save
20480         its tree_constant_pool (for later reuse).
20481         (parse_class_file): New function. Process each method defined in
20482         the current class and record the class as to be later registered.
20483         (yyparse): Rewritten. Figure the type of the current file and switch
20484         accordingly.
20485         * lang.c: New global variable current_jcf.
20486         (lang_init): Removed compiling_from_source test (done later, in
20487         yyparse). Removed call the jcf_parse ().
20488         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20489         (typedef struct JCF): New fields seen_in_zip (to mark a class found
20490         in the current ZIP file) and zip_offset (offset to the class data in
20491         the current zip file).
20492         * jcf-reader.c: zipfile.h included.
20493         localToFile: New ZipFileCache static global variable
20494         (parse_zip_file_entries): New function. Browse the current ZIP
20495         file directory and process each class found.
20496         (process_zip_dir): New function. Register each class found in the
20497         ZIP file directory. The class aren't parsed but a valid JCF is
20498         link to each of them.
20499         (find_in_current_zip): New function. Search for a class in the
20500         current ZIP file directory. If found, prepare the class so that it
20501         can be loaded.
20502         (jcf_figure_file_type): New function. Examine the file structure
20503         to figure a class file, a ZIP file. If none of these categories are
20504         matched, a source file is assumed.
20505         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20506         SeenZipFile: New global variable.
20507         (open_in_zip): Use zipmember's length to accelerate the search for
20508         a member. If zipmember was NULL and zip file successfully read,
20509         return 0.
20510         * java-tree.h: New global variable current_jcf declared.  Added
20511         declaration for current_constant_pool_tags, current_constant_pool_data,
20512         current_constant_pool_length, current_constant_pool_data_ref.
20513         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20514         store the JCF of classes seen in a zip file) and tree *constant_pool
20515         (to save a loaded class constant pool). current_class declared here.
20516         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20517         retrieve method_ref_constant.
20518         (PUSHC): java_push_constant_from_pool now uses current_jcf.
20519         (OBJECT): get_class_constant now uses current_jcf.
20520         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20521         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20522         (expand_invoke): Now uses current_class instead of main_class
20523         (build_class_init): Now uses current_class instead of main_class
20524         * class.c: New static global variable registered_class.
20525         (register_class): New function.
20526         (emit_register_class): Modified to use registered_class instead of
20527         main_class
20528         (is_compiled_class): Now take into account class seen in the archive.
20529
20530 1997-10-06  Per Bothner  <bothner@cygnus.com>
20531
20532         * except.h:  Renamed to: java-except.h.
20533         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
20534         * except.c:  Add semi-working (commented out) implementation.
20535
20536         * expr.c (expand_iinc):  Add needed flush_quick_stack.
20537         * parse.c (set_source_filename):  New function.
20538         (give_name_to_class):  Set input_filename from package.classname.java.
20539
20540         * jcf-io.c (find_class):  Don't look first in ".".
20541
20542 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20543
20544         * zextract.c (read_zip_archive): Now takes into account the
20545         extra_field field.
20546         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20547
20548 1997-09-20  Per Bothner  <bothner@cygnus.com>
20549
20550         * constants.c, java-tree.h (build_internal_class_name):  New function.
20551         (alloc_class_constant):  Re-implement using build_internal_class_name.
20552         * class.c (make_class_data):  Likewise.
20553         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
20554
20555 1997-09-17  Per Bothner  <bothner@cygnus.com>
20556
20557         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
20558         to NULL before pushing an exception handler target.
20559
20560         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
20561         (java_stack_swap, java_stack_dup):  Re-write to be safe from
20562         clobbering registers.
20563         (build_class_init):  New function.
20564
20565 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20566
20567         * typeck.c (build_java_array_type): Temporary use
20568         permanent_obstack to create the array 'length' field.
20569         * expr.c (lookup_label): Temporay use permanent_obstack to create
20570         label if not found.
20571         * class.c (push_super_field): Tempory use permanent_obstack.
20572
20573 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20574
20575         * typeck.c (type_for_mode): Now handles double_type_node and
20576         float_type_node.
20577         * verify.c (verify_jvm_instructions): The instruction following
20578         the wide bytecode is checked. OPCODE_ret added to the list of
20579         wide.
20580
20581 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20582
20583         * class.c (make_class): Temporary use permanent_obstack. Set the
20584         class CLASS_P field to 1.
20585         (push_class): Temporary use permanent_obstack.
20586         (set_super_info): Temporary use permanent_obstack.
20587         (add_method): Temporary use permanent_obstack, set
20588         METHOD_TRANSIENT().
20589         (add_field): Temporary use permanent_obstack. Sets
20590         FIELD_VOLATILE() and FIELD_TRANSIENT().
20591         (build_class_ref): Temporary use permanent_obstack if the class
20592         isn't compiled.
20593         (build_static_field_ref): Temporary use permanent_obstack when
20594         creating field's rtl.
20595         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20596         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20597         and fields. Function finalized, as far as flag handling.
20598         (push_class_static_dummy_field): Temporary use permanent_obstack.
20599         (emit_register_class): Force generation of class registration at
20600         -O3 or deeper.
20601         * decl.c (end_java_method): Call permanent_allocation() before
20602         returning.
20603         * expr.c (can_widen_reference_to): Added comment to interface
20604         handling, fixed typo.
20605         (lookup_field): Now uses CLASS_P() to correct FIXME
20606         (expand_invoke): Verification on public && !static &&
20607         !abstract moved into soft_lookupinterfacemethod (kaffe).
20608         Use Object class dtable if objectref is an array when expanding
20609         invokeinterface.
20610         (java_push_constant_from_pool): Temporary use permanent_obstack
20611         for CONSTANT_string
20612         * parse.c (get_ref_constant): Temporary use permanent_obstack to
20613         create constant references.
20614         (get_constant): Temporary use permanent_obstack to create constant.
20615         (load_class): Temporary use permanent_obstack to load class.
20616         (jcf_parse): Temporary use permanent_obstack to perform class
20617         layout.
20618         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20619         (build_java_signature): Temporary use permanent_obstack.
20620         * verify.c: (verify_jvm_instruction): removed unnecessary verification
20621         on ACC_SUPER flag.
20622         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20623         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20624         (CLASS_P): Defined
20625
20626 1997-09-11  Per Bothner  <bothner@cygnus.com>
20627
20628         * class.c (append_gpp_mangled_type):  Fix typo.
20629         (emit_register_class):  Use main_class to get class object, rather
20630         than looking for no-longer-existing static decl starting with _CL.
20631         * typeck.c (parse_signature_type):  Promote array element type
20632         if it is a RECORD_TYPE.
20633
20634 1997-09-10  Per Bothner  <bothner@cygnus.com>
20635
20636         * class.c (push_class_static_dummy_field):  New function.
20637         (mangle_static_field):  New. Do G++-style mangling of static fields.
20638         (layout_class):  Mandle static fields here, not in add_field.
20639         (build_class_ref):  The class object is now a dummy static field.
20640         * decl.c (find_local_variable):  Look for best, instead of first match.
20641         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
20642         (build_java_athrow):  Don't check here if exception is Throwable.
20643         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
20644         (TYPE_USED):  Removed.  No longer used ...
20645         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
20646         * verify.c (push_pending_label):  New function.
20647         (push_pending_block):  Renamed to check_pending_block.
20648         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
20649         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
20650         re-checking possible handlers) after a store (less wasted work).
20651         Check for null handler (finally) before calling add_handler.
20652         Various changes to (finally?) correctly handle try/finally.
20653
20654 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
20655
20656         * class.c: Include stdio.h.
20657
20658 1997-09-04  Per Bothner  <bothner@cygnus.com>
20659
20660         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20661         to make sure class is initialized before static/special invoke.
20662
20663         * verify.c (verify_jvm_instructions):  On a store instruction,
20664         call find_local_variable to force pre-allocation of decl and rtx.
20665         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
20666
20667 1997-09-03  Per Bothner  <bothner@cygnus.com>
20668
20669         * class.c (build_class_ref):   Strip off "promoted_" if need be.
20670         (make_field_value): Call build_java_signature when needed.
20671         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
20672         * expr.c (build_java_athrow):  Don't push_value of exception.
20673         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
20674         match specification of [fd]cmp[lg] for NaNs.
20675         (expand_byte_code):  Add support for exception handler ranges.
20676         * except.c:  Add skeleton for EH code-generation.
20677         * verify.c (merge_types):  Treat all promoted integral types as equal.
20678         * constants.c (build_constants_constructor):  To force creation of
20679         current_constant_pool_data_ref, call build_constant_data_ref.
20680
20681         * javaop.def (lload):  Fix typo.
20682         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
20683
20684 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
20685
20686         * parse.c: Don't include function.h.
20687
20688 1997-08-27  Per Bothner  <bothner@cygnus.com>
20689
20690         * except.[ch]:  New files.
20691         * Makefile.in (JAVA_OBJS):  Add except.o
20692         * expr.c:  Temporary warning about unimplemented exceptions.
20693         * verify.c:  Verify exception handlers.
20694
20695         * jcf-dump.c (disassemble_method):  Print exception table.
20696
20697 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20698
20699         * expr.c (verify_jvm_instructions): Started a thorough
20700         verification of invoke* bytecodes.
20701         (expand_byte_code): flush quick stack if PC is the target of a
20702         branch.  and undef RET (conflicting with config/i386/i386.h).
20703         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
20704         used.
20705         (expand_invoke): Now handles invokeinterface and do more
20706         verification according to the bytecode.
20707         (lookup_field): Don't try to load the class if processing
20708         dtable_type.
20709         (can_widen_reference_to): Now handles interfaces.
20710         * decl.c (init_decl_processing): New global variable
20711         soft_lookupinterfacemethod_node, declared in java-tree.h.
20712         Call set_super_info on string_type_node.
20713         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
20714         defined.
20715         * class.c (set_super_info): Fills the CLASS_* flags according to
20716         access_flags.
20717         (get_access_flags_from_decl): Handles all class flags.
20718
20719 1997-08-26  Per Bothner  <bothner@cygnus.com>
20720
20721         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
20722         * parse.c (yyparse):  Check for abstract method, and missing code.
20723         * expr.c (expand_byte_code):  Change interface.
20724         * lang.c (put_decl_node):  Print promoted types prettier.
20725         * verify.c (verify_jvm_instruction):  Change interface.
20726         Partial support for scanning exception table.
20727         For load instructions, handle promoted integral types.
20728
20729 1997-08-21  Per Bothner  <bothner@cygnus.com>
20730
20731         * verify.c:  New file, with contents moved from expr.c.
20732         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
20733         * typeck.c (is_array_type_p):  Moved here from expr.c.
20734         * java-tree.h:  Add some now-needed function declarations.
20735         * Makefile.in (JAVA_OBJS): Added verify.o.
20736
20737 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20738
20739         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20740         METHOD_ABSTRACT flag.
20741
20742         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
20743         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
20744         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
20745
20746         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20747         variables.
20748         (start_java_method): Hook for SYNCHRONIZED methods.
20749
20750         * expr.c (build_java_jsr, build_java_ret): New functions
20751         (JSR,PRE): New macros
20752         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
20753         (verify_jvm_instructions): tableswitch, lookupswitch,
20754         monitorenter, monitorexit, goto_w: verified.
20755         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
20756         (build_java_monitor): New function.
20757         (MONITOR_OPERATION): Modified to call build_java_monitor()
20758         (verify_jvm_instructions): Started a thorough verification of
20759         invoke* bytecodes.
20760
20761 1997-08-19  Per Bothner  <bothner@cygnus.com>
20762
20763         Support verification of jsr/ret subroutines (used for try/finally).
20764         * decl.c (return_address_type_node):  New type node.
20765         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
20766         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
20767         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
20768         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
20769         TYPE_USED):  New macros for special types in type_map.
20770
20771         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
20772         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
20773         BCODE_JUMP_TARGET.
20774         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
20775
20776         * expr.c (can_widen_reference_to):  New function.
20777         (pop_type):  Use it.
20778         (merge_type_state):  Support handling start of subroutine.
20779         (push_pending_block):  Return char* error message, instead of calling
20780         fatal on an error.  Also handle subroutines.
20781         (verify_jvm_instructions):  Handle errors from push_poending_block.
20782         Support jsr and ret instructions.
20783
20784 1997-08-19  Per Bothner  <bothner@cygnus.com>
20785
20786         * jcf-io.c (find_classfile):  Fix thinko.
20787         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
20788
20789 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
20790
20791         * Makefile.in (BISON): Remove.
20792
20793 1997-08-07  Per Bothner  <bothner@cygnus.com>
20794
20795         * Makefile.in:  Convert to autoconf.
20796         * config-lang.in (outputs):  Added java/Makefile.
20797
20798         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20799         Rename cc1java to jc1.
20800
20801         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
20802         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
20803
20804         * class.c (class_depth):  Do load_class if needed.
20805
20806         Mostly better verification.
20807         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
20808         (init_decl_processing):  Change return type of soft_checkcast.
20809         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
20810         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
20811         lang_print_error):  New functions.
20812         (lang_init):  Set global hook print_error_function to lang_print_error.
20813         * expr.c:  In the type_map ptr_type_node is only used for null now.
20814         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
20815         (merge_types):  Dererence pointer to record types before comparing.
20816         (decode_newarray_type, merge_types):  On error just return NULL.
20817         (build_java_binop):  Add preliminary implementation (with warning)
20818         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
20819         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
20820         (expand_compare, expand_java_goto, expand_java_call):  Don't
20821         push_pending_block, since that only makes sense when verifying.
20822         (merge_type_state):  Different return codes.
20823         (push_pending_block):  A block may need to be verified more than once.
20824         (expand_byte_code):  Warn about unused code at code generation time.
20825         (verify_jvm_instruction):  Changed logic, since code may need to be
20826         re-verified if type-state has changed.  Also, better error handling.
20827         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
20828         Improve newarray, anewarray, ?aload, athrow,
20829         * java-tree.h (LABEL_CHANGED):  New macro.
20830
20831 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20832
20833         * decl.c (soft_athrow_node): New global variable initialized.
20834         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
20835         * typeck.c (convert): Added support for REAL_TYPE.
20836         (convert_to_char): New function.
20837         (convert): Handle CHAR_TYPE.
20838         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
20839         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
20840         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
20841         promoted type.
20842         (verify_jvm_instructions): Added break a the end of bogus unop: label.
20843         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
20844         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
20845         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
20846         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
20847         to Use The Right Things.
20848         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
20849         compatible with INT. BOOLEAN is made equivalent to BYTE.
20850         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
20851         OPCODE_ifnonnull): Now supported.
20852         (build_java_athrow): New function.
20853
20854 1997-08-04  Per Bothner  <bothner@cygnus.com>
20855
20856         Rename method name <init> to match G++ (and fix mangling).
20857         * class.c (layout_class):  Replace method name of <init> by class name.
20858         (make_method_value):  Do inverse renaming of constructor from <init>.
20859         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
20860         * typeck.c (lookup_java_constructor):  New function.
20861         * expr.c (expand_invoke):  If method_name is <init>, call
20862         lookup_java_constructor to find constructor.
20863
20864         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
20865
20866 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20867
20868         * parse.c (get_class_constant): Modified to handle array "classes"
20869         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
20870         wide type.
20871         (convert): Modified to handle real type.
20872         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
20873         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
20874         variables declared.
20875         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
20876         soft_multianewarray, soft_newarray_node, soft_throw_node): New
20877         global variables initialized.
20878         (find_local_variable): Handles the case of a pointer
20879         (end_java_method): Restore the use of one more scope
20880         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
20881         build_java_array_length_access, expand_java_arrayload,
20882         expand_java_arraystore, expand_java_array_length,
20883         expand_java_multianewarray, expand_java_anewarray,
20884         build_java_check_indexed_type, is_array_type_p,
20885         build_java_throw_out_of_bound_exception): New functions.
20886         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
20887         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
20888         OPCODE_<t>aload): Implemented code for verification.
20889         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
20890         ARRAY_NEW_MULTI): Macro defined.
20891         (CONVERT): Modified to invoke convert().
20892         (case OPCODE_aload2): Fixed index typo from 2 to 1.
20893
20894 1997-07-31  Per Bothner  <bothner@cygnus.com>
20895
20896         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
20897         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
20898         (make_class_data):  Field name needs '/' as package prefix.
20899         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
20900
20901 1997-07-25  Per Bothner  <bothner@cygnus.com>
20902
20903         Implement debug information for local variables.
20904         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
20905         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
20906         DECL_LOCAL_SLOT_CHAIN):  New macros.
20907         (struct lang_decl_var):  New type.
20908         * parse.c (give_name_to_locals):  Move to decl.c.
20909         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
20910         (start_java_method):  Re-write parameter handling.
20911         (pending_local_decls):  New global variable.
20912         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
20913         (find_local_variable):  Accept pc so we can skips decls not in range.
20914         (struct binding_level):  Add end_pc field.
20915         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
20916         (various):  Change so current pc gets passed to find_local_variable.
20917
20918         * decl.c (init_decl_processing):  Re-arrange fields in
20919         class_type_node and and method_type_node to match kaffe 0.9.1.
20920         * class.c (make_method_value, make_class_data):  Update
20921         initializations to match.
20922
20923 1997-07-16  Per Bothner  <bothner@cygnus.com>
20924
20925         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
20926         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
20927         (push_super_field):  New function.
20928         (make_class_data):  Handle inheritance of class static initializer.
20929         (layout_class):  New name mangling.
20930         * constants.c (build_constant_data_ref):  Init type of data array
20931         to a one-element array.
20932         (build_constants_constructor):  Set DECL_SIZE from complete array type.
20933         * decl.c:  Rename class_type, object_type etc to class_type_node,
20934         object_type_node etc.  Make former inherit from latter.
20935         * expr.c (expand_invoke):  Add cast of function address.
20936         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
20937         * parse.c (yyparse):  Don't call layout_class here.
20938         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
20939
20940 1997-06-14  Per Bothner  <bothner@cygnus.com>
20941
20942         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
20943         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
20944         (alloc_class_constant):  New.
20945         * expr.c (expand_invoke):  Make sure method's class is initialized.
20946         * class.c (interits_from_p, emit_register_class):  New functions.
20947         * parse.c (yyparse):  Call emit_register_class.
20948
20949 1997-06-09  Per Bothner  <bothner@cygnus.com>
20950
20951         * constants.c:  New file, to handle constant pool.
20952         * Makefile.in (JAVA_OBJS):  Add constants.o.
20953         * decl.c (init_decl_processing):  Update, fix, finish various structs.
20954         (pushdecl_top_level):  New.
20955         * parse.c (layout_class):  Moved to class.c.
20956         * expr.c (java_push_constant_from_pool):  New function.
20957         * class.c (build_class_ref):  Make work fully
20958         (make_class_data):  Emit super-class, constant pool, interface vector.
20959
20960 1997-06-03  Per Bothner  <bothner@cygnus.com>
20961
20962         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
20963         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
20964         * class.c (class_depth):  New function.
20965         (lookup_named_class):  Replaced by new function lookup_class.
20966         * decl.c (object_type_node, string_type_node):  New.
20967         Remove various types that we no longer need.
20968         * expr.c (verify_jvm_instructions):  New separate verifier pass.
20969         (push_type, pop_type):  New functions for verifier.
20970         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
20971         (expand_byte_code):  Simplify, since we assume already verified.
20972         (expand_invoke):  Now mostly works.
20973         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
20974         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
20975         * parse.c:  Wait to allocate class object until we know its name.
20976         (layout_class):  Calculate DECL_VINDEX for each virtual method.
20977         * typeck.c (get_array_type):  Rename to ...
20978         (build_java_array_type):  ... and provide working implementation.
20979         (build_java_signature):  New function - build Java signature of type.
20980         (set_java_signature):  New function - cache signature with type.
20981         (lookup_java_method):  New function.
20982
20983 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
20984
20985         * class.c (ident_subst):  Take extra SUFFIX parameter.
20986         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
20987         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
20988         (build_class_ref):  Actually implement.
20989         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
20990         * decl.c (builtin_function):  New.
20991         (init_decl_processing):  Update for current Kaffe.  Declare some
20992         builtin Kaffe functions.
20993         * expr.c (build_address_of):  New.
20994         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
20995         Renamed (from expand_java_new etc), and added working implementations.
20996         (build_field_ref):  Now also handle static fields.
20997         (expand_invoke):  Implement invokestatic, and start implement rest.
20998         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
20999         * javaop.def:  Rename invokevirt -> invokevirtual.
21000         * lang.c (use_handles):  Removed.
21001         * parse.c:  Add support for ConstantValue attribute.
21002         Handle nested loading of a class.  (JPOOL_UTF):  New.
21003
21004 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
21005
21006         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
21007
21008 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
21009
21010         * Make-lang.in (java.install-man):  New empty rule.
21011         * typeck.c (set_local_type):  New function.
21012         * expr.c (STORE_INTERNAL):  Call find_local_variable,
21013         not find_stack_slot.  Call set_local_type.
21014
21015 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
21016
21017         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
21018         and building RECORD_TYPE CONSTRUCTORs.
21019         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21020
21021         * lang.c (use_handles):  Change the default to 0.
21022         * decl.c:  Define and build class_type, field_type, utf8const_type.
21023         * class.c (make_class_data, make_field_value,
21024         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21025         hashUtf8String, strLengthUtf8, mangled_classname:
21026         Functions to build reflective data structures.
21027         * parse.c (yyparse):  Call make_class_data.
21028
21029         * jcf-io.c (open_class, find_classfile):  New functions.
21030         * jcf-dump.c:  Support reading classfile from explicitly-named
21031         class file (without CLASSPATH searching).
21032
21033 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21034
21035         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
21036         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21037         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21038         (get_constant):  Now trivial for CONSTANT_Utf8.
21039
21040         * jcf.h:  Make NEW_CPOOL the default.
21041         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
21042
21043 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21044
21045         New directory.