OSDN Git Service

PR java/17265
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
2
3         PR java/17265
4         * class.c (make_local_function_alias): Revert 2004-08-18 change.
5         (make_method_value): Likewise.
6
7 2004-10-21  Andrew Haley  <aph@redhat.com>
8
9         PR java/18091:
10         * jcf-parse.c (set_source_filename): Add code to build new sfname.
11
12 2004-10-20  Andrew Haley  <aph@redhat.com>
13
14         * decl.c (end_java_method): Don't expand if flag_syntax_only.
15         Remove duplicated code block.
16
17 2004-10-18  Steven Bosscher  <stevenb@suse.de>
18
19         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
20         New rules to work around old Bison warnings.
21
22 2004-10-17  Steven Bosscher  <stevenb@suse.de>
23
24         * class.c (ident_subst): Always alloca buffer.
25         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
26         opcode after including javaop.def.
27         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
28         conditional expression that exits, to avoid warnings.
29         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
30         a user of an extension.
31         * win32-host.c: Move check down to have non-empty file when
32         WIN32 is not defined.
33
34         * Make-lang.in (java-warn): Add STRICT_WARN.
35         (java/jcf-io.o-warn): Don't have Werror for this file.
36         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
37
38 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
39
40         * expr.c (expr_add_location): Move declaration to before all
41         statements.
42         * parse.y (java_expand_classes): Ditto.
43         * lex.c (java_peek_unicode): Ditto.
44
45 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
46
47         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
48         if possible, else convert `foo' to 'foo'.
49         * class.c: Likewise.
50         * decl.c: Likewise.
51         * expr.c: Likewise.
52         * jcf-io.c: Likewise.
53         * jcf-parse.c: Likewise.
54         * lang.c: Likewise.
55         * lex.c: Likewise.
56         * parse.h: Likewise.
57
58 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
59
60         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
61         rename parameter 'msg' to 'msgid' in function declaration.
62         (issue_warning_error_from_context): Likewise.
63         (yyerror): Rename parameter 'msg' to 'msgid'.
64         (all over): Use new quoting style for diagnostics.
65
66 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
67
68         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
69         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
70         Update copyright.
71
72 2004-10-14  Matt Austern  <austern@apple.com>
73
74         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
75         pointer_set_t* now.
76         
77 2004-10-13  Tom Tromey  <tromey@redhat.com>
78
79         PR java/15578:
80         * lang.opt (--extdirs): Document.
81         * jvspec.c (lang_specific_driver): Recognize -encoding and
82         -extdirs.
83
84 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
85
86         * parse.y (issue_warning_error_from_context): Use va_list *
87         instead of va_list parameter.
88         (parse_error_context): Update call.
89         (parse_warning_context): Likewise.
90
91 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
92
93         * parse.y, parse-scan.y: Add list of diagnostic messages to
94         insulate translation template from version of yacc/bison used
95         to compile the grammar.
96
97 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
98
99         Prepare for %q, %< and %> in diagnostic message strings.
100         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
101         Name second parameter 'msgid'.
102         * parse.y: Additionally include pretty-print.h and diagnostic.h.
103         (issue_warning_error_from_context): Use pretty-printer functions
104         instead of vsprintf for constructing formatted messages. Rename
105         parameter 'msg' to 'msgid'.
106         (parse_error_context): Rename parameter 'msg' to 'msgid'.
107         (parse_warning_context): Likewise.
108
109 2004-10-05  Andrew Haley  <aph@redhat.com>
110
111         PR java/17779
112         * jcf-parse.c (parse_zip_file_entries): If a class has a
113         superclass and a TYPE_SIZE of zero, lay it out.
114
115 2004-09-30  Andrew Haley  <aph@redhat.com>
116
117         PR java/17733
118         * jcf-parse.c (compute_class_name): Rewrite.
119
120 2004-10-01  Jan Hubicka  <jh@suse.cz>
121
122         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
123
124 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
125
126         * lex.c: Fix a comment typo.
127
128 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
129
130         * java-tree.h: Fix a comment typo.
131
132 2004-09-30  Per Bothner  <per@bothner.com>
133
134         Simplify lexer.  Implement --enable-mapped-location support.
135         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
136         (parse_source_file_1): Pass filename as extra parameter, so we can call
137         linemap_add and set input_location here, rather than in both callers.
138         (read_class): Pass copied filename to parse_source_file_1.
139         Don't initialize wfl_operator - only needed for source compilation.
140         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
141         * lex.h:  Remove a bunch of debugging macros.
142         * lex.h (struct_java_line, struct java_error):  Remove types.
143         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
144         (struct java_lc_s):  Remove prev_col field.
145         (struct java_lexer):  New fields next_unicode, next_columns, and
146         avail_unicode.  New position field, and maybe token_start field.
147         Don't need hit_eof field - use next_unicode == -1 instead.
148         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
149         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
150         * parse.h:  Various changes for USE_MAPPED_LOCATION.
151         (EXPR_WFL_EMIT_LINE_NOTE): XXX
152         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
153         (struct parser_ctxt):  New file_start_location field.
154         Remove p_line, c_line fields since we no longer save lines.
155         Remove elc, lineno, and current_jcf fields - no longer used.
156         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
157         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
158         source_location and is probably not needed anymore anyway.
159         Use new expr_add_Location function.
160         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
161         (java_pop_parser_context):  Minor cleanup.
162         (java_parser_context_save_global, java_parser_context_restore_global,
163         java_pop_parser_context):  Save/restore input_location as a unit.
164         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
165         a source_location instead of a wfl context node.
166         (check_class_interface_creation):  input_filename is not addressable.
167         (create_artificial_method):  Calling java_parser_context_save_global
168         and java_parser_context_restore_global is overkill.  Instead,
169         temporarily set input_location from class decl.
170         (java_layout_seen_class_methods): Set input_location from method decl.
171         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
172         (finish_loop_body):  Likewise.
173         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
174         (java_sprint_unicode):  Take a character, not index in line.
175         (java_sneak_uncode):  Replaced by java_peek_unicode.
176         (java_unget_unicode):  No longer used.
177         (java_allocate_new_line. java_store_unicode):  Removed, since we
178         no longer remember "lines".
179         (java_new_lexer):  Update for new data structures.
180         (java_read_char):  Move unget_value checking to java_read_unicode.
181         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
182         efficient functions that are used directly when lexing.
183         (java_read_unicode_collapsing_terminators):  No longer needed.
184         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
185         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
186         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
187         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
188         combine switch branches, and test for common token kinds earlier.
189         (java_lex_error):  Rewrite.
190         * jv-scan.c (expand_location): New function, copied from tree.c.
191         (main): Set ctxp->filename instead of setting input_filename directly.
192
193 2004-09-30  Per Bothner  <per@bothner.com>
194
195         More cleanup for --enable-mapped-location.
196         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
197         input_location here.  Instead do it in give_name_to_class.
198         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
199         * expr.c (expand_byte_code): Call linemap_line_start.
200         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
201         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
202         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
203         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
204         to USE_MAPPED_LOCATION case.
205
206         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
207         * jcf-parse.c (java_parse_file): Don't set input_filename.
208         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
209         Create a list of TRANSLATION_UNIT_DECL.
210         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
211         reason is so we can set a DECL_SOURCE_LOCATION for each file.
212         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
213         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
214         (file_start_location):  New static.
215         (set_source_filename):  Avoid extra access to input_filename macro.
216         Concatenate new name with class's package prefix.
217         (set_source_filename, give_name_to_class): Update.
218         (give_name_to_class):  Set class's "line 0" input_location here.
219         (parse_class_file):  Set input_location as a unit.
220
221         * jcf-parse.c (load_class): Sanity test if missing inner class file.
222
223 2004-09-29  Per Bothner  <per@bothner.com>
224
225         * java-tree.h:  Redefine some macros and add some declaration
226         to handle the USE_MAPPED_LOCATION case.
227         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
228         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
229         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
230         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
231
232         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
233         * decl.c (finish_method, java_add_stmt): Likewise.
234         * java-gimplify.c (java-gimplify.c):  Likewise.
235         * jcf-write.c (generate_bytecode_insns):  Likewise.
236         * lang.c (java_post_options): Likewise - call linemap_add.
237
238 2004-09-29  Andrew Haley  <aph@redhat.com>
239
240         PR java/17007
241         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
242         result of TRUNC_MOD_EXPR.
243         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
244         * decl.c (java_init_decl_processing): Mark
245         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
246
247 2004-09-28  Tom Tromey  <tromey@redhat.com>
248
249         PR java/15710:
250         * class.c (add_miranda_methods): Load superinterface if not
251         already loaded.
252
253 2004-09-28  Andrew Haley  <aph@redhat.com>
254
255         PR java/17586
256         * jcf-parse.c (load_class): Don't try to read a class that we've
257         already read.
258
259 2004-09-28  Andrew Haley  <aph@redhat.com>
260
261         * jcf-parse.c (load_class): Back out previous broken patch.
262
263 2004-09-28  Andrew Haley  <aph@redhat.com>
264
265         PR java/17586
266         * jcf-parse.c (load_class): Don't try to read a class that we've
267         already read.
268         Check that we really did read the right class.
269
270 2004-09-25  Tom Tromey  <tromey@redhat.com>
271
272         PR java/17500:
273         * parse.y (create_artificial_method): Use add_method_1.
274
275 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
276
277         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
278         comment typos.
279         * gcj.texi: Fix typos.
280
281 2004-09-24  Tom Tromey  <tromey@redhat.com>
282
283         PR java/15656:
284         * parse.y (class_instance_creation_expression): Set `$$' to NULL
285         in error parts of rule.
286         (unary_expression): Don't call error_if_numeric_overflow when $1
287         is NULL.
288
289 2004-09-24  Tom Tromey  <tromey@redhat.com>
290
291         PR java/16789:
292         * parse.y (resolve_qualified_expression_name): Set
293         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
294         * expr.c (force_evaluation_order): Check for empty argument list
295         after stripping COMPOUND_EXPR.
296
297 2004-09-23  Andrew Haley  <aph@redhat.com>
298
299         PR java/16927:
300         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
301         COND_EXPRs.
302
303 2004-09-23  Tom Tromey  <tromey@redhat.com>
304
305         PR java/17329:
306         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
307         where operand is null.
308
309 2004-09-23  Tom Tromey  <tromey@redhat.com>
310
311         PR java/17380:
312         * parse.y (not_accessible_p): Allow access to protected members
313         even when class is not static.
314
315 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
316
317         * Make-lang.in: Revert the gcc-none.o change.
318
319 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
320
321         * parse.y (patch_anonymous_class): VEC_space returns true if there
322         is space.
323
324 2004-09-21  Matt Austern  <austern@apple.com>
325
326         Fix bootstrap.
327         * gjavah.c (free_method_name_list): Fix function definition so
328         it's a proper C prototype.
329
330 2004-09-21  Tom Tromey  <tromey@redhat.com>
331
332         PR java/17575:
333         * gjavah.c (free_method_name_list): New method.
334         (main): Call it.
335
336 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
337             Zack Weinberg  <zack@codesourcery.com>
338
339         * java-tree.def: Use tree_code_class enumeration constants
340         instead of code letters.
341         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
342         new tree-class enumeration constants.
343
344 2004-09-13  Tom Tromey  <tromey@redhat.com>
345
346         PR java/17216:
347         * class.c (layout_class_method): Put synthetic methods into the
348         vtable.
349
350 2004-09-11  Andrew Pinski  <apinski@apple.com>
351
352         * Make-lang.in (java/ggc-none.c): Change dependency
353         for ggc.h into $(GGC_H).
354
355 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
356
357         * Make-lang.in (java/win32-host.o): Add dependency on
358         coretypes.h.
359         * win32-host.c: Add includes for coretypes.h, jcf.h
360
361 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
362
363         * Make-lang.in (GCJH_OBJS): Change dependency from
364         ggc-none.o to java/ggc-none.o
365         (JCFDUMP_OBJS): Likewise.
366         (java/ggc-none.o): New target.
367
368 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
369
370         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
371         * class.c (build_utf8_ref, build_static_field_ref,
372         make_field_value, make_method_value, get_dispatch_table,
373         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
374         * constants.c (get_tag_node, build_ref_from_constant_pool,
375         build_constants_constructor): Likewise.
376         * decl.c (java_init_decl_processing): Likewise.
377         * expr.c (build_java_array_length_access, build_newarray,
378         expand_java_multianewarray, expand_java_pushc, expand_iinc,
379         build_java_binop, build_field_ref, expand_java_add_case,
380         expand_java_call, build_known_method_ref, build_invokevirtual,
381         build_invokeinterface, build_jni_stub): Likewise.
382         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
383         * jcf-parse.c (get_constant): Likewise.
384         * lex.c (do_java_lex): Likewise.
385         * parse.y (patch_binop, patch_unaryop, patch_cast,
386         build_newarray_node, patch_newarray): Likewise.
387         * resource.c (compile_resource_data): Likewise.
388         * typeck.c (build_prim_array_type): Likewise.
389
390 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
391
392         * decl.c (java_init_decl_processing): Adjust
393         initialize_sizetypes call.
394
395 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
396
397         * jv-scan.c (fancy_abort): Add.
398
399 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
400
401         * expr.c (build_java_arrayaccess): Use convert to change
402         len's type.
403
404 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
405
406         * class.c (make_local_function_alias): Allocate extra space for 'L'
407         in name buffer. Reported by Thomas Neumann.
408
409 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
410
411         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
412         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
413         * lex.c (do_java_lex): Adjust.
414         (error_if_numeric_overflow): Likewise.
415
416 2004-08-18  Andrew Pinski  <apinski@apple.com>
417
418         * class.c (make_local_function_alias): Only make a new decl if we
419         support alias attribute on all decls.
420
421 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
422
423         * class.c (make_local_function_alias): New function. Create local
424         alias for public method DECL.
425         (make_method_value): Use make_local_function_alias.
426         * parse.y (craft_constructor): Don't special-case anonymous classes.
427         Always set ctor_name to init_identifier_node.
428         (lookup_method_invoke): Call layout_class_method when creating
429         anonymous class constructor.
430
431 2004-08-18  Richard Henderson  <rth@redhat.com>
432
433         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
434         default case.  Treat '<' similarly.  Update for
435         is_gimple_formal_tmp_var name change.
436
437 2004-08-17  Andrew Haley  <aph@redhat.com>
438
439         * lang.c (lang_printable_name): Obey verbose flag.
440         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
441         lang_printable_name().
442         (verify_constructor_circularity, get_printable_method_name,
443         check_abstract_method_definitions, java_check_regular_methods,
444         java_check_abstract_methods, check_inner_class_access,
445         fix_constructors, patch_method_invocation, patch_return):
446         Likewise.
447         * expr.c (pop_type_0): Likewise.
448
449         * java-tree.h (lang_printable_name_wls): Delete.
450
451 2004-08-16  Tom Tromey  <tromey@redhat.com>
452
453         PR java/8473:
454         * parse.y (primary): Changed for initialized and uninitialized
455         array creations.
456         (array_access): Handle array_creation_initialized.
457         (array_creation_expression): Split into
458         array_creation_initialized and array_creation_uninitialized.
459
460 2004-08-16  Andrew Haley  <aph@redhat.com>
461
462         * jcf-write.c (find_constant_index): Canonicalize NaNs when
463         generating bytecode.
464
465 2004-08-16  Elliot Lee <sopwith@redhat.com>
466
467         PR java/9677
468         * jcf-parse.c (java_parse_file): Handle filenames with embedded
469         spaces, and quoted filelists.
470
471 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
472
473         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
474         * class.c (build_utf8_ref, build_static_field_ref,
475         make_field_value, make_method_value, get_dispatch_table,
476         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
477         * constants.c (get_tag_node,  build_ref_from_constant_pool,
478         build_constants_constructor): Likewise.
479         * decl.c (java_init_decl_processing): Likewise.
480         * expr.c (build_java_array_length_access, build_newarray,
481         expand_java_multianewarray, expand_java_pushc, expand_iinc,
482         build_java_binop, build_field_ref, expand_java_add_case,
483         expand_java_call, build_known_method_ref, build_invokevirtual,
484         build_invokeinterface, build_jni_stub): Likewise.
485         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
486         * jcf-parse.c (get_constant): Likewise.
487         * lex.c (do_java_lex): Likewise.
488         * parse.y (patch_binop, patch_unaryop, patch_cast,
489         build_null_of_type, patch_newarray): Likewise.
490         * resource.c (compile_resource_data): Likewise.
491         * typeck.c (build_prim_array_type): Likewise.
492
493 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
494
495         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
496         Don't create BLOCK here or call java_gimplify_block.
497
498 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
499
500         * java-tree.h (flag_deprecated): Removed.
501         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
502         * parse.y (check_deprecation): Check warn_deprecated instead of
503         flag_deprecated.
504
505 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
506
507         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
508         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
509         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
510         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
511         flag_force_classes_archive_check, flag_optimize_sci,
512         flag_indirect_dispatch): Remove explicit declarations.
513         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
514         final comment.
515
516 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
517
518         PR bootstrap/14893
519         * Make-lang.in (java.install-man): Install from either build
520         tree or source tree, whichever has the file first.
521
522 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
523
524         * jcf-parse.c (get_constant): Adjust force_fit_type call.
525         * lex.h (SET_LVAL_NODE_TYPE): Remove.
526         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
527         (do_java_lex): Likewise. Adjust force_fit_type call.
528
529 2004-08-04  Roger Sayle  <roger@eyesopen.com>
530             Andrew Haley  <aph@redhat.com>
531
532         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
533         checking trees as they're being built.
534         (convert): Call convert_ieee_real_to_integer if we're
535         converting a constant, even if we're writing a class file.
536
537 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
538
539         PR java/16701
540         * parse.y (fold_constant_for_init): Call resolve_field_access with
541         correct current_class context.
542
543 2004-08-01  Roger Sayle  <roger@eyesopen.com>
544
545         * decl.c (update_aliases, initialize_local_variable): Replace calls
546         to build with calls to buildN.
547         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
548         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
549         * parse.h (BUILD_THROW): Likewise.
550         * parse.y (switch_expression, synchronized_statement,
551         catch_clause_parameter, array_creation_expression,
552         conditional_expression, make_qualified_name,
553         resolve_qualified_expression_name, patch_method_invocation,
554         patch_invoke, build_method_invocation, build_new_invocation,
555         build_assignment, patch_assignment, build_binop, patch_binop,
556         build_string_concatenation, build_incdec, patch_unaryop,
557         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
558         patch_return, build_if_else_statement, build_labeled_block,
559         build_new_loop, build_loop_body, build_bc_statement,
560         build_assertion, encapsulate_with_try_catch, build_try_statement,
561         build_try_finally_statement, patch_synchronized_statement,
562         emit_test_initialization): Likewise, replace build with buildN.
563
564 2004-07-28  Eric Christopher  <echristo@redhat.com>
565
566         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
567         (java_unsafe_for_reeval): Ditto.
568
569 2004-07-26    <hp@bitrange.com>
570
571         * parse.y (build_super_invocation): Adjust declaration order to
572         avoid declaration after statement.
573
574 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
575
576         * decl.c: Rename all identifiers named `class' to `cl'.
577
578 2004-07-25  Richard Henderson  <rth@redhat.com>
579
580         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
581
582 2004-07-23  Mike Stump  <mrs@apple.com>
583
584         * boehm.c (set_bit): Improve type safety wrt unsignedness.
585         * gjavah.c (throwable_p, decode_signature_piece,
586         print_full_cxx_name, print_include, add_namelet, add_class_decl,
587         process_file): Likewise.
588         * jcf-dump.c (main): Likewise.
589         * jcf-io.c (read_zip_member): Likewise.
590         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
591         give_name_to_class, get_class_constant): Likewise.
592         * jcf-write.c (find_constant_wide, push_long_const,
593         generate_classfile): Likewise.
594         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
595         * parse.y (read_import_dir): Likewise.
596         * typeck.c (parse_signature_type): Likewise.
597         * verify.c (verify_jvm_instructions): Likewise.
598         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
599
600 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
601
602         * Make-lang.in: Replace rmic and rmiregistry references with
603         grmic and grmiregistry.
604         * gcj.texi: Likewise.
605
606 2004-07-20  Andrew Haley  <aph@redhat.com>
607
608         PR java/16431.
609         * verify.c (verify_jvm_instructions): Comment change only.
610
611         * typeck.c (build_java_array_type): Add size field to array name.
612
613         * java-tree.h (LOCAL_SLOT_P): New.
614         (update_aliases): Add PC argument.
615         (pushdecl_function_level): New function.
616
617         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
618         MODIFY_EXPR, and SAVE_EXPR.
619         (java_gimplify_modify_expr): New function.
620
621         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
622         (expand_iinc): Pass PC to update_aliases().
623         (STORE_INTERNAL): Likewise.
624         (process_jvm_instruction): Likewise.
625
626         * decl.c (base_decl_map): New variable.
627         (uniq): New variable.
628         (update_aliases): Rewrite with more thorough checking.
629         (debug_variable_p): New function.
630         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
631         (check_local_named_variable): Delete whole function.
632         (initialize_local_variable): New function.
633         (check_local_unnamed_variable): Add checks and comments.
634         (find_local_variable): Rewrite.
635         (java_replace_reference): New function.
636         (function_binding_level): New variable.
637         (pushdecl_function_level): New function.
638         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
639         (maybe_pushlevels): Call pushdecl() on each of the new decls.
640         (start_java_method): Reset uniq.  Create base_decl_map.  Set
641         function_binding_level.
642         (end_java_method): Null unused fields to save memory.
643
644 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
645
646         * class.c (add_interface_do): Remove.
647         (set_super_info, interface_of_p, maybe_add_interface,
648         add_interface, make_class_data, layout_class,
649         add_miranda_methods): Adjust BINFO accessors and addition.
650         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
651         accessors.
652         * jcf-write.c (generate_classfile): Likewise.
653         * parse.y (patch_anonymous_class, check_inner_circular_reference,
654         check_circular_reference, java_complete_class,
655         check_abstract_method_definitions,
656         java_check_abstract_method_definitions,
657         check_interface_throws_clauses, java_check_abstract_methods,
658         lookup_java_interface_method2,
659         find_applicable_accessible_methods_list): Adjust BINFO accessors
660         and addition.
661         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
662
663 2004-07-18  Roger Sayle  <roger@eyesopen.com>
664
665         * builtins.c (max_builtin, min_builtin,
666         java_build_function_call_expr): Replace calls to build with buildN.
667         * class.c (build_class_ref, build_static_field_ref,
668         get_dispatch_table, make_class_data, layout_class_method): Likewise.
669         * constants.c (build_ref_from_constant_pool): Likewise.
670         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
671         add_stmt_to_compound): Likewise.
672         * except.c (build_exception_object_ref, expand_end_java_handler):
673         Likewise.
674         * java-gimplify.c (java_gimplify_case_expr,
675         java_gimplify_default_expr, java_gimplify_block,
676         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
677         * jcf-write.c (generate_bytecode_insns): Likewise.
678         * typeck.c (convert_ieee_real_to_integer): Likewise.
679
680 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
681
682         * java-tree.h (builtin_function): Declare.
683
684 2004-07-16  Steven Bosscher  <stevenb@suse.de>
685
686         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
687         abuse restore_line_number_status.
688
689 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
690
691         g++/15861
692         * jcf-parse.c (java_emit_static_constructor): Specify default
693         priority.
694
695 2004-07-13  Per Bothner  <per@bothner.com>
696
697         * java-tree.h (all_class_filename):  Remove useless macro.
698         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
699         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
700         * parse.y (java_parser_context_restore_global):  Replace
701         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
702         * jcf-parse.c (read_class, java_parse_file):  Likewise.
703
704 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
705
706         PR java/16474
707         gjavah.c (print_field_info): Emit constant only if field is static.
708
709 2004-07-11  Roger Sayle  <roger@eyesopen.com>
710
711         * expr.c (java_truthvalue_conversion, flush_quick_stack,
712         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
713         build_java_ret, build_java_throw_out_of_bounds_exception,
714         build_java_array_length_access, java_check_reference,
715         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
716         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
717         expand_java_arrayload, build_java_monitor, expand_java_return,
718         expand_load_internal, expand_java_NEW, build_get_class,
719         build_instanceof, expand_java_CHECKCAST, expand_iinc,
720         build_java_soft_divmod, build_java_binop, build_field_ref,
721         expand_compare, expand_java_goto, expand_java_switch,
722         expand_java_add_case, build_class_init, build_known_method_ref,
723         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
724         expand_invoke, build_jni_stub, expand_java_field_op,
725         java_expand_expr, expand_byte_code, STORE_INTERNAL,
726         force_evaluation_order, emit_init_test_initialization): Convert
727         calls to "build" into calls to the prefered "buildN" functions.
728
729 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
730
731         * java-tree.h (set_block): Remove.
732         * lang.c (java_clear_binding_stack): New.
733         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
734         * decl.c (struct binding_level): Remove this_block.
735         (clear_binding_level): Likewise.
736         (poplevel): Don't handle this_block.
737         (set_block): Remove.
738
739 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
740
741         * class.c (common_enclosing_context_p): Remove statement with no
742         side-effects.
743
744 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
745
746         PR java/8618
747         * parse.y (create_anonymous_class): Remove 'location' argument. Use
748         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
749         (craft_constructor): Inherit access flags for implicit constructor
750         from the enclosing class.
751         (create_class): Fix comment typo.
752         (resolve_qualified_expression_name): Pass type of qualifier to
753         not_accessible_p, not the type in which target field was found.
754         (not_accessible_p): Handle inner classes. Expand protected
755         qualifier-subtype check to enclosing instances, but don't apply this
756         check to static members. Allow protected access to inner classes
757         of a subtype. Allow private access within common enclosing context.
758         (build_super_invocation): Get WFL line number info from current
759         class decl.
760         (build_incomplete_class_ref): Update for new create_anonymous_class
761         signature.
762         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
763         common_enclosing_instance_p.
764         * class.c (common_enclosing_context_p): New. Determine if types
765         share a common enclosing context, even across static contexts.
766         (common_enclosing_instance_p): Renamed from
767         common_enclosing_context_p. Determines if types share a common
768         non-static enclosing instance.
769         * java-tree.h (common_enclosing_instance_p): Declare.
770         * jcf-write.c (get_method_access_flags): New. Surpress private flag
771         for inner class constructors.
772         (generate_classfile): Use get_method_access_flags.
773
774 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
775
776         * class.c (interface_of_p): Check for null TYPE_BINFO.
777
778 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
779
780         * class.c (make_class): Do not create binfo here.
781         (set_super_info): Create it here.
782         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
783
784 2004-07-08  Richard Henderson  <rth@redhat.com>
785
786         * expr.c (case_identity, get_primitive_array_vtable,
787         java_expand_expr, emit_init_test_initialization): Remove.
788         * java-tree.h (java_expand_expr): Remove.
789         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
790
791 2004-07-07  Per Bothner  <per@bothner.com>
792
793         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
794         get internal error due to mismatched types.
795
796         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
797
798         * gcj.texi (Linking):   New node.  Document -lgij usage.
799
800 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
801
802         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
803         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
804         * java/class.c (set_super_info, class_depth, interface_of_p,
805         maybe_add_interface, add_interface, make_class_data,
806         layout_class, add_miranda_methods): Adjust BINFO macros.
807         * expr.c (can_widen_reference_to, lookup_field): Likewise.
808         * jcf-write.c (generate_classfile): Likewise.
809         * parse.y (patch_anonymous_class,
810         check_inner_circular_reference, check_circular_reference,
811         java_complete_class, check_abstract_method_definitions,
812         java_check_abstract_method_definitions,
813         check_interface_throws_clauses, java_check_abstract_methods,
814         lookup_java_interface_method2,
815         find_applicable_accessible_methods_list): Likewise.
816         * typeck.c (find_method_in_interface): Likewise.
817         * verify.c (merge_types): Likewise.
818
819 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
820
821         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
822         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
823
824 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
825
826         * class.c (make_class): Use make_tree_binfo.
827         (set_super_info, add_interface_do): Likewise.
828         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
829
830 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
831
832         * verify.c: Correct array element access formatting thinko.
833
834 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
835
836         * verify.c: Insert a short blurb at the start referring to the JVMS.
837         (merge_type_state): Remove redundant nested if statement.
838         (verify_jvm_instructions): Ensure current_subr is initialised to
839         NULL_TREE.
840         Minor formatting fixes all over the place.
841
842 2004-07-02  Richard Henderson  <rth@redhat.com>
843
844         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
845
846 2004-07-01  Richard Henderson  <rth@redhat.com>
847
848         * class.c (registerClass_libfunc): Remove.
849         (init_class_processing): Don't set it.
850         (emit_register_classes): Take list_p parameter.  Fill it in
851         with _Jv_RegisterClass calls.
852         * decl.c (java_init_decl_processing): Don't call
853         init_resource_processing.
854         * jcf-parse.c (java_emit_static_constructor): New.
855         (java_parse_file): Call it.
856         * resource.c (registerResource_libfunc): Remove.
857         (init_resource_processing): Remove.
858         (write_resource_constructor): Take list_p parameter.  Fill it in
859         with _Jv_RegisterResource calls.
860         * java-tree.h: Update prototypes.
861
862 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
863
864         PR java/1262
865         * class.c (layout_class_method): Do not override package-private
866         method if its in a different package.
867         (split_qualified_name): Move here from parse.y. Rename from
868         breakdown_qualified. Add comment.
869         (in_same_package): Move here from parse.y. Add comment.
870         * java-tree.h (break_down_qualified, in_same_package): Declare.
871         (in_same_package): Likewise.
872         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
873         Callers updated.
874
875 2004-06-29  Andrew Haley  <aph@redhat.com>
876
877         * except.c (expand_start_java_handler): Push a new binding level.
878         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
879         register_exception_range() to register where we'll do it.
880         (expand_end_java_handler): Remove old bogus code.  Replace with
881         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
882         the top of the expression we're curently building.
883         (maybe_end_try): Delete.
884         * decl.c (binding_level.exception_range): New field.
885         (clear_binding_level): Add field exception_range.  Reformat.
886         (poplevel): Call expand_end_java_handler().
887         (poplevel): Call java_add_stmt only if functionbody is false.
888         (maybe_poplevels): Don't call maybe_end_try() from here.
889         (end_java_method): Clear no longer used trees in function decl.
890         (register_exception_range): New function.
891         * java-tree.h (register_exception_range, struct eh_range): Declare.
892
893 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
894
895         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
896
897 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
898
899         Formatting fixes.
900         * expr.c (class_has_finalize_method): Fix method name indentation.
901         (expand_java_call): Remove K&R style parameter declaration.
902         (expand_invoke): Fix statement indentation.
903         (expand_java_field_op): Likewise.
904         * parse-scan.y: Fix typo.
905         (reset_report): Fix method name indentation.
906         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
907         line. Fix typos.
908         * verify.c (verify_jvm_instructions): Document parameters, insert
909         page break.
910         * lang.c (lang_init_source): Fix method name indentation.
911         * class.c (common_enclosing_context_p): Likewise.
912         (emit_symbol_table): Fix parameter list indentation.
913         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
914         parameter declaration.
915         * constants.c: Fix copyright notice indentation.
916         * typeck.c (find_method_in_superclasses): Fix parameter list
917         indentation.
918         (find_method_in_interfaces): Likewise.
919         * zextract.c (makelong): Fix method name indentation.
920
921 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
922
923         PR java/15715.
924         * parse.y (create_interface): Set correct access modifiers for
925         interfaces.
926         * jcf-write.c (get_classfile_modifiers): New function.
927         (generate_classfile): Use get_classfile_modifiers, not
928         get_access_flags.
929
930 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
931
932         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
933         dependency to current parser context, not NULL_TREE, for top-level
934         classes.
935         (jdep_resolve_class): Enable member access check for all inner
936         class dependencies.
937
938 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
939
940         * parse.y (qualify_and_find): Pass type decl, not identifier, to
941         load_class.
942
943 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
944
945         PR java/15734
946         * expr.c (expand_java_field_op): Ensure that target class for static
947         field access has been loaded.
948
949 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
950             Ranjit Mathew  <rmathew@hotmail.com>
951
952         PR java/1207, java/16178
953         * jcf-parse.c (load_class): Return immediately if passed a type decl
954         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
955         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
956         before calling load_class.
957         (qualify_and_find): Likewise.
958         (find_in_imports_on_demand): Likewise.
959         (find_applicable_accessible_methods_list): Likewise.
960
961 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
962
963         * parse.y (java_layout_seen_class_methods): Don't call load_class
964         on class defined by source parser.
965
966 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
967
968         * parse.y (set_nested_class_simple_name_value): Removed.
969         (java_complete_expand_class): Remove calls to
970         set_nested_class_simple_name_value.
971
972 2004-06-22  Andrew Haley  <aph@redhat.com>
973             Ranjit Mathew  <rmathew@hotmail.com>
974
975         Fixes PR java/16113.
976         * decl.c (force_poplevels): Remove call to expand_end_bindings.
977
978 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
979
980         * parse.y (create_class): Correct diagnostic message about
981         java.lang.Object extending anything else.
982
983 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
984
985         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
986         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
987         * constants.c (build_ref_from_constant_pool): Likewise.
988         * expr.c (build_java_array_length_access): Likewise.
989         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
990         (invoke_build_dtable, build_invokevirtual): Likewise.
991         (build_invokeinterface, java_expand_expr): Likewise.
992         (emit_init_test_initialization): Likewise.
993         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
994         * parse.y (make_qualifed_name, build_array_ref): Likewise.
995
996 2004-06-21  Andrew Haley  <aph@redhat.com>
997
998         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
999         block.
1000
1001 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
1002
1003         * jcf.h (struct JCF): Change java_source, right_zip and finished
1004         to unsigned int.
1005         * lex.h (struct java_lexer): Change hit_eof, read_anything,
1006         byte_swap and use_fallback to unsigned int.
1007         * parse.h (struct _jdep): Change flag0 to unsigned int.
1008
1009 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
1010
1011         Fixes PR java/13948
1012         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
1013         before trying to lay out its methods.
1014         * jcf-parse.c (read_class): Track parsed files using canonical paths
1015         obtained via lrealpath from libiberty.
1016         (java_parse_file): Likewise.
1017         (parse_source_file_1): Rename formal parameter to reflect its
1018         modified purpose. Minor formatting fix.
1019
1020 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1021
1022         * class.c (emit_register_classes): Make the function uninlinable,
1023         do not set current_function_cannot_inline.
1024         * resource.c (write_resource_constructor): Do not reset
1025         flag_inline_functions around rest_of_compilation.
1026
1027 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
1028
1029         PR java/15769
1030         * expr.c (java_truthvalue_conversion): Handle
1031         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
1032         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
1033         i.e. return the expression.
1034
1035 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
1036
1037         * gjavah.c: Include version.h
1038
1039 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
1040
1041         * jcf-write.c (generate_bytecode_conditional): Correct handling
1042         of unordered conditionals. Add comment.
1043
1044 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
1045             Per Bothner  <per@bothner.com>
1046
1047         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
1048         local variable was initialised upon declaration.
1049         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
1050         variable was final and initialised upon declaration.
1051         * check-init.c (check_final_reassigned): Give error only if a blank
1052         final is not definitely unassigned or if an initialised final is
1053         reassigned.
1054         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
1055         assignment expressions. Remove case MODIFY_EXPR, label do_default.
1056         (check_init): Perform initialised-variable-removing-optimisation
1057         only on non-final local variables.
1058
1059 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
1060
1061         * jcf-write.c (generate_bytecode_conditional): Handle binops
1062         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
1063         and LTGT_EXPR.
1064         (generate_bytecode_insns): Likewise.
1065
1066 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
1067
1068         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
1069         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
1070
1071 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
1072
1073         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
1074         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
1075
1076 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
1077
1078         * decl.c (struct binding_level): Add GTY marker. Compile
1079         binding_depth unconditionally.
1080         (current_binding_level, free_binding_level, global_binding_level):
1081         Likewise.
1082         (clear_binding_level): Unconditionally set binding_depth.
1083         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
1084
1085 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
1086
1087         * lex.c (java_new_lexer): Set 'encoding'.
1088         (java_read_char): Improve error message for unrecognized characters.
1089         * lex.h (struct java_lexer): New field 'encoding'.
1090
1091 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
1092
1093         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
1094
1095 2004-05-21  Mark Wielaard  <mark@klomp.org>
1096
1097         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
1098         extern.
1099
1100 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
1101
1102         * typeck.c: Remove non-printable character 160.
1103
1104 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
1105
1106         * check-init.c: Correct minor typos.
1107
1108 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1109
1110         * Make-lang.in, expr.c, java-gimplify.c: Rename
1111         tree-simple.[ch] to tree-gimple.[ch].
1112
1113 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
1114
1115         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
1116
1117 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1118
1119         Merge from tree-ssa-20020619-branch.  See
1120         ChangeLog.tree-ssa for details.
1121
1122         * Make-lang.in, builtins.c, check-init.c, class.c,
1123         constants.c, decl.c, except.c, expr.c, java-except.h,
1124         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
1125         lang.c, lang.opt, parse.y, resource.c: Merged.
1126         * java-gimplify.c: New file.
1127
1128 2004-05-10  Andrew Haley  <aph@redhat.com>
1129
1130         * parse.y (create_class): Set TYPE_VFIELD.
1131         * decl.c (java_init_decl_processing): Likewise.
1132
1133         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
1134         * class.c (make_method_value): Replace DECL_VINDEX with call to
1135         get_method_index().
1136         (get_dispatch_vector): Likewise.
1137         (layout_class_method): Likewise.
1138         Replace set of DECL_VINDEX with call to set_method_index().
1139         (set_method_index): New function.
1140         (get_method_index): New function.
1141         * java-tree.h (set_method_index): New function decl.
1142         (get_method_index): New function decl.
1143
1144 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
1145
1146         * parse.y (check_pkg_class_access): Add new argument
1147         and use it when cl is NULL to call lookup_cl on it.
1148         (parser_check_super_interface): Do not call lookup_cl.
1149         Pass this_decl to check_pkg_class_access and NULL
1150         instead of lookup_cl.
1151         (parser_check_super): Update for change in
1152         check_pkg_class_access.
1153         (do_resolve_class): Likewise.
1154         (process_imports): Likewise.
1155         (find_in_imports_on_demand): Likewise.
1156         (resolve_qualified_expression_name): Likewise.
1157
1158 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
1159
1160         Fixes PR java/9685, PR java/15073
1161         * parse.y (accessibility_string): New method.
1162         (not_accessible_field_error): Use accessibility_string()
1163         instead of java_accstring_lookup().
1164         (resolve_qualified_expression_name): Check with
1165         check_pkg_class_access() before allowing access using
1166         qualified names.
1167         Fix comment typo.
1168         Use check_pkg_class_access() instead of not_accessible_p()
1169         for unqualified types.
1170         (not_accessible_p): Use DECL_CONTEXT (member) instead of
1171         REFERENCE for package-private access checking.
1172         (patch_method_invocation): Use accessibility_string() instead
1173         of java_accstring_lookup().
1174
1175 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
1176
1177         Fixes PR java/15133
1178         * gjavah.c (struct method_name): Add member is_native.
1179         (overloaded_jni_method_exists_p): Match candidate method only if
1180         it is native.
1181         (print_method_info): Initialise is_native flag from the method's
1182         access flags.
1183
1184 2004-04-30  Roger Sayle  <roger@eyesopen.com>
1185
1186         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
1187         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
1188
1189 2004-04-22  Roger Sayle  <roger@eyesopen.com>
1190
1191         * resource.c (write_resource_constructor): Guard call to possibly
1192         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
1193
1194 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
1195
1196         * class.c (make_class_data): Add new field aux_info.
1197         * decl.c (java_init_decl_processing): Push type and decl for
1198         `aux_info'.
1199
1200 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
1201
1202         * expr.c (expand_java_NEW): Don't use size argument for
1203         _Jv_AllocObject calls.
1204         * parse.y (patch_invoke): Likewise.
1205
1206 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
1207
1208         * expr.c (build_invokeinterface): Remove unused variables to
1209         fix warnings.
1210
1211 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
1212
1213         * class.c (get_interface_method_index): New function. Return dispatch
1214         index for interface method.
1215         (make_method_value): For interface methods, set index field to
1216         iface dispatch index, not DECL_VINDEX.
1217         * expr.c (build_invokeinterface): Use get_interface_method_index.
1218
1219 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1220
1221         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
1222
1223 2004-03-31  Andrew Haley  <aph@redhat.com>
1224
1225         PR java/14104
1226         * jcf-io.c (opendir_in_zip): Tidy up error handling.
1227
1228 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
1229
1230         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
1231         form of GTY markers.
1232
1233 2004-03-25  Marcus Meissner  <meissner@suse.de>
1234
1235         PR java/14689:
1236         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
1237
1238 2004-03-23  Tom Tromey  <tromey@redhat.com>
1239
1240         PR java/14315:
1241         * jcf-write.c (make_class_file_name): Don't report if mkdir
1242         failed with EEXIST.
1243
1244 2004-03-23  Tom Tromey  <tromey@redhat.com>
1245
1246         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
1247
1248 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
1249
1250         * class.c, gjavah.c, lang.c: Fix comment typos.
1251         * gcj.texi: Fix typos.
1252
1253 2004-03-19  Per Bothner  <per@bothner.com>
1254
1255         * gcj.texi (Code Generation):  Document new flags and assert defaults.
1256
1257         * class.c (assume_compiled_node_struct):  Rename type to
1258         class_flag_node_struct, as it is now also used for enable_assertions.
1259         Rename assume_compiled_node typedef.  Rename excludep field to value.
1260         (find_assume_compiled_node):  Rename function to find_class_flag_node.
1261         Minor optimization - avoid needless strlen.
1262         (add_assume_compiled):  Some tweaking and optimization.
1263         Rename and generalize to add_class_flag takem an extra parameter.
1264         (add_assume_compled):  New just calls add_class_flag.
1265         (add_enable_assert, enable_assertions):  New functions.
1266         (enable_assert_tree):  New static.
1267         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
1268         * lang.opt (fenable-assertions, fenable-assertions=,
1269         fdisable-assertions, fdisable-assertions=):  New options.
1270         * lang.c (java_handle_option):  Handle new options.
1271         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
1272         class in an interface - create helper class nested in outer interface.
1273         (build_assertion):  Short-circuit if enable_assertions is false.
1274
1275 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1276
1277         * java-tree.h: Changes throughout to add checking to macros
1278         and numerous whitespace changes.
1279         (VAR_OR_FIELD_CHECK): New macro.
1280         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
1281         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
1282
1283 2004-03-16  Per Bothner  <per@bothner.com>
1284
1285         * jcf-jump.c (options):  New --print-constants option.
1286         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
1287
1288         * jcf-dump.c (flag_print_constant_pool):  Default to off.
1289         (print_constant_terse_with_index):  New helper function.
1290         (various places):  Check flag_print_constant_pool where missing.
1291         (main):  If verbose set flag_print_constant_pool.
1292         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
1293
1294 2004-03-15  Andrew Haley  <aph@redhat.com>
1295
1296         PR java/14581
1297         * parse.y (java_complete_lhs): Check that final variable has an
1298         initializer.
1299
1300 2004-03-12  Andrew Haley  <aph@redhat.com>
1301
1302         PR java/14551
1303         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
1304         conversion.
1305
1306 2004-02-29  Roger Sayle  <roger@eyesopen.com>
1307
1308         * jcf-parse.c (java_parse_file): Handle the case that input_filename
1309         is NULL.
1310
1311 2004-02-27  Per Bothner  <per@bothner.com>
1312
1313         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
1314         suggestion:  Use build_incomplete_class_ref.
1315         This fixes PR java/13508, java/11714.
1316
1317 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
1318
1319         * java/parse.h: Update copyright.
1320
1321 2004-02-26  Andrew Haley  <aph@redhat.com>
1322
1323         PR java/14231:
1324         * parse.y (check_interface_throws_clauses): Check for
1325         !METHOD_INVISIBLE (iface_method).
1326         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
1327         well as CLASS_ABSTRACT.
1328
1329 2004-02-25  Per Bothner  <per@bothner.com>
1330
1331         * parse.y (build_assertion):  If we're in an inner class, create the
1332         class$ helper routine in the outer class.
1333
1334 2004-02-19  Richard Henderson  <rth@redhat.com>
1335
1336         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
1337
1338 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
1339
1340         * Make-lang.in (java.install-man): Add extra dependencies.
1341
1342 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
1343
1344         * Make-lang.in: Install man pages under the same names
1345         (possibly transformed) as the program they document.
1346
1347 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
1348
1349         * gjavah.c: Include "intl.h".
1350         (error): New function.
1351         (main): Call gcc_init_libintl.
1352         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
1353         print_stub_or_jni, process_file, main): Use error rather than
1354         fprintf.
1355         (print_method_info, usage, help, version, main): Mark strings for
1356         translation with _.  Avoid splitting up sentences.  Send
1357         information messages to stdout.
1358         * jcf-dump.c: Include "intl.h".
1359         (main): Call gcc_init_libintl.
1360         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
1361         Mark error, usage and version messages for translation with _.
1362         Avoid splitting up sentences.
1363         * jv-scan.c: Include "intl.h".
1364         (fatal_error, warning): Change parameter s to msgid.  Translate
1365         messages.
1366         (main): Call gcc_init_libintl.
1367         (usage, help, version): Mark error, usage and version messages for
1368         translation with _.  Avoid splitting up sentences.
1369         * jvgenmain.c: Include "intl.h".
1370         (main): Call gcc_init_libintl.
1371         (usage, main): Mark error messages for translation with _.
1372         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
1373         JVGENMAIN_OBJS): Add intl.o.
1374         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
1375         java/jvgenmain.o): Update dependencies.
1376
1377 2004-02-08  Per Bothner  <per@bothner.com>
1378
1379         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
1380         class don't use not_accessible_field_error, which can get confused.
1381
1382 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
1383
1384         Make-lang.in (po-generated):  Delete.
1385
1386 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
1387
1388         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
1389         Depend on target.h.
1390         * decl.c: Include target.h.
1391         (start_java_method): Replace PROMOTE_PROTOTYPES with
1392         targetm.calls.promote_prototypes.
1393         * expr.c: Include target.h.
1394         (pop_arguments): Replace PROMOTE_PROTOTYPES with
1395         targetm.calls.promote_prototypes.
1396         * parse.y: Include target.h.
1397         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
1398         with targetm.calls.promote_prototypes.
1399
1400 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
1401
1402         * typeck.c: Update copyright.
1403
1404 2004-02-02  Tom Tromey  <tromey@redhat.com>
1405
1406         * decl.c (java_init_decl_processing): Remove duplicate
1407         gnu/gcj/RawData.
1408
1409 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
1410
1411         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
1412
1413 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
1414
1415         * expr.c (build_field_ref): Move variable
1416         definition up.
1417
1418 2004-01-28  Andrew Haley  <aph@redhat.com>
1419
1420         * expr.c (build_field_ref): Widen field offset.
1421
1422 2004-01-27  Andrew Haley  <aph@redhat.com>
1423
1424         java/13273
1425         * parse.y (check_interface_throws_clauses): Make sure class_decl
1426         has been loaded.
1427
1428 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
1429
1430         PR java/13733
1431         * parse.y (patch_assignment): Don't modify lhs_type for
1432         reference assignments.
1433
1434 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
1435
1436         * Make-lang.in: Replace $(docdir) with doc.
1437         (java.info, java.srcinfo, java.man, java.srcman): New rules.
1438         (java.install-man): Revamp rule.
1439
1440 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
1441
1442         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
1443         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
1444         instead of deferred backquote.
1445
1446 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
1447
1448         * typeck.c (find_method_in_interfaces): Move variable
1449         definition up.
1450
1451 2004-01-16  Andrew Haley  <aph@redhat.com>
1452
1453         PR java/13273:
1454         * typeck.c (shallow_find_method): New.
1455         (find_method_in_superclasses): New.
1456         (find_method_in_interfaces): New.
1457         (lookup_do): Rewrite.
1458         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
1459
1460         * jcf-parse.c (read_class): Save and restore output_class.
1461         * decl.c (java_expand_body): Set output_class from fndecl.
1462
1463 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
1464
1465         * class.c (gen_indirect_dispatch_tables): Fix string length
1466         calculations.
1467
1468 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
1469
1470         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
1471         (java.srcextra): Copy above back to source directory if requested.
1472         (po-generated): Delete reference to $(parsedir).
1473         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
1474         Use implicit rule.
1475
1476 2004-01-14  Jan Hubicka  <jh@suse.cz>
1477
1478         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
1479         estimation.
1480
1481 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
1482
1483         * java-tree.h (java_expand_expr): Change prototype.
1484         * expr.c (java_expand_expr): Add alt_rtl parameter.
1485
1486 2004-01-09  Andrew Haley  <aph@redhat.com>
1487
1488         PR java/12755:
1489         * parse.y (java_fix_constructors):  Set output_class.
1490         (java_reorder_fields): Likewise.
1491         (java_layout_classes): Likewise.
1492         (java_expand_classes): Generate indirect dispatch tables.
1493         (java_expand_classes): Set output_class.
1494         (java_finish_classes): Likewise.
1495         * lang.c (java_init): Turn on always_initialize_class_p if we're
1496         using indirect dis[atch.
1497         (java_decl_ok_for_sibcall): Use output_class, not current_class.
1498         (java_get_callee_fndecl): Use class local atable.
1499         * jcf-parse.c
1500         (always_initialize_class_p): Decl moved to java-tree.h.
1501         (HANDLE_CLASS_INFO): Set output_class.
1502         (read_class): Likewise.
1503         (parse_class_file): Call gen_indirect_dispatch_tables.
1504         (parse_zip_file_entries): Set output_class.
1505         (java_parse_file): Set output_class.  Don't emit symbol tables.
1506         * java-tree.h (output_class): New.
1507         Remove global declarations for otable, atable, and ctable.
1508         (always_initialize_class_p): moved here from decl.c.
1509         (DECL_OWNER): New.
1510         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
1511         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
1512         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
1513         (struct lang_type): Add otable_methods, otable_decl,
1514         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
1515         ctable_decl, catch_classes, type_to_runtime_map.
1516         * expr.c (build_field_ref): Make otable, atable, and ctable class
1517         local rather than global.
1518         (build_known_method_ref): Likewise.
1519         (build_invokeinterface): Likewise.
1520         (java_expand_expr): Pass runtime type (rather than actual type) to
1521         expand_start_catch.
1522         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
1523         this class.  Look up each class in that map to delete duplicates.
1524         (expand_end_java_handler): Pass runtime type (rather than actual
1525         type) to expand_start_catch.
1526         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
1527         (do_nothing): New.
1528         (java_init_decl_processing): Rearrange things.  Remove global
1529         declarations of otable, atable, and ctable.
1530         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
1531         (java_expand_body): Set output_class.
1532         * constants.c (build_constant_data_ref): Use output_class, not
1533         current_class.
1534         (alloc_name_constant): Likewise.
1535         * class.c (gen_indirect_dispatch_tables): New.
1536         (build_class_ref): Generate hard reference to superclass, even if
1537         using indirect dispatch.
1538         (build_static_field_ref): Use class local atable.
1539         (make_class_data): Generate hard reference to superclass, even if
1540         using indirect dispatch.
1541         Generate symbolic references to interfaces when using indirect
1542         dispatch.
1543         (make_class_data): Emit otable, atable, and ctable.
1544         Make otable, atable, and ctable class local rather than global.
1545         (emit_catch_table): Make otable, atable, and ctable class local
1546         rather than global.
1547
1548 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
1549
1550         * parse.y (catch_clause_parameter): Fix typo.
1551
1552         PR java/13404
1553         * parse.y: (catch_clause_parameter): Return early if $3, aka
1554         formal_parameter, is null.
1555
1556 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1557
1558         * class.c: Remove uses of "register" specifier in
1559         declarations of arguments and local variables.
1560         * decl.c: Likewise.
1561         * expr.c: Likewise.
1562         * gjavah.c: Likewise.
1563         * jcf-dump.c: Likewise.
1564         * jcf-io.c: Likewise.
1565         * jcf-parse.c: Likewise.
1566         * jcf-write.c: Likewise.
1567         * keyword.h: Likewise.
1568         * parse.y: Likewise.
1569         * typeck.c: Likewise.
1570         * verify.c: Likewise.
1571
1572 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
1573
1574         * Make-lang.in (GCJ_CROSS_NAME): Delete.
1575         (java.install_common, java.install-man): Adjust for above.
1576         (java.uninstall): Likewise.
1577
1578 2003-12-03  Michael Koch  <konqueror@gmx.de>
1579
1580         * class.c (make_class_data):
1581         Push field value to 'hack_signers' instead of 'signers'.
1582         * decl.c (java_init_decl_processing):
1583         Push field 'hack_signers' instead of 'signers'.
1584
1585 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
1586
1587         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
1588         including iconv.h.
1589
1590 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
1591
1592         PR java/12374:
1593         * parse.y (qualify_ambiguous_name): Remove lots of broken
1594         field access processing - there's no need to do that here,
1595         because we have resolve_field_access.  Remove
1596         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
1597         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
1598         used.
1599
1600 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
1601
1602         Fix PR java/13237
1603         * parse.y (java_complete_lhs): Save location prior to patching
1604         CALL_EXPR.
1605
1606 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
1607
1608         PR java/12548
1609         * resource.c (write_resource_constructor): Append
1610         "_resource" to constructor identifier name.
1611
1612 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
1613
1614         Fix PR java/13183.
1615         * constants.c (cpool_for_class): New function.
1616         (outgoing_cpool): Remove global variable.
1617         (alloc_name_constant): Use cpool_for_class.
1618         (build_constants_constructor): Likewise.
1619         * decl.c (java_expand_body): Set current_class.
1620         * java-tree.h (outgoing_cpool) Remove declaration.
1621         (init_outgoing_cpool): Likewise.
1622         * jcf-parse.c (init_outgoing_cpool): Remove function.
1623         (parse_class_file): Don't call init_outgoing_cpool.
1624         * parse.y (java_complete_expand_methods): Don't call
1625         init_outgoing_cpool.  Don't save outgoing_cpool.
1626         (java_expand_classes): Don't restore outgoing_cpool.
1627         (java_finish_classes): Likewise.
1628
1629 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
1630
1631         * Make-lang.in: (java.install-common) Add
1632         symlink for $(target_noncanonical)-gcjh for
1633         native builds.
1634
1635 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
1636
1637         * Make-lang.in (java.extraclean): Delete.
1638
1639 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
1640
1641         * Make-lang.in (check-java): Add.
1642
1643 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
1644
1645         Fix PR java/13024.
1646         * except.c (prepare_eh_table_type): Allocate variable-sized
1647         buffer `buf' with alloca.
1648
1649 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
1650
1651         Fix PR java/12857.
1652
1653         decl.c (java_init_decl_processing): Don't initialize
1654         class_not_found_type_node, no_class_def_found_type_node.
1655
1656         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
1657         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
1658         (class_not_found_type_node, no_class_def_found_type_node):
1659         Don't define.
1660
1661         parse.y (build_dot_class_method_invocation): Add this_class
1662         argument.  Qualify method invocations to a different class.
1663         (create_new_parser_context): Initialize saved_data_ctx to 0.
1664         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
1665         (build_dot_class_method): Don't load classes.  Register
1666         incomplete types.
1667         (build_incomplete_class_ref): Special cases for interfaces
1668         and inner classes.  Move build_dot_class_method call to here...
1669         (patch_incomplete_class_ref): ...from here.  Pass current_class
1670         to build_dot_class_method_invocation.
1671         (build_assertion): Pass class_type to
1672         build_dot_class_method_invocation.
1673         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
1674
1675 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
1676
1677         Fix PR java/12739.
1678         * java-tree.h (BLOCK_EMPTY_P): Define.
1679         * parse.y (java_complete_lhs): Check for empty blocks
1680         in TRY_FINALLY_EXPR case.
1681
1682 2003-11-17  Andrew Haley  <aph@redhat.com>
1683
1684         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
1685         (struct lang_decl_var:freed): New variable.
1686         * decl.c (poplevel): Mark local vars that have gone out of scope.
1687         (push_jvm_slot): Don't use the RTL of a var that has gone out of
1688         scope.
1689
1690 2003-11-16  Jason Merrill  <jason@redhat.com>
1691
1692         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
1693         and TAGS files that include them for each front end.
1694
1695 2003-11-15  Tom Tromey  <tromey@redhat.com>
1696
1697         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
1698
1699 2003-11-12  Jason Merrill  <jason@redhat.com>
1700
1701         PR optimization/12547
1702         * lang.c (java_tree_inlining_walk_subtrees): Just walk
1703         BLOCK_EXPR_BODY directly.
1704
1705 2003-11-12  Andrew Haley  <aph@redhat.com>
1706
1707         PR java/11045
1708         * parse.y (fold_constant_for_init): Check that we really do have a
1709         constant.
1710
1711         PR java/11533
1712         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
1713         init_test_decls being inlined.
1714
1715         PR java/12890:
1716         * parse.y (do_resolve_class): Check return value from
1717         breakdown_qualified().
1718
1719 2003-11-11  Tom Tromey  <tromey@redhat.com>
1720
1721         PR java/12915:
1722         * parse.y (merge_string_cste): Handle case where we have a
1723         pointer that happens to be zero, not null_pointer_node.
1724
1725 2003-11-10  Tom Tromey  <tromey@redhat.com>
1726
1727         * jcf-parse.c (classify_zip_file): Correctly compare
1728         filename_length against length of manifest file's name.
1729
1730 2003-11-08  Tom Tromey  <tromey@redhat.com>
1731
1732         PR java/12894:
1733         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
1734
1735 2003-11-06  Andrew Haley  <aph@redhat.com>
1736
1737         * expr.c (java_stack_swap): Make sure destination stack slots are
1738         of the correct type.
1739
1740 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
1741
1742         * Make-lang.in (dvi): Move targets to $(docobjdir).
1743         (gcj.dvi): Simplify rule and adjust target.
1744         (gcj.info): Simplify rule.
1745         (gcj.pod): New intermediate rule.
1746         (gcjh.pod): Likewise.
1747         (jv-scan.pod): Likewise.
1748         (jcf-dump.pod): Likewise.
1749         (gij.pod): Likewise.
1750         (jv-convert.pod): Likewise.
1751         (rmic.pod): Likewise.
1752         (rmiregistry.pod): Likewise.
1753         (gcj.1): Delete.
1754         (gcjh.1): Delete.
1755         (jv-scan.1): Delete.
1756         (jcf-dump.1): Delete.
1757         (gij.1): Delete.
1758         (jv-convert.1): Delete.
1759         (rmic.1): Delete.
1760         (rmiregistry.1): Delete.
1761
1762 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
1763
1764         Fixes PR java/12866.
1765         * parse.y (resolve_qualified_expression_name): Move test
1766         for outer field access methods from here...
1767         (check_thrown_exceptions) ...to here.
1768
1769 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
1770
1771         * .cvsignore: Delete.
1772
1773 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
1774
1775         * verify.c (verify_jvm_instructions): Don't warn about legal
1776         eh binding regions generated for example by jdk 1.4.1.
1777
1778 2003-10-24  David S. Miller  <davem@redhat.com>
1779
1780         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
1781
1782 2003-10-22  Andrew Haley  <aph@redhat.com>
1783
1784         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
1785         (java_get_callee_fndecl): New.
1786
1787         * jcf-parse.c (java_parse_file): Call emit_catch_table().
1788
1789         * java-tree.h (ctable_decl): New.
1790         (catch_classes):  New.
1791         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
1792
1793         * decl.c (java_init_decl_processing): Add catch_class_type.
1794         Add ctable_decl.
1795         Add catch_classes field.
1796
1797         * class.c (build_indirect_class_ref): Break out from
1798         build_class_ref.
1799         (make_field_value): Check flag_indirect_dispatch.
1800         (make_class_data): Ditto.
1801         Tidy uses of PUSH_FIELD_VALUE.
1802         Add field catch_classes.
1803         (make_catch_class_record): New.
1804
1805         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
1806
1807 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
1808
1809         * jcf-write.c: Follow spelling conventions.
1810         * parse.y: Likewise.
1811
1812 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
1813
1814         * ChangeLog: Fix typos.
1815         * expr.c: Fix comment typos.
1816         * jcf-write.c: Likewise.
1817         * lang.c: Likewise.
1818         * lex.c: Likewise.
1819         * mangle.c: Likewise.
1820         * parse-scan.y: Likewise.
1821         * parse.y: Likewise.
1822
1823 2003-10-22  Tom Tromey  <tromey@redhat.com>
1824
1825         * expr.c (expand_byte_code): Only warn about dead bytecode when
1826         extra_warnings is set.
1827
1828 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
1829
1830         Fix for PR java/12586.
1831         * mangle.c (find_compression_record_match): Don't iterate through
1832         package namespace elements unless they all match compression_table
1833         entries.
1834
1835 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
1836
1837         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
1838         (generate-manpages): Likewise.
1839         (java.maintainer-clean): Likewise.
1840         (gcj.info): Likewise.
1841         (gcj.1): Likewise.
1842         (gcjh.1): Likewise.
1843         (jv-scan.1): Likewise.
1844         (jcf-dump.1): Likewise.
1845         (gij.1): Likewise.
1846         (jv-convert.1): Likewise.
1847         (rmic.1): Likewise.
1848         (rmiregistry.1): Likewise.
1849         (java.install-man): Likewise.
1850         (parse-scan.o): Move and define complete compile line.
1851         (parse.o): Likewise.
1852         (jcf-tree-inline.o): Move.
1853
1854 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
1855
1856         * Make-lang.in (info): Update dependencies.
1857         (java.install-info): Remove.
1858         ($(srcdir)/java/gcj.info): Replace with ...
1859         ($(docobjdir)/gcj.info): ... this.
1860
1861 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
1862
1863         * Make-lang.in: Replace uses of $(target_alias) with
1864         $(target_noncanonical).
1865
1866 2003-10-09  Tom Tromey  <tromey@redhat.com>
1867
1868         * decl.c (java_init_decl_processing): Declare signers field.
1869         * class.c (make_class_data): Set signers field.
1870
1871 2003-10-09  Jason Merrill  <jason@redhat.com>
1872
1873         * parse.y (patch_assignment): Use make_node to create a BLOCK.
1874         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
1875         POINTER_TYPE.
1876
1877 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
1878
1879         * Make-lang.in (java.info): Replace with ...
1880         (info): ... this.
1881         (java.dvi): Replace with ...
1882         (dvi): ... this.
1883         (java.generated-manpages): Replace with ...
1884
1885 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
1886
1887         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
1888
1889 2003-10-01  Andrew Haley  <aph@redhat.com>
1890
1891         * jcf-parse.c (java_parse_file): Write otable and atable.
1892         * java-tree.h (atable_methods): New.
1893         (atable_decl): New.
1894         (atable_syms_decl): New.
1895         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1896         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1897         (symbol_*type): Rename method_symbol* to symbol*type.
1898         (emit_offset_symbol_table): Delete.
1899         (emit_symbol_table): New.
1900         (get_symbol_table_index): New.
1901         (atable_type): New.
1902         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1903         (build_known_method_ref): Likewise.
1904         (get_symbol_table_index): Rename from get_offset_table_index.
1905         Parameterize to allow re-use by differing types of symbol table.
1906         (build_invokevirtual): Pass table to get_offset_table_index.
1907         * decl.c (java_init_decl_processing): Push types and decls for
1908         atable and atable_syyms.
1909         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1910         (make_class_data): Add new fields atable and atable_syms.
1911         (emit_symbol_table): Rename from emit_offset_symbol_table.
1912         Parameterize to allow re-use by different types of symbol table.
1913         (build_symbol_entry): Renamed from build_method_symbols_entry.
1914
1915 2003-09-30  Roger Sayle  <roger@eyesopen.com>
1916
1917         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1918         semantics for SAVE_EXPR, by caching the result in a temporary.
1919
1920 2003-09-28  Richard Henderson  <rth@redhat.com>
1921
1922         * check-init.c (check_init): Save and restore input_location
1923         instead of file and line separately.
1924         * decl.c (java_expand_body): Likewise.
1925         * jcf-write.c (generate_bytecode_insns): Likewise.
1926         * parse.y (safe_layout_class): Likewise.
1927         * jcf-parse.c (read_class, parse_class_file): Likewise.
1928         (java_parse_file): Use %H for warning locator.
1929
1930 2003-09-28  Roger Sayle  <roger@eyesopen.com>
1931
1932         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1933         with void-type branches instead of using a COMPOUND_EXPR.
1934
1935 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
1936
1937         * decl.c (java_optimize_inline, dump_function): Remove.
1938         * java-tree.h (java_optimize_inline): Remove declaration.
1939         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1940         * parse.y (source_end_java_method, java_expand_classes):
1941         Likewise.  Remove dead code.
1942
1943 2003-09-27  Roger Sayle  <roger@eyesopen.com>
1944
1945         * lang.c (java_init_options): Set flag_evaluation_order.
1946         * expr.c (force_evaluation_order): Don't attempt to force
1947         evaluation order of binary operations using save_expr.
1948         * parse.y (java_complete_lhs): No longer need to call
1949         force_evaluation_order when constructing binary operators.
1950
1951 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1952             Bryce McKinlay  <bryce@mckinlay.net.nz>
1953
1954         PR java/1333:
1955         * parse.y (not_accessible_field_error): New function.
1956         (resolve_expression_name): Check field access permissions.
1957         (resolve_qualified_expression_name): Use
1958         not_accessible_field_error.
1959         (resolve_qualified_expression_name): Likewise.
1960
1961 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1962
1963         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1964
1965 2003-09-23  Roger Sayle  <roger@eyesopen.com>
1966
1967         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1968         with equal operands without side-effects.
1969
1970 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
1971
1972         * decl.c (java_init_decl_processing): Don't emit otable decls
1973         if flag_indirect_dispatch is not set.
1974
1975 2003-09-21  Richard Henderson  <rth@redhat.com>
1976
1977         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1978         resource.c: Revert.
1979
1980 2003-09-21  Richard Henderson  <rth@redhat.com>
1981
1982         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1983         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1984
1985 2003-09-20  Richard Henderson  <rth@redhat.com>
1986
1987         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1988
1989 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1990
1991         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1992         * check-init.c (check_init): Likewise.
1993
1994 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1995
1996         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1997
1998 2003-09-16  Andrew Haley  <aph@redhat.com>
1999
2000         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
2001
2002 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
2003
2004         Fixes PR java/9577
2005         * mangle.c (find_compression_record_match): Skip
2006         over a "6JArray" (the array template mangled string)
2007         IDENTIFIER_NODE.
2008         (mangle_array_type): Correct minor typo.
2009         (atms): Move definition to the beginning.
2010
2011 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
2012
2013         * class.c (add_miranda_methods): Ensure super-interfaces are laid
2014         out. Fix for PR java/12254.
2015
2016 2003-09-11  Richard Henderson  <rth@redhat.com>
2017
2018         * parse.y (source_end_java_method): Update for new
2019         cgraph_finalize_function argument.
2020
2021 2003-09-09  Richard Henderson  <rth@redhat.com>
2022
2023         * parse.y (source_end_java_method): Update call to
2024         cgraph_finalize_function.
2025
2026 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
2027
2028         * decl.c (java_expand_body): New function.
2029         * expr.c (build_class_init): Set DECL_IGNORED_P.
2030         * java-tree.h (start_complete_expand_method,
2031         java_expand_body): Declare.
2032         * jcf-parse.c (cgraph.h): Include.
2033         (java_parse_file): Handle flag_unit_at_a_time.
2034         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
2035         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
2036         (java_estimate_num_insns): Use walk_tree_without_duplicates.
2037         (java_start_inlining): New function.
2038         * parse.h (java_finish_classes): Declare.
2039         * parse.y: Include cgraph.h.
2040         (block): Don't special-case empty block production.
2041         (craft_constructor): Set DECL_INLINE.
2042         (source_end_java_method): Handle flag_unit_at_a_time.
2043         Replace inline code with call to java_expand_body.
2044         (start_complete_expand_method): Remove static modifier.
2045         (java_expand_method_bodies): Patch function tree for
2046         class initialization and/or synchronization as needed.
2047         Don't begin RTL expansion yet.
2048         (java_expand_classes): Check flag_unit_at_a_time before
2049         calling finish_class.
2050         (java_finish_classes): New function.
2051         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
2052         (patch_assignment): Set DECL_CONTEXT on temporary variable.
2053         (emit_test_initialization): Set DECL_IGNORED_P.
2054
2055 2003-09-03  Roger Sayle  <roger@eyesopen.com>
2056
2057         * builtins.c (enum builtin_type): Delete unused enumeration.
2058         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
2059
2060 2003-08-28  Tom Tromey  <tromey@redhat.com>
2061
2062         * gcj.texi (Extensions): Document gcjlib URLs.
2063
2064 2003-08-20  Tom Tromey  <tromey@redhat.com>
2065
2066         * gcj.texi (Extensions): Added xref.
2067         (libgcj Runtime Properties): Document
2068         gnu.gcj.runtime.VMClassLoader.library_control.
2069
2070 2003-08-20  Andrew Haley  <aph@redhat.com>
2071
2072         * except.c (prepare_eh_table_type): Use new encoding for exception
2073         handlers when using -fno-assume-compiled.
2074
2075 2003-08-13  Tom Tromey  <tromey@redhat.com>
2076
2077         * gcj.texi (Invoking gij): Document -X and -?.
2078
2079 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
2080
2081         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
2082         GCJH_OBJS, JCFDUMP_OBJS
2083         * win32-host.c: Removed the unnecessary and broken dependency
2084         on jcf.h
2085
2086 2003-08-11  Tom Tromey  <tromey@redhat.com>
2087
2088         * parse.y (java_check_regular_methods): Typo fixes.  Call
2089         check_interface_throws_clauses.  Use
2090         check_concrete_throws_clauses.
2091         (check_interface_throws_clauses): New function.
2092         (check_concrete_throws_clauses): New function.
2093         (hack_is_accessible_p): New function.
2094         (find_most_specific_methods_list): Added FIXME.
2095         * typeck.c (lookup_do): Use `flags' argument to decide what to
2096         do.  Reimplemented.
2097         (lookup_argument_method_generic): New function.
2098         (lookup_argument_method2): Removed.
2099         * jcf.h (ACC_INVISIBLE): New define.
2100         * jcf-write.c (generate_classfile): Skip invisible methods.
2101         * class.c (add_miranda_methods): New function.
2102         (layout_class_methods): Use it.
2103         (get_access_flags_from_decl): Use ACC_INVISIBLE.
2104         * java-tree.h (METHOD_INVISIBLE): New define.
2105         (lang_decl_func) [invisible]: New field.
2106         (lookup_argument_method_generic): Declare.
2107         (SEARCH_INTERFACE): New define.
2108         (SEARCH_SUPER): Likewise.
2109         (SEARCH_ONLY_INTERFACE): Likewise.
2110         (SEARCH_VISIBLE): Likewise.
2111         (lookup_argument_method2): Removed declaration.
2112
2113 2003-08-05  Tom Tromey  <tromey@redhat.com>
2114
2115         Fix for PR java/11600:
2116         * parse.y (java_complete_lhs): See whether we're calling a method
2117         on an array.
2118         (check_thrown_exceptions): Added `is_array_call' argument;
2119         fixed `clone' checking; updated all callers.
2120
2121 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
2122
2123         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
2124
2125 2003-08-03  Tom Tromey  <tromey@redhat.com>
2126
2127         * java-tree.h (METHOD_TRANSIENT): Removed.
2128         * decl.c (pushdecl): Removed some dead code.
2129         * class.c (get_access_flags_from_decl): Can't have transient
2130         method.
2131         (add_method_1): Can't have a transient method.
2132
2133 2003-07-28  Andreas Jaeger  <aj@suse.de>
2134
2135         * jvspec.c: Convert to ISO C90 prototypes.
2136
2137 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2138
2139         * decl.c (force_poplevels): Fix warning call.
2140
2141 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2142
2143         * expr.c (expand_java_field_op): Don't use xxx_with_decl
2144         (expand_java_field_op): Likewise.
2145         * class.c (layout_class_method): Likewise
2146         (emit_register_classes): Likewise.
2147         * decl.c (pushdecl): Likewise.
2148         (poplevel): Likewise.
2149         (force_poplevels): Likewise.
2150         (give_name_to_locals): Likewise.
2151         * check-init.c (check_for_initialization): Likewise.
2152
2153 2003-07-24  Jason Merrill  <jason@redhat.com>
2154
2155         * java-tree.h: Move boolean_type_node et al to the back end.
2156
2157 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2158
2159         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
2160         casts.
2161
2162 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
2163
2164         * lang.opt: Don't show -MD_ and -MDD_.
2165
2166 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
2167
2168         * lang-options.h: Remove.
2169         * lang.opt: Add help text.
2170
2171 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
2172
2173         * expr.c: Remove the last argument to expand_assignment().
2174
2175 2003-07-09  Jan Hubicka  <jh@suse.cz>
2176
2177         * java-tree.h (DECL_NUM_STMTS): Rename to...
2178         (DECL_ESTIMATED_INSNS): ... this.
2179         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
2180         New static functions.
2181         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
2182         * parser.y (add_stmt_to_compound): Do not account statements.
2183
2184 2003-07-08  Mark Wielaard  <mark@klomp.org>
2185
2186         * gcj.texi: CNI now expands to Compiled Native Interface.
2187
2188 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2189
2190         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
2191
2192 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2193
2194         * expr.c (expand_byte_code): Adjist emit_line_note call.
2195
2196 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2197
2198         * lang.c (java_handle_option): Don't handle filenames.
2199
2200 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
2201
2202         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
2203         DIR_SEPARATOR.
2204         Use FILENAME_CMP.
2205         * jcf-write.c: Don't default-define DIR_SEPARATOR.
2206         * jcf.h: Delete COMPARE_FILENAMES definition.
2207
2208 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
2209
2210         * lang.c (java_init_options): Update prototype.
2211
2212 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
2213
2214         * decl.c (poplevel): Adjust define_label call.
2215
2216 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
2217
2218         * gjavah.c (flag_jni): Make non-static.
2219         * parse-scan.y (ctxp): Make non-static.
2220
2221         * class.c (build_method_symbols_entry)
2222         * expr.c (get_offset_table_index)
2223         * jcf-parse.c (jcf_parse):
2224         Mark the definition static, matching the forward declaration.
2225
2226 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
2227
2228         * lang.c (java_handle_option): Don't check for missing arguments.
2229
2230 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2231
2232         * class.c (push_class): Use a location_t to save place.
2233         (emit_register_classes): Set input_location. Adjust
2234         expand_function_end call.
2235         * resource.c (write_resource_constructor): Likewise.
2236         * decl.c (end_java_method): Adjust expand_function_end call.
2237         * parse.y (source_end_java_method): Likewise.
2238
2239 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2240
2241         * lang.c (java_handle_option): Likewise.
2242
2243 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
2244
2245         * lang.c (java_handle_option): Special-casing of optional
2246         joined arguments no longer needed.
2247         * lang.opt: Update switches that take optional argument.
2248
2249 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
2250
2251         * lang.opt: Declare Java.
2252         * lang.c (java_init_options): Update.
2253
2254 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
2255
2256         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
2257
2258 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2259
2260         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
2261         * lang.c (java_handle_option): -MD and -MMD have an underscore.
2262         * lang.opt: -MD and -MMD have an underscore.
2263
2264 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
2265
2266         * class.c (emit_register_classes): Adjust init_function_start
2267         call.
2268         * decl.c (complete_start_java_method): Likewise.
2269         * resource.c (write_resource_constructor): Likewise.
2270
2271 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2272
2273         * Make-lang.in: Update to use options.c and options.h.
2274         * lang.c: Include options.h not j-options.h.
2275         (java_handle_option): Abort on unrecognized option.
2276         (java_init_options): Request Java switches.
2277
2278 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
2279
2280         * Make-lang.in: Handle mostlyclean.
2281
2282 2003-06-11  Tom Tromey  <tromey@redhat.com>
2283
2284         * lang.c (java_handle_option): Update dependency_tracking for
2285         OPT_MF case.
2286
2287         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
2288         empty argument.
2289
2290 2003-06-10  Andrew Haley  <aph@redhat.com>
2291
2292         * resource.c (write_resource_constructor): Use expand_expr to
2293         generate the address of the label attached to a resource.
2294         * Make-lang.in (java/resource.o): Add expr.h
2295
2296 2003-06-10  Andrew Haley  <aph@redhat.com>
2297
2298         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
2299         (java_decl_ok_for_sibcall): New.
2300
2301 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
2302
2303         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
2304         (java/j-options.c, java/j-options.h): New.
2305         * java-tree.h (resource_name, compile_resource_file,
2306         compile_resource_data): Constify.
2307         * jcf-write.c (jcf_write_base_directory): Similarly.
2308         * jcf.h (jcf_write_base_directory): Similarly.
2309         * lang.c: Include j-options.h.
2310         (cl_options_count, cl_options, string_option, java_decode_option,
2311         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
2312         process_option_with_no): Remove.
2313         (resource_name): Constify.
2314         (LANG_HOOKS_HANDLE_OPTION): Override.
2315         (java_handle_option): New.
2316         (java_init): Don't call jcf_path_init.
2317         (java_init_options): Call jcf_path_init.
2318         * lang.opt: New.
2319         * resource.c (compile_resource_data, compile_resource_file): Constify.
2320
2321 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
2322
2323         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
2324         (struct lang_decl_func): Add last_line field.
2325         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
2326         DECL_SOURCE_LINE_LAST): Remove.
2327         * parse.y (missing_return_error, finish_method_declaration,
2328         lookup_cl, start_artificial_method_body, source_end_java_method,
2329         start_complete_expand_method): Adjust.
2330
2331 2003-06-08  Tom Tromey  <tromey@redhat.com>
2332
2333         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
2334         fno-assume-compiled.
2335
2336 2003-06-08  Roger Sayle  <roger@eyesopen.com>
2337
2338         * builtins.c (define_builtin_type, builtin_types): Delete.
2339         (define_builtin): Rewritten to take just the built-in code,
2340         the function's name, type and fallback library function name.
2341         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
2342         (initialize_builtins): Overhaul to define the GCC builtins
2343         used by gcj manually, providing the Java run-time's
2344         implementations as the fallback library function.
2345
2346 2003-06-08  Anthony Green  <green@redhat.com>
2347
2348         * parse.y (patch_cast): Fix conversions from floating-point to
2349         integral types.
2350
2351 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
2352
2353         * Make-lang.in: Update.
2354         * lang.c: Include opts.h. Define cl_options_count and cl_options.
2355
2356 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
2357
2358         * lang.c (java_init_options): Update.
2359
2360 2003-06-05  Jan Hubicka  <jh@suse.cz>
2361
2362         * Make-lang.in:  Add support for stageprofile and stagefeedback
2363
2364 2003-05-31  Roger Sayle  <roger@eyesopen.com>
2365
2366         * lang.c (java_init_options): Prescribe wrap-around two's
2367         complement arithmetic overflow by setting flag_wrapv.
2368
2369 2003-05-29  Roger Sayle  <roger@eyesopen.com>
2370
2371         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
2372         (builtin_record): Add an additional builtin_code field to
2373         record which GCC built-in corresponds to the Java function.
2374         (java_builtins):  Add new entries for atan, atan2, exp, log,
2375         pow and tan.
2376         (max_builtin, min_builtin, abs_builtin): Perform constant
2377         folding on the resulting tree.
2378         (java_build_function_call_expr): Likewise, perform constant
2379         folding on the resulting tree.
2380         (initialize_builtins): The NULL creators are now allowed in
2381         the java_builtins table, which is now terminated by an entry
2382         with builtin_code == END_BUILTINS.
2383         (check_for_builtin): Likewise.  If the matching creator is
2384         NULL, construct the call using java_build_function_call_expr
2385         directly with the decl for the corresponding builtin_code.
2386
2387 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
2388
2389         * win32-host.c: Normalize copyright boilerplate.
2390
2391 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2392
2393         * parse.y (print_int_node): Use string concatentation on
2394         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
2395         function calls into one.
2396
2397 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
2398
2399         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
2400         fatal_io_error with calls to fatal_error; add ": %m" to the end of
2401         all the affected error messages.
2402
2403 2003-05-13  Richard Henderson  <rth@redhat.com>
2404
2405         * class.c (layout_class_method): Set DECL_EXTERNAL.
2406         * decl.c (java_mark_decl_local, java_mark_class_local): New.
2407         * java-tree.h (java_mark_class_local): Declare.
2408         * jcf-parse.c (parse_class_file): Use it.
2409         * parse.y (java_expand_classes): Likewise.
2410
2411 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
2412
2413         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
2414         * lex.h: #include input.h.
2415         * jv-scan.c (input_filename): Remove.
2416
2417 2003-05-02  Tom Tromey  <tromey@redhat.com>
2418
2419         PR java/10491:
2420         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
2421         (handle_inner_classes): New function.
2422
2423 2003-05-01  Tom Tromey  <tromey@redhat.com>
2424
2425         PR java/10459:
2426         * parse.y (finish_for_loop): Do nothing if update expression is a
2427         EXPR_WFL_NODE wrapping nothing.
2428         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
2429
2430 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
2431
2432         * lex.h (input_lineno): Remove declaration.
2433         * parse-scan.y: #include input.h.
2434         (input_filename): Remove declaration.
2435         (input_location): Add definition.
2436         (input_line): Remove definition.
2437
2438 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
2439
2440         * lex.h (lineno): Rename to ...
2441         (input_line): ... here
2442         * parse-scan.y (lineno): Rename to ...
2443         (input_line): ... here.
2444         (reset_report): Rename lineno to input_line.
2445         * check-init.c (check_init): Likewise.
2446         * class.c (push_class): Likewise.
2447         * decl.c (complete_start_java_method, end_java_method): Likewise.
2448         * expr.c (expand_byte_code): Likewise.
2449         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
2450         * jcf-write.c (generate_bytecode_insns): Likewise.
2451         * lex.c (java_init_lex, java_allocate_new_line,
2452         do_java_lex): Likewise.
2453         * parse.h (YYNOT_TWICE): Likewise.
2454         * parse.y (empty_statement, expression_statement,
2455         java_pop_parser_context, java_parser_context_save_global,
2456         yyerror, register_fields, method_header, safe_layout_class,
2457         find_in_imports_on_demand, create_artificial_method,
2458         source_end_java_method, start_complete_expand_method,
2459         build_thisn_assign, java_complete_lhs,
2460         maybe_absorb_scoping_block): Likewise.
2461
2462 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
2463
2464         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
2465         '/' when computing java source filename
2466
2467 2003-04-13  Tom Tromey  <tromey@redhat.com>
2468
2469         * gjavah.c (print_c_decl): Indentation fix.
2470
2471 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
2472
2473         * class.c (make_field_value, make_method_value, get_dispatch_table)
2474         (make_class_data, emit_offset_symbol_table)
2475         * constants.c (build_constants_constructor)
2476         * java-tree.h (START_RECORD_CONSTRUCTOR)
2477         * parse.y (maybe_build_array_element_wfl):
2478         Use build_constructor.
2479
2480 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
2481
2482         PR java/10253:
2483         * parse.y (string_convert_int_cst): Always use at least one digit
2484         in string conversion. Remove ASCII dependence.
2485         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
2486
2487 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
2488
2489         * Make-lang.in: added win32-host.c
2490         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
2491         resolves to open() on non-Win32 platforms and
2492         Win32-specific jcf_open_exact_case() on Win32
2493         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
2494         when trying .java and .class files
2495         * win32-host.c: added to repository. Defines
2496         Win32-specific jcf_open_exact_case()
2497
2498 2003-04-10  Andrew Haley  <aph@redhat.com>
2499
2500         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
2501         (maybe_free_localvar): Renamed from localvar_free.
2502         Add new arg, really.
2503         (generate_bytecode_insns): Set new variable, jsrs.
2504         Only free local vars if no jsr insns have been emittted.
2505         Call maybe_free_localvar, not localvar_free.
2506
2507 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
2508
2509         * gcj.texi: Remove @ at start of file.
2510
2511 2003-03-25  Tom Tromey  <tromey@redhat.com>
2512
2513         * parse.y (create_interface): Call CHECK_DEPRECATED.
2514
2515 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
2516
2517         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
2518
2519 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
2520
2521         * javaop.h (jfloat, jdouble): Make them structures mirroring
2522         the bit fields of IEEE float and double respectively.
2523         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
2524         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
2525         (union Word, union DWord): Delete.
2526         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
2527
2528         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
2529         D_NAN_MASK): Delete.
2530         (jni_print_float, jni_print_double): New.  Generate
2531         hexadecimal floating constants.
2532         (print_field_info): Use jni_print_float/double.
2533
2534         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
2535         finite floating point numbers for output; special case
2536         non-finite floats.
2537
2538 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
2539
2540         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
2541         Replace 0 and 1 with true and false in return statements.
2542
2543 2003-03-19  Tom Tromey  <tromey@redhat.com>
2544
2545         * lex.c (do_java_lex): Renamed from java_lex.
2546         (java_lex): New function.
2547         Include timevar.h.
2548
2549 2003-03-13  Tom Tromey  <tromey@redhat.com>
2550
2551         * parse.y (resolve_inner_class): Error if qualifier is a primitive
2552         type.
2553
2554 2003-03-04  Andrew Haley  <aph@redhat.com>
2555
2556         * gjavah.c (is_first_data_member): New global variable.
2557         (print_c_decl): If it's the first data member, align it as the
2558         superclass.
2559         (process_file): Set is_first_data_member.
2560
2561 2003-03-11  Tom Tromey  <tromey@redhat.com>
2562
2563         * parse.y (resolve_field_access): Initialize class if field is
2564         found in another static field.
2565         * expr.c (build_class_init): Don't optimize out initialization of
2566         implemented interface.
2567
2568 2003-03-11  Andrew Haley  <aph@redhat.com>
2569
2570         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
2571         warning.
2572
2573 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2574
2575         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
2576         and DIR_SEPARATOR_2 for a target.
2577         Correct minor typos.
2578
2579         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
2580         and DIR_SEPARATOR_2 for a target into account.
2581
2582 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
2583
2584         * lang.c (java_init): Update prototype, move code to java_post_options.
2585         (java_post_options): Similarly.
2586
2587 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
2588
2589         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
2590         compare file name components depending on the case-sensitivity
2591         or otherwise of the host file system.
2592
2593         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
2594         "strcmp" to compare file name components.
2595         Use IS_DIR_SEPARATOR instead of comparing directly against
2596         DIR_SEPARATOR.
2597         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
2598         comparing directly against DIR_SEPARATOR.
2599
2600 2003-03-04  Tom Tromey  <tromey@redhat.com>
2601
2602         * Make-lang.in (java.tags): New target.
2603
2604 2003-03-01  Roger Sayle  <roger@eyesopen.com>
2605
2606         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
2607         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
2608
2609 2003-03-01  Tom Tromey  <tromey@redhat.com>
2610
2611         * parse.y (jdep_resolve_class): Only check deprecation if we found
2612         a decl.
2613
2614 2003-02-28  Tom Tromey  <tromey@redhat.com>
2615
2616         PR java/9695:
2617         * class.c (maybe_layout_super_class): Always pass a WFL to
2618         do_resolve_class.
2619         * parse.y (do_resolve_class): Updated comment to explain
2620         parameters.
2621
2622 2003-02-26  Tom Tromey  <tromey@redhat.com>
2623
2624         * jcf-write.c (generate_classfile): Check whether class is
2625         deprecated before writing attribute count.
2626
2627 2003-02-25  Roger Sayle  <roger@eyesopen.com>
2628
2629         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
2630         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
2631
2632 2003-02-23  Tom Tromey  <tromey@redhat.com>
2633
2634         * lang-options.h: Added -Wdeprecated.
2635         * gcj.texi (Warnings): Document -Wdeprecated.
2636         * java-tree.h (flag_deprecated): Declare.
2637         * lang.c (lang_W_options): Added deprecated.
2638         (flag_deprecated): New global.
2639         * chartables.h: Rebuilt.
2640         * gen-table.pl (process_one): Look at whitespace.
2641         (print_tables): Define LETTER_SPACE, LETTER_MASK.
2642         * parse.h (CLEAR_DEPRECATED): New macro.
2643         (CHECK_DEPRECATED_NO_RESET): New macro.
2644         * jcf-parse.c (handle_deprecated): New function.
2645         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
2646         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
2647         * parse.y (resolve_type_during_patch): Check deprecation.
2648         (jdep_resolve_class): Likewise.
2649         (process_imports): Likewise.
2650         (resolve_expression_name): Likewise.
2651         (check_deprecation): Strip arrays from decl.  Check
2652         flag_deprecated.
2653         (patch_method_invocation): Also check the particular constructor
2654         for deprecation.
2655         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
2656         * jcf-write.c (append_deprecated_attribute): New function.
2657         (generate_classfile): Generate deprecated attribute when
2658         appropriate.
2659         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
2660         (java_lex) [case '*']: Simplify logic.
2661         (java_start_char_p): Use LETTER_MASK.
2662         (java_part_char_p): Likewise.
2663         (java_space_char_p): New function.
2664
2665 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
2666
2667         Change base class access representation.
2668         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
2669         (add_interface_do): Likewise.
2670
2671 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
2672
2673         * decl.c (java_init_decl_processing): Change
2674         soft_lookupjnimethod_node to reflect the change in
2675         signature of _Jv_LookupJNIMethod in libjava/jni.cc
2676         * expr.c (build_jni_stub): Calculate and pass the size
2677         on the stack of the arguments to a JNI function. Use
2678         new target macro MODIFY_JNI_METHOD_CALL to allow a
2679         target to modify the call to a JNI method.
2680
2681 2003-02-08  Roger Sayle  <roger@eyesopen.com>
2682
2683         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
2684         instead of basename to avoid compiler warnings on Tru64.
2685
2686 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
2687
2688         * gcj.texi: Update to GFDL 1.2.
2689
2690 2003-01-31  Andrew Haley  <aph@redhat.com>
2691
2692         * parse.y (java_expand_classes): Scan the whole class list looking
2693         for access methods that haven't yet been expanded.
2694
2695 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
2696
2697         Fix for java/4269:
2698
2699         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
2700         to fix bootstrap on sparc-unknown-netbsdelf1.5.
2701         * jcf-parse.c: Likewise.
2702
2703 2003-01-31  Mark Wielaard  <mark@klomp.org>
2704
2705         * gjavah.c (throwable_p): Allocate 1 more byte for string.
2706
2707 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
2708
2709         * class.c (make_class): Use BINFO_ELTS.
2710         (set_super_info): Likewse.
2711         (add_interface_do): Likewise.
2712
2713 2003-01-30  Tom Tromey  <tromey@redhat.com>
2714
2715         * jcf-parse.c (read_class): Update identifier's class value if it
2716         changed during parsing.
2717
2718 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
2719
2720         * Make-lang.in (po-generated): Find the targets in $(parsedir).
2721         Propagate change to all other rules as required.
2722         (java/parse-scan.o): Add explicit dependency on
2723         $(parsedir)/java/parse-scan.c .
2724
2725 2003-01-29  Tom Tromey  <tromey@redhat.com>
2726
2727         * parse.y (patch_assignment): Only transform the rhs of an
2728         assignment when compiling to native.
2729
2730 2003-01-28  Tom Tromey  <tromey@redhat.com>
2731
2732         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
2733
2734 2003-01-28  Tom Tromey  <tromey@redhat.com>
2735
2736         * lex.c (java_lex): Don't include UEOF as part of token.
2737         (java_read_unicode): Error if \u sequence prematurely terminated.
2738
2739 2003-01-27  Tom Tromey  <tromey@redhat.com>
2740
2741         * parse.y (java_check_regular_methods): Check for construct after
2742         checking types in throws clause.
2743
2744 2003-01-24  Tom Tromey  <tromey@redhat.com>
2745
2746         * class.c (build_static_field_ref): Only a String or numeric field
2747         can fold to a constant.
2748
2749 2003-01-23  Tom Tromey  <tromey@redhat.com>
2750
2751         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
2752         file name in resource buffer.
2753
2754 2003-01-23  Tom Tromey  <tromey@redhat.com>
2755
2756         * expr.c (build_known_method_ref): Use method's context to find
2757         method table index.
2758
2759 2003-01-23  Tom Tromey  <tromey@redhat.com>
2760
2761         * constants.c (set_constant_entry): Allocated cleared memory.
2762
2763 2003-01-22  Tom Tromey  <tromey@redhat.com>
2764
2765         * java-tree.h: Don't use PARAMS.
2766         * resource.c: Add prototypes for all functions.
2767         (write_resource_constructor): Use `const char *' to avoid
2768         warning.
2769
2770 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
2771
2772         * jcf-parse.c (process_zip_dir): Remove unused variable.
2773
2774 2003-01-22  Tom Tromey  <tromey@redhat.com>
2775
2776         * expr.c (build_invokeinterface): Abort if method's context is not
2777         an interface.
2778
2779 2003-01-22  Tom Tromey  <tromey@redhat.com>
2780
2781         * gcj.texi (Input and output files): Mention non-class entries.
2782         * decl.c (java_init_decl_processing): Call
2783         init_resource_processing.
2784         * java-tree.h (compile_resource_data, write_resource_constructor,
2785         compile_resource_file, init_resource_processing): Declare.
2786         * config-lang.in (gtfiles): Added resource.c.
2787         * Make-lang.in (gt-java-resource.h): New target.
2788         (JAVA_OBJS): Added resource.o.
2789         (java/resource.o): New target.
2790         * resource.c: New file.
2791         * class.c (compile_resource_file): Moved to resource.c.
2792         (registerResource_libfunc): Likewise.
2793         (utf8_decl_list): Mark with GTY; now static.
2794         * jcf-parse.c (classify_zip_file): New function.
2795         (parse_zip_file_entries): Use it; compile .properties files.
2796         (process_zip_dir): Use classify_zip_file and compute_class_name.
2797         Don't write class name into zip directory.
2798         (java_parse_file): Call write_resource_constructor.
2799         (compute_class_name): New function.
2800         * jcf-io.c (read_zip_member): Reindented.
2801
2802 2003-01-21  Tom Tromey  <tromey@redhat.com>
2803
2804         * class.c (supers_all_compiled): New function.
2805         (make_class_data): Use it.
2806
2807 2003-01-21  Tom Tromey  <tromey@redhat.com>
2808
2809         * parse.y (method_header): Native method can't be strictfp.
2810         No method can be transient or volatile.
2811
2812 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2813
2814         Make-lang.in (jvspec.o-warn): Add -Wno-error.
2815
2816 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
2817
2818         * check-init.c: Fix comment typos.
2819         * class.c: Likewise.
2820         * constants.c: Likewise.
2821         * decl.c: Likewise.
2822         * except.c: Likewise.
2823         * expr.c: Likewise.
2824         * java-except.h: Likewise.
2825         * java-tree.h: Likewise.
2826         * javaop.h: Likewise.
2827         * jcf-dump.c: Likewise.
2828         * jcf-io.c: Likewise.
2829         * jcf-parse.c: Likewise.
2830         * jcf-write.c: Likewise.
2831         * lang.c: Likewise.
2832         * mangle.c: Likewise.
2833         * typeck.c: Likewise.
2834         * verify.c: Likewise.
2835
2836 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2837
2838         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
2839         * jcf-write.c: Include "tm_p.h".
2840
2841 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2842
2843         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2844
2845 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2846
2847         * builtins.c (java_build_function_call_expr): Renamed from
2848         build_function_call_expr.  All callers changed.
2849
2850         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
2851         * jcf-parse.c: Include tm_p.h.
2852
2853         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2854         warning.
2855
2856 2003-01-14  Tom Tromey  <tromey@redhat.com>
2857
2858         * class.c (make_class_data): Check that super is compiled before
2859         building class reference to it.
2860
2861 2003-01-14  Andrew Haley  <aph@redhat.com>
2862
2863         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2864         varargs function -- correct.
2865
2866 2003-01-14  Andrew Haley  <aph@redhat.com>
2867
2868         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
2869
2870 2003-01-14  Andrew Haley  <aph@redhat.com>
2871
2872         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2873         varargs function -- correct.
2874
2875         * parse.y (patch_assignment): Copy the rhs of an assignment into a
2876         temporary if the RHS is a reference.
2877
2878 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2879
2880         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
2881         * keyword.h: Regenerated.
2882
2883         * All Files: Convert to ISO C style function definitions.
2884
2885 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
2886
2887         * parse.y (check_pkg_class_access): ANSIfy definition.
2888
2889 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2890
2891         * decl.c, parse-scan.y, parse.y: Don't cast return value of
2892         xmalloc et al.
2893
2894         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2895
2896 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2897
2898         Merge from pch-branch:
2899
2900         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
2901
2902         * Make-lang.in (java/gjavah.o): Update dependencies.
2903         * gjavah.c: Include ggc.h.
2904
2905         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
2906
2907         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2908         (JCFDUMP_OBJS): Add ggc-none.o.
2909         (java/jcf-dump.o): Depend on GGC_H.
2910         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2911         CPool substructures.
2912         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2913         * jcf-dump.c: Include ggc.h.
2914
2915         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2916
2917         * jcf.h (union cpool_entry): New.
2918         (struct CPool): Use gengtype to mark.  Change field 'data' to be
2919         an array of unions.
2920         (struct JCF): Use gengtype to mark.
2921         (CPOOL_UINT): Update for new cpool_entry type.
2922         (CPOOL_USHORT1): Likewise.
2923         (CPOOL_USHORT2): Likewise.
2924         (CPOOL_FINISH): Use GC to free cpool subfields.
2925         * parse.h (struct parser_ctxt): Mark field current_jcf.
2926         * lex.c (java_init_lex): Use GC to allocate struct JCF.
2927         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2928         (main_jcf): Use gengtype to mark.
2929         (ggc_mark_jcf): Delete.
2930         (get_constant): Update for new cpool_entry type.
2931         (give_name_to_class): Likewise.
2932         (get_class_constant): Likewise.
2933         (init_outgoing_cpool): Use GGC to allocate struct CPool.
2934         (java_parse_file): Use GGC to allocate struct JCF.
2935         (init_jcf_parse): Don't call ggc_add_root.
2936         * jcf-reader.c (jcf_parse_constant_pool): Update for new
2937         cpool_entry type.
2938         * java-tree.h (current_jcf): Use gengtype to mark.
2939         (CPOOL_UTF): Update for new cpool_entry type.
2940         (outgoing_cpool): Use gengtype to mark.
2941         (struct lang_type): GC struct JCF and struct CPool.
2942         * config-lang.in (gtfiles): Add jcf.h.
2943         * constants.c (find_tree_constant): New.
2944         (set_constant_entry): Allocate cpool subfields using GGC.  Update
2945         for new cpool_entry type.
2946         (find_constant1): Update for new cpool_entry type.
2947         (find_constant2): Likewise.
2948         (find_utf8_constant): Use find_tree_constant.
2949         (find_class_or_string_constant): Remove unnecessary cast to jword.
2950         Update for new cpool_entry type.
2951         (count_constant_pool_bytes): Update for new cpool_entry type.
2952         (write_constant_pool): Likewise.
2953         (alloc_name_constant): Use find_tree_constant.
2954         (build_constants_constructor): Update for new cpool_entry type.
2955
2956         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
2957
2958         * parse.y (mark_parser_ctxt): Delete.
2959         (goal): Don't use ggc_add_root.
2960         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2961         (java_pop_parser_context): Let GC free parser_ctxt.
2962         (java_parser_context_resume): Likewise.
2963         * parse.h (struct parser_ctxt): Use gengtype to mark.
2964         (ctxp): Likewise.
2965         (ctxp_for_generation): Likewise.
2966         * lex.h (struct java_lc_s): Mark for gengtype.
2967         (java_lexer): Rearrange for gengtype.
2968         * config-lang.in (gtfiles): Add lex.h, parse.h.
2969
2970 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2971
2972         * All Files: Remove PARAMS macro.
2973
2974         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2975         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2976         `__STDC__' macros.
2977
2978         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2979         VA_CLOSE.
2980
2981 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2982
2983         * Make-lang.in (java.install-common, java.uninstall,
2984         java.install-info, java.install-man): Prepend $(DESTDIR)
2985         to destination paths in all (un)installation commands.
2986         (java.install-common): Rewrite $(LN) command to support
2987         DESTDIR with "ln" as well as with "ln -s".
2988
2989 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2990
2991         * java-tree.h: Protect against multiple inclusion.
2992
2993 2003-01-07  Tom Tromey  <tromey@redhat.com>
2994
2995         * class.c (add_assume_compiled): Don't adjust parent if we're
2996         already at the root of tree.
2997
2998 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2999
3000         * lang.c (dump_compound_expr): Prototype.
3001
3002 2003-01-03  Tom Tromey  <tromey@redhat.com>
3003
3004         Fix for PR java/8712:
3005         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
3006         when simply checking against `null'.
3007
3008 2003-01-03  Tom Tromey  <tromey@redhat.com>
3009
3010         * gcj.texi (Standard Properties): Document http.proxyHost and
3011         http.proxyPort.
3012
3013         * gcj.texi (GNU Classpath Properties): Document new properties.
3014
3015 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
3016
3017         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
3018         java/lang-options.h, java/mangle.c, java/mangle_name.c,
3019         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
3020
3021 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
3022
3023         * Make-lang.in, boehm.c, buffer.c,
3024           buffer.h, builtins.c, class.c,
3025           config-lang.in, constants.c,
3026           convert.h, decl.c, except.c,
3027           expr.c, java-except.h,
3028           java-tree.h, javaop.def,
3029           jcf-parse.c, jcf-write.c,
3030           jv-scan.c, jvgenmain.c,
3031           jvspec.c, keyword.gperf,
3032           keyword.h, lang-options.h,
3033           lang-specs.h, lang.c, lex.c,
3034           lex.h, mangle.c, mangle_name.c,
3035           parse-scan.y, parse.h, parse.y,
3036           typeck.c, verify.c, xref.c,
3037           xref.h: Replace "GNU CC" with
3038           "GCC" in the copyright header.
3039
3040         * check-init.c, gjavah.c, javaop.h,
3041           jcf-depend.c, jcf-dump.c, jcf-io.c,
3042           jcf-path.c, jcf-reader.c, jcf.h,
3043           zextract.c, zipfile.h: These files are
3044           "part of GCC". Also say "GCC" not "GNU CC".
3045
3046 2002-12-30  DJ Delorie  <dj@redhat.com>
3047
3048         * Make-lang.in: Protect against texi2pod/pod2man failing.
3049
3050 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
3051
3052         * gcj.texi: Use @copying.
3053
3054 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
3055
3056         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
3057         print_cxx_classname.
3058         (print_cxx_classname): Add add_scope parameter.
3059         (print_class_decls): Do not emit a semicolon after the extern
3060         "Java" block.
3061         (process_file): Adjust calls to print_cxx_classname.
3062
3063 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
3064
3065         * gcj.texi: Include Cover Texts in man page.
3066
3067 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
3068
3069         * class.c (build_static_field_ref): Check FIELD_FINAL.
3070
3071         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
3072         instead of current_constant_pool_data_ref.
3073         * java-tree.h (current_constant_pool_data_ref): Undefine.
3074         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
3075         * jcf-parse.c (init_outgoing_cpool): Don't initialize
3076         current_constant_pool_data_ref.
3077
3078         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
3079         not build_internal_class_name.
3080
3081         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
3082         Use it when class ref isn't certain to be compiled.
3083
3084 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
3085
3086         * gcj.texi: Include gcc-common.texi.
3087         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
3088         $(srcdir)/doc/include/gcc-common.texi.
3089
3090 2002-12-22  Anthony Green  <green@redhat.com>
3091
3092         * gcj.texi (Limitations): Add note about org.xml.sax and
3093         org.w3c.dom.
3094
3095 2002-12-20  Tom Tromey  <tromey@redhat.com>
3096
3097         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
3098         where minimum case value is Integer.MIN_VALUE.
3099         Fixes PR java/8955.
3100
3101 2002-12-18  Andrew Haley  <aph@redhat.com>
3102
3103         * parse.y (patch_invoke): Force evaluation order when `check' is
3104         set.  For PR libgcj/8945.
3105
3106 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
3107
3108         * gcj.texi: Change version number to 3.4.
3109
3110 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
3111         Andrew Haley <aph@redhat.com>
3112
3113         * parse.y (source_end_java_method): Remove custom encoding of line
3114         numbers for a function decl before passing it to the back end.
3115
3116 2002-12-03  Andrew Haley  <aph@redhat.com>
3117
3118         * class.c (make_class_data): New field, "chain".
3119         * decl.c (java_init_decl_processing): Likewise.
3120
3121 2002-12-02  Tom Tromey  <tromey@redhat.com>
3122
3123         For PR java/8740:
3124         * parse.y (do_resolve_class): Handle qualified name via
3125         recursion.
3126
3127 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
3128
3129         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
3130         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
3131         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
3132         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
3133         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
3134         Include coretypes.h and tm.h.
3135         * Make-lang.in: Update dependencies.
3136
3137 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3138
3139         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
3140
3141 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
3142
3143         * jcf-reader.c: Don't expand JCF_readu4 inside the
3144         expansion of JCF_SKIP.
3145
3146 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
3147
3148         * jcf-reader.c: Don't expand JCF_readu4 inside the
3149         expansion of JCF_SKIP.
3150
3151 2002-11-22  Tom Tromey  <tromey@redhat.com>
3152
3153         * parse.y (patch_binop): Cast right hand side of shift expression
3154         to `int'.  Fixes PR java/8676.
3155
3156 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
3157             Andrew Haley <aph@redhat.com>
3158
3159         * gcc/java/jcf-write.c (write_classfile): Remove target
3160         class file, if it exists, before renaming the temporary
3161         class file to it.
3162
3163 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3164
3165         * jvspec.c (lang_specific_spec_functions): New.
3166
3167 2002-11-18  Tom Tromey  <tromey@redhat.com>
3168
3169         Fix for PR java/7912:
3170         * expr.c (can_widen_reference_to): Allow cast of array to
3171         Cloneable or Serializable.
3172         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
3173         (java_io_serializable_identifier_node): Likewise.
3174         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
3175         (valid_ref_assignconv_cast_p): Use new identifier nodes.
3176         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
3177         java_io_serializable.
3178         * decl.c (java_init_decl_processing): Initialize
3179         java_lang_cloneable_identifier_node and
3180         java_io_serializable_identifier_node.
3181         (java_lang_cloneable_identifier_node): New global.
3182         (java_io_serializable_identifier_node): Likewise.
3183
3184 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
3185
3186         * buffer.c: Remove unnecessary casts.
3187         * check-init.c: Likewise.
3188         * class.c: Likewise.
3189         * constants.c: Likewise.
3190         * decl.c: Likewise.
3191         * except.c: Likewise.
3192         * gjavah.c: Likewise.
3193         * jcf-io.c: Likewise.
3194         * jcf-parse.c: Likewise.
3195         * jcf-path.c: Likewise.
3196         * jvspec.c: Likewise.
3197         * lang.c: Likewise.
3198         * lex.c: Likewise.
3199         * verify.c: Likewise.
3200
3201 2002-11-06  Tom Tromey  <tromey@redhat.com>
3202
3203         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
3204         a JNI header.
3205
3206 2002-11-05  Tom Tromey  <tromey@redhat.com>
3207
3208         Fix for PR java/6388.
3209         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
3210         * java-tree.h (enum java_tree_index): New values
3211         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
3212         (decimal_int_max, decimal_long_max): New defines.
3213         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
3214         (error_if_numeric_overflow): Rewrote range checking.
3215         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
3216         decimal_long_max.
3217
3218 2002-11-02  Tom Tromey  <tromey@redhat.com>
3219
3220         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
3221
3222         * class.c (make_method_value): Put class name, not signature, into
3223         `throws' field.  For PR java/8415.
3224
3225 2002-10-24  Tom Tromey  <tromey@redhat.com>
3226
3227         * gcj.texi (Invoking gij): Document --showversion.
3228         (Standard Properties): java.library.path now set.
3229
3230 2002-10-23  Tom Tromey  <tromey@redhat.com>
3231
3232         * gjavah.c (decode_signature_piece): In JNI mode, print
3233         `jobjectArray' when array depth is nonzero.
3234         Fixes PR java/8296.
3235
3236 2002-10-15  Andrew Haley  <aph@redhat.com>
3237
3238         * parse.y (patch_invoke): Call force_evaluation_order on a static
3239         arg list.
3240         (resolve_qualified_expression_name): Call force_evaluation_order
3241         on a arg list that is part of a Qualified Expression Name.
3242
3243         * lang.c (dump_compound_expr): New.
3244         (java_dump_tree): New.
3245
3246 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
3247
3248         * gcj.texi: Added item describing the GCJ runtime property
3249         "gnu.gcj.progname".
3250
3251 2002-10-15  Richard Henderson  <rth@redhat.com>
3252
3253         * jcf-parse.c (get_constant): Fix type warning.
3254
3255 2002-10-15  Andrew Haley  <aph@redhat.com>
3256
3257         * java-tree.h (java_inlining_merge_static_initializers): Declare.
3258         (java_inlining_map_static_initializers): Declare.
3259
3260 2002-10-14  Andrew Haley  <aph@redhat.com>
3261
3262         * tree-inline.c (remap_block): All local class initialization
3263         flags go in the outermost scope.
3264         (expand_call_inline): Call java_inlining_map_static_initializers.
3265         (expand_call_inline): Call java_inlining_merge_static_initializers.
3266         * java/lang.c (merge_init_test_initialization): New.
3267         (java_inlining_merge_static_initializers): New.
3268         (inline_init_test_initialization): New.
3269         (java_inlining_map_static_initializers): New.
3270
3271 2002-10-11  Mark Wielaard  <mark@klomp.org>
3272
3273         * gcj.texi (Compatibility): Add Limitations and Extensions section.
3274
3275 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3276
3277         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
3278
3279 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3280
3281         * parse.y (merge_string_cste): Add parentheses around & within |.
3282
3283 2002-10-08  Tom Tromey  <tromey@redhat.com>
3284
3285         * parse.y (variable_declarator_id): Simplify error path for
3286         array declarator error.  For PR java/8003.
3287
3288 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
3289
3290         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
3291         bug_report_url.
3292
3293 2002-10-08  Andrew Haley  <aph@redhat.com>
3294
3295         * parse.y (attach_init_test_initialization_flags): Check for
3296         error_mark_node.
3297
3298 2002-10-07  Anthony Green  <green@redhat.com>
3299
3300         * parse.y (merge_string_cste): Fix bug in string concatenation.
3301
3302 2002-10-03  Michael Koch  <konqueror@gmx.de>
3303
3304         * gcj.texi (Standard properties):
3305         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
3306
3307 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3308
3309         PR optimization/6627
3310         * lang.c (java_init): If storing the vbit in function
3311         pointers, ensure that force_align_functions_log is atleast
3312         one to aid compatability with g++ vtables.
3313
3314 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
3315
3316         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
3317         foul of type-based aliasing.
3318
3319 2002-09-30  Anthony Green  <green@redhat.com>
3320
3321         * gcj.texi (Invoking jv-scan): Fix texinfo.
3322
3323 2002-09-28  Anthony Green  <green@redhat.com>
3324
3325         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
3326         (Code Generation): Add -fno-assert documentation.
3327         * jv-scan.c (flag_assert): New global.
3328         (options): Add assert option.
3329         (help): Add --no-assert documentation.
3330         * parse-scan.y (flag_assert): New global.
3331         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
3332         (flag_assert): New global.
3333         * java-tree.h (flag_assert): New global.
3334         * lex.c (java_lex): Obey flag_assert.
3335         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
3336         calling cc1.
3337
3338 2002-09-26  Andrew Haley  <aph@redhat.com>
3339
3340         * expr.c (build_java_array_length_access): Check for null pointer.
3341         * expr.c (expand_java_arrayload): Likewise.
3342
3343 2002-09-21  Richard Henderson  <rth@redhat.com>
3344
3345         * jcf-parse.c (get_constant): Decode from IEEE no matter
3346         what the target format.
3347
3348 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
3349
3350         * ChangeLog: Follow spelling conventions.
3351         * class.c: Likewise.
3352         * decl.c: Likewise.
3353         * expr.c: Likewise.
3354         * gjavah.c: Likewise.
3355         * java-tree.h: Likewise.
3356         * jcf-dump.c: Likewise.
3357         * jcf-parse.c: Likewise.
3358         * jvspec.c: Likewise.
3359         * lang.c: Likewise.
3360         * mangle.c: Likewise.
3361         * parse.y: Likewise.
3362
3363 2002-09-17  Tom Tromey  <tromey@redhat.com>
3364
3365         * lex.c (java_read_unicode_collapsing_terminators): Handle case
3366         where \r appears at EOF.  Fixes PR java/7950.
3367
3368 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3369
3370         * jvspec.c (lang_specific_driver): Remove unused variable.
3371
3372 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3373
3374         * java-tree.h (union lang_tree_node): Add chain_next option.
3375
3376 2002-09-16  Richard Henderson  <rth@redhat.com>
3377
3378         * jcf-parse.c (get_constant): Runtime check for IEEE format;
3379         use new real.h interface.
3380         * jcf-write.c (find_constant_index): Use new real.h interface.
3381         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
3382
3383 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3384
3385         * lang.c: Follow spelling conventions.
3386
3387 2002-09-11  Per Bothner  <per@bothner.com>
3388
3389         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
3390         constant to the type of the field.
3391         (java_complete_tree):  Remove now-redundant code.
3392
3393         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
3394
3395 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
3396
3397         For PR java/5794:
3398         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
3399         return label if a ret instruction for the jsr has been reached.
3400
3401 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
3402
3403         * parse.y (DIR_SEPARATOR): Don't define.
3404         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
3405
3406 2002-08-28  Andrew Haley  <aph@redhat.com>
3407
3408         * verify.c (verify_jvm_instructions): Allow exception handler
3409         inside code that is being protected, but generate a warning.
3410         * except.c (link_handler): Initialize `expanded' in new eh_range.
3411         (binding_depth, is_class_level, current_pc): Declare extern.
3412
3413 2002-09-01  Mark Wielaard <mark@klomp.org>
3414
3415         * gcj.texi: Add chapter about system properties.
3416         Fixed some typos.
3417
3418 2002-08-26  Tom Tromey  <tromey@redhat.com>
3419
3420         * parse.y (try_builtin_assignconv): Allow narrowing primitive
3421         conversion if RHS_TYPE is byte, short, or char.
3422
3423 2002-08-22  Tom Tromey  <tromey@redhat.com>
3424
3425         * gcj.texi (Invoking gij): Document -cp and -classpath.
3426
3427 2002-08-21  Tom Tromey  <tromey@redhat.com>
3428
3429         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
3430         $(prefix)/share.  For PR libgcj/7633.
3431
3432         For PR java/6005 and PR java/7611:
3433         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
3434         (java_can_use_bit_fields_p): New function.
3435
3436 2002-08-16  Tom Tromey  <tromey@redhat.com>
3437
3438         * gcj.texi (Class Initialization): Mention class initialization of
3439         arrays.
3440
3441 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
3442
3443         * Make-lang.in (java-tree-inline.o): New.
3444         (JAVA_OBJS): Add java-tree-inline.o.
3445         * parse.y (source_end_java_method): Call java_optimize_inline.
3446         (java_expand_method_bodies): Save method's tree in
3447         DECL_SAVED_TREE.
3448         (add_stmt_to_compound): Keep track of the number of statments.
3449         * lang.c (java_init): Enable flag_inline_trees.
3450         (java_post_options): If flag_inline_functions is on, enable
3451         flag_inline_trees instread.
3452         (decl_constant_value): New.
3453         (java_tree_inlining_walk_subtrees): New.
3454         * java-tree.h (DECL_NUM_STMTS): New macro.
3455         (java_optimize_inline): Declare.
3456         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
3457         Handle a LABEL_EXPR.
3458         * decl.c (build_result_decl): If we already have a DECL_RESULT
3459         don't make another.
3460         (dump_function): New.
3461         (java_optimize_inline): New.
3462         (dump_function): New.
3463
3464 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
3465
3466         For PR java/7483:
3467         * parse.y (build_assertion): Invert return from
3468         desiredAssertionStatus.
3469
3470 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3471
3472         * jcf-write.c (get_access_flags): Return correct access flags for
3473         private and protected inner classes.
3474
3475 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3476
3477         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
3478
3479 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
3480
3481         * mangle_name.c: Don't include obstack.h twice.
3482         * xref.c: Don't include obstack.h.
3483
3484 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
3485
3486         * class.c: (permanent_obstack): Delete declaration.
3487         * constants.c: (permanent_obstack): Delete declaration.
3488         * except.c: (permanent_obstack): Delete declaration.
3489         * expr.c: (permanent_obstack): Delete declaration.
3490         * jcf-parse.c: (permanent_obstack): Delete declaration.
3491         (saveable_obstack): Delete declaration.
3492         * parse.h: (permanent_obstack): Delete declaration.
3493         * typeck.c: (permanent_obstack): Delete declaration.
3494
3495 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
3496
3497         * gcj.texi (version-gcc): Increase to 3.3.
3498
3499 2002-07-22  Tom Tromey  <tromey@redhat.com>
3500
3501         * lex.c (java_lex): Check for `e' or `E' after 0.
3502
3503 2002-07-21  Richard Henderson  <rth@redhat.com>
3504
3505         * lang.c (java_unsafe_for_reeval): New.
3506         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
3507
3508 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
3509
3510         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
3511         (jcf_path_init): Use GET_ENVIRONMENT.
3512
3513 2002-07-10  Roger Sayle  <roger@eyesopen.com>
3514             Zack Weinberg <zack@codesourcery.com>
3515
3516         * builtins.c (initialize_builtins): Remove defines that
3517         handled C/C++ specific junk hereby removed from builtins.def.
3518
3519 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
3520
3521         * lang.c (java_post_options): Update prototype.
3522
3523 2002-07-05  Roger Sayle  <roger@eyesopen.com>
3524
3525         * builtins.c (initialize_builtins): Ignore the additional
3526         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
3527         the builtins.def file.
3528
3529 2002-07-01  Tom Tromey  <tromey@redhat.com>
3530
3531         For PR libgcj/7073:
3532         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
3533         specially.
3534
3535 2002-07-01  Roger Sayle  <roger@eyesopen.com>
3536
3537         * java/decl.c (builtin_function): Accept additional parameter.
3538         (java_init_decl_processing): Pass an additional NULL_TREE
3539         argument to builtin_function.
3540
3541 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
3542
3543         * gcj.texi: Fixed gcj invocation example so that it compiles.
3544
3545 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3546
3547         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
3548         * parse.y (mark_parser_ctxt): Likewise.
3549         (check_modifiers, declare_local_variables): Avoid incorrect
3550         hardcoded constant 10.
3551
3552         * lex.c (java_read_char): Avoid "comparison is always true"
3553         warning.
3554
3555 2002-06-25  Andreas Schwab  <schwab@suse.de>
3556
3557         * expr.c (JSR): Avoid undefined operation on PC.
3558
3559 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3560
3561         * decl.c (clear_binding_level): Const-ify.
3562
3563 2002-06-13  Akim Demaille  <akim@epita.fr>
3564
3565         * parse.y (class_declaration, interface_declaration): Make sure
3566         all their rules have an action, in order to avoid meaningless `$$
3567         = $1' and their type clashes.
3568
3569 2002-06-11  Tom Tromey  <tromey@redhat.com>
3570
3571         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
3572         * parse-scan.y (statement_without_trailing_substatement): Added
3573         assert_statement.
3574         (assert_statement): New rule.
3575         * java-tree.h (struct lang_type) [assertions]: New field.
3576         (TYPE_USES_ASSERTIONS): New macro.
3577         (CLASS_USES_ASSERTIONS): Likewise.
3578         (FIELD_SYNTHETIC): New define.
3579         * lex.c (java_lval;): Added ASSERT_TK.
3580         * parse.y (ASSERT_TK): Added.
3581         (statement_without_trailing_substatement): Added assert_statement.
3582         (assert_statement): New rule.
3583         (build_assertion): New function.
3584         (maybe_generate_pre_expand_clinit): Create and initialize
3585         $assertionsDisabled.
3586         (lookup_package_type): Removed decl.
3587         * keyword.h: Rebuilt.
3588         * keyword.gperf (assert): New token.
3589
3590 2002-06-10  Akim Demaille  <akim@epita.fr>
3591
3592         * parse.y (interface_type_list, class_member_declaration)
3593         (unary_expression_not_plus_minus): Remove duplicate %type.
3594         Whitespace changes.
3595
3596 2002-06-09  Tom Tromey  <tromey@redhat.com>
3597
3598         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
3599
3600         * parse.y (method_header): Give error message in all cases.
3601         Fixes PR java/6865.
3602
3603 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3604
3605         Don't use RTL inlining. Fix for PR java/6820.
3606         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
3607         (flag_really_inline): New.
3608         (java_decode_option): Set flag_really_inline if -finline-functions
3609         is seen.
3610         (java_post_options): New function. Turn off inlining unless
3611         flag_really_inline is set.
3612
3613 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3614
3615         * gjavah.c (throwable_p): Accept argument as either a classname or
3616         signature fragment. Create null-terminated classname string for super
3617         when calling itself recursively.
3618         (decode_signature_piece): Skip first character from class name
3619         signature when calling throwable_p.
3620
3621 2002-06-08  H.J. Lu  (hjl@gnu.org)
3622
3623         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
3624
3625 2002-06-04  Tom Tromey  <tromey@redhat.com>
3626
3627         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
3628
3629 2002-06-04  Michael Koch  <konqueror@gmx.de>
3630
3631         * gcj.texi (Input Options): Fixed typo.
3632
3633 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
3634
3635         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
3636         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
3637         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
3638         and all now-pointless local variables.  Rename other local
3639         variables to reflect their not being handles.
3640
3641         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
3642         #if JCF_USE_STDIO blocks.
3643
3644         * parse.y: Add missing semicolon at end of rule.
3645
3646 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
3647
3648         * check-init.c (attach_initialized_static_class): Delete, unused.
3649         * parse.y: Use htab_t instead of struct hashtable, update
3650         all uses.
3651         * java-tree.h: Include hashtab.h instead of hash.h.
3652         (struct lang_decl_func): Use htab_t, set up for gengtype.
3653         (struct init_test_hash_entry): Delete.
3654         (struct treetreehash_entry): New.
3655         (java_treetreehash_find): New
3656         (java_treetreehash_new): New prototype.
3657         (java_treetreehash_create): New prototype.
3658         (java_mark_tree): Delete prototype.
3659         (java_hash_hash_tree_node): Delete prototype.
3660         (java_hash_compare_tree_node): Delete prototype.
3661         (attach_initialized_static_class): Delete prototype.
3662         * expr.c (build_class_init): Update to use java_treetreehash
3663         functions.
3664         (java_expand_expr): Update to use htab_t.
3665         (emit_init_test_initialization): Likewise.
3666         * decl.c (java_mark_tree): Delete.
3667         * class.c (init_test_hash_newfunc): Delete.
3668         (java_hash_hash_tree_node): Delete.
3669         (java_hash_compare_tree_node): Delete.
3670         (add_method_1): Update to use java_treetreehash functions.
3671         (JAVA_TREEHASHHASH_H): New macro.
3672         (java_treetreehash_hash): New function.
3673         (java_treetreehash_compare): New function.
3674         (java_treetreehash_find): New function.
3675         (java_treetreehash_new): New function.
3676         (java_treetreehash_create): New function.
3677         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
3678
3679         * Make-lang.in (java/parse.o): Depend on debug.h.
3680         * java-tree.h (struct lang_identifier): Use gengtype.
3681         (union lang_tree_node): New.
3682         (struct lang_decl_func): Use gengtype.
3683         (struct lang_decl_var): Likewise.
3684         (struct lang_decl): Likewise.
3685         * parse.y: Include debug.h.
3686         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
3687
3688         * lang.c (struct language_function): New dummy structure.
3689
3690         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
3691         descriminator for DECL_LANG_SPECIFIC.
3692         (struct lang_decl_func): Rename from struct lang_decl.
3693         (enum lang_decl_desc): New.
3694         (struct lang_decl): Make it a union.  Update all the accessor macros.
3695         (struct lang_type): Use gengtype.
3696         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
3697         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
3698         are now the same size.
3699         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
3700         use discriminator to mark DECL_LANG_SPECIFIC.
3701
3702         * Make-lang.in (gt-java-builtins.h): New rule.
3703         (java/builtins.o): Add dependency on gt-<filename>.h.
3704         * builtins.c: Use gengtype for roots.
3705         (union string_or_tree): Use gengtype.
3706         (struct builtin_record): Use gengtype.
3707         * config-lang.in (gtfiles): Add builtins.c.
3708
3709         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
3710         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
3711         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
3712         gt-java-parse.h, gtype-java.h): Add rules to generate.
3713         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
3714         (class.o): Add dependency on gt-*.h.
3715         (constants.o): Likewise.
3716         (decl.o): Likewise.
3717         (expr.o): Likewise.
3718         (jcf-parse.o): Likewise.
3719         (jcf-write.o): Likewise.
3720         (lang.o): Likewise.
3721         * config-lang.in (gtfiles): New.
3722         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3723         * constants.c: Replace uses of ggc_add_* with GTY markers.
3724         Include gt-*.h.
3725         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3726         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3727         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
3728         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
3729         Include gt-*.h.
3730         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
3731         Include gt-*.h.
3732         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3733         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
3734         gt-*.h.
3735         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
3736         Include gtype-java.h.
3737
3738 2002-06-02  Tom Tromey  <tromey@redhat.com>
3739
3740         Fix for PR java/5913:
3741         * parse.y (patch_binop): Call patch_string on op1.
3742
3743 2002-06-02  Tom Tromey  <tromey@redhat.com>
3744
3745         Fix for PR java/1343, PR java/6336:
3746         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
3747         formatting.  Changed return type.
3748         (anonymous_class_counter): Moved to top of file.
3749         (maybe_make_nested_class_name): Append number to class name for
3750         function-local classes.
3751
3752 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3753
3754         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
3755         * Make-lang.in: Update dependency lists.
3756
3757 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
3758
3759         * gjavah.c (throwable_p): Do not free the name of the class after
3760         passing it to find_class.
3761         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
3762         * jcf-io.c (dirent.h): Include it.
3763         (fnmatch.h): Likewise.
3764         (compare_path): New function.
3765         (java_or_class_file): Likewise.
3766         (memoized_dirlist_entry): New type.
3767         (memoized_dirlist_lookup_eq): New function.
3768         (memoized_dirlists): New variable.
3769         (caching_stat): New function.
3770         (memoized_class_lookup_eq): New function.
3771         (memoized_class_lookups): Likewise.
3772         (find_class): Use memoized_class_lookups and caching_stat.
3773         * jcf.h (JCF_USE_SCANDIR): Define.
3774         * parse.y (java_expand_classes): Write the class files in reverse
3775         order.
3776
3777 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3778
3779         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
3780
3781 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
3782
3783         * jcf-write.c (write_classfile): Unlink the temporary file if it
3784         cannot be renamed.  Use concat to build up the name of the
3785         temporary file.
3786
3787 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
3788
3789         * jcf-write.c (write_classfile): Write the file to a
3790         temporary file and then rename it.
3791
3792 2002-05-07  Tom Tromey  <tromey@redhat.com>
3793
3794         * gjavah.c (throwable_p): Use xstrdup, not strdup.
3795
3796         Fix for PR java/1200:
3797         * gjavah.c (throwable_p): New function.
3798         (decode_signature_piece): Use it.  A `WeakReference' isn't the
3799         same as a `jweak'.
3800         Include hashtab.h.
3801         (gcjh_streq): New function.
3802
3803 2002-05-07  Andreas Jaeger  <aj@suse.de>
3804
3805         * parse.y (finish_for_loop): Fix if statement.
3806
3807 2002-05-06  Tom Tromey  <tromey@redhat.com>
3808
3809         Fix for PR java/5941:
3810         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
3811         loop update expression.
3812         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
3813         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
3814
3815 2002-05-04  Mark Wielaard  <mark@klomp.org>
3816
3817         For PR java/6519:
3818         * parse.y (build_string_concatenation): Return just op1 only when op2
3819         is null and op1 is a STRING_CST, otherwise always construct a
3820         StringBuffer.
3821
3822 2002-04-27  Tom Tromey  <tromey@redhat.com>
3823
3824         For PR java/6382:
3825         * parse.y (string_convert_int_cst): New function.
3826         (merge_string_cste): Use it.
3827
3828 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3829
3830         * java-tree.h (java_parse_file): Update.
3831         (java_set_yydebug): Remove.
3832         * jcf-parse.c (yydebug): Remove.
3833         (java_set_yydebug): Die.
3834         (java_parse_file): Update.
3835         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3836
3837 2002-04-24  Tom Tromey  <tromey@redhat.com>
3838
3839         For PR java/6425:
3840         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
3841         EXPR_WFL_QUALIFICATION of qual_wfl.
3842
3843 2002-04-23  Per Bothner  <per@bothner.com>
3844
3845         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
3846         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
3847         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
3848
3849 2002-04-23  Tom Tromey  <tromey@redhat.com>
3850
3851         For PR java/6314:
3852         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
3853         recognize `-fcompile-resource='.
3854         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
3855         a bit.
3856
3857 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
3858
3859         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
3860         paths. Fixes PR java/2791.
3861
3862 2002-04-19  Andrew Haley  <aph@redhat.com>
3863
3864         * jcf-write.c (push_long_const): lo, hi: New variables.
3865         Use rshift_double to extract the high part of a 64-bit long.
3866         Use WORD_TO_INT to extract the low part.
3867
3868         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
3869         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
3870         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
3871
3872 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3873
3874         * typeck.c (incomplete_type_error): Remove.
3875
3876 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3877
3878         * class.c (make_class_data): Set DECL_ALIGN on static class data,
3879         for hash synchronization.
3880         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
3881         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
3882         class_type_node.
3883
3884 2002-04-16  Mark Wielaard  <mark@klomp.org>
3885
3886         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
3887         negative zero.
3888
3889 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3890
3891         Fix for PR java/6294:
3892         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3893         interfaces.
3894
3895 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3896
3897         Fix for PR java/6085:
3898         * parse.y (patch_method_invocation): Always use build_access_to_thisn
3899         to get enclosing "this" argument for inner-class constructor
3900         invocation. Pass correct arguments to build_access_to_thisn.
3901
3902 2002-04-10  Andreas Jaeger  <aj@suse.de>
3903
3904         * gcj.texi (Input Options): Fix extdirs patch.
3905
3906 2002-04-10  Anthony Green  <green@redhat.com>
3907
3908         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3909
3910 2002-04-09  Anthony Green  <green@redhat.com>
3911
3912         * gcj.texi (Input Options): Add --extdirs documentation.
3913         * jcf-dump.c (OPT_extdirs): New macro.
3914         (options): Add extdirs option.
3915         (help): Describe --extdirs.
3916         (main): Handle OPT_extdirs.
3917         * gjavah.c (OPT_extdirs): New macro.
3918         (options): Add extdirs option.
3919         (help): Describe --extdirs.
3920         (main): Handle OPT_extdirs.
3921         * jcf-path.c (jcf_path_init): Add extdirs support.
3922         (jcf_path_extdirs_arg): New function.
3923         (extensions): New variable to hold extensions path entries.
3924         * jvspec.c: Remove -fextdirs= when compiling main().
3925         * lang.c (java_decode_option): Handle -fextdirs=.
3926         * jcf.h (jcf_path_extdirs_arg): Declare new function.
3927         * Make-lang.in: Compile jcf-path with version info for use in
3928         identifying the appropriate libgcj.jar.
3929
3930 2002-04-08  Tom Tromey  <tromey@redhat.com>
3931
3932         For PR libgcj/5303:
3933         * .cvsignore: Added rmic.1 and rmiregistry.1.
3934         * gcj.texi (Top): Link to new nodes.
3935         (Invoking rmic): New node.
3936         (Invoking rmiregistry): Likewise.
3937         * Make-lang.in (java.generated-manpages): Added rmic.1 and
3938         rmiregistry.1.
3939         (java.maintainer-clean): Likewise.
3940         ($(srcdir)/java/rmic.1): New target.
3941         ($(srcdir)/java/rmiregistry.1): Likewise.
3942         (java.install-man): Handle rmic.1 and rmiregistry.1.
3943
3944 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3945
3946         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3947         Add note about handling uncaught exceptions. Add an exception handler
3948         to example.
3949
3950 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3951
3952         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3953         after using it to patch CALL_EXPR.
3954
3955 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3956
3957         * gcj.texi (Invocation): Document CNI invocation API.
3958
3959 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
3960
3961         * expr.c (truthvalue_conversion): Rename.  Update.
3962         (expand_compare): Update.
3963         * java-tree.h (java_truthvalue_conversion): New.
3964         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3965
3966 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3967
3968         * java-tree.h (java_mark_addressable): New.
3969         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3970         * typeck.c (mark_addressable): Rename, update.
3971
3972 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3973
3974         * expr.c (build_java_binop): Update.
3975         * java-tree.h (java_signed_type, java_unsigned_type,
3976         java_signed_or_unsigned_type): Update.
3977         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3978         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3979         * parse.y (patch_binop): Update.
3980         * typeck.c (signed_or_unsigned_type, unsigned_type,
3981         signed_type): Update.
3982
3983 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
3984
3985         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3986         (java_dummy_print): Remove.
3987         (lang_print_error): Rename.  Exit early if inhibiting output.
3988         (inhibit_error_printing_function): New.
3989         (java_init): Don't set hook.
3990         (lang_init_source): Use new boolean.
3991
3992 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
3993
3994         * parse.y (do_resolve_class): Fix infinite recursion.
3995
3996 2002-03-29  Tom Tromey  <tromey@redhat.com>
3997
3998         * parse.y (check_inner_circular_reference): Ignore incomplete
3999         types.
4000
4001 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4002
4003         * Make-lang.in (builtins.o): Update.
4004         * boehm.c (get_boehm_type_descriptor): Update.
4005         * builtins.c: Include langhooks.h.
4006         * decl.c (java_init_decl_processing): Update.
4007         * java-tree.h (java_type_for_mode, java_type_for_size): New.
4008         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
4009         Redefine.
4010         * typeck.c (type_for_mode, type_for_size): Update.
4011
4012 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
4013
4014         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
4015
4016 2002-03-28  Tom Tromey  <tromey@redhat.com>
4017
4018         * except.c (expand_end_java_handler): If the handler type is NULL,
4019         use java.lang.Throwable.  Fixes PR java/5986.
4020
4021 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4022
4023         Fix for PR java/4715:
4024         * jcf-parse.c (parse_source_file_3): New function.
4025         (read_class): Call it.
4026         (java_parse_file): Likewise.
4027
4028 2002-03-28  Jan Hubicka  <jh@suse.cz>
4029
4030         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
4031
4032 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4033
4034         * parse.y (resolve_package): Initialize "decl".
4035         (lookup_package_type): Remove unused function.
4036
4037 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4038
4039         Fix for PR java/5993:
4040         * parse.y (resolve_package): Return the decl if resolution was
4041         successful. Don't special case "java.lang" and "java.lang.reflect"
4042         packages. Set type_name to the merged identifier.
4043         (resolved_qualified_expression_name): Print error using "name" if
4044         resolve_package returns NULL_TREE.
4045
4046 2002-03-27  Tom Tromey  <tromey@redhat.com>
4047
4048         * expr.c (expand_invoke): Don't generate null pointer check if
4049         we're calling <init>.
4050
4051 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4052
4053         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
4054         fix prototype.
4055         * java-tree.h (java_lang_expand_expr): Similarly.
4056         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4057         (java_init): Don't set hook.
4058
4059 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4060
4061         Fix for PR java/5850:
4062         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
4063         context if field was not found in the current scope.
4064         * expr.c (lookup_field): Don't look in enclosing contexts.
4065
4066 2002-03-26  Tom Tromey  <tromey@redhat.com>
4067
4068         Fix for PR java/5942:
4069         * parse.y (init_src_parse): Added sanity check.
4070         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
4071         elements, not 11.
4072
4073 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4074
4075         * decl.c (lang_mark_tree): Rename java_mark_tree.
4076         * java-tree.h (java_mark_tree): New.
4077         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4078
4079 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
4080
4081         * lex.c: Change java_perform_atof to take normal parameters
4082         instead of a pointer to a parameter block.  Call it directly
4083         from java_lex.
4084
4085 2002-03-22  Mark Wielaard  <mark@klomp.org>
4086
4087         Fix for PR java/5368:
4088         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
4089         when printing error message.
4090
4091 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4092
4093         * decl.c (maybe_build_cleanup): Remove.
4094
4095 2002-03-22  Tom Tromey  <tromey@redhat.com>
4096
4097         Andrew Haley  <aph@cambridge.redhat.com>
4098
4099         * expr.c (build_field_ref): Don't build a check if the field is a
4100         member of `this'.
4101
4102 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
4103
4104         Fix for PR java/6026:
4105         * lex.c (java_lex): Fix parsing of consecutive floats.
4106
4107 2002-03-21  Tom Tromey  <tromey@redhat.com>
4108
4109         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
4110         class.
4111
4112 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
4113
4114         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4115         insert_block, getdecls, kept_level_p, global_bindings_p): New.
4116
4117 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
4118
4119         * gcj.texi: @code{gcj} becomes @command{gcj}.
4120         @code{gcc} becomes @command{gcc}.
4121         GcjRaw changed to gnu.gcc.RawData.
4122
4123 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4124
4125         * decl.c (start_java_method): Use new hook.
4126         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4127         (java_init): Remove old hook.
4128
4129 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
4130
4131         * builtins.c (define_builtin): Do nothing if `type' is null.
4132         Fixes PR java/5876.
4133
4134 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4135
4136         * parse.y (parser_check_super_interface): Fix error message
4137         grammar/order.
4138
4139 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4140
4141         * jcf-parse.c (get_constant): Delete unused variables.
4142
4143 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
4144
4145         * java-tree.h (java_parse_file): New.
4146         * jcf-parse.c (yyparse): Rename java_parse_file.
4147         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4148
4149 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4150
4151         * parse.y (craft_constructor): Return the constructor decl.
4152         (java_expand_classes): Update comments.
4153         (lookup_method_invoke): Call fix_constructors immediately for
4154         anonymous class. Fixes PR java/5935.
4155
4156 2002-03-15  Anthony Green  <green@redhat.com>
4157
4158         * jcf-parse.c (yyparse): Don't emit class registration
4159         constructor when compiling resource files.
4160
4161 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4162
4163         * lang.c (java_tree_code_type, java_tree_code_length,
4164         tree_code_name): Delete.
4165         (tree_code_type, tree_code_length, tree_code_name): Define.
4166         (java_init): Don't try to copy into the various tree_code
4167         arrays.
4168
4169 2002-03-12  Tom Tromey  <tromey@redhat.com>
4170
4171         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
4172         UTF-8, not UCS-2.  Fixes PR java/5923.
4173
4174         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
4175         a call_expr wrapped in a convert.  Fixes PR java/5848.
4176
4177 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4178
4179         * jcf-write.c (write_classfile): Improve error strings.
4180
4181 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
4182
4183         * lex.c: Adjust comments to GNU standards.
4184
4185 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
4186
4187         Fix for PR java/5902:
4188         * lex.c (java_lex): Fix parsing of literals.
4189
4190 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4191
4192         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
4193         to prevent it getting evaluated twice in the store checking case.
4194         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
4195         examining OBJECT.
4196
4197 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4198
4199         * decl.c (java_init_decl_processing): Make sure class_type_node
4200         alignment is not less than 64 bits if hash synchronization is enabled.
4201
4202 2002-03-08  Per Bothner  <per@bothner.com>
4203
4204         * parse.y (java_complete_lhs):  Check if patch_assignment
4205         returned an error-mark.
4206
4207         * parse.y (try_builtin_assignconv):  Don't special-case zero.
4208
4209 2002-03-08  Per Bothner  <per@bothner.com>
4210
4211         Fix for PR java/5812.
4212         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
4213         here instead of in JSR macro.  Likewise with load_type_state call.
4214         Do the latter on if the return_pc has been verified (the jsr returns).
4215         (JSR):  Now just call build_java_jsr.
4216
4217 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
4218
4219         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
4220         (java.install-common): Link native driver to
4221         JAVA_TARGET_INSTALL_NAME.
4222
4223 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
4224
4225         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
4226         * builtins.c(sin_builtin): Likewise
4227         * builtins.c(sqrt_builtin): Likewise
4228
4229 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
4230
4231         * java/expr.c, java/jcf-parse.c, java/lex.c:
4232         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
4233         REAL_ARITHMETIC blocks unconditional.  Delete some further
4234         #ifdef blocks predicated on REAL_ARITHMETIC.
4235
4236 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4237
4238         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
4239         explicit sizeof/sizeof.
4240         * decl.c (java_init_decl_processing): Likewise.
4241         * jcf-parse.c (init_jcf_parse): Likewise.
4242         * parse.y (init_src_parse): Likewise.
4243
4244 2002-03-02  Per Bothner  <per@bothner.com>
4245
4246         Make --CLASSPATH by a synonym for --classpath and -classpath.
4247         Implement --bootclasspath.
4248         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
4249         (classpath_l):  Remove.
4250         (jcf_path_CLASSPATH_arg):  Remove.
4251         (jcf_path_bootclasspath_arg):  New function.
4252         (jcf_path_seal):  Simplify accordingly.
4253
4254         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
4255         (jcf_path_CLASSPATH):  Remove declaration.
4256         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
4257         (lang_specific_driver):  Translate -bootclasspath.
4258         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
4259         * lang.c (decode_lang_options):  Do jcf_path_init first.
4260         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
4261         * gjavah.c:  Also handle --bootclasspath.
4262         Handle --CLASSPATH as a synonum for --classpath.
4263         * jcf-dump.c: Likewise.
4264
4265         "." is not part of system path, but is the default for --classpath.
4266         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
4267         (jcf_path_seal):  Add "." if no CLASSPATH specified.
4268
4269         * gcj.texi:  Document changes.
4270
4271 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4272
4273         * expr.c (build_java_arraystore_check): Fix formatting.
4274
4275 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
4276
4277         Fix for PR java/5758, java/5632:
4278         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
4279         inner-class separator too.
4280         * parse.y (do_resolve_class): New local `decl_result.'
4281         Progressively build a name for what can have been loaded.
4282
4283 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4284
4285         * expr.c (java_array_data_offset): Removed function.
4286         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
4287         (build_java_array_length_access): Obtain "length" value using a
4288         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
4289         (build_java_arrayaccess): Correct comment. Access "data" using a
4290         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
4291         (build_java_arraystore_check): New function.
4292         (expand_java_arraystore): Use build_java_arraystore_check.
4293         * parse.y (patch_assignment): Simplify code to insert a store check
4294         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
4295         * check-init.c (check_init): Update to reflect that an array length
4296         access is now a COMPONENT_REF.
4297         * gcj.texi (Code Generation): Improve documentation of
4298         -fno-bounds-check. Add documentation for -fno-store-check.
4299         * java-tree.h (flag_store_check): Declare.
4300         (build_java_arraystore_check): Declare.
4301         * lang.c (flag_store_check): Initialize to 1.
4302         (lang_f_options): Add store-check option.
4303         * jvspec.c: Don't pass store-check option to jvgenmain.
4304         * lang-options.h: Add help string for -fno-store-check.
4305
4306 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4307
4308         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
4309         * java-tree.h (java_dup_lang_specific_decl): New.
4310         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4311
4312 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
4313
4314         * builtins.c, decl.c: Delete traditional-mode-related code
4315         copied from the C front end but not used, or used only to
4316         permit the compiler to link.
4317
4318 2002-02-22  Tom Tromey  <tromey@redhat.com>
4319
4320         Fix for PR java/2369:
4321         * jvspec.c (verify_class_name): New function.
4322         (lang_specific_driver): Call it.
4323         (JAVA_START_CHAR_P): New macro.
4324         (JAVA_PART_CHAR_P): Likewise.
4325
4326 2002-02-22  Per Bothner  <per@bothner.com>
4327
4328         * class.c:  Change vtable to be more compatible with g++ v3 abi.
4329         (get_dispatch_table):  Prepend offset-to-top (always 0) and
4330         type_info pointer (currently unimplemented hence NULL) to vtable.
4331         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
4332         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
4333         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
4334         (build_dtable_decl):  Add declarations for new fields.
4335
4336 2002-02-20  Per Bothner  <per@bothner.com>
4337
4338         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
4339         to finit$ (otherwise generate_bytecode_insns drops it). However, we
4340         don't need to set it on the COMPOUND_EXPR - the caller does that.
4341
4342 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
4343
4344         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
4345         `--CLASSPATH' becomes `--classpath.'
4346         * gjavah.c: Likewise.
4347         * jcf-dump.c: Likewise.
4348         * lang-options.h: Likewise.
4349         * lang.c: Likewise.
4350         * jcf-path.c: Updated comment.
4351         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
4352         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
4353         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
4354         (jcf_path_CLASSPATH_arg): Ditto.
4355         (classpath_u): Updated leading comment.
4356
4357 2002-02-20  Per Bothner  <per@bothner.com>
4358
4359         * builtins.c (check_for_builtin):  New function.
4360         (build_call_or_builtin):  Remove.
4361         * java-tree.h:  Update accordingly.
4362         * expr.c (expand_invoke):  Use build + check_for_builtin instead
4363         of build_call_or_builtin.
4364         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
4365         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
4366         flag (which had caused jcf-write to incorrectly emit invokevirtual).
4367
4368 2002-02-17  Tom Tromey  <tromey@redhat.com>
4369
4370         * java-tree.h (TYPE_STRICTFP): New macro.
4371         (struct lang_type) [strictfp]: New field.
4372         (CLASS_STRICTFP): New macro.
4373         (METHOD_STRICTFP): New macro.
4374         (struct lang_decl) [strictfp]: New field.
4375         * parse.y (method_header): Disallow strictfp constructor or
4376         abstract method.
4377         (STRICT_TK): Move before MODIFIER_TK.
4378         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
4379         (METHOD_MODIFIERS): Likewise.
4380         (INTERFACE_MODIFIERS): Likewise.
4381         * jcf-write.c (get_access_flags): Likewise.
4382         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
4383         (add_method_1): Likewise.
4384         (get_access_flags_from_decl): Likewise.
4385         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
4386         recognize strictfp flag.
4387         * jcf.h (ACC_STRICT): New define.
4388
4389 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
4390
4391         * class.c(build_utf8_ref): Move declaration of decl_size
4392
4393 2002-02-07  Tom Tromey  <tromey@redhat.com>
4394
4395         * gcj.texi (Input Options): --CLASSPATH does not suppress system
4396         path.
4397
4398 2002-02-04  Anthony Green  <green@redhat.com>
4399
4400         * class.c (build_utf8_ref): Put UTF-8 constants into merged
4401         sections if available.
4402
4403 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4404
4405         * parse.y (java_expand_classes): Fix typo in static field loop.
4406
4407 2002-02-02  Richard Henderson  <rth@redhat.com>
4408
4409         * class.c (add_field): Mark static fields external.
4410         (build_class_ref): Remove redundant set.
4411         * parse.y (java_expand_classes): Mark static fields of classes
4412         to be compiled as local.
4413         * jcf-parse.c (parse_class_file): Likewise.
4414
4415 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
4416
4417         * gcj.texi (About CNI): New node.
4418
4419 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4420
4421         PR java/5080
4422         * jcf-parse.c : Check for HAVE_LOCALE_H before using
4423         setlocale() with LC_CTYPE as a parameter.
4424         * jv-scan.c: Same.
4425
4426 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
4427
4428         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
4429         Follow GNU Coding Standards for --version.
4430
4431 2002-01-28  Tom Tromey  <tromey@redhat.com>
4432
4433         * expr.c (build_jni_stub): Ensure storage for `meth' is
4434         generated.
4435         * parse.y (java_complete_expand_methods): Set
4436         current_function_decl before building JNI stub.
4437
4438 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
4439
4440         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
4441         BUILT_IN_SQRTF.
4442
4443 2002-01-22  Tom Tromey  <tromey@redhat.com>
4444
4445         * decl.c (java_init_decl_processing): Use add_predefined_file.
4446         Predefine RawData.java.
4447         (predef_filenames): Removed.
4448         (java_init_decl_processing): Don't register predef_filenames.
4449         * jcf-parse.c (add_predefined_file): New function.
4450         (predefined_filename_p): Rewrote.
4451         (predefined_filename_p): No longer static.
4452         * decl.c (java_init_decl_processing): Call initialize_builtins.
4453         * Make-lang.in (JAVA_OBJS): Added builtins.o.
4454         (java/builtins.o): New target.
4455         * builtins.c: New file.
4456         * parse.y (patch_invoke): Use build_call_or_builtin.
4457         * java-tree.h (build_call_or_builtin): Declare.
4458         (initialize_builtins): Declare.
4459         (java_set_exception_lang_code): Removed unused declaration.
4460         (PREDEF_FILENAMES_SIZE): Removed.
4461         (java_tree_index): Added JTI_PREDEF_FILENAMES.
4462         (predef_filenames): New define.
4463         (add_predefined_file): Declare.
4464         (predefined_filename_p): Declare.
4465         * expr.c (expand_invoke): Use build_call_or_builtin.
4466
4467 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4468
4469         * parse.y (patch_switch_statement): Fix format specifier.
4470
4471 2002-01-16  Tom Tromey  <tromey@redhat.com>
4472
4473         More for PR java/5365:
4474         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
4475         default.
4476         (process_file): Generate include for
4477         java.lang.UnsupportedOperationExceptions.
4478
4479 2002-01-15  Andreas Jaeger  <aj@suse.de>
4480
4481         * .cvsignore: Add man pages.
4482
4483 2002-01-15  Tom Tromey  <tromey@redhat.com>
4484
4485         Fix for PR java/5365:
4486         * gjavah.c (process_file): Turn class name into a file name.
4487
4488 2002-01-14  Matthias Klose  <doko@debian.org>
4489
4490         * gcj.texi: Fix whitespace and formatting errors in the
4491         synopsis of the man pages. Update copyright.
4492
4493 2002-01-14  Tom Tromey  <tromey@redhat.com>
4494
4495         For PR libgcj/5303:
4496         * Make-lang.in (java.install-man): Handle jv-convert man page.
4497         (java.generated-manpages): Added jv-convert.1.
4498         (java.uninstall): Remove jv-convert.1.
4499         (java.maintainer-clean): Likewise.
4500         ($(srcdir)/java/jv-convert.1): New target.
4501         * gcj.texi (Top): Link to jv-convert node.
4502         (Individual utilities): Likewise.
4503         (Invoking jv-convert): New node.
4504
4505 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
4506             Martin Kahlert  <martin.kahlert@infineon.com>
4507
4508         * jcf-parse.c (get_constant): Don't swap lo/hi for big
4509         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
4510
4511 2002-01-03  Graham Stott  <grahams@redhat.com>
4512
4513         * class.c (compile_resource_file): Update copyright date.
4514         Constify filename parameter.
4515         (java-tree.h): Update copyright date.
4516         (compile_resource_file): Constify filename parameter.
4517
4518 2002-01-03  Graham Stott  <grahams@redhat.com>
4519
4520         * gcc/jcf-parse.c: Update copyright date.
4521         (yyparse): Constify resource_filename.
4522
4523 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4524
4525         * parse.y (src_parse_roots): Don't needlessly zero init.
4526
4527 2001-12-31  Tom Tromey  <tromey@redhat.com>
4528
4529         * parse.y (dump_java_tree): New function.
4530         (source_end_java_method): Call it.
4531         (end_class_declaration): Likewise.
4532         * lang.c (java_decode_option): Call dump_switch_p.
4533
4534 2001-12-28  Tom Tromey  <tromey@redhat.com>
4535
4536         * gen-table.pl: Don't process characters after \uffff.  Added
4537         comment pointing to input file.
4538
4539 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4540
4541         * gen-table.pl: Const-ify output.  Document the location of a
4542         suitable unicode input file.
4543
4544         * chartables.h: Regenerate.
4545
4546 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4547
4548         * chartables.h: Const-ify.
4549         * gjavah.c (options): Likewise.
4550         * jcf-dump.c (options): Likewise.
4551         * jv-scan.c (options): Likewise.
4552         * lex.c (java_start_char_p, java_part_char_p): Likewise.
4553         * parse.y (binop_lookup): Likewise.
4554
4555 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4556
4557         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
4558         the static arrays that are output.
4559         * jvspec.c (jvgenmain_spec): Make static.
4560         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
4561         * keyword.h: Regenerate.
4562         * lang.c (string_option, process_option_with_no, lang_f_options,
4563         lang_W_options): Const-ify.
4564         * lex.c (java_lex): Likewise.
4565
4566 2001-12-21  Richard Henderson  <rth@redhat.com>
4567
4568         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
4569         (get_boehm_type_descriptor): ... here.  Arrange for the
4570         TREE_TYPE to get set properly.
4571
4572 2001-12-21  Richard Henderson  <rth@redhat.com>
4573
4574         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
4575         only if the target requires collect2.
4576
4577         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
4578
4579 2001-12-20  Tom Tromey  <tromey@redhat.com>
4580
4581         For PR java/4509:
4582         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
4583         CAN_COMPLETE_NORMALLY for the node.
4584         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
4585         generate code for second branch if first branch can't complete
4586         normally.
4587         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
4588         the loop head if the loop body can't complete normally.
4589
4590 2001-12-20  Tom Tromey  <tromey@redhat.com>
4591
4592         For PR java/4766:
4593         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
4594         case where `finally' clause can't complete normally.
4595
4596 2001-12-20  Tom Tromey  <tromey@redhat.com>
4597
4598         Fixes PR java/5057:
4599         * parse.y (analyze_clinit_body): Added this_class parameter.
4600         Check for more cases where we must keep <clinit>.
4601         (maybe_yank_clinit): Cleaned up flow control.
4602
4603 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4604
4605         * decl.c (java_init_decl_processing): Don't initialize
4606         finit_leg_identifier_node.
4607         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
4608         (finit_leg_identifier_node): Remove.
4609         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
4610
4611 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4612
4613         * mangle.c (mangle_member_name): Don't special-case for
4614         NO_DOLLAR_IN_LABEL.
4615         * mangle_name.c (unicode_mangling_length): Likewise.
4616         (append_unicode_mangled_name): Likewise.
4617         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
4618         code.
4619
4620 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4621
4622         * expr.c (build_java_array_length_access): Don't force null pointer
4623         check unless flag_check_references is set.
4624
4625 2001-12-20  Tom Tromey  <tromey@redhat.com>
4626
4627         Fix for PR java/3417:
4628         * parse.y (patch_assignment): Added special processing for
4629         `return'.
4630         (patch_return): Don't convert booleans to integers, and don't
4631         special-case `null'.
4632
4633 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
4634
4635         * config-lang.in (diff_excludes): Remove.
4636
4637 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
4638
4639         * gcj.texi: Update link to GCC manual.
4640
4641 2001-12-17  Tom Tromey  <tromey@redhat.com>
4642
4643         * parse.y (link_nested_class_to_enclosing): Removed useless
4644         statement.
4645
4646 2001-12-16  Tom Tromey  <tromey@redhat.com>
4647
4648         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
4649         Fixes PR java/5088.
4650
4651 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
4652
4653         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
4654         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
4655         spelling errors.
4656
4657 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4658
4659         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
4660
4661 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4662
4663         * decl.c (java_init_decl_processing): Build otable_type correctly.
4664         otable_decl is an otable_type.
4665
4666 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4667
4668         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
4669         otable_type, otable_ptr_type, method_symbol_type,
4670         method_symbols_array_type, method_symbols_array_ptr_type): New
4671         field/global tree definitions.
4672         (flag_indirect_dispatch): New flag.
4673         * decl.c (java_init_decl_processing): Initialize new otable and
4674         otable_syms type nodes and decls. Add new field "index" to
4675         method_type_node.
4676         * class.c (build_method_symbols_entry): New function.
4677         (make_method_value): Set "index" to to method's vtable index for
4678         virtual methods when indirect-dispatch is not used.
4679         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
4680         and set vtable_method_count to -1. Set otable and otable_syms field
4681         if indirect-dispatch is used and there was something to put in them.
4682         (build_method_symbols_entry): New function.
4683         (emit_offset_symbol_table): New function.
4684         * expr.c (get_offset_table_index): New function.
4685         (build_invokevirtual): Build array reference to otable at the index
4686         returned by get_offset_table_index, and use the result as the vtable
4687         offset.
4688         (build_invokeinterface): Similar.
4689         * jcf-parse.c (yyparse): If indirect-dispatch, call
4690         emit_offset_symbol_table at the end of compilation, after all classes
4691         have been generated.
4692         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
4693         * lang.c (flag_indirect_dispatch): Define.
4694         (lang_f_options): Add indirect-dispatch flag.
4695
4696 2001-12-14  Matthias Klose  <doko@debian.org>
4697
4698         * gcj.texi: Markup for man page generation. Document missing
4699         options printed by <tool> --help.
4700         Terminate description of gij's -ms option with a dot.
4701         * Make-lang.in ($(srcdir)/java/*.1): New targets.
4702         (java.generated-manpages java.install-man, java.uninstall,
4703         java-maintainer-clean) Updated.
4704
4705 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
4706
4707         * class.c (get_dispatch_table): Fix java vtable layout
4708         for TARGET_VTABLE_USES_DESCRIPTORS.
4709         * decl.c (java_init_decl_processing): Initialize
4710         alloc_no_finalizer_node, finalize_identifier_node.
4711         * expr.c (class_has_finalize_method): New function.
4712         (expand_java_NEW): Generate calls for finalizer-free allocation.
4713         (build_invokevirtual): Fix java vtable layout for
4714         TARGET_VTABLE_USES_DESCRIPTORS.
4715         * java-tree.h (enum java_tree_index): New entries:
4716         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
4717         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
4718         (class_has_finalize_method): declare.
4719         (HAS_FINALIZER_P): New macro.
4720         * parse.y (patch_invoke): Generate calls for finalizer-free
4721         allocation.
4722
4723 2001-12-12  Matthias Klose  <doko@debian.org>
4724
4725         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
4726         whitespace at end of line.
4727
4728 2001-12-11  Tom Tromey  <tromey@redhat.com>
4729
4730         * lex.c (java_init_lex): Define wfl_to_string as
4731         gnu.gcj.runtime.StringBuffer unless generating bytecode.
4732
4733 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
4734
4735         * class.c (make_method_value): Use null_pointer_node to
4736         represent empty exception table.
4737
4738 2001-12-10  Tom Tromey  <tromey@redhat.com>
4739
4740         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
4741
4742 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
4743
4744         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
4745
4746 2001-12-09  Per Bothner  <per@bothner.com>
4747
4748         * check-init.c (current_switch_has_default):  New static field.
4749         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
4750         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
4751         DEFAULT_EXPR seen, simulate a default alternative that copies state.
4752
4753 2001-12-09  Tom Tromey  <tromey@redhat.com>
4754
4755         * check-init.c (check_init): Don't allow pre- or post- increment
4756         or decrement of final variable.
4757         (final_assign_error): Minor error message rewording.
4758
4759 2001-12-08  Tom Tromey  <tromey@redhat.com>
4760
4761         * java-tree.h: Fixed typo.
4762
4763         * gjavah.c (decompile_method): Don't decompile to `return this'
4764         for static methods.
4765
4766         * gjavah.c (cxx_keywords): Re-sorted.
4767         * lex.c (cxx_keywords): Re-sorted.
4768
4769         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
4770         else.
4771
4772         * gjavah.c (print_namelet): Clear subnamelets.
4773         (HANDLE_METHOD): Set `method_printed' earlier.
4774
4775 2001-12-07  Tom Tromey  <tromey@redhat.com>
4776
4777         * lang.c (lang_f_options): Added
4778         optimize-static-class-initialization.
4779         (java_decode_option): Removed special case.
4780
4781 2001-12-07  Per Bothner  <per@bothner.com>
4782
4783         * check-init.c (check_init):  Fix typo freeing memory twice.
4784
4785 2001-12-05  Per Bothner  <per@bothner.com>
4786
4787         Restore support for static class initialization optimization.
4788         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
4789         * check-init.c (check_int):  At end of BLOCK handle initialization
4790         blocks, which used to be done in java_complete_expand_method but did
4791         not handle the case where check_for_initialization might allocate
4792         more than a word of bits.
4793         * decl.c (lang_make_tree):  The smic field is now a tree.
4794         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
4795         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
4796
4797         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
4798
4799         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
4800         Change from a hash table to a list.
4801         (struct_lang_decl):  Change field 'smic' to match.
4802         * class.c (add_method_1):  Initialize
4803         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
4804         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
4805         (java_expand_method_bodies): -here, since 'smic' is now a list.
4806         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
4807
4808         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
4809
4810         * class.c (java_hash_compare_tree_node):  Fix casts.
4811
4812 2001-12-04  Per Bothner  <per@bothner.com>
4813
4814         * check-init.c:   Handle definite unassignment to finals in addition
4815         to definite assignment.
4816         (loop_current_locals):  New field.
4817         (num_current_locals, int start_current_locals, num_current_words):
4818         Make static.
4819         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
4820         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
4821         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
4822         (get_variable_decl, check_final_reassigned):  New functions.
4823         (check_init, check_bool_init):  Modify as needed for checking finals.
4824         (check_for_initialization):  Take extra parameter and return void.
4825         Do extra start-up logic to check final fields for assignment.
4826         * parse.y (check_static_final_variable_assignment_flag,
4827         reset_static_final_variable_assignment_flag, check_final_assignment,
4828         check_final_variable_local_assignment_flag,
4829         reset_final_variable_indirect_assignment_flag,
4830         reset_final_variable_global_assignment_flag):  Remove functions.
4831         (java_complete_expand_methods, outer_field_access_fix,
4832         patch_assignment): Remove no-longer used logic.
4833         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
4834         * parse.y (register_fields, java_complete_tree):  Update accordingly.
4835
4836         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
4837         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
4838         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
4839
4840         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
4841
4842         * java-tree.h (DECL FINAL):  New bit-field.
4843         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
4844         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
4845         (DECL_INIT_CALLS_THIS):  New macro.
4846         (struct lang_decl):  New bit-field init_calls_this.
4847         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
4848         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
4849         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
4850         use it for both local variables and final fields.
4851         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
4852         and local_final.
4853         (struct lang_type):  Remove hfv bit-field.
4854         (check_for_initialization):  Change to return void.
4855
4856         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
4857         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
4858         * check-init.c (final_assign_error):  New helper function.
4859         (check_final_reassigned, check_init):  Use it.
4860         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
4861
4862         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
4863         bit-fields to unsigned.
4864
4865 2001-12-03  Per Bothner  <per@bothner.com>
4866
4867         * parse.y (patch_binop):  Minor constant folding.
4868
4869         * parse.y (build_current_thisn):  Shorter 'buffer'.
4870
4871 2001-12-03  Per Bothner  <per@bothner.com>
4872
4873         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
4874         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
4875         * jcf-write.c (generate_bytecode_insns):  Remove support for
4876         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
4877         * check-init.c (check_init):  Likewise.
4878
4879 2001-12-03  Per Bothner  <per@bothner.com>
4880
4881         * verify.c (subroutine_nesting):  New function.
4882         (verify_jvm_instructions):  Use it to fix logic for checking that
4883         we're done with the current subroutine.
4884
4885         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
4886         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
4887
4888 2001-12-03  Per Bothner  <per@bothner.com>
4889
4890         * jcf.h:  Fix obvious typo in comment.
4891         * typeck.c (build_null_signature):  Add comment.
4892
4893 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4894
4895         * expr.c: Remove leading capital from diagnostic messages, as
4896         per GNU coding standards.
4897         * jcf-io.c: Similarly.
4898         * jcf-parse.c: Similarly.
4899         * jv-scan.c: Similarly.
4900         * jvspec.c: Similarly.
4901         * mangle.c: Similarly.
4902
4903 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
4904             Alexandre Petit-Bianco  <apbianco@redhat.com>
4905
4906         * expr.c (build_java_arrayaccess): Call save_expr on array for
4907         correct evaluation order, modified comment, fixed indentation.
4908         * parse.y: (patch_assignment): Correctly extract the array base
4909         from the tree generate by build_java_arrayaccess, added comments.
4910         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4911         Fixes PR java/3096, PR java/3803, PR java/3965.
4912
4913 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4914
4915         * expr.c (expand_byte_code): Remove trailing periods from messages.
4916         * jcf-parse.c (load_class, jcf_parse): Similarly.
4917         * jcf-write.c (generate_classfile): Similarly.
4918         * lex.c (java_lex): Similarly.
4919
4920 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
4921
4922         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4923
4924 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4925
4926         * Make-lang.in (java.generated-manpages): New dummy target.
4927
4928 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4929
4930         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4931         ASM_FINAL_SPEC.
4932         (lang_specific_pre_link): Use set_input to set input_filename.
4933         Append `main' here.
4934         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4935         (main): Fix definition.
4936         Strip `main' from classname.
4937         Fixes PR java/227.
4938
4939 2001-11-18  Roger Sayle <roger@eyesopen.com>
4940
4941         * parse.h (java_expand_switch): Remove old prototype.
4942
4943 2001-11-18  Tom Tromey  <tromey@redhat.com>
4944
4945         Fix for PR java/1401:
4946         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4947         arg0 is null.
4948         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4949         correctly.
4950
4951 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4952
4953         * lang.c (finish_parse): Rename to java_finish.
4954         (LANG_HOOKS_FINISH, java_finish): New.
4955
4956 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
4957
4958         * decl.c (init_decl_processing): Rename java_init_decl_processing.
4959         * java-tree.h: New prototype.
4960         * lang.c (java_init): Update prototype.  Combine with old init_parse.
4961
4962 2001-11-13  Tom Tromey  <tromey@redhat.com>
4963
4964         * gjavah.c (method_signature): New global.
4965         (HANDLE_METHOD): Set it.
4966         (decompile_return_statement): New function.
4967         (decompile_method): Use it.
4968         (print_method_info): Removed `synth' argument.
4969
4970 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4971
4972         * java-tree.h (java_set_yydebug): New.
4973         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4974         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4975         (print_lang_decl, print_lang_type, print_lang_identifier,
4976         print_lang_statistics, lang_print_xnode): Remove.
4977
4978 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4979
4980         * jcf-parse.c (init_lex): Remove.
4981         * lang.c (language_string, lang_identify): Remove.
4982         (struct lang_hooks): Constify.
4983         (LANG_HOOKS_NAME): Override.
4984         (init_parse): Update.
4985
4986 2001-11-08  Andreas Franck  <afranck@gmx.de>
4987
4988         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4989         program_transform_name the way suggested by autoconf.
4990         (java.install-common): Also transform auxiliary program names with
4991         program_transform_name.
4992
4993 2001-11-08  Tom Tromey  <tromey@cygnus.com>
4994
4995         * parse.y (trap_overflow_corner_case): New rule.
4996         (unary_expression): Use it.
4997         * lex.c (java_init_lex): Don't set minus_seen.
4998         (yylex): Don't use minus_seen.  Communicate overflow to parser for
4999         it to handle.
5000         (error_if_numeric_overflow): New function.
5001         * parse.h (minus_seen): Removed field.
5002         (JAVA_RADIX10_FLAG): New define.
5003
5004 2001-11-07  Tom Tromey  <tromey@redhat.com>
5005
5006         Patch for PR java/1414:
5007         * parse.y (case_label_list): New global.
5008         (goal): Register case_label_list with GC.
5009         (java_complete_lhs): Save new case on case_label_list.
5010         (patch_switch_statement): Check for duplicate case labels.
5011
5012 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5013
5014         * parse.y (patch_assignment): Removed unused third argument.
5015         (java_complete_lhs): Removed unused third argument to patch_assignment.
5016
5017 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5018
5019         * lang.c: Include langhooks-def.h.
5020         * Make-lang.in: Update.
5021
5022 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
5023
5024         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5025
5026 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5027
5028         * mangle.c (find_compression_record_match): Don't match compression
5029         records for package name elements unless they occur at the start of
5030         the name. Fix for PR java/4717.
5031
5032 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5033
5034         * expr.c (expand_java_field_op): Don't special-case references to
5035         java.lang.PRIMTYPE.TYPE.
5036         (build_primtype_type_ref): Removed.
5037         * java-tree.h (build_primtype_type_ref): Remove prototype.
5038         * parse.y (maybe_build_primttype_type_ref): Removed.
5039         (complete_function_arguments): Don't special-case references to
5040         java.lang.PRIMTYPE.TYPE.
5041         (patch_assignment): Likewise.
5042         (array_constructor_check_entry): Likewise.
5043
5044 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
5045
5046         * mangle.c (static tree compression_table): Fixed leading comment.
5047         * parse.h (struct parser_ctxt): Fixed field comment.
5048         * parse.y (check_pkg_class_access): New prototype, fixed leading
5049         comment, new parameter used to emit error only if passed as true.
5050         (parse_check_super): Pass extra argument to check_pkg_class_access.
5051         (do_resolve_class): Likewise.
5052         (process_imports): Likewise.
5053         (read_import_dir): Fixed indentation.
5054         (find_in_imports_on_demand): New local class_type_name. Local
5055         node_to_use deleted. while loop changed into for loop. Report
5056         multiple definition only for accessible classes. Improved error
5057         message.
5058         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
5059         assigned to parameter list, fixed indentation. while loop changed
5060         into for loop, restore TREE_CHAIN on local `tem' before the next
5061         iteration.
5062
5063 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5064
5065         * lang.c (lang_get_alias_set): Deleted.
5066
5067 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5068
5069         * gjavah.c (jni_print_char): Fix thinko in last change.
5070
5071         * gjavah.c (jni_print_char, decode_signature_piece): Use
5072         safe-ctype macros and/or fold extra calls into fewer ones.
5073         * lex.c (java_read_unicode, java_lex): Likewise.
5074         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
5075         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
5076         * mangle_name.c (append_unicode_mangled_name,
5077         unicode_mangling_length): Likewise.
5078
5079 2001-10-17  Richard Henderson  <rth@redhat.com>
5080
5081         * Make-lang.in (java/lang.o): Depend on langhooks.h.
5082
5083 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
5084
5085         * lang.c (langhooks.h): Included.
5086         (LANG_HOOKS_INIT): Redefined.
5087         (LANG_HOOKS_INIT_OPTIONS): Likewise.
5088         (LANG_HOOKS_DECODE_OPTION): Likewise.
5089         (struct lang_hooks lang_hooks): New initialization.
5090
5091 2001-10-11  Per Bothner  <per@bothner.com>
5092
5093         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
5094         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
5095         The former is simpler, and jcf-write.c handles it better.
5096         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
5097         or WITH_CLEANUP_EXPR.
5098         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
5099         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
5100
5101         * parse.y (patch_if_else_statement):  If the condition is constant,
5102         optimize away the test.
5103
5104 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5105
5106         * parse.y (patch_cast): Call patch_string on the first operand of
5107         the incoming node, update it if necessary. Fixes PR java/4510.
5108
5109 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5110
5111         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
5112         when name qualifier matches a package name.
5113
5114 2001-10-08  Tom Tromey  <tromey@redhat.com>
5115
5116         Fix for PR java/4489:
5117         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
5118         force a new label when computing `body_block'.
5119
5120 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5121
5122         * jcf-io.c (format_uint): Const-ify.
5123         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
5124         * lex.c (java_get_line_col): Likewise.
5125         * parse.y (build_incdec): Likewise.
5126
5127 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
5128
5129         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
5130         a NULL enclosing context if appropriate. Fixes PR java/4466.
5131
5132 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
5133
5134         * parse.y (patch_assignment): Use lvalue's original TYPE when
5135         building the final COMPOUND_EXPR.
5136         (try_reference_assignconv): Fixed leading comment.
5137
5138 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
5139
5140         * parse.y (check_final_variable_indirect_assignment): For
5141         COMPOUND_EXPR, return only if finals were found initialized
5142         properly, if not, keep on checking.
5143         (check_final_variable_global_assignment_flag): New local
5144         error_found, set when appropriate and used to decide whether to
5145         report uninitialized finals. Fixed typo in comment.
5146
5147 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
5148
5149         * decl.c (init_decl_processing): Fixed typo in predef_filenames
5150         last three initializations. Fixes PR java/4360.
5151
5152 2001-09-21  Richard Henderson  <rth@redhat.com>
5153
5154         * class.c (get_dispatch_table): Handle function descriptors.
5155         (build_dtable_decl): Likewise.
5156         * expr.c (build_invokevirtual): Likewise.
5157
5158 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5159
5160         * parse.y (patch_method_invocation): Build class initialization
5161         when static finals are used to qualify method invocation.
5162         Fixes PR java/4366.
5163
5164 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
5165
5166         * parse.h: (WFL_STRIP_BRACKET): Re-written using
5167         build_type_name_from_array_name.
5168         (STRING_STRIP_BRACKETS): New macro.
5169         * parse.y (build_type_name_from_array_name): New function.
5170         (array_creation_expression:): Accumulate []s instead of [s.
5171         (cast_expression:): Accumulate []s instead of [s after cast type
5172         name.
5173         (build_array_from_name): Local string deleted, use
5174         build_type_name_from_array_name.
5175         (build_unresolved_array_type): Accumulate []s instead of [s after
5176         type name.
5177         (register_fields): Fixed comment.
5178         (resolve_class): Local name, base deleted, new locals tname and
5179         array_dims. Use build_type_name_from_array_name. Use array_dims to
5180         build array type.
5181         (purify_type_name): Use STRING_STRIP_BRACKETS.
5182
5183 2001-09-18  Andreas Jaeger  <aj@suse.de>
5184
5185         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
5186         * jv-scan.c: Likewise.
5187
5188 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
5189
5190         * parse.y (patch_method_invocation): Inner class creation context
5191         check not enforced within constructors. Fixes PR java/1873.
5192
5193 2001-09-16  Tom Tromey  <tromey@redhat.com>
5194
5195         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
5196         NOTE_PUSH for single-case push.  Fixes PR java/4189.
5197
5198 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5199
5200         * java-tree.h (TYPE_IMPORT_LIST): New macro.
5201         (TYPE_IMPORT_DEMAND_LIST): Likewise.
5202         (struct lang_type): New fields import_list and import_demand_list.
5203         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
5204         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
5205         (do_resolve_class): New local saved_enclosing_type, initialized,
5206         passed as parameter to find_in_imports and find_in_imports_on_demand.
5207         (find_in_imports): Added paramater enclosing_type, use its
5208         TYPE_IMPORT_LIST when applicable.
5209         (find_in_imports_on_demand): Added parameter enclosing_type, use
5210         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
5211         declaration and initialization.
5212         (fold_constant_for_init): Switch/restore current_class to the
5213         appropriate context.
5214
5215 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
5216
5217         * verify.c (verify_jvm_instructions): Fix typo.
5218
5219 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5220
5221         * expr.c (expand_invoke): Const-ification.
5222         * parse.y (patch_method_invocation): Likewise.
5223
5224 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5225
5226         * gjavah.c (cxx_keywords): Const-ification.
5227         * keyword.gperf (java_keyword): Likewise.
5228         * lang.c (java_tree_code_name): Likewise.
5229         * lex.c (cxx_keywords): Likewise.
5230         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
5231
5232 2001-09-11  Richard Henderson  <rth@redhat.com>
5233
5234         * parse.h (ctxp_for_generation): Mark extern.
5235
5236 2001-09-10  Richard Henderson  <rth@redhat.com>
5237
5238         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
5239
5240 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
5241
5242         * typeck.c (java_array_type_length, build_prim_array_type):
5243         Represent empty arrays by NULL index.
5244
5245 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
5246
5247         * java-tree.h (compile_resource_file): Grouped with other prototypes.
5248         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
5249
5250 2001-09-06  Anthony Green  <green@redhat.com>
5251
5252         * class.c (O_BINARY): Define if necessary.
5253         (registerResource_libfunc): Declare.
5254         (init_class_processing): Initilize registerResource_libfunc.
5255         (compile_resource_file): New function.
5256         * java-tree.h (resource_name): Declare.
5257         (compile_resource_file): Declare.
5258         * jcf-parse.c (yyparse): Handle compiling java resource files.
5259         * lang.c (java_decode_option): Handle -fcompile-resource option.
5260         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
5261         resource files.
5262         * gcj.texi (Code Generation): Add documentation for -R flag.
5263
5264 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
5265
5266         * jcf-write.c (generate_classfile): Issue an error in case of
5267         field/initial value mismatch.
5268         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
5269         being initialized and we're generating bytecode.
5270         (java_complete_lhs): In MODIFY_EXPR section: added comments,
5271         set DECL_INITIAL properly when appropriate.
5272         Fixes PR java/4230
5273         Fixes PR java/4204
5274
5275 2001-09-01  Per Bothner  <per@bothner.com>
5276
5277         * parse.y (maybe_yank_clinit):  A field without an initializer is not
5278         relevant.  All initializers except static final and constant require
5279         <clinit>, regardless of flag_emit_class_files.
5280
5281 2001-08-31  Per Bothner  <per@bothner.com>
5282
5283         * class.c (set_constant_value):  When not emitting class files, then a
5284         String ConstantValue is a utf8const_ptr_type.
5285
5286 2001-08-30  Per Bothner  <per@bothner.com>
5287
5288         * jcf-write.c (generate_classfile):  Check that field is primitive
5289         or string before emitting ConstantValue attribute.
5290
5291 2001-08-30  Per Bothner  <per@bothner.com>
5292
5293         * parse.y (resolve_qualified_expression_name):  If creating a
5294         COMPOUND_EXPR, set it's type correctly.
5295
5296 2001-08-30  Per Bothner  <per@bothner.com>
5297
5298         * jcf-io.c (open_class):  Set filename field.
5299
5300         * jcf-parse,c (parse_class_file):  Set current_function_decl
5301         for better error message when Code attribute is missing.
5302
5303         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
5304         better diagnostics, especially for constructors.
5305
5306 2001-08-30  Per Bothner  <per@bothner.com>
5307
5308         * jcf-write.c (generate_classfile):  Don't write ConstantValue
5309         attribute if field is not final, for compatibility with jdk.
5310
5311         * jcf-write.c (generate_classfile):  Convert ConstantValue values
5312         to correct type.  Work-around for front-end bug.
5313         * class.c (set_constant_value):  Error if constant has wrong type.
5314
5315 2001-08-30  Per Bothner  <per@bothner.com>
5316
5317         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
5318         "Double" are printed at verbosity 1.
5319
5320         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
5321
5322         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
5323
5324 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
5325
5326         * parse.y (patch_assignment): Don't verify final re-assignment here.
5327         (java_complete_lhs): Verify assignments to finals calling
5328         patch_assignment. Verify re-assignments to finals before calling
5329         patch_assignment.
5330
5331 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
5332
5333         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
5334         Fixes PR java/1413
5335
5336 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
5337
5338         * lex.c (java_lex): new local found_hex_digits. Set and then used
5339         in test to reject invalid hexadecimal numbers.
5340         * parse.y (java_complete_tree): Prevent unwanted cast with
5341         initialized floating point finals.
5342         (patch_binop): Emit a warning when detecting a division by zero,
5343         mark result not constant, don't simplify non integer division.
5344
5345 2001-08-28  Per Bothner  <per@bothner.com>
5346
5347         * jcf-write.c  (generate_bytecode_insns):  For increments and
5348         decrements just recurse to push constant.  Improvement on Mark's patch.
5349
5350 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
5351
5352         * jcf-write.c (generate_bytecode_insns): Generate an integer to
5353         real conversion for increments and decrements of reals.
5354
5355 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5356
5357         * parse.y (resolve_qualified_expression_name): Handle unresolved
5358         qualified expressions, prevent numerical qualifiers, fixed typo.
5359         Fixes PR java/4141
5360
5361 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
5362
5363         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
5364         don't report anything but deprecated class when marked so. Handle
5365         VAR_DECL.
5366         (patch_method_invocation): Check deprecation on methods and types.
5367         (patch_binop): code becomes an enum tree_code, added default: to
5368         switch to handle that. Detect division by zero, try to fold and
5369         return before using a subroutine.
5370
5371 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
5372
5373         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
5374         file smaller than 4 bytes.
5375         * parse.y (check_inner_circular_reference): New function.
5376         (check_circular_reference): Likewise.
5377         (array_initializer:): Accept {,}.
5378         (java_check_circular_reference): Rewritten using
5379         check_circular_reference and check_inner_circular_reference.
5380         (java_complete_expand_method): Unconditionally save and restore
5381         the unpurged exception list.
5382         (build_dot_class_method_invocation): Unmangle signature parameter.
5383
5384 2001-08-21  Tom Tromey  <tromey@redhat.com>
5385
5386         * decl.c (init_decl_processing): Add `throws' field to method
5387         descriptor.
5388         * class.c (make_method_value): Compute `throws' field for method.
5389
5390 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
5391
5392         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
5393         circularity is detected.
5394         (ctors_unchecked_throws_clause_p): Fixed leading comment.
5395
5396 2001-08-17  Richard Henderson  <rth@redhat.com>
5397
5398         * class.c (emit_register_classes): Add align parameter to
5399         call to assemble_integer.
5400
5401 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
5402
5403         * jcf-parse.c (load_class): New locals saved and class_loaded. If
5404         loading a class_or_name fails, try considering an innerclass name
5405         and load the enclosing context.
5406         * parse.y (resolve_inner_class): New function.
5407         (find_as_inner_class): Added leading comment.
5408         (register_incomplete_type): Keep the current context as enclosing
5409         context for JDEP_FIELD dependencies.
5410         (do_resolve_class): Locals new_class_decl and super initialized to
5411         NULL. Call resolve_inner_class, explore the enclosing context
5412         superclass if necessary.
5413         Fixes PR java/4007
5414
5415 2001-08-16  Tom Tromey  <tromey@redhat.com>
5416
5417         * jcf-dump.c (main): Updated for change to jcf_path_seal.
5418         * gjavah.c (main): Updated for change to jcf_path_seal.
5419         * lang.c (version_flag): New global.
5420         (java_decode_option): Recognize `-version'.
5421         (java_init): Update for change to jcf_path_seal.
5422         * jcf.h (jcf_path_seal): Added `print' argument.
5423         * jcf-path.c (jcf_path_seal): Added `print' argument.
5424
5425 2001-08-13  Zack Weinberg  <zackw@panix.com>
5426
5427         * Make-lang.in (java/decl.o): Update dependencies.
5428         * decl.c: Include libfuncs.h, don't include toplev.h.
5429
5430 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
5431
5432         * decl.c (init_decl_processing): exception_type_node,
5433         class_not_found_type_node, and no_class_def_found_type_node
5434         initialized. predef_filenames augmented accordingly.
5435         instinit_identifier_node initialized.
5436         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
5437         * java-tree.h (enum java_tree_index): New entries
5438         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
5439         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
5440         (exception_type_node): New macro.
5441         (class_not_found_type_node): Likewise.
5442         (no_class_def_found_type_node): Likewise.
5443         (instinit_identifier_node): Likewise.
5444         (PREDEF_FILENAMES_SIZE): Adjusted.
5445         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
5446         (struct lang_type): Fixed typo in bitfield name.
5447         (DECL_INSTINIT_P): New macro.
5448         (ID_INSTINIT_P): Likewise.
5449         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
5450         attribute.
5451         * parse.y (encapsulate_with_try_catch): New function.
5452         (generate_instinit): Likewise.
5453         (build_instinit_invocation): Likewise.
5454         (ctors_unchecked_throws_clause_p): Likewise.
5455         (add_instance_initializer): Deleted.
5456         (build_instance_initializer): Likewise.
5457         (in_instance_initializer): Likewise.
5458         (check_method_redefinition): instinit$ not to be verified.
5459         (java_complete_expand_methods): Generate instinit$, simplified code.
5460         (build_dot_class_method): Eliminated unnecessary locals. Use
5461         encapsulate_with_try_catch, removed unnecessary code.
5462         (fix_constructors): New local iii. Use build_instinit_invocation.
5463         (patch_method_invocation): Added comment.
5464         (maybe_use_access_method): Don't consider instinit$.
5465         (find_applicable_accessible_methods_list): Shorten the search for
5466         instinit$ too.
5467         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
5468         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
5469         (patch_throw_statement): Likewise. Fixed typo.
5470
5471 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
5472
5473         Revert:
5474         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5475         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5476         ASM_FINAL_SPEC.
5477         (lang_specific_pre_link): Use set_input to set input_filename.
5478         Append `main' here.
5479         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5480         (main): Fix definition.
5481         Strip `main' from classname.
5482         Fixes PR java/227.
5483
5484 2001-08-11  Zack Weinberg  <zackw@panix.com>
5485
5486         * lex.h: Don't include setjmp.h.  Don't define
5487         SET_FLOAT_HANDLER or prototype set_float_handler.
5488
5489 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5490
5491         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
5492         `poplevel' in the right order.
5493
5494 2001-08-09  Richard Henderson  <rth@redhat.com>
5495
5496         * Make-lang.in (class.o): Depend on TARGET_H.
5497         * class.c (emit_register_classes): Use target hooks instead of
5498         assemble_constructor and assemble_destructor.
5499
5500 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
5501
5502         * check-init.c (flags.h): Include
5503         (check_init): Don't report uninitialized static class
5504         initialization flags, don't free bit index when doing static class
5505         initialization optimization.
5506         (check_for_initialization): Return type changed to `unsigned int.'
5507         (attach_initialized_static_class): New function.
5508         * class.c (add_method_1): Create the initialized static class
5509         table if necessary.
5510         (finish_class): Always emit deferred inline methods.
5511         * decl.c (emit_init_test_initialization): Moved to expr.c
5512         (complete_start_java_method): Don't traverse
5513         DECL_FUNCTION_INIT_TEST_TABLE.
5514         (lang_mark_tree): Mark hash tables in function decls.
5515         * expr.c (emit_init_test_initialization): Moved from decl.c.
5516         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
5517         initialization flag, set DECL_CONTEXT and
5518         LOCAL_CLASS_INITIALIZATION_FLAG.
5519         (java_lang_expand_expr): Emit initialization code for static class
5520         initialized flags when entering block, if necessary.
5521         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
5522         * java-tree.h (flag_optimize_sci): New global variable declaration.
5523         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
5524         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
5525         (LOCAL_FINAL_P): Fixed typo in comment.
5526         (FINAL_VARIABLE_P): Likewise.
5527         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
5528         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
5529         (struct lang_decl): New fields `ict', `smic' and `cif.'
5530         (check_for_initialization): New returned value for global.
5531         (attach_initialized_static_class): New global function.
5532         (STATIC_CLASS_INIT_OPT_P): New macro.
5533         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
5534         * lang.c (java_decode_option): Handle
5535         `-fno-optimize-static-class-initialization'
5536         * parse.y (start_complete_expand_method): New function.
5537         (java_expand_method_bodies): Likewise.
5538         (attach_init_test_initialization_flags): Likewise.
5539         (adjust_init_test_initialization): Likewise.
5540         (emit_test_initialization): Likewise.
5541         (java_complete_expand_methods): Nullify abstract and native method
5542         bodies.
5543         (java_complete_expand_method): New locals `fbody', `block_body'
5544         and `exception_copy.' Reorganized: directly return on empty method
5545         bodies, call `start_complete_expand_method', remember definitely
5546         initialized static class in function, don't expand method bodies.
5547         (java_expand_classes): Call `java_expand_method_bodies' before
5548         `finish_class' when compiling to native.
5549         (resolve_expression_name): Use `orig' after building outer class
5550         field access.
5551         (patch_invoke): Remember static method invocations.
5552
5553 2001-08-06  Richard Henderson  <rth@redhat.com>
5554
5555         * class.c (emit_register_classes): Pass a symbol_ref and priority
5556         to assemble_constructor.
5557
5558 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
5559
5560         * java-tree.h (all_class_filename): New macro.
5561         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
5562         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
5563         newly created IDENTIFIER_NODE to `all_class_filename.'
5564
5565 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
5566
5567         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
5568         Use ggc_add_tree_root to register roots.
5569
5570 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5571
5572         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
5573         second operand calling check_init.
5574         * decl.c (complete_start_java_method): Swaped second and third
5575         arguments while creating WITH_CLEANUP_EXPR node.
5576         * jcf-write.c (generate_bytecode_insns): Use second operand
5577         instead of third when handling WITH_CLEANUP_EXPR.
5578         * parse.y (java_complete_lhs): Expand second operand of
5579         WITH_CLEANUP_EXPR nodes.
5580         (patch_synchronized_statement): Swaped second and third arguments
5581         while creating WITH_CLEANUP_EXPR node.
5582
5583 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
5584
5585         * parse.y (create_interface): Avoid cyclic inheritance report when
5586         syntax error encountered during class definition.
5587         Fixes PR java/2956
5588
5589 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5590
5591         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5592         ASM_FINAL_SPEC.
5593         (lang_specific_pre_link): Use set_input to set input_filename.
5594         Append `main' here.
5595         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5596         (main): Fix definition.
5597         Strip `main' from classname.
5598         Fixes PR java/227.
5599
5600 2001-07-18  Tom Tromey  <tromey@redhat.com>
5601
5602         For PR java/2812:
5603         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
5604         * lex.c (java_new_lexer): Use ICONV_CONST.
5605         (java_read_char): Likewise.
5606         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
5607         (jv-scan$(exeext)): Likewise.
5608
5609 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
5610
5611         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
5612         * parse.y (check_class_interface_creation): Allow `private' if the
5613         enclosing is not an interface.
5614         (create_interface): Interface tagged public if the enclosing
5615         context is an interface.
5616         (create_class): Class tagged public if the enclosing context
5617         is an interface.
5618         Fixes PR java/2959
5619
5620 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
5621
5622         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
5623         Fixes PR java/2665
5624
5625 2001-07-14  Tim Josling  <tej@melbpc.org.au>
5626
5627         * check-init.c (check_init): Remove references to EXPON_EXPR.
5628
5629 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
5630
5631         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
5632         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
5633         Fixes PR java/3602
5634
5635 2001-07-13  Tom Tromey  <tromey@redhat.com>
5636
5637         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
5638         invocation.
5639
5640 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
5641
5642         * parse.y (patch_method_invocation): Don't override primary if one
5643         is already provided, but let this$<n> be built. Fixed comment.
5644
5645 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
5646
5647         * parse.y (empty_statement:): Report empty statement error only
5648         when found at class declaration level.
5649         Fixes PR java/3635
5650
5651 2001-07-12  Tom Tromey  <tromey@redhat.com>
5652
5653         * expr.c (expand_load_internal): New function.
5654         (LOAD_INTERNAL): Use it.
5655
5656 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
5657
5658         * parse.y (verify_constructor_super): Compare anonymous class ctor
5659         args with `valid_method_invocation_conversion_p.'
5660         Fixes PR java/3285
5661
5662 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
5663
5664         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
5665         `-fsyntax-only.' Fixes PR java/3248
5666
5667 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
5668
5669         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
5670
5671 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
5672
5673         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
5674         current function is static. Fixes PR java/1970
5675
5676 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5677
5678         * parse.y (patch_method_invocation): Add enclosing context to ctor
5679         calls if necessary. Fixes PR java/2953
5680
5681 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
5682
5683         * parse.y (resolve_package): Abort if qualified expression member
5684         isn't right.
5685         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
5686         Fixes PR java/1391
5687
5688 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
5689
5690         * verify.c: Don't use // comments.
5691
5692 2001-07-05  Tom Tromey  <tromey@redhat.com>
5693
5694         * lang.c (flag_assume_compiled): Removed.
5695         * java-tree.h (flag_assume_compiled): Removed.
5696         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
5697         -fhash-synchronization, -fuse-divide-subroutine,
5698         -fcheck-references, -femit-class-file, -femit-class-files,
5699         -fassume-compiled.  Updated --encoding information.  Changed
5700         -foutput-class-dir to `-d'.
5701
5702 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
5703
5704         * jcf-parse.c (parse_class_file): Add lineno parameter to
5705         debug_start_source_file call.
5706
5707 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5708
5709         * gcj.texi: Use gpl.texi.
5710         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
5711         dependencies and use doc/include in search path.
5712
5713 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
5714
5715         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
5716         `this'.  If so, don't build instance initializers.
5717
5718 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
5719
5720         * parse.y (resolve_expression_name): Improved error message for
5721         inner class cases. Fixes PR java/1958
5722
5723 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
5724
5725         * lang.c: #include diagnostic.h
5726         (lang_print_error): Add a `diagnostic_context *' parameter.
5727         (java_dummy_print): Likewise.
5728         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
5729
5730 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5731
5732         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
5733         * jcf.h (typedef struct JCF): New bitfield `finished.'
5734         (JCF_FINISH): Set `finished.'
5735         (JCF_ZERO): Reset `finished.'
5736         Fixes PR java/2633
5737
5738 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5739
5740         * parse.y (class_body_declaration:): Don't install empty instance
5741         initializers.
5742         Fixes PR java/1314
5743
5744 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5745
5746         * class.c (set_super_info): Call `set_class_decl_access_flags.'
5747         (set_class_decl_access_flags): New function.
5748         * java-tree.h (set_class_decl_access_flags): New prototype.
5749         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
5750         (parse_class_file): New local `decl_max_locals.' Take wide types
5751         into account to compute DECL_MAX_LOCALS.
5752         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
5753         imports on demand.
5754
5755 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
5756
5757         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
5758
5759 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
5760
5761         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
5762         * parse.y (do_resolve_class): Moved comments out to leading comment
5763         section. Removed local `start', New local `_ht' and
5764         `circularity_hash.'  Record `enclosing' in hash table and search
5765         it to detect circularity.  Use `enclosing' as an argument to
5766         `lookup_cl.' Free the hash table when done.
5767
5768 2001-06-19  Tom Tromey  <tromey@redhat.com>
5769
5770         * lex.c (java_read_char): Disallow invalid and overlong
5771         sequences.  Fixes PR java/2319.
5772
5773 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
5774
5775         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
5776
5777 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
5778
5779         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
5780         arguments accordingly.
5781
5782 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5783
5784         * gcj.texi: Move contents to just after title page.
5785
5786 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
5787
5788         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
5789         builtin type.
5790         (patch_incomplete_class_ref): Build the class ref, build the class
5791         init if necessary, complete the tree.
5792         Fixes PR java/2605
5793
5794 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
5795
5796         * parse.y (lookup_field_wrapper): Test `name' code.
5797         (resolve_qualified_expression_name): Test `qual_wfl' code.
5798         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
5799         handle `qual_wfl' by code.
5800         (maybe_build_primttype_type_ref): Test `wfl' code.
5801
5802 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5803
5804         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
5805         fdl.texi.
5806         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
5807         the dvi file in the java directory.
5808
5809 2001-05-25  Sam TH  <sam@uchicago.edu>
5810
5811         * gen-table.pl javaop.h jcf.h lex.h,
5812         parse.h: Fix header include guards.
5813
5814 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
5815
5816         * jv-scan.c (version): Update copyright year.
5817
5818 2001-05-21  Per Bothner  <per@bothner.com>
5819
5820         * jcf-parse.c (read_class):  If class is from .class or .zip file
5821         and it's already been read, don't push/pop parser context.
5822
5823 2001-05-18  Per Bothner  <per@bothner.com>
5824
5825         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
5826         command line so the jvgenmain-generated main program comes first.
5827
5828 2001-05-15  Tom Tromey  <tromey@redhat.com>
5829
5830         * class.c (build_utf8_ref): Don't generate identifier based on
5831         utf8const contents.
5832
5833 2001-05-12  Richard Henderson  <rth@redhat.com>
5834
5835         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
5836         * expr.c (java_lang_expand_expr): Expand it.
5837         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
5838         calling build_exception_object_ref.
5839         * parse.y (catch_clause_parameter): Likewise.
5840         (build_dot_class_method): Likewise.
5841         (try_reference_assignconv): Likewise.
5842         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
5843         * jcf-write.c (generate_bytecode_insns): Likewise.
5844
5845 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5846
5847         * parse.y (build_unresolved_array_type): Set
5848         EXPR_WFL_QUALIFICATION on the newly created wfl.
5849         Fixes PR java/2538. Fixes PR java/2535.
5850
5851 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
5852
5853         * parse.y (fix_constructors): Removed unnecessary assignment to
5854         local. Moved assignment to `this$<n>', fixed comments and
5855         indentation.
5856         (build_wfl_wrap): Fixed indentation.
5857         Fixes PR java/2598, java/2579 and java/2658.
5858
5859 2001-05-03  Mo DeJong  <mdejong@redhat.com>
5860
5861         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
5862         check for byte swap.
5863
5864 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
5865
5866         * expr.c (build_class_init): Move MODIFY_EXPR
5867         outside of COND_EXPR.  Remove variable `call'.
5868
5869 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5870
5871         * decl.c: NULL_PTR -> NULL.
5872         * jcf-write.c: Likewise.
5873
5874 2001-05-01  Tom Tromey  <tromey@redhat.com>
5875
5876         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
5877         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
5878         * gcj.texi: Updated copyright text.  Include fdl.texi.
5879         (Top): Link to new node.
5880
5881 2001-05-01  Per Bothner  <per@bothner.com>
5882
5883         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
5884
5885 2001-05-01  Per Bothner  <per@bothner.com>
5886
5887         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
5888         import_list contains the name, not the TREE_PURPOSE.
5889
5890 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5891
5892         * jcf-io.c (read_zip_member): Cast to long in comparison with
5893         signed value.
5894
5895         * jvspec.c (lang_specific_driver): Initialize variables.
5896
5897         * mangle.c (find_compression_record_match): Likewise.
5898
5899         * typeck.c (build_null_signature): Provide static prototype.  Mark
5900         parameter with ATTRIBUTE_UNUSED.
5901
5902         * verify.c (verify_jvm_instructions): Initialize variable.
5903
5904 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5905
5906         * parse.y (do_resolve_class): Check for cyclic inheritance during
5907         inner class resolution.
5908
5909 2001-04-27  Per Bothner  <per@bothner.com>
5910
5911         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
5912         while iterating, since that could cause gc to lose stuff.
5913
5914 2001-04-26  Per Bothner  <per@bothner.com>
5915
5916         Fix method search wrt scope of inner classes to match JLS2.
5917         * typeck.c (build_null_signature):  New static function.
5918         (has_method):  New function.  Uses build_null_signature and lookup_do.
5919         * java-tree.h (has_method):  New declaration.
5920         * parse.y (find_applicable_accessible_methods_list):  Do not search
5921         context of inner classes here.
5922         (patch_method_invocation):  Search scope, ie. current and outer clases,
5923         for method matching simple name, to find class.
5924
5925 2001-04-26  Per Bothner  <per@bothner.com>
5926
5927         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5928         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
5929
5930         * constants.c (find_methodref_with_class_index):  New function.
5931         (find_methodref_index):  Use find_methodref_with_class_index.
5932         * java-tree.h (find_methodref_with_class_index):  New declaration.
5933         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
5934         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5935         If context changed from interface to class, don't use invokeinterface.
5936
5937 2001-04-25  Per Bothner  <per@bothner.com>
5938
5939         * verify.c (verify_jvm_instructions):  For field instructions,
5940         check that field index is valid.  For invoke instructions, check that
5941         method index is valid.
5942
5943 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
5944
5945         * config-lang.in (target_libs): Copy from $libgcj_saved.
5946
5947 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5948
5949         * decl.c (init_decl_processing): Add new class "protectionDomain"
5950         field.
5951         * class.c (make_class_data): Set initial value for "protectionDomain".
5952
5953 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5954
5955         * jvspec.c (lang_specific_driver): Fix memory allocation
5956         deficit, by using concat in lieu of xmalloc/sprintf.
5957
5958 2001-04-20  Per Bothner  <per@bothner.com>
5959
5960         Fixes to compile multiple .class files at once.
5961         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
5962         * java-tree.h (CLASS_PARSED_P):  New macro.
5963         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5964         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
5965         (read_class):  Avoid some code duplication.
5966         Don't call JCF_FINISH for a .class file - might be needed later.
5967         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
5968         rather than CLASS_LOADED_P, since latter implies class laid out.
5969         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
5970         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
5971
5972 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5973
5974         * Make-lang.in (java/boehm.o): Depend on toplev.h.
5975
5976         * boehm.c: Include toplev.h.
5977
5978 2001-04-06  Tom Tromey  <tromey@redhat.com>
5979             Alexandre Petit-Bianco  <apbianco@redhat.com>
5980
5981         Fix for PR gcj/1404 and PR gcj/2332:
5982         * parse.y (build_array_from_name): If we use the type_wfl then
5983         accumulate dimensions from the original type as well.
5984         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5985
5986 2001-04-06  Tom Tromey  <tromey@redhat.com>
5987
5988         * parse.y (analyze_clinit_body): Return true if the second operand
5989         of a METHOD_EXPR is nonzero.
5990
5991 2001-04-06  Tom Tromey  <tromey@redhat.com>
5992
5993         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5994         directory.
5995         ($(srcdir)/java/parse.c): Likewise.
5996
5997 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
5998
5999         * gcj.texi: Use `which-gcj' instead of `which-g77.'
6000         (version-gcc): Initialized.
6001         (which-gcj): Likewise.
6002
6003 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
6004
6005         * java-tree.h (struct lang_decl): New macro
6006         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
6007         * parse.y (build_instance_initializer): New function.
6008         (add_instance_initializer): Use it.
6009         (java_fix_constructors): Set `current_class' before fix pass.
6010         (fix_constructors): Just return if already fixed. Move `super()'
6011         invocation ahead. Use `build_instance_initializer.'
6012         Fixes PR java/1315.
6013
6014 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
6015
6016         * parse.y (resolve_qualified_expression_name): Pass field's
6017         DECL_CONTEXT to `not_accessible_p.'
6018         (not_accessible_p): Changed parameters order in `inherits_from_p'
6019         invocation.
6020
6021 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
6022
6023         * lang-options.h: Add flag_check_references.
6024
6025 2001-04-04  Per Bothner  <per@bothner.com>
6026
6027         * java-tree.h (CONSTANT_VALUE_P):  New macro.
6028         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
6029         * parse.y (maybe_build_class_init_for_field):  New static function.
6030         (resolve_expression_name, resolve_field_access):  Use
6031         maybe_build_class_init_for_field instead of build_class_init
6032         This does not do the init if the field is compile-time-constant.
6033         (resolve_field_access):  Simplify.
6034
6035         * parse.y (fold_constant_for_init):  Merge test into switch.
6036
6037 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
6038
6039         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
6040         on gansidecl.h.
6041         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
6042
6043 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
6044
6045         * expr.c (pop_type_0): Save the result of the first
6046         lang_printable_name call in a scratch buffer, so it
6047         won't be clobbered by the second call.
6048
6049 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
6050
6051         * parse-scan.y (array_type:): Rewritten.
6052         (type_declaration:): `empty_statement' replaces `SC_TK.'
6053         (class_member_declaration:): `empty statement' added.
6054         (method_body:): Simplified.
6055         (static_initializer:): Likewise.
6056         (primary_no_new_array:): Use `type_literals.'
6057         (type_literals:): New rule.
6058         (dims:): Set and update `bracket_count.'
6059         Fixes PR java/1074. Fixes PR java/2412.
6060
6061 2001-03-28  Hans Boehm  <boehm@acm.org>
6062
6063         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
6064         (get_boehm_type_descriptor): Set type on returned value to be a
6065         pointer length integer.
6066
6067 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6068
6069         * expr.c (pop_type_0): Call `concat' rather than building the
6070         string manually.
6071         (pop_type): Add format specifier in call to `error'.
6072
6073         * parse.y (patch_method_invocation): Avoid casting away
6074         const-ness.
6075
6076 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
6077
6078         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
6079
6080 2001-03-28  Richard Henderson  <rth@redhat.com>
6081
6082         IA-64 ABI Exception Handling:
6083         * Make-lang.in (except.o): Don't depend on eh-common.h.
6084         * check-init.c (check_init): Handle EXC_PTR_EXPR.
6085         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
6086         [soft_exceptioninfo_call_node]: Remove.
6087         [eh_personality_libfunc, lang_eh_runtime_type]: New.
6088         (end_java_method): No emit_handlers.
6089         * except.c (java_set_exception_lang_code): Remove.
6090         (method_init_exceptions): Don't call it.
6091         (prepare_eh_table_type): No CATCH_ALL_TYPE.
6092         (build_exception_object_ref): New.
6093         (expand_end_java_handler): Update for except.h name changes.
6094         (emit_handlers, expand_resume_after_catch): Remove.
6095         * expr.c (java_lang_expand_expr): Update for except.h name changes.
6096         (process_jvm_instruction): Use build_exception_object_ref.
6097         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
6098         (soft_exceptioninfo_call_node): Remove.
6099         (build_exception_object_ref): Declare.
6100         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
6101         soft_exceptioninfo_call_node.  Move processing ...
6102         [EXC_PTR_EXPR]: ... here.
6103         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
6104         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
6105         (source_end_java_method): No java_set_exception_lang_code or
6106         emit_handlers.
6107         (build_dot_class_method): Use build_exception_object_ref.
6108         (try_reference_assignconv): Check EXC_PTR_EXPR not
6109         soft_exceptioninfo_call_node.
6110
6111 2001-03-28  Richard Henderson  <rth@redhat.com>
6112
6113         * java-tree.h (throw_node): Define as a single member of
6114         java_global_trees instead of a separate array.
6115         (JTI_THROW_NODE): New.
6116         * decl.c (throw_node): Don't declare.
6117         (init_decl_processing): Init a scalar throw_node.
6118         Don't register it for gc.
6119         * check-init.c (check_init): Reference scalar throw_node.
6120         * expr.c (build_java_athrow): Likewise.
6121         * jcf-write.c (generate_bytecode_insns): Likewise.
6122         * parse.h (BUILD_THROW): Likewise.
6123
6124 2001-03-28  Richard Henderson  <rth@redhat.com>
6125
6126         * decl.c (end_java_method): Do not save and restore
6127         flag_non_call_exceptions.
6128         * parse.y (source_end_java_method): Likewise.
6129         * lang.c (flag_exceptions): Don't declare.
6130         (java_init_options): Set flag_non_call_exceptions.  Set
6131         flag_exceptions here ...
6132         (java_init): ... not here.
6133
6134 2001-03-27  Richard Henderson  <rth@redhat.com>
6135
6136         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
6137         exceptions_via_longjmp.
6138
6139         * lang.c (flag_new_exceptions): Don't declare it.
6140         (java_init_options): Or set it.
6141
6142 2001-03-27  Richard Henderson  <rth@redhat.com>
6143
6144         * decl.c (end_java_method): Rename asynchronous_exceptions to
6145         flag_non_call_exceptions.
6146         * parse.y (source_end_java_method): Likewise.
6147
6148 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6149
6150         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
6151
6152 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
6153
6154         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
6155
6156 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
6157
6158         * parse.y (find_as_inner_class): Follow current package
6159         indications not to mistakingly load an unrelated class.
6160
6161 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6162
6163         * constants.c (PUTN): Use memcpy, not bcopy.
6164
6165         * lex.c (java_read_char): Use memmove, not bcopy.
6166
6167         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
6168
6169 2001-03-23  Per Bothner  <per@bothner.com>
6170
6171         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
6172         macro for better error pin-pointing.
6173         * java-tree.h:  Fix typo in comment.
6174
6175         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
6176         Don't include jsr/goto in exception range.
6177         Check if start and end of exception range are the same (also TRY_EXPR).
6178         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
6179         However, do emit the following goto even if try_block is empty.
6180         Defer freeing exception_decl until after the finalizer, to make
6181         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
6182
6183         * parse.y (java_complete_lhs):  If the try-clause is empty, just
6184         return the finally-clause and vice versa.
6185
6186 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
6187
6188         * gcj.texi (Input Options): documented the check for attribute
6189         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
6190         * java-tree.h (flag_force_classes_archive_check): Declared extern.
6191         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
6192         (jcf_parse): Check for the right classes archive if necessary.
6193         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
6194         (jcf_parse_fields): Fixed indentation.
6195         * jcf-write.c (append_gcj_attribute): New function.
6196         (generate_classfile): Compute the attribute count, invoke
6197         `append_gcj_attribute'.
6198         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
6199         turned into bit-fields. New bit-field `right_zip.'
6200         (JCF_ZERO): Set `right_zip' to zero.
6201         * lang-options.h (-fforce-classes-archive-check): Added flag.
6202         * lang.c (flag_force_classes_archive_check): New flag.
6203         (lang_f_options): New entry `force-classes-archive-check.'
6204         Fixes PR java/1213.
6205
6206 2001-02-07  Andrew Haley  <aph@redhat.com>
6207
6208         * gcj.texi (Configure-time Options): Add -fcheck-references.
6209         * expr.c (build_java_indirect_ref): New function.
6210         (java_check_reference): New function.
6211         (build_java_array_length_access): Use build_java_indirect_ref to
6212         check for null references.
6213         (build_java_arrayaccess): Likewise.
6214         (build_get_class): Likewise.
6215         (build_field_ref): Likewise.
6216         (invoke_build_dtable): Likewise.
6217         (build_invokeinterface): Likewise.
6218         * lang.c (lang_f_options): Add flag_check_references.
6219         * jvspec.c (jvgenmain_spec): Add flag_check_references.
6220         * java-tree.h (flag_check_references): New variable.
6221         * lang.c (flag_check_references): Likewise.
6222         * parse.y (patch_invoke): Use java_check_reference.
6223         (patch_assignment): Allow for extra nesting in
6224         _Jv_CheckArrayStore.
6225
6226 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
6227
6228         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
6229         * lex.c (cxx_keywords): Likewise.
6230
6231 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
6232
6233         * parse.y (qualify_ambiguous_name): Broaden `length'
6234         recognition. Help MODIFY_EXPR be resolved as expression names.
6235         Fixes PR java/2066. Fixes PR java/2400.
6236
6237 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
6238
6239         * gjavah.c (process_file): Mark interface definitions with
6240         "__attribute__ ((java_interface))".
6241
6242 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
6243
6244         * class.c (layout_class): Fixed push_super_field's second
6245         argument. Fixes PR java/2333.
6246         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
6247         too early to lay innerclasses out.
6248
6249 2001-03-20  Tom Tromey  <tromey@redhat.com>
6250             Alexandre Petit-Bianco <apbianco@redhat.com>
6251
6252         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
6253         inside an array reference. Insertion of the array store check
6254         rewritten. Fixes PR java/2299.
6255
6256 2001-03-20  Tom Tromey  <tromey@redhat.com>
6257
6258         * lex.c (java_read_unicode): Only accept leading `u's.
6259
6260 2001-03-20  Tom Tromey  <tromey@redhat.com>
6261
6262         * jcf-parse.c (read_class): Initialize `class'.
6263
6264 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
6265
6266         * jcf_parse.c (jcf_parse): Eliminate unused variable.
6267
6268 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
6269
6270         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
6271         (layout_class): Likewise.
6272         (layout_class_method): Likewise.
6273         (emit_register_classes): Likewise.
6274         * decl.c (builtin_function): Likewise.
6275         (give_name_to_locals): Likewise.
6276
6277 2001-03-19  Per Bothner  <per@bothner.com>
6278
6279         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
6280         before trying to load an inner class.
6281
6282         Fixes to process to command-line .class files in two passes.
6283         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
6284         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
6285         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
6286         * class.c (is_compiled_class):  Fix for renamed flag.
6287         * parse.y (maybe_create_class_interface_decl):  Likewise.
6288         * jcf-parse.c (yyparse):  Also set if compiling .class files.
6289         * jcf-parse.c (read_class);  Read current_class.
6290         (jcf_parse):  Make static.
6291         (load_inner_classes):  New function, with code moved from jcf_parse,
6292         because we need to inner classes after the command-line files are read.
6293         (yyparse):  Set finput to NULL when it doesn't need to be closed.
6294         Reduce use of main_jcf (basically only for archive) and
6295         use finput instead of main_jcf->read_state.
6296         Inline jcf_figure_file_type into yyparse.
6297         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
6298         Defer load_inner_classes and parse_class_file to a second pass,
6299         after we've correctly mapped command-line .clas fiels to classes.
6300         (jcf_figure_file_type):  Removed.
6301         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
6302         (JCF_ZERO):  Also clear zipd field.
6303         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
6304
6305 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
6306
6307         * jcf-parse.c (yyparse): Change ch from char * to char.
6308
6309 2001-03-19  Per Bothner  <per@bothner.com>
6310
6311         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
6312         Add constructed filelist-file at end, following -xjava.  Thus any .o
6313         and library files are not affected by the -xjava.  Also wrap
6314         explicit @FILE with -xjava and -xnone.
6315
6316 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
6317
6318         * class.c (build_static_field_ref): Call make_decl_rtl() after
6319         setting the DECL_EXTERNAL flag.
6320
6321 2001-03-17  Per Bothner  <per@bothner.com>
6322
6323         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
6324
6325         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
6326         when result is is needed (target is STACK_TARGET).
6327
6328         * parse.h (JDEP_SOLV):  Removed.
6329         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
6330
6331         * parse.y (incomplete_class_list): Removed.
6332         (obtain_incomplete_type): Don't use or set incomplete_class_list.
6333         It doesn't work if resolve_class changes the name of an array type
6334         that is on the list and then someone else looks for the modified name.
6335         Also, seems liable to break when compiling multiple source files at
6336         once.  So the simplest is to just remove incomplete_class_list -
6337         it is only a minor space win and it is not even clear it saves time.
6338
6339         * parse.y (resolve_class):  Remove unneeded promote_type.
6340
6341 2001-03-15  Per Bothner  <per@bothner.com>
6342
6343         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
6344         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
6345         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
6346         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
6347
6348         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
6349         * parse.y (java_expand_classes):  Likewise.
6350
6351         * parse.y (expand_start_java_method):  Was only called once and had a
6352         misleading name, so inline in caller java_complete_expand_method.
6353         (enter_a_block):  Likewise inline in enter_block and remove.
6354
6355         Remove junk from when gcc/java was created (by copying from C/C++).
6356         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
6357         (struct binding_level):  Remove fields keep, keep_if_subblocks,
6358         more_cleanups_ok, have_cleanups (which have never been used).
6359         (pushlevel, poplevel):  Remove related useless code.
6360
6361         * class.c (make_class_data):  The class_dtable_decl (i.e. the
6362         vtable for Class) should be external, except when compiling Class.
6363
6364         * jvspec.c (lang_specific_driver):  Fix -C handling.
6365         Check -save-temps to see if temp @FILE should be deleted.
6366         Follow-up to/fix for February 16 patch.
6367
6368         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
6369         (type_stack_dup):  Remove no-longer neded error check.
6370
6371 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
6372
6373         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
6374         to 'for_pointer'. If this type is for a pointer (argument) mangling,
6375         don't surround the element with 'N..E' if the type name is
6376         unqualified.
6377
6378 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
6379
6380         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
6381         DECL_RTL_SET_P, etc.
6382         (make_method_value): Likewise.
6383         (get_dispatch_table): Likewise.
6384
6385         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6386
6387 2001-03-07  Tom Tromey  <tromey@redhat.com>
6388
6389         * config-lang.in (lang_requires): Define.
6390
6391 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
6392
6393         * typeck.c (convert): Check flag_unsafe_math_optimizations,
6394         not flag_fast_math.
6395
6396 2001-03-05  Per Bothner  <per@bothner.com>
6397
6398         Fix a problem where rest_of_decl_compilation applied to
6399         class_dtable_decl causes problems because it was done too early,
6400         before output file was opened.
6401         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
6402         * class.c (class_dtable_decl):  Add macro - element of class_roots.
6403         (make_class_data):  Define class_dtable_decl.
6404         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
6405
6406 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
6407
6408         * java/class.c, java/decl.c, java/java-tree.h: Replace all
6409         uses of 'boolean' with 'bool'.
6410
6411 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
6412
6413         * lang-specs.h: Add zero initializer for cpp_spec field to all
6414         array elements.
6415
6416 2001-02-16  Per Bothner  <per@bothner.com>
6417
6418         Handle compiling multiple input files at once, and @FILE syntax.
6419         * gcj.texi:  Updated documentation to match.
6420         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
6421         * jcf-parse.c (parse_source_file):  Split into ...
6422         (parse_source_file_1):  New function - and:
6423         (parse_source_file_2):  New function.
6424         (yyparse):  On -ffilelist-file, open and scan named file.
6425         On first pass over files, only do parse_source_file_1.
6426         A new second pass calls parse_source_file_2 for each file to compile.
6427         (init_jcf_parse):  Call init_src_parse.
6428         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
6429         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
6430         as multiple input file combined in one compilation.
6431         * lang-options.h:  Add -ffilelist-file
6432         * lang.c (flag_filelist_file):  New flag variable.
6433         (lang_f_options):  Handle -ffilelist-file.
6434         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
6435         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
6436         gclass_list - use global fields of src_parse_roots instead.
6437         * parse.y (src_parse_roots):  New array.
6438         (incomplete_class_list, gclass_list):  New macros.
6439         (push_parser_context, java_pop_parser_context,
6440         java_parser_context_resume):  Don't fiddle with deleted fields.
6441         (various):  Use incomplete_class gclass_list and global macros
6442         instead of parse_ctxt fields - the lists are global.
6443         (init_src_parse):  New function.
6444
6445 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6446
6447         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
6448
6449 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
6450
6451         * parse.y (check_inner_class_access): Moved declaration of local
6452         `enclosing_decl_type' to the right location.
6453
6454 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
6455
6456         * parse.y (parser_check_super_interface): Don't call
6457         check_pkg_class_access for an inner interface.
6458         (parser_check_super): Don't call check_pkg_class_access for inner
6459         class.
6460         (do_resolve_class): Simplify enclosing type loop. Don't call
6461         check_pkg_class_access if CL and DECL are not set.
6462         (find_in_imports_on_demand): Set DECL if class_type needed to be
6463         loaded. Don't call check_pkg_class_access for an inner class.
6464         (check_inner_class_access): Rewritten to implement member access
6465         rules as per spec 6.6.1.
6466         (check_pkg_class_access): Handle the empty package correctly.
6467         (in_same_package): New function. Determine if two classes are in the
6468         same package.
6469
6470 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
6471
6472         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
6473         method into array types.
6474         * parse.y (patch_method_invocation): Bypass access check on clone call
6475         to array instance.
6476
6477 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
6478
6479         * expr.c (build_instanceof): Check for arrays when trying fold to
6480         false.
6481
6482 2001-02-15  Jim Meyering  <meyering@lucent.com>
6483
6484         * Make-lang.in (java.install-common): Depend on `installdirs'.
6485         (java.install-info): Likewise.
6486
6487 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
6488
6489         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
6490
6491 2001-02-14  Tom Tromey  <tromey@redhat.com>
6492             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6493
6494         Fix for PR java/1261.
6495         * typeck.c (build_java_array_type): Add public `clone' method to
6496         arrays.
6497         * parse.y (resolve_qualified_expression_name): Use current_class
6498         when checking for inaccessibility.
6499         (patch_method_invocation): Fixed error message when accessibility
6500         denied.  Added `from_super' argument.
6501
6502 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
6503
6504         * parse.y (resolve_class): Don't build a fake decl. Use the one
6505         already built.
6506         * typeck.c (build_java_array_type): Build and assign decl to array
6507         type.
6508
6509 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
6510
6511         * parse.y (not_accessible_p): Changed leading comment. Added extra
6512         `where' argument. Use it to enforce protected access rules.
6513         (resolve_qualified_expression_name): Added extra argument to
6514         not_accessible_p.
6515         (patch_method_invocation): Use argument `primary' to provide
6516         not_accessible_p with an extra argument.
6517         (lookup_method_invoke): Added extra argument to not_accessible_p.
6518         (search_applicable_method_list): Likewise.
6519
6520 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
6521
6522         * parse.y (resolve_qualified_expression_name): Try to resolve as
6523         an inner class access only if `decl' is a TYPE_DECL.
6524
6525 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6526
6527         * decl.c (classdollar_identifier_node): Initialize.
6528         * java-tree.h (enum java_tree_index): New entry
6529         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
6530         (classdollar_identifier_node): New macro.
6531         (ID_CLASSDOLLAR_P): Likewise.
6532         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
6533         (build_dot_class_method_invocation): Likewise.
6534         (find_applicable_accessible_methods_list): `class$' can't be
6535         inherited.
6536
6537 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
6538
6539         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
6540
6541 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6542
6543         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
6544         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
6545         gone.
6546
6547 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6548
6549         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
6550         outside of the `__U' sequence too.
6551         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
6552         sequence too.
6553
6554 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
6555
6556         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
6557
6558 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6559
6560         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
6561         (JVGENMAIN_OBJS): Likewise.
6562         * java-tree.h (append_gpp_mangled_name): New prototype.
6563         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
6564         Removed cast calling `gcc_add_root.'
6565         * jvgenmain.c (mangle_obstack): New global, initialized.
6566         (main): Use it.
6567         (do_mangle_class): Constify local `ptr.'
6568         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
6569         append_gpp_mangle_name and update `count' if necessary.
6570         Use `mangle_obstack.'
6571         * mangle.c (append_unicode_mangled_name): Removed.
6572         (append_gpp_mangled_name): Likewise.
6573         (unicode_mangling_length): Likewise.
6574         (mangle_member_name): Return type set to `void.'
6575         (mangle_field_decl): Don't append `U' in escaped names.
6576         (mangle_method_decl): Likewise.
6577         (mangle_member_name): Just use `append_gpp_mangled_name.'
6578         * mangle_name.c: New file.
6579
6580 2001-02-07  Per Bothner  <per@bothner.com>
6581
6582         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
6583
6584         * check-init.c (check_init):  Don't call done_alternative after
6585         processing loop code, as a LOOP_EXPR never terminates normally.
6586
6587 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6588
6589         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
6590
6591 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6592
6593         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
6594         DECLs.
6595
6596 2001-02-06  Tom Tromey  <tromey@redhat.com>
6597
6598         * lex.c (java_new_lexer): Longer error message.
6599
6600 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
6601             Alexandre Petit-Bianco  <apbianco@cygnus.com>
6602
6603         * typeck.c (build_prim_array_type): Added leading comment.
6604         (build_java_array_type): Moved locals out of
6605         block. Always create the `data' field, fixed alignment to match
6606         C++.
6607
6608 2001-02-04  Tom Tromey  <tromey@redhat.com>
6609
6610         * expr.c (java_lang_expand_expr): Don't bother recomputing
6611         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
6612         Fixes PR java/1866.
6613
6614 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6615
6616         * parse.y (process_imports): Save the original name of the import
6617         for better error report.
6618
6619 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
6620
6621         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
6622         of macros used when compiling jvspec.c.
6623         * jvspec.c (lang_specific_driver): Link with the shared
6624         libgcc by default.
6625
6626 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6627
6628         * check-init.c (check_init): Call internal_error instead of fatal.
6629         * expr.c (java_lang_expand_expr): Likewise.
6630         * jcf-parse.c (get_constant): Likewise.
6631         * mangle.c (java_mangle_decl): Likewise.
6632         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
6633         (operator_string): Likewise.
6634         * check-init.c (check_init): Call abort instead of fatal.
6635         * class.c (build_class_ref): Likewise.
6636         * constants.c (write_constant_pool): Likewise.
6637         * decl.c (start_java_method): Likewise.
6638         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
6639         (java_stack_dup, encode_newarray_type): Likewise.
6640         (build_java_array_length_access): Likewise.
6641         (build_java_check_indexed_type, expand_java_pushc): Likewise.
6642         (build_java_soft_divmod, build_invokeinterface): Likewise.
6643         * java-tree.h (INNER_CLASS_P): Likewise.
6644         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
6645         (give_name_to_class, get_class_constant): Likewise.
6646         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
6647         (find_constant_index, generate_bytecode_conditional): Likewise.
6648         (generate_bytecode_insns, perform_relocations): Likewise.
6649         * lex.c (java_unget_unicode, java_lex): Likewise.
6650         * mangle.c (mangle_type, mangle_record_type): Likewise.
6651         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
6652         (finish_mangling): Likewise.
6653         * parse.h (MARK_FINAL_PARMS): Likewise.
6654         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
6655         (obtain_incomplete_type, java_complete_class): Likewise.
6656         (java_check_regular_methods, java_complete_expand_method): Likewise.
6657         (cut_identifier_in_qualified, check_deprecation): Likewise.
6658         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
6659         (java_complete_lhs, lookup_name_in_blocks): Likewise.
6660         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
6661         * typeck.c (set_local_type, parse_signature_type): Likewise.
6662         (parse_signature_string, build_java_signature): Likewise;
6663         (set_java_signature): Likewise.
6664         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
6665         * class.c (add_method): Call fatal_error instead of fatal.
6666         (build_static_field_ref): Likewise.
6667         * expr.c (build_known_method_ref, expand_invoke): Likewise.
6668         * jcf-parse.c (get_constant, jcf_parse): Likewise.
6669         * lex.c (java_new_new_lexer): Likewise.
6670         * jv-scan.c (main): Likewise.
6671         (fatal_error): Renamed from fatal.
6672         * jcf-parse.c (yyparse): Call fatal_io_error instead of
6673         pfatal_with_name.
6674         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
6675         (yyparse): Likewise.
6676         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
6677         * lex.c (java_get_line_col): Likewise.
6678         * jcf-parse.c (load_class): Make errors non-fatal.
6679         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
6680
6681 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
6682
6683         * jvgenmain.c (class_mangling_suffix): Remove unused string.
6684         (error): Remove unused function.
6685         (main): Don't use "__attribute__ alias" on generated class symbol.
6686
6687 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6688
6689         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
6690         argument.
6691         * parse.y (finish_method_declaration): Code accounting for WFLed
6692         method DECL_NAMEs deleted.
6693         (check_abstract_method_definitions): Likewise.
6694         (resolve_type_during_patch): Layout resolved type.
6695         * typeck.c (lookup_do): Removed unused local.
6696
6697 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
6698
6699         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
6700         * decl.c (init_decl_processing): Use integer_minus_one_node, not
6701         integer_negative_one_node.
6702         * expr.c (build_java_binop): Likewise.
6703
6704 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
6705
6706         * zextract.c (read_zip_archive): Read file_offset before writing
6707         zipd and consequently clobbering the header contents.
6708
6709 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6710
6711         * Make-lang.in: Remove all dependencies on defaults.h.
6712         * decl.c: Don't include defaults.h.
6713         * expr.c: Likewise.
6714         * parse.y: Likewise.
6715
6716 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6717
6718         * ChangeLog (2001-01-21): Fixed typo.
6719         * class.c (layout_class_method): Code accounting for WFLed
6720         method DECL_NAMEs deleted.
6721         * constant.c (find_methodref_index): Likewise.
6722         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
6723         * java-tree.h (DECL_FUNCTION_WFL): New macro.
6724         (struct lang_decl): New field `wfl'.
6725         (java_get_real_method_name): Prototype deleted.
6726         * mangle.c (mangle_method_decl): Code accounting for WFLed
6727         method DECL_NAMEs deleted.
6728         * parse.h (GET_METHOD_NAME): Macro deleted.
6729         * parse.y (reset_method_name): Deleted.
6730         (method_header): Set DECL_FUNCTION_WFL.
6731         (check_abstract_method_header): Code accounting for WFLed method
6732         DECL_NAMEs deleted.
6733         (java_get_real_method_name): Deleted.
6734         (check_method_redefinition): Code accounting for WFLed method
6735         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
6736         (java_check_regular_methods): Likewise.
6737         (java_check_abstract_methods): Likewise.
6738         (java_expand_classes): Don't call `reset_method_name.'
6739         (search_applicable_method_list): Use DECL_NAMEs instead of
6740         GET_METHOD_NAME.
6741         * typeck.c (lookup_do): Code accounting for WFLed method
6742         DECL_NAMEs deleted.
6743
6744 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
6745
6746         * lex.c (java_read_char): Check for EOF from getc first.
6747
6748 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6749
6750         * class.c (layout_class): Don't lay the superclass out if it's
6751         already being laid out.
6752         * jcf-parse.c (handle_innerclass_attribute): New function.
6753         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
6754         handle_innerclasses_attribute.
6755         (jcf_parse): Don't load an innerclasses if it's already being
6756         laid out.
6757         * jcf-write.c (append_innerclass_attribute_entry): Static
6758         `anonymous_name' and its initialization deleted. `ocii' and `ini'
6759         to be zero for anonymous classes.
6760
6761 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6762
6763         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
6764         necessary.
6765         * jcf-parse.c (set_source_filename): Use
6766         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
6767
6768 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6769
6770         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
6771         gets a unique asm name.
6772
6773 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6774
6775         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
6776         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6777         if necessary.
6778         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
6779         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
6780         * parse.y (lookup_package_type_and_set_next): Deleted.
6781         (resolve_package): Removed unnecessary code.
6782         (find_applicable_accessible_methods_list): `finit$' can't be
6783         inherited.
6784         * verify.c (pop_argument_types): Added missing prototype.
6785
6786 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
6787
6788         * config-lang.in: Disable java by default.
6789
6790 2001-01-23  Tom Tromey  <tromey@redhat.com>
6791
6792         * gcj.texi (Copying): New node.
6793         Added copyright information.
6794
6795 2001-01-21  Per Bothner  <per@bothner.com>
6796
6797         Various fixes to allow compiling a compressed .jar/.zip archive.
6798         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
6799         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
6800         (struct ZipDirectory):  New field zipf points to owning ZipFile.
6801         * jcf.h (struct ZipDirectory):  Add forward declaration.
6802         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
6803         Remove seen_in_zip and zip_offset fields.
6804         (JCF_SEEN_IN_ZIP):  New macro.
6805         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
6806         * jcf-io.c:  Change all ZipFileCache to ZipFile.
6807         (read_zip_member):  New function.
6808         (open_in_zip):  Call read_zip_member.
6809         * jcf-parse.c (find_in_current_zip):  Remove function.
6810         (read_class):  Merge in find_in_current_zip functionality.
6811         Call read_zip_member if needed.
6812         (parse_zip_file_entries):  Use read_zip_member.
6813         (process_zip_dir):  Update for removed and added JCF fields.
6814         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
6815
6816 2001-01-21  Per Bothner  <per@bothner.com>
6817
6818         Minor optimization of static ggc roots.
6819         * jcf-parse.c (parse_roots):  New static field.
6820         (current_field, current_method, current_file_list):  Replace by macros
6821         naming fields of parse_roots.
6822         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
6823         * class.c (class_roots):  New static field.
6824         (registered_class, fields_ident, info_ident, class_list):
6825         New macros naming fields of parse_roots.
6826         (build_static_field_ref):  Don't register roots here.
6827         (layout_class):  Static field list replaced by macro class_list.
6828         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
6829         Initialize fields_ident and info_ident here.
6830
6831 2001-01-21  Per Bothner  <per@bothner.com>
6832
6833         * jcf-parse.c (ggc_mark_jcf):  New function.
6834         (init_jcf_parse):  Register current_jcf as ggc root.
6835
6836 2001-01-21  Per Bothner  <per@bothner.com>
6837
6838         * lang.c (put_decl_node):  Print method's name.
6839
6840 2001-01-21  Per Bothner  <per@bothner.com>
6841
6842         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
6843         (verify_jvm_instructions):  Use it, for better error messages on loads.
6844
6845 2001-01-21  Per Bothner  <per@bothner.com>
6846
6847         * verify.c (merge_type_state):  Still may have to merge even if
6848         LABEL_VERIFIED (label).
6849
6850 2001-01-21  Per Bothner  <per@bothner.com>
6851
6852         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
6853         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
6854
6855 2001-01-19  Per Bothner  <per@bothner.com>
6856
6857         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
6858         if expeting an interface type.  Refines Tom's change of 2000-09-12.
6859
6860 2001-01-18  Per Bothner  <per@bothner.com>
6861
6862         * gcj.texi (Input Options): Mention .java files.
6863
6864 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6865
6866         * lang-options.h (-Wunsupported-jdk11): Removed.
6867         * lang.c (flag_not_overriding): Deleted.
6868         (flag_static_local_jdk1_1): Likewise.
6869         (lang_W_options): Removed "unsupported-jdk11" entry.
6870         * parse.y (java_check_methods): Removed dead code.
6871
6872 2001-01-17  Tom Tromey  <tromey@redhat.com>
6873
6874         Changes suggested by Per Bothner:
6875         * gcj.texi (Input Options): Don't mention input files.
6876         (Code Generation): Updated --main information.
6877         (Invoking jcf-dump): Mention that --javap is incomplete.
6878         From Alexandre Petit-Bianco:
6879         (Warnings): Don't mention -Wunsupported-jdk11.
6880         My stuff:
6881         (Compatibility): Mention JDK 1.2-ness of libraries.
6882         (Resources): Mention resources used when writing gcj.
6883
6884 2001-01-17  Tom Tromey  <tromey@redhat.com>
6885
6886         * gcj.texi: New file.
6887         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
6888         (java.info): Depend on gcj.info.
6889         (java/gcj.dvi): New target.
6890         (java.dvi): Depend on gcj.dvi.
6891         (java.install-info): Wrote.
6892
6893 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
6894
6895         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6896         having called make_decl_rtl.
6897
6898 2001-01-14  Per Bothner  <per@bothner.com>
6899
6900         Various patches to emit better messages on verification errors.
6901         * expr.c (push_type_0):  Return error indication on stack overflow,
6902         instead of callinfg fatal.
6903         (push_type):  Now just call push_type_0 (nd fatal on overflow).
6904         (pop_type_0):  Return detailed error message (in a char** argument).
6905         (pop_type):  If pop_type_0 fails, print error message.
6906         (pop_argument_types):  Moved to verify.c.
6907         * verify.c (pop_argument_types):  Moved from expr.c.
6908         Return a (possible) error message, rather than void.
6909         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
6910         (verify_jvm_instruction):  Use new macros, improving error messages.
6911         For case OPCODE_astore use object_ptr_type_node.
6912         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
6913         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
6914
6915         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6916         constant, return body without wrapper.  (Improves constant folding.)
6917         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
6918
6919 2001-01-13  Per Bothner  <per@bothner.com>
6920
6921         * expr.c (expand_java_field_op):  Assigning to a final field outside
6922         an initializer does not violate JVM spec, so should be warning, not
6923         error.  (Sun's verifier does not complain - though MicroSoft's does.)
6924
6925 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
6926
6927         * gjavah.c (version), jcf-dump.c (version): Update copyright year
6928         to 2001.
6929
6930 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
6931
6932         * parse.y (resolve_expression_name): Permit instance variables from
6933         enclosing context in super constructor call.
6934         (resolve_qualified_expression_name): Permit enclosing class's qualified
6935         "this" in super constructor call.
6936
6937 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6938
6939         * class.c (build_utf8_ref): Remove last argument in call to
6940         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6941         (build_class_ref): Likewise.
6942         (build_static_field_ref): Likewise.
6943         (get_dispatch_table): Likewise.
6944         (layout_class_method): Likewise.
6945         (emit_register_classes): Likewise.
6946         * constants.c (build_constant_data_ref): Likewise.
6947         * decl.c (builtin_function): Likewise.
6948         (create_primitive_vtable): Likewise.
6949         * expr.c (build_known_method_def): Likewise.
6950         (build_jni_stub): Likewise.
6951         (java_lang_expand_expr): Likewise.
6952
6953 2001-01-10  Tom Tromey  <tromey@redhat.com>
6954
6955         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6956
6957 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6958
6959         * java-tree.h (lang_printable_name_wls): New prototype.
6960         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6961         rather than `current_class' to print type name. Don't prepend type
6962         names when printing constructor names.
6963         (lang_printable_name_wls): New function.
6964         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6965         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6966         * parse.y (patch_method_invocation): Message tuned for constructors.
6967         (not_accessible_p): Grant `private' access from within
6968         enclosing contexts.
6969
6970 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6971
6972         All files with updated copyright when applicable.
6973         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6974         * class.c (mangle_class_field): Function removed.
6975         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6976         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6977         (build_class_ref): Call `java_mangle_class_field' instead of
6978         `mangle_class_field.'
6979         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6980         (layout_class): Call `java_mangle_decl' instead of
6981         `mangle_static_field.'
6982         (cxx_keywords): Initialized static array moved to `lex.c.'
6983         (layout_class_method): Changed leading comment. Simplified to
6984         call `java_mangle_decl.' Local `ptr' moved in for loop body.
6985         * decl.c (lang_mark_tree): Mark field `package_list.'
6986         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6987         (struct lang_type): New field `package_list.'
6988         (unicode_mangling_length): Prototype removed.
6989         (append_gpp_mangled_name, append_gpp_mangled_classtype,
6990         emit_unicode_mangled_name): Likewise.
6991         (cxx_keyword_p): New prototype.
6992         (java_mangle_decl, java_mangle_class_field,
6993         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6994         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6995         `build_expr_wfl.'
6996         * jvgenmain.c (main_method_prefix): Global variable removed.
6997         (main_method_suffix): Likewise.
6998         (do_mangle_classname): New function.
6999         (main): Call it. Format changed to accommodate new mangling scheme.
7000         * lex.c: (utf8_cmp): Conditionally prototyped.
7001         (cxx_keywords): Moved from class.c, conditionally defined.
7002         (utf8_cmp, cxx_keyword_p): Likewise.
7003         * mangle.c (obstack.h, ggc.h): Included.
7004         (mangle_field_decl): New function.
7005         (mangle_method_decl, mangle_type, mangle_pointer_type,
7006         mangle_array_type, mangle_record_type,
7007         find_compression_pointer_match, find_compression_array_match,
7008         find_compression_record_match,
7009         find_compression_array_template_match, set_type_package_list,
7010         entry_match_pointer_p, emit_compression_string, init_mangling,
7011         finish_mangling, compression_table_add, mangle_member_name): Likewise.
7012         (mangle_obstack): New global.
7013         (MANGLE_RAW_STRING): New macro.
7014         (unicode_mangling_length): Turned static.
7015         (append_unicode_mangled_name): Renamed from
7016         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
7017         replaces `obstack', removed from the parameter list.
7018         (append_gpp_mangled_name): Turned static. `mangle_obstack'
7019         replaces parameter `obstack', removed from the parameter list. Call
7020         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
7021         (append_gpp_mangled_classtype): Removed.
7022         (compression_table, compression_next): New static variables.
7023         * parse.y (temporary_obstack): Extern declaration removed.
7024
7025 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7026
7027         * parse.y (patch_binop): Compute missing type in error situations.
7028
7029 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
7030
7031         * class.c (make_class_data): Push initial value for "arrayclass".
7032         * decl.c (init_decl_processing): Add new class field "arrayclass".
7033
7034 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
7035
7036         From patha@softlab.ericsson.se:
7037         * parse.y (switch_label): Use build, not build1, to construct
7038         DEFAULT_EXPR.
7039
7040 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7041
7042         * lang.c (lang_decode_option): Change -MA to -MP.
7043         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
7044         Update to new prototype; do quote targets.
7045         (jcf_dependency_write): Update.
7046
7047 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
7048
7049         Shorten primitive array allocation path:
7050         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
7051         to create new primitive arrays.
7052         * expr.c (build_newarray): If generating native code, call
7053         soft_newarray_node with a reference to the primitive TYPE identifier
7054         instead of type_value.
7055
7056 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
7057
7058         Fix for PRs gcj/312 and gcj/253:
7059         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
7060         dest if they arn't already.
7061         * class.c (layout_class): Call maybe_layout_super_class on
7062         superinterfaces also, but only if compiling from bytecode.
7063
7064         Fix for PR gcj/373:
7065         * parse.y (create_class): Set ACC_STATIC if class is declared in an
7066         interface.
7067
7068 2000-12-15  Tom Tromey  <tromey@redhat.com>
7069
7070         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
7071         set.
7072
7073 2000-12-14  Andrew Haley  <aph@redhat.com>
7074
7075         * boehm.c (mark_reference_fields): Change test to correctly detect
7076         bitmap overflow.
7077
7078 2000-12-15  Andreas Jaeger  <aj@suse.de>
7079
7080         * config-lang.in (lang_dirs): Added.
7081
7082 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7083
7084         * parse.y (end_artificial_method_body): Fixed undefined behavior.
7085         Credits go to rth for finding it.
7086
7087 2000-12-13  Mike Stump  <mrs@wrs.com>
7088
7089         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
7090
7091 2000-11-07  Tom Tromey  <tromey@cygnus.com>
7092
7093         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
7094         * lex.c (java_ignorable_control_p): Removed.
7095         (java_letter_or_digit_p): Removed.
7096         (java_start_char_p): New function.
7097         (java_read_char): Return `int', not `unicode_t'.  Changed
7098         callers.
7099         (java_read_unicode): Likewise.
7100         (java_read_unicode_collapsing_terminators): Likewise.
7101         (java_get_unicode): Likewise.
7102         (java_new_lexer): Initialize hit_eof.
7103         (java_parse_end_comment): Take `int' argument.
7104         (java_parse_doc_section): Likewise.
7105         (java_parse_escape_sequence): Don't allow backlash-newline.
7106         Return `int'.
7107         * lex.h (JAVA_DIGIT_P): Removed.
7108         (_JAVA_LETTER_OR_DIGIT_P): Removed.
7109         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
7110         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
7111         (JAVA_PART_CHAR_P): New macro.
7112         (UEOF): Now -1.
7113         (JAVA_CHAR_ERROR): Now -2.
7114         (java_lexer): New field `hit_eof'.
7115         * chartables.h: New file.
7116         * gen-table.pl: new file.
7117
7118 2000-11-20  Tom Tromey  <tromey@cygnus.com>
7119             Alexandre Petit-Bianco  <apbianco@cygnus.com>
7120
7121         * parse.y (java_complete_lhs): Only allow compound assignment of
7122         reference type if type is String.
7123
7124 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7125
7126         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
7127         jcf-path.c: Likewise.
7128
7129 2000-12-09  Anthony Green  <green@redhat.com>
7130
7131         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
7132         filestart and filename_length as int values.
7133
7134 2000-12-07  Mo DeJong  <mdejong@redhat.com>
7135
7136         * jcf-io.c (find_class): Correct the logic that tests to see if a
7137         .java file is newer than its .class file. The compiler was
7138         incorrectly printing a warning when file mod times were equal.
7139
7140 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
7141
7142         * jvgenmain.c: Use ISPRINT not isascii.
7143
7144 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7145
7146         * parse.y (end_artificial_method_body): Fixed typo.
7147
7148 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7149
7150         * parse.y (patch_method_invocation): Pick the correct enclosing
7151         context when creating inner class instances.
7152         Fixes gcj/332.
7153
7154 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
7155
7156         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7157         Update copyright year to 2000.
7158
7159 2000-11-23  Anthony Green  <green@redhat.com>
7160
7161         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
7162         Move current_file_list out of yyparse and make it static.
7163
7164         * expr.c: Declare quick_stack and tree_list_free_list as static
7165         (init_expr_processing): Register quick_stack and
7166         tree_list_free_list roots.
7167
7168 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7169
7170         * parse.y (build_outer_field_access): New local `decl_ctx', use
7171         it. Check for field's context and current class immediate outer
7172         context inheritance.
7173         (outer_field_access_p): Consider fields inherited from the last
7174         enclosing context.
7175         (build_access_to_thisn): Stop at the last enclosing context if
7176         necessary.
7177         Fixes gcj/367.
7178
7179 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
7180
7181         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
7182
7183 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
7184
7185         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
7186         scratch buffer.
7187
7188 2000-11-20  Tom Tromey  <tromey@cygnus.com>
7189
7190         * jv-scan.c (help): Document --complexity.
7191         (options): Added --complexity.
7192         (flag_complexity): New global.
7193         (main): Call `report'.
7194         * parse-scan.y (complexity): New global.
7195         (if_then_statement, if_then_else_statement,
7196         if_then_else_statement_nsi, switch_block_statement_group,
7197         while_expression, do_statement, for_begin, continue_statement,
7198         throw_statement, catch_clause, finally, method_invocation,
7199         conditional_and_expression, conditional_or_expression,
7200         conditional_expression): Update complexity.
7201         (reset_report): Reset complexity.
7202         (report): New function.
7203
7204 2000-11-20  Tom Tromey  <tromey@cygnus.com>
7205
7206         * lex.c (yylex): Added STRICT_TK case.
7207         * parse.y (STRICT_TK): Added.
7208         * parse-scan.y (STRICT_TK): Added.
7209         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
7210         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
7211         file.
7212         * keyword.h: Rebuilt.
7213         * keyword.gperf (strictfp): Added.
7214
7215 2000-11-20  Tom Tromey  <tromey@cygnus.com>
7216
7217         * lex.c (yylex): Recognize floating point constants with leading
7218         0.
7219
7220 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7221
7222         * java-tree.h (cyclic_inheritance_report): Constify.
7223         * parse.y (cyclic_inheritance_report): Likewise.
7224
7225 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
7226
7227         * parse.y (goal): Remove call to ggc_add_string_root.
7228
7229 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
7230
7231         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
7232         Create string in scratch buffer, then pass to build_string.
7233
7234 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7235
7236         * parse.y (issue_warning_error_from_context): Add
7237         ATTRIBUTE_PRINTF.
7238
7239 2000-11-11  Anthony Green  <green@redhat.com>
7240
7241         * jcf-parse.c (process_zip_dir): Add finput parameter.
7242         (jcf_figure_file_type): Call process_zip_dir with appropriate
7243         argument.
7244
7245 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7246
7247         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
7248         * jcf-parse.c (jcf_figure_file_type): Likewise.
7249
7250 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
7251
7252         * parse.y (create_new_parser_context): Use memset () instead of
7253         bzero ().
7254
7255 2000-11-08  Tom Tromey  <tromey@cygnus.com>
7256
7257         * gjavah.c (process_file): Only include gcj/cni.h when generating
7258         CNI stubs.
7259
7260 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
7261
7262         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
7263         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
7264         instead of bzero ().
7265
7266 2000-11-05  Tom Tromey  <tromey@cygnus.com>
7267
7268         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
7269         * lex.c (IS_ZERO): New define.
7270         (java_perform_atof): Error on floating point underflow.
7271
7272 2000-11-04  Tom Tromey  <tromey@cygnus.com>
7273
7274         * lex.c (java_parse_escape_sequence): Only read two octal
7275         characters if the first one is greater than 3.  Don't allow
7276         "octal" numbers to include the digits 8 or 9.
7277
7278 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
7279
7280         * Make-lang.in (java.distdir): Remove.
7281
7282 2000-11-03  Tom Tromey  <tromey@cygnus.com>
7283
7284         * Make-lang.in (java.dvi): New target.
7285         Partial fix for PR other/567.
7286
7287         * lang-options.h: Mention -Wout-of-date.
7288         * jcf-dump.c (flag_newer): New global.
7289         * gjavah.c (flag_newer): New global.
7290         * jcf-io.c (find_class): Only warn when flag_newer set.
7291         * lang.c (flag_newer): New global.
7292         (struct string_option): New declaration.
7293         (lang_W_options): New global.
7294         (process_option_with_no): New function.
7295         (lang_decode_option): Use it.
7296
7297         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
7298         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
7299         `$'.
7300
7301         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
7302         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
7303         * lex.c (java_read_unicode): Removed `term_context' argument.
7304         Recognize any number of `u' in `\u'.
7305         (java_read_unicode_collapsing_terminators): New function.
7306         (java_get_unicode): Use it.
7307         (java_lineterminator): Removed.
7308         (yylex): Produce error if character literal is newline or single
7309         quote.  Return if eof found in middle of `//' comment.  EOF in
7310         `//' comment is only an error if pedantic.
7311         (java_ignorable_control_p): New function.
7312         (java_parse_end_comment): Return if eof found in middle of
7313         comment.
7314         Include flags.h.
7315         * jv-scan.c (pedantic): New global.
7316
7317 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7318
7319         * parse.y (outer_field_access_p): Inherited fields aren't
7320         consider outer fields.
7321         (maybe_build_thisn_access_method): Use
7322         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
7323         (resolve_expression_name): Trigger an error if a static field
7324         is being accessed as an outer field.
7325
7326 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7327
7328         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
7329         Fixes gcj/365.
7330
7331 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
7332
7333         * Make-lang.in: Move all build rules here from Makefile.in,
7334         adapt to new context.  Wrap all rules that change the current
7335         directory in parentheses.  Expunge all references to $(P).
7336         When one command depends on another and they're run all at
7337         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
7338         all object-file generation rules.  Delete obsolete variables.
7339
7340         * Makefile.in: Delete.
7341         * config-lang.in: Delete outputs= line.
7342
7343 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7344
7345         * parse.y (patch_method_invocation): NULLify this_arg when already
7346         inserted.
7347         (maybe_use_access_method): Handle call to methods unrelated to the
7348         current class. Fixed comment.
7349         Fixes gcj/361.
7350
7351 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7352
7353        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
7354        scope.
7355
7356 2000-10-24  Tom Tromey  <tromey@cygnus.com>
7357
7358         * lex.c (java_new_lexer): Initialize new fields.  Work around
7359         broken iconv() implementations.
7360         (java_read_char): Swap bytes if required.  Use fallback decoder if
7361         required.
7362         (byteswap_init, need_byteswap): New globals.
7363         (java_destroy_lexer): Only close iconv handle if it is in use.
7364         * lex.h (java_lexer): New fields read_anything, byte_swap,
7365         use_fallback.
7366         Made out_buffer unsigned.
7367
7368 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7369
7370         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
7371         where an enclosing context can be set on the jdep.
7372         (do_resolve_class): Fixed identation.
7373
7374 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7375
7376         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
7377
7378         * jcf-reader.c (peek_attribute, skip_attribute): Only define
7379         when requested.
7380
7381         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
7382
7383         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
7384
7385 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7386
7387         * jcf-write.c (OP1): Update `last_bc'.
7388         (struct jcf_block): Fixed indentation and typo in comments.  New
7389         field `last_bc'.
7390         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
7391         follows `monitorenter'.
7392         * parse.y (patch_synchronized_statement): New local `tmp'. Call
7393         `patch_string'.
7394         Fixes gcj/232.
7395
7396 2000-10-16  Tom Tromey  <tromey@cygnus.com>
7397
7398         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
7399         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
7400         * lang-options.h: Added -MA, -MT, -MF..
7401         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
7402         (DEPEND_TARGET_SET): New macro.
7403         (DEPEND_FILE_ALREADY_SET): Likewise.
7404         (init_parse): Handle new flags.
7405         * jcf.h (jcf_dependency_print_dummies): Declare.
7406         * Make-lang.in (s-java): Added mkdeps.o.
7407         * Makefile.in (BACKEND): Added mkdeps.o.
7408         (../gcjh$(exeext)): Added mkdeps.o.
7409         (../jcf-dump$(exeext)): Added mkdeps.o.
7410         * jcf-depend.c: Include mkdeps.h.
7411         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
7412         add_entry): Removed.
7413         (jcf_dependency_reset): Rewrote.
7414         (dependencies): New global.
7415         (jcf_dependency_set_target): Rewrote.
7416         (jcf_dependency_add_target): Likewise.
7417         (jcf_dependency_add_file): Likewise.
7418         (munge): Removed.
7419         (print_ents): Removed.
7420         (jcf_dependency_write): Rewrote.
7421         (print_dummies): New global.
7422         (jcf_dependency_print_dummies): New function
7423         (jcf_dependency_write): Call deps_dummy_targets if required.
7424
7425 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7426
7427         * gjavah.c (add_class_decl): Removed unused variables `tname',
7428         `tlen' and `name_index'.
7429         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
7430         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
7431         in `wfl_operator' with value.
7432         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
7433         (jcf_figure_file_type): Fixed identation.
7434         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
7435         * parse.y (analyze_clinit_body): New function.
7436         (static_initializer:): Reset `current_static_block'.
7437         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
7438         `wfl_operator' with new value.
7439         (lookup_cl): Use EXPR_WFL_FILENAME.
7440         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
7441         analyze_clinit_body.
7442         (build_outer_field_access): Access to this$<n> built from
7443         current_class, not its outer context.
7444         (build_access_to_thisn): Fixed leading comment. Tidied things up.
7445         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
7446         (patch_method_invocation): Use `is_static_flag' when already
7447         initialized.
7448         (patch_newarray): Removed assignment in ternary operator.
7449
7450 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7451
7452         * except.c (free_eh_ranges): Don't free `whole_range'.
7453
7454 2000-10-15  Anthony Green  <green@redhat.com>
7455
7456         * decl.c (init_decl_processing): Call init_class_processing before
7457         anything else.
7458
7459 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7460
7461         * check-init.c (check_init): Fixed leading comment. Use
7462         LOCAL_FINAL_P.
7463         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7464         (give_name_to_locals): Likewise.
7465         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
7466         fields in lang_decl_var.
7467         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
7468         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
7469         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
7470         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
7471         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
7472         (LOCAL_FINAL): Rewritten.
7473         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
7474         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
7475         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
7476         `init_final' fields.
7477         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
7478         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
7479         (TYPE_HAS_FINAL_VARIABLE): New macro.
7480         (struct lang_type): Added `afv' field.
7481         * parse.y (check_static_final_variable_assignment_flag): New function.
7482         (reset_static_final_variable_assignment_flag): Likewise.
7483         (check_final_variable_local_assignment_flag): Likewise.
7484         (reset_final_variable_local_assignment_flag): Likewise.
7485         (check_final_variable_indirect_assignment): Likewise.
7486         (check_final_variable_global_assignment_flag): Likewise.
7487         (add_inner_class_fields): Use LOCAL_FINAL_P.
7488         (register_fields): Handle local finals and final variables.
7489         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
7490         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7491         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
7492         on local finals.
7493         (java_complete_expand_methods): Loop to set
7494         TYPE_HAS_FINAL_VARIABLE. Call
7495         `reset_final_variable_local_assignment_flag' and
7496         `check_final_variable_local_assignment_flag' accordingly before
7497         and after constructor expansion. Call
7498         `reset_static_final_variable_assignment_flag'
7499         before expanding <clinit> and after call
7500         `check_static_final_variable_assignment_flag' if the
7501         current_class isn't an interface. After all methods have been
7502         expanded, call `check_final_variable_global_assignment_flag' and
7503         `check_static_final_variable_assignment_flag' if the current class
7504         is an interface.
7505         (maybe_yank_clinit): Fixed typo in comment.
7506         (build_outer_field_access_methods): Removed old sanity check. Use
7507         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7508         Don't create access methods for finals.
7509         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
7510         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
7511         existing DECL_INIT has been processed.
7512         (java_complete_lhs): Likewise.
7513         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
7514         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
7515         logic.
7516         (patch_assignment): Use LOCAL_FINAL_P.
7517         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
7518         DECL_INITIAL is nullified.
7519         Fixes gcj/163.
7520
7521 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7522
7523         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
7524
7525         * Makefile.in (parse.c, parse-scan.c): Likewise.
7526
7527 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
7528
7529         * class.c (temporary_obstack): Remove.
7530         (make_class): Don't mess with obstascks.
7531         (push_class): Likewise.
7532         (set_super_info): Likewise.
7533         (add_method_1): Likewise.
7534         (add_method): Likewise.
7535         (add_field): Likewise.
7536         (build_utf8_ref): Likewise.
7537         (build_class_ref): Likewise.
7538         (build_static_field_ref): Likewise.
7539         (finish_class): Likewise.
7540         (push_super_field): Likewise.
7541         (layout_class): Likewise.
7542         (layout_class_methods): Likewise.
7543         (init_class_processing): Likewise.
7544         * constants.c (get_tag_node): Likewise.
7545         (build_constant_data_ref): Likewise.
7546         * decl.c (ggc_p): Remove.
7547         (copy_lang_decl): Use ggc_alloc.
7548         (complete_start_java_method): Don't mess with obstacks.
7549         (start_java_method): Likewise.
7550         (end_java_method): Likewise.
7551         * except.c (link_handler): Use xmalloc.
7552         (free_eh_ranges): New function.
7553         (method_init_exceptions): Use it.
7554         (add_handler): Use xmalloc.
7555         (expand_start_java_handler): Don't mess with obstacks.
7556         (prepare_eh_table_type): Likewise.
7557         (expand_end_java_handler): Likewise.
7558         * expr.c (push_value): Likewise.
7559         (create_label_decl): Likewise.
7560         (build_jni_stub): Likewise.
7561         (java_lang_expand_expr): Likewise.
7562         (note_instructions): Use xrealloc.
7563         (java_push_constant_from_pool): Don't mess with obstacks.
7564         (process_jvm_instruction): Likewise.
7565         * java-tree.h (cyclic_inheritance_report): Remove duplicate
7566         declaration.
7567         * jcf-parse.c (get_constant): Don't mess with obstacks.
7568         (read_class): Likewise.
7569         (jcf_parse): Likewise.
7570         * lex.c (expression_obstack): Remove.
7571         (java_lex): Don't use obstack_free.
7572         * parse.h (exit_java_complete_class): Don't mess with obstacks.
7573         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
7574         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
7575         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
7576         * parse.y (gaol): Add more GC roots.
7577         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
7578         (lookup_field_wrapper): Likewise.
7579         (obtain_incomplete_type): Don't mess with obstacks.
7580         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
7581         macros.
7582         (craft_constructor): Don't mess with obstacks.
7583         (safe_layout_class): Likewise.
7584         (java_complete_class): Likewise.
7585         (source_end_java_method): Likewise.
7586         (build_outer_field_access_methods): Likewise.
7587         (build_outer_method_access_method): Likewise.
7588         (maybe_build_thisn_access_method): Likewise.
7589         (build_dot_class_method_invocation): Likewise.
7590         (java_complete_tree): Likewise.
7591         (java_complete_lhs): Likewise.
7592         (do_merge_string_cste): Likewise.
7593         (patch_string_cst): Likewise.
7594         (array_constructor_check_entry): Likewise.
7595         * typeck.c (build_java_array_type): Likewise.
7596         (parse_signature_string): Likewise.
7597         (build_java_signature): Likewise.
7598
7599 2000-10-12  Tom Tromey  <tromey@cygnus.com>
7600
7601         Fix for PR gcj/356:
7602         * gjavah.c (add_class_decl): Don't special-case inner classes.
7603         (add_namelet): Likewise.
7604
7605 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
7606
7607         * java-tree.h: Constify current_encoding.
7608         * lang.c: Constify current_encoding.
7609
7610 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
7611
7612         * jvgenmain.c (class_mangling_suffix): Omit `.'.
7613         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
7614
7615 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7616
7617         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
7618         patch. Fixes gcj/340.
7619
7620 2000-10-10  Tom Tromey  <tromey@cygnus.com>
7621
7622         * lex.c (java_new_lexer): Initialize out_first and out_last
7623         fields.
7624         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
7625
7626 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7627
7628         * parse.y (pop_current_osb): New function.
7629         (array_type:): Use `dims:', changed actions
7630         accordingly. Suggested by Anthony Green.
7631         (array_creation_expression:): Used pop_current_osb.
7632         (cast_expression:): Likewise.
7633         (search_applicable_method_list): Fixed indentation.
7634
7635 2000-10-08  Anthony Green  <green@redhat.com>
7636
7637         * parse.y (array_type_literal): Remove production.
7638         (type_literals): Refer to array_type, not array_type_literal.
7639
7640 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7641
7642         Patch contributed by Corey Minyard.
7643         * decl.c (check_local_named_variable): New function.
7644         (tree check_local_unnamed_variable): Likewise.
7645         (find_local_variable): Splitted. Call check_local_{un}named_variable.
7646
7647 2000-10-07  Anthony Green  <green@redhat.com>
7648
7649         * class.c (layout_class): Handle case where superclass can't be
7650         layed out yet.
7651
7652 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
7653
7654         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
7655         gperf.
7656
7657 2000-10-05  Tom Tromey  <tromey@cygnus.com>
7658
7659         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
7660         * jvgenmain.c (class_mangling_prefix): Removed.
7661         (class_mangling_suffix): New global.
7662         (main): Use it.
7663         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
7664         `$'.
7665         (print_method_info): Handle overrides for static and final
7666         methods.
7667         (process_file): Generate declaration for class object field.
7668         * class.c (cxx_keywords): New array.
7669         (utf8_cmp): New function.
7670         (cxx_keyword_p): New function.
7671         (layout_class_method): Mangle C++ keywords by appending `$'.
7672         (mangle_field): New function.
7673         (mangle_class_field): Use mangle_field.  Mangle class name as
7674         `class$'.
7675         (mangle_static_field): Use mangle_field.
7676
7677 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7678
7679         * decl.c (find_local_variable): Removed uncessary type check and
7680         fixed range check typo. From Corey Minyard.
7681
7682 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7683
7684         * decl.c (give_name_to_locals): New local `code_offset'. Call
7685         `maybe_adjust_start_pc'.
7686         * expr.c (note_instructions): New function.
7687         (expand_byte_code): Don't collect insn starts here.
7688         (peek_opcode_at_pc): New function.
7689         (maybe_adjust_start_pc): Likewise.
7690         * java-tree.h (maybe_adjust_start_pc): Declare.
7691         (note_instructions): Likewise.
7692         * jcf-parse.c (parse_class_file): Call `note_instructions'.
7693
7694 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7695
7696         * parse.y (field_access:): Fixed indentation.
7697         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
7698
7699 2000-09-07  Tom Tromey  <tromey@cygnus.com>
7700
7701         Fix for PR gcj/307:
7702         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
7703         JPRIMITIVE_TYPE_P, for arithmetic operators.
7704         (patch_method_invocation): Indentation fix.
7705         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
7706         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
7707         (do_unary_numeric_promotion): Cleaned up code.
7708         (valid_cast_to_p): Handle boolean correctly.
7709
7710 2000-09-27  Tom Tromey  <tromey@cygnus.com>
7711
7712         * lex.c (java_read_unicode): Reset bs_count when finished with
7713         `\u' sequence.
7714
7715 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
7716
7717         Convert to GC.
7718         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
7719         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
7720         (typeck.o): Depend on ggc.h.
7721         * class.c (add_method_1): Use GC functions for allocation.
7722         (init_class_processing): Register roots.
7723         * decl.c (ggc_p): Set to 1.
7724         (pending_local_decls): Make it static.
7725         (push_jvm_slot): Use GC functions for allocation.
7726         (init_decl_processing): Register roots.
7727         (give_name_to_locals): Use GC functions for allocation.
7728         (lang_mark_tree): New function.
7729         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
7730         functions for allocation.
7731         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
7732         * lex.c (java_lex): Use build_string, rather than replicating it
7733         inline.
7734         * parse.y (goal): Add more roots.
7735         (mark_parser_ctxt): New function.
7736         * typeck.c: Include ggc.h.
7737
7738 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7739
7740         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
7741         contains something else than MODIFY_EXPR.
7742
7743 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
7744
7745         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
7746         * Makefile.in (parse.o): Depend on ggc.h.
7747         (class.o): Likewise.
7748         (constants.o): Likewise.
7749         (decl.o): Likewise.
7750         (expr.o): Likewise.
7751         (jcf-parse.o): Likewise.
7752         (jcf-write.o): Likewise.
7753         (mangle.o): Likewise.
7754         * class.c: Include ggc.h.
7755         (build_static_field_ref): Register GC roots.
7756         (layout_class): Likewise.
7757         (init_class_processing): Likewise.
7758         * constants.c: Include ggc.h.
7759         (current_constant_pool_data_ref): Remove.
7760         (tag_nodes): Move it to ...
7761         (get_tag_node): ... here.  Register GC roots.
7762         * decl.c: Include ggc.h.  Remove many global tree definitions.
7763         (throw_node): Define.
7764         (java_global_trees): Likewise.
7765         (predef_filenames): Make the size a constant.
7766         (init_decl_processing): Adjust accordingly.
7767         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
7768         * expr.c: Include ggc.h.
7769         (init_expr_processing): Register GC roots.
7770         (build_invokeinterface): Likewise.
7771         * java-tree.h: Replace extern tree declarations with macros.
7772         (java_global_trees): New variable.
7773         (java_tree_index): New enumeration.
7774         (init_jcf_parse): Declare.
7775         * jcf-parse.c: Include ggc.h.
7776         (current_class): Remove declaration.
7777         (main_class): Likewise.
7778         (all_class_list): Likewise.
7779         (predefined_filename_p): Adjust for constant size of
7780         predef_filenames.
7781         (init_jcf_parse): New function.
7782         * jcf-write.c: Include ggc.h.
7783         (generate_classfile): Register GC roots.
7784         (append_synthetic_attribute): Likewise.
7785         (append_innerclass_attribute_entry): Likewise.
7786         * lang.c: Include ggc.h.
7787         (lang_print_error): Register GC roots.
7788         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
7789         with macros.
7790         * parse.y: Include ggc.h.
7791         (wfl_operator): Remove.
7792         (goal): Register GC roots.
7793         (java_pop_parser_context): Adjust for new field names.
7794         (java_parser_context_save_global): Likewse.
7795         (java_parser_context_restore_global): Likewise.
7796         (java_parser_context_suspend): Likewise.
7797         (java_parser_context_resume): Likewise.
7798         (verify_constructor_circularity): Register GC roots.
7799         (lookup_cl): Likewise.
7800         (java_reorder_fields): Likewise.
7801         (build_current_this): Likewise.
7802         (class_in_current_package): Likewise.
7803         (argument_types_convertible): Likewise.
7804         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
7805
7806 2000-09-14  Tom Tromey  <tromey@cygnus.com>
7807
7808         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
7809
7810 2000-09-13  Tom Tromey  <tromey@cygnus.com>
7811
7812         * jcf-parse.c: Include <locale.h>.
7813         * jv-scan.c: Include <locale.h>.
7814
7815 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7816
7817         * expr.c (pop_type_0): Return `Object' if trying to merge two
7818         interface types.
7819         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
7820         interface types; `Object' is always a valid supertype.
7821
7822 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7823
7824         Fix for PR gcj/33:
7825         * jv-scan.c (help): Document --encoding.
7826         (options): Added `encoding' entry.
7827         (OPT_ENCODING): New define.
7828         (main): Handle --encoding.
7829         Include <langinfo.h> if nl_langinfo exists.
7830         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
7831         --encoding.
7832         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
7833         (parse_source_file): Correctly call java_init_lex.  Added `finput'
7834         argument.  Use nl_langinfo to determine default encoding.
7835         * java-tree.h (current_encoding): Declare.
7836         * parse.y (java_parser_context_restore_global): Don't restore
7837         `finput'.
7838         (java_parser_context_save_global): Don't set `finput' field.
7839         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
7840         if required.
7841         * lang.c (current_encoding): New global.
7842         (lang_decode_option): Recognize `-fencoding='.
7843         (finish_parse): Don't close finput.
7844         * parse.h (struct parser_ctxt): Removed `finput' and
7845         `unget_utf8_value' fields.  Added `lexer' field.
7846         (java_init_lex): Fixed declaration.
7847         * lex.c (java_new_lexer): New function.
7848         (java_destroy_lexer): Likewise.
7849         (java_read_char): Added `lex' argument.  Handle iconv case.
7850         (java_read_unicode): Added `lex' argument.  Count backslashes in
7851         lexer structure.
7852         (java_init_lex): Added `finput' and `encoding' arguments.  Set
7853         `lexer' field in ctxp.
7854         (BAD_UTF8_VALUE): Removed.
7855         (java_lex): Handle seeing UEOF in the middle of a string literal.
7856         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
7857         (java_lexer): New structure.
7858         (UNGETC): Removed.
7859         (GETC): Removed.
7860         (DEFAULT_ENCODING): New define.
7861         (java_destroy_lexer): Declare.
7862
7863 2000-09-12  Tom Tromey  <tromey@cygnus.com>
7864
7865         Fix for PR gcj/343:
7866         * lex.c (java_init_lex): Initialize java_io_serializable.
7867         * parse.y (java_io_serializable): New global.
7868         (valid_ref_assignconv_cast_p): An array can be cast to
7869         serializable.
7870
7871 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
7872
7873         * decl.c, expr.c: Include defaults.h if not already included.
7874         Don't define the *_TYPE_SIZE macros.
7875
7876 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
7877
7878         * typeck.c (build_java_array_type): Correct first parameter
7879         in ADJUST_FIELD_ALIGN invocation.
7880
7881 2000-09-06  Tom Tromey  <tromey@cygnus.com>
7882
7883         * lang-specs.h: Also recognize `-femit-class-files'.
7884
7885 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7886
7887         * verify.c (merge_types): Load the types to merge if necessary.
7888
7889 2000-09-02  Anthony Green  <green@redhat.com>
7890
7891         * jcf-io.c: Include zlib.h.
7892         (open_in_zip): Read compressed class file archives.
7893         * zipfile.h (ZipDirectory): Add uncompressed_size and
7894         compression_method fields.
7895         * zextract.c (read_zip_archive): Collect file compression info.
7896
7897 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
7898
7899         * parse.y (do_resolve_class): Also explore superclasses of
7900         intermediate enclosing contexts when searching for inner classes.
7901
7902 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7903
7904         * parse.y (variable_declarator_id:): Better error message.
7905         (expression_statement:): Use YYNOT_TWICE.
7906         (cast_expression:): Likewise.
7907         (assignment:): Likewise.
7908
7909 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7910
7911         * parse.y (do_merge_string_cste): New locals. Create new
7912         STRING_CSTs each time, use memcpy. Fixes gcj/311.
7913
7914 2000-08-07  Hans Boehm  <boehm@acm.org>
7915
7916         * boehm.c (mark_reference_fields): Set marking bits for all words in
7917         a multiple-word record.
7918         (get_boehm_type_descriptor): Use the procedure marking descriptor for
7919         java.lang.Class.
7920
7921 2000-08-31  Mike Stump  <mrs@wrs.com>
7922
7923         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7924         jcf-dump$(exeext)): Make parallel safe.
7925
7926 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7927
7928         * jcf-parse.c (set_source_filename): Constify a char *.
7929         * jcf-write.c (append_innerclasses_attribute,
7930         make_class_file_name): Constify a char *.  Don't recycle a
7931         variable for an unrelated purpose.
7932         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7933         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7934
7935 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7936
7937         * expr.c (can_widen_reference_to): Fixed indentation.
7938         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7939         * parse.y: `finit$' replaces `$finit$' in comments.
7940         (try_builtin_assignconv): Fixed leading comment.
7941
7942 2000-08-25  Greg McGary  <greg@mcgary.org>
7943
7944         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7945
7946 2000-08-24  Greg McGary  <greg@mcgary.org>
7947
7948         * lang.c (lang_decode_option): Use ARRAY_SIZE.
7949         * parse.y (BINOP_LOOKUP): Likewise.
7950
7951 2000-08-22  Andrew Haley  <aph@cygnus.com>
7952
7953         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7954         sign extending. Fixes gcj/321.
7955         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7956         combining to make a jlong. Fixes gcj/321.
7957
7958 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7959
7960         * lang-specs.h: Do not process -o or run the assembler if
7961         -fsyntax-only.
7962
7963 2000-08-16  Andrew Haley  <aph@cygnus.com>
7964
7965         * typeck.c (build_java_array_type): Rewrite code to do array
7966         alignment.  Take into account back-end macros when aligning array
7967         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7968         user to set alignment. Fixes gcj/252 and 160.
7969
7970 2000-08-09  Tom Tromey  <tromey@cygnus.com>
7971
7972         * parse.y (check_abstract_method_definitions): Now return `int'.
7973         Check implemented interfaces.  Fixes PR gcj/305.
7974
7975         * parse.y (patch_switch_statement): Disallow `long' in switch
7976         expressions.  Fixes PR gcj/310.
7977
7978 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7979
7980         * decl.c (finit_leg_identifier_node): New global.
7981         (init_decl_processing): Use `finit$' to initialize
7982         finit_identifier_node. Use `$finit$' to initialize
7983         finit_leg_identifier_node.
7984         * expr.c (expand_java_field_op): Use ID_FINIT_P.
7985         * java-tree.h (finit_identifier_node): Changed attached comment.
7986         (finit_leg_identifier_node): New declaration.
7987         (ID_FINIT_P): Take finit_identifier_node and
7988         finit_leg_identifier_node into account. This is a backward
7989         compatibility hack.
7990
7991 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7992
7993         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7994         Jan 6 2000 patch.
7995         (generate_bytecode_insns): Check `nargs' before emitting it.
7996         * verify.c (merge_type_state): Fixed typo.
7997         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7998         generate_bytecode_{conditional,insns}.
7999
8000 2000-08-13  Anthony Green  <green@redhat.com>
8001
8002         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
8003         for -pg builds).
8004
8005 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8006
8007         * class.c (maybe_layout_super_class): Fixed indentation.
8008         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
8009         (java_check_methods): New function declaration.
8010         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
8011         instead of `str_ptr'.
8012         * jcf-write.c (generate_bytecode_insns): Emit number the of args
8013         of a `invokeinterface' at the right time.
8014         * parse.h (WFL_STRIP_BRACKET): New macro.
8015         (SET_TYPE_FOR_RESOLUTION): Use it.
8016         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
8017         (check_class_interface_creation): Don't check for cross package
8018         innerclass name clashes.
8019         (method_header): Behave properly if MDECL is `error_mark_node'.
8020         (method_declarator): Return `error_mark_node' if bogus current
8021         class.
8022         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
8023         (resolve_and_layout): New local `decl_type', set and used. Call
8024         java_check_methods.
8025         (java_check_methods): New method.
8026         (java_layout_classes): Use it.
8027         (resolve_qualified_expression_name): No EH check necessary in
8028         access$<n>.
8029         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
8030         `case' statement.
8031         (patch_assignment): Set DECL_INITIAL on integral final local.
8032
8033 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8034
8035         * java-tree.h (flag_extraneous_semicolon): New extern.
8036         * lang-options.h: (-Wextraneous-semicolon): New option.
8037         * lang.c (flag_redundant): Fixed typo in leading comment.
8038         (flag_extraneous_semicolon): New global.
8039         (lang_decode_option): Set `flag_extraneous_semicolon' when
8040         -Wall. Decode `-Wextraneous-semicolon'.
8041         * parse.y (type_declaration:): Removed `SC_TK' hack, added
8042         `empty_statement' rule.
8043         (class_body_declaration): Likewise.
8044         (method_body:): Accept `;' as a method body.
8045         (static_initializer:): Removed `SC_TK' hack.
8046         (constructor_block_end:): Likewise.
8047         (empty_statement:): Report deprecated empty declaration. Fixes
8048         gcj/295
8049
8050 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8051
8052         * parse.y (build_dot_class_method_invocation): Changed parameter
8053         name to `type'. Build signature from `type' and convert it to a
8054         STRING_CST if it's an array.
8055         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
8056         to use `ref_type' directly.
8057
8058 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
8059
8060         * lang-options.h: Added a comma after the last element to avoid
8061         syntax errors when other languages define additional options.
8062
8063 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
8064
8065         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
8066         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
8067         (jc1): Link with $(BACKEND).
8068         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
8069
8070 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
8071
8072         * jvspec.c: Adjust type of second argument to
8073         lang_specific_driver, and update code as necessary.
8074
8075         * class.c (build_dtable_decl): Initialize dummy.
8076
8077 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8078
8079         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
8080         method bodies not to rule out discarding `<clinit>'; don't use
8081         <clinit> to initialize static fields with constant initializers.
8082
8083 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8084
8085         * gjavah.c (print_method_info): Added `synth' parameter. Skip
8086         synthetic methods.
8087         (method_synthetic): New global.
8088         (HANDLE_METHOD): Recognize synthetic method and tell
8089         `print_method_info' about it.
8090         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
8091         processing a synthetic method.
8092         * jcf-reader.c (skip_attribute): New function.
8093         ( skip_attribute): Likewise.
8094
8095 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8096
8097         * parse.y (build_outer_field_access): Fixed comments.
8098         (fix_constructors): Emit the initialization of this$<n> before
8099         calling $finit$.
8100         (resolve_qualified_expression_name): Build an access to `decl' if
8101         necessary.
8102
8103 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8104
8105         * parse-scan.y (curent_class): Non longer const.
8106         (inner_qualifier, inner_qualifier_length): Deleted.
8107         (current_class_length): New global.
8108         (bracket_count): Fixed typo in leading comment.
8109         (anonymous_count): New global.
8110         (class_instance_creation_expression:): Handle anonymous classes.
8111         (anonymous_class_creation:): New rule.
8112         (push_class_context): Rewritten.
8113         (pop_class_context): Likewise.
8114         (INNER_QUALIFIER): Macro deleted.
8115         (report_class_declaration): call `push_class_context' when
8116         entering the function. `fprintf' format modified not to use
8117         INNER_QUALIFIER.
8118         (report_class_declaration): Assign `package_name' and
8119         `current_class' to NULL separately.
8120
8121 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8122
8123         * expr.c (build_invokeinterface): Call layout_class_methods on
8124         target interface.
8125
8126 2000-07-27  Tom Tromey  <tromey@cygnus.com>
8127             Anthony Green  <green@cygnus.com>
8128             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8129
8130         * class.c (make_class_data): Create vtable for abstract classes.
8131         (get_dispatch_table): Changed to cope with abstract classes.
8132
8133 2000-07-27  Tom Tromey  <tromey@cygnus.com>
8134
8135         * parse.y (patch_method_invocation): Don't reverse the argument
8136         list when dealing with anonymous class constructors. Fixed typo in
8137         comment.
8138
8139 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8140
8141         * parse.y (build_alias_initializer_parameter_list): Reverse
8142         crafted list when building aliases for anonymous class
8143         constructors.
8144
8145 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8146
8147         * parse.y (jdep_resolve_class): Don't bother checking potential
8148         innerclass access if `decl' is NULL.
8149         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
8150         WFL.
8151
8152 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8153
8154         * parse.c: Remove (again.)
8155
8156 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8157
8158         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
8159         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
8160         outside the `if' statement, alias to innerclass removed, `decl'
8161         used to mark the class complete.
8162
8163 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8164
8165         * parse.y (simple_name:): Fixed typo in error message.
8166
8167 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8168
8169         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
8170         or its first operand can be error marks.
8171
8172 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8173
8174         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
8175         * parse.y (method_header): Likewise.
8176
8177 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8178
8179         * parse.y (process_imports): Consider that one might be trying to
8180         import an innerclass. Fixes gcj/254
8181
8182 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8183
8184         * parse.y (find_as_inner_class): Handle the case where the
8185         enclosing context of an innerclass has been loaded as bytecode.
8186
8187 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8188
8189         * parse.y (simple_name:): Reject `$' in type names.
8190         (resolve_type_during_patch): Use `type' as a second
8191         argument to resolve_no_layout. Fixes gcj/257.
8192
8193 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
8194
8195         * parse.y (find_most_specific_methods_list): Select the only
8196         non-abstract method even if max has been set.
8197         Fixes gcj/285, gcj/298.
8198
8199 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
8200
8201         * lang-specs.h: Added %(jc1) to java compiler options.
8202
8203 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
8204
8205         * .cvsignore: New file.
8206
8207 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8208
8209         * parse.y (not_accessible_p): Access granted to innerclasses
8210         (indirectly) extending the reference type. Fixes gcj/249.
8211
8212 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8213
8214         * parse.y (patch_method_invocation): Fixed comment.
8215         (maybe_use_access_method): Build this$<n>s to the context of the
8216         target method, or a type that extends it. Fixes gcj/242.
8217
8218 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
8219
8220         * parse.c: Remove.
8221
8222 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8223
8224         * parse.y (fold_constant_for_init): Avoid bullish conversion.
8225
8226 2000-07-13  Tom Tromey  <tromey@cygnus.com>
8227
8228         * lang-specs.h: Added %{I*}.
8229
8230 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
8231
8232         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
8233
8234 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
8235
8236         * parse-scan.c: Remove.
8237
8238 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8239
8240         * class.c (set_super_info): Handled protected inner classes.
8241         (common_enclosing_context_p): Bail early if arguments aren't both
8242         inner classes.
8243         (get_access_flags_from_decl): Handle private and protected inner
8244         classes.
8245         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
8246         (CLASS_PROTECTED): Likewise.
8247         (struct lang_type): New bitfield `poic'.
8248         * parse.y (jdep_resolve_class): Call check_inner_class_access on
8249         inner classes only.
8250         (check_inner_class_access): Renamed arguments, added
8251         comments. Handles protected inner classes (fixes gcj/225)
8252         (not_accessible_p): Fixed comments. Avoid handling inner classes.
8253
8254 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8255
8256         * parse.y (resolve_qualified_expression_name): Verify qualified
8257         access to `this'. Fixes gcj/239.
8258
8259 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8260
8261         * jcf-write.c (generate_classfile): Don't install ConstantValue
8262         for null pointers.
8263
8264 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8265
8266         * parse.y (resolve_qualified_expression_name): Handle inner class
8267         access. Fixes gcj/256.
8268
8269 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8270
8271         * jcf-write.c (generate_classfile): Properly install the
8272         ConstantValue attribute and the initial value constant pool index
8273         on string constants.
8274         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
8275         class files.
8276
8277 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8278
8279         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
8280         construct.
8281         * parse.y (find_as_inner_class): Fixed typo.
8282         (do_resolve_class): Explore enclosing contexts when searching for
8283         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
8284         (check_inner_class_access): Check `decl' which can be null in case
8285         of previous errors.
8286
8287 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8288
8289         * java-tree.h (java_debug_context): Declared `extern'.
8290         (safe_layout_class): Likewise.
8291         * parse.y (resolve_field_access): Field must be `static' in order
8292         to be replaced by its initial value. Added comments.
8293         (find_applicable_accessible_methods_list): Fixed typo.
8294         (find_most_specific_methods_list): Methods found in innerclasses
8295         take over methods founds in the enclosing contexts.
8296         (java_complete_tree): Loosen restrictions on the type of DECLs
8297         that can be replaced by their initialization values.
8298         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
8299
8300 2000-07-05  Tom Tromey  <tromey@cygnus.com>
8301
8302         * Make-lang.in (PARSE_DIR): New macro.
8303         (PARSE_RELDIR): Likewise.
8304         (PARSE_C): Likewise.
8305         (PARSE_SCAN_C): Likewise.
8306         ($(PARSE_C)): New target.
8307         ($(PARSE_SCAN_C)): Likewise.
8308         (SET_BISON): New macro.
8309         (BISONFLAGS): Likewise.
8310         (JAVABISONFLAGS): Likewise.
8311
8312 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
8313
8314         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
8315         argument on the first pass for CNI as well as JNI.
8316         (print_method_info): Set up method name on the first pass only.
8317
8318 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8319
8320         * parse.y (parser_qualified_classname): Removed parameter
8321         `is_static'.
8322         (create_interface): Removed first passed parameter to
8323         parser_qualified_classname.
8324         (create_class): Likewise. Don't install alias on static
8325         innerclasses. Fixes gcj/275.
8326
8327 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8328
8329         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
8330         debugable statement with empty_stmt_node. Fixes gcj/272
8331
8332 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8333
8334         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
8335         gcj/271.
8336
8337 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8338
8339         * jcf-write.c (push_long_const): Appropriately cast short negative
8340         constant to jword.
8341
8342 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8343
8344         * parse.y (verify_constructor_super): Use loop variable
8345         `m_arg_type' initialized with `mdecl_arg_type'.
8346
8347 2000-06-29  Tom Tromey  <tromey@cygnus.com>
8348
8349         * parse.y (resolve_field_access): Handle case where `type_found'
8350         is NULL.
8351
8352 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8353
8354         * expr.c (lookup_field): The same field can be found through two
8355         different interface. Don't declare it ambiguous in that case.
8356
8357 2000-06-27  Tom Tromey  <tromey@cygnus.com>
8358
8359         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
8360         follows \r, then unget it at a lower level.
8361
8362 2000-06-26  Tom Tromey  <tromey@cygnus.com>
8363
8364         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
8365         java_complete_tree.
8366
8367 2000-06-25  Tom Tromey  <tromey@cygnus.com>
8368
8369         * parse.y (for_statement): Wrap expression in a WFL if it is a
8370         constant.  For PR gcj/268.
8371
8372 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8373
8374         * parse.y (do_resolve_class): Minor optimiztion in the package
8375         list search. Removed unnecessary test and return statement.
8376         (valid_ref_assignconv_cast_p): Order of arguments to
8377         enclosing_context_p fixed.
8378
8379 2000-06-24  Tom Tromey  <tromey@cygnus.com>
8380
8381         * expr.c (lookup_field): Print error and return error_mark_node if
8382         field reference is ambiguous.
8383
8384         * parse.y (check_abstract_method_definitions): Also check if
8385         `other_method' is abstract.
8386
8387 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8388
8389         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
8390         classes.
8391         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
8392         (struct lang_type): New field `pic'.
8393         (CLASS_PRIVATE): New macro.
8394         * parse.y (check_inner_class_access): New function.
8395         (jdep_resolve_class): Call it.
8396
8397 2000-06-23  Tom Tromey  <tromey@cygnus.com>
8398
8399         * parse.y (patch_incomplete_class_ref): Initialize the returned
8400         class.  For PR gcj/260.
8401
8402 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8403
8404         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
8405
8406 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8407
8408         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
8409         Java specific checks.
8410         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
8411         screened by DECL_P.
8412         * java-tree.def (CASE_EXPR): Marked 'e'.
8413         (DEFAULT_EXPR): Likewise.
8414         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
8415         screened by DECL_P.
8416         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
8417         Java specific checks.
8418         (generate_bytecode_insns): Test try_block for BLOCK before using
8419         BLOCK_EXPR_BODY.
8420         * parse.y (build_wfl_wrap): Added `location' argument. Set
8421         EXPR_WFL_LINECOL accordingly.
8422         (dim_expr:): Wrap constants with WFLs.
8423         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
8424         (resolve_package): Check for `stmt' not being a BLOCK before
8425         building a debuggable statement with it.
8426         (make_qualified_primary): Added extra parameter to build_wfl_wrap
8427         invocation.
8428         (resolve_field_access): Make sure `decl' is a DECL before treating
8429         it as such.
8430         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
8431         IDENTIFIER_NODE before treating it as such.
8432         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
8433         treating it as such.
8434         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
8435         to be applied only on non array types.
8436
8437 2000-06-16  Per Bothner  <per@bothner.com>
8438
8439         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
8440         define in terms of DECL_RESULT, as that fails when --enable-checking.
8441
8442 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8443
8444         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
8445         types the same in comparison.
8446         (CHECK_OP): Add static prototype.
8447
8448 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
8449
8450         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
8451         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
8452         * parse.c: Rebuilt.
8453
8454 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8455
8456         * decl.c (create_primitive_vtable): Prototype.
8457
8458         * jcf-write.c (generate_bytecode_insns): Initialize variable
8459         `saved_context'.
8460
8461         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
8462
8463 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
8464
8465         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
8466         to track searched classes, and do not search the same class more than
8467         once. Call find_applicable_accessible_methods_list on immediate
8468         superclass, instead of search_applicable_method_list on all ancestors.
8469         Fix for PR gcj/238.
8470
8471 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
8472
8473         * parse.y (register_fields): Permit static fields in inner classes
8474         if they are final. Fix for PR gcj/255.
8475
8476 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8477
8478         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
8479         * parse.y (find_in_imports): Returned type changed to void,
8480         leading comment fixed.
8481         (register_package): New function.
8482         (qualify_and_find): Likewise.
8483         (package_declaration:): Use `register_package'.
8484         (single_type_import_declaration:): Removed local variable
8485         `node'. Added missing `;' for consistency.
8486         (type_import_on_demand_declaration:): Use `chainon' to link new
8487         entries.
8488         (lookup_field_wrapper): Lookup local variables defined in outer
8489         contexts first.
8490         (java_complete_class): Don't reverse the list of imported on demand.
8491         (do_resolve_class): Reorganized. Removed local variable
8492         `original_name'. Call `qualify_and_find' with the current package
8493         name, invoke `find_in_imports_on_demand' right after. Call
8494         `qualify_and_find' with the packages we've seen so far. Fixed
8495         operations numbering in comments.
8496         (java_expand_class): Don't reverse `package_list'.
8497         (find_most_specific_methods_list): New local variables `abstract'
8498         and `candidates'. Use them to pick the right method.
8499
8500 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
8501
8502         * parse.y (check_modifiers_consistency): Don't subtract out
8503         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
8504
8505 2000-06-04  Philipp Thomas  <pthomas@suse.de>
8506
8507         * Makefile.in (INTLLIBS): New.
8508         (LIBS): Add above.
8509         (DEPLIBS): Ditto.
8510
8511 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8512
8513         * class.c (get_dispatch_table): Build the vtable dummy entry list
8514         element with a null purpose. Fixed leading comment.
8515         (build_dtable_decl): Build an accurate dtable type when appropriate
8516         and use it.
8517
8518 2000-06-02  Richard Henderson  <rth@cygnus.com>
8519
8520         * lang.c (lang_get_alias_set): New.
8521
8522 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8523
8524         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
8525         before using it as the accessed field.
8526
8527 2000-05-31  Tom Tromey  <tromey@cygnus.com>
8528
8529         * java-tree.h (boolean_array_vtable, byte_array_vtable,
8530         char_array_vtable, short_array_vtable, int_array_vtable,
8531         long_array_vtable, float_array_vtable, double_array_vtable):
8532         Declare.
8533         * expr.c (get_primitive_array_vtable): New function.
8534         (create_primitive_vtable): New function.
8535         (java_lang_expand_expr): Enable code to statically generate
8536         arrays.
8537         * decl.c (init_decl_processing): Create primitive vtables.
8538         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
8539         short_array_vtable, int_array_vtable, long_array_vtable,
8540         float_array_vtable, double_array_vtable): Define.
8541
8542 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
8543
8544         * java/parse.y (find_applicable_accessible_methods_list):
8545         Don't add an uninitialized value to the list.
8546
8547 2000-05-25  Tom Tromey  <tromey@cygnus.com>
8548
8549         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
8550         when trying to see if field's class should be initialized.  Always
8551         initialize field's declaring class, not qualified class.
8552         For PR gcj/162.
8553
8554         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
8555         `wfl_operator', to maybe_build_primttype_type_ref.
8556         Fixes PR gcj/235.
8557
8558 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
8559
8560        * parse.y (patch_method_invocation): Don't try to lookup methods
8561        in primitive types.
8562
8563 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8564
8565         * parse.y (resolve_field_access): Call the appropriate <clinit>
8566         before accessing the length of a static array. Craft a decl for
8567         the field while its time. Fixes PR gcj/129.
8568
8569 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8570
8571         * parse.y (resolve_package): Correctly set `*next' (was off by
8572         one.)
8573         (resolve_qualified_expression_name): Fixed comment.
8574
8575 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8576
8577         * jcf-parse.c (jcf_parse_source): Reset current_class and
8578         current_function_decl to NULL before parsing a new file.
8579
8580 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8581
8582         * parse.y (block_end:): If the collected block doesn't feature a
8583         statement, insert an empty statement.
8584
8585 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8586
8587         * parse.y (maybe_yank_clinit): New function.
8588         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
8589         end of the list of methods belonging to a class.
8590         (java_complete_expand_method): Check whether <clinit> is really
8591         necessary and expand it accordingly.
8592
8593 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8594
8595         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
8596         processed by the method's switch statement.
8597
8598 2000-05-19  Tom Tromey  <tromey@cygnus.com>
8599
8600         * java-tree.h: Added init state enum.
8601         * decl.c (emit_init_test_initialization): Initialize class
8602         initialization check variable by looking at class' state.
8603
8604 2000-05-19  Tom Tromey  <tromey@cygnus.com>
8605
8606         * java-tree.h (build_instanceof): Declare.
8607         (build_get_class): Declare.
8608         * parse.y (patch_binop): Use build_instanceof.
8609         * expr.c (build_instanceof): New function.  If class is final,
8610         don't make a function call.
8611         (expand_java_INSTANCEOF): Use it.
8612         (build_get_class): New function.
8613
8614 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
8615
8616         * jcf-write.c (generate_classfile): Scan the source_file for
8617         slashes with the right pointer variable.
8618
8619 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
8620
8621         * lang.c (lang_decode_option): Update -Wunused flags by calling
8622         set_Wunused.
8623         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
8624
8625 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
8626
8627         * check_init.c (check_init): Constify local char *.
8628         * class.c (push_class): Constify local char *.
8629         * java_tree.h: Update prototypes.
8630         * jcf-io.c (open_class): Constify filename parameter and
8631         return value.
8632         (find_class): Remove redundant string copy.  Cast return from
8633         open_class.
8634         * jcf-parse.c (read_class, parse_class_file, yyparse):
8635         Constify local char *.
8636         * jcf-write.c (generate_bytecode_insns, generate_classfile):
8637         Constify local char *.
8638         * jcf.h (JCF): Constify filename and classname.
8639         (JCF_FINISH): Cast args to FREE to char * when appropriate.
8640         * lang.c (init_parse): Constify parameter and return value.
8641         * lex.c (java_get_line_col): Constify filename parameter.
8642         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
8643         * parse.y (java_parser_context_suspend,
8644         issue_warning_error_from_context, safe_layout_class): Constify
8645         local char *.
8646         * parse.c: Regenerate.
8647
8648 2000-05-08  Tom Tromey  <tromey@cygnus.com>
8649
8650         * expr.c (build_jni_stub): Cache the result of
8651         _Jv_LookupJNIMethod.
8652
8653 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8654
8655         * decl.c (predef_filenames_size): Now 7.
8656         (predef_filenames): New seventh entry.
8657
8658 2000-05-04  Tom Tromey  <tromey@cygnus.com>
8659
8660         * boehm.c (mark_reference_fields): Don't mark RawData fields.
8661         Keep track of when we've seen a reference field after a
8662         non-reference field.
8663         (get_boehm_type_descriptor): Handle case where we see
8664         non-reference fields but no trailing reference field.
8665         * decl.c (rawdata_ptr_type_node): Define.
8666         (init_decl_processing): Initialize rawdata_ptr_type_node.
8667         * java-tree.h (rawdata_ptr_type_node): Declare.
8668
8669 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8670
8671         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
8672         specifiers in calls to fprintf.
8673
8674 2000-05-03  Andrew Haley  <aph@cygnus.com>
8675
8676         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
8677
8678         * javaop.h (WORD_TO_INT): New function.
8679         (IMMEDIATE_s4): Use WORD_TO_INT.
8680         * jcf.h (JPOOL_INT): Ditto.
8681
8682         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
8683         separator.
8684
8685 2000-04-19  Tom Tromey  <tromey@cygnus.com>
8686
8687         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
8688         on native function.
8689         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
8690         JNI methods.
8691         * expr.c (build_jni_stub): New function.
8692         * lang-specs.h: -fjni and -femit-class-file are incompatible.
8693         * parse.c: Rebuilt.
8694         * parse.y (java_complete_expand_methods): Expand a native method
8695         and call build_jni_stub if -fjni given.
8696         * lang-options.h: Document -fjni.
8697         * lang.c (flag_jni): New global.
8698         (lang_f_options): Added `jni' entry.
8699         * java-tree.h (soft_lookupjnimethod_node,
8700         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
8701         Declare.
8702         (flag_jni): Declare.
8703         (build_jni_stub): Declare.
8704         (struct lang_decl): Added `native' flag.
8705         (METHOD_NATIVE): Redefined to use `native' field of lang specific
8706         structure.
8707         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
8708         soft_jnipopsystemframe_node): New globals.
8709         (init_decl_processing): Set them.  _Jv_InitClass only takes one
8710         argument.
8711
8712         * java-tree.def: Put into `C' mode.
8713
8714 2000-04-27  Tom Tromey  <tromey@cygnus.com>
8715
8716         Fix for PR gcj/2:
8717         * expr.c (expand_invoke): Generate check to see if object pointer
8718         is null in nonvirtual invocation case.
8719         * java-tree.h (soft_nullpointer_node): Declare.
8720         * decl.c (soft_nullpointer_node): New global.
8721         (init_decl_processing): Initialize soft_nullpointer_node.
8722         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8723         or `private' methods.
8724         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8725
8726 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8727
8728         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8729         from <clinit>
8730
8731 2000-04-26  Tom Tromey  <tromey@cygnus.com>
8732
8733         * zextract.c (find_zip_file_start): New function.
8734         (read_zip_archive): Use it.
8735
8736 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8737
8738         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
8739
8740 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8741
8742         * class.c (common_enclosing_context_p): New function.
8743         * java-tree.h (common_enclosing_context_p): Added prototype.
8744         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
8745         classes sharing an outer context with the current instance.
8746         * parse.y (build_access_to_thisn): Fixed leading comment.
8747         (verify_constructor_super): New local `supper_inner'. Skip
8748         enclosing context argument in the case of inner class constructors.
8749         (patch_method_invocation): Insert proper context as second
8750         parameter to pure inner class constructor super invocations.
8751
8752 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8753
8754         * parse.y (end_class_declaration): Reset the interface number
8755         counter.
8756
8757 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8758
8759         * parse.y (source_start_java_method): Deleted unnecessary code.
8760         (patch_method_invocation): Fixed comment.
8761
8762 2000-04-24  Robert Lipe <robertlipe@usa.net>
8763
8764         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
8765
8766 2000-04-23  Tom Tromey  <tromey@cygnus.com>
8767
8768         * boehm.c (mark_reference_fields): Use int_byte_position.
8769
8770 2000-04-22  Tom Tromey  <tromey@cygnus.com>
8771
8772         * boehm.c (mark_reference_fields): Only call byte_position on
8773         non-static fields.
8774
8775 2000-04-22  Tom Tromey  <tromey@cygnus.com>
8776
8777         * boehm.c (mark_reference_fields): Added `last_view_index'
8778         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
8779
8780 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
8781
8782         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
8783         * parse.y (check_class_interface_creation): Fixed comments. Select
8784         permitted modifiers for (inner) interfaces. Changed error message
8785         to report rejected modifiers used with local classes.
8786
8787 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8788
8789         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
8790         of directly inherited type considered in scope.
8791         * parse.y (do_resolve_class): Search inherited classes for inner
8792         classes.
8793
8794 2000-04-20  Tom Tromey  <tromey@cygnus.com>
8795
8796         * parse.y (not_accessible_p): Use member's class, not current
8797         class, when doing inheritance check for protected reference.
8798         Fixes PR gcj/124.
8799
8800 2000-04-20  Jason Schroeder  <shrode@subnature.com>
8801
8802         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
8803
8804 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8805
8806         * parse.y (lookup_field_wrapper): Search for final local aliases.
8807         (resolve_expression_name): Let lookup_field_wrapper search for
8808         final local aliases. Force the value of `name' if one is found.
8809         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
8810         an expression name. Fixed comments.
8811
8812 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8813
8814         * parse.y (yyerror): `msg' can be null, don't use it in that case.
8815
8816 2000-04-19  Tom Tromey  <tromey@cygnus.com>
8817
8818         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
8819
8820 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8821
8822         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
8823
8824 2000-04-18  Tom Tromey  <tromey@cygnus.com>
8825
8826         PR gcj/211:
8827         * gjavah.c (utf8_cmp): Changed return value.
8828         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
8829         result.
8830         (cxx_keywords): New global.
8831         (get_field_name): Handle new result of cxx_keyword_subst.
8832         (print_method_info): Likewise.
8833
8834 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
8835
8836         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
8837         with a newline, for CNI.
8838         (print_stub_or_jni): Print a space or newline before method name for
8839         CNI as well as JNI.
8840         (print_cxx_classname): Don't write leading "::" in CNI stub method.
8841         (process_file): Include gcj/cni.h if generating CNI stubs.
8842
8843 2000-04-16  Tom Tromey  <tromey@cygnus.com>
8844
8845         * gjavah.c (decompile_method): Use print_field_name.
8846         Fixes PR gcj/205.
8847
8848 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8849
8850         * parse.y (java_expand_classes): Reverse the package list once.
8851         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
8852         reduction.
8853         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
8854         the `==' and `!=' operators.
8855
8856 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8857
8858         * jcf-write.c (generate_bytecode_insns): At invocation time,
8859         always relate an interface method to the type of its selector.
8860
8861 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8862
8863         Fix for PR gcj/2:
8864         * expr.c (expand_invoke): Generate check to see if object pointer
8865         is null in nonvirtual invocation case.
8866         * java-tree.h (soft_nullpointer_node): Declare.
8867         * decl.c (soft_nullpointer_node): New global.
8868         (init_decl_processing): Initialize soft_nullpointer_node.
8869         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8870         or `private' methods.
8871         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8872
8873 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8874
8875         Fix for PR gcj/140:
8876         * parse.y (check_final_assignment): Recognize assignments to the
8877         `length' field of an array when generating class files.
8878
8879 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8880
8881         * class.c (decl_hash): Prototype removed.
8882         (decl_compare): Likewise.
8883
8884 2000-04-05  Tom Tromey  <tromey@cygnus.com>
8885
8886         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
8887         * parse.y (check_modifiers_consistency): Check for final/volatile
8888         clash.  Fixes PR gcj/164.
8889
8890 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8891
8892         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8893         made global.
8894         (java_hash_compare_tree_node): Renamed from `decl_compare, made
8895         global.
8896         (add_method_1): Use `java_hash_hash_tree_node' and
8897         `java_hash_compare_tree_node'.
8898         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8899         (java_hash_compare_tree_node): Likewise.
8900         * parse.y (find_applicable_accessible_methods_list): Create,
8901         delete and use a hash table to remember already searched interfaces.
8902
8903 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
8904
8905         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8906         with latest entry.
8907
8908 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8909
8910         * boehm.c (mark_reference_fields, set_bit): Prototype.
8911         (set_bit): Un-ANSI-fy definition.
8912
8913         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8914         Prototype.
8915
8916         * decl.c (emit_init_test_initialization): Likewise.
8917
8918         * gjavah.c (jni_print_char): Likewise.
8919
8920         * parse.y (create_new_parser_context): Likewise.
8921
8922 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8923
8924         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8925         patch missing hunk. Fixed indentation.
8926
8927 2000-03-30  Tom Tromey  <tromey@cygnus.com>
8928
8929         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8930         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8931
8932 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8933
8934         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8935         when negative *before* using it as an array index.
8936         * ChangeLog: Fixed typo.
8937
8938 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8939
8940         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8941         to 0 when it reaches -1.
8942
8943 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8944
8945         * jcf-parse.c (get_constant): Properly cast `num' during the
8946         invocation of `add_double'.
8947         * jcf-write.c (push_long_const): Properly cast `lo' before
8948         comparing it to short bounds.
8949         * parse-scan.y (interface_declaration:): Rule re-arrange so that
8950         `interface_body:' is reduced after the current interface is
8951         pushed.
8952
8953 2000-03-26  Tom Tromey  <tromey@cygnus.com>
8954
8955         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8956         Java-specific `-f' option.
8957
8958 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8959
8960         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8961         Adjust order of making types.
8962         Make bitsize_*_node values.
8963
8964 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8965
8966         * class.c (make_field_value): Use byte_position.
8967         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8968         (java_array_data_offset): Likewise.
8969         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8970         bzero call.
8971
8972 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8973
8974         * parse.y (check_abstract_method_definitions): New local
8975         `end_type_reached'. Make sure we also consider `end_type'.
8976         (java_check_abstract_method_definitions): Make sure we eventually
8977         consider `java.lang.Object'.
8978         (maybe_use_access_method): Don't use access method if not in the
8979         context of a pure inner class or if the method's context is right.
8980         (find_applicable_accessible_methods_list): New static flag
8981         `object_done'. Don't search abstract classes as interfaces. Fixed
8982         indentation. Fixed the `java.lang.Object' only search. Search
8983         class interface(s) first, then fully search enclosing contexts.
8984         (find_most_specific_methods_list): Pick the closest candidate when
8985         they're all abstract.
8986
8987 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8988
8989         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8990         properly initialize `finished_label'. Don't emit gotos for empty
8991         try statements.
8992
8993 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8994
8995         * except.c (emit_handlers): Clear catch_clauses_last.
8996
8997 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8998
8999         * parse.y (check_method_types_complete): New function.
9000         (create_class): Reset anonymous class counter only when seeing an
9001         non inner classe.
9002         (java_complete_class): JDEP_METHOD: Don't recompute signature
9003         if incomplete.
9004
9005 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9006
9007         * class.c (build_static_ref): Fixed indentation in comment.
9008         * java-tree.def (TRY_EXPR): Fixed typo in name.
9009         (CLASS_LITERAL): Likewise.
9010         * java-tree.h: (TYPE_DOT_CLASS): New macro.
9011         (struct lang_type): New field `dot_class'.
9012         * jcf-write.c (generate_bytecode_insns): Fixed error message.
9013         (generate_classfile): Method `class$' is synthetic.
9014         * parse.y (build_do_class_method): New function.
9015         (build_dot_class_method_invocation): Likewise.
9016         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
9017         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
9018         (qualify_ambiguous_name): Likewise.
9019         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
9020         (build_try_statement): Fixed leading comment.
9021
9022 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9023
9024         * class.c (make_field_value): Properly handle sizes.
9025         (get_dispatch_vector): Use tree_low_cst and host_integerp.
9026         (layout_class_method): Count using trees.
9027         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
9028         * expr.c (java_array_data_offset): Use int_bit_position.
9029         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
9030         (build_invokevirtual): Use tree_low_cst and do computations with trees.
9031
9032 2000-03-16  Tom Tromey  <tromey@cygnus.com>
9033
9034         * lang.c (flag_hash_synchronization): New global.
9035         (lang_f_options): Added `hash-synchronization'.
9036         * lang-options.h: Mention -fhash-synchronization.
9037         * java-tree.h (flag_hash_synchronization): Declare.
9038         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
9039         hash table synchronization is disabled.
9040         * decl.c (init_decl_processing): Only push `sync_info' value when
9041         hash table synchronization is disabled.
9042         * class.c (make_class_data): Only push `sync_info' field when hash
9043         table synchronization is disabled.  Removed dead code.
9044
9045 2000-03-16  Tom Tromey  <tromey@cygnus.com>
9046
9047         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
9048
9049 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9050
9051         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
9052         classes.
9053         * parse.y (patch_method_invocation): Handle anonymous classes
9054         creation in static context.
9055
9056 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9057
9058         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
9059         * parse.y (resolve_qualified_expression_name): Use it.
9060         (patch_method_invocation): Likewise.
9061
9062 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9063
9064         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
9065         depending on the type of dependency which dictates what the
9066         current class is.
9067         (unresolved_type_p): Resolved types limited to the current class.
9068
9069 2000-03-15  Tom Tromey  <tromey@cygnus.com>
9070
9071         * decl.c (init_decl_processing): Set type of `sync_info' to be
9072         pointer to Object.
9073
9074         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
9075         Correctly compute bit number for current slot.  Zero `high' and
9076         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
9077         mark_reference_fields.
9078         (mark_reference_fields): New function.
9079
9080 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9081
9082         * parse.y (register_incomplete_type): Fixed initialization of
9083         JDEP_ENCLOSING.
9084
9085 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9086
9087         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
9088         static globals.
9089         (push_class_context, pop_class_context): New function.
9090         (class_body:): Call pop_class_context.
9091         (interface_body:): Likewise.
9092         (INNER_QUALIFIER): New macro.
9093         (report_class_declaration): Changed output format and use
9094         INNER_QUALIFIER. Call push_class_context.
9095
9096 2000-02-14  Andrew Haley  <aph@cygnus.com>
9097
9098         * check-init.c (check_init): Add new cases for unary and binary
9099         tree nodes.
9100
9101 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9102
9103         * parse.y (resolve_package): Set `next' once a type name has been
9104         progressively discovered.
9105         (resolve_qualified_expression_name): Propagate resolution only if
9106         there are remaining qualifiers. Take into account `q' might have
9107         been cleared after re-qualification.
9108         * parse.y (patch_method_invocation): New local `resolved'.
9109         Section dealing with qualified expression rewritten to use
9110         resolve_field_access.
9111
9112 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9113
9114         * parse.h (PUSH_CPC): Fixed indentation.
9115         (DEBUG_CPC): New macro.
9116         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
9117         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
9118         * parse.y (class_body_declaration:): Use
9119         SET_CPC_INSTANCE_INITIALIZER_STMT.
9120         (method_declaration:): Check for null current_function_decl.
9121         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
9122         (java_parser_context_pop_initialized_field): Better handling of
9123         empty lists.
9124         (maybe_make_nested_class_name): Mark nested class name as
9125         qualified when necessary.
9126         (end_class_declaration): Don't call java_parse_context_resume when
9127         one or more error occurred.
9128         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
9129         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
9130         SET_CPC_INITIALIZER_STMT.
9131         (method_header): Check for inner classes declaring static methods.
9132         (resolve_qualified_expression_name): Handle situation where `this'
9133         is implied.
9134
9135 2000-03-13  Hans Boehm <boehm@acm.org>
9136
9137         * typeck.c (build_prim_array_type): Correctly set the high word too.
9138
9139 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9140
9141         * parse.y (java_complete_expand_methods): Leave <clinit> out of
9142         ordinary methods.
9143         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
9144         list of methods for interfaces.
9145
9146 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9147
9148         * parse.y (qualify_ambiguous_name): Properly handle expressions
9149         using `null'.
9150
9151 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9152
9153         * parse.y (check_final_assignment): Extended to process
9154         COMPOUND_EXPR.
9155         (patch_assignment): Have check_final_assignment called only once.
9156
9157 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9158
9159         * java-tree.h (IS_INIT_CHECKED): New flag.
9160         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
9161         * parse.y (patch_string): Call force_evaluation_order on the
9162         completed string concatenation tree.
9163         * expr.c (force_evaluation_order): Call force_evaluation_order on
9164         function's arguments too.
9165
9166 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9167
9168         * decl.c (emit_init_test_initialization): Mark KEY as unused.
9169         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
9170         (build_anewarray): Likewise.
9171         * parse.y (patch_newarray): Likewise.
9172         * parse.c: Regenerated.
9173
9174 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
9175
9176         * decl.c (init_decl_processing): Added new class fields `depth',
9177         `ancestors', and `idt' to class_type_node. Use
9178         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
9179         * class.c (make_class_data): Push initial values for new fields.
9180         * java-tree.h: Updated prototype for `build_invokeinterface'.
9181         * expr.c (build_invokeinterface): Changed parameters to accept
9182         `method' tree. Calculate index of `method' in its declaring
9183         interface. Build call to _Jv_LookupInterfaceMethodIdx.
9184         (expand_invoke): Call `build_invokeinterface' with new parameters.
9185         * parse.y (patch_invoke): Call `build_invokeinterface' with new
9186         parameters.
9187
9188 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
9189
9190         * typeck.c (lookup_do): Search superinterfaces first
9191         when looking up an interface method. From Godmar Back
9192         <gback@cs.utah.edu>
9193
9194 2000-03-06  Tom Tromey  <tromey@cygnus.com>
9195
9196         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
9197
9198 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9199
9200         * java-tree.h (lookup_argument_method2): Declared.
9201         (safe_layout_class): Prototype moved from parse.h.
9202         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
9203         * parse.y (java_check_regular_methods): Local `super_class' gone.
9204         Call lookup_argument_method2 instead of lookup_argument_method.
9205         Perform modifier match for methods found declared in implemented
9206         interfaces. Fixed indentation problem. Overriding/hiding error
9207         report to take place only for methods found in classes.
9208         * typeck.c (lookup_argument_method): Changed leading
9209         comment. Re-written by calling lookup_do.
9210         (lookup_argument_method2): New function.
9211         (lookup_java_method): Re-written by calling lookup_do.
9212         (lookup_do): New function.
9213
9214 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9215
9216         * check-init.c (check_init): Removed dead code. Handle (blank)
9217         final variables.
9218         * parse.y (declare_local_variables): New local `final_p', set it
9219         and use it to initialize LOCAL_FINAL.
9220         (check_final_assignment): Only check FIELD_DECLs.
9221
9222 2000-02-17  Tom Tromey  <tromey@cygnus.com>
9223
9224         * Makefile.in (JAVA_OBJS): Added boehm.o.
9225         (boehm.o): New target.
9226         * Make-lang.in (JAVA_SRCS): Added boehm.c.
9227         * java-tree.h (flag_use_boehm_gc): Declare.
9228         (get_boehm_type_descriptor): Declare.
9229         * lang.c (lang_f_options): Added `use-boehm-gc'.
9230         (flag_use_boehm_gc): New global.
9231         * lang-options.h: Added -fuse-boehm-gc.
9232         * boehm.c: New file.
9233         * class.c (get_dispatch_table): If class uses a Boehm type
9234         descriptor, put it in the vtable.
9235         (make_class_data): Removed dead code.
9236
9237 2000-03-03  Per Bothner  <per@bothner.com>
9238
9239         * decl.c (init_decl_processing):  Initialize sizetype properly.
9240
9241 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9242
9243         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
9244         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
9245         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
9246         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
9247         (jcf_parse): New local `current'. Load innerclasses seen in outer
9248         context being processed.
9249         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
9250         * jcf-write.c (append_innerclasses_attribute): New function.
9251         (append_innerclasses_attribute_entry): Likewise.
9252         (get_access_flags): Handle static classes. Set anonymous and local
9253         classes to be private.
9254         (generate_classfile): Attribute count adjusted. Call
9255         append_innerclasses_attribute.
9256         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
9257         PURE_INNER_CLASS_TYPE_P.
9258         * parse.y (parser_qualified_classname): New parameter `is_static',
9259         produce non qualified name accordingly.
9260         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
9261         (create_interface): Added argument to parser_qualified_classname.
9262         (create_class): Added argument to parser_qualified_classname. Setup
9263         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
9264         (add_inner_class_fields): Fixed indentation.
9265         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
9266         (method_declarator): Fixed typo in comment.
9267         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
9268         (build_current_thisn): Likewise.
9269         (patch_method_invocation): Likewise.
9270
9271 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9272
9273         * decl.c (current_function_decl): Move to toplev.c.
9274
9275 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9276
9277         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
9278         (DECL_BIT_INDEX): Use underlying representation.
9279         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
9280
9281 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9282
9283         * expr.c (build_java_ret): Pass proper type to size_binop.
9284
9285 2000-02-25  Anthony Green  <green@cygnus.com>
9286
9287         * expr.c (build_class_init): Mark the decl to be ignored by
9288         check_init.
9289         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
9290         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
9291         * class.c (init_test_hash_newfunc): New function.
9292         (decl_hash): New function.
9293         (decl_compare): New function.
9294         * decl.c (emit_init_test_initialization): New function.
9295         (complete_start_java_method): Traverse the init test hashtable,
9296         calling emit_init_test_initialization.
9297         (always_initialize_class_p): Define.
9298         * expr.c (build_class_init): Use initialization tests when
9299         emitting class initialization code.
9300         (always_initialize_class_p): Declare.
9301         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
9302         1.
9303         * java-tree.h: Include hash.h.
9304         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
9305         (struct lang_decl): Add init_test_table field.
9306         (init_test_hash_entry): Define.
9307
9308 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9309
9310         * gjavah.c (main): Avoid using `argi' to report unimplemented
9311         options.
9312
9313 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9314
9315         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
9316         initialize locals to avoid warnings. Local `exception_type' moved
9317         into if statement.
9318
9319 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9320
9321         * parse.y (resolve_expression_name): Use `orig' as a second
9322         argument to resolve_field_access.
9323         (resolve_field_access): Removed unnecessary code when dealing with
9324         static fields.
9325
9326 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9327
9328         * class.c (push_super_field): Don't push the field twice.
9329         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
9330         * parse.h (java_reorder_fields): Prototyped.
9331         * parse.y (java_reorder_fields): New function.
9332         (java_layout_class): Simplified not to worry about re-ordering.
9333
9334 2000-02-23  Tom Tromey  <tromey@cygnus.com>
9335
9336         * gjavah.c (print_name): In JNI case, correctly quote string.
9337         (print_method_info): Don't handle overrides in JNI mode.
9338
9339 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9340
9341         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
9342         value type set to `boolean_type_node'.
9343
9344 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9345
9346         * jcf-dump.c (main): Test for correct condition after
9347         output file creation.
9348
9349 2000-02-19  Anthony Green  <green@cygnus.com>
9350
9351         * jcf-depend.c (add_entry): Fix test for first list entry.
9352
9353 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9354
9355         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
9356         * constants.c (build_constants_constructor): Likewise.
9357
9358 2000-02-19  Anthony Green  <green@cygnus.com>
9359
9360         * jcf-depend.c (add_entry): Add entries to the end of the list.
9361
9362 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
9363
9364         * decl.c (INT_TYPE_SIZE): Define if necessary.
9365         (expand_java_return): Handle the case of a native integer smaller
9366         than a JVM integer.
9367
9368 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9369
9370         * gjavah.c (help): Use GCCBUGURL.
9371         * jv-scan.c (help): Likewise.
9372         * jcf-dump.c (help): Likewise.
9373
9374 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9375
9376         * jcf-write.c (generate_bytecode_insns): Don't generate empty
9377         `finally' clauses.
9378
9379 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9380
9381         * jcf-parse.c (load_class): Call `fatal' if no file containing
9382         the target class are found.
9383
9384 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
9385
9386         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
9387         lex.c, lex.h, and PARSE_H to...
9388         (parse.o, parse-scan.o): ...here, respectively.
9389
9390         * lex.c: Split out code that may trigger SIGFPE from yylex()
9391         to its own function.
9392         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
9393
9394 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9395
9396         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
9397
9398 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9399
9400         * parse.y (outer_field_access_p): Stop in time when outer contexts
9401         are exhausted.
9402         (resolve_qualified_expression_name): Properly qualify *everything*
9403         after a package.type to be resoled as expression names.
9404         (find_applicable_accessible_methods_list): Save/restore `class' to
9405         isolate it from a possible outer context search.
9406
9407 2000-02-15  Tom Tromey  <tromey@cygnus.com>
9408
9409         * gjavah.c (jni_print_char): New function.
9410         (print_full_cxx_name): Use it.
9411         (decode_signature_piece): Likewise.
9412         (print_cxx_classname): Likewise.
9413
9414 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9415
9416         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
9417         version.o.
9418         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
9419
9420         * gjavah.c: Include version.h.
9421
9422         * jcf-dump.c: Likewise.
9423
9424         * jv-scan.c: Likewise.
9425
9426 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9427
9428         * parse.y (outer_field_access_fix): First parameter now a tree
9429         node. Check for assignment to final. First argument to
9430         build_outer_field_access_fix modified to accommodate prototype.
9431         (build_outer_field_access): Don't check for assignment to final
9432         here.
9433         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
9434         possibly returned by outer_field_access_fix. Changed
9435         outer_field_access_fix's first argument.
9436         (check_final_assignment): $finit$'s context is OK.
9437         (patch_unaryop): Use node instead of its line/column value when
9438         calling outer_field_access_fix.
9439
9440 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9441
9442         * parse.y (interface_declaration:): No longer tagged
9443         <node>. Re-installed default action.
9444         (class_member_declaration:): Handle inner interfaces.
9445         (interface_member_declaration): Handle inner interfaces and
9446         classes.
9447         (create_interface): Push error if one seen. Suspend parsing
9448         context when processing an inner interface.
9449         (register_fields): Inner class static field limitations not to
9450         apply to inner interfaces.
9451
9452 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9453
9454         * jcf-parse.c (load_class): Update `java_error_count' when a
9455         class' file can't be found.
9456         (parse.y): Avoid (byte)code generation when errors seen.
9457
9458 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9459
9460         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
9461         decodes a valid node.
9462         (patch_binop): Handle TRUNC_DIV_EXPR.
9463
9464 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9465
9466         * parse.y (resolve_package): New local `acc'. Try to progressively
9467         build and guess a package and type name.
9468
9469 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9470
9471         * parse.y (find_applicable_accessible_methods_list): Load and
9472         layout the search class if necessary.
9473         (java_complete_tree): Keep to original type of the folded initial
9474         value.
9475
9476 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9477
9478         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
9479         Generate error message if circularity is detected. New static
9480         local `list'.
9481         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
9482         * jcf-write.c (generate_bytecode_insns): Very simply handle
9483         SAVE_EXPR.
9484         * parse.y (java_check_circular_reference): Use
9485         `cyclic_inheritance_report' during report, if necessary.
9486         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
9487         walking NEW_ARRAY_INIT twice.
9488
9489 2000-02-09  Tom Tromey  <tromey@cygnus.com>
9490
9491         * parse.y (check_class_interface_creation): Allow inner classes to
9492         be `private' or `protected', check modifiers' consistency. Prevent
9493         block local classes from bearing any modifiers.
9494
9495 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9496
9497         * except.c (check_start_handlers): Re-add prototype lost in last
9498         patch.
9499         (maybe_start_try): Remove excess argument to `check_start_handlers'.
9500
9501 2000-02-09  Andrew Haley  <aph@cygnus.com>
9502
9503         * decl.c (clear_binding_level): Remove excess initializer.
9504         (maybe_poplevels): Remove unused variable.
9505         (force_poplevels): Ditto.
9506         (struct binding_level): Add comment.
9507
9508 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9509
9510         * jcf-write.c (generate_classfile): Don't consider
9511         pre-initialization with reference value (use <clinit> instead.)
9512         * parse.y (java_fix_constructors): No generated constructor for
9513         interfaces.
9514         (build_outer_field_access): Removed debug message.
9515         (outer_field_expanded_access_p): Adapted to bytecode generation.
9516         (build_outer_field_access_method): Use fix_method_argument_names.
9517         (build_outer_method_access_method): Fixed indentation. Added
9518         comment. Handle access method generation for static and also void
9519         methods.
9520         (build_access_to_thisn): Inserted debug message.
9521         (maybe_build_thisn_access_method): Use fix_method_argument_names.
9522         (resolve_qualified_expression_name): Fixed comment.
9523         (not_accessible_p): Adapted to bytecode generation. Added comment.
9524         (patch_method_invocation): Added comment.
9525         (maybe_use_access_method): Fixed leading comment. Handle static
9526         methods.
9527         (java_complete_lhs): Don't shortcut handling of initialized upon
9528         declaration String type static fields when generating bytecode.
9529         (patch_unaryop): Handle outer field access when generating
9530         bytecode.
9531
9532 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9533
9534         * java-tree.h (FIELD_THISN): New macro.
9535         * jcf-write.c (append_synthetic_attribute): New function.
9536         (generate_classfile): Set "Synthetic" attribute on this$<n>,
9537         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
9538         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
9539         this$<n> fields.
9540         (build_outer_field_access): Turned on access functions usage and
9541         generation when compiling to bytecode.
9542         (maybe_use_access_method): Likewise.
9543
9544 2000-01-25  Andrew Haley  <aph@cygnus.com>
9545
9546         * java-except.h (struct eh_range): Add `expanded' field.
9547         (maybe_start_try): Add end_pc arg.
9548         (maybe_end_try): Ditto.
9549         * java-tree.h (force_poplevels): new function.
9550         * expr.c (expand_byte_code): Don't call maybe_start_try or
9551         maybe_end_try.
9552         * except.c (add_handler): Reset expanded.
9553         (expand_start_java_handler): Set expanded.
9554         (check_start_handlers): Don't expand a start handler that's
9555         already been expanded.
9556         (maybe_start_try): Add end_pc arg.  Only expand a handler which
9557         ends after end_pc.
9558         (expand_end_java_handler): call force_poplevels.
9559         (force_poplevels): new function.
9560         * decl.c (binding_level): Add start_pc of binding level.
9561         (maybe_pushlevels): Call maybe_start_try when pushing binding
9562         levels.
9563         (maybe_poplevels): Call maybe_end_try when popping binding levels.
9564         (LARGEST_PC): Define.
9565         (clear_binding_level): Use LARGEST_PC.
9566
9567         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
9568         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
9569         (binding_depth, is_class_level, current_pc): new variables.
9570         (struct binding_level): ditto.
9571         (indent): new function.
9572         (push_jvm_slot): add debugging info.
9573         (maybe_pushlevels): ditto.
9574         (maybe_poplevels): ditto.
9575         (pushlevel): ditto.
9576         (poplevel): ditto.
9577         (start_java_method): ditto.
9578         (give_name_to_locals): comment only.
9579         * except.c (binding_depth, is_class_level, current_pc):
9580         new variables.
9581         (expand_start_java_handler): add debugging info.
9582         (expand_end_java_handler): ditto.
9583
9584 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9585
9586         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
9587         (print_name_for_stub_or_jni, process_file): Constify a char*.
9588
9589 2000-02-03  Tom Tromey  <tromey@cygnus.com>
9590
9591         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
9592
9593 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
9594
9595         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
9596         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
9597         defined to be 1.
9598
9599 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9600
9601         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
9602         * java-tree.h (TYPE_II_STMT_LIST): New macro.
9603         (struct lang_type): New field `ii_block'.
9604         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
9605         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
9606         * parse.h (struct parser_ctxt): New field `instance_initializers'.
9607         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
9608         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
9609         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
9610         macros.
9611         * parse.y (add_instance_initializer): New function.
9612         (in_instance_initializer): New static global.
9613         (class_body_declaration:): Link instance initializer block.
9614         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
9615         (array_creation_expression:): Remove unused local.
9616         (java_parser_context_push_initialized_field): Fixed leading
9617         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
9618         CPC_INSTANCE_INITIALIZER_LIST.
9619         (java_parser_context_pop_initialized_field): Likewise.
9620         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
9621         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
9622         CPC_INITIALIZER_STMT.
9623         (fix_constructors): New local `class_type'. Use it. Call
9624         add_instance_initializer.
9625         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
9626         (patch_return): Forbid return in instance initializers.
9627         (patch_throw_statement): Enforce exception handling in the context
9628         of instance initializers.
9629
9630 2000-02-03  Tom Tromey  <tromey@cygnus.com>
9631
9632         * Make-lang.in (java.mostlyclean): Remove executables in
9633         `mostlyclean'.
9634
9635 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
9636
9637         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
9638         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
9639         (java_float_finite): Convert to use union Word from javaop.h.
9640         (java_double_finite): Convert to use union DWord from javaop.h.
9641
9642 2000-02-02  Tom Tromey  <tromey@cygnus.com>
9643
9644         * gjavah.c (options): Added `jni' entry.
9645         (help): Document -jni.
9646         (flag_jni): New global.
9647         (process_file): Handle JNI output.  Don't print text from
9648         -prepend, -add, etc, when generating stubs.  Only remove `.class'
9649         suffix if it actually exists.
9650         (main): Create a `.c' file when run with `--jni --stubs'.  Create
9651         correct output file name with `--jni'.
9652         (print_include): Mangle header name differently in JNI case.
9653         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
9654         method list.
9655         (print_method_info): Handle JNI case.  Put signature info into
9656         method name.  Handle case when STREAM is NULL.
9657         (print_name_for_stub_or_jni): New function.
9658         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
9659         (print_cxx_classname): Handle JNI.
9660         (print_full_cxx_name): Likewise.
9661         (decode_signature_piece): Likewise.
9662         (overloaded_jni_method_exists_p): New function.
9663         (struct method_name): Added `signature' and `sig_length' fields.
9664         (HANDLE_END_FIELD): Do nothing in JNI mode.
9665
9666 2000-02-02  Tom Tromey  <tromey@cygnus.com>
9667
9668         * jv-scan.c: Include version.c, <getopt.h>.
9669         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
9670         (options): New array.
9671         (usage): New function.
9672         (version): New function.
9673         (main): Use getopt_long to parse command line.
9674         * jcf-dump.c: Include version.c, <getopt.h>.
9675         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
9676         OPT_JAVAP): New macros.
9677         (options): New array.
9678         (usage): Return `void'.  Changed message.
9679         (help): New function.
9680         (version): New function.
9681         (main): Use getopt_long_only to parse command line.
9682         * gjavah.c: Include <getopt.h>.
9683         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
9684         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
9685         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
9686         (options): New array.
9687         (java_no_argument): Removed.
9688         (help): Updated with missing options.
9689         (main): Use getopt_long_only to parse command line.
9690         (usage): Changed message.
9691
9692 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9693
9694         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
9695         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
9696         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
9697         * parse.y (array_creation_expression:): Handle anonymous arrays.
9698         (build_array_from_name): Don't set `ret_name' if null.
9699         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
9700         (qualify_ambiguous_name): Likewise.
9701         (java_complete_expand_class): Likewise.
9702
9703 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9704
9705         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
9706         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
9707         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
9708         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
9709         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
9710         AIPL_FUNCTION_COMPLETED_INVOCATION.
9711         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
9712         AIPL_FUNCTION_INVOCATION_READY.
9713         (AIPL_FUNCTION_DECLARATION): New enum entry.
9714         * parse.y (reorder_static_initialized): New function.
9715         (java_parser_context_pop_initialized_field): Use it.
9716         (add_inner_class_fields): Use
9717         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
9718         augmented. Install marker after last alias initializer, if any.
9719         (generate_finit): Fixed typo. Don't try to retain only the used
9720         fields.
9721         (method_header): Compute and set DECL_FUNCTION_NAP.
9722         (method_declarator): Fixed comment. Insert alias initializer in
9723         parameter list.
9724         (build_alias_initializer_parameter_list): Fixed leading
9725         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
9726         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
9727         (java_complete_expand_class): Code to retain only used aliases
9728         removed.
9729         (java_complete_expand_methods): New local `first_decl'. Generate
9730         $finit$ first, then expand the constructors, regular methods and
9731         <clinit>.
9732         (java_complete_expand_method): Don't report error on missing
9733         return statement if previously detected bogus.
9734         (fix_constructors): Don't patch constructor parameters list.
9735         (patch_method_invocation): Use new AIPL enum values. Reverse
9736         alias initializer list for anonymous classes.
9737
9738 2000-01-30  Anthony Green  <green@redhat.com>
9739
9740         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
9741         determine how many stack slots to pop.
9742
9743 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9744
9745         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
9746         error handling/recovery.
9747         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
9748
9749 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9750
9751         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
9752         FIELD_LOCAL_ALIAS_USED): New macros.
9753         (DECL_FUNCTION_NAP): New macro.
9754         (struct lang_decl): New field `nap'.
9755         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
9756         (struct lang_type): New fields `finit_stmt_list' and
9757         `clinit_stmt_list'.
9758         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
9759         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
9760         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
9761         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
9762         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
9763         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
9764         (BUILD_THROW): Macro line separator re-indented.
9765         * parse.y (end_class_declaration): New function.
9766         (maybe_generate_pre_expand_clinit): New name for
9767         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
9768         pre-expand static fields.
9769         (maybe_generate_clinit): Function deleted.
9770         (check_for_static_method_reference): Prototype's parameter list
9771         indented.
9772         (generate_finit): New name for maybe_generate_finit. Changed
9773         leading comment. Function rewritten to use
9774         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
9775         (build_alias_initializer_parameter_list): New function.
9776         (java_parser_context_pop_initialized_field): Likewise.
9777         (add_inner_class_fields): Likewise.
9778         (type_declaration:): Call end_class_declaration.
9779         (class_member_declaration:): Likewise.
9780         (formal_parameter_list:): Fixed typos.
9781         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
9782         element. Improved error handling.
9783         (block_statement:): Call end_class_declaration.
9784         (anonymous_class_creation:): Likewise.
9785         (create_anonymous_class): Fixed comments.
9786         (create_class): Call add_inner_class_fields.
9787         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
9788         (method_header): Use MARK_FINAL_PARMS.
9789         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
9790         (method_declarator): Propagate final argument flag.
9791         (craft_constructor): New local `artificial'. Call
9792         build_alias_initializer_parameter_list. Use
9793         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
9794         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
9795         necessary.
9796         (complete_expand_class): Get rid of unused outer context local
9797         alias fields.
9798         (java_complete_expand_methods): Fixed leading
9799         comment. Generate/pre-expand <clinit> first. Changed method
9800         expansion order to regular, $finit$, constructors, <clinit>.
9801         (java_complete_expand_method): Set current_function_decl.
9802         (fix_constructors): Fix constructor parameter list to account for
9803         outer context local alias initializers.
9804         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9805         (resolve_expression_name): Lookup outer context local aliases. New
9806         local `access', use it.
9807         (patch_method_invocation): Patch inner class ctor invocation with
9808         outer context local aliases initialization values. $finit$
9809         invocation patching now includes things generated with
9810         build_alias_initializer_parameter_list.
9811         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9812         (build_super_invocation): Likewise.
9813         (patch_assignment): Changed comment.
9814
9815 2000-01-27  Andrew Haley  <aph@cygnus.com>
9816
9817         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
9818         (emit_if): Ditto.
9819         (emit_jsr): Ditto.
9820
9821 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9822
9823         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
9824         concatenation.
9825         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
9826
9827         * parse.y (register_fields): Don't pass a format specifier to
9828         OBSOLETE_MODIFIER_WARNING.
9829         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
9830         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
9831         specifier.
9832         (check_modifiers): Change function into a macro.
9833         (check_class_interface_creation): Pass a literal format string.
9834
9835 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9836
9837         * buffer.h: PROTO -> PARAMS.
9838         * check-init.c: Likewise.
9839         * class.c: Likewise.
9840         * constants.c: Likewise.
9841         * convert.h: Likewise.
9842         * decl.c: Likewise.
9843         * except.c: Likewise.
9844         * expr.c: Likewise.
9845         * gjavah.c: Likewise.
9846         * java-except.h: Likewise.
9847         * java-tree.h: Likewise.
9848         * jcf-depend.c: Likewise.
9849         * jcf-dump.c: Likewise.
9850         * jcf-parse.c: Likewise.
9851         * jcf-path.c: Likewise.
9852         * jcf-reader.c: Likewise.
9853         * jcf-write.c: Likewise.
9854         * jcf.h: Likewise.
9855         * jv-scan.c: Likewise.
9856         * jvgenmain.c: Likewise.
9857         * jvspec.c: Likewise.
9858         * lang.c: Likewise.
9859         * lex.c: Likewise.
9860         * lex.h: Likewise.
9861         * parse-scan.y: Likewise.
9862         * parse.h: Likewise.
9863         * parse.y: Likewise.
9864         * typeck.c: Likewise.
9865         * verify.c: Likewise.
9866         * xref.c: Likewise.
9867         * xref.h: Likewise.
9868         * zextract.c: Likewise.
9869         * zipfile.h: Likewise.
9870
9871 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9872
9873         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9874         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
9875         * constants.c (build_constant_data_ref): Check for cached
9876         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
9877         in TYPE_CPOOL_DATE_REF.
9878         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
9879         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
9880         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
9881         (LOCAL_FINAL): New macro.
9882         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
9883         constant pool -- don't try to reuse.
9884         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
9885         TYPE_LANG_SPECIFIC.
9886         (find_in_current_zip): Use TYPE_JCF.
9887         * parse.h (java_check_final): Prototype removed.
9888         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
9889         (maybe_create_class_interface_decl,
9890         check_class_interface_creation): Likewise.
9891         (java_expand_finals): Function removed.
9892         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9893         (block_statement:): Fixed comment.
9894         (anonymous_class_creation:): Likewise.
9895         (check_class_interface_creation): Reversed Jan 12, 2000 extra
9896         argument patch.
9897         (check_class_interface_creation): Loosened error report on (inner)
9898         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9899         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9900         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9901         argument patch.
9902         (create_interface): Likewise.
9903         (anonymous_class_counter): New static global.
9904         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9905         patch. Fixed comments.
9906         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9907         anonymous_class_counter when declaring a toplevel class.
9908         (craft_constructor): Fixed constructor name when handling
9909         anonymous classes. Anonymous class constructors to feature hidden
9910         this$<n> parameter.
9911         (java_fix_constructors): Added comment.
9912         (java_check_final): Function removed.
9913         (java_complete_expand_methods): Fixed comment. Don't generate
9914         class data, save its outgoing constant pool instead.
9915         (verify_constructor_super): Skip anonymous class constructor
9916         hidden this$<n> parameter.
9917         (java_expand_classes): New local `saved_ctxp'. Removed call to
9918         java_expand_finals and java_check_final. Expand anonymous class
9919         constructors. Generate class data.
9920         (build_super_invocation): Skip anonymous class hidden this$<n>
9921         parameter.
9922         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9923         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9924         (set_java_signature): Likewise.
9925
9926 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9927
9928         * gjavah.c: Delete ACC_VISIBILITY define.
9929         * jcf.h: Add ACC_VISIBILITY define.
9930         * parse.y: final: rule tagged <value>.
9931         (java_check_regular_methods): Use ACC_VISIBILITY define for
9932         default package access check.
9933         (local_variable_declaration_statement): Use final: rule.
9934
9935 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
9936
9937         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9938         (final:): New rule.
9939
9940 2000-01-17  Tom Tromey  <tromey@cygnus.com>
9941
9942         * gjavah.c (print_field_info): Allow non-static final fields.
9943
9944 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9945
9946         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9947         * parse.y (patch_anonymous_class): New function.
9948         (create_anonymous_class): Register incomplete type when the
9949         class/interface to extends/implement isn't known yet.
9950         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9951         (verify_constructor_super): Tuned error message.
9952
9953 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9954
9955         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9956         (ANONYMOUS_CLASS_P): New macro.
9957         (TYPE_SIGNATURE, TYPE_JCF): New macros.
9958         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9959         * parse.y (create_class): Added leading argument.
9960         (maybe_create_class_interface_decl,
9961         check_class_interface_creation): Likewise.
9962         (craft_constructor): New function.
9963         (verify_constructor_super): Added argument in prototype.
9964         (class_declaration:): Inserted leading argument.
9965         (for_begin:): Use FOR_LOOP_P.
9966         (anonymous_class_creation): Create WFL of the anonymous class to
9967         instantiate. Call build_new_invocation. Added comments.
9968         (check_class_interface_creation): Handle parameter `anonymous' in
9969         verbose mode class creation announce.
9970         (link_nested_class_to_enclosing): Exclude anonymous classes.
9971         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9972         anonymous class, even though they appear to have an enclosing
9973         context.
9974         (create_interface): Pass extra argument to
9975         check_class_interface_creation.
9976         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9977         (create_class): Call check_class_interface_creation and
9978         maybe_create_class_interface_decl with extra new argument. Don't
9979         add private this$<n> to anonymous classes.
9980         (method_declarator): Insert hidden this$<n> to anonymous class
9981         constructors.
9982         (java_fix_constructors): Deleted code creating default
9983         constructor. Call craft_constructor instead.
9984         (java_check_regular_methods): Set `saw_constructor' to 1 for
9985         anonymous classes.
9986         (fix_constructors): Pass extra argument to verify_constructor_super.
9987         (verify_constructor_super): New local `sdecl', use it. Search for
9988         matching constructor (possibly featuring arguments) in super
9989         class.
9990         (lookup_method_invoke): Craft constructor according to arguments
9991         list when dealing with anonymous class constructors.
9992         (build_super_invocation): Pass arguments to anonymous class super
9993         constructors.
9994         (search_loop): Use FOR_LOOP_P.
9995         (labeled_block_contains_loop_p): Likewise.
9996
9997 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9998
9999         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
10000         (enclosing_context_p): New function.
10001         (get_access_flags_from_decl): Handle CLASS_STATIC.
10002         (maybe_layout_super_class): Extra first argument passed to
10003         do_resolve_class.
10004         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
10005         ID_INIT_P.
10006         * decl.c (access0_identifier_node): New global.
10007         (init_decl_processing): access0_identifier_node initialized.
10008         (pushdecl): Set DECL_CONTEXT only on non type decls.
10009         * expr.c (lookup_field): Lookup inner class fields in enclosing
10010         contexts.
10011         (expand_invoke): Use ID_INIT_P.
10012         (expand_java_field_op): Use DECL_CLINIT_P.
10013         * java-tree.def (CLASS_LITERAL): New tree code.
10014         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
10015         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
10016         (struct lang_decl): New field `inner_access'.
10017         (enclosing_context_p): Prototyped.
10018         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
10019         ID_CLINIT_P): New macros.
10020         (CLASS_STATIC): New macro.
10021         (CLASS_ACCESS0_GENERATED_P): New macro.
10022         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
10023         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
10024         INNER_CLASS_P): New macros.
10025         (DECL_INNER_CLASS_LIST): New macro.
10026         * jcf-parse.c (yyparse): Avoid the use of ANSI string
10027         concatenation.
10028         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
10029         the shift value to int. Fixed typo in comment.
10030         * lex.c (inst_id, wpv_id): Initialize.
10031         * mangle.c (unicode_mangling_length): Take `$' into account.
10032         * parse.h (DRECOVER, RECOVER): Terminate properly.
10033         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
10034         (typedef struct _jdep): New field `enclosing'.
10035         (JDEP_ENCLOSING): New macro.
10036         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
10037         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
10038         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
10039         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
10040         GET_ENCLOSING_CPC_CONTEXT): New macros.
10041         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
10042         (do_resolve_class): Added extra argument in prototype.
10043         * parse.y (resolve_class): Added extra argument in prototype.
10044         (maybe_create_class_interface_decl): Likewise.
10045         (maybe_use_access_method, build_wfl_wrap): New functions.
10046         (java_complete_expand_classes, java_complete_expand_class):
10047         Likewise.
10048         (java_parser_context_push_initialized_field,
10049         java_parser_context_suspend, java_parser_context_resume):
10050         Likewise.
10051         (maybe_make_nested_class_name, make_nested_class_name,
10052         set_nested_class_simple_name_value,
10053         link_nested_class_to_enclosing, find_as_inner_class,
10054         find_as_inner_class_do, check_inner_class_redefinition,
10055         build_thisn_assign, build_current_thisn, build_access_to_thisn,
10056         maybe_build_thisn_access_method, build_outer_field_access,
10057         build_outer_field_access_methods, build_outer_field_access_expr,
10058         build_outer_method_access_method, build_new_access_id,
10059         build_outer_field_access_method, outer_field_access_p,
10060         outer_field_expanded_access_p, outer_field_access_fix,
10061         build_incomplete_class_ref, patch_incomplete_class_ref,
10062         create_anonymous_class): Likewise.
10063         (inst_id, wpv_id): New static global variables.
10064         (synchronized:): New rule, tagged <node>.
10065         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
10066         rules.
10067         (anonymous_class_creation:): New rule, tagged <node>.
10068         (NEW_TK): Tagged <node>.
10069         (type_literals, array_type_literal): New rules, tagged <node>.
10070         (class_declaration:): Removed action when reducing by class_body:
10071         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
10072         using GET_CPC in sub-rules.
10073         (class_member_declaration): Handle inner classes.
10074         (method_declaration): When reducing method_header:, reset
10075         current_function_decl when appropriate.
10076         (method_declarator:): Set the number of formal parameter to 0 for
10077         method declared without arguments.
10078         (constructor_declarator:): Likewise.
10079         (static_initializer:): List of elements kept in a list.
10080         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
10081         use of the keyword `static' for type declarations.
10082         (block_statement:): Handle inner class declarations.
10083         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
10084         type qualified `this'.
10085         (class_instance_creation_expression): Use anonymous_class_creation:
10086         to handle inner class instances creation. Handle qualified `new'.
10087         (something_dot_new): Added appropriate actions.
10088         (create_new_parser_context): New function.
10089         (java_push_parser_context, java_parser_context_save_global,
10090         java_parser_context_suspend): Use create_new_parser_context.
10091         (check_modifiers): Changed leading comment.
10092         (check_class_interface_creation): Handle interclasses.
10093         (add_superinterfaces): Fixed comment.
10094         (create_interface): Build qualified name from the raw_name instead
10095         of its matching WFL. Push the initialized fields list. raw_name added
10096         as an extra argument to maybe_create_class_interface_decl.
10097         (create_class): Build qualified name from the raw_name instead of
10098         its matching WFL. Removed assignment to current_parsed_class_un.
10099         Call PUSH_ERROR before returning an error. Suspend the current
10100         parser context when processing an inner class. Push the
10101         initialized fields list. raw_name added as an extra argument to
10102         maybe_create_class_interface_decl. Add the private this$<n>
10103         field.
10104         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
10105         (register_fields): Get the class type from GET_CPC and handle
10106         previous errors.  Added code to handle the creation of static
10107         fields in inner classes. Initialized fields initialization
10108         statements kept in a list of lists.
10109         (maybe_generate_finit): Initialized fields initialization
10110         statements kept in a list of lists. Use GET_CPC.
10111         (maybe_generate_clinit): Likewise.
10112         (method_header): Use GET_CPC and GET_CPC_UN.
10113         (parser_qualified_classname): Handle inner classes.
10114         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
10115         (java_fix_constructors): Hide pointer to enclosing context
10116         instance in constructor list when dealing with inner classes.
10117         (jdep_resolve_class): Call resolve_class with extra first argument
10118         JDEP_ENCLOSING.
10119         (resolve_class): Add enclosing context as a first extra argument
10120         to do_resolve_class.
10121         (do_resolve_class): Call find_as_inner_class. Handle WFLs
10122         properly.
10123         (resolve_no_layout): Extra argument added to resolve_class
10124         invocation.
10125         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
10126         (java_get_real_method_name): Use GET_CPC_UN.
10127         (check_abstract_method_definitions): Use DECL_CLINIT_P.
10128         (java_check_abstract_methods): Handle static method declared in
10129         inner classes by an error.
10130         (java_check_regular_methods): Use DECL_CLINIT_P.
10131         (source_start_java_method): Also set DECL_MAX_LOCALS.
10132         (create_artificial_method): Call java_parser_context_save_global
10133         and java_parser_context_restore_global instead of saving/restoring
10134         the context by hand.
10135         (expand_start_java_method): Improved verbose mode message.
10136         (java_complete_expand_methods): Fixed leading comment. Use
10137         DECL_CLINIT_P.
10138         (fix_constructors): Added assignment to this$<n> if necessary.
10139         (java_expand_classes): Call java_complete_expand_classes instead
10140         of java_complete_expand_methods.
10141         (make_qualified_primary): Simplified.
10142         (merge_qualified_name): Optimized for missing left or right parts.
10143         (resolve_expression_name): Handle access to outer class fields from
10144         interclasses.
10145         (resolve_qualified_expression_name): New macro
10146         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
10147         classes. Report error on non appropriate qualification of
10148         `new'. Handle qualified `this'.
10149         (not_accessible_p): Allow access to outer class private fields from
10150         inner classes.
10151         (patch_method_invocation): Handle method invocations through
10152         access methods and inner class constructor invocations.
10153         (find_applicable_accessible_methods_list): Search enclosing
10154         contexts of an inner class.
10155         (search_applicable_methods_list): Fixed typo.
10156         (argument_types_convertible): Handle inner class constructors'
10157         hidden outer context reference argument.
10158         (qualify_ambiguous_name): Handle qualified `this'.
10159         (java_complete_lhs): Handle use of field accessed through
10160         artificial access methods in various cases of assignments. Handle
10161         CLASS_LITERAL node.
10162         (check_final_assignment): Use DECL_CLINIT_P.
10163         (valid_ref_assignconv_cast_p): Handle the destination being an
10164         enclosing context of the source.
10165         (patch_unaryop): Handle use of field accessed through artificial
10166         access methods.
10167         (patch_return): Use DECL_CLINIT_P.
10168         (patch_throw_statement): Use DECL_CLINIT_P.
10169         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
10170         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
10171         ID_INIT_P.
10172
10173 2000-01-16  Anthony Green  <green@cygnus.com>
10174
10175         * parse.y (build_string_concatenation): Only use
10176         StringBuffer(String) shortcut if String arg is constant.
10177
10178 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10179
10180         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
10181         the shift value to int. Fixed typo in comment.
10182
10183 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
10184
10185         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
10186         * jcf-write.c: Likewise.
10187         * parse.y: Likewise.
10188         * parse.c: Regenerate.
10189
10190 2000-01-09  Anthony Green  <green@cygnus.com>
10191
10192         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
10193         bytecodes in the correct order.
10194
10195 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10196
10197         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
10198
10199 2000-01-06  Anthony Green  <green@cygnus.com>
10200
10201         * expr.c (java_lang_expand_expr): Switch to permanent obstack
10202         before building constant array decl.
10203
10204 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10205
10206         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
10207         method invocation and typo in conditional expression.
10208         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
10209         the appropriate NOTE_POP.
10210         * parse.y (patch_binop): Shift value mask to feature the right
10211         type.
10212
10213 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10214
10215         * class.c (assume_compiled, assume_compiled_node): Add static
10216         prototype.
10217         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
10218
10219         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
10220
10221         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
10222
10223         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
10224         to `__modifier' to avoid stringifying it.
10225
10226         * parse.y (verify_constructor_circularity): Don't call a variadic
10227         function with a non-literal format string.
10228         (java_check_abstract_methods): Move unreachable code inside
10229         `continue' statement.
10230         (lookup_method_invoke): Call xstrdup, not strdup.
10231
10232         * expr.c (expand_java_field_op): Avoid the use of ANSI string
10233         concatenation.
10234
10235         * jcf-parse.c (yyparse): Likewise.
10236
10237         * jv-scan.c (main): Likewise.
10238
10239 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10240
10241         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
10242         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
10243         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
10244         concatenation.
10245
10246         * parse.y (synchronized, variable_redefinition_error,
10247         check_class_interface_creation, create_interface, create_class,
10248         method_header, finish_method_declaration,
10249         check_modifiers_consistency, method_declarator,
10250         complete_class_report_errors, check_abstract_method_definitions,
10251         java_check_regular_methods, check_throws_clauses,
10252         java_check_abstract_methods, read_import_dir,
10253         check_pkg_class_access, declare_local_variables, fix_constructors,
10254         cut_identifier_in_qualified, resolve_expression_name,
10255         resolve_qualified_expression_name, patch_method_invocation,
10256         java_complete_lhs, patch_assignment, try_builtin_assignconv,
10257         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
10258         patch_exit_expr, patch_exit_expr, patch_switch_statement,
10259         patch_try_statement, patch_synchronized_statement,
10260         patch_throw_statement, check_thrown_exceptions,
10261         patch_conditional_expr): Likewise.
10262
10263 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10264
10265         * Makefile.in (LIBDEPS): Added gcc's errors.o
10266         (../jcf-dump$(exeext):): Link with gcc's errors.o
10267         (../gcjh$(exeext):): Likewise.
10268         * expr.c (expand_java_NEW): Layout the entire target type instead of
10269         laying out its methods only.
10270         (lookup_field): Layout the class after having loaded it.
10271         * java-tree.h (java_debug_context): Declared.
10272         * jcf-io.c (toplev.h): Included.
10273         (find_class): Removed assignment to jcf's outofsynch
10274         field. Force source file to be read if newer than its matching
10275         class file. Tweaked debug messages.
10276         * jcf-parse.c (jcf_out_of_synch): Deleted.
10277         (read_class): Call to jcf_out_of_synch removed.
10278         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
10279         (jcf_out_of_synch): Prototype deleted.
10280         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
10281         `deprecated' and `class_err': integer turned into bit-fields.
10282         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
10283         * parse.y (package_list): New global.
10284         (package_declaration:): Record newly parsed package name.
10285         (extra_ctxp_pushed_p): Static global deleted.
10286         (java_parser_context_save_global): Create buffer context for the
10287         purpose of saving globals, if necessary.
10288         (java_parser_context_restore_global): Pop context pushed for the
10289         purpose of saving globals, if necessary.
10290         (java_debug_context_do): New prototype and function.
10291         (java_debug_context): Likewise.
10292         (do_resolve_class): Use already parsed package names to qualify
10293         and lookup class candidate.
10294         (java_pre_expand_clinit): Removed unnecessary local variable.
10295
10296 1999-12-17  Tom Tromey  <tromey@cygnus.com>
10297
10298         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
10299         fixes PR gcj/119.
10300         (process_file): Use `\n\' at end of each line in string.
10301
10302 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10303
10304         * expr.c (expand_invoke): Layout the loaded class before
10305         attempting to use it.
10306         (expand_java_field_op): Allow final field assignments to take
10307         place in $finit$.
10308         * typeck.c (convert): Return error_mark_node if expr is null.
10309
10310 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10311
10312         * class.c (class_depth): Return -1 if the class doesn't load
10313         properly.
10314         * expr.c (can_widen_reference_to): Check for errors during depth
10315         computation and return 0 accordingly.
10316         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
10317         create default constructors and add an other error check.
10318         * parse.h (java_fix_constructors): Prototyped.
10319         * parse.y (java_pre_expand_clinit): Likewise.
10320         (build_super_invocation): Re-prototyped to feature one argument.
10321         (java_check_circular_reference): Directly use `current'.
10322         (java_fix_constructors): New function.
10323         (java_check_regular_methods): Don't create default constructors
10324         here, but abort if none were found.
10325         (java_complete_expand_methods): Pre-process <clinit> calling
10326         java_pre_expand_clinit.
10327         (java_pre_expand_clinit): New function.
10328         (fix_constructors): build_super_invocation invoked with the
10329         current method declaration as an argument.
10330         (build_super_invocation): Use the context of the processed method
10331         decl argument instead of current_class.
10332         * typeck.c (lookup_java_method): Take WFLs in method names into
10333         account.
10334
10335 1999-12-14  Per Bothner  <per@bothner.com>
10336
10337         * class.c (make_class_data): flag_keep_inline_functions to keep
10338         private methods in the method array.
10339
10340 1999-12-15  Anthony Green  <green@cygnus.com>
10341
10342         * check-init.c (check_init): Take into account both types of
10343         `throw's when checking for uninitialized variables.
10344
10345 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10346
10347         * parse.y (java_complete_lhs): Force conversion of array
10348         dimensions to int_type_node, that's what runtime's ABI expects.
10349
10350 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10351
10352         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
10353         operand of a WFL, until the Java front-end gets fixed with regard
10354         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
10355
10356 1999-12-10  Andrew Haley  <aph@cygnus.com>
10357
10358         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
10359         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
10360         expr.c (build_java_athrow): Add support for sjlj-exceptions.
10361         java-tree.h: Ditto.
10362         jcf-write.c: Ditto.
10363
10364 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10365
10366         * expr.c (java_lang_expand_expr): Switch to permanent obstack
10367         before calling expand_eh_region_start and expand_start_all_catch.
10368         * except.c (expand_start_java_handler): Switch to permanent
10369         obstack before calling expand_eh_region_start.
10370         (expand_end_java_handler): Switch to permanent obstack before
10371         calling expand_start_all_catch.
10372
10373 1999-12-5  Anthony Green  <green@cygnus.com>
10374
10375         * decl.c (init_decl_processing): Mark throw_node as a noreturn
10376         function with side effects.
10377         (init_decl_processing): Mark all memory allocating DECLs with
10378         DECL_IS_MALLOC.
10379
10380 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10381
10382         * except.c (expand_end_java_handler): Call
10383         expand_resume_after_catch and end_catch_handler.
10384
10385 1999-11-30  Anthony Green  <green@cygnus.com>
10386
10387         * verify.c (verify_jvm_instructions): Create new return label
10388         chain if non existent (don't rely on the verified state of the jsr
10389         target.)
10390
10391 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10392
10393         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
10394         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
10395
10396         * parse.y (patch_assignment): Removed bogus final class test on
10397         lhs when checking on whether to emit an ArrayStoreException runtime
10398         check.
10399         * expr.c (expand_java_arraystore): Likewise.
10400
10401 1999-11-28 Anthony Green <green@cygnus.com>
10402
10403         * decl.c (find_local_variable): Reuse single slot decls when
10404           appropriate.
10405
10406 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10407
10408         * jcf-parse.c (saw_java_source): Global variable removed.
10409         (read_class): Don't use `saw_java_source'. Added extra braces.
10410         (yyparse): Code setting `saw_java_source' removed.
10411
10412 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
10413
10414         * except.c (emit_handlers): Zero catch_clauses after emitting them.
10415
10416 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10417
10418         * verify.c (merge_type_state): Non verified subroutines being
10419         considered more than once to trigger passive type merge.
10420
10421 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10422
10423         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
10424         in case of error. Error message tuned.
10425
10426 1999-11-21  Anthony Green  <green@cygnus.com>
10427
10428         * constants.c (find_methodref_index): Unwrap method names before
10429         inserting them in the constant pool.
10430
10431         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
10432
10433         * class.c (assume_compiled_node): New typedef.
10434         (assume_compiled_tree): New static data.
10435         (find_assume_compiled_node): New function.
10436         (add_assume_compiled): New function.
10437         (assume_compiled): New function.
10438         * class.c (make_class_data): Use assume_compiled.
10439         (is_compiled_class): Use assume_compiled.
10440
10441         * java-tree.h (add_assume_compiled): Declare.
10442
10443         * lang.c (lang_decode_option): Parse new options.
10444
10445 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10446
10447         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
10448         int_type_node: that's what `_Jv_AllocObject' expects.
10449
10450 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10451
10452         * parse.y (lookup_method_invoke): Use lang_printable_name to
10453         reliably build the type name during error report. Fixes PR gcj/97.
10454
10455 1999-11-09  Tom Tromey  <tromey@cygnus.com>
10456
10457         * jcf-path.c: Include <sys/stat.h>.
10458         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
10459         (DIR_UP): New macro.
10460
10461 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10462
10463         * parse.y (source_end_java_method): Resume permanent allocation,
10464         reversing Apr 27 1998 patch.
10465         (patch_string_cst): Pop obstacks after having pushed the permanent
10466         ones.
10467
10468 1999-11-05  Tom Tromey  <tromey@cygnus.com>
10469
10470         * class.c (finish_class): Emit inlined methods if any native
10471         methods exist in the class.  Fixes PR gcj/85.
10472
10473 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10474
10475         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
10476         (qualify_ambiguous_name): Likewise.
10477
10478 1999-11-03  Godmar Back <gback@cs.utah.edu>
10479
10480         * typeck.c: (lookup_java_method):  search all inherited
10481         interfaces when looking up interface method.
10482
10483 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10484
10485         * parse.y (method_header:): Issue error message for rule `type
10486         error'.
10487         (synchronized:): Error report when not using synchronized.
10488
10489 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10490
10491         * parse.y (resolve_qualified_expression_name): Prevent `this' from
10492         being used before the superclass constructor has been called.
10493         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
10494         instead of `CALL_THIS_CONSTRUCTOR_P'.
10495
10496 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
10497
10498         * check-init.c: Fix typo in comment.
10499
10500 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10501
10502         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
10503         and final method.
10504
10505 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10506
10507         * parse.y (expression_statement:): Call function to report
10508         improper invocation of a constructor.
10509         (parse_ctor_invocation_error): New function.
10510
10511 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
10512
10513         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
10514         remember_end_note.
10515
10516 1999-10-21  Tom Tromey  <tromey@cygnus.com>
10517
10518         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
10519         in generated `main'.
10520
10521 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10522
10523         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
10524         (qualify_ambiguous_name): Likewise.
10525
10526 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10527
10528         * parse.y (java_complete_tree): fold_constant_for_init to work on
10529         permanent_obstack.
10530         (java_complete_lhs): Likewise.
10531         (array_constructor_check_entry): Complete an initializer element
10532         on permanent_obstack.
10533
10534 1999-10-19  Tom Tromey  <tromey@cygnus.com>
10535
10536         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
10537         From Mike Moreton <mike@pillim.demon.co.uk>.
10538
10539 1999-10-15  Greg McGary  <gkm@gnu.org>
10540
10541         * java-tree.h (flag_bounds_check): Remove extern decl.
10542         * lang.c (flag_bounds_check): Remove global variable.
10543         (lang_f_options): Remove "bounds-check" entry.
10544         (lang_init_options): Default flag_bounds_check to "on".
10545
10546 1999-10-14  Tom Tromey  <tromey@cygnus.com>
10547
10548         * jvgenmain.c (usage): New function.
10549         (main): Use it.  Also, handle `-D' options.
10550         * jvspec.c (lang_specific_driver): Recognize -D.
10551         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
10552
10553         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
10554
10555 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10556
10557         * jcf-dump.c (print_constant, disassemble_method): Don't call a
10558         variadic function with a non-literal format string.
10559
10560         * parse-scan.y (report_main_declaration): Likewise.
10561
10562         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
10563
10564         * parse.y (read_import_dir, patch_assignment, patch_binop,
10565         patch_array_ref): Likewise.
10566
10567         * typeck.c (build_java_array_type): Likewise.
10568
10569         * verify.c (verify_jvm_instructions): Likewise.
10570
10571 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10572
10573         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
10574
10575 1999-10-07  Anthony Green  <green@cygnus.com>
10576
10577         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
10578         where CHECK_PUT may fail for valid reasons.
10579
10580         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
10581         UNSAFE_PUTN): New macros.
10582
10583 1999-10-04  Tom Tromey  <tromey@cygnus.com>
10584
10585         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
10586         well.  Fixes Java PR gcj/59.
10587         * parse-scan.y (yyerror): Report errors.
10588
10589 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
10590
10591         * decl.c (insert_block): Remove unconditional `abort'.
10592
10593 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
10594
10595         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
10596         FUNCTION_CODE now of type int.  All callers changed.
10597         Set the builtin's DECL_BUILT_IN_CLASS.
10598
10599 1999-09-23  Tom Tromey  <tromey@cygnus.com>
10600
10601         * jvspec.c (lang_specific_driver): Don't read spec file if
10602         -fsyntax-only given.
10603
10604 1999-09-22  Tom Tromey  <tromey@cygnus.com>
10605
10606         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
10607
10608         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
10609         (WORDS_TO_LONG): Likewise.
10610         (WORDS_TO_DOUBLE): Likewise.
10611
10612 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10613
10614         * jcf-write.c (RELOCATION_VALUE_0): New macro.
10615         (RELOCATION_VALUE_1): Likewise.
10616         (emit_iinc, emit_reloc, push_constant1, push_constant2,
10617         push_in_const, push_long_const): Prototyped.
10618         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
10619         (push_constant2): Likewise.
10620         (push_int_const): Cast find_constant1's integer arguments to `jword'.
10621         (find_constant_wide): Cast find_constant2's integer arguments to
10622         `jword'.
10623         (find_constant_index): Cast find_constant2's and find_constant2's
10624         integer arguments to `jword'.
10625         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
10626         (emit_switch_reloc): Use RELOCATION_VALUE_0.
10627         (emit_if): Use RELOCATION_VALUE_1.
10628         (emit_goto): Likewise.
10629         (emit_jsr): Likewise.
10630         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
10631         argument to push_long_const to HOST_WIDE_INT.
10632
10633 1999-09-15  Andreas Schwab  <schwab@suse.de>
10634
10635         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
10636
10637 1999-09-20  Nick Clifton  <nickc@cygnus.com>
10638
10639         * lang.c (lang_decode_option): Extend comment.
10640
10641 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10642
10643         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
10644         instead of fndecl.
10645
10646 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10647
10648         * gjavah.c (get_field_name, print_method_info, print_include,
10649         add_namelet): Use xmalloc, not malloc.
10650
10651         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
10652         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
10653         NULL pointer.
10654
10655         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
10656
10657         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
10658
10659         * jcf-path.c (add_entry): Likewise.
10660
10661         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
10662
10663         * jv-scan.c (xmalloc): Remove definition.
10664
10665         * jvgenmain.c (xmalloc): Likewise.
10666
10667         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
10668
10669         * lex.c (java_store_unicode): Use xrealloc, not realloc.
10670
10671         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
10672         concat, not xmalloc/sprintf.
10673         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
10674         (xstrdup): Remove definition.
10675
10676         * parse.y (duplicate_declaration_error_p,
10677         constructor_circularity_msg, verify_constructor_circularity,
10678         check_abstract_method_definitions, java_check_regular_methods,
10679         java_check_abstract_methods, patch_method_invocation,
10680         check_for_static_method_reference, patch_assignment, patch_binop,
10681         patch_cast, array_constructor_check_entry, patch_return,
10682         patch_conditional_expr): Use xstrdup, not strdup.
10683
10684         * zextract.c (ALLOC): Use xmalloc, not malloc.
10685
10686 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10687
10688         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
10689
10690         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
10691         (do_spec, lang_specific_pre_link, lang_specific_driver,
10692         input_filename, input_filename_length): Don't declare.
10693         (main_class_name, jvgenmain_spec, lang_specific_driver):
10694         Constify a char*.
10695         (lang_specific_driver): All calls to the function pointer
10696         parameter now explicitly call `fatal'.
10697
10698 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10699
10700         * parse.y (find_applicable_accessible_methods_list): Search
10701         abstract classes as interfaces.
10702
10703 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10704
10705         * class.c (finish_class): We're now outside a valid method
10706         declaration. Tell the rest of gcc so.
10707
10708 1999-09-08  Bruce Korb  autogen@linuxbox.com
10709
10710         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
10711
10712 1999-09-07  Tom Tromey  <tromey@cygnus.com>
10713
10714         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
10715         java-array.h.
10716         (decode_signature_piece): Don't emit "::" in JArray<>.
10717         (print_namelet): Only print trailing `;' when printing a class.
10718
10719 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
10720
10721         * java-tree.h: Delete declarations for all tree nodes now moved to
10722         global_trees.
10723         * decl.c: Delete their definitions.
10724
10725 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
10726
10727         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
10728         * Makefile.in (OBJS): Add ggc-callbacks.o.
10729         (OBJDEPS): Likewise.
10730
10731 1999-09-03  Tom Tromey  <tromey@cygnus.com>
10732
10733         * parse.y (strip_out_static_field_access_decl): Return operand if
10734         it satisfies JDECL_P.
10735
10736 1999-09-02  Tom Tromey  <tromey@cygnus.com>
10737
10738         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
10739         Handle nested arrays, like `[[I'.
10740
10741 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10742
10743         * class.c (finish_class): Remove unused parameter, all callers
10744         changed.
10745
10746         * expr.c (build_java_athrow): Change return type to void.
10747         (java_lang_expand_expr): Make sure each case in switch returns a
10748         value.
10749
10750         * java-tree.h (finish_class): Fix prototype to take void args.
10751
10752         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
10753         (main): Issue return from main, not exit.
10754
10755         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
10756
10757         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
10758
10759         * jv-scan.c (main): Issue return from main, not exit.
10760
10761         * parse.y (check_abstract_method_definitions,
10762         java_check_abstract_method_definitions): Add static prototypes.
10763         (java_complete_expand_methods): Fix call to `finish_class'.
10764
10765         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
10766         and `prevpc'.
10767
10768 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10769
10770         * lang.c (language_string): Constify.
10771
10772 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10773
10774         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
10775         Remove hacks for stuff which comes from libiberty.
10776
10777         * Make-lang.in: Likewise.
10778
10779 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
10780
10781         * Makefile.in (xref.o): Depend on xref.c explicitly.
10782
10783 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10784
10785         * java-tree.h (lang_printable_name): Constify a char*.
10786
10787         * lang.c (lang_printable_name): Likewise.
10788
10789 1999-08-27  Jeffrey A Law  (law@cygnus.com)
10790
10791         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
10792         comments in C code.
10793
10794 1999-08-26  Tom Tromey  <tromey@cygnus.com>
10795
10796         * gjavah.c (print_cxx_classname): Print "::" before qualified
10797         name.
10798
10799 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10800
10801         * parse.y (lookup_cl): Changed leading comment. Now does its best
10802         to set the column number.
10803         (qualify_ambiguous_name): Take WFL wrappers into account.
10804
10805 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
10806
10807         * verify.c (verify_jvm_instructions): Don't check instruction
10808         validity beyond end of method.
10809
10810 1999-08-25  Tom Tromey  <tromey@cygnus.com>
10811
10812         * jvspec.c (lang_specific_driver): Correctly handle --help again.
10813
10814 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10815
10816         * gjavah.c (print_name, print_base_classname, utf8_cmp,
10817         cxx_keyword_subst, generate_access, name_is_method_p,
10818         get_field_name, print_field_name, super_class_name, print_include,
10819         decode_signature_piece, print_class_decls, usage, help,
10820         java_no_argument, version, add_namelet, print_namelet): Add static
10821         prototype.
10822         (print_base_classname, utf8_cmp, cxx_keyword_subst,
10823         name_is_method_p): Constify a char*.
10824         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
10825         Provide a final else clause in an if-else-if.
10826         (print_field_info): Add missing final arg in function call to
10827         `print_field_name'.
10828         (print_method_info, decompile_method, decode_signature_piece,
10829         print_c_decl, print_full_cxx_name, print_stub,
10830         print_mangled_classname, super_class_name, print_include,
10831         add_namelet, add_class_decl, print_class_decls, process_file,
10832         help): Constify a char*.
10833
10834         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
10835         push_int_const, find_constant_wide, find_constant_index,
10836         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
10837         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
10838         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
10839         emit_if, emit_goto, emit_jsr, call_cleanups,
10840         make_class_file_name): Add static prototypes.
10841         (generate_bytecode_return, generate_bytecode_insns): Pass a
10842         NULL_PTR, not a NULL_TREE.
10843
10844         * jv-scan.c: Include "jcf.h".
10845         (main): Declare using DEFUN macro.
10846
10847         * jvspec.c (find_spec_file, lang_specific_pre_link,
10848         lang_specific_driver): Add prototypes.
10849         (find_spec_file): Constify a char*.
10850
10851         * keyword.gperf (hash, java_keyword): Add prototypes.
10852
10853         * lang.c (lang_print_error): Add static prototype.
10854         (lang_init): Prefer memcpy over bcopy to avoid casts.
10855
10856         * lex.c (yylex): Add static prototype.
10857
10858         * parse-scan.y: Include "lex.c" earlier.
10859
10860         * parse.h: Remove redundant declaration for `yylex'.
10861
10862         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
10863         labeled_block_contains_loop_p): Add static prototypes.
10864         (not_accessible_p): Make static to match prototype.
10865
10866         * verify.c (start_pc_cmp): Don't needlessly cast away const.
10867
10868 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10869
10870         * parse.y (check_method_redefinition): Changed leading comment.
10871         (check_abstract_method_definitions): New function.
10872         (java_check_abstract_method_definitions): New function.
10873         (java_check_regular_methods): Call it.
10874         (verify_constructor_super): Fixed indentation.
10875         (lookup_method_invoke): Likewise.
10876
10877 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10878
10879         * parse.y (method_header): Return a null pointer if the current
10880         class node is null.
10881         (finish_method_declaration): Return if the current function decl
10882         is null.
10883         (source_start_java_method): Likewise.
10884         (java_method_add_stmt): Likewise.
10885
10886 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10887
10888         * class.c (emit_register_class): Removed unnecessary call to
10889         start_sequence.
10890         * parse.y (labeled_block_contains_loop_p): Removed unused local
10891         variable.
10892
10893 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10894
10895         * parse.y (java_refold): Added prototype.
10896
10897 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10898
10899         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10900         (java_stabilize_reference): Removed unnecessary `else'.
10901         (java_complete_lhs): Set flag to remember boolean. Call
10902         java_refold. Added comments.
10903         (java_decl_equiv): New function.
10904         (binop_compound_p): Likewise.
10905         (java_refold): Likewise.
10906         (patch_unaryop): Striped static field access assigned to decl and
10907         op. Changed promotion scheme for ++/-- operators.
10908         (search_loop): New function.
10909         (labeled_block_contains_loop_p): Likewise.
10910         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10911         comment.
10912         (patch_bc_statement): Call search_loop. Fixed comment.
10913
10914 1999-08-14  Anthony Green  <green@cygnus.com>
10915
10916         * expr.c (java_lang_expand_expr): Mark static array data as
10917         referenced.
10918
10919 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10920
10921         * jvgenmain.c (main): NUL-terminate name_obstack.
10922
10923 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10924
10925         * check-init.c (check_bool2_init, done_alternative): Add static
10926         prototypes.
10927
10928         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10929         (add_method, build_utf8_ref, build_class_ref,
10930         append_gpp_mangled_type, layout_class_method): Constify a char*.
10931
10932         * decl.c (push_promoted_type, make_binding_level): Add static
10933         prototypes.
10934         (push_promoted_type, pushdecl): Constify a char*.
10935
10936         * except.c (find_handler_in_range, link_handler,
10937         check_start_handlers): Add static prototypes.
10938
10939         * expr.c (process_jvm_instruction): Constify a char*.
10940
10941         * gjavah.c (main): Constify a char*.
10942
10943         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10944         Constify a char*.
10945
10946         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10947         static prototypes.
10948         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10949         munge, print_ents): Constify a char*.
10950
10951         * jcf-dump.c (disassemble_method): Constify a char*.
10952         (print_constant_pool, print_exception_table): Add static prototypes.
10953         (print_constant, print_exception_table, main, disassemble_method):
10954         Constify a char*.
10955
10956         * jcf-io.c (find_classfile, find_class): Likewise.
10957
10958         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10959         (set_source_filename, predefined_filename_p): Add static prototypes.
10960         (set_source_filename, get_constant, get_class_constant,
10961         find_in_current_zip): Constify a char*.
10962
10963         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10964         static prototypes.
10965         (add_entry, add_path, jcf_path_classpath_arg,
10966         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10967
10968         * jcf-reader.c (get_attribute, jcf_parse_preamble,
10969         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10970         jcf_parse_one_method, jcf_parse_methods,
10971         jcf_parse_final_attributes): Add static prototypes.
10972         (get_attribute): Constify a char*.
10973
10974         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10975         jcf_dependency_add_target, jcf_path_classpath_arg,
10976         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10977
10978         * jv-scan.c (main): Constify a char*.
10979         (gcc_obstack_init): Add prototype arguments.
10980
10981         * jvgenmain.c (gcc_obstack_init): Likewise.
10982         (main): Constify a char*.
10983
10984         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10985         static prototypes.
10986         (put_decl_string, lang_print_error): Constify a char*.
10987         (lang_init): Remove redundant extern prototype.
10988
10989         * mangle.c (emit_unicode_mangled_name): Constify a char*.
10990
10991         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10992         Add static prototypes.
10993         (get_type_from_signature): Constify a char*.
10994
10995         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10996         Add static prototypes.
10997         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10998         (verify_jvm_instructions): Constify a char*.
10999
11000         * xref.c (xref_flag_value): Likewise.
11001
11002         * xref.h (xref_flag_value): Likewise.
11003
11004         * zextract.c (makeword, makelong): Add static prototypes.
11005         (makeword, makelong): Constify a uch*.
11006
11007 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11008
11009         * lang.c (java_dummy_print): Constify a char*.
11010         (lang_print_error): Likewise.
11011         (lang_init): Remove redundant prototype for `print_error_function'.
11012         (lang_init_source): Likewise.
11013         (lang_identify): Constify a char*.
11014
11015 1999-08-09  Tom Tromey  <tromey@cygnus.com>
11016
11017         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
11018         (WORDS_TO_LONG): Likewise.
11019         (WORDS_TO_DOUBLE): Likewise.
11020
11021 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11022
11023         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
11024
11025         * expr.c (java_stack_pop, java_array_data_offset,
11026         build_java_throw_out_of_bounds_exception, case_identity,
11027         build_java_check_indexed_type): Add static prototypes.
11028         (linenumber_table, expand_invoke, expand_java_field_op,
11029         build_primtype_type_ref, expand_byte_code): Constify a char*.
11030
11031         * java-tree.h (build_primtype_type_ref, linenumber_table):
11032         Constify a char*.
11033         (java_lang_expand_expr): Add prototype.
11034
11035         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
11036         `java_lang_expand_expr'.
11037
11038         * lex.c (java_lex_error): Constify a char*.
11039         (java_get_unicode, java_read_char, java_allocate_new_line,
11040         java_unget_unicode, java_sneak_unicode): Prototype.
11041
11042         * parse-scan.y (current_class, package_name, method_declarator,
11043         report_class_declaration, yyerror): Constify a char*.
11044
11045         * parse.h (java_report_errors): Prototype.
11046         (yyerror): Constify a char*.
11047
11048         * parse.y (classitf_redefinition_error, check_modifiers,
11049         parse_jdk1_1_error, lookup_package_type,
11050         lookup_package_type_and_set_next, get_printable_method_name,
11051         purify_type_name): Constify a char*.
11052         (build_super_invocation, maybe_generate_finit,
11053         verify_constructor_super, parser_add_interface,
11054         add_superinterfaces, jdep_resolve_class, note_possible_classname,
11055         java_complete_expand_methods, java_expand_finals,
11056         cut_identifier_in_qualified, java_stabilize_reference,
11057         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
11058         merge_string_cste): Prototype.
11059         (single_type_import_declaration, yyerror,
11060         variable_redefinition_error, build_array_from_name,
11061         build_unresolved_array_type, check_class_interface_creation,
11062         resolve_class, complete_class_report_errors,
11063         note_possible_classname, read_import_dir,
11064         find_in_imports_on_demand, resolve_package, fix_constructors,
11065         check_deprecation, lookup_method_invoke,
11066         maybe_build_primttype_type_ref, array_constructor_check_entry):
11067         Constify a char*.
11068         (java_complete_expand_methods, java_expand_finals): Make static.
11069         (convert_narrow): Remove static prototype.
11070
11071 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
11072
11073         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
11074
11075 1999-08-02  Richard Henderson  <rth@cygnus.com>
11076
11077         * decl.c: Include defaults.h instead of expr.h.
11078         * parse.y: Likewise.
11079
11080 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
11081
11082         * java/decl.c (start_java_method): Change all uses of
11083         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
11084         Ensure expr.h is included.
11085         * java/expr.c (pop_arguments): Ditto.
11086         * java/parse.y (expand_start_java_method): Ditto.
11087
11088 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11089
11090         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
11091
11092 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
11093
11094         * decl.c: Include "function.h".
11095         * except.c: Likewise.
11096         * parse.y: Likewise.
11097         * Makefile.in: Update dependencies.
11098
11099 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11100
11101         * expr.c (build_java_soft_divmod): Provide a default case in switch.
11102         (java_lang_expand_expr): Mark parameters `target', `tmode' and
11103         `modifier' with ATTRIBUTE_UNUSED.
11104
11105         * gjavah.c (process_file): Add braces around ambiguous `else'.
11106
11107         * jcf-dump.c (print_access_flags, localvar_free): Change return
11108         type to void.
11109
11110         * parse.y (java_complete_expand_method): Initialize variable
11111         `exception_copy'.
11112         (resolve_qualified_expression_name): Likewise for `field_decl'.
11113         (patch_method_invocation): Likewise for `class_to_search'.
11114         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
11115         (patch_assignment): Likewise for `lhs_type'.
11116
11117         * verify.c (verify_jvm_instructions): Remove unused variable
11118         `caller'.
11119
11120 1999-07-25  Richard Henderson  <rth@cygnus.com>
11121
11122         * decl.c (va_list_type_node): New.
11123
11124 1999-07-25  Anthony Green  <green@cygnus.com>
11125
11126         * gjavah.c (print_stub): New function.
11127         (METHOD_IS_NATIVE): New macro.
11128         (print_mangled_classname): Make static.
11129         (HANDLE_END_FIELD): Don't emit fields during stub generation.
11130         (process_file): Perform stub generation.
11131         (HANDLE_METHOD): Don't emit class decls during stub
11132         generation.
11133         (HANDLE_END_METHOD): Take into account stub generation.
11134         (print_method_info): Handle stub generation.
11135         (print_stub): New function.
11136         (print_cxx_classname): Make signature consistant with others.
11137         (help): Describe -stubs option.
11138         (main): Create stub file.
11139         (version): Use version.c.
11140         (print_full_cxx_name): New function.
11141         (print_c_decl): Use print_full_cxx_name.
11142
11143 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11144
11145         * check-init.c (check_init): Handle MAX_EXPR.
11146
11147 1999-07-15  Andrew Haley  <aph@cygnus.com>
11148
11149         * lang.c (flag_use_divide_subroutine): New variable.
11150         * typeck.c: (convert_ieee_real_to_integer): Bounds check
11151         fp-to-integer conversion.
11152         (convert): Call convert_ieee_real_to_integer when flag_fast_math
11153         is not set.
11154
11155         * expr.c (build_java_soft_divmod): New function.
11156         (build_java_binop): Call build_java_soft_divmod if
11157         flag_use_divide_subroutine is set.
11158         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
11159         soft_lrem_node: new builtin functions.
11160         (init_decl_processing) Initialize the new builtins.
11161         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
11162         soft_lrem_node: new builtin functions.
11163         (build_java_soft_divmod): New function.
11164         * parse.y: Call build_java_soft_divmod if
11165         flag_use_divide_subroutine is set.
11166         * parse.c: Rebuilt.
11167
11168         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
11169         a --specs= arg) even if not linking.
11170         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
11171         -fuse-divide-subroutine
11172
11173 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11174
11175         * parse.y (resolve_and_layout): Check methods only once.
11176         (resolve_qualified_expression_name): Verify thrown exceptions
11177         compatibility.
11178         (check_thrown_exceptions): Reject exceptions thrown in
11179         initializer. Error message tuned.
11180
11181 1999-07-14  Andrew Haley  <aph@cygnus.com>
11182
11183         * expr.c (expand_expr): Do not return the last statement in a
11184         block as the block's value.
11185
11186 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11187
11188         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
11189         CALL_EXPR, to avoid order of evaluation changes.
11190
11191 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11192
11193         * parse.y (qualify_ambiguous_name): Do not use
11194         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
11195
11196 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11197
11198         * check-init.c (check_init): Handle MAX_EXPR.
11199         * expr.c (force_evaluation_order): Force method call arguments to
11200         be evaluated in left-to-right order.
11201         * parse.y (qualify_ambiguous_name): Loop again to qualify
11202         NEW_ARRAY_EXPR properly.
11203
11204 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11205
11206         * parse.y (patch_invoke): Resolve unresolved invoked method
11207         returned type.
11208         (qualify_ambiguous_name): STRING_CST to qualify expression for
11209         type name resolution.
11210
11211 1999-06-24  Andrew Haley  <aph@cygnus.com>
11212
11213         * class.c (finish_class): Whenever a deferred method is
11214         output, rescan the list of methods to see if a new candidate for
11215         output can be found.
11216
11217 1999-06-28  Tom Tromey  <tromey@cygnus.com>
11218
11219         * jvspec.c (lang_specific_driver): Recognize --help.
11220
11221 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11222
11223         * parse.y (resolve_package): Fixed bogus return statement.
11224         (patch_method_invocation): Resolve method invocation beginning with
11225         a package name qualifier.
11226
11227 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11228
11229         * Make-lang.in (java.stage1): Depend on stage1-start.
11230         (java.stage2): Likewise for stage2-start.
11231         (java.stage3): Likewise for stage3-start.
11232         (java.stage4): Likewise for stage4-start.
11233
11234 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11235
11236         * parse.y (java_complete_lhs): When doing cross referencing, don't
11237         try to keep file location on a WFL expanded as a CALL_EXPR.
11238
11239 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11240
11241         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
11242         compiling to class file a void method with an empty method body.
11243         As a side effect, the bytecode backend will generate the
11244         appropriate `return' instruction.
11245
11246 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11247
11248         * parse.y (lookup_package_type_and_set_next): New function prototype.
11249         (resolve_package): Search current and imported packages.
11250         (lookup_package_type_and_set_next): New function.
11251
11252 1999-06-22  Andrew Haley  <aph@cygnus.com>
11253
11254         * verify.c (verify_jvm_instructions): Check for pending blocks
11255         before invalid PC test and opcode switch, not after.
11256
11257 1999-06-21  Andrew Haley  <aph@cygnus.com>
11258
11259         * except.c (find_handler_in_range): The upper limit for exception
11260         ranges is exclusive, not inclusive: (start <= pc < end).
11261         (link_handler): find child pointer which points to outer by
11262         searching sibling list: previous code incorrectly assumed that
11263         outer->outer->first_child must point to outer.
11264         * verify.c (verify_jvm_instructions): FIXME added to code for
11265         `athrow'.
11266         (verify_jvm_instructions): Do not assume that the last block
11267         processed in a subroutine is a block which ends with a `ret'
11268         instruction.  With some control flows it is possible that the last
11269         block ends with an `athrow'.
11270
11271 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11272
11273         * parse.y (qualify_ambiguous_name): Reorganized the post
11274         evaluation of non WFL leading expression nodes.
11275
11276 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11277
11278         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
11279         CONVERT_EXPR.
11280
11281 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11282
11283         * parse.y (qualify_ambiguous_name): Handle qualified expression
11284         beginning with a STRING_CST.
11285
11286 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11287
11288         * parse.y (register_fields): Set DECL_INITIAL on both
11289         pre-initialized static and public fields.
11290         (resolve_field_access): Static field access expressions to always
11291         use pointer types.
11292         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
11293         qualification. CONVERT_EXPR to be resolved as an expression name.
11294         (java_complete_lhs): Identify and access qualified final
11295         initialized field in switch statement case expression.
11296         (fold_constant_for_init): Pre-initialized field decl constant to
11297         be folded.
11298
11299 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11300
11301         * parse.y (note_possible_classname): Mark returned node with
11302         QUALIFIED_P only if the original class name contained a '/'.
11303
11304 1999-06-05  Anthony Green  <green@cygnus.com>
11305
11306         * Make-lang.in (gcjh): More parallel build fixes.
11307
11308 1999-06-03  Mike Stump  <mrs@wrs.com>
11309
11310         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
11311
11312 1999-06-02  Anthony Green  <green@cygnus.com>
11313
11314         * except.c (link_handler): Chain exception handlers in order.
11315
11316 1999-06-02  Anthony Green  <green@cygnus.com>
11317
11318         * expr.c (expand_byte_code): Fill unreachable bytecode regions
11319         with nops and process as usual in order to always set correct EH
11320         ranges.  Emit detailed warnings about unreachable bytecodes.
11321
11322 1999-06-02  Anthony Green  <green@cygnus.com>
11323
11324         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
11325         constant.
11326
11327 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11328
11329         * parse.y (lookup_field_wrapper): Unified returned value to NULL
11330           or the searched field decl.
11331
11332 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11333
11334         * parse.y (fold_constant_for_init): Convert numerical constant
11335         values to the type of the assigned field.
11336
11337 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11338
11339         * expr.c (lookup_field): Relaxed the test on class loading error
11340         detection.
11341         * parse.y (fold_constant_for_init): Enabeled old code.
11342
11343 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11344
11345         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
11346         decide the validity of the cast of a java.lang.Cloneable reference
11347         to an array.
11348         (patch_conditional_expr): Fixed first argument passed to
11349         binary_numeric_promotion.
11350
11351 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11352
11353         * parse.y (qualify_ambiguous_name): Take into account that a
11354         CONVERT_EXPR might specify a type as a WFL.
11355
11356 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11357
11358         * parse.y (patch_assignment): Save the rhs before using it as an
11359         argument to _Jv_CheckArrayStore.
11360
11361 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11362
11363         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
11364
11365 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11366
11367         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
11368         floating point literal only when the exponent indicator has been
11369         parsed.
11370
11371 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11372
11373         * parse.y (formal_parameter:): Construct argument tree list
11374         element even if a yet unsupported final parameter was encountered.
11375
11376 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11377
11378         * parse.y (finish_method_declaration): Issue errors for native or
11379         abstract methods declared with a method body, as well as for non
11380         native or non abstract methods with no method body.
11381
11382 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11383
11384         * class.c (build_utf8_ref): Initialize variable `field'.
11385
11386         * decl.c (init_decl_processing): Initialize variable `field'.
11387
11388         * expr.c (build_known_method_ref): Mark parameters `method_type',
11389         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
11390         (process_jvm_instruction): Likewise for parameter `length'.
11391
11392         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
11393         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
11394         ATTRIBUTE_UNUSED.
11395
11396         * parse.y (maybe_generate_clinit): Remove unused variable
11397         `has_non_primitive_fields'.
11398         (find_in_imports_on_demand): Initialize variables `node_to_use'
11399         and `cl'.
11400         (patch_binop): Likewise for variable `prom_type'.
11401         (patch_unaryop): Likewise for variable `prom_type'.
11402
11403         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
11404
11405         * xref.c (xref_table): Add missing initializer.
11406
11407 1999-05-14  Tom Tromey  <tromey@cygnus.com>
11408
11409         * java-except.h (struct eh_range): Removed unused `next' member.
11410         * verify.c (verify_jvm_instructions): Call check_nested_ranges
11411         after adding all exception handlers.  Sort exception ranges in
11412         order of start PC.
11413         (struct pc_index): New structure.
11414         (start_pc_cmp): New function.
11415         * except.c (add_handler): Return `void'.  Don't call link_handler;
11416         instead construct an ordinary linked list and do range
11417         coalescing.
11418         (check_nested_ranges): New function.
11419         (link_handler): Changed interface to allow merging of eh_ranges.
11420         Split overlapping ranges.  Return `void'.
11421
11422 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11423
11424         * parse.y (constructor_block_end:): New rule, tagged <node>.
11425         (constructor_body:): Use `constructor_block_end' instead of
11426         `block_end'.
11427
11428 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11429
11430         * parse.y (statement_nsi:): Pop `for' statement block.
11431         (java_complete_lhs): Labeled blocks containing no statement are
11432         marked as completing normally.
11433
11434 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11435
11436         * xref.c (xref_set_current_fp): New function, defined.
11437         * xref.h (xref_set_current_fp): New function, prototyped.
11438
11439 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11440
11441         * check-init.c (check_init): Take into account that
11442         LABELED_BLOCK_STMT can be empty.
11443
11444 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11445
11446         * parse.y (java_check_regular_methods): Warning check on not
11447         overriding methods with default access in other packages does not
11448         apply to `<clinit>'.
11449         (java_complete_lhs): If block body is an empty_stmt_node, replace
11450         it by NULL_TREE. This prevents gcc from generating an irrelevant
11451         warning.
11452
11453 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11454
11455         * check-init.c (check_init): Removed code accepting to see things
11456         falling through default:, when doing xrefs.
11457         * java-tree.h (do_not_fold): New global variable, declared.
11458         * parse.y (do_not_fold): New global variable, defined.
11459         (java_complete_expand_method): Set `do_not_fold' to the value of
11460         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
11461         and reinstall them after them have been purged; do not check for
11462         initializations; do not issue missing return errors.
11463         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
11464         when doing xrefs.
11465         (patch_binop): Skip the fold part when doing xrefs.
11466         (build_string_concatenation): Skip the concatenation part when
11467         doing xrefs.
11468         (patch_synchronized_statement): Do not generate a try-finally when
11469         doing xrefs.
11470         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
11471         and keep the location where the throw was seen.
11472         * typeck.c (convert): When `do_not_fold' is set, do not attempt
11473         any treatment on the converted node an simply return a NOP_EXPR of
11474         the targeted type.
11475         * xref.c (xref_get_data): New function, defined.
11476         * xref.h (xref_get_data): New function, declared.
11477         (XREF_GET_DATA): Use xref_get_data.
11478
11479 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11480
11481         * gjavah.c (print_include): Cast the result of `strlen' to int
11482         when comparing against a signed value.
11483         (add_namelet): Likewise.
11484
11485 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11486
11487         * expr.c (expand_invoke): Mark parameter `nargs' with
11488         ATTRIBUTE_UNUSED.
11489         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
11490
11491         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
11492         ATTRIBUTE_UNUSED.
11493
11494         * jcf-reader.c (get_attribute): Cast a value to long
11495         when comparing against a signed expression.  Likewise.
11496
11497         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
11498         HOST_BITS_PER_CHAR.
11499
11500 1999-05-11  Andrew Haley  <aph@cygnus.com>
11501
11502         * parse.y (source_end_java_method): If the current method contains
11503         any exception handlers, force asynchronous_exceptions: this is
11504         necessary because signal handlers in libjava may throw exceptions.
11505         * decl.c (end_java_method): Ditto.
11506
11507 1999-05-11  Tom Tromey  <tromey@cygnus.com>
11508
11509         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
11510         flags.
11511         * jvspec.c (THREAD_NAME): Removed.
11512         (GC_NAME): Likewise.
11513         (MATHLIB): Likewise.
11514         (WITHLIBC): Likewise.
11515         (GCLIB): Likewise.
11516         (THREADLIB): Likewise.
11517         (MATH_LIBRARY): Likewise.
11518         (lang_specific_driver): Don't add `-l' options to command line.
11519         Instead, add a single --specs option.  Recognize `-L' options and
11520         use them to search for spec file.
11521         (find_spec_file): New function.
11522         (SPEC_FILE): New define.
11523
11524 1999-05-11  Dave Brolley  <brolley@cygnus.com>
11525
11526         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
11527         cpplib-enabled build.
11528
11529 1999-05-05  Per Bothner  <bothner@cygnus.com>
11530
11531         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
11532         temporarily zero it while calling rest_of_decl_compilation.
11533
11534         * java-tree.h (string_ptr_type_node):  Add declaration.
11535         * decl.c:  Define and initialize string_ptr_type_node.
11536         * parse.y (patch_string_cst):  Use string_ptr_type_node.
11537
11538         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
11539         * parse.y (for_statement):  Now unconditionally exit_block.
11540         (finish_labeled_statement):  No longer exit_block if for-loop.
11541         (patch_loop_statement):  Check harder if the loop is already labeled.
11542
11543         * parse.y (patch_initialized_static_field):  Removed function.
11544         (maybe_generate_clinit):  Removed special handling for interfaces.
11545         (java_complete_expand_methods):  Do a preliminary java_complete_tree
11546         on <clinit> to determine if it can be removed.
11547         (java_complete_expand_method):  Remove special handling for <clinit>.
11548         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
11549         optimize if we get back empty_stmt_node.
11550         For MODIFY_EXPR, re-do checking of static initializers.
11551         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
11552         For VAR_DECL, pass correct context.
11553
11554         * verify.c (verify_jvm_instructions):  Better error messages.
11555
11556 1999-05-03  Tom Tromey  <tromey@cygnus.com>
11557
11558         * parse-scan.y (interface_declaration): Call
11559         report_class_declaration for interfaces.
11560
11561 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
11562
11563         * Makefile.in: Remove -v from bison command lines.
11564
11565 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11566
11567         * check-init.c (check_init): Exclude a case of error when doing
11568         xrefs.
11569         * class.c (layout_class_method): Don't generate the error message
11570         twice when compiling from source.
11571         * lang-options.h: Added `-Wredundant-modifers' and
11572         `-Wunusupported-jdk11' flags and help text.
11573         * lang.c (lang_decode_option): Added support for
11574         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
11575         flag_static_local_jdk11 and flag_redundant set accordingly.
11576         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
11577         * parse.h (EXPR_WFL_ADD_COL): New macro.
11578         (DECL_END_SOURCE_LINE): Likewise.
11579         (DECL_INHERITED_SOURCE_LINE): Likewise.
11580         * parse.y (static_ref_err): New function, prototyped.
11581         (CCB_TK): Now tagged <operator>.
11582         (class_body:): Remember the location of the closing '}' of a class
11583         definition when doing xrefs.
11584         (block:): Likewise.
11585         (block_end:): Likewise.
11586         (create_class): Remember the location of the inherited class
11587         identifier when doing xrefs.
11588         (register_fields): Added test on first operand of `init' before
11589         testing it TREE_CODE.
11590         (method_header): Store the location of the class identifier in the
11591         class decl when doing xrefs.
11592         (finish_method_declaration): Don't combine first/last method line
11593         when doing xref.
11594         (java_check_regular_methods): Warning check on not overriding
11595         methods with default access on other packages move before check on
11596         static methods. Initialization of `aflags' also moved up.
11597         (resolve_expression_name): Call static_ref_err to report the error.
11598         (static_ref_err): New function, implemented.
11599         (resolve_field_access): Returned simplified static field access
11600         when doing xrefs.
11601         (resolve_qualified_expression_name): Check for illegal use of
11602         static fields in a non static context. Call static_ref_err to
11603         report error in various places.
11604         (java_complete_tree): Do not fold initialized static fields when
11605         doing xrefs.
11606         (java_complete_lhs): Likewise.
11607
11608 1999-04-29  Anthony Green  <green@cygnus.com>
11609
11610         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
11611         create internal labels.
11612         (lookup_label): Ditto.
11613
11614 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11615
11616         * class.c (layout_class_method): Generate <clinit>'s rtl for
11617         interfaces.
11618         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11619         for interfaces' <clinit>.
11620         * expr.c (lookup_field): Search for fields in interfaces.
11621         (expand_invoke): Fixed indentation.
11622         (expand_java_field_op): Likewise. Use IS_CLINIT.
11623         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
11624         (IS_CLINIT): New macro.
11625         * parse.y (type_declaration:): Call maybe_generate_clinit after an
11626         interface was parsed.
11627         (maybe_generate_clinit): Don't generate if the current class is an
11628         interface with only fields of primitive types.
11629         (reset_method_name): Use IS_CLINIT.
11630         (java_complete_expand_method): Expand <clinit> when it exists for
11631         interfaces. Use IS_CLINIT.
11632         (resolve_expression_name): Use DECL_CONTEXT instead of
11633         current_class to build static field references.
11634         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
11635         ARRAY_REF when doing xreferencing.
11636         (check_final_assignment): Fixed typo in leading comment. Use
11637         IS_CLINIT.
11638         (patch_array_ref): Don't fully expand array references when
11639         xreferencing.
11640         (patch_return): Use IS_CLINIT.
11641         (patch_throw_statement): Likewise.
11642
11643 1999-04-22  Tom Tromey  <tromey@cygnus.com>
11644
11645         * Make-lang.in (JAVA_SRCS): Added check-init.c.
11646
11647 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11648
11649         * decl.c (predef_filenames, predef_filenames_size): New globals
11650         (init_decl_processing): predef_filenames and predef_filenames_size
11651         initialized.
11652         * java-tree.h (predef_filenames, predef_filenames_size): Declared
11653         extern.
11654         * jcf-parse.c (predefined_filename_p): New function.
11655         (yyparse): Check that files on the command line are specified only
11656         once and issue a warning otherwise.
11657         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
11658         * parse.y (source_end_java_method): Nullify NOP method bodies, to
11659         avoid a gcc warning with -W -Wall turned on.
11660         (java_expand_classes): Abort if errors were encountered.
11661         (java_complete_lhs): If the cross reference flag is set, wrap
11662         field DECL node around a WFL when resolving expression name.
11663
11664 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11665
11666         * lang.c (lang_decode_option): Fixed returned value when parsing
11667         `-fxref=...' and `-Wall'.
11668         * parse.y (source_end_java_method): Do not generate code when
11669         flag_emit_xref is set.
11670         (resolve_expression_name): Do not build static field access when
11671         flag_emit_xref is set.
11672         (resolve_field_access): No special treatment on `length' when
11673         flag_emit_xref is set. Do not build qualified static field access
11674         when flag_emit_xref is set.
11675         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
11676         when flag_emit_xref is set.
11677         (patch_assignment): Do not generate array store runtime check when
11678         flag_emit_xref is set.
11679         * xref.c (xref_flag_value): Fixed function declaration
11680         indentation.
11681         (xset_set_data): New function.
11682         * xref.h (xref_set_data): Added prototype for new function.
11683         (typedef struct xref_flag_table): New field data.
11684         (XREF_GET_DATA): New macro.
11685
11686 1999-04-19  Tom Tromey  <tromey@cygnus.com>
11687
11688         * xref.h (enum): Removed trailing comma.
11689
11690         * parse.y (resolve_qualified_expression_name): Added missing
11691         `break'.
11692
11693 1999-04-15  Anthony Green  <green@cygnus.com>
11694
11695         * gjavah.c: New prototypes for java_float_finite and
11696         java_double_finite.
11697
11698 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11699
11700         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
11701         references.
11702
11703 1999-04-06  Jeffrey A Law  (law@cygnus.com)
11704
11705         * Makefile.in (TREE_H): Add tree-check.h.
11706         (RTL_H): Add genrtl.h.
11707
11708 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11709
11710         * parse.y (patch_assignment): Added ArrayStoreException runtime
11711         check.
11712
11713 1999-04-06  Per Bothner  <bothner@cygnus.com>
11714
11715         * expr.c (pop_type_0):  New function.
11716         (pop_type):  Use pop_type_0.
11717         * java-tree.h (pop_type_0):  New declaration.
11718         * verify.c (verify_jvm_instructions):  Check return instructions.
11719
11720         * parse.y (patch_binop):  Don't fold if non-constant and emiting
11721         class files.
11722
11723 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11724
11725         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
11726
11727         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
11728         (main_jcf): Don't define.
11729         (process_file): Don't set `main_jcf'.
11730
11731         * java-tree.h (main_jcf): Don't declare.
11732
11733         * jcf-parse.c (main_jcf): Add static definition.
11734
11735         * lang.c (main_jcf): Don't define.
11736
11737 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11738
11739         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
11740
11741         * decl.c (copy_lang_decl): Likewise for `bcopy'.
11742
11743         * jcf-depend.c: Include "config.h", not <config.h>.
11744
11745         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
11746         `bcopy' to PTR.
11747
11748         * jcf-path.c: Include "config.h", not <config.h>.
11749
11750         * lex.c: Don't include various system header files.
11751         (java_init_lex): Cast the argument of `bzero' to PTR
11752
11753         * parse-scan.y (java_push_parser_context): Likewise.
11754
11755         * parse.y (java_push_parser_context): Likewise.
11756         (patch_bc_statement): Match format specifier to variable argument.
11757
11758         * xref.c: Don't include <stdio.h>.
11759
11760 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11761
11762         * parse.y (struct parser_ctxt *ctxp): Now global.
11763         (declare_local_variables): Use WFL compound value for the
11764         declaration source line value, when doing cross-referencing.
11765
11766 1999-03-31  Tom Tromey  <tromey@cygnus.com>
11767
11768         * gjavah.c (print_field_info): Allow constants of other types.
11769         (print_include): Generate include when new name is proper prefix
11770         of already printed name.
11771         (add_namelet): Likewise.
11772         (cxx_keyword_subst): New function.
11773         (print_method_info): Use it.
11774         (print_field_name): New function.
11775         (get_field_name): New function.
11776         (print_field_info): Use get_field_name and print_field_name.
11777
11778 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11779
11780         * Makefile.in (keyword.h): Generate using gperf language 'C', not
11781         'KR-C', so gperf uses the `const' keyword on strings.
11782
11783         * keyword.gperf (java_keyword): Const-ify a char*.
11784
11785 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11786
11787         * parse.y (patch_bc_statement): Fixed identation and a bogus
11788         `printf' format.
11789
11790 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11791
11792         * parse.y (patch_assignment): Allow static variables in other
11793         classes to be assigned.
11794
11795 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11796
11797         * class.c (maybe_add_interface): Remove unused variable
11798         `interface_binfo'.
11799         (make_class_data): Use = for assignment, not ==.  Likewise.
11800         (emit_register_classes): Remove unused variable `decl'.
11801
11802         * lex.c: Fix comment so as not to contain an embedded `/*'.
11803
11804         * verify.c (verify_jvm_instructions): Remove unused variable
11805         `self_type'.
11806
11807 1999-03-27  Per Bothner  <bothner@cygnus.com>
11808
11809         * parse.y (complete_loop_body):  Rename to finish_loop_body.
11810         (complete_labeled_statement):  Rename to finish_labeled_statement.
11811         (complete_for_loop):  Rename to finish_for_loop.
11812         (complete_method_declaration):  Rename to finish_method_declaration.
11813
11814         * java-tree.h (continue_identifier_node):  New global node.
11815         * decl.c:  Define and initialize continue_identifier_node.
11816         * parse.y (generate_labeled_block):  Remove - no longer needed.
11817         (build_loop_body):  Use continue_identifier_node for continue block.
11818         (finish_labeled_statement):  Also do pop_labeled_block actions.
11819         (java_complete_lhs):  POP_LOOP even if error.
11820         (build_labeled_block):  Special handling for continue_identifier_node.
11821         (patch_loop_statement):  Re-organize.
11822         (patch_bc_statement):  Re-write.
11823
11824 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11825
11826         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
11827         using a WFL compound value.
11828         * parse.y (xref.h): Include.
11829         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
11830         WFL compound value.
11831         (register_fields): Set WFL compound value to lineno if doing
11832         xrefs.
11833         (java_complete_expand_method): Call expand_xref if flag_emit_xref
11834         is set.
11835         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
11836         * xref.h (expand_xref): Prototype renamed from xref_generate.
11837
11838 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11839
11840         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
11841         (GET_CURRENT_BLOCK): New macro.
11842         * parse.y (current_static_block): New global variable.
11843         (method_body:): Define action.
11844         (complete_method_declaration): Set current_function_decl to NULL
11845         when work on the current method is done.
11846         (declare_local_variables): Use GET_CURRENT_BLOCK.
11847         (java_method_add_stmt): Likewise.
11848         (java_complete_expand_method): Disable the use of `this' when
11849         expanding <clinit>.
11850         (enter_a_block): If no current method exist, use
11851         current_static_block to link static initializer blocks.
11852         (exit_block): Rewritten to use current_static_block when no current
11853         method decl exists.
11854         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
11855         (patch_return): Forbid the use of `return' in static initializers.
11856         (patch_throw_statement): Fixed indentation. Issue specific error
11857         for uncaught thrown checked exception in static initializer
11858         blocks. Removed FIXME.
11859
11860 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
11861
11862         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
11863         Link gcj from gcc.o.
11864
11865 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11866
11867         * parse.y (find_applicable_accessible_methods_list): When dealing
11868         with interface: ensure that a given interface or java.lang.Object
11869         are searched only once.
11870
11871 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11872
11873         * gjavah.c (print_c_decl): Remove unused argument `flags'.
11874
11875         * jcf-dump.c (print_access_flags): Add braces around if-else.
11876
11877         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
11878         COMBINE_INPUTS.
11879
11880         * lex.c (build_wfl_node): Add static prototype.
11881
11882         * lex.h (build_wfl_node): Remove static prototype.
11883
11884         * parse.y: Include lex.c early enough to declare everything needed.
11885         Ensure calls to `build_wfl_node' pass the proper arguments.
11886         (create_class): Remove unused variable `super_decl'.
11887         (get_printable_method_name): Initialize variable `name'.
11888
11889 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11890
11891         * Changelog: Fixed 1999-03-22 typos.
11892         * lang.c (lang_decode_option): Fixed typo in error string in the
11893         XARG section.
11894
11895 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11896
11897         * Makefile.in (JAVA_OBJS): Added entry xref.o.
11898         (xref.o): New rule.
11899         * java-tree.h (flag_emit_xref): Declared extern.
11900         * lang.c (xref.h): Included.
11901         (flag_emit_xref): New global variable.
11902         (lang_decode_option): Added support for -fxref.
11903         * xref.c: Created.
11904         * xref.h: Likewise.
11905
11906 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
11907
11908         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11909         linked with.
11910
11911 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11912
11913         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11914         $(srcdir)/../system.h and $(JAVA_TREE_H).
11915         (jcf-io.o): Depend on $(JAVA_TREE_H).
11916         (mangle.o): Likewise.
11917
11918         * check-init.c (check_cond_init): Add static prototype.
11919
11920         * class.c (build_java_method_type, hashUtf8String,
11921         make_field_value, get_dispatch_vector, get_dispatch_table,
11922         append_gpp_mangled_type, mangle_static_field): Likewise.
11923         (strLengthUtf8): Hide unused definition.
11924         (hashUtf8String): Const-ify.
11925         (make_field_value): Un-ANSI-fy.
11926
11927         * constants.c: Move inclusion of jcf.h above java-tree.h.
11928         (set_constant_entry, find_class_or_string_constant,
11929         find_name_and_type_constant, get_tag_node,
11930         build_constant_data_ref): Add static prototype.
11931
11932         * decl.c (push_jvm_slot, builtin_function,
11933         lookup_name_current_level): Likewise.
11934         (builtin_function): Const-ify.
11935
11936         * except.c (expand_start_java_handler, expand_end_java_handler):
11937         Add static prototype.
11938
11939         * expr.c (flush_quick_stack, push_value, pop_value,
11940         java_stack_swap, java_stack_dup, build_java_athrow,
11941         build_java_jsr, build_java_ret, expand_java_multianewarray,
11942         expand_java_arraystore, expand_java_arrayload,
11943         expand_java_array_length, build_java_monitor, expand_java_pushc,
11944         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11945         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11946         expand_compare, expand_test, expand_cond, expand_java_goto,
11947         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11948         expand_java_field_op, java_push_constant_from_pool): Likewise.
11949
11950         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11951         (build_java_arraynull_check): Mark parameters `node' and `type'
11952         with ATTRIBUTE_UNUSED.
11953         (note_label): Likewise for parameter `current_pc'.
11954         (expand_java_call, expand_java_ret): Hide unused definition.
11955
11956         * java-tree.h (make_class, build_constants_constructor,
11957         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11958         init_outgoing_cpool, register_class, emit_register_classes,
11959         java_layout_seen_class_methods): Prototype.
11960         (unicode_mangling_length): Const-ify.
11961         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11962         emit_unicode_mangled_name, format_int, format_uint,
11963         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11964         jcf_print_utf8_replace, open_class): Prototype.
11965
11966         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
11967         <stdio.h>.  Include tree.h/java-tree.h.
11968         (utf8_equal_string usage, process_class): Add static prototype.
11969         (open_class): Don't prototype this here.
11970         (utf8_equal_string): Match arguments to format specifiers.
11971         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11972         TABLE_SWITCH, disassemble_method): Likewise.
11973
11974         * jcf-io.c: Include tree.h/java-tree.h.
11975         (open_class, find_classfile, jcf_print_utf8,
11976         jcf_print_utf8_replace): Const-ify.
11977
11978         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11979         parse_class_file): Add static prototype.
11980         (find_in_current_zip): Match definition to existing static
11981         prototype.
11982
11983         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11984         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11985         finish_jcf_block, define_jcf_label, get_jcf_label_here,
11986         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11987         write_chunks, adjust_typed_op, generate_bytecode_conditional,
11988         generate_bytecode_return, perform_relocations, init_jcf_state,
11989         init_jcf_method, release_jcf_state, generate_classfile):
11990         Add static prototype.
11991         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11992         (make_class_file_name): Const-ify.
11993
11994         * jcf.h (find_classfile): Const-ify.
11995
11996         * jv-scan.c (reset_report): Remove prototype.
11997
11998         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11999         (error): Rewrite to allow varargs.
12000
12001         * lang.c (lang_f_options): Const-ify.
12002
12003         * lex.c (java_parse_escape_sequence): Add static prototype.
12004         (java_allocate_new_line): Match definition to existing static
12005         prototype.
12006
12007         * mangle.c Include tree.h/java-tree.h.
12008         (unicode_mangling_length, emit_unicode_mangled_name,
12009         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
12010
12011         * parse.h (jdep_code): Remove trailing comma in enumeration.
12012         (java_get_line_col): Move prototype outside of !JC1_LITE test.
12013         (reset_report): Add prototype.
12014
12015         * verify.c (push_pending_label, merge_types): Add static
12016         prototypes.
12017
12018         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
12019
12020 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12021
12022         * parse.y (find_applicable_accessible_methods_list): Extend the
12023         search to superinterfaces when relevant.
12024         (search_applicable_methods_list): New function.
12025
12026 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12027
12028         * class.c (unmangle_classname): Implemented stricter testing
12029         before setting the QUALIFIED_P flag on an identifier.
12030
12031 1999-03-16  Per Bothner  <bothner@cygnus.com>
12032
12033         * parse.y (java_complete_lhs):  Call force_evaluation_order
12034         after patch_newarray.
12035         (patch_binop):  Don't call fold if there are side effects.
12036
12037 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12038
12039         * parse.y (java_stabilize_reference): Use save_expr instead of
12040         building a SAVE_EXPR node.
12041         (java_complete_lhs): Patch the resulting string of the `+='
12042         operator (if necessary) and complete the RHS after having built
12043         the cast.
12044
12045 1999-03-15  Per Bothner  <bothner@cygnus.com>
12046
12047         * class.c (make_class):  Don't set CLASS_P here (because
12048         this function is also called by build_java_array_type).
12049         (push_class):  Set CLASS_P here instead.
12050         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
12051
12052         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
12053         context.  If the context is class, perfer "super" over "synchronized".
12054         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
12055
12056         * parse.y (create_class):  Don't call parser_check_super here;
12057         it is not robust.  Always wait until later.
12058
12059         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
12060         match what JDK 1.2 does), but don't set ACC_PUBLIC.
12061
12062 1999-03-13  Per Bothner  <bothner@cygnus.com>
12063
12064         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
12065         * lex.h (UNGETC):  Change misleading macro.
12066
12067 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12068
12069         * parse.y (java_stabilize_reference): Return NODE when patching a
12070         COMPOUND_EXPR.
12071         (java_complete_lhs): Put parenthesis around truth values.
12072
12073 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12074
12075         * class.c (layout_class_method): Don't make rtl for interface
12076         methods.
12077         * parse.h (GET_TYPE_NAME): New macro.
12078         * parse.y (if_then_statement:): Fixed indentation.
12079         (if_then_else_statement:): Likewise.
12080         (for_statement:): Fixed spacing.
12081         (try_statement:): Fixed indentation.
12082         (create_interface): Don't force interfaces to be abstract.
12083         (method_header): Abstract methods are OK in interfaces.
12084         (declare_local_variables): Fixed typo in comment.
12085         (java_complete_expand_method): Fixed indentation.
12086         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
12087         non accessible fields.
12088         (java_stabilize_reference): New function.
12089         (java_complete_lhs): Fixed indentation. Use
12090         java_stabilize_reference in compound assignment. Insert the
12091         cast. If not processing `+' fix string constants before processing
12092         binop.
12093
12094 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12095
12096         * constants.c (find_class_or_string_constant): Cast variable `j'
12097         to a `jword' when comparing against one.
12098
12099         * expr.c (java_lang_expand_expr): Remove unused variables
12100         `has_finally_p' and `op0'.
12101
12102         * gjavah.c (print_field_info): Cast a value to jint when comparing
12103         against one.  Likewise for a jlong.
12104         (add_namelet): Likewise cast a `sizeof' to an int when comparing
12105         against a signed quantity.
12106
12107         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
12108         (print_signature): Don't needlessly dereference variable `str'
12109
12110         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
12111         `max_locals' with ATTRIBUTE_UNUSED.
12112         (jcf_parse_class): Likewise for variable `index'.
12113
12114         * parse.h (reverse_jdep_list): Remove static prototype.
12115
12116         * parse.y (build_jump_to_finally): Remove prototype and definition.
12117         (reverse_jdep_list): Add static prototype.
12118
12119         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
12120         `assignment' and `expr_decl'.
12121
12122         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
12123
12124 1999-03-12  Andrew Haley  <aph@cygnus.com>
12125
12126         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
12127         we'll need a directory separator and a null character.
12128
12129 1999-03-10  Per Bothner  <bothner@cygnus.com>
12130
12131         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
12132
12133   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12134
12135         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
12136         interfaces.
12137
12138 1999-03-05  Per Bothner  <bothner@cygnus.com>
12139
12140         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
12141
12142         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
12143
12144         * class.c (layout_class_method):  A static method in a base class
12145         is never overridden, so treat it like it doesn't exist.
12146         However, do complain about private non-static method overriding
12147         public static method.
12148
12149         * parse.y:  Don't set unused INITIALIZED_P flag.
12150         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
12151
12152         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
12153         (build_array_from_name):  Re-order &index[string] to &string[index].
12154
12155         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
12156         error_mark (it might catch more errors, but it is more likely to lose).
12157
12158 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12159
12160         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
12161         (parse-scan.o): Depend on toplev.h.
12162
12163         * class.c (make_method_value): Add prototype.  Make it static.
12164         Remove unused second argument, caller changed.
12165
12166         * expr.c (java_lang_expand_expr): Remove unused variable
12167         `return_label'.
12168
12169         * java-tree.h: Don't prototype find_in_current_zip.
12170         Add prototypes for verify_constant_pool, start_java_method,
12171         end_java_method, give_name_to_locals, expand_byte_code,
12172         open_in_zip, set_constant_value, find_constant1, find_constant2,
12173         find_utf8_constant, find_string_constant, find_class_constant,
12174         find_fieldref_index, find_methodref_index, write_constant_pool,
12175         count_constant_pool_bytes and encode_newarray_type.
12176
12177         * jcf-dump.c: Remove unused variable `LONG_temp'.
12178
12179         * jcf-parse.c: Include parse.h.
12180         (jcf_parse_source): Remove unused parameter, all callers changed.
12181         (jcf_figure_file_type): Add static prototype.
12182         (find_in_current_zip): Likewise.  Also remove unused parameter,
12183         all callers changed.
12184         (read_class): Initialize variable `saved_pos'.
12185
12186         * jcf-reader.c (jcf_parse_preamble): Mark variables
12187         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
12188
12189         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
12190         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
12191         (java_parse_doc_section): Initialize variable `seen_star'.
12192         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
12193         (java_lex_error): Mark parameters `msg' and `forward' with
12194         ATTRIBUTE_UNUSED.
12195         (java_get_line_col): Mark parameters `filename' and `line' with
12196         ATTRIBUTE_UNUSED.
12197
12198         * parse-scan.y: Include toplev.h.
12199         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
12200
12201         * parse.h: use `struct JCF', not plain `JCF'.
12202         (java_parser_context_save_global, java_expand_classes
12203         java_parser_context_restore_global, java_parse): Add prototypes.
12204
12205         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
12206         `node'.
12207
12208 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
12209
12210         *  check-init.c (check_init):  COPYN takes word count, not bit count.
12211
12212 1999-02-26  Per Bothner  <bothner@cygnus.com>
12213
12214         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
12215         explicit build_decl.  (Avoids crash in reload when optimizing.)
12216
12217 1999-02-25  Per Bothner  <bothner@cygnus.com>
12218
12219         * decl.c (complete_start_java_method):  Handle synchronized method
12220         even when compiling from bytecode.
12221
12222 1999-02-26  Tom Tromey  <tromey@cygnus.com>
12223
12224         * gjavah.c (add_class_decl): Only generate `#include' if outer
12225         class is not the name of the class we are processing.  Correctly
12226         append `.h' in #include.
12227         (process_file): Clean up newlines around generated `#include's.
12228         (decode_signature_piece): Correctly handle inner classes.
12229         (struct include): New structure.
12230         (all_includes): New global.
12231         (print_include): New function.
12232         (add_class_decl): Use it.
12233         (process_file): Likewise.
12234         (add_class_decl): Generate include for java-array.h if array
12235         seen.
12236         (process_file): Don't generate java-array.h include.
12237
12238         * gjavah.c (add_namelet): Check for standard package names here.
12239         (add_class_decl): Don't check for standard package names here.
12240
12241 1999-02-25  Tom Tromey  <tromey@cygnus.com>
12242
12243         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
12244         When reading a zip file, only use strncmp if both strings are
12245         bigger than the buffer length.  Initialize `k' when looping
12246         through zip file.
12247
12248 1999-02-24  Tom Tromey  <tromey@cygnus.com>
12249
12250         * gjavah.c (struct namelet): New structure.
12251         (add_namelet): New function.
12252         (print_namelet): New function.
12253         (print_class_decls): Use add_namelet and print_namelet to generate
12254         namespaces and not classes.
12255         (method_printed): New global.
12256         (HANDLE_END_METHOD): Examine method_printed.
12257         (print_method_info): Set method_printed when required.  Print
12258         error if function to be ignored is marked virtual.  Handle $finit$
12259         method.
12260         (METHOD_IS_FINAL): New macro.
12261         (print_field_info): Use it.
12262         (HANDLE_METHOD): Clear method_printed.
12263         (method_pass): New global.
12264         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
12265         (process_file): Do two passes over both fields and methods.
12266         (HANDLE_METHOD): Examine method_pass.
12267         (root): New global.
12268         (add_class_decl): New function.
12269         (print_class_decls): Don't scan over entire constant pool.
12270
12271 1999-02-23  Tom Tromey  <tromey@cygnus.com>
12272
12273         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
12274         disable linking in that case.
12275
12276 1999-02-20  Tom Tromey  <tromey@cygnus.com>
12277
12278         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
12279         not 0x1f.
12280
12281 1999-02-21  Per Bothner  <bothner@cygnus.com>
12282
12283         * decl.c (build_result_decl), java-tree.h:  New method.
12284         (complete_start_java_method):  Handle synchronized methods.
12285         Don't build DECL_RESULT here.  (Ordering dependency problem.)
12286         (start_java_method):  Call build_result_decl here instead  ...
12287         * parse.y (java_complete_expand_method):  ... and here.
12288         (expand_start_java_method): Don't call complete_start_java_method here.
12289         (java_complete_expand_method):  Call it here instead.
12290         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
12291         * java-tree.h:  ... here.
12292
12293         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
12294         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
12295         for ARRAY_REF - it doesn't work when array bounds are checked.
12296         (patch_array_ref):  Handle it here instead.
12297
12298         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
12299
12300 1999-02-19  Per Bothner  <bothner@cygnus.com>
12301
12302         Force left-to-right evaluation of binary operations etc.
12303         * expr.c (force_evaluation_order), java-tree.h:  New function.
12304         * parse.y (java_complete_lhs):  Pass binary operations, procedure
12305         calls, and ARRAY_REFs to force_evaluation_order.
12306         (various):  Set TREE_SIDE_EFFECTS more carefully.
12307
12308         Tolerate random (non-UTF8) encoding in comments without complaining.
12309         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
12310         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
12311
12312         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
12313         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
12314
12315         * parse.y (java_complete_lhs):  Ignore an empty statement in a
12316         COMPOUND_EXPR.  Don't complain about empty statement after return.
12317
12318 1999-02-19  Per Bothner  <bothner@cygnus.com>
12319
12320         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
12321         in TREE_LIST - just chain the POINTER_TYPEs together.
12322         (resolve_class):  If type already resolved, return decl.
12323         After resolving, update TREE_TYPE(class_type), and name (if array).
12324         * parse.h (do_resolve_class), parse.y:  Make non-static.
12325         * class.c (maybe_layout_super_class):  Take this_class argument.
12326         Do do_resolve_class if necessary.
12327         (layout_class, layout_class_methods): Adjust calls appropriately.
12328         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
12329         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
12330         * typeck.c (build_java_array_type):  Don't call layout_class.
12331
12332 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12333
12334         * parse.y (check_pkg_class_access): Allow private class access
12335         within the same package.
12336         (strip_out_static_field_access_decl): New function.
12337         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
12338         operator argument before testing its nature.
12339
12340 1999-02-03  Per Bothner  <bothner@cygnus.com>
12341
12342         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
12343         (TRY_EXPR):  Simplify - it no longer has a finally clause.
12344         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
12345         Simpler handling of TRY_EXPR, which no longer has a finally clause.
12346         * expr.c (java_lang_expand_expr):  Likewise.
12347         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
12348         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
12349         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
12350         (build_try_statement):  Remove finally parameter and handling.
12351         (build_try_finally_statement):  New function.
12352         (patch_try_statement):   No longer need to support finally clause.
12353         (try_statement):  Update grammar action rules.
12354         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
12355         Simpler handling of TRY_EXPR, which no longer has a finally clause.
12356
12357 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
12358
12359         * jcf-parse.c (get_constant): Add braces around computation of 'd'
12360         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
12361
12362 1999-02-17  Andrew Haley  <aph@cygnus.com>
12363
12364         * class.c (build_utf8_ref): Back out broken patch which was
12365         intended to to output signatures using '.' as a separator.
12366
12367         * class.c (make_class_data): Output signatures using '.' as a
12368         separator, rather than '/'.
12369         (mangled_classname): Likewise.
12370         (make_field_value): Likewise.
12371         (make_method_value): Likewise.
12372         * constants.c (alloc_class_constant): Likewise.
12373         * expr.c (build_invokeinterface): Likewise.
12374
12375 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12376
12377         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
12378         of an ancient workaround.
12379
12380 1999-02-10  Jeffrey A Law  (law@cygnus.com)
12381
12382         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
12383         here anymore.
12384
12385 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12386
12387         * lex.c (yylex): Encode \0 as UTF8.
12388
12389 1999-02-10  Tom Tromey  <tromey@cygnus.com>
12390
12391         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
12392         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
12393         (libgcj_zip): Renamed.
12394         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
12395         LIBJAVA_ZIP_FILE.
12396         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
12397
12398         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
12399         (GC_NAME): Renamed -lgc to -lgcjgc.
12400
12401 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12402
12403         * lex.c (java_lang_cloneable): Initialize.
12404         * parse.y (java_lang_cloneable): New static variable.
12405         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
12406         doing one more qualification round.
12407         (valid_ref_assignconv_cast_p): Reject null source or
12408         destination. Allow an array to be cast into java.lang.Cloneable.
12409         (patch_cast): Swapped two first arguments to first call to
12410         valid_ref_assignconv_cast_p.
12411
12412 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12413
12414         * parse.h: DECL_P renamed JDECL_P.
12415         * parse.y: DECL_P replaced by JDECL_P.
12416         (build_array_from_name): Always use pointer's type.
12417         (patch_bc_statement): Extra code to search continue target in a
12418         for loop. Fixed comments. Continue target is current loop when
12419         unlabeled.
12420
12421 1999-02-05  Andrew Haley  <aph@cygnus.com>
12422
12423         * class.c (make_class_data): The superclass of an interface should
12424         be null, not class Object.
12425
12426         * lex.c (java_lex): Sign extend hex literals.
12427
12428 1999-02-04  Andrew Haley  <aph@cygnus.com>
12429
12430         * class.c (build_utf8_ref): Output signatures using '.' as a
12431         separator, rather than '/'.
12432         (make_class_data): Likewise.
12433
12434 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
12435
12436         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
12437         mkstemp.o.  Get them from libiberty now.
12438
12439 1999-02-02  Jeffrey A Law  (law@cygnus.com)
12440
12441         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
12442
12443 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12444
12445         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
12446         from libiberty.h
12447
12448 1999-02-02  Per Bothner  <bothner@cygnus.com>
12449
12450         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
12451         * jcf-write.c (generate_bytecode_return):  New function.
12452         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
12453
12454         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
12455         generate special [fd]const_[01] instructions.
12456
12457         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
12458
12459         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
12460         handling OPCODE_lookupswitch or OPCODE_tableswitch.
12461
12462 1999-02-01  Per Bothner  <bothner@cygnus.com>
12463
12464         * parse.y (patch_method_invocation):  Handle calling static methods,
12465         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
12466
12467         * parse.y (java_complete_lhs):  Don't complain about unreachable
12468         exit condition in a do-while statement.
12469
12470 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12471
12472         * lex.c (java_read_char): Fixed utf8 decoding.
12473         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
12474         range.
12475         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
12476         comments. Local variable `all_primitive' is gone. Broadened
12477         acceptance of `0' to floating point targets. `long' can now be
12478         widened to `double' or `float'.
12479         (valid_method_invocation_conversion_p): Added leading
12480         comment. Fixed tabulation.
12481         (build_string_concatenation): Optimize out left or right empty
12482         string constants.
12483
12484 1999-01-28  Per Bothner  <bothner@cygnus.com>
12485
12486         * jcf-write.c (localvar_alloc):  Only emit entry for
12487         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
12488         (generate_bytecode_insns):  Only call put_linenumber if
12489         debug_info_level > DINFO_LEVEL_NONE.
12490         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
12491         is specified, add -g1 (for compatibility wih javac).
12492
12493 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
12494
12495         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
12496         gjavah.o, check-init.o, jv-scan.o
12497
12498 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12499
12500         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
12501
12502         * gjavah.c: Include config.h and system.h.
12503
12504         * javaop.h (inline): Don't define, its handled by system.h.
12505         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
12506         from `inline' to `static inline'.
12507
12508         * jcf.h (inline): Don't define, its handled by system.h.
12509
12510         * lex.c (inline): Likewise.
12511
12512 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
12513
12514         * lang-specs.h: Map -Qn to -fno-ident.
12515
12516 1999-01-29  Richard Henderson  <rth@cygnus.com>
12517
12518         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
12519
12520 1999-01-29  Tom Tromey  <tromey@cygnus.com>
12521
12522         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
12523         then cast it to Object before calling `append' method.
12524
12525 1999-01-28  Per Bothner  <bothner@cygnus.com>
12526
12527         * check-init.c (check_bool2_init, check_bool_init, check_init):
12528         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
12529         * jcf-write.c (generate_bytecode_insns):  Likewise.
12530
12531 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12532
12533         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
12534         * parse.y (patch_cast): Allow a boolean to be cast into a
12535         boolean.
12536
12537 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12538
12539         * parse.y: (class_declaration:): Fixed indentation.
12540         (class_member_declaration:): Extra `;' after field declaration now
12541         accepted.
12542         (interface_declaration:): Removed debug messages in error reports.
12543         (patch_binop): Nodes created and returned inherit the orignal
12544         node's COMPOUND_ASSIGN_P flag value.
12545         (patch_cast): Fix cast from char to floating point.
12546
12547 1999-01-25  Andrew Haley  <aph@cygnus.com>
12548
12549         * except.c, java-except.h (expand_resume_after_catch): new
12550         function.
12551         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
12552         to branch back to main flow of control after a catch block.
12553
12554 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12555
12556         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
12557         $(srcdir)/../system.h.
12558         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
12559         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
12560         (jcf-write.o): Likewise.
12561         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12562         (mangle.o): Depend on $(srcdir)/../toplev.h.
12563         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12564         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12565
12566         * class.c: Include output.h and parse.h.
12567         (mangled_classname): Add the `const' keyword to a char*.
12568         (find_named_method): Hide unused function definition.
12569         (build_utf8_ref): Change type of variable `c' to unsigned char.
12570         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
12571         (build_class_ref): Add the `const' keyword to a char*.
12572         (layout_class_method): Remove unused variable `buf'.
12573
12574         * decl.c (find_local_variable): Remove unused variable `rtl'.
12575         (pushdecl): Likewise for variables `different_binding_level' and
12576         `oldglobal'.
12577         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
12578         (maybe_build_cleanup): Likewise for parameter `decl'.
12579
12580         * except.c (expand_start_java_handler): Mark parameter `range'
12581         with ATTRIBUTE_UNUSED.
12582
12583         * expr.c: Include except.h.
12584         (pop_type): Remove unused variable `i'.
12585         (pop_value): Likewise for variables `n_words' and `i'.
12586         (expand_java_arrayload): Likewise for variable `convert'.
12587         (java_lang_expand_expr): Likewise for variables `op0', `type',
12588         `mode', `unsignedp', `node' and `elements'.
12589         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
12590         `eh_ranges'.
12591         (process_jvm_instruction): Add a `const' qualifier to a char*.
12592
12593         * gjavah.c (output_directory): Add the `const' keyword to a char*.
12594         (temp_directory): Likewise.
12595         (print_c_decl): Likewise.
12596         (print_method_info): Likewise.
12597         (decode_signature_piece): Likewise.
12598         (print_mangled_classname): Likewise.
12599
12600         * java-except.h: Provide prototypes for maybe_start_try,
12601         maybe_end_try and add_handler.
12602
12603         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
12604         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
12605         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
12606         init_expr_processing, push_super_field, init_class_processing,
12607         can_widen_reference_to, class_depth, verify_jvm_instructions,
12608         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
12609         set_local_type, merge_type_state, push_type, load_type_state,
12610         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
12611         emit_unicode_mangled_name): Add prototypes.
12612
12613         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
12614         (print_signature_type): Use ISDIGIT, not isdigit.
12615         (print_signature): Remove unused variable `j'.
12616
12617         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
12618         int when comparing against one.
12619
12620         * jcf-parse.c: Include toplev.h.
12621
12622         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
12623         (localvar_free): Remove unused variable `i'.
12624         (generate_bytecode_conditional): Likewise for variable `kind'.
12625
12626         * jv-scan.c: Include config.h and system.h.  Remove redundant
12627         OS header and gansidecl.h includes.
12628         (warning): Add the `const' keyword to a char*.  Also add
12629         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
12630         __STDC__, when determining whether to use ANSI-isms.
12631         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
12632         (xmalloc): Don't redundantly prototype here.
12633         (main): Remove unused parameter `envp'.  Also fix the arguments
12634         passed to function `fatal' to match the format specifier.
12635
12636         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
12637
12638         * mangle.c: Include toplev.h.
12639         (emit_unicode_mangled_name): Declare parameter `len'.
12640
12641         * parse.y (parse_warning_context): Add the `const' keyword to a
12642         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
12643         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
12644         (issue_warning_error_from_context): Add the `const' keyword to
12645         a char*.
12646         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
12647         not `__STDC__' for whether to use ANSI-isms.
12648
12649         * typeck.c (incomplete_type_error): Mark parameters `value' and
12650         `type' with ATTRIBUTE_UNUSED.
12651         (parse_signature_type): Use ISDIGIT, not isdigit.
12652
12653         * verify.c (check_pending_block): Add the `const' keyword to a char*.
12654         (verify_jvm_instructions): Likewise.  Remove unused variables
12655         `field_name' and `default_val'.
12656
12657         * zextract.c: Include config.h and system.h.  Remove redundant
12658         OS header includes.
12659
12660         * zipfile.h: Prototype `read_zip_archive'.
12661
12662 1999-01-21  Andrew Haley  <aph@cygnus.com>
12663
12664         * typeck.c (convert): Allow conversions to void type: some
12665         optimizations in gcc do this.
12666
12667 1999-01-21  Andrew Haley  <aph@cygnus.com>
12668
12669         * typeck.c (convert_ieee_real_to_integer): New function.
12670         (convert): When not using fast-math and using hardware fp, convert
12671         an IEEE NaN to zero.
12672
12673 1999-01-18  Andrew Haley  <aph@cygnus.com>
12674
12675         * parse.y (patch_binop): Do a type conversion from signed to
12676         unsigned and then back to signed when a ">>>" is found.
12677
12678 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12679
12680         * java-tree.h: (check_for_initialization): Added prototype.
12681         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
12682         * parse.y (do_resolve_class): Removed unused locals.
12683         (read_import_dir): Likewise.
12684         (resolve_qualified_expression_name): Array creation
12685         expressions are valid primary expressions.
12686         (qualify_ambiguous_name): Likewise.
12687         (patch_synchronized_statement): Removed unused local.
12688
12689 1999-01-17  Jeffrey A Law  (law@cygnus.com)
12690
12691         * Makefile.in (zextract.o): Add dependencies.
12692
12693         * Makefile.in: Do not put ^Ls at the start of a line.
12694
12695 1999-01-15  Per Bothner  <bothner@cygnus.com>
12696
12697         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
12698         sub-type the result of the call that gets the exception value.
12699
12700         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
12701         don't call finish_class.
12702
12703         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
12704         clear found before continuing.
12705
12706         * verify.c (verify_jvm_instructions):  On an array load, allow
12707         and handle top of stack to be TYPE_NULL.
12708
12709         * gjavah.c (generate_access):  Translate Java package private or
12710         protected access to C++ public, but with a comment.
12711
12712 1999-01-13  Andrew Haley  <aph@cygnus.com>
12713
12714         * expr.c (generate_name): Name prefix changed to avoid clashes
12715         with assembler temp labels.
12716
12717         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
12718         MODIFY_EXPR.  Without this, code for the assignment may not be
12719         generated at all and the synchronized statement will read an
12720         uninitialized variable.
12721
12722 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12723
12724         * class.c (maybe_layout_super_class): Fixed returned value.
12725         * lex.c: Added 1999 to the copyright.
12726         (java_init_lex): Initialize java_lang_imported.
12727         * lex.h: Added 1999 to the copyright.
12728         * parse.h: Added 1999 to the copyright.
12729         (REGISTER_IMPORT): Fixed typo in trailing macro.
12730         (CURRENT_OSB): New macro.
12731         (struct parser_ctxt): New fields osb_depth, osb_limit.
12732         * parse.y (java_lang_id): New global variable.
12733         (type_import_on_demand_declaration): Don't import java.lang.* twice.
12734         (array_creation_expression:): Use CURRENT_OSB.
12735         (dims:): Uses a stack to keep track of array dimensions.
12736         (cast_expression:): Use CURRENT_OSB.
12737         (find_expr_with_wfl): Return NULL if node found doesn't meet the
12738         conditions.
12739         (register_fields): Fixed typos in comment.
12740         (check_method_redefinition): Fixed comment indentation.
12741         (java_check_regular_methods): Set saved found wfl to NULL after
12742         having reinstalled it in the previously found DECL_NAME.
12743
12744 1999-01-10  Richard Henderson  <rth@cygnus.com>
12745
12746         * gjavah.c (java_float_finite): Use a union to do type punning.
12747         (java_double_finite): Likewise.
12748
12749 1999-01-09  Per Bothner  <bothner@cygnus.com>
12750
12751         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
12752         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
12753         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
12754         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
12755         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
12756         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
12757
12758 1999-01-08  Per Bothner  <bothner@cygnus.com>
12759
12760         * check-init.c (check_init):  If compiling to native, we don't
12761         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
12762
12763 1999-01-08  Tom Tromey  <tromey@cygnus.com>
12764
12765         * parse-scan.y (variable_declarator_id): Set or increment
12766         bracket_count.
12767         (bracket_count): New global.
12768         (formal_parameter): Handle case where bracket pairs trail variable
12769         declarator id.
12770
12771 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
12772
12773         * jcf-parse.c (yyparse): variable len changed from a char to an
12774         int to prevent overflow.
12775
12776 1999-01-06  Per Bothner  <bothner@cygnus.com>
12777
12778         * java-tree.h:  Declare read_class.
12779         * jcf-parse.c (read_class):  New function.
12780         (load_class):  Now just call read_class.
12781
12782         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
12783         * jcf-parse.c (parse_source_file):  Declare save_error_count,
12784         which is needed by java_parse_abort_on_error macro,
12785         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
12786
12787         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
12788         constructor, if initializing a static field.
12789         (patch_new_array_init):  Set TREE_CONSTANT if it is.
12790         * expr.c (java_lang_expand_expr):  For a static array constructor
12791         of primitive elements, allocate the array itself statically.
12792         Disabled until we can set the vtable field statically.
12793
12794         * check-init.c:  New file.  Checks for definite assignment.
12795         * Makefile.in (JAVA_OBJS):  Add check-init.o.
12796         * parse.y (java_complete_expand_method): Call check_for_initialization.
12797         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
12798
12799 1999-01-06  Graham <grahams@rcp.co.uk>
12800
12801         * parse.y : include system.h instead of including
12802         standard headers directly with the exception of <dirent.h>.
12803
12804 1999-01-06  Per Bothner  <bothner@cygnus.com>
12805
12806         * lex.h:  Moved static function declarations to lex.c,
12807         to shut up some -Wall warnings.
12808         * lex.c:  Static function declarations moved here.
12809         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
12810
12811 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12812
12813         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
12814
12815 1998-12-22  Per Bothner  <bothner@cygnus.com>
12816
12817         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
12818         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
12819
12820         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
12821         (localvar_alloc):  Change return type to void,
12822         (emit_unop):  Remove unused variable size.
12823
12824         * jcf-write.c (struct jcf_block):  Add new union.
12825         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
12826         (call_cleanups):  New functions.
12827         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
12828         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
12829         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
12830         * lang.c (lang_init):  Call using_eh_for_cleanups.
12831         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
12832         completing operands to patch_synchronized_statement.
12833         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
12834         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
12835         WITH_CLEANUP_EXPR instead of TRY_EXPR.
12836
12837 1998-12-20  John F. Carr  <jfc@mit.edu>
12838
12839         * Make-lang.in: Comment out control-Ls; they upset some makes.
12840
12841 1998-12-18  Tom Tromey  <tromey@cygnus.com>
12842
12843         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
12844         consistently.
12845
12846 1998-12-17  Tom Tromey  <tromey@cygnus.com>
12847
12848         * parse.y (DIR_SEPARATOR): New define.
12849         (check_class_interface_creation): Use it.
12850
12851         * parse-scan.y (report_main_declaration): Recognize
12852         `java.lang.String' in argument to main.
12853
12854 1998-12-16  Per Bothner  <bothner@cygnus.com>
12855
12856         * parse.y (create_interface):  Remove bogus test.
12857
12858 1998-12-16  Per Bothner  <bothner@cygnus.com>
12859
12860         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
12861         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
12862
12863 1998-12-16  Tom Tromey  <tromey@cygnus.com>
12864
12865         * parse-scan.y (qualified_name): Use correct sprintf format.
12866
12867 1998-12-15  Tom Tromey  <tromey@cygnus.com>
12868
12869         * gjavah.c (print_field_info): Changed how most negative number is
12870         printed.
12871
12872 1998-12-14  Per Bothner  <bothner@cygnus.com>
12873
12874         * parse.y (fold_constant_for_init):  New function.
12875         (resolve_expression_name):  Don't replace static final
12876         constant-initialized fields by its value.
12877         (java_complete_lhs):  New.  Same as java_complete_tree, except does
12878         not replace static final constant-initialized fields by their values.
12879         (register_fields):  If there is an initializer, set DECL_INITIAL and
12880         MODIFY_EXPR_FROM_INITIALIZATION_P.
12881         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
12882         Only call patch_initialized_static_field if
12883         MODIFY_EXPR_FROM_INITIALIZATION_P.
12884         (patch_initialized_static_field):  If not valid constant, clear
12885         DECL_INITIAL.
12886
12887         * parse.y (lookup_field_wrapper):  Fix thinko.
12888
12889         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
12890         set and restore global lineno.
12891
12892 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12893
12894         * gjavah.c (print_field_info): If value to print is the smallest
12895         value of its size, then print as hex to avoid later warnings from
12896         C++ compiler.
12897
12898 1998-12-14  Tom Tromey  <tromey@cygnus.com>
12899
12900         * gjavah.c (decompile_method): Decompile `return null'.
12901         (process_file): Generate `#pragma interface'.
12902         (method_declared): New global.
12903         (print_method_info): Set it.
12904         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12905         (print_method_info): Handle abstract methods.
12906
12907 1998-12-13  Per Bothner  <bothner@cygnus.com>
12908
12909         * parse.y (patch_method_invocation):  If class_decl is null
12910         (e.g. an array type), use original type.
12911
12912         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
12913         errors about uncaught exception from clone (of array, specifically).
12914
12915 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12916
12917         * gjavah.c (decompile_method): Handle all types of `return'
12918         opcode.  Decompile `return this' and `return'.
12919         (method_access): New global.
12920         (print_method_info): Set it.
12921         (decompile_method): Don't decompile a synchronized method.
12922
12923 1998-12-13  Tom Tromey  <tromey@cygnus.com>
12924
12925         * jcf-reader.c (jcf_parse_one_method): Recognize
12926         HANDLE_END_METHOD.
12927         * gjavah.c (HANDLE_END_METHOD): New macro.
12928         (HANDLE_CODE_ATTRIBUTE): New macro.
12929         (decompile_method): New function.
12930         (print_method_info): Don't print `;\n' at end of function decl.
12931         Include java-opcodes.h.
12932         (decompiled): New global.
12933
12934 1998-12-12  Per Bothner  <bothner@cygnus.com>
12935
12936         * class.c (build_class_ref):  Handle PRIMTYPE.class if
12937         flag_emit_class_files.
12938         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
12939         if flag_emit_class_files.
12940         * parse.y (java_complete_tree):  Pre-liminary support for
12941         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12942
12943         * parse.y (patch_synchronized_statement):   Don't call monitorexit
12944         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
12945
12946         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
12947
12948         * zipfile.h (opendir_in_zip):  New declaration.
12949         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
12950         (opendir_in_zip):  New function, using code from open_in_zip.
12951         (open_in_zip):  Call opendir_in_zip.
12952         (find_class):  Remove no-longer-used do_class_file parameter,
12953         but add source_ok parameter.  Change logic so if we find a .java file,
12954         we don't look for .class in later classpath emtries.
12955         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
12956         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
12957         * gjavah.c: Update call to find_class.
12958         * jcf-dump.c:  Likewise.
12959
12960         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
12961         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
12962         nothing if body is empty_stmt_node.
12963         Various little fixes so SP gets correctly adjusted.
12964         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12965         For CALL_EXPR, test if static first.
12966         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
12967         such as the ones we create for Object and Class.
12968         Set and restore current_function_decl.
12969         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12970         (note_possible_classname):  New function.
12971         (read_import_entry):  Removed.  Merged with read_import_dir.
12972         (read_import_dir):  Don't call find_class - that only gives us
12973         the first classpath entry having the needed package.
12974         Use the struct buffer data structure from buffer.h.
12975         (read_import_dir, find_in_imports_on_demand):  The remembered
12976         class names now use '.' (not '/') as package separator.
12977
12978         * parse.y (java_complete_expand_methods):  Call write_classfile
12979         here, and not in java_expand_classes (which only gets first class).
12980
12981 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12982
12983         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
12984         (register_fields):  If a static fields has an initializer, just
12985         chain it on ctxp->static_initialized, and handle later.
12986         (java_complete_expand_methods):  Force <clinit> first.
12987         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
12988         - it's already been completed.
12989         (patch_initialized_static_field):  New function.
12990         (java_complete_field):  Call it.
12991
12992 1998-12-12  Per Bothner  <bothner@cygnus.com>
12993
12994         * expr.c (encode_newarray_type, build_new_array):  New functions.
12995         * java-tree.h:  Declare build_new_array.
12996         * jcf-write.c (patch_newarray):  Use build_new_array.
12997
12998         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
12999         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
13000
13001         * parse.y (patch_new_array_init):  Re-organize.
13002         Now is passed the actual array (pointer) type of the value.
13003         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
13004         (patch_array_constructor):  Removed - merged into patch_new_array_init.
13005         (java_complete_tree):  Update patch_new_array_init.
13006
13007         * jcf-write.c (find_constant_index):  New function.
13008         (generate_bytecode_insns):  Use find_constant_index.
13009         (generate_classfile):  Use find_constant_index for ConstantValue.
13010
13011 1998-12-11  Tom Tromey  <tromey@cygnus.com>
13012
13013         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
13014         * decl.c (init_decl_processing): Renamed dtable -> vtable.
13015         * class.c (make_class_data): Renamed dtable -> vtable, and
13016         dtable_method_count -> vtable_method_count.
13017
13018 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13019
13020         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
13021         global variables, initialized.
13022         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
13023         Declared new global variables.
13024         * lex.c (java_lex): Return long_zero_node, float_zero_node,
13025         double_zero_node, integer_zero_node upon direct matching.
13026         * parse.y (purify_type_name): Added function prototype.
13027         (duplicate_declaration_error_p): Consider new_type as potentially
13028         being a incomplete type. Use purify_type_name on type string.
13029         (method_header): saved_type: unused variable removed. Don't figure
13030         return type if method name is invalid.
13031         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
13032         processed by patch_unaryop.
13033         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
13034         increment/decrement node into its original type after binary
13035         numeric promotion on its operands.
13036
13037 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13038
13039         * parse.y (array_initializer:): Array init operand is NULL_TREE
13040         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
13041         now an error. Fixed indentation problems.
13042         (patch_string): Handle error_mark_node as an argument.
13043         (patch_new_array_init): Fixed indentation problems.
13044         (array_constructor_check_entry): Removed check on null wfl_value.
13045         Return an error if wfl_value's walk returns an error.
13046
13047 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13048
13049         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
13050         * lex.c (java_lex): Remember column position before advancing one
13051         token. Retain location information on OCB_TK.
13052         * lex.h (typedef struct java_lc): Added new field.
13053         * parse.h (GET_SKIP_TYPE): New macro.
13054         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
13055         * parse.y (build_new_array_init, patch_new_array_init,
13056         patch_array_constructor, maybe_build_array_element_wfl,
13057         array_constructor_check_entry): New function prototypes.
13058         (switch_block:): Tagged <node>.
13059         (OCB_TK): Tagged <operator>.
13060         (array_initializer:): Installed actions.
13061         (variable_initializer): Build location information on element if
13062         necessary.
13063         (switch_statement:): Fixed indentation typo.
13064         (switch_block:): Redefined default action.
13065         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
13066         (patch_assignment): Removed duplicate code.
13067         (maybe_build_array_element_wfl, build_new_array_init,
13068         patch_new_array_init, patch_array_constructor,
13069         array_constructor_check_entry): New functions.
13070
13071 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13072
13073         * parse.y (array_initializer): Tagged <node>.
13074         (variable_initializer:): Use default rule.
13075         (array_initializer:): Defined actions.
13076         (variable_initializers:): Likewise.
13077         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
13078         non-static field accesses.
13079         (patch_invoke): Fixed indentation typo.
13080         (java_complete_tree): Likewise.
13081         (build_labeled_block): Changed leading comment. Generate an error
13082         in case of duplicate loop labels.
13083         (patch_conditional_expr): Patch results of string concatenation
13084         operations.
13085
13086 1998-12-06  Per Bothner  <bothner@cygnus.com>
13087
13088         * constants.c (find_methodref_index):  When the class is an interface,
13089         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
13090
13091         * decl.c (finit_identifier_node):  Use "$finit$", rather than
13092         "<finit>" (which Sun's verifier rejects).
13093         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
13094         (generate_field_initialization_code):  Removed.
13095         (fix_constructors)  Don't add call to $finit$ here (wrong order).
13096         (patch_method_invocation):  Add $finit$ call here.
13097
13098         * java-tree.h (CALL_USING_SUPER):  New macro.
13099         * parse.y (patch_invoke):  Remove im local variable.
13100         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
13101         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
13102         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
13103
13104         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
13105
13106         * parse.y (java_complete_tree):  Don't complain about unreachable
13107         statement if it is empty_stmt_node.
13108
13109         * jcf-write.c (find_constant_wide):  New function.
13110         (push_long_const):  Use find_constant_wide.
13111
13112         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
13113         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
13114         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
13115         Emit invokeinterface when calling an interface method.
13116         Emit invokespecial also when calling super or private methods.
13117
13118         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
13119
13120 1998-12-06  Per Bothner  <bothner@cygnus.com>
13121
13122         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
13123
13124 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13125
13126         * java-tree.h (java_layout_seen_class_methods): New function
13127         prototype.
13128         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
13129         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
13130         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
13131         * parse.y (method_declarator:): Defined action.
13132         (issue_warning_error_from_context): input_filename saved, set to
13133         the appropriate value and restored after java_error is called.
13134         (build_unresolved_array_type): Fixed comment.
13135         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
13136         (method_header): Deal with return type the same way type are
13137         handled for fields and method's parameters and local variables
13138         types are handled.
13139         (check_method_redefinition): Removed extra CR.
13140         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
13141         (java_layout_seen_class_methods): New function.
13142         (java_layout_classes): Call java_layout_seen_class_methods.
13143
13144 1998-12-03  Per Bothner  <bothner@cygnus.com>
13145
13146         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
13147
13148 1998-12-03  Per Bothner  <bothner@cygnus.com>
13149
13150         * jcf-dump.c (main):  Fix error message.
13151         * jcf-path.c (add_entry):  Style fix.
13152
13153 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13154
13155         * class.c (layout_class_method): Call build_java_argument_signature
13156         on constructors too.
13157         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
13158         (patch_method_invocation): Define a primary when resolving an
13159         expression name. Augmented comment on code checking illegal `this'
13160         usage. Loosened it test by accepting NEW_CLASS_EXPR.
13161
13162 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13163
13164         * class.c (layout_class_method): Don't report error on non-static
13165         overriding static if the method is private.
13166         * java-tree.h (finish_class): Prototype added.
13167         * lex.c (java_get_line_col): Handle col argument -2 value.
13168         * parse.h: All static method declarations moved to parse.y.
13169         * parse.y: Now contains all static method declarations previously
13170         found in parse.h.
13171         (find_expr_with_wfl, missing_return_error,
13172         unreachable_stmt_error): New functions.
13173         (java_get_real_method_name): Identify constructors bearing class
13174         names in source code compiled classes only.
13175         (java_complete_expand_methods): Call missing_return_error.
13176         (invocation_mode): Private methods invoked as static methods.
13177         (java_complete_tree): Call unreachable_stmt_error.
13178
13179 1998-12-01  Tom Tromey  <tromey@cygnus.com>
13180
13181         * Makefile.in (+target): Removed.
13182         (+xmake_file): Likewise.
13183         (+tmake_file): Likewise.
13184         (.NOEXPORT): Removed duplicate.
13185
13186 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13187
13188         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
13189
13190         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
13191
13192         * jvgenmain.c: Remove the xmalloc prototype, we get it from
13193         libiberty.h.  Provide an xmalloc definition.
13194
13195         * jvspec.c: Remove the xmalloc prototype.
13196
13197         * parse-scan.y: Include config.h and system.h.  Don't include
13198         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
13199         Provide an xstrdup definition.
13200
13201 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
13202
13203         * jcf-path.c (add_entry): Recognize ".jar" too.
13204         * lang-specs.h: Likewise.
13205
13206 1998-11-26  Per Bothner  <bothner@cygnus.com>
13207
13208         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
13209         soft_monitorenter_node, soft_monitorexit_node, throw_node.
13210
13211         * jcf-write.c (generate_bytecode_insns):
13212         Handle pre/post-increment/decrement of long.
13213
13214         * jcf-write.c (generate_bytecode_insns):
13215         Handle missing exception handler (finally for synchronized).
13216
13217 1998-11-25  Per Bothner  <bothner@cygnus.com>
13218
13219         * java-tree.h (end_params_node):  Declare global.
13220         * decl.c (end_params_node):  New global.
13221         (init_decl_processing, start_java_method):  Use end_params_node for
13222         end of list of parameter types.  Follows correct gcc conventions.
13223         * expr.c (pop_argument_types, pop_arguments):  Likewise.
13224         * lang.c (put_decl_node):  Likewise.
13225         * typeck.c (various places):  Likewise.
13226         * class.y (various places):  Likewise.
13227         * parse.y (various places):  Likewise.
13228
13229         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
13230         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
13231
13232         * class.c:  Add #include flags.h, remove no-longer needed declaration.
13233
13234         * class.c (layout_class_method):  Remove commented-out code, re-format.
13235         Don't add vtable entry (or index) for private methods.
13236         * expr.c (expand_invoke):  A private method is implicitly final.
13237         * class.c (make_class_data):  If inlining or optimizing,
13238         skip private methods.
13239
13240         * class.c (finish_class):  New function.  Calls existing methods,
13241         but alls emits deferred inline functions.
13242         * jcf-parse.c (parse_class_file):  Call finish_class.
13243         * parse.y (java_complete_expand_methods):  Likewise.
13244
13245         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
13246
13247         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
13248
13249 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
13250
13251         * jcf-write.c (generate_bytecode_conditional): Fix typo.
13252
13253 1998-11-24  Per Bothner  <bothner@cygnus.com>
13254
13255         * (generate_classfile): Always write class access flag with
13256         ACC_SUPER set.
13257
13258 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13259
13260         * class.c (maybe_layout_super_class): New function.
13261         (layout_class): Reorganized. Loop on class methods dispatched into
13262         a new function. Call maybe_layout_super_class.
13263         (layout_class_methods, layout_class_method): New functions.
13264         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
13265         class.
13266         (expand_invoke): Likewise.
13267         * java-tree.h (all_class_list): New global variable declared.
13268         (layout_class_methods, layout_class_method): New function
13269         prototypes.
13270         (LAYOUT_SEEN_CLASS_METHODS): New macro.
13271         * jcf-parse.c (all_class_list): New global variable.
13272         (load_class): Extended what class_or_name can be. Use parser
13273         context mechanism to save globals before calling jcf_parse.
13274         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
13275         is set on the file name.
13276         (jcf_parse): Layout class methods when Object is loaded, otherwise
13277         record class in all_class_list for delayed method layout.
13278         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
13279         * lang.c (put_decl_node): Decode <init> into the decl context
13280         class name.
13281         * lex.c (java_allocate_new_line): Use xmalloc.
13282         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
13283         pointers, not TREE_LIST elements.
13284         (struct parser_ctxt): Fixed comment indentations, added comments
13285         and reordered some fields.
13286         (java_check_methods): Function prototype removed.
13287         * parse.y (java_push_parser_context): Use xmalloc.
13288         (java_parser_context_restore_global): Pop extra pushed ctxp only
13289         when there's nothing next.
13290         (maybe_create_class_interface_decl): Fixed comment, add new
13291         created class decl to all_class_list.
13292         (method_header): Use GET_REAL_TYPE on argument's types.
13293         (method_declarator): Use GET_REAL_TYPE, change type to the real
13294         type in TREE_LIST dependency node. Build argument list with the
13295         real type.
13296         (create_jdep_list): Use xmalloc. Removed allocation error message.
13297         (obtain_incomplete_type): Fixed leading comment. Broadened
13298         incoming argument meaning.
13299         (register_incomplete_type): Use xmalloc. Removed allocation error
13300         message.
13301         (safe_layout_class): Fixed leading comment.
13302         (jdep_resolve_class): Reversed if statement condition and switch
13303         if and else bodies.
13304         (resolve_and_layout): Fixed leading comment. Broadened incoming
13305         argument meaning.
13306         (complete_class_report_errors): New local variable name, for
13307         clarity. purify_type_name used for all error cases.
13308         (java_get_real_method_name): Stricter check on constructors.
13309         (java_check_regular_methods): Reverse methods list only if not
13310         already laid out. Layout artificial constructor.
13311         (java_check_methods): Deleted.
13312         (source_start_java_method): Obtain incomplete type for patchable
13313         method arguments.
13314         (java_layout_classes): Fixed leading comment. Use
13315         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
13316         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
13317         before returning. Fixed comments.
13318         (java_expand_classes): Check for errors up front.
13319         (patch_method_invocation): Class to search is resolved and laid
13320         out.
13321
13322 1998-11-24  Per Bothner  <bothner@cygnus.com>
13323
13324         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
13325
13326         * javaop.h (int8):  Removed - not used.
13327         (jbyte):  Redefine portably with correct signedness.
13328
13329         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
13330
13331         * jcf-write.c (generate_bytecode_insns):  Fix typo
13332         OPCODE_getstatic to OPCODE_getfield.
13333
13334         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
13335         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
13336         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
13337
13338 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13339
13340         * jcf-parse.c (jcf_parse_source): Function returned type is
13341         void. Added prototype.
13342         (jcf_parse): Function returned type is void.
13343         (yyparse): Remove call to fclose on the last parsed file.
13344
13345         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
13346
13347 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13348
13349         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
13350         (layout_class): Cope with methods featuring WFL in decl names.
13351         * decl.c (unqualified_object_id_node): New global variable,
13352         initialized.
13353         (build_decl_no_layout): Removed.
13354         * expr.c (build_primtype_type_ref): Handle Double.
13355         (java_lang_expand_expr): Fixed indentations.
13356         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
13357         (flag_wall, flag_redundant, flag_not_overriding,
13358         flag_static_local_jdk1_1, unqualified_object_id_node): Global
13359         variable declarations.
13360         (build_decl_no_layout): Removed prototype.
13361         (java_get_real_method_name): Added prototype.
13362         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
13363         (java_parse_abort_on_error): Macro now just returns.
13364         * jcf-parse.c (jcf_parse_source): Check fclose returned
13365         value. Call emit_register_classes if java_report_errors returns
13366         zero.
13367         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
13368         flag_static_local_jdk1_1): New integer flags.
13369         (lang_decode_option): New flags set here.
13370         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
13371         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
13372         the flag_redundant variable.
13373         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
13374         when parsing java.lang.Object class.
13375         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
13376         NULL_TREE to build.
13377         (resolve_qualified_expression_name): Fixed indentation.
13378         (patch_array_ref): Changed prototype.
13379         (not_initialized_as_it_should_p): Prototype removed.
13380         (java_report_errors): Added function prototype.
13381         * parse.y (formal_parameter:): Changed error message for not yet
13382         supported final parameters.
13383         (class_type_list:): Set both PURPOSE and VALUE of created
13384         TREE_LIST to be class_type.
13385         (primary_no_new_array:): Handle class literals on primitive types.
13386         (parse_warning_context): Reinstalled correct force_error and
13387         do_warning flags setups.
13388         (java_report_errors): Changed prototype. Return java_error_count
13389         value.
13390         (variable_redefinition_error): Consider treating variable type as
13391         a fake pointer.
13392         (create_interface): Warn about redundant abstract modifier if
13393         flag_redundant is set. Changed error message.
13394         (lookup_field_wrapper): Save/restore globals before/after looking
13395         up field.
13396         (duplicate_declaration_error_p): Consider treating declaration
13397         type as a fake pointer.
13398         (register_fields): Extract real type from dependency node. Check
13399         for duplicate field declaration after type adjustment. Use
13400         DECL_INITIAL to store static final initialized values.
13401         (method_header): Extract real function type from dependency node.
13402         (check_abstract_method_header): Use GET_METHOD_NAME.
13403         (obtain_incomplete_type): Layout fake pointer type.
13404         (safe_layout_class): Don't try to check for methods before layout.
13405         (java_complete_class): Don't check for correct throws clause
13406         elements inheritance here.
13407         (resolve_and_layout): Broadened name parameter meaning.
13408         (reset_method_name): Use GET_METHOD_NAME.
13409         (java_get_real_method_name): New function.
13410         (java_check_regular_methods): Don't check methods in
13411         java.lang.Object.  Verify lineage of throws clause elements. Use
13412         flag_no_overriding in warning report.
13413         (check_throws_clauses): Don't check if class was from
13414         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
13415         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
13416         (declare_local_variables): Use flag_static_local_jdk1_1 to report
13417         warning on unsupported final local variables. Use build_decl
13418         instead of build_decl_no_layout. Get real local variable type from
13419         dependency node.
13420         (source_start_java_method): Get real parameter type from
13421         dependency node. Call build_decl instead of build_decl_no_layout.
13422         (java_layout_classes): Reverse tree and layout type and class as
13423         required. Mark class as loaded when done.
13424         (resolve_field_access): Fixed indentation. Restricted condition
13425         leading to static field access code generation. Set field_type
13426         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
13427         (resolve_qualified_expression_name): Initialize type_found to
13428         null. Handle static field resolved during qualification. Fixed
13429         layout on non primitive field decl types.
13430         (not_accessible_p): Fixed typo in comment.
13431         (patch_method_invocation): Resolve and layout class to search from
13432         type.
13433         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
13434         layout non primitive type, if necessary. Make method node only to
13435         report errors.
13436         (find_applicable_accessible_methods_list): Consider WFL'ed method
13437         decl names. Fixed indentation.
13438         (argument_types_convertible): Resolve and layout target type if
13439         necessary.
13440         (java_complete_tree): Fixed indentation problems. Rewrote
13441         CALL_EXPR thrown exceptions check. Re-installed further processing
13442         of the assignment in certain cases.
13443         (patch_assignment): Call maybe_build_primttype_type_ref to perform
13444         inlining on class literals.
13445         (valid_builtin_assignconv_identity_widening_p): Cope with constant
13446         0 literal.
13447         (valid_method_invocation_conversion_p): Likewise.
13448         (patch_string): Temporary disable forbidden use of `this' in
13449         explicit constructor invocations when doing string concatenation
13450         within their scope.
13451         (patch_unaryop): Added comment. Reinstalled code to disable
13452         further check on assignment operation with cast expression RHS.
13453         (patch_switch_statement): Fixed indentation.
13454         (build_try_statement): Call build_decl instead of
13455         build_decl_no_layout.
13456         (patch_synchronized_statement): Likewise.
13457         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
13458         IS_UNCHECKED_EXPRESSION_P.
13459         (check_thrown_exceptions_do): Changed leading comment. Resolve and
13460         layout argument exception type.
13461         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
13462         of IS_UNCHECKED_EXPRESSION_P.
13463
13464 1998-11-18  Anthony Green  <green@cygnus.com>
13465
13466         * jcf-parse.c (yyparse): Open class file in binary mode.
13467
13468 1998-11-15  Per Bothner  <bothner@cygnus.com>
13469
13470         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
13471
13472         * jcf-write.c (perform_relocations):  Move check out one loop.
13473
13474 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
13475
13476         * Make-lang.in: Fix reference to srcdir.
13477         * jv-scan.c: Add missing xmalloc prototype.
13478         * jvgenmain.c: Ditto.
13479
13480 1998-11-15  Per Bothner  <bothner@cygnus.com>
13481
13482         * decl.c (error_mark_node), java-tree.h:  New global.
13483         * parse.y:  Use empty_stmt_node instead of size_zero_node.
13484         (build_if_else_statement):  If missing else, use empty_stmt_node.
13485
13486         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
13487         (java_complete_expand_method):  Complain if return is missing.
13488         (java_check_regular_methods):  Comment out incorrect error check.
13489         (not_accessible_p):  Fix incorrect handling of protected methods.
13490         (patch_method_invocation):  Pass correct context to not_accessible_p.
13491         (find_applicable_accessible_methods_list):  Likewise.
13492         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
13493         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
13494         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
13495         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
13496
13497         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
13498         (push_int_const):  Remove reundant NOTE_PUSH.
13499         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
13500         (- case SWITCH_EXPR):  Fix code generation bug.
13501         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
13502         (generate_classfile):  More robust for abstract methods.
13503
13504 1998-11-15  Anthony Green  <green@cygnus.com>
13505
13506         * Makefile.in: jv-scan and jvgenmain all require libiberty.
13507         * Make-lang.in: Ditto.
13508
13509         * jv-scan.c: Remove xmalloc and xstrdup definitions.
13510         * jvgenmain: Ditto.
13511
13512 1998-11-15  Per Bothner  <bothner@cygnus.com>
13513
13514         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
13515
13516         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
13517
13518 1998-11-14  Per Bothner  <bothner@cygnus.com>
13519
13520         Allow uses of interface types to verify.  This is not really
13521         type-safe, but it matches what Sun does, and is OK as long as
13522         there are appropriate run-time checks.
13523         * verify.c (merge_types):  If merging two interface types,
13524         just set the result to java.lang.Object.
13525         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
13526
13527 1998-11-13  Tom Tromey  <tromey@cygnus.com>
13528
13529         * gjavah.c (main): Handle --output-class-directory argument.
13530         * jvspec.c (lang_specific_driver): Translate `-d' into
13531         -foutput-class-dir.
13532         * jcf.h (jcf_write_base_directory): Declare.
13533         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
13534         * lang-options.h: Mention -foutput-class-dir.
13535         * jcf-write.c (jcf_write_base_directory): New global.
13536         (make_class_file_name): Put generated .class file into `-d'
13537         directory, or into source directory if -d not given.  Function now
13538         static.
13539         (write_classfile): Free class file name.  Handle case where class
13540         file name is NULL.
13541         (DIR_SEPARATOR): New macro.
13542         Include <sys/stat.h>
13543
13544         * Makefile.in (prefix): New macro.
13545
13546 1998-11-12  Per Bothner  <bothner@cygnus.com>
13547
13548         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
13549         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
13550         here (done in patch_invoke instead).
13551         (case_identity):  Moved here from parse.y.
13552
13553         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
13554         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
13555         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
13556         so they can be efficiently scanned without recursion.
13557         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
13558         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
13559         in BLOCK iteratively, rather than recursively.
13560
13561         * parse.y (do_unary_numeric_promotion):  New function.
13562         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
13563
13564         * parse.y (patch_newarray):  Various fixes.
13565
13566         Re-do handling of switch statements (for proper block scoping).
13567         * parse.y:  Add just a single block for the enture switch block,
13568         but don't create any "case blocks".
13569         (group_of_labels):  Rmeoved unneeded non-terminal.
13570         CASE_EXPR and DEFAULT_EXPR are added to current block.
13571         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
13572         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
13573         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
13574         * parse.y (wfl_operator, print_int_node): Make non-static.
13575         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
13576         as part of recursive scan of block.
13577         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
13578         (patch_switch_statement):  Most tests move dinto java_complete_tree.
13579
13580         * parse.y:  Make various production be non-typed (void).
13581         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
13582         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
13583         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
13584
13585         * jcf-write.c (struct jcf_handler):  New type.
13586         (struct jcf_switch_state):  New type.
13587         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
13588         (alloc_handler, emit_unop, emit_reloc):  New functions.
13589         (adjust_typed_op):  Add extra parameter ("max type" offset).
13590         (emit_switch_reloc, emit_case-reloc):  New function.
13591         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
13592         (generate_bytecode_insns):  Support REAL_CST, switch statements,
13593         exception handling, method calls, object/array creation, and more.
13594
13595         * class.c:  Remove some unused variables.
13596         * constants.c (find_string_constant):  New function.
13597         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
13598         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
13599         if flag_emit_class_files.
13600
13601 1998-11-12  Tom Tromey  <tromey@cygnus.com>
13602
13603         * jcf-io.c (find_class): Added explanatory comment.
13604
13605         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
13606         trailing slash to `.zip' entries.
13607
13608         * jvspec.c (lang_specific_driver): Correctly handle case where
13609         GC_NAME not defined.
13610
13611 1998-11-11  Tom Tromey  <tromey@cygnus.com>
13612
13613         * jvspec.c (GC_NAME): New define.
13614         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
13615         if required.
13616         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
13617
13618 1998-11-11  Per Bothner  <bothner@cygnus.com>
13619
13620         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
13621
13622 1998-11-11  Tom Tromey  <tromey@cygnus.com>
13623
13624         * jcf-dump.c (main): Correctly recognize `--'-style long options.
13625
13626 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13627
13628         * class.c (is_compiled_class): Call safe_layout_class for class
13629         compiled from source.
13630         * conver.h (convert_to_integer, convert_to_real,
13631         convert_to_pointer): Added prototypes.
13632         * decl.c (init_decl_processing): Non longer push the decls of
13633         `methodtable', `constants', `Class', `Field', `dispatchTable'
13634         `jexception' and `Method'.
13635         * expr.c (build_invokeinterface): New function.
13636         (expand_invoke): static variable CLASS_IDENT now in
13637         build_invokeinterface. Use build_invokeinterface.
13638         (expand_java_field_op): Moved code to inline
13639         java.lang.PRIMTYPE.TYPE into a function.
13640         (build_primtype_type_ref): New function.
13641         * java-tree.def (INSTANCEOF_EXPR): New tree code.
13642         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
13643         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
13644         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
13645         (DECL_LOCAL_STATIC_VALUE): New macro.
13646         (build_invokeinterface, build_primtype_type_ref): New function
13647         prototypes.
13648         (java_parse_abort_on_error): Macro rewritten.
13649         * jcf-parse.c (current_method): Add comment to declaration.
13650         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
13651         Function prototypes fixed.
13652         (jcf_parse_source): push/pop parser context. save/restore global.
13653         (parse_source_file): Fixed leading comment. Now take a
13654         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
13655         classes and pop the parser context anymore.
13656         (yyparse): Push parser context, save globals, parse the source
13657         file, restore globals and pop the parser context when processing a
13658         source file.
13659         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
13660         * lex.c (java_parse_doc_section): New function.
13661         (java_lex): Call java_parse_doc_section when appropriate. Build an
13662         operator around INSTANCEOF_TK.
13663         * lex.h (java_lineterminator, java_sprint_unicode,
13664         java_unicode_2_utf8, java_lex_error, java_store_unicode):
13665         Prototypes rewritten.
13666         (java_parse_escape_sequence, java_letter_or_digit_p,
13667         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
13668         java_read_unicode, java_store_unicode, java_read_char,
13669         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
13670         Added function prototypes.
13671         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
13672         define.
13673         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
13674         New macros
13675         (struct parser_ctxt): New fields: deprecated,
13676         current_parsed_class_un, gclass_list.
13677         (fix_method_argument_names, issue_warning_error_from_context,
13678         resolve_package, lookup_package_type): New function prototypes.
13679         (resolve_expression_name): Fixed function prototype.
13680         (find_applicable_accessible_methods_list): Fixed indentation, added
13681         extra argument in prototype.
13682         (check_final_assignment, build_null_of_type, check_deprecation,
13683         check_method_redefinition, reset_method_name,
13684         java_check_regular_methods, java_check_abstract_methods,
13685         maybe_build_primttype_type_ref): New function prototype.
13686         * parse.y (conver.h): Include.
13687         (INSTANCEOF_TK): Tagged <operator>.
13688         (single_type_import_declaration): Use REGISTER_IMPORT macro.
13689         (relational_expression:): Build binop for instanceof.
13690         (java_push_parser_context): Remember ctxp->gclass_list across
13691         contexts.
13692         (java_pop_parser_context): Simply return if no context
13693         exists. Remember gclass_list across contexts.
13694         (issue_warning_error_from_context): New function.
13695         (parse_error_context): Don't setup ctxp->elc here. Call
13696         issue_warning_error_from_context instead.
13697         (parse_warning_context): Likewise.
13698         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
13699         setup. Link new class/interface to ctxp->gclass_list.
13700         (add_superinterfaces): Register interface as incomplete if not
13701         loaded.
13702         (create_class): Remember class unqualified name in
13703         ctxp->current_parsed_class_un. Check class deprecation.
13704         (register_fields): Check field deprecation. Remember static final
13705         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
13706         processing INIT.
13707         (method_header): New local variable ORIG_ARG. Use unqualified
13708         current class name for check on constructor errors. Promote return
13709         type if of record type. Argument list fix moved in
13710         fix_method_argument_names, called here. Check method deprecation.
13711         (fix_method_argument_names): New function.
13712         (method_declarator): Promote record typed arguments.
13713         (safe_layout_class): Check class methods before layout.
13714         (java_complete_class): Compute field layout when patched.
13715         (do_resolve_class): Try to load class after having it renamed
13716         after the package name.
13717         (get_printable_method_name): Use DECL_CONTEXT.
13718         (reset_method_name): New function.
13719         (check_method_redefinition): Use reset_method_name.
13720         (java_check_regular_methods): New local variable
13721         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
13722         names for error report. Check for compile-time error when method
13723         found has default (package) access.
13724         (java_check_abstract_methods): Now takes an interface DECL node as
13725         an argument. Also reinstall real name on unchecked
13726         overriding/hiding methods for error report.
13727         (java_check_methods): Fixed leading comment. Get classes to verify
13728         from ctxp->gclass_list. Use CHECK_METHODS macro and set
13729         CLASS_METHOD_CHECKED_P on class verification.
13730         (lookup_java_method2): Get real method name if necessary.
13731         (find_in_imports): Don't check package class access here.
13732         (resolve_package, lookup_package_type): New functions.
13733         (java_layout_classes): Fixed leading comment. Take classes to be
13734         laid out from ctxp->gclass_list.
13735         (java_complete_expand_methods): Don't expand native and abstract
13736         methods.
13737         (java_expand_classes): New function.
13738         (resolve_expression_name): Use additional argument ORIG.  Retrieve
13739         values of static final field of primitive types.
13740         (resolve_field_access): Handles static final field of promotive
13741         type.
13742         (resolve_qualified_expression_name): Handle STRING_CST as
13743         primaries and package name resolution. Check deprecation on found
13744         decls. Set where_found and type_found on non static field resolved
13745         during qualification. Layout non primitive field decl types.
13746         (check_deprecation): New function.
13747         (maybe_access_field): Simplified.
13748         (patch_method_invocation_stmt): Local variable CLASS_TYPE
13749         removed. Reverse method's argument when primary is a type. Don't
13750         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
13751         instead. Include abstract class in the list of class searchable
13752         for constructors. Use DECL_CONTEXT of found method for access
13753         checks. Check method deprecation.
13754         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
13755         converting arguments. Handle INVOKE_INTERFACE.
13756         (lookup_method_invoke): Search constructor using existing
13757         infrastructure (don't rely on lookup_java_constructor anymore).
13758         (find_applicable_accessible_methods_list): Extra argument flag
13759         LC. Now include constructor in the search.
13760         (qualify_ambiguous_name): Conditional expression are primaries.
13761         (not_initialized_as_it_should_p): static final are always
13762         initialized.
13763         (java_complete_tree): Pass extra NULL argument to
13764         resolve_expression_name. Stricter test to carry on patching
13765         assignments. New case for INSTANCEOF_EXPR.
13766         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
13767         (check_final_assignment, maybe_build_primttype_type_ref): New
13768         functions.
13769         (patch_assignment): Detect resolved static finals and carry normal
13770         assignment error check on them. Inline PRIMTYPE.TYPE read access.
13771         (try_builtin_assignconv): Access constant 0 on all primitive
13772         types.
13773         (valid_builtin_assignconv_identity_widening_p): Accept identical
13774         types. Accept all promoted type on int type.
13775         (valid_ref_assignconv_cast_p): Accept a null pointer to be
13776         assigned to a reference.
13777         (valid_method_invocation_conversion_p): Accept to check null
13778         pointers.
13779         (build_binop): Merge declaration and initialization of local
13780         variable BINOP.
13781         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
13782         numeric types. Improved validity test for qualify operators on
13783         references.
13784         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
13785         and PREINCREMENT_EXPR. Also detect resolved static finals of a
13786         primitive type and issue the appropriate error message.
13787         (resolve_type_during_patch): Mark class loaded when resolved.
13788         (patch_cast): Allow null to be cased to reference types.
13789         (build_null_of_type): New function.
13790         (patch_array_ref): Handle array on references correctly.
13791         (patch_return): Removed unused local variable MODIFY. Force
13792         boolean to be returned as integers. Allows null to be returned by
13793         a function returning a reference.
13794         * typeck.c (convert_to_integer, convert_to_real,
13795         convert_to_pointer): Prototypes moved to convert.h
13796         (lookup_argument_method): Use method real name, if necessary.
13797
13798 1998-10-30  Tom Tromey  <tromey@cygnus.com>
13799
13800         * class.c (build_class_ref): Changed name of primitive classes to
13801         start with `_Jv_'.
13802
13803         * class.c (make_class_data): Renamed fields: nmethods to
13804         method_count, method_count to dtable_method_count.  Always set
13805         `state' field to 0.
13806         * decl.c (init_decl_processing): Likewise.
13807
13808 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13809
13810         * class.c (layout_class): Don't mangle <finit>, produce
13811         __finit<class> instead. Don't verify artificial methods.
13812         * decl.c (finit_identifier_node): New declared global.
13813         (init_decl_processing): finit_identifier_node initialized.
13814         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
13815         * java-tree.h (finit_identifier_node): Declared as extern.
13816         (struct lang_decl): New field called_constructor.
13817         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
13818         (CLASS_HAS_FINIT_P): New macro.
13819         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
13820         explicit constructor invocation.
13821         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
13822         CALL_SUPER_CONSTRUCTOR_P): New macros.
13823         (write_classfile): Added prototype.
13824         * jcf-parse.c (jcf_parse_source): Parse and remember for
13825         generation if the file was seen on the command line.
13826         (parse_source_file): Don't write the class file here.
13827         (yyparse): Loop on files rewritten. Set current_jcf.
13828         (parse_zip_file_entries): Parse class file only if it was found.
13829         * lang.c (init_parse): Don't open command line provided filename
13830         here.
13831         (lang_parse): Don't set main_jcf anymore.
13832         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
13833         (JCONSTRUCTOR_CHECK): New macro.
13834         (JBSC_TYPE_P): New macro.
13835         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
13836         (COMPLETE_CHECK_OP_2): New macro.
13837         (struct parse_ctxt): New field explicit_constructor_p.
13838         (check_class_interface_creation): Fixed prototype indentation.
13839         (patch_method_invocation_stmt): Prototype reflects added argument.
13840         (patch_invoke): Likewise.
13841         (complete_method_declaration, build_super_invocation,
13842         verify_constructor_circularity,
13843         build_this_super_qualified_invocation, get_printable_method_name,
13844         patch_conditional_expr, maybe_generate_finit, fix_constructors,
13845         verify_constructor_super, create_artificial_method,
13846         start_artificial_method_body, end_artificial_method_body,
13847         generate_field_initialization_code): New function prototypes.
13848         * parse.y: Fixed leading comment
13849         (constructor_header:, constructor_body:, block_end:): Rules tagged
13850         <node>.
13851         (type_declaration:): Call maybe_generate_finit.
13852         (method_declaration:): Action for method_body: placed in new
13853         function complete_method_declaration, called here.
13854         (constructor_declaration:): Defined actions. Removed leading
13855         FIXME.
13856         (constructor_header:): New rule with action.
13857         (constructor_body:): Rule rewritten using block_begin: and
13858         block_end:. Defined actions.
13859         (constructor_declarator:, explicit_constructor_invocation:):
13860         Defined actions.
13861         (block:): Use new rules block_begin: block_end:.
13862         (block_begin:, block_end:): New rules and actions.
13863         (block_statements:): Fixed error message for explicit
13864         constructors.
13865         (method_invocation:): Call build_this_super_qualified_invocation
13866         if primary is `this' or `super' was seen.
13867         (conditional_expression:): Action defined.
13868         (extra_ctxp_pushed_p): New static global flag.
13869         (java_parser_context_save_global): Create parser context if
13870         necessary. Use extra_ctxp_pushed_p to remember it.
13871         (java_parser_context_restore_global): Pop extra parser context if
13872         one exists.
13873         (build_array_from_name): Array on primitive types are marked
13874         loaded.
13875         (register_fields): Restore new name in field initializer
13876         expression if type was altered. Non static fields initialized upon
13877         declaration marked initialized.
13878         (maybe_generate_finit): New function.
13879         (maybe_generate_clinit): Use create_artificial_method,
13880         start_artificial_method_body, end_artificial_method_body. Generate
13881         debug info for enclosed initialization statements.
13882         (method_header): Fixed leading comment. Check constructor
13883         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
13884         accordingly.
13885         (complete_method_declaration, constructor_circularity_msg,
13886         verify_constructor_circularity): New functions.
13887         (get_printable_method_name): New function.
13888         (check_method_redefinition): Don't rename <finit> methods. Fix
13889         declared constructor names. Error message for
13890         constructors modified.
13891         (java_check_regular_methods): Local variable seen_constructor
13892         renamed saw_constructor. Skip verification on constructors. Create
13893         default constructor with create_artificial_method.
13894         (java_check_methods): Removed unnecessary empty line.
13895         (create_artificial_method, start_artificial_method_body,
13896         end_artificial_method_body): New functions.
13897         (java_layout_classes): Changed leading comment. Reverse fields
13898         list if necessary. Always layout java.lang.Object if being
13899         defined.
13900         (java_complete_expand_methods): Verify constructor circularity.
13901         (java_complete_expand_method): Call fix_constructor on
13902         constructors.  Local variable no_ac_found removed. Restore
13903         bindings if method body expansion failed.
13904         (fix_constructors, verify_constructor_super,
13905         generate_field_initialization_code): New function.
13906         (java_expand_classes): Fixed leading comment. Write class file
13907         here.
13908         (resolve_expression_name): Check for illegal instance variable
13909         usage within the argument scope of an explicit constructor
13910         invocation.
13911         (resolve_qualified_expression_name): Pass extra from_super flag
13912         when invoking patch_method_invocation_stmt. New case for
13913         conditional expression when used as a primary. Check for error
13914         when acquiring super.
13915         (patch_method_invocation_stmt): Added extra argument super. New
13916         local variable is_static_flag. Set class_to_search according to
13917         the nature of the constructor invocation. Don't add `this'
13918         argument when expanding NEW_CLASS_EXPR. Check for illegal method
13919         invocation within the argument scope of explicit constructor
13920         invocation. Set is_static according to is_static_flag. Provide
13921         extra `super' argument to patch_invoke invocation.
13922         (patch_invoke): New argument from_super. Loop on arguments
13923         indentation fixed. Pass from_super to invocation_mode. New switch
13924         case INVOKE_SUPER. Fixed error message in switch default case.
13925         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13926         value.
13927         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13928         (lookup_method_invoke): Fixed prototypes in candidates list. Error
13929         message takes constructors into account.
13930         (find_applicable_accessible_methods_list): Fixed indentation.
13931         (qualify_ambiguous_name): Take explicit constructor invocation
13932         into account. Deal with a conditional expression as a primary to
13933         a method call.
13934         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13935         case. Added extra argument to patch_method_invocation_stmt.
13936         Register calls made to explicit constructor `this'. Don't call
13937         save_expr in ARRAY_REF case when emitting class files. Check for
13938         illegal use of this when expanding explicit constructor invocation
13939         arguments.
13940         (complete_function_arguments): Set and reset parser context
13941         explicit_constructor_p field value when appropriate.
13942         (build_super_invocation, build_this_super_qualified_invocation):
13943         New functions.
13944         (patch_assignment): Fixed typo.
13945         (patch_unaryop): Check on final fields occurs only when a decl
13946         exits.
13947         (patch_return): Take constructors into account.
13948         (patch_conditional_expr): New function.
13949         * typeck.c (build_java_signature): Removed unnecessary empty line.
13950
13951 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13952
13953         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13954
13955 1998-10-28  Tom Tromey  <tromey@cygnus.com>
13956
13957         * decl.c (init_decl_processing): Renamed fields.
13958         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13959         interface_len, msize fields.
13960
13961         * class.c (make_class_data): Removed subclass_head and
13962         subclass_next fields.
13963         * decl.c (init_decl_processing): Removed subclass_head and
13964         subclass_next fields.
13965
13966 1998-10-28  Jeffrey A Law  (law@cygnus.com)
13967
13968         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13969         * mangle.c (emit_unicode_mangled_name): Similarly.
13970
13971 1998-10-26  Nick Clifton  <nickc@cygnus.com>
13972
13973         * jcf-parse.c (get_constant): Place braces around code to compute
13974         'd' when REAL_ARITHMETIC is not defined.
13975
13976 1998-10-25  H.J. Lu  (hjl@gnu.org)
13977
13978         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13979         dependency.
13980
13981 1998-10-23  Tom Tromey  <tromey@cygnus.com>
13982
13983         * lang-specs.h: `.zip' files are input to jc1.
13984
13985 1998-10-22  Per Bothner  <bothner@cygnus.com>
13986
13987         * jvspecs.c:  Add (but don't enable) support for combining multiple
13988         .class and .java input filenames to a single jc1 invocation.
13989         Add support for -C flag (copile to .class files).
13990         Translate -classpath and -CLASSPATH arguments.
13991         * lang-specs.h:  Don't set %2 spec.
13992
13993 1998-10-22  Tom Tromey  <tromey@cygnus.com>
13994
13995         * jcf-path.c (add_entry): Don't add trailing separator if entry is
13996         a .zip file.
13997         (add_path): Don't add trailing separator to non-empty path
13998         elements.
13999
14000         * lang.c (lang_decode_option): Check for -fclasspath and
14001         -fCLASSPATH before examining other `-f' options.
14002
14003         * java-tree.h (finalize_identifier_node): Don't declare.
14004         * class.c (make_class_data): Don't push "final" field.
14005         * decl.c (init_decl_processing): Don't push "final" field.
14006         (finalize_identifier_node): Removed.
14007         (init_decl_processing): Don't set finalize_identifier_node.
14008
14009         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
14010
14011 1998-10-11  Anthony Green  <green@cygnus.com>
14012
14013         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
14014         (JV_SCAN_SOURCES): New macro.
14015         (JCF_DUMP_SOURCES): Likewise.
14016         (jcf-dump$(exeext)): New target.
14017         (jv-scan$(exeext)): New target.
14018
14019 1998-10-22  Tom Tromey  <tromey@cygnus.com>
14020
14021         * Makefile.in (LEX): Removed.
14022         (LEXFLAGS): Likewise.
14023         (SET_BISON): New macro.
14024         (BISON): Removed.
14025         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
14026         spurious diffs in parse.c.
14027         ($(PARSE_SCAN_C)): Likewise.
14028         (PARSE_DIR): New macro.
14029         (PARSE_C): Use it.
14030         (PARSE_SCAN_C): Likewise.
14031         (PARSE_RELDIR): New macro.
14032
14033         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
14034
14035         * jcf-io.c (find_class): Use saw_java_source to determine when to
14036         look for `.java' file.
14037         * jcf-parse.c (saw_java_source): New global.
14038         (yyparse): Set it if `.java' file seen.
14039
14040         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
14041         (GCJH_SOURCES): Likewise.
14042         * Makefile.in (datadir): New macro.
14043         (libjava_zip): Likewise.
14044         (JAVA_OBJS): Added jcf-path.o.
14045         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
14046         (../gcjh$(exeext)): Likewise.
14047         (jcf-path.o): New target.
14048         * java-tree.h (fix_classpath): Removed decl.
14049         * jcf-parse.c (fix_classpath): Removed.
14050         (load_class): Don't call fix_classpath.
14051         * parse.y (read_import_dir): Don't call fix_classpath.
14052         * lex.h: Don't mention classpath.
14053         * lex.c (java_init_lex): Don't initialize classpath.
14054         * jcf-io.c (classpath): Removed global.
14055         (find_class): Use jcf_path iteration functions.  Correctly search
14056         class path for .java file.
14057         (open_in_zip): New argument `is_system'.
14058         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
14059         classpath-related options.
14060         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
14061         and -I.
14062         (lang_init): Call jcf_path_init.
14063         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
14064         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
14065         Correctly put braces around second string in each entry.
14066         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
14067         classpath-related options.
14068         (help): Updated for new options.
14069         * jcf.h: Declare functions from jcf-path.c.  Don't mention
14070         `classpath' global.
14071         * jcf-path.c: New file.
14072
14073         * jcf-depend.c: Include jcf.h.
14074
14075         * jcf-write.c (localvar_alloc): Returns `void'.
14076         (localvar_free): Removed unused variable.
14077
14078         * lang.c (OBJECT_SUFFIX): Define if not already defined.
14079         (init_parse): Use OBJECT_SUFFIX, not ".o".
14080
14081 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14082
14083         * class.c (emit_register_classes): Renamed from
14084         emit_register_class.
14085         * java-tree.h (emit_register_classes): Prototype renamed from
14086         emit_register_class.
14087         * jcf-parse.c (yyparse): Call emit_register_classes once before
14088         returning.
14089         * parse.y (java_expand_classes): No longer register classes.
14090
14091 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14092
14093         * class.c (is_compiled_class): New local variable
14094         seen_in_zip. Identify classes found in currently compiled source
14095         file(s).
14096         * decl.c (complete_start_java_method): Fixed typo.
14097         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
14098         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
14099         (CLASS_P): Moved around.
14100         (java_parse_abort_on_error): Macro moved from jcf-parse.c
14101         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
14102         java-parse.h
14103         (jcf_parse_source): Changed leading comment. Removed unnecessary
14104         fclose and CLASS_FROM_SOURCE_P marking.
14105         (parse_source_file): New local variables remember_for_generation
14106         and filename. Mark parsed file name identifier node. Removed block
14107         executed when parse_only was null. Set remember_for_generation.
14108         Use it as an argument to java_pop_parser_context.
14109         (yyparse): New local variables several_files, list, next node and
14110         current_file_list. Split ampersand separated file names into
14111         current_file_list. Iterate through the list and parse accordingly.
14112         * parse.h (java_pop_parser_context): New function prototype.
14113         * parse.y (ctxp_for_generation): New static global variable.
14114         (java_pop_parser_context): New argument generate. Link popped ctxp
14115         to ctxp_for_generation list accordingly.
14116         (java_complete_expand_methods): Fixed indentation.
14117         (java_expand_classes): New function.
14118
14119 1998-10-17  Per Bothner  <bothner@cygnus.com>
14120
14121         * Makefile.in:  Link with libiberty.a instead of memmove.o.
14122
14123 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14124
14125         * lex.c (setjmp.h): No longer included.
14126         * lex.h (setjmp.h): Included.
14127         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
14128         (duplicate_declaration_error_p): Renamed from
14129         duplicate_declaration_error.
14130         (build_array_from_name): New function prototype.
14131         * parse.y (setjmp.h): No longer included.
14132         (variable_declarator_id): Define action.
14133         (build_array_from_name): New function.
14134         (duplicate_declaration_error_p): Renamed from
14135         duplicate_declaration_error.  Fixed leading comment.
14136         (register_fields): Main `for' loop reorganized. Uses
14137         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
14138         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
14139         build_array_from_name.
14140         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
14141         types.
14142         (read_import_dir): Don't try to skip `.' and `..'.
14143         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
14144         build_array_from_name. Main `for' loop reorganized.
14145         (resolve_qualified_expression_name): When building access to a
14146         field, use the type where the field was found, not its own type.
14147         (maybe_access_field): Use field DECL_CONTEXT if the type where the
14148         field was found is null.
14149         (qualify_ambiguous_name): Sweep through all successive array
14150         dimensions.
14151
14152 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14153
14154         * java-tree.h (pop_labeled_block, lang_printable_name,
14155         maybe_add_interface, set_super_info, get_access_flags_from_decl,
14156         interface_of_p, inherits_from_p, fix_classpath,
14157         complete_start_java_method, emit_handlers, init_outgoing_cpool,
14158         make_class_data, register_class, alloc_name_constant): New
14159         function prototypes.
14160         * lang.c (lang_decode_option): Set argc argument unused. Fixed
14161         indentation. Added cast to remove warning.
14162         (lang_printable_name): Set v argument unused.
14163         (lang_print_error): Added argument to lang_printable_name call.
14164         (java_dummy_print, print_lang_decl, print_lang_type,
14165         print_lang_identifier, lang_print_xnode): All argument marked
14166         unused.
14167         * lex.c (java_unget_unicode): Removed unnecessary argument.
14168         (java_allocate_new_line): Unused local variable is gone.
14169         (java_read_char): Added parenthesis in expressions to remove
14170         warnings.  Added final return statement.
14171         (java_read_unicode): Added parenthesis in expression to remove
14172         warning.
14173         (java_parse_end_comment): Fixed java_unget_unicode invocation.
14174         (java_parse_escape_sequence): Likewise.
14175         (java_lex): Unused local variables are gone. Fixed
14176         java_unget_unicode invocation.
14177         * lex.h (set_float_handler): Prototype added when JC1_LITE not
14178         defined.
14179         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
14180         lang_printable_name invocation in macro.
14181         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
14182         Likewise.
14183         (duplicate_declaration_error): Suppressed unused argument in
14184         prototype.
14185         (identical_subpath_p): Function declaration is gone.
14186         (patch_invoke): Suppressed unused argument in prototype.
14187         (patch_cast, build_labeled_block, check_thrown_exceptions):
14188         Likewise.
14189         * parse.y (setjmp.h): Included
14190         (toplev.h): Likewise.
14191         (field_declaration:): Suppressed unused local
14192         (label_decl:): Fixed build_labeled_block invocation.
14193         (java_pop_parser_context): Put extra parenthesis around assignment
14194         in if.
14195         (yyerror): Suppressed unused local variables.
14196         (variable_redefinition_error): Fixed lang_printable_name
14197         invocation.
14198         (create_interface): Suppressed unused local variables.
14199         (create_class): Likewise.
14200         (duplicate_declaration_error): Suppressed unused argument. Fixed
14201         lang_printable_name invocation.
14202         (register_fields): Suppressed unused local variable. Fixed
14203         duplicate_declaration_error invocation.
14204         (method_header): Suppressed unused local variable.
14205         (method_declarator, parser_check_super): Likewise.
14206         (java_complete_class): Suppressed unused local variable. Fixed
14207         fatal error message.
14208         (complete_class_report_errors): Added default: in switch.
14209         (java_check_regular_methods): Fixed lang_printable_name
14210         invocations.
14211         (check_throws_clauses): Likewise.
14212         (java_check_abstract_methods): Suppressed unused local
14213         variable. Fixed lang_printable_name invocation.
14214         (read_import_entry): Added supplemental return statement.
14215         (read_import_dir): Suppressed unused local variables.
14216         (check_pkg_class_access, declare_local_variables): Likewise.
14217         (source_start_java_method): Suppressed unused extern variable
14218         declarations
14219         (expand_start_java_method): Suppressed unused extern and local
14220         variable declarations.
14221         (java_complete_expand_methods): Likewise.
14222         (java_complete_expand_method): Suppressed unused local variables.
14223         (make_qualified_name): Likewise.
14224         (resolve_qualified_expression_name): Added default: in
14225         switch. Fixed lang_printable_name invocation.
14226         (class_instance_creation_expression): Added parenthesis around
14227         expressions.
14228         (patch_method_invocation_stmt): Fixed lang_printable_name and
14229         patch_invoke invocations.
14230         (check_for_static_method_reference): Fixed lang_printable_name
14231         invocation.
14232         (patch_invoke): Suppressed unused arguments and local variables.
14233         (lookup_method_invoke): Suppressed unused local variables.
14234         (qualify_ambiguous_name): Added default: in switch.
14235         (identical_subpath_p): Function removed.
14236         (patch_assignment): Suppressed unused local variables. Suppressed
14237         unnecessary if statement. Fixed lang_printable_name invocations.
14238         (try_builtin_assignconv): Fixed lang_printable_name invocations.
14239         (valid_ref_assignconv_cast_p): Parenthesis around
14240         expression. Suppressed unused local variables.
14241         (build_binop): Suppressed unused local variables. fixed
14242         lang_printable_name invocations.
14243         (string_constant_concatenation): Suppressed unused local
14244         variables.
14245         (patch_unaryop): Fixed lang_printable_name invocation.
14246         (patch_cast): Suppressed unnecessary argument. Fixed
14247         lang_printable_name invocation.
14248         (patch_array_ref): Fixed lang_printable_name invocation.
14249         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
14250         (build_labeled_block): Suppressed unused argument.
14251         (generate_labeled_block): Fixed build_labeled_block invocation.
14252         (build_loop_body): Suppressed unused local variables.
14253         (patch_loop_statement): Likewise.
14254         (patch_exit): Fixed lang_printable_name invocation.
14255         (patch_switch_statement): Likewise.
14256         (case_identity): First argument marked unused.
14257         (patch_try_statement): Fixed lang_printable_name invocations.
14258         (patch_synchronized_statement, patch_throw_statement): Likewise.
14259         (check_thrown_exceptions): Fixed check_thrown_exceptions and
14260         lang_printable_name invocations.
14261         (check_thrown_exceptions_do): Suppressed unused argument.
14262
14263 1998-10-14  Tom Tromey  <tromey@cygnus.com>
14264
14265         * jcf-write.c (write_classfile): Add output class file as target.
14266         * lang-options.h: Added -MD, -MMD, -M, and -MM.
14267         * jcf.h: Added declarations for dependency-tracking functions.
14268         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
14269         * lang.c (lang_decode_option): Recognize -MD and -MMD.
14270         (finish_parse): Call jcf_dependency_write.
14271         (dependency_tracking): New global.
14272         (DEPEND_SET_FILE): New define.
14273         (DEPEND_ENABLE): New define.
14274         (init_parse): Enable dependency tracking if required.
14275         Include "flags.h".
14276         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
14277         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
14278         (../gcjh$(exeext)): Likewise.
14279         (jcf-depend.o): New target.
14280         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
14281         (GCJH_SOURCES): Likewise.
14282         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
14283         dep_name argument.
14284         (find_classfile): Added dep_name argument.
14285         (find_class): Compute name of dependency.
14286         (open_in_zip): Call jcf_dependency_add_file.
14287         * gjavah.c (output_file): No longer global.
14288         (usage): Don't mention "gjavah".
14289         (help): Likewise.
14290         (java_no_argument): Likewise.
14291         (version): Likewise.
14292         (main): Recognize and handle -M family of options.
14293         (print_mangled_classname): Return is void.
14294         (process_file): Handle case where output is suppressed.
14295         (HANDLE_END_FIELD): Likewise.
14296         (HANDLE_METHOD): Likewise.
14297         * jcf-depend.c: New file.
14298
14299 1998-10-13  Jeffrey A Law  (law@cygnus.com)
14300
14301         * java-tree.def: Add missing newline at EOF.
14302
14303 1998-10-13  Tom Tromey  <tromey@cygnus.com>
14304
14305         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
14306         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
14307         function.
14308         Include <config.h> and "system.h".
14309         (disassemble_method): Undefine RET to avoid clash with
14310         config/i386/i386.h.
14311
14312 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14313
14314         * decl.c (runtime_exception_type_node, error_exception_type_node):
14315         New global variables.
14316         (init_decl_processing): Initialized.
14317         * expr.c (java_lang_expand_expr): Set caught exception type to
14318         null if catch handler argument doesn't exit.
14319         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
14320         tree codes.
14321         * java-tree.h (runtime_exception_type_node,
14322         error_exception_type_node): Global variables declared.
14323         (DECL_FUNCTION_THROWS): New macro.
14324         (DECL_FUNCTION_BODY): Modified comment.
14325         (DECL_SPECIFIC_COUNT): Likewise.
14326         (struct lang_decl): New field throws_list.
14327         (IS_UNCHECKED_EXPRESSION_P): New macro.
14328         * lex.c (java_lex): Generate location information for THROW_TK.
14329         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
14330         EXCEPTIONS_P): New macros.
14331         (enum jdep_code): New value JDEP_EXCEPTION.
14332         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
14333         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
14334         PATCH_METHOD_RETURN_ERROR): New macros.
14335         (patch_method_invocation_stmt): Added new argument to prototype.
14336         (patch_synchronized_statement, patch_throw_statement,
14337         check_thrown_exceptions, check_thrown_exceptions_do,
14338         purge_unchecked_exceptions, check_throws_clauses): New function
14339         prototypes.
14340         * parse.y Fixed typo in keyword section.
14341         (throw:): Rule tagged <node>.
14342         (THROW_TK): Keyword tagged <operator>.
14343         (method_header:): Last argument to call to method_header passed
14344         from throws: rule.
14345         (throws:, class_type_list:, throw_statement:,
14346         synchronized_statement:, synchronized:): Defined actions.
14347         (method_header): New local variable current. Register exceptions
14348         from throws clause.
14349         (java_complete_tree): Complete and verify exceptions from throws
14350         clause.
14351         (complete_class_report_errors): Error message on exceptions not
14352         found
14353         (java_check_regular_methods): Fixed typo. Shortcut on private
14354         overriding methods. Changed error message on method
14355         redefinition. Check for throws clause compatibility.
14356         (check_throws_clauses): New function.
14357         (java_check_abstract_methods): Use DECL_NAME for wfl or current
14358         method. Changed error message on method redefinition.
14359         (currently_caught_type_list): New static variable.
14360         (java_complete_expand_methods): Purge unchecked exceptions from
14361         throws clause list. Call PUSH_EXCEPTIONS before walk and
14362         POP_EXCEPTIONS after.
14363         (resolve_qualified_expression_name): Pass new argument as NULL to
14364         patch_method_invocation_stmt.
14365         (patch_method_invocation_stmt): New argument ref_decl. Invoke
14366         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
14367         argument list when appropriate. Use new argument if non null to
14368         store selected method decl.
14369         (patch_invoke): Convert if necessary args of builtin types before
14370         forming CALL_EXPR. Argument list no longer reversed here.
14371         (invocation_mode): Treat final methods as static methods.
14372         (java_complete_tree): New cases for THROW_EXPR: and
14373         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
14374         function call.
14375         (complete_function_arguments): No more RECORD_TYPE
14376         conversion. Function parameter nodes no longer saved.
14377         (valid_ref_assignconv_cast_p): Avoid handling null type.
14378         (patch_binop): Fixed null constant reference handling.
14379         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
14380         BUILD_THROW macros.
14381         (patch_try_statement): Fixed comments. Record caught types in
14382         list, push the list, expand try block and pop the list.
14383         (patch_synchronized_statement, patch_throw_statement,
14384         check_thrown_exceptions, check_thrown_exceptions_do,
14385         purge_unchecked_exceptions): New functions.
14386         * typeck.c (lookup_argument_method): Allow WFL in place of method
14387         DECL_NAME during method definition check
14388
14389 1998-10-09  Tom Tromey  <tromey@cygnus.com>
14390
14391         * gjavah.c (decode_signature_piece): New function.
14392         (print_c_decl): Use it.  Added `name_override' argument.
14393         (print_method_info): Use name_override argument to print_c_decl.
14394         (seen_fields): Removed.
14395         (print_field_info): Don't update seen_fields.
14396         (struct method_name): New structure.
14397         (method_name_list): New global.
14398         (print_method_info): Add new method to list of methods.
14399         (name_is_method_p): New function.
14400         (print_field_info): If field name has same name as method, then
14401         change field name.
14402         (process_file): Parse methods before fields.
14403         (field_pass): New global.
14404         (HANDLE_END_FIELD): Take field_pass into account.
14405
14406 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14407
14408         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
14409         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
14410
14411 1998-10-03  Anthony Green  <green@cygnus.com>
14412
14413         * jvspec.c: Fix bug in jvgenmain_spec patch.
14414
14415 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14416
14417         * Makefile.in (lang.o:): Install dependency on java-tree.def.
14418         * decl.c (soft_exceptioninfo_call_node): New global variable.
14419         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
14420         takes extra integer argument. soft_exceptioninfo_call_node
14421         initialized.
14422         * except.c (java_set_exception_lang_code): New function
14423         (method_init_exceptions): Called here.
14424         (prepare_eh_table_type): New function.
14425         (expand_end_java_handler): Called here.
14426         * expr.c (build_java_throw_out_of_bounds_exception): Now features
14427         one argument. Modified generation of call to
14428         soft_badarrayindex_node to use new argument.
14429         (build_java_arrayaccess): Pass faulty index value to
14430         build_java_throw_out_of_bounds_exception.
14431         (generate_name): New function.
14432         (java_lang_expand_expr): New local variables node, current,
14433         has_finally_p. Expand TRY_EXPR node.
14434         (process_jvm_instruction): Replace top of the stack with thrown
14435         object reference when entering exception handler.
14436         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
14437         specific tree codes.
14438         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
14439         global.
14440         (DECL_SPECIFIC_COUNT): New macro.
14441         (prepare_eh_table_type, java_set_exception_lang_code,
14442         generate_name): New function declarations.
14443         (match_java_method): Declaration deleted.
14444         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
14445         macros.
14446         * lex.c (TRY_TK, CATCH_TK): Generate location information.
14447         * parse.h (redefinition_error, refine_accessible_methods_list,
14448         can_cast_to_p): Function declaration removed.
14449         (classitf_redefinition_error, variable_redefinition_error,
14450         parse_jdk1_1_error, find_applicable_accessible_methods_list,
14451         find_most_specific_methods_list, argument_types_convertible,
14452         enter_a_block, valid_builtin_assignconv_identity_widening_p,
14453         valid_cast_to_p, valid_method_invocation_conversion_p,
14454         try_reference_assignconv, add_stmt_to_compound,
14455         build_jump_to_finally, build_tree_list, patch_try_statement,
14456         java_get_catch_block): New function declarations.
14457         * parse.y (string_buffer_type): Global variable deleted.
14458         (group_of_labels, catches, catch_clause, catch_clause_parameter,
14459         finally): Rules tagged <node>.
14460         (TRY_TK, CATCH_TK): Token tagged <operator>.
14461         (class_body_declaration:, class_member_declaration:,
14462         formal_parameter:, explicit_constructor_invocation:,
14463         interface_member_declaration:, constant_declaration:,
14464         primary_no_new_array:, class_instance_creation_expression:,
14465         array_creation_expression:): Issue error on unsuported JDK1.1
14466         features.
14467         (try_statement:, catches:, finally:): Define actions.
14468         (catch_clause_parameter): New rule.
14469         (catch_clause:): Use new rule catch_clause_parameter.
14470         (parse_jdk1_1_error): New function.
14471         (redefinition_error): Renamed classitf_redefinition_error.
14472         (variable_redefinition_error): New function.
14473         (check_class_interface_creation): Call
14474         classitf_redefinition_error.
14475         (java_complete_tree): Added error message on JDEP_TYPE: case.
14476         (complete_class_report_errors): Fixed indentation.
14477         (declare_local_variables): Call variable_redefinition_error.
14478         (source_end_java_method): Call java_set_exception_lang_code and
14479         emit_handlers where appropriate.
14480         (java_method_add_stmt): Call add_stmt_to_block.
14481         (add_stmt_to_block): New function.
14482         (lookup_method_invoke): Fixed outside comment. new local variable
14483         candicates.  Call find_applicable_accessible_methods_list and
14484         find_most_specific_methods_list when searching for a
14485         method. Modified error report to list possible candidates when
14486         applicable.
14487         (find_applicable_accessible_methods_list,
14488         find_most_specific_methods_list, argument_types_convertible): New
14489         function.
14490         (refine_accessible_methods_list): Function deleted.
14491         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
14492         expr (if applicable) before calling patch_array_ref.
14493         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
14494         (enter_block): Fixed comment.
14495         (enter_a_block): New function.
14496         (patch_assignment): Reorganized. Call try_reference_assignconv for
14497         references. Call valid_cast_to_p instead of can_cast_to_p.
14498         (try_reference_assignconv,
14499         valid_builtin_assignconv_identity_widening_p): New functions.
14500         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
14501         (valid_cast_to_p, valid_method_invocation_conversion_p): New
14502         functions.
14503         (build_string_concatenation): Don't resolve StringBuffer.
14504         (patch_cast): Fixed inverted arguments.
14505         (patch_array_ref): Code to save array expr deleted. Call
14506         valid_cast_to_p instead of can_cast_to_p.
14507         (generate_labeled_block): Call generate_name.
14508         (build_jump_to_finally, build_try_statement, java_get_catch_block,
14509         patch_try_statement): New functions.
14510         * typeck.c (match_java_method): Function deleted.
14511
14512 1998-10-02  Anthony Green  <green@cygnus.com>
14513
14514         * jvspec.c: jvgenmain_spec uses different temporary file names.
14515
14516 1998-10-02  Anthony Green  <green@cygnus.com>
14517
14518         * jvspec.c (lang_specific_driver): Fail if user specifies
14519         --main= when not linking.
14520
14521 1998-09-28  Tom Tromey  <tromey@cygnus.com>
14522
14523         * class.c (make_class_data): Push value for `thread' field.
14524         * decl.c (init_decl_processing): Added `thread' field to class.
14525
14526         * class.c (add_field): Always make static fields externally
14527         visible.
14528
14529 1998-09-26  Anthony Green  <green@cygnus.com>
14530
14531         * expr.c (build_java_athrow,
14532         build_java_throw_out_of_bounds_exception, expand_invoke,
14533         build_newarray, expand_java_multianewarray, build_java_monitor):
14534         Update comments to reflect _Jv_* function names.
14535
14536 1998-09-25  Per Bothner  <bothner@cygnus.com>
14537
14538         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
14539         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
14540         * parse.y (expand_start_java_method):  Likewise.
14541
14542 1998-09-24  Per Bothner  <bothner@cygnus.com>
14543
14544         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
14545
14546         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
14547         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
14548         * expr.c:  Remove no-longer-needed calls to promote_type.
14549         * decl.c (give_name_to_locals):  Liekwise.
14550         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
14551         * parse.y:  Add/remove promote_type calls as appropriate.
14552         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
14553         (parse_signature_string):  Likewise.
14554         (build_java_array_type):  Fix for now signature convenions.
14555
14556         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
14557
14558 1998-09-23  Tom Tromey  <tromey@cygnus.com>
14559
14560         * class.c (init_class_processing): libjava function renamed to
14561         _Jv_RegisterClass.
14562
14563 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14564
14565         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
14566         * java-tree.def: Fixed DEFTREECODE third argument.
14567         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
14568         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
14569         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
14570         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14571         JAVA_THIS_EXPR): Now replaced by tree code definitions.
14572         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
14573         * lang.c (java_tree_code_type, java_tree_code_length,
14574         java_tree_code_name): New arrays.
14575         (lang_init): Append Java tree node definitions to Gcc ones.
14576         * lex.c (expression_obstack): Declared as extern when JC1_LITE
14577         defined.
14578         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
14579         wfl_to_string.
14580         (java_lex): Allow declaration of empty string constants. Retain
14581         location information on CASE_TK and DEFAULT_TK.
14582         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
14583         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
14584         Modified to be more robust.
14585         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
14586         (build_new_invocation, try_builtin_assignconv,
14587         patch_switch_statement, string_constant_concatenation,
14588         build_string_concatenation, patch_string_cst, patch_string,
14589         java_expand_switch): New function declarations.
14590         * parse.y: Rules related to switch and EH tagged <node>.
14591         (label_id): Set to NULL_TREE
14592         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
14593         tree nodes.
14594         (this_or_super:): Fixed indentation.
14595         (statement:, statement_nsi:, statement_without_trailing_substatement:,
14596         statement_expression:): Removed call to RULE on all sub-rules.
14597         (switch_expression:, switch_labels:): New rules.
14598         (switch_statement:, switch_block:, switch_block_statement_groups:,
14599         switch_block_statement_group:, switch_labels:, switch_label:):
14600         Defined actions.
14601         (throw_statement:, synchronized_statement:, try_statement:):
14602         Defined temporary actions.
14603         (class_instance_creation_expression:): Call
14604         build_new_invocation. Fixed indentation.
14605         (field_access): Fixed indentation.
14606         (method_invocation): Likewise.
14607         (make_qualified_primary): Use THIS_EXPR.
14608         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
14609         resolving from SUPER, set *type_found.
14610         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
14611         (java_complete_tree): Removed unused local variable `location'. Case
14612         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
14613         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
14614         on MODIFY_EXPR: and all binary operator tree code cases. Removed
14615         STRING_CST: case. default: checks for patchable strings.
14616         (complete_function_arguments): Transform string constant or
14617         crafted StringBuffer if necessary.
14618         (build_method_invocation): Fixed comments.
14619         (build_new_invocation): New function.
14620         (patch_assignment): Call try_builtin_assignconv to figure a valid
14621         assignment conversion between builtin types.
14622         (try_builtin_assignconv): New function.
14623         (build_binop): Use URSHIFT_EXPR directly to call build.
14624         (operator_string): Use UNARY_PLUS_EXPR.
14625         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
14626         operator.
14627         (do_merge_string_cste, merge_string_cste,
14628         string_constant_concatenation, build_string_concatenation,
14629         patch_string, patch_string_cst): New function.
14630         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
14631         (patch_unaryop): Likewise. New test of valid ++/-- operands.
14632         (build_newarray_node): Use NEW_ARRAY_EXPR.
14633         (build_this): Use THIS_EXPR.
14634         (build_return): Enable debug information on return statement.
14635         (build_if_else_statement): Likewise.
14636         (complete_labeled_statement): Fixed related comment.
14637         (build_loop_body): Fixed comment.
14638         (build_bc_statement): Enable debug information on break/continue
14639         statements.
14640         (patch_bc_statement): Fixed typos. Handle SWITCH statement
14641         context.
14642         (patch_switch_statement, case_identity, java_expand_switch): New
14643         functions.
14644
14645 1998-09-21  Per Bothner  <bothner@cygnus.com>
14646
14647         * buffer.h (BUFFER_INIT):  New macro.
14648         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
14649         Pass (struct jcf_partial *state) to most functions.
14650         (jcf_block, jcf_relocation):  New types.
14651         Support labels, branches, conditionals, loops.
14652
14653 1998-09-21  Tom Tromey  <tromey@cygnus.com>
14654
14655         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
14656
14657 1998-09-21  Per Bothner  <bothner@cygnus.com>
14658
14659         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
14660         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
14661         not integer_type_node (INT_TYPE_SIZ bits).
14662
14663         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
14664
14665         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
14666         * jcf-dump.c (print_exception_table):  New function.
14667         (disassemble_method):  Better handling of wide instructions.
14668         Make more robust for bad input.
14669
14670 1998-09-30  Jeffrey A Law  (law@cygnus.com)
14671
14672         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
14673         FreeBSD.
14674
14675 1998-09-17  Jeffrey A Law  (law@cygnus.com)
14676
14677         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
14678
14679 1998-09-17  Tom Tromey  <tromey@cygnus.com>
14680
14681         * Makefile.in ($(PARSE_H)): Removed target.
14682
14683 1998-09-17  Jeffrey A Law  (law@cygnus.com)
14684
14685         * Makefile.in (JAVA_OBJS): Add memmove.o
14686         (memmove.o): New target & rules.
14687
14688 1998-09-15  Tom Tromey  <tromey@cygnus.com>
14689
14690         * expr.c (expand_invoke): Don't generate a call to the class init
14691         code.
14692
14693 1998-09-14  Jeffrey A Law  (law@cygnus.com)
14694
14695         * Makefile.in: Add many missing dependencies.
14696         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
14697         as appropriate.
14698         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
14699         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
14700
14701 1998-09-11  Per Bothner  <bothner@cygnus.com>
14702
14703         * decl.c (complete_start_java_method):  If method is static (and
14704         not private) call _Jv_InitClass.
14705         * expr.c (expand_invoke):  Don't call build_class_init.
14706
14707         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
14708
14709 1998-09-10  Jeffrey A Law  (law@cygnus.com)
14710
14711         * Make-lang.in (GCJ): Define before using.
14712
14713 1998-09-09  Jeffrey A Law  (law@cygnus.com)
14714
14715         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
14716         losing due to namespace pollution in GNU getopt.h
14717
14718 1998-09-09  Tom Tromey  <tromey@cygnus.com>
14719
14720         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
14721         (java.all.cross): Likewise.
14722         (java.rest.encap): Likewise.
14723
14724 1998-09-08  Jeffrey A Law  (law@cygnus.com)
14725
14726         * gjavah.c (print_class_decls): Fix thinko in arglist
14727         * jcv-io.c (find_classfile): Similarly.
14728
14729 1998-09-07  Jeffrey A Law  (law@cygnus.com)
14730
14731         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
14732
14733 1998-09-05  Tom Tromey  <tromey@cygnus.com>
14734
14735         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
14736         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
14737         * Makefile.in (PARSE_C): New macro.
14738         (PARSE_H): Likewise.
14739         (PARSE_SCAN_C): Likewise.
14740         ($(PARSE_C)): Target renamed from parse.c.
14741         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
14742         (clean): Remove parse-scan.c as well.
14743         (parse.o): Depend on $(PARSE_C).
14744
14745 1998-09-05  Anthony Green  <green@cygnus.com>
14746
14747         * README, license.terms: Removed.
14748
14749         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
14750         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
14751         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
14752         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
14753         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
14754         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
14755         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
14756         and Java trademark attribution.
14757
14758 1998-09-04  Tom Tromey  <tromey@cygnus.com>
14759
14760         * Makefile.in: Use gcjh, not gjavah.
14761         * config-lang.in (stagestuff): Use gcjh, not gjavah.
14762         * Make-lang.in: Changed gjavah to gcjh everywhere.
14763
14764 1998-09-03  Per Bothner  <bothner@cygnus.com>
14765
14766         * gjavah.c:  Support new -prepend -add -append flags.
14767         (print_method_info):  Method is not virtual if class is final.
14768
14769 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14770
14771         * jv-scan.c: Fixed copyright assignment.
14772         * keyword.gperf: Likewise.
14773         * keyword.h: Likewise.
14774         * lex.c: Fixed copyright assignment.
14775         (java_lex): Push unicode back when parsing '<'.
14776         * lex.h: Fixed copyright assignment.
14777         * parse-scan.y: Likewise.
14778         * parse.h: Fixed copyright assignment.
14779         (build_debugable_stmt, complete_for_loop): New function prototypes.
14780         * parse.y: Fixed copyright assignment.
14781         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
14782         size_zero_node when completing a loop with no exit condition.
14783         (for_statement_nsi:): Define action.
14784         (for_init:, for_update:): Return size_zero_node when empty.
14785         (declare_local_variables): Call build_debugable_stmt.
14786         (build_debugable_stmt): New function.
14787         (build_loop_body): Build debugable statement around loop
14788         condition part.
14789         (complete_loop_body): Take into account the debugable statement
14790         around the EXIT_EXPR.
14791         (complete_loop_body): New function.
14792         (patch_exit_expr): Fixed condition inversion.
14793
14794 1998-09-02  Tom Tromey  <tromey@cygnus.com>
14795
14796         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
14797         name of thread define.
14798         * jvspec.c (THREAD_NAME): New macro.
14799         (GCLIB): Likewise.
14800         (THREADLIB): Likewise.
14801         (lang_specific_driver): Recognize attempt to link with thread
14802         library or gc library.  Recognize -ljava on command line so it
14803         isn't linked against more than once.
14804
14805 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14806
14807         * parse-scan.y (report_main_declaration): Name of the class
14808         containing `main' can be a qualified name.
14809
14810 1998-08-31  Tom Tromey  <tromey@cygnus.com>
14811
14812         * config-lang.in: Changed gjavac to gjc everywhere.
14813         * Make-lang.in: Changed gjavac to gjc everywhere.
14814
14815 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14816
14817         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
14818         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
14819         and install the files.
14820         * Makefile.in (JAVA_OBJS_LITE): New variable.
14821         (compiler:): Now include jv-scan as a dependency.
14822         (../jv-scan$(exeext), parse-scan.c): New targets.
14823         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
14824         * config-lang.in (compilers): Removed gcj, gjavah from the list.
14825         * jcf-parse.c (parse_source_file): Call java_layout_classes and
14826         check for errors even if parse_only.
14827         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
14828         defined.
14829         (yylex): New function. Uses java_lex body.
14830         (java_lex): Removed commented out statement. Remove local variable
14831         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
14832         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
14833         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
14834         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
14835         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
14836         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
14837         where appropriate.
14838         (java_lex_error): Empty if JC1_LITE is defined.
14839         (java_get_line_col): Return 0 if JC1_LITE is defined.
14840         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
14841         SET_MODIFIER_CTX): Moved into the section containing the macros
14842         conditionally defined by JC1_LITE.
14843         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
14844         argument if JC1_LITE is defined.
14845         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
14846         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
14847         is defined.
14848         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
14849         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
14850         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
14851         to different values according to JC1_LITE.
14852         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
14853         declared if JC1_LITE set.
14854         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
14855         defined if JC1_LITE not set.
14856         (struct parser_ctx): Reorganized and skip the jc1 front end part
14857         if JC1_LITE set.
14858         (java_layout_classes): New function definition.
14859         (java_push_parser_context, java_init_lex, yyparse, yylex,
14860         yyerror): Prototype always declared. All other static function
14861         prototypes declared only if JC1_LITE is not set.
14862         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
14863         declared in parse.h.
14864         (java_layout_classes): New function.
14865         (java_complete_expand_methods): No longer layout the class here.
14866         * parse-scan.y: New file.
14867         * jv-scan.c: New file.
14868
14869 1998-08-25  Tom Tromey  <tromey@cygnus.com>
14870
14871         * gjavah.c (main): Handle -friend option.
14872         (friend_specs): New global.
14873         (generate_access): Handle friend_specs.
14874         (process_file): Likewise.
14875         (MAX_FRIENDS): New macro.
14876         (friend_count): New global.
14877         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
14878         Changed all callers.
14879
14880 1998-08-24  Per Bothner  <bothner@cygnus.com>
14881
14882         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
14883         (main):  Handle processing all the entries of a named .zip archive.
14884         * jcf-io.c (jcf_trim_old_input):  New function.
14885         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
14886
14887 1998-08-24  Per Bothner  <bothner@cygnus.com>
14888
14889         * lang.c (flag_assume_compiled):  Make default be on.
14890
14891 1998-08-21  Per Bothner  <bothner@cygnus.com>
14892
14893         * jcf-dump.c:  Add bunches of flags to control output more.
14894         (process_class):  New function;  support printing more than one class.
14895         (main): Support new --print-main and --javap flags.
14896         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
14897         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
14898
14899 1998-08-20  Per Bothner  <bothner@cygnus.com>
14900
14901         Change mangling of dispatch table to match C++ vtable (w/thunks).
14902         * class.c (build_dtable_decl), java-tree.h:  New function.
14903         (make_class_data):  Call it.
14904         * decl.c (init_decl_processing):  Likewise.
14905
14906 1998-08-19  Warren Levy  <warrenl@cygnus.com>
14907
14908         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14909         soft_anewarray; adjust args passed.
14910         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14911         match _Jv_NewObjectArray.
14912
14913 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14914
14915         * decl.c (push_labeled_block, pop_labeled_block): New functions.
14916         * expr.c (loopup_label): Call create_label_decl.
14917         (create_label_decl): New function.
14918         (java_lang_expand_expr): Call expand_start_bindings with argument
14919         set to zero.
14920         * java-tree.h Added space after PROTO in function declarations
14921         when necessary.
14922         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14923         (create_label_decl, push_labeled_block): New function
14924         declarations.
14925         * lex.c (label_id): Initialize.
14926         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14927         switch.
14928         * parse.h Added space after PROTO in function declarations when
14929         necessary.
14930         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14931         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14932         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14933         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14934         macros.
14935         (struct parser_ctxt): New fields current_loop,
14936         current_labeled_block.
14937         (build_if_else_statement, patch_if_else_statement,
14938         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14939         generate_labeled_block, complete_labeled_statement,
14940         build_bc_statement, patch_bc_statement, patch_loop_statement,
14941         build_new_loop, build_loop_body, complete_loop_body): New function
14942         declarations.
14943         * parse.y (java_warning_count): New global variable.
14944         (label_id): New static variable.
14945         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14946         (block:): Return size_zero_node when block is empty.
14947         (empty_statement:): Return size_zero_node.
14948         (statement:): Implement supplemental action when for_statement: is
14949         reduced.
14950         (label_decl:): New rule.
14951         (labeled_statement:): Rewritten using label_decl. Actions
14952         implemented.
14953         (labeled_statement_nsi:): Likewise.
14954         (if_then_statement): Actions implemented.
14955         (while_expression): New rule.
14956         (while_statement:): Rewritten using while_expression. Actions
14957         implemented.
14958         (while_statement_nsi:): Likewise.
14959         (do_statement_begin:): New rule.
14960         (do_statement:): Rewritten using do_statement_begin. Actions
14961         implemented.
14962         (for_statement:): Rewritten using for_begin. Actions implemented.
14963         (for_statement_nsi:): Likewise.
14964         (for_header:, for_begin:): New rules.
14965         (for_init:): Actions implemented.
14966         (statement_expression_list:, break_statement:,
14967         continue_statement:): Likewise.
14968         (yyerror): Count number of issued warning(s).
14969         (java_report_errors): Report error(s) and/or warning(s).
14970         (java_complete_class): Use build_java_argument_signature to
14971         recompute completed method signature.
14972         (java_check_regular_methods): New locals method_wfl and aflags.
14973         Use method_wfl instead of lookup_cl during error reports. Fixed
14974         indentation and modified some error messages. Use
14975         lang_printable_name in method instead of the DECL_NAME. New code
14976         to issue warnings on methods not overriding corresponding methods
14977         private to a different package.
14978         (java_method_add_stmt): Call add_stmt_to_compound.
14979         (add_stmt_to_compound): New function.
14980         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14981         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14982         (build_if_else_statement, patch_if_else_statement,
14983         build_labeled_block, generate_labeled_block,
14984         complete_labeled_statement, build_new_loop, build_loop_body,
14985         complete_loop_body, patch_loop_statement, build_bc_statement,
14986         patch_bc_statement, patch_exit_expr): New functions.
14987         * typeck.c (build_java_signature): Build argument signature before
14988         enclosing it in between parenthesis.
14989
14990 1998-08-17  Warren Levy  <warrenl@cygnus.com>
14991
14992         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14993         (JAVA_OBJS): Added reminder comment
14994
14995 1998-08-13  Nick Clifton  <nickc@cygnus.com>
14996
14997         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14998         be interpreted as a long long.
14999
15000 1998-08-13  Warren Levy  <warrenl@cygnus.com>
15001
15002         * decl.c (init_decl_processing): Use _Jv_InitClass, not
15003         soft_initialise_class.  Use _Jv_NewMultiArray, not
15004         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
15005         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
15006         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
15007         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
15008
15009 1998-08-12  Per Bothner  <bothner@cygnus.com>
15010
15011         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
15012         length_identifier_node):  New global tree node constants.
15013         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
15014         Replace uses by super_identifier_node etc.
15015         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
15016
15017         * parse.y (resolve_field_access):  Don't special-case ".length" if
15018         flag_emit_class_files.
15019         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
15020         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
15021         and ARRAY.length.
15022
15023 1998-08-11  Per Bothner  <bothner@cygnus.com>
15024
15025         * decl.c (init_decl_processing): Remove unused method_type_node fields.
15026         * class.c (make_method_value):  Remove init for removed fields.
15027
15028         * class.c (layout_class):  Use build_java_argument_signature.
15029         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
15030
15031         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
15032         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
15033         (build_java_signature):  Don't use push_java_argument_signature.
15034
15035         * typeck.c (lookup_argument_method):  New function.
15036         * parse.y (java_check_regular_methods):  Use lookup_argument_method
15037         instead of lookup_java_method2 followed by lookup_java_method.
15038
15039         * parse.y (check_method_redefinition):  Minor optimization.
15040
15041         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
15042         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
15043
15044 1998-08-10  Tom Tromey  <tromey@cygnus.com>
15045
15046         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
15047         c-pragma.o.
15048
15049         * gjavah.c (java_float_finite): Use K&R-style definition.
15050         (java_double_finite): Likewise.
15051         (generate_access): Now returns void.  Changed all callers.
15052         (last_access_generated): Removed.
15053         (process_file): Only make a single pass over the .class file.
15054
15055 1998-07-29  Per Bothner  <bothner@cygnus.com>
15056
15057         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
15058         for compatibility for G++ (with -fvtable-thunks).
15059         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
15060
15061         * gjavah.c (process_file):  Use public inheritance for super-class.
15062
15063 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15064
15065         * lex.c (java_init_lex): Initialize ctxp->package.
15066         * parse.h (struct parser_ctxt): package and package_len replaced
15067         by tree package, an identifier node. Field method_decl_list is
15068         gone. Fixed comments.
15069         (lookup_field_wrapper, merge_qualified_name, not_accessible,
15070         class_in_current_package): New function prototypes.
15071         * parse.y (array_type:): Set class loaded flag on primitive type
15072         arrays.
15073         (package_declaration:): Assign ctxp->package to the
15074         identifier node.
15075         (method_invocation:): Handle invocation of method qualified by
15076         `super'.
15077         (single_type_import_declaration:): Removed ambiguity check.
15078         (java_pop_parser_context): New local variable `next'. Reset and
15079         set IMPORT_CLASSFILE_NAME flags on current and previous import
15080         list.
15081         (java_accstring_lookup): Use new local macro COPY_RETURN.
15082         (lookup_field_wrapper): New function.
15083         (parser_qualified_classname): Use merge_qualified_name.
15084         (parser_check_super_interface): Broaden error message.
15085         (do_resolve_class): Check for qualified class name in the current
15086         compilation unit if appropriate.
15087         (process_imports): Check for already defined classes.
15088         (check_pkg_class_access): Got rid of call to
15089         get_access_flags_from_decl.
15090         (java_complete_expand_methods): Call safe_layout_class based on
15091         the current class size.
15092         (make_qualified_primary): Build a WFL qualification on primary if
15093         none exists.
15094         (merge_qualified_name): New function.
15095         (make_qualified_name): Use merge_qualified_name.
15096         (resolve_expression_name): Use safe_lookup_field.
15097         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
15098         (resolve_qualified_expression_name): Likewise. Check on resolved
15099         element accessibility.
15100         (not_accessible_p, class_in_current_package): New functions.
15101         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
15102         (patch_method_invocation_stmt): Merged common pieces. Check
15103         accessibility of invoked method.
15104         (check_for_static_method_reference): Add returned type in error
15105         message.
15106         (invocation_mode): Get rid of bogus check on PRIVATE methods.
15107         (refine_accessible_methods_list): Merged two conditions in test.
15108         (java_complete_class): Sanity check on stabilize_ref gone.
15109         * zextract.c (read_zip_archive): Cast lseek second argument to long.
15110
15111 1998-07-28  Per Bothner  <bothner@cygnus.com>
15112
15113         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
15114
15115 1998-07-24  Tom Tromey  <tromey@cygnus.com>
15116
15117         * gjavah.c (F_NAN): Removed.
15118         (F_NAN_MASK): New macro.
15119         (F_POSITIVE_INFINITY): Removed.
15120         (F_NEGATIVE_INFINITY): Likewise.
15121         (java_float_finite): Rewrote.
15122         (D_NAN_MASK): Renamed.
15123         (java_double_finite): Rewrote.
15124         (D_POSITIVE_INFINITY): Removed.
15125         (D_NEGATIVE_INFINITY): Likewise.
15126
15127         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
15128         If verbose, print underlying representation of value in hex.
15129
15130 1998-07-24  Per Bothner  <bothner@cygnus.com>
15131
15132         * buffer.h, buffer.c:  New files.
15133         * Makefile.in (JAVA_OBJS):  Add buffer.o.
15134
15135         Support locals variables and writing their debug entries to .class.
15136         * jcf-write.c:  Simplify some by user new buffer type.
15137         (vode_buffer_grow):  Removed.
15138         (struct localvar_info):  New type.
15139         (localsvars, localvartable):  New buffers.
15140         (localvar_alloc, localvar_free):  New functions.
15141         (generate_bytecode_insns):  Handle local variables.
15142         (generate_classfile):  Write LocalVariableTable attribute.
15143
15144 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15145
15146         * jcf-io.c (open_in_zip): Check the zipfile magic number.
15147         * zipfile.h (ZIPMAGIC): New macro.
15148
15149 1998-07-24  Tom Tromey  <tromey@cygnus.com>
15150
15151         * Makefile.in (gjavah.o): Updated dependencies.
15152         (jcf-dump.o): Likewise.
15153         (all.indirect): Use ../gjavah.
15154         (../gjavah$(exeext)): Likewise.
15155         (clean): Don't remove gjavah.
15156         (clean): Remove parse.c, not java/parse.c.
15157         * Make-lang.in (java): Added gjavah.
15158         (gjavah$(exeext)): New target.
15159         (GJAVAH_SOURCES): New macro.
15160         (java.all.build): Added gjavah.
15161         (java.all.cross): Likewise.
15162         (java.rest.encap): Likewise.
15163         * config-lang.in (compilers, stagestuff): Added gjavah.
15164
15165 1998-07-23  Tom Tromey  <tromey@cygnus.com>
15166
15167         * gjavah.c (java_float_finite): New function.
15168         (java_double_finite): Likewise.
15169         (F_POSITIVE_INFINITY): New macro.
15170         (F_NEGATIVE_INFINITY): Likewise.
15171         (F_NAN): Likewise.
15172         (D_POSITIVE_INFINITY): Likewise.
15173         (D_NEGATIVE_INFINITY): Likewise.
15174         (D_NAN): Likewise.
15175         (print_field_info): Use java_float_finite and java_double_finite.
15176
15177 1998-07-23  Per Bothner  <bothner@cygnus.com>
15178
15179         * parse.y (method_header):  Name "this" implicit argument.
15180
15181 1998-07-22  Per Bothner  <bothner@cygnus.com>
15182
15183         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
15184         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
15185         (put_linenumber):  New function.
15186         (generate_bytecode_insns, generate_classfile):  Write line numbers.
15187
15188 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15189
15190         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
15191         (lookup_name, build_known_method_ref, build_class_init,
15192         build_invokevirtual, invoke_build_dtable, match_java_method,
15193         build_field_ref, pushdecl_force_head, build_java_binop,
15194         binary_numeric_promotion, build_decl_no_layout,
15195         build_java_arrayaccess, build_newarray, build_anewarray,
15196         build_java_array_length_access, build_java_arraynull_check): New
15197         extern function prototypes.
15198         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15199         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
15200         java-tree.h.
15201         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
15202         to NULL
15203         * jcf.h (jcf_out_of_synch): New extern function prototype.
15204         * parse.h: Static/global function implemented in parse.y
15205         prototyped and declarations moved at the end of the file.
15206         (DECL_P): Check that the argument isn't null.
15207         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15208         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
15209         (QUAL_DECL_TYPE): New macro.
15210         (PARAMS): Macro definition removed.
15211         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
15212         (return_statement:): Call build_return.
15213         (field_access:): Call make_qualified_primary in sub rule.
15214         (method_invocation:): Build method invocation and call
15215         make_qualified_primary when processing primaries.
15216         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
15217         get_type_from_signature.
15218         (java_check_regular_method): Extra integer 0 argument when calling
15219         lookup_java_method2.
15220         (lookup_java_interface_method2): Extra method DECL argument when
15221         calling lookup_java_interface_method2.
15222         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
15223         COMPOUND_EXPR node.
15224         (java_complete_expand_method): Layout current class iff not
15225         already done. Don't process interface's methods.
15226         (java_complete_expand_method): Use super class only if it
15227         exists. Use current class otherwise.
15228         (make_qualified_primary): New function.
15229         (resolve_expression_name): Process qualified expression or
15230         expression from primary the same way.
15231         (resolve_expression_name): Two last arguments to
15232         resolve_field_access are now NULL_TREEs.
15233         (resolve_field_access): New variable is_static. Local field must
15234         be DECLs. is_static computed on field DECLs only. Append code in
15235         where_found to the field access if necessary. Use QUAL_DECL_TYPE
15236         to initialize field_type.
15237         (resolve_qualified_expression_name): New local variable,
15238         previous_call_static and is_static. Handle primaries with function
15239         calls, casts, array references and `this'. `super' now handled as
15240         `(super_class)this'. Use is_static to clarify boolean expressions.
15241         Added code to handle case where a proper handle is required to
15242         access a field. Use QUAL_DECL_TYPE where applicable.
15243         (maybe_access_field): New function.
15244         (patch_method_invocation_stmt): New arguments primary, where,
15245         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
15246         deleted. Use `where' as a type to search from if specified. Check
15247         for static method reference where forbidden. Append primary or
15248         current_this to the argument list if not calling constructor nor
15249         static methods.
15250         (check_for_static_method_reference): New function.
15251         (patch_invoke): Layout the class on which new is done if
15252         necessary.
15253         (lookup_method_invoke): Changed format to report errors on
15254         methods.
15255         (qualify_ambiguous_name): New local variable this_found. Now
15256         handle things from primaries. Method call are considered
15257         expression names.
15258         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
15259         changed into NULLs.
15260         (not_initialized_as_it_should_p): Comply with the new DECL_P.
15261         (java_complete_tree): New case fo RETURN_EXPR. Process function
15262         call arguments in separate function.
15263         (complete_function_arguments): New function.
15264         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
15265         anymore.
15266         (patch_assignment): Take the return function slot into account as
15267         a RHS. Distinguish assignment from a return.
15268         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
15269         when checking methods in interfaces.
15270         (resolve_type_during_patch): NULL argument to unresolve_type_p
15271         instead of NULL_TREE.
15272         (patch_newarray): Fixed typo in comment.
15273         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
15274         (build_return, patch_return): New functions.
15275         * typeck.c (lookup_java_constructor): Fixed typo in comment.
15276
15277 1998-07-21  Per Bothner  <bothner@cygnus.com>
15278
15279         * constants.c (find_name_and_type_constant, find_fieldref_index,
15280         find_methodref_index):  New methods.
15281         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
15282         just return given method.  Also, rename to build_known_method_ref.
15283         (expand_invoke):  Rename call to build_invoke_non_interface.
15284         * java-tree.h, parse.h:  Update prototype.
15285         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
15286         (such as expand_expr_stmt) if flag_emit_class_files.
15287         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
15288         STACK_TARGET, IGNORE_TARGET):  New macros.
15289         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
15290         (generate_bytecode_insn):  New function to generate method's bytecode.
15291         (generate_classfile):  Node generate Code attribute for a method.
15292         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
15293         push_long_const, field_op, adjust_typed_op, maybe_wide):
15294         New functions used by generate_bytecode_insn.
15295
15296         * typeck.c (signature_include_return):  Remove variable.
15297         (push_java_argument_signature, build_java_argument_signature):  New.
15298         (build_java_signature):  Use push_java_argument_signature.
15299         * parse.y:  Use build_java_argument_signature instead of fiddling
15300         with signature_include_return.
15301
15302 1998-07-17  Tom Tromey  <tromey@cygnus.com>
15303
15304         * gjavah.c (print_c_decl): Always generate JArray<>* for array
15305         types.
15306
15307         * Makefile.in (all.indirect): Added gjavah$(exeext).
15308         (gjavah$(exeext)): Added $(exeext).
15309         (clean): Likewise.
15310
15311 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15312
15313         * class.c (layout_class): Call to java_layout_parsed_class replace
15314         by safe_layout_class.
15315         * expr.c (build_java_array_length_access): Removed static storage
15316         class in the function definition.
15317         (build_java_arraynull_check): Likewise.
15318         Also fixed typos in two comments.
15319         * lex.c (java_init_lex): Initialize static global kw_length.
15320         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
15321         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
15322         java_lex_error.
15323         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
15324         * parse.h (resolve_no_layout): New static function declaration.
15325         (get_identifier_in_static): Declaration removed.
15326         (java_layout_parsed_class): Function name declaration changed to
15327         safe_layout_class.
15328         (build_newarray_node, patch_newarray, resolve_type_during_patch,
15329         not_initialized_as_it_should_p, build_this): New static function
15330         declarations.
15331         (pushdecl_force_head, build_java_binop, int_fits_type_p,
15332         binary_numeric_promotion, stabilize_reference,
15333         build_decl_no_layout, build_java_arrayaccess): Extern function
15334         declarations moved into their own section.
15335         (build_newarray, build_anewarray, build_java_array_length_access,
15336         build_java_arraynull_check): New extern function declarations.
15337         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
15338         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
15339         fake tree codes.
15340         (CALL_CONSTRUCTOR_P): New macro.
15341         * parse.y (kw_length): New static global tree node.
15342         (return_statement): Tagged <node>.
15343         (RETURN_TK): Tagged <operator>.
15344         (variable_declarator_id:): Build variable declaration with an
15345         empty initialization value if a syntax error was found in the
15346         initialization part of the variable declaration.
15347         (statement_without_trailing_substatement:): return_statement: now
15348         uses the default rule.
15349         (return_statement:): Temporarily fixed to return NULL_TREE.
15350         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
15351         (class_instance_creation_expression:): Class creation rules now
15352         call build_method_invocation upon reduction.
15353         (array_creation_expression:): Rules call build_newarray_node upon
15354         reduction.
15355         (dim_exprs:): Build a list of dimension expressions.
15356         (dim_expr:): Store location of the OSB_TK in the dimension
15357         expression node.
15358         (method_invocation:): Added a new error rule.
15359         (build_unresolved_array_type): WFL argument may also be an array
15360         on a primitive type. Name of the argument changed to reflect this.
15361         (method_declarator): Insert argument type at the beginning of the
15362         argument type list and later reverse the list.
15363         (unresolved_type_p): Argument 'returned' may be optionally
15364         NULL_TREE.
15365         (java_layout_class_from_source): Function renamed
15366         safe_layout_class.
15367         (resolve_and_layout): Now call resolve_no_layout and
15368         safe_layout_class.
15369         (resolve_no_layout): New function.
15370         (purify_type_name): New function.
15371         (complete_class_report_errors): Call purify_type_name during error
15372         report on a type not found.
15373         (process_imports): error_found local variable doesn't need to be
15374         initialized to zero.
15375         (declare_local_variables): New local type_wfl. Fixed typo in error
15376         message. type_wfl assigned to unresolved type and used to register
15377         incomplete type. Build a WFL around the variable initialization
15378         statement so that debug info can be generated on it.
15379         (source_start_java_method): Reverse argument list after they've
15380         been processed.
15381         (current_this): New static global variable.
15382         (java_complete_expand_methods): Set current_this when appropriate.
15383         (resolve_expression_name): Build correct static and non static
15384         field access bearing a simple name.
15385         (resolve_field_access): Resolve the length field of arrays. Handle
15386         f.m() cases.
15387         (patch_method_invocation_stmt): Set the type of the method
15388         invocation to error_mark_node. This value is later overridden by a
15389         valid type, if any. Don't handle qualified constructor invocation
15390         as qualified method invocation. Call lookup_method_invoke with its
15391         new flag. It's no longer necessary to access the selected method
15392         as the value of a tree list. Handle constructor invocation.
15393         (patch_invoke): Reverse argument list when invoking non interface
15394         methods. Insert call to new as the first argument of the
15395         constructor.
15396         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
15397         defined within a final class. Return INVOKE_STATIC if the invoked
15398         method is a constructor.
15399         (lookup_method_invoke): New lc argument is a flag to indicate a
15400         constructor lookup. Now handle constructor lookup. Choose the most
15401         specific method in case several were matching the invocation
15402         requirements. Return a method decl instead of a tree list featuring
15403         one single method decl element.
15404         (refine_accessible_methods_list): New lc flag argument to
15405         indicate that a constructor is being looked up.
15406         (not_initialized_as_it_should_p): New function.
15407         (java_complete_tree): Now process fake tree codes
15408         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
15409         save_expr on resolved function call arguments. Case on
15410         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
15411         (patch_assignment): LHS can be a field access expression. When
15412         dealing with reference, lhs_type is the promoted type of the
15413         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
15414         applicable.
15415         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
15416         (patch_binop): Use not_initialized_as_it_should_p where
15417         applicable.
15418         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
15419         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
15420         where applicable.
15421         (resolve_type_during_patch): New function.
15422         (patch_cast): Call resolve_type_during_patch to resolve type and
15423         report error accordingly.
15424         (patch_array_ref): Use not_initialized_as_it_should_p where
15425         applicable. Array base expression is saved before being
15426         used. Promote the type of an array elements if it contains non
15427         builtin types.
15428         (build_newarray_node, patch_newarray, build_this): New functions.
15429
15430 1998-07-16  Tom Tromey  <tromey@cygnus.com>
15431
15432         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
15433         increment it in `for' statement.
15434         (print_field_info): If number is inf or nan, don't print it.
15435         (print_method_info): If method name is `delete', just ignore it.
15436         (print_c_decl): Special-case jstringArray.
15437
15438         * gjavah.c (help): New function.
15439         (no_argument): New function.
15440         (usage): Changed text.
15441         (main): Rewrote argument handling.  Now handles -v, --help,
15442         --version.
15443         (version): New function.
15444         (found_error): New global.
15445         (main): Return found_error.
15446         (generate_access): Set found_error.
15447         (print_c_decl): Likewise.
15448
15449 1998-07-15  Tom Tromey  <tromey@cygnus.com>
15450
15451         * gjavah.c (print_c_decl): Don't print "," when examining field.
15452         Skip type name when looking at "[L" types.
15453         (process_file): Now static.
15454         (generate_access): Now returns int.
15455         (last_access_generated): New global.
15456         (process_file): Clear last_access_generated; make multiple passes
15457         over the class.
15458         (print_field_info): Just return if generate_access returns true.
15459         (print_method_info): Likewise.  Also, allow <init> functions to
15460         pass through.
15461         (print_c_decl): Added is_init argument.  Print constructors
15462         properly.
15463         (print_cxx_classname): Use UTF8_GET to extract characters from
15464         string.
15465         (print_base_classname): New function.
15466         (print_class_decls): New function.
15467         (process_file): Use it.
15468         (utf8_cmp): New function.
15469
15470 1998-07-13  Nick Clifton  <nickc@cygnus.com>
15471
15472         * lang-options.h: Format changed to match changes in gcc/toplev.c
15473         to implement a --help option.
15474
15475 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
15476
15477         * decl.c (init_decl_processing): Revert change to dtable_type.
15478
15479 1998-07-09  Per Bothner  <bothner@cygnus.com>
15480
15481         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
15482
15483 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
15484
15485         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
15486
15487         * lang.c (lang_init): Default flag_exceptions to 1, without
15488         checking to see if it's 2 first.
15489
15490 1998-07-08  Jeffrey A Law  (law@cygnus.com)
15491
15492         * constants.c: Include "system.h".
15493         * decl.c: Likewise.
15494         * lang.c (flag_new_exceptions): Get via extern now.
15495         (lang_init_options): New functions.  Turn on flag_new_exceptions.
15496
15497 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15498
15499         * lex.c (java_lex): Return 0 when we see an invalid character in
15500         the input.
15501
15502         * lex.c (java_read_char): Specify extra argument when calling
15503         java_lex_error.
15504         (java_read_unicode, java_parse_end_comment,
15505         java_parse_escape_sequence): Likewise,
15506         (java_lex): Specify extra argument when calling
15507         java_lex_error. Test that IDs are beginning with a legal character
15508         for IDs. Handle invalid characters with an error message and a
15509         call to java_lex_error.
15510         (java_lex_error): Adjust column position by new argument
15511         `forward'. Issue an error even if in the middle of reporting an
15512         other error.
15513
15514 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
15515
15516         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
15517         we don't explicitly put a null pointer when we're copying it.
15518
15519 1998-07-07  Tom Tromey  <tromey@cygnus.com>
15520
15521         * gjavah.c (print_cxx_classname): New function.
15522         (super_class_name): Likewise.
15523         (print_super_fields): Removed.
15524         (in_super): Removed.
15525         (print_field_info): Never generate #defines.
15526         (print_c_decl): Changed generated types to match JNI.  No longer
15527         print class name before method name.
15528         (print_method_info): Print "static" before static methods.
15529         Print "virtual" before non-final methods.
15530         (usage): Use exit(1), not exit(-1).
15531         (main): Likewise.
15532         (print_field_info): Use %.17g to print a double.
15533         (last_access): New globals.
15534         (process_file): Initialize last_access.
15535         (usage): Now static.
15536         (ACC_VISIBILITY): New define.
15537         (generate_access): New function.
15538         (print_field_info): Call it.
15539         (print_method_info): Likewise.  Also, generate information for all
15540         methods, not just native methods.  Return void.
15541         (print_c_decl): Return void.
15542         (print_field_info): Return void.
15543
15544 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15545
15546         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
15547         processing the jc1 grammar file. Prefix bison functions and
15548         variables with java_.
15549         (parse.c): Dependencies on parse.h and lex.h
15550         * expr.c (build_java_arrayaccess): Function now global.
15551         * java-tree.h: Comment reorganized to carry on previous
15552         classification effort.
15553         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
15554         RESOLVE_TYPE_NAME_P): New flags on WFLs.
15555         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
15556         java_parse (new prefix java_ generated by bison).
15557         (java_layout_parsed_class, java_register_parsed_class): Function
15558         call removed.
15559         (yyparse): Removed unnecessary call to init_outgoing_cpool.
15560         * lex.c (static tree wfl_op): Variable deleted.
15561         (java_init_lex): Initialize kw_super and kw_this. Initialize more
15562         ctxp fields to NULL_TREE.
15563         (java_lex): No longer create WFL for operators. Filename caching
15564         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
15565         created as STRING_CST and later expanded. Removed extra argument
15566         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
15567         and SUPER.
15568         (build_wfl_node): Removed code in comments.
15569         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
15570         store token and location data in the current bison token.
15571         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
15572         static/extern function declaration at the beginning of the file.
15573         (struct qualification): Data structure definition deleted.
15574         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
15575         (qualify_ambiguous_name): Function declaration modified. Function
15576         now returns nothing.
15577         (build_array_ref, patch_array_ref, make_qualified_name,
15578         resolve_qualified_expression_name, maybe_generate_clinit,
15579         resolve_field_access): New static function declarations.
15580         (build_java_arrayaccess): New extern function declaration.
15581         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
15582         (CALL_EXPR_PRIMARY): Macro deleted.
15583         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
15584         (struct parser_ctxt): Field initialized_final
15585         removed. non_static_initialized, static_initialized: New fields.
15586         * parse.y (static tree kw_super, static tree kw_this): New global
15587         static.
15588         (%union): tree wfl field of operator member replaced by int
15589         location. WFLs are non longer created for operators.
15590         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
15591         (qualified_name:): Now calls make_qualified_name to build the
15592         identifier.
15593         (type_declaration:): Consider generating <clinit> when class
15594         parsing completed.
15595         (variable_declarator:): Directly build an assignment node when the
15596         variable is initialized when declared.
15597         (this_or_super:): Build a WFL and set current location when THIS
15598         or SUPER are parsed.
15599         (expression_statement:): Wrap statement around a WFL.
15600         (primary_no_new_array:): Fixed typo. Changed value returned by
15601         THIS_TK because of its new type (temporary).
15602         (dim_exprs:): Temporary fix because of OSB_TK's new type.
15603         (field_access:): Build qualified name with SUPER.
15604         (method_invocation:): Fixed returned value because of SUPER's new
15605         type.
15606         (array_access:): Use OSB_TK location information.
15607         (post_increment_expression:, post_decrement_expression:,
15608         unary_expression:, pre_increment_expression:,
15609         pre_decrement_expression:, unary_expression_not_plus_minus:,
15610         cast_expression:, multiplicative_expression:,
15611         additive_expression:, shift_expression:, relational_expression:,
15612         equality_expression:, and_expression:, exclusive_or_expression:,
15613         inclusive_or_expression:, conditional_and_expression:,
15614         conditional_or_expression:, assignment:): Use new location/token
15615         information available on operators.
15616         (create_class): Set super_decl_type to NULL_TREE when processing
15617         java.lang.Object.
15618         (register_fields): Field initialization is now a MODIFY_EXPR
15619         node. Chain initialization code to the matching lists (according
15620         to the field declaration modifiers).
15621         (maybe_generate_clinit): New function.
15622         (method_header): Don't set method's DECL_NAME to a WFL when adding
15623         methods to java.lang.Object.
15624         (resolve_and_layout): Now can return NULL_TREE if the type
15625         resolution fails. Otherwise, return the class DECL instead of its
15626         TYPE.
15627         (check_method_redefinition): Don't patch method DECL_NAME if it
15628         belongs to java.lang.Object.
15629         (process_imports): Simply assign error_found to the value returned
15630         by check_pkg_class_access.
15631         (declare_local_variables): Don't use their init statements (if
15632         any) when parsing error were previously found. Reuse MODIFY_EXPR
15633         build during parsing as an init statement.
15634         (java_method_add_stmt): Now return the current method body.
15635         (java_layout_parsed_class, java_register_parsed_class): Functions
15636         removed.
15637         (java_complete_expand_methods): Initialize the constant pool on a
15638         per class basis. Layout the classes before expanding their method
15639         bodies. Don't try expand artificial constructor code if error were
15640         found. Make the classes data and register them if no error were
15641         found.
15642         (java_complete_expand_method): Retrieve an artificial constructor
15643         argument list before entering its body. Assign the top block to
15644         the artificial constructor function body and set types of declared
15645         blocks and compound statements to void. Walk method body if not an
15646         artificial constructor.
15647         (make_qualified_name, cut_identifier_in_qualified): New functions.
15648         (resolve_expression_name): Fixed comments. Save/restore the
15649         current class CLASS_LOADED_P flag value. Build non qualified
15650         static field access and handle qualified expression names.
15651         (resolve_field_access, resolve_qualified_expression_name): New
15652         functions.
15653         (patch_method_invocation_stmt): Use the new expression resolution
15654         scheme, calling resolve_field_access when the function call is
15655         resolved as an expression.
15656         (qualify_ambiguous_name): Function rewritten to work on qualified
15657         expression produced by make_qualified_name.
15658         (java_complete_tree): Promote type when function's argument are
15659         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
15660         the assignment to discover further errors if RHS is a expression
15661         name that fails to evaluate. Declare LHS initialized even though
15662         the assignment failed. Don't use the location variable and removed
15663         extra argument in patch function calls. Now handle the ARRAY_REF
15664         case and build internal string representation when STRING_CSTs are
15665         walked.
15666         (build_method_invocation): Don't wrap function call around a WFL.
15667         (build_assignment): Likewise. Use the operator location
15668         information.
15669         (patch_assignment): Handle array access LHSs. Handle error
15670         provenance, resulting in a better error report.
15671         (build_binop): Use op_location from operator as binop location
15672         information.
15673         (build_unaryop, build_incdec, build_cast): Likewise.
15674         (patch_binop): Extract location information from the node. Fixed
15675         typo in error message.
15676         (patch_unary_op): Extract location information from the node.
15677         (build_array_ref, patch_array_ref): New functions.
15678
15679 1998-07-01  Tom Tromey  <tromey@cygnus.com>
15680
15681         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
15682         match _Jv_IsInstanceOf.
15683         * decl.c (init_decl_processing): Use _Jv_NewArray, not
15684         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
15685
15686 1998-06-30  Tom Tromey  <tromey@cygnus.com>
15687
15688         * decl.c (init_decl_processing): Functions are now named
15689         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
15690
15691 1998-06-29  Per Bothner  <bothner@cygnus.com>
15692
15693         * java-tree.h (load_class):  Add prototype.
15694         * class.c (is_compiled_class):  Add missing arg to load_class.
15695         * expr.c (expand_java_NEW):  Call load_class.
15696         * parse.y (process_import):  Removed bogus use of void return value.
15697
15698 1998-06-25  Per Bothner  <bothner@cygnus.com>
15699
15700         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
15701         Function name is "_Jv_Throw" instead of "soft_athrow".
15702         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
15703         Function name is "_Jv_AllocObject" instead of "soft_new".
15704         Takes an extra parameter (object size).
15705         * expr.c:  Update calls.
15706
15707 1998-06-24  Per Bothner  <bothner@cygnus.com>
15708
15709         * lex.c (java_get_line_col):  Handle end-of-file.
15710         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
15711
15712 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
15713
15714         * lang.c (lang_init): Make -fexceptions the default.
15715         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
15716         exception handling is not turned on.
15717
15718 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
15719
15720         * lang.c (flag_new_exceptions): Make this this default.
15721         * decl.c (end_java_method): Call emit_handlers.
15722         * except.c (method_init_exceptions): Set language code and version.
15723         (expand_start_java_handler): Enable exception, and call
15724         expand_eh_region_start.
15725         (expand_end_java_handler): Enable exception, and set up catch blocks.
15726         (emit_handlers): New routine to generate the saved handlers.
15727         * java-except.h (emit_handlers): Add prototype.
15728
15729 1998-06-12  Per Bothner  <bothner@cygnus.com>
15730
15731         We used to have three different representations of the constant pool:
15732         the CPool structure, the tree_constant_pool, and the constructures
15733         used to build the Class object (which may need class and string
15734         constants) in compiled code.  None were appropriate for compiling
15735         to .class files, so I did a major overhaul.
15736
15737         First, the tree_constant_pool array was removed.  Things were
15738         modified to the CPool structure in the JCF could be used.
15739         Second, a "capacity" field was added to the CPool, and functions
15740         written to search for a matching constant, adding one if not found.
15741         The code that generated the Class object was changed to use a CPool.
15742         The actual TREE_LISTs used to build the CONSTRUCTORs used for
15743         the static Class object are now only in build_constants_constructor.
15744         Finally, I wrote code which can generate a .class file (including its
15745         constant pool) from the RECORD_TYPE of a class.  This is a big step
15746         on the way to compiling Java source into .class files.
15747
15748         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
15749         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
15750
15751         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
15752         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
15753         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
15754         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
15755         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
15756         (lang_type):  Removed constant_pool field.
15757         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
15758         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
15759         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
15760         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
15761
15762         * constants.c (current_constant_pool_tags, current_constant_pool_data,
15763         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
15764         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
15765         (set_constant_entry, find_constant1, find_constant2,
15766         find_class_constant, count_constant_pool_bytes, write_constant_pool,
15767         find_utf8_constant, find_class_or_string_constant):  New functions.
15768
15769         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
15770         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
15771         (give_name_to_class, get_class_constant):  Likewise.
15772         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
15773         (get_name_and_type_constant, get_ref_constant):  Removed.
15774         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
15775         * parse.y:  Don't save/restore tree_constant_pool.
15776         * verify.c (verify_jvm_instructions):  Update for new approach.
15777         * expr.c (expand_invoke, expand_java_field_op): Likewise.
15778
15779         * lang-options.h:  Added -femit-class-file, -femit-class-files.
15780         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
15781         (lang_f_options):  Added "emit-class-file(s)".
15782
15783         * expr.c (build_java_arrayaccess):  Generate more efficient array
15784         bounds checking, by using unsigned compare.
15785
15786         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
15787
15788 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15789
15790         * parse.h: New comment on the handling of unresolved type
15791         identifiers. JDEPs are now part of the jdep_code enum.
15792         (typedef struct jdep): Now use enum jdep_code or int, depending on
15793         availability. Both are narrowed down to an 8 bits bitfield.
15794         (CALL_EXPR_PRIMARY): Fixed comment.
15795
15796 1998-06-10  Tom Tromey  <tromey@cygnus.com>
15797
15798         * Make-lang.in (java): Added gjavac and jvgenmain.
15799         (java.start.encap): Depend on gjavac.
15800         (java.rest.encap): Depend on jvgenmain.
15801
15802         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
15803         (JAVA_CROSS_NAME): Likewise.
15804         (java.all.build): Depend on jvgenmain and gjavac.
15805         (java.all.cross): Depend on jvgenmain and gjavac-cross.
15806         (jvgenmain$(exeext)): New target.
15807         (java.install-common): Wrote.
15808         * config-lang.in (compilers, stagestuff): Added gjavac and
15809         jvgenmain.
15810
15811 1998-06-10  Dave Brolley  <brolley@cygnus.com>
15812
15813         * lang.c (lang_decode_option): New argc/argv interface.
15814
15815 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15816
15817         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
15818         * decl.c (build_decl_no_layout): New function.
15819         * expr.c (java_lang_expand_expr): Layout declarations found in
15820         blocks before they're pushed.
15821         * jcf-parse.c (load_class): Save current line when parsing class
15822         file.
15823         (parse_source_file): Register class before expanding their
15824         methods.
15825         * lang.c (put_decl_node): Produce `null' when `void *' is
15826         processed.
15827         * lex.c (static tree wfl_op): New static global, for error report
15828         on casts.
15829         (java_init_lex): wfl_operator and wfl_op initialized
15830         here. Filename caching added for wfl_op. Return wfl_op when `(' is
15831         parsed.
15832         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
15833         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
15834         build_unresolved_array_type): New static function definitions.
15835         (build_decl_no_layout): New extern function declared.
15836         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
15837         faulty modifier exists.
15838         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
15839         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
15840         (UNARY_PLUS_EXPR): New fake operator.
15841         (struct parser_ctxt): New field osb_number.
15842         * parse.y (static tree wfl_operator): New static WFL for operator
15843         bound error messages.
15844         (DECR_TK, INCR_TK): Moved.
15845         (OP_TK): Tagged <operator>.
15846         (array_type:): Now call build_unresolved_array_type.
15847         (dim_expr:): Count the number of '[' seen.
15848         (post_increment_expression, post_decrement_expression,
15849         pre_increment_expression, pre_decrement_expression,
15850         unary_expression_not_plus_minus, unary_expression:): Actions are
15851         now building the corresponding unary expressions.
15852         (cast_expression:): Actions are now building cast expressions.
15853         (build_unresolved_array_type): New function.
15854         (create_interface): Reset the number of declared interfaces.
15855         (create_class): Likewise.
15856         (method_header): Methods declared within the scope of an interface
15857         are now implicitly set public and abstract.
15858         (java_complete_class): Variable's and parameter's type are patched
15859         with a promoted type.
15860         (declare_local_variables): Resolved non builtin types are promoted
15861         before being used to build a variable decl. Removed type patch
15862         posted on variable initialization statement.
15863         (source_start_java_method): Use build_decl_no_layout to build the
15864         decl of a parameter of incomplete type.
15865         (java_register_parsed_class): Process interfaces too. Call
15866         rest_of_decl_compilation on each processed class declarations.
15867         (java_complete_expand_methods): Don't attempt to expand things in
15868         interfaces.
15869         (java_complete_tree): Process CONVERT_EXPR, even though it always
15870         has a type. Propagate error_mark_node to node's type too. Promote
15871         method's call argument type and return error_mark_node if
15872         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
15873         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
15874         handle unary operator nodes.
15875         (build_assignment): Added comment.
15876         (print_int_node): New function.
15877         (patch_assignment): New second argument. New error handling. Use
15878         print_int_node. Handle references. Use can_cast_to_p to issue
15879         different error message according to the context and check upon
15880         the initialization of the RHS.
15881         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
15882         (operator_string): Handle more operators.
15883         (patch_binop): No longer use a function static
15884         wfl_operator. Improved error message on shift distance.
15885         (build_unaryop, build_incdec, build_cast, patch_unaryop,
15886         patch_cast): New functions.
15887
15888 1998-06-05  Per Bothner  <bothner@cygnus.com>
15889
15890         * jvspec.c:  New file.
15891         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
15892
15893         * java-tree.h (identifier_subst):  Add declaration.
15894
15895 1998-06-04  Tom Tromey  <tromey@cygnus.com>
15896
15897         * jvgenmain.c (main): Generate call to JvRunMain.
15898
15899         * class.c (make_class_data): Push value for "sync_info" field.
15900         * decl.c (init_decl_processing): Push "sync_info" field.
15901
15902 1998-06-03  Per Bothner  <bothner@cygnus.com>
15903
15904         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
15905         Java (source) name, not signature.
15906         Set TYPE_ALIGN to (at least) that of element_type.
15907
15908 1998-06-02  Per Bothner  <bothner@cygnus.com>
15909
15910         * class.c:  Moved classname-mangling-rekated code to ...
15911         * mangle.c:  ... this new file.
15912         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
15913         * Makefile.in:  Update for above changes.
15914
15915 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15916
15917         * expr.c (truthvalue_conversion): Convert integer and floating
15918         point value to their truth value.
15919         * lex.c (java_lex): Handle the `null' literal.
15920         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15921         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15922         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15923         New macros.
15924
15925         * parse.y: Reorganization/documentation on token declaration.
15926         (binop_lookup[]): New added new tree codes.
15927         (relational_expression): Build corresponding binary operators.
15928         (equality_expression, conditional_and_expression,
15929         conditional_or_expression): Likewise.
15930         (java_complete_class): Fix crash in debug message.
15931         (java_complete_tree): Check initialization of method call
15932         arguments. Further bogus node evaluation to detect more error
15933         during assignments. Handles more binary operators.
15934         (patch_assignment): Use DECL_P.
15935         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15936         code.
15937         (operator_string): Handle more case. Compacted source.
15938         (patch_binop): Changed function comment. Checking for
15939         uninitialized first operand takes the compound assignment into
15940         account and uses DECL_P. Checking for uninitialized second operand
15941         delayed to routine's end. Use macros to issue type bound error
15942         messages and issue messages on both operands if their types are
15943         different. Force fixed type into node. Handle all binary
15944         operators.
15945
15946 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15947
15948         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15949         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15950         build operator node and return tokens.
15951         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15952         * parse.h (java_complete_tree): Changed returned type in prototype.
15953         (build_method_invocation, build_assignment, patch_assignment,
15954         patch_binop): New static function declarations.
15955         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15956         BUILD_EXPR_WFL): New macros.
15957         * parse.y (enum tree_code binop_lookup[]): New static for token to
15958         TREE_CODE lookup.
15959         (%union): Parser union has new sub-structure `operator'.
15960         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15961         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15962         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15963         ASSIGN_ANY_TK): Tokens tagged `operator'.
15964         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15965         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15966         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15967         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15968         (assignment_operator:): Rule tagged `operator'.
15969         (expression_statement:): Re-installed default rule.
15970         (method_invocation:): Sub rules call build_method_invocation.
15971         (postfix_expression:): Don't attempt to resolve name here. Just
15972         return an ID.
15973         (multiplicative_expression:): Sub-rules build corresponding binop
15974         expression node.
15975         (additive_expression:, shift_expression:, and_expression:,
15976         exclusive_or_expression:, inclusive_or_expression:): Likewise.
15977         (assignment:): Sub rule invoke build_assignment.
15978         (assignment_operator:): Default rules on sub rules.
15979         (force_error): Added documentation on this variable.
15980         (declare_local_variables): Build initialization calling
15981         build_assignment.
15982         (expand_start_java_method): Removed unused rtx declaration. Mark
15983         arguments as already initialized.
15984         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15985         (java_complete_expand_methods): Don't process next method if
15986         completion of the previous one triggered errors.
15987         (java_complete_expand_method): Call source_end_java_method if no
15988         error were found during completion.
15989         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15990         locals declaratilon. Handle names found within a class. Return
15991         error_mark_node when things aren't found.
15992         (patch_method_invocation_stmt): Return error_mark_node on failures.
15993         (patch_invoke): Removed unused local. Return the correct node.
15994         (java_complete_tree): Now returns a value. The BLOCK section binds
15995         local identifiers and the type of a BLOCK is now void. Assign the
15996         result of operand completion on COMPOUND_EXPR. Assign the
15997         encapsulated node of a WFL to the result of its completion, except
15998         when the node is an identifier. Now handle MODIFY_EXPR and several
15999         binary operators. Return error_mark_node on errors.
16000         (build_method_invocation, build_assignment, patch_assignment,
16001         build_binop, operator_string, patch_binop): New functions.
16002         * typeck.c (binary_numeric_promotion): New function.
16003
16004 1998-05-21  Per Bothner  <bothner@cygnus.com>
16005
16006         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
16007         Replace most uses of ident_subst by identifier_subst.
16008
16009         * class.c (push_class_static_dummy_field):  Removed function.
16010         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
16011         instead of looking got "class" static field.  Create that decl here.
16012         (class_identifier_node):  Removed;  no longer needed.
16013         (init_class_processing):  Don't init class_identifier_node.
16014         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
16015         Do nreverse 0 times (instead of twice) for Object and Class.
16016         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
16017
16018 1998-05-20  Per Bothner  <bothner@cygnus.com>
16019
16020         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
16021         while initializing linenumber_count and linenumber_table.
16022         Do it before init_function_start (which calls emit_line_note).
16023         * expr.c (expand_byte_code):  Don't need to clear lineno here.
16024
16025 1998-05-18  Tom Tromey  <tromey@cygnus.com>
16026
16027         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
16028         then mangle number as _N_.
16029
16030         * class.c (mangle_class_field): New function.
16031         (build_class_ref): Set assembler name of class reference using
16032         mangle_class_field.
16033         (push_class_static_dummy_field): Likewise.
16034
16035 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
16036
16037         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
16038         of assigning to TREE_CODE.  The latter method exploits a feature
16039         of GCC that is not ANSI compliant.
16040
16041 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16042
16043         * decl.c (pushdecl_force_head): New function.
16044         (pushlevel): Removed conditional printf.
16045         (complete_start_java_method): Don't enter local variable scope if
16046         function is compiled from source code.
16047         * expr.c: parse.h now included
16048         (java_lang_expand_expr): New function.
16049         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
16050         printf. Terminate buffer when doing directories.
16051         * jcf-parse.c (parse_source_file): Call lang_init_source before
16052         parsing and before code generation.
16053         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
16054         use printf if the macro is defined.
16055         * lang.c (lang_init): Install lang_expand_expr hook on
16056         java_lang_expand_expr.
16057         (java_dummy_print): New function.
16058         (lang_init_source): New function.
16059         * lex.c (java_lex): Remember location of an opening brace at the
16060         second nesting level.
16061         (java_is_eol): Unget character seen after a CR if it is EOF.
16062         * parse.h: Now includes lex.h
16063         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
16064         printf if the macro is defined.
16065         (expand_start_java_method, build_expr_block, enter_block,
16066         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
16067         New static function declarations.
16068         (pushdecl_force_head): New extern function declaration.
16069         (INCOMPLETE_TYPE_P): New macro.
16070         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
16071         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
16072         BLOCK_EXPR_ORIGIN): New macros.
16073         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
16074         DECL_SOURCE_LINE_LAST): New macros.
16075         (struct parser_ctxt): Removed field current_method_decl, redundant
16076         with the field current_function_decl. Added fields
16077         first_ccb_indent1 and pending_block.
16078         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
16079         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
16080         tagged <node>
16081         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
16082         (compilation_unit:): Cosmetic on sub rule.
16083         (type_declaration:): Cosmetic on sub rules. Added an error rule.
16084         (variable_initializer:): Installed default rule on expression:.
16085         (method_declaration:): method_header: starts a new
16086         method. method_body: installs the function body, absorbs blocks
16087         emitted for temporary variable scopings, pops function's body block
16088         and merges function's last statement lineno in DECL_SOURCE_LINE.
16089         (method_body:): Installed default rules.
16090         (block:): Call enter_block when an opening brace is seen.  Absorb
16091         scoping blocks and call exit_block when a closing brace is seen.
16092         (block_statement:): Cosmetic changes.
16093         (method_invocation:): Create WFL around CALL_EXPR node.
16094         (patch_stage): Added comment around definition.
16095         (method_header): Try to use first_ccb_indent1 as the first line of
16096         the method, so BP debug info are emitted at the first opening
16097         brace of the function. If the function has no body, use the
16098         location of the function's name. Override currently defined method
16099         name with the matching WFL so we can point redefinition errors
16100         using the location where the function's name was declared.
16101         (check_abstract_method_header): Interprets DECL_NAME as an
16102         identifier or as a WFL, accordingly.
16103         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
16104         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
16105         location and name information out of it and reinstall DECL_NAME to
16106         its original identifier node value.
16107         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
16108         function's source code).
16109         (read_import_dir): Test the value returned by find_class and issue
16110         a fatal accordingly.
16111         (declare_local_variables): Push a new block for the scope of the
16112         new variable(s) if code has been already generated at that nesting
16113         level. Pinpoint redefinition errors using the variable id
16114         WFLs. Generate initialization code if necessary. If the variable
16115         type is incomplete, register a patch on its decl.
16116         (source_start_java_method): Rewritten. Define a new block for the
16117         function's parameters. Build parameter decl out of function's
16118         arguments and register them for a patch if their types are
16119         incomplete.
16120         (expand_start_java_method): Includes the part of
16121         source_start_java_method that was pushing the parameter decls and
16122         completing the method start code.
16123         (source_end_java_method): Removed call the expand_end_bindings and
16124         poplevel (already taken care of). Reinstall function's arguments
16125         and get function's last line of code before calling
16126         expand_function_end.
16127         (java_method_add_stmt): New comment before the function's
16128         code. Complement the second operand of the current COMPOUND_EXPR
16129         if necessary.
16130         (java_complete_expand_methods): Don't generate debug info on line
16131         zero when expanding a generated constructor.
16132         (java_complete_expand_method): Set start and end line numbers for
16133         a artificially generated constructor to one and manually call
16134         enter_block and exit_block when defining it. For all methods:
16135         expand function's start calling the new expand_start_java_method
16136         and invoke java_complete_tree on the effective method's body, if
16137         any.
16138         (resolve_expression_name): Now use lookup_name_in_blocks to search
16139         local variable decls and print out an error when variables are
16140         undefined.
16141         (patch_method_invocation_stmt): Inserted comment before the
16142         function's code.
16143         (lookup_method_invoke): Chain method's arguments using chainon
16144         with the current arg list as a second argument. Inserted missing
16145         IDENTIFIER_POINTER when reporting an error on methods not found.
16146         (refine_accessible_methods_list): Don't retain constructors.
16147         (patch_arguments): Function removed.
16148         (java_complete_tree): Inserted comment before the function's
16149         code. New case for BLOCKs. Moved the WFL case a bit
16150         further. Complete function's arguments.
16151         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
16152         maybe_absorb_scoping_blocks): New functions.
16153
16154 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16155
16156         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
16157         previously set.
16158         * jcf-parse.c (parse_source_file, java_error_count): New forward
16159         and extern declarations.
16160         (java_parse_abort_on_error): Macro moved.
16161         (jcf_parse_source): fatal called if fopen fails. Now calls
16162         parse_source_file.
16163         (parse_source_file): New parse_only parameter. Reflects the
16164         elimination of the second pass.
16165         (yyparse): parse_source_file called with argument set to 0.
16166         * jcf.h (JCF_ZERO): Sets java_source to zero.
16167         * lex.c (java_init_lex): pass argument is gone. Function modified
16168         to be called once during the analysis of a file.
16169         (java_unget_unicode): Fixed typo in fatal message.
16170         (java_get_line_col): Likewise.
16171         (java_lval): Likewise. String literals no longer built during
16172         second pass.
16173         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
16174         account.
16175         * parse.h (MODIFIER_WFL): New macro.
16176         (parse_check_super, parser_check_super_interface): Now return int.
16177         (parser_chain_incomplete_item, not_builtin_p,
16178         complete_method_decl): Declarations removed.
16179         (build_method_invocation_stmt, build_invoke): Renamed using the
16180         `patch' instead of `build'
16181         (register-incomplete_type, obtain_incomplete_type,
16182         java_complete_tree, java_complete_expand_method,
16183         unresolved_type_p, create_jdep_list): New function declarations.
16184         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
16185         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
16186         (jdep): New typedef on new struct _jdep.
16187         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
16188         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
16189         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16190         JDEP_RESOLVED_P): New macros.
16191         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
16192         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
16193         JDEP_VARIABLE): New enum values and jdep kinds.
16194         (jdeplist): New typedef on struct _jdeplist.
16195         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
16196         macros.
16197         (CALL_EXPR_PRIMARY): New macro.
16198         (struct parser_ctxt): Fields java_pass, current_method_decl,
16199         method_decl_list deleted. New field jdeplist.
16200         (INCOMPLETE_P): Macro deleted.
16201         * parse.y (single_type_import_declaration:): Removed pass switch.
16202         (type_import_on_demand_declaration): Likewise.
16203         (field_declaration:): Removed pass switch on all sub rules.
16204         (class_declaration:): Call the complete_class_decl removed on
16205         class_body rules.
16206         (method_declaration:): Removed second pass switch. No longer chain
16207         methods decl when method_header reduced.
16208         (method_header:): Sub rules no longer depend on pass switch.
16209         (method_declarator:): Likewise.
16210         (method_body:): Likewise.
16211         (abstract_method_declaration:): Likewise.
16212         (block_statement:): Likewise.
16213         (local_variable_declaration:): Likewise.
16214         (argument_list:): Likewise.
16215         (method_invocation:): Likewise. Call to build_method_invocation_stmt
16216         removed. Partial CLASS_EXPR tree node built instead.
16217         (postfix_expression:): Removed pass switch on all sub rules.
16218         (java_pop_parser_context): Free classd_list content.
16219         (yyerror): Call obstrack_grow0 to finalize error message.
16220         (check_class_interface_creation): Comment modified to reflect new
16221         returned value meaning. Removed second pass switch. Return 1 if an
16222         error was found, 0 otherwise. Adjust pointer on filename if a
16223         leading path separator was found.
16224         (maybe_create_class_interface_decl): Removed first pass switch
16225         when linking the class decl to the class_list. Install a new
16226         jdep_list for the class.
16227         (add_superinterfaces): List of unresolved interfaces is
16228         gone. Unresolved interfaces are directly added to the current
16229         dependencies list.
16230         (create_interface): Second pass shortcut removed.
16231         ctpx->modifier_ctx access through MODIFIER_WFL.
16232         (create_class): Second pass shortcut removed. Call to
16233         register_incomplete_type replaces the call to
16234         parser_chain_incomplete_item.
16235         (complete_class_decl): Function removed.
16236         (duplicate_declaration_error): New way of retrieving redeclared
16237         item type.
16238         (register_fields): Call to lookup_modifier_cl replaced by
16239         MODIFIER_WFL. New way of handling unresolved type, using
16240         unresolved_type_p and obtain_incomplete_type.
16241         register_incomplete_type replaces call to parser_chain_incomplete_item.
16242         (patch_stage): New static global variable.
16243         (method_header): New way of handling unresolved type, using
16244         unresolved_type_p and obtain_incomplete_type. patch_stage used to
16245         indicates that the method decl needs to be patched.
16246         (check_abstract_method_header): Call to lookup_modifier_cl
16247         replaced by MODIFIER_WFL.
16248         (method_declarator): Incomplete argument type are registered
16249         calling register_incomplete_type. Patch on the declared method is
16250         issued in that case.
16251         (unresolved_type_p): New function.
16252         (parser_check_super_interface): New comment to reflect function's
16253         modified returned type (int). Function and has a new argument
16254         this_wfl. Call to parse_error_context uses this_wfl instead of
16255         relying on lookup_cl.
16256         (parser_check_super): Comment reflects function's new returned
16257         type (int). Function returns nonzero value on error.
16258         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
16259         register_incomplete_type, jdep_resolve_class): New functions to
16260         handle incomplete types in declarations.
16261         (java_complete_class): Rewritten to work with the new incomplete
16262         type handling scheme.
16263         (complete_class_report_errors): Likewise.
16264         (complete_method_decl): Removed: it jobs is now handled by
16265         java_complete_class.
16266         (do_resolve_class): Class loaded in not already loaded and not
16267         found in Java source code.
16268         (java_check_regular_methods, java_check_abstract_methods): Don't
16269         call complete_method_decl anymore.
16270         (lookup_modifier_cl, not_builtin_p): Functions deleted.
16271         (read_import_dir): Got rid of the pass number dependency.
16272         (declare_local_variables): New handling of unresolved types (patch
16273         issued).
16274         (source_start_java_method): New parameter level. Function called
16275         with level set to 1 when argument types are potentially
16276         unresolved.  Called to complete the job with level set to 2 once
16277         types are complete.
16278         (source_end_java_method): Call to permanent_allocation
16279         removed. Waiting to be replaced by a more suitable obstack
16280         management.
16281         (java_complete_expand_methods, java_complete_expand_method,
16282         java_expand_finals): New functions.
16283         (build_method_invocation_stmt): Renamed
16284         patch_method_invocation_stmt. Extracts function call expression
16285         (wfl) and arguments (args) from CALL_EXPR tree operands.
16286         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
16287         call. Patch the function and argument operand of the CALL_EXPR
16288         tree argument.
16289         (patch_argument, java_complete_tree): New functions.
16290
16291 1998-04-20  Per Bothner  <bothner@cygnus.com>
16292
16293         Recover from missing fields and methods (i.e. error instead of fatal).
16294         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
16295         * expr.c (expand_invoke):  Recover from missing method.
16296         (expand_java_field_op):  Recover from missing field.
16297         Inline references to java.lang.{Integer,Char,...}.TYPE.
16298         * typeck.c (get_type_from_signature), java-tree.h:  New function.
16299         * class.c (add_method):  Use get_type_from_signature.
16300         (build_class_ref):  Handle a class that was not found.
16301         * typeck.c (convert):  Handle conversion to pointers (for convenience).
16302         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
16303         instead of lookup_field to handle missing fields.
16304
16305         * jcf-parse.c (process_zip_dir):  Set java_source.
16306
16307 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
16308
16309         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
16310
16311 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16312
16313         * jcf-parse.c (load_class): Don't change input_filename before
16314         calling jcf_parse_source (but still do it before calling
16315         jcf_parse).
16316         (jcf_parse_source): Assign input_filename after having saved the
16317         parser context.
16318         * lex.c (java_init_lex): Chain a WFL node to the import on demand
16319         list. ctxp->modifier_ctx zeroed according to its new
16320         definition. ctxp->filename initialized. Removed
16321         JAVA_MODIFIER_CTX_UNMARK.
16322         (java_unget_unicode): Update the character based column position.
16323         (java_allocate_new_line): ref_count not used anymore. Always free
16324         ctxp->p_line. Initialize c_line->char_col to 0.
16325         (java_get_unicode): Update the character based column position.
16326         (java_lex): Use ctxp->elc to store current position in source
16327         file, at the beginning of the parsed token. Set modifier_ctx entry
16328         corresponding to the parse modifier to a WFL node. Return a WFL
16329         node when an identifier is parsed.
16330         (java_lex_error): Now uses ctxp->elc to store current position in
16331         source.
16332         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
16333         * lex.h (build_wfl_node): New function definitions.
16334         (struct java_line): ref_count and next fields are gone. New field
16335         char_col.
16336         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16337         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
16338         (JAVA_COLUMN_DELTA): New macro.
16339         (java_lc): New typedef on new struct _java_lc.
16340         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
16341         (parse_error_context, parse_warning_context): Changed prototypes.
16342         (java_get_line_col): Added as an available global function.
16343         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
16344         (IC_DECL): Replaced by macro IC_TYPE
16345         (DEPEND_WFL): New macro.
16346         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
16347         wrong modifier.
16348         (exit_java_complete_class): Removed a commented out statement.
16349         (struct parser_ctxt): Added comments on fields. modifier_ctx is
16350         now an array of tree nodes. Deleted fields line_list and
16351         e_line. New field elc, to replace e_line.
16352         * parse.y (array_type:): Build WFL node.
16353         (qualified_name:): Build a single WFL node out of two. Retain
16354         the location information of the first node in the resulting node.
16355         (package_declaration:): Use package name as a WFL node
16356         (single_type_import_declaration:): Use imported name as a WFL node.
16357         (type_import_on_demand_declaration:): Use root of the imported
16358         packages as a WFL node.
16359         (field_declaration:): Removed unused local variable cl.
16360         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
16361         (yyerror): New static elc. Removed static error_line, error_pos.
16362         New local code_from_source. Save ctxp->elc into elc at the first
16363         pass. Call java_get_line_col to get a string of the line where
16364         the error occurred.
16365         (debug_line): Removed static function.
16366         (parse_error_context, parse_warning_context): Parameter cl is now
16367         a WFL node. Use its value to initialize ctxp->elc.
16368         (redefinition_error): Parameter cl is now a WFL node.
16369         (parse_add_interface): New parameter wfl. No longer call
16370         lookup_cl, use wfl instead.
16371         (check_class_interface_creation): Parameter cl is now a WFL node.
16372         (maybe_create_class_interface_decl): Likewise.
16373         (add_superinterfaces): New function.
16374         (create_interface): Removed local cl, node, super_decl,
16375         super_decl_type.  Function now uses id as a WFL node. Better
16376         warning/error report on obsolete or forbidden mix of
16377         modifiers. Now calls add_superinterfaces to register interfaces.
16378         (create_class): Removed local cl, node. Local variable id is used
16379         as a WFL node. Better error report on forbidden modifier
16380         mix. Uses add_superinterfaces to register interfaces.
16381         (find_field): Argument cl is now a WFL node. Now store the WFL
16382         node of a fields that needs to be checked for their
16383         initialization.
16384         (method_header): Local variable node non longer used. Local
16385         variable id replaces cl.
16386         (check_modifiers_consistency): Local variable cl is now a WFL
16387         node.
16388         (method_declarator): Local variable cl replaced by parameter id.
16389         (parser_qualified_name): Now uses parameter name as a WFL node.
16390         (parser_check_super_interface): New parameter wfl, for achieve
16391         greater accuracy during error reports.
16392         (parser_chain_incomplete_item): New parameter named location. Used,
16393         along the decl, to construct the incomplete item node.
16394         (java_complete_class): resolve_class now uses WFL node extracted
16395         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
16396         where appropriate.
16397         (complete_method_decl): Unresolved function's argument types are WFL.
16398         (resolve_class): Parameter cl is now a WFL node.
16399         (resolve_and_layout): Likewise.
16400         (do_resolve_class): Likewise. Try first to use cl and then do the
16401         lookup on the decl when calling check_pkg_class_access.
16402         (complete_class_report_errors): Use IC_TYPE in place of
16403         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
16404         instead of doing a lookup over the decl.
16405         (java_check_final): Use WFL info from field tree list.
16406         (lookup_cl): Rewritten and returns a statically defined WFL node.
16407         (lookup_modifier_cl): Now uses information from WFL nodes.
16408         (process_imports): Likewise.
16409         (read_import_dir): name and cl arguments replaced by a single WFL
16410         node. Function modified accordingly.
16411         (find_in_imports_on_demand): Now uses WFL node.
16412         (check_pkg_class_access): cl argument is now a WFL node.
16413         (declare_local_variables): Fixed to use WFL nodes.
16414         (resolve_expression_name): Likewise.
16415         (build_method_invocation_stmt): name_combo argument renamed
16416         wfl. Function modified to use WFL nodes.
16417         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
16418         (lookup_method_invoke): cl is now a WFL node. Added missing
16419         IDENTIFIER_POINTER to class type decl name.
16420
16421 1998-04-14  Dave Brolley  <brolley@cygnus.com>
16422
16423         * lang.c (init_parse): Now returns char* containing the filename.
16424
16425 1998-04-10  Per Bothner  <bothner@cygnus.com>
16426
16427         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
16428
16429         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
16430         * class.c (make_class_data):  If flag_assume_compiled, initial class
16431         state is CSTATE_PREPARED; make superclass and interfaces direct
16432         references, rather than constant pool indexes.
16433
16434 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16435
16436         * parser.y: Include flags.h. Removed debug variable pl.
16437         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
16438         (block:): Likewise.
16439         (labeled_statement_nsi:): Generate debug info when reducing
16440         expression_statement:.
16441         (check_pkg_class_access): get_access_flags_from_decl invocation
16442         fixed for new CLASS_* flags location.
16443         (source_end_java_method): Save/restore parser context when
16444         entering/leaving this routine. Restore lineno to its right value
16445         before calling expand_end_bindings.
16446         (build_method_invocation_stmt): build_invoke called with the
16447         current line information.
16448         (build_invoke): New argument cl. Wrap the function call around a
16449         wfl node.
16450         (refine_accessible_methods_list): Changed comment, removed
16451         unnecessary code.
16452         * parse.h: Fixed typo in comments.
16453         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
16454         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
16455         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
16456         parser_ccb_indent.
16457         * lex.c (java_lex): Record the last closing curly bracket of a
16458         function.
16459         * jcf-parse.c (jcf_parse_source): Now calls
16460         java_check_methods. Clarified comment, fixed typo.
16461
16462 1998-04-09  Dave Brolley  <brolley@cygnus.com>
16463
16464         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
16465         (finish_parse): Expose for non USE_CPPLIB builds.
16466
16467 1998-04-08  Jeffrey A Law  (law@cygnus.com)
16468
16469         * lang.c (lang_print_xnode): New function.
16470
16471 1998-04-03  Per Bothner  <bothner@cygnus.com>
16472
16473         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
16474         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
16475         used to build a class's dispatch table.
16476         (make_class_data):  Generate dispatch table if flag_assume_compiled.
16477         Set dtable of class object to address of class_dtable_decl.
16478
16479         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
16480         be volatile and have side effects - generates better code.
16481
16482         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
16483         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
16484
16485         * expr.c (expand_invoke):  If class is final, method is
16486         effectively final, so can call it directly.
16487
16488         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
16489
16490         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
16491
16492 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16493
16494         * parse.y (build_method_invocation_stmt): Removed extra argument
16495         to build_invoke.
16496
16497 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16498
16499         * expr.c (dtable_indent): Now static global.
16500         (expand_invoke): Now call invoke_build_dtable and
16501         build_invokevirtual.
16502         (invoke_build_dtable, build_invokevirtual): New functions.
16503         * jcf-io.c (find_class): Defer issuing a warning by setting
16504         jcf->outofsynch to 1.
16505         * jcf-parse.c (jcf_out_of_synch): New function.
16506         (load_class): Test this_jcf.outofsynch flag and call
16507         jcf_out_of_synch accordingly.
16508         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
16509         comment indentation.
16510         * lex.c (java_get_unicode): Fixed code indentation.
16511         (java_lex): Create string literal. Fixed typo. Removed several
16512         premature obstack_free.
16513         * parse.h: New enums for name resolution and invocation mode.
16514         (struct qualification): New data structure.
16515         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
16516         (do_resolve_class, build_method_invocation_stmt,
16517         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
16518         debug_line, identical_subpath_p, invocation_mode,
16519         refine_accessible_methods_list, build_invoke,
16520         lookup_method_invoke): New functions declared.
16521         (build_invokevirtual, invoke_build_dtable, match_java_method,
16522         build_field_ref, jcf_out_of_synch): New references to external
16523         functions.
16524         (struct parse_ctxt): Removed artificial_constructor field.
16525         * parse.y: (array_type:): Type defined for this rule.
16526         (class_type:): Installed default rule for interface_type:.
16527         (array_type:): Now build Java array type.
16528         (qualified_name:): Now use obstack_grow0.
16529         (method_declaration:): Skip the artificial constructor added to
16530         the list, if any.
16531         (abstract_method_declaration:): Execute the code only during pass 1.
16532         (block:): Installed default rule in block_statements:.
16533         (block_statement:): Add the statement to the method during pass 2.
16534         (statement_expression): Installed default rule for
16535         method_invocation:.
16536         (argument_list:): Added code to build the argument list.
16537         (method_invocation:): Added call to create the method invocation
16538         node.
16539         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
16540         (debug_line): New function for debug.
16541         (complete_class_decl): No longer do something during pass 1.
16542         (method_header): Use BUILD_PTR_FROM_NAME.
16543         (parser_qualified_classname): Use obstack_grow0. Removed bogus
16544         obstack_free.
16545         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
16546         function's main comment.
16547         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
16548         classes.
16549         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
16550         (resolve_class): Now works with arrays.
16551         (do_resolve_class, resolve_and_layout): New functions.
16552         (java_check_regular_methods): Reverse method list before and after
16553         having processed it. No longer set ctxp->artificial_constructor.
16554         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
16555         accordingly. Fixed typo in issued error message. Now use
16556         obstack_grow0.
16557         (find_in_imports_on_demand): Now use obstack_grow0.
16558         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
16559         (source_end_java_method): Call expand_expr_stmt instead of
16560         expand_expr. Calls it before calling expand_function_end.
16561         (java_method_add_stmt): Do nothing if errors were found during
16562         parsing.
16563         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
16564         (build_method_invocation_stmt, build_invoke, invocation_mode,
16565         lookup_method_invoke, refine_accessible_methods_list,
16566         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
16567         New functions.
16568         * typeck.c (build_java_signature): Properly end method signature
16569         if return type skipped.
16570         (match_java_method): New function.
16571
16572 1998-03-16  Per Bothner  <bothner@cygnus.com>
16573
16574         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
16575
16576 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16577
16578         * expr.c (build_invoke_non_interface): New function.
16579         (methods_ident, ncode_ident): Now static globals.
16580         (expand_invoke): Use build_invoke_non_interface.
16581         * java-tree.h (struct lang_decl): New field function_decl_body.
16582         (DECL_FUNCTION_BODY): New macro.
16583         * jcf-parse.c (jcf_parse_source): Deeper check before setting
16584         CLASS_FROM_SOURCE_P.
16585         (parse_source_file): Fixed typos. Call java_layout_parsed_class
16586         before starting pass 2. Call to java_generate_parsed_class replaced
16587         by java_register_parsed_class.
16588         * lex.c: Fixed typo in header. Some line width related formating.
16589         * lex.h: Some line width related formating.
16590         * parse.h (source_end_java_method, resolve_expression_name,
16591         complete_class_decl, maybe_create_class_interface_decl,
16592         check_class_interface_creation): New static function declarations.
16593         (java_layout_parsed_class, java_method_add_stmt): New function
16594         declarations.
16595         (struct parser_ctxt): Field mark_class_generate removed. New
16596         fields class_list and artificial_constructor.
16597         * parse.y: Fixed typo in header.
16598         (class_declaration:): Call complete_class_decl when class body
16599         parsed.
16600         (method_declaration:): Call source_end_java_method in pass 2 when
16601         the method body is defined.
16602         (postfix_expression:): Do expression name resolution on sub-rule
16603         name during pass 2.
16604         (create_class, create_interface): Merged common pieces.
16605         (check_class_interface_creation, maybe_create_class_interface_decl):
16606         New functions.
16607         (complete_class_decl): New function.
16608         (register_fields): Fixed line width related typo.
16609         (method_header): Correctly skip first argument when fixing
16610         argument line. Changed the loop.
16611         (java_check_circular_reference): Now use ctxp->class_list.
16612         (java_complete_class): Removed start/stop marking.
16613         (java_check_regular_methods): Now takes a class decl as an
16614         argument.  Add default constructor if none were encountered.
16615         (java_check_methods): Now use ctxp->class_list. Changed call to
16616         java_check_regular_methods.
16617         (source_start_java_method): Set DECL_ARG_TYPE for each function
16618         arguments.
16619         (source_end_java_method, java_method_add_stmt): New functions.
16620         (java_generate_parsed_class): No longer exists.
16621         (java_layout_parsed_class, java_register_parsed_class): New functions.
16622         (resolve_expression_name): New function.
16623
16624 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16625
16626         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
16627         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
16628         until pass initializations are done. Call read_import_dir with
16629         pass set to 0.
16630         * parse.h: (lookup_modifier_cl): New function declared.
16631         (INTERFACE_FIELD_MODIFIERS): New macro.
16632         (OBSOLETE_MODIFIER_WARNING): New macro.
16633         * parse.y: (register_fields): Class type and current field name in
16634         local variables. Check modifier(s) if adding field(s) to an interface.
16635         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
16636         and report errors using the faulty modifier line context.
16637         (lookup_modifier_cl): New function.
16638         (read_import_dir): Detect and report default import processing
16639         failure.
16640
16641 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
16642
16643         Add a pair of -fassume-compiled/-fno-assume-compiled options.
16644         * class.c (is_compiled_class): Return 1 after making sure it
16645         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
16646         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
16647         * java-tree.h (flag_assume_compiled): Add decl.
16648         * lang.c (lang_f_options): Add the flag.
16649         (flag_assume_compiled): Add decl, default to 0.
16650
16651 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16652
16653         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
16654         (is_compiled_class): Likewise.
16655         (layout_class): Likewise.
16656         (layout_class): Detect and lay out classes defined in source code.
16657         (interface_of_p, add_interface_do, may_add_interface): New
16658         function.
16659         (add_interface): Now use add_interface_do.
16660         (add_method_1): New function.
16661         (add_method): Now use add_method_1.
16662         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
16663         (complete_start_java_method): New function.
16664         (start_java_mehod): Now call complete_start_java_method.
16665         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
16666         (expand_invoke): Likewise and fixed typo.
16667         *gjava.c: (print_super_field): Use new argument to find_class
16668         DO_CLASS_FILE.
16669         (main): Likewise.
16670         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
16671         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
16672         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
16673         IDENTIFIER_NODE.
16674         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
16675         (add_method_1, push_class): New prototypes.
16676         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
16677         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
16678         directory where the class was found.
16679         (find_class): New argument DO_CLASS_FILE. Function find_class
16680         modified accordingly.
16681         *jcf-parse.c: (fix_class_path): New function.
16682         (load_class): Use new VERBOSE argument. load_class now finds and
16683         loads/parses .class/.java files. Save read_state of current_jcf
16684         if necessary.
16685         (java_parser_abort_on_error): New macro.
16686         (jcf_parse_source, parse_source_file): New function.
16687         (jcf_parse): Fixed typo.
16688         (yyparse): Call parse_source_file () only.
16689         (process_zip_dir): Fixed typo, fix zdir->filename_length when
16690         writing the real class name back in the zip directory entry.
16691         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
16692         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
16693         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
16694         (find_class): Prototype fixed.
16695         *lex.c: Added 1998 time stamp.
16696         Removed all static global variables, moved into the parser
16697         context data structure.. Now include unistd.h if SEEK_SET not
16698         defined.
16699         (java_init_lex): Rewritten.
16700         (java_sneak_unicode): Modified current unicode access in current line.
16701         (java_unget_unicode): Likewise.
16702         (java_allocate_new_line): New allocation management.
16703         (java_read_char): Modified access and storage of unget_utf8_value.
16704         New way of processing current unicode.
16705         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
16706         (java_get_unicode): Now use the parser context.
16707         (java_lineterminator): Likewise.
16708         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
16709         of the reentrant parser implementation. Function now use the
16710         parser context data structure and java_lval. Fixed production of
16711         the float and double constant "out of range" error message. Fixed
16712         obstack use. Return integer value when hitting a modifier. Now
16713         return type for TRUE, FALSE and other predefined types. Return
16714         identifier as a TREE_LIST list containing the current line context
16715         as the TREE_VALUE sub-node.
16716         (java_unicode_2_utf8): Fixed typo in declaration.
16717         (java_lex_error): Now use the parser context data structure.
16718         *lex.h: Added 1998 time stamp.
16719         (struct java_line): New fields ref_count and next.
16720         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16721         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
16722         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
16723         *parse.h: Added 1998 time stamp.
16724         (java_parse_source_file): Renamed from parse_source_file.
16725         (YYERROR_NOW, YYNOT_TWICE): Fixed.
16726         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
16727         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
16728         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
16729         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
16730         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
16731         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
16732         (struct parser_ctxt): New data structure to keep the parser context.
16733         *parse.y: Added 1998 time stamp, got rid of static global variables.
16734         (java_error_count, ctxp): New global variables.
16735         (%union): New value field.
16736         (numeric_type, integral_type): Rules removed.
16737         (primitive_type): Rule defined to handle integral, float, double and
16738         boolean types.
16739         (qualified_name, package_declaration,
16740         single_type_import_declaration, type_import_on_demand_declaration,
16741         modifiers, class_declaration, super, interfaces,
16742         interface_type_list, class_body, field_declaration,
16743         field_declaration, variable_declarators, variable_declarator,
16744         variable_declarator_id, method_declaration, method_header,
16745         formal_parameter_list, formal_parameter, method_body, block,
16746         static, interface_declaration, extends_interfaces,
16747         abstract_method_declaration, local_variable_declarators): Rules now
16748         define actions.
16749         (force_error, do_warning): New global statics.
16750         (push_parser_context, parser_context_save_global,
16751         parser_context_restore_global, pop_parser_context): New functions.
16752         (yyerror): Now uses the global parser context. Fixed use of obstack.
16753         (parse_error, parse_error_context, parse_warning_context,
16754         java_accstring_lookup, redefinition_error, check_modifiers,
16755         parser_add_interface, create_interface, create_class, find_field,
16756         duplicate_declaration_error, register_fields, method_header,
16757         check_modifiers_consistency, check_abstract_method_header,
16758         method_declarator, parser_qualified_classname,
16759         parser_check_super_interface, parser_check_super,
16760         parser_chain_incomplete_item, java_check_circular_reference,
16761         layout_class_from_source, java_complete_class,
16762         complete_method_decl, resolve_class, complete_class_report_errors,
16763         java_check_final, check_method_redefinition,
16764         java_check_regular_methods, java_check_abstract_methods,
16765         java_check_methods, lookup_java_interface_method2,
16766         lookup_java_method2, lookup_cl, find_name_in_single_imports,
16767         process_imports, find_in_imports, read_import_entry,
16768         read_import_dir, find_in_imports_on_demand,
16769         check_pkg_class_access, not_builtin_p, declare_local_variables,
16770         source_start_java_method, java_generate_parsed_class): New
16771         functions.
16772         *typeck.c: (signature_include_return): New global variable.
16773         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
16774         to add the function returned type in the signature.
16775
16776 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
16777
16778         * jcf-io.c (open_in_zip): Use strncmp and LEN.
16779
16780 1998-01-29  Dave Brolley  <brolley@cygnus.com>
16781
16782         * Make-lang.in (java.info): Added.
16783         (java.install-info): Added
16784
16785 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
16786
16787         * Makefile.in (clean): Also remove java/parse.c.
16788
16789 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
16790
16791         Add a pair of -fbounds-check/-fno-bounds-check options.
16792         * lang.c (lang_decode_option): Add code to grok arguments.
16793         (flag_bounds_check): Add decl.
16794         (lang_f_options): New array w/ the option in it.
16795         * java-tree.h (flag_bounds_check): Add decl.
16796         * lang-options.h: New file.
16797         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
16798         of a static macro value.
16799         (JAVA_ARRAY_EXCEPTION): Delete macro.
16800
16801 1998-01-23  Per Bothner  <bothner@cygnus.com>
16802
16803         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
16804         * expr.c (build_anewarray):  Add missing promote_type.
16805
16806 1998-01-22  Per Bothner  <bothner@cygnus.com>
16807
16808         Add array types with known length to optimize bounds checking.
16809         * typeck.c (build_java_array_type):  Take length parameter.
16810         (java_array_type_length, build_prim_array_type):  New functions.
16811         * java-tree.h:  Update for new functions.
16812         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
16813         * class.c:  Use build_prim_array_type.
16814         * expr.c (can_widen_reference_to):  Handle known-length array types.
16815         (verify_jvm_instructions):  Keep track of integer push instructions
16816         followed by newarray/anewarray, so we can build known-length arrays.
16817         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
16818         (java_array_data_offset):  New function.
16819         (build_java_array_length_access):  New function.  Optimize if constant.
16820         (build_java_arrayaccess):  Constant fold bounds check.
16821         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
16822         (build_newarray, build_anewarray):  New functions.
16823         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
16824         * verify.c (merge_types):  Handle known-lengh array types.
16825
16826 1998-01-19  Per Bothner  <bothner@cygnus.com>
16827
16828         * expr.c (expand_byte_code):  Fix performace bug, which caused
16829         searching linenumber_table to be linear rather than constant.
16830
16831 1997-12-12  Per Bothner  <bothner@cygnus.com>
16832
16833         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
16834
16835         * decl.c, java-tree.h (soft_fmod_node):  New global.
16836         * decl.c (init_decl_processing):  Define __builtin_fmod.
16837         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
16838         using __builtin_fmod.
16839
16840 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16841
16842         * keyword.h: New file, output of keyword.gperf as processed by
16843         gperf.
16844         * lex.c (java_lex_init): Initialize java_error_flag.
16845         * parse.c (YYERROR_NOW): Uses java_error_flag.
16846         * parse.y: New static java_error_flag. Useless definition of
16847         buffer_error gone.
16848         * parse.y (java_error): Portable error recovery using
16849         java_error_flag (not yet completely tuned).
16850
16851 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
16852
16853         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
16854
16855 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16856
16857         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
16858         (parse.c, lex.c, keyword.h): New rules for Java source code
16859         front-end.
16860         * parse.c: Renamed into jcf-parse.c.
16861         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
16862         * keyword.gperf: New file, Java keywords.
16863         * parse.y: New file, Java language grammar.
16864         * parse.h: New file, Java language grammar definitions.
16865         * lex.c: New file, Java language lexer.
16866         * lex.h: New file, Java language lexer definitions.
16867
16868 1997-12-03  Per Bothner  <bothner@cygnus.com>
16869
16870         * decl.c (clinit_identifier_node), java-tree.h:  New global.
16871         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
16872         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
16873         * expr.c (expand_java_field_op):  Check for invalid assignment
16874         to final field.
16875
16876         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
16877
16878 1997-10-27  Per Bothner  <bothner@cygnus.com>
16879
16880         * verify.c (verify_jvm_instructions):  When processing a handler,
16881         attempt to set the current_subr to the right value.
16882         (More complicated code combines Sep 17 and Oct 22 versions.)
16883
16884 1997-10-24  Per Bothner  <bothner@cygnus.com>
16885
16886         * class.c (push_class):  Figure out (guess) name of source file.
16887         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
16888         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
16889         (parse_class_file):  Change return type from int to void.
16890         Call debug_start_source_file/debug_end_source_file.
16891
16892         * expr.c (build_java_binop):  Fix masking 2nd operand.
16893         * decl.c (init_decl_processing):  Set sizetype first.
16894
16895 1997-10-22  Per Bothner  <bothner@cygnus.com>
16896
16897         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
16898         (Revert Sep 17 change.)
16899
16900 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16901
16902         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16903         .class extension in their name and fix thing so we don't process
16904         them parse_zip_file_entries().
16905         (parse_zip_file_entries): Cleaned unused local variables.
16906
16907 1997-10-20  Per Bothner  <bothner@cygnus.com>
16908
16909         * expr.c (can_widen_reference_to):  Allows equal array element types.
16910         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
16911         * jcf-dump.c (RET):  Get (and print) index.
16912
16913         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16914         Promote element type to POINTER_TYPE.
16915
16916 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16917
16918         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16919         find_in_current_zip, jcf_figure_file_type): Moved from
16920         jcf-reader.c to parse.c.
16921         * zextract.c: (read_zip_archive): takes file_comment_length possible
16922         field into account.
16923
16924 1997-10-20  Per Bothner  <bothner@cygnus.com>
16925
16926         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
16927
16928         * verify.c (merge_types):  Handle array types even better ...
16929
16930 1997-10-17  Per Bothner  <bothner@cygnus.com>
16931
16932         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
16933
16934         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
16935         * class.c (make_class_data):  Don't build fields_decl if no fields.
16936         When building fields_decl, skip if DECL_ARTIFICIAL.
16937
16938         * expr.c (java_stack_swap):  Update stack_type_map.
16939         * verify.c (merge_types):  Handle array types better.
16940
16941 1997-10-15  Per Bothner  <bothner@cygnus.com>
16942
16943         * class.c (add_field):  Don't promote short integral fields to
16944         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16945         * expr.c (push_value):  Promote and convert short integral values.
16946
16947         * decl.c, java-tree.h (integer_two_node):  New constant node.
16948         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
16949
16950 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16951
16952         * class.c (append_gpp_mangled_type): Use function argument
16953         unpromoted type to generate mangled name.
16954
16955 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16956
16957         * constants.c (build_constant_data_ref): Now uses current_class
16958         instead of main_class.
16959         (build_constants_constructor): Now uses current_class instead of
16960         main_class.
16961         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16962         of the global variable SeepZipFiles done here.
16963         * zextract.c (read_zip_archive): extra_field optional field taken
16964         into account while computing the position of the class file in the
16965         archive.
16966         * verify.c (verify_jvm_instructions): Use current_jcf to search
16967         the constant pool.
16968         * parse.c (load_class): First search for the class to load in the
16969         current zip file. Saves current_jcf (restored before returning
16970         from that function). Don't call JCF_FINISH in the class was found
16971         in the current ZIP file.
16972         (jcf_parse): If the class was found in the current ZIP file, save
16973         its tree_constant_pool (for later reuse).
16974         (parse_class_file): New function. Process each method defined in
16975         the current class and record the class as to be later registered.
16976         (yyparse): Rewritten. Figure the type of the current file and switch
16977         accordingly.
16978         * lang.c: New global variable current_jcf.
16979         (lang_init): Removed compiling_from_source test (done later, in
16980         yyparse). Removed call the jcf_parse ().
16981         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16982         (typedef struct JCF): New fields seen_in_zip (to mark a class found
16983         in the current ZIP file) and zip_offset (offset to the class data in
16984         the current zip file).
16985         * jcf-reader.c: zipfile.h included.
16986         localToFile: New ZipFileCache static global variable
16987         (parse_zip_file_entries): New function. Browse the current ZIP
16988         file directory and process each class found.
16989         (process_zip_dir): New function. Register each class found in the
16990         ZIP file directory. The class aren't parsed but a valid JCF is
16991         link to each of them.
16992         (find_in_current_zip): New function. Search for a class in the
16993         current ZIP file directory. If found, prepare the class so that it
16994         can be loaded.
16995         (jcf_figure_file_type): New function. Examine the file structure
16996         to figure a class file, a ZIP file. If none of these categories are
16997         matched, a source file is assumed.
16998         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16999         SeenZipFile: New global variable.
17000         (open_in_zip): Use zipmember's length to accelerate the search for
17001         a member. If zipmember was NULL and zip file successfully read,
17002         return 0.
17003         * java-tree.h: New global variable current_jcf declared.  Added
17004         declaration for current_constant_pool_tags, current_constant_pool_data,
17005         current_constant_pool_length, current_constant_pool_data_ref.
17006         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
17007         store the JCF of classes seen in a zip file) and tree *constant_pool
17008         (to save a loaded class constant pool). current_class declared here.
17009         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
17010         retrieve method_ref_constant.
17011         (PUSHC): java_push_constant_from_pool now uses current_jcf.
17012         (OBJECT): get_class_constant now uses current_jcf.
17013         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
17014         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
17015         (expand_invoke): Now uses current_class instead of main_class
17016         (build_class_init): Now uses current_class instead of main_class
17017         * class.c: New static global variable registered_class.
17018         (register_class): New function.
17019         (emit_register_class): Modified to use registered_class instead of
17020         main_class
17021         (is_compiled_class): Now take into account class seen in the archive.
17022
17023 1997-10-06  Per Bothner  <bothner@cygnus.com>
17024
17025         * except.h:  Renamed to: java-except.h.
17026         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
17027         * except.c:  Add semi-working (commented out) implementation.
17028
17029         * expr.c (expand_iinc):  Add needed flush_quick_stack.
17030         * parse.c (set_source_filename):  New function.
17031         (give_name_to_class):  Set input_filename from package.classname.java.
17032
17033         * jcf-io.c (find_class):  Don't look first in ".".
17034
17035 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17036
17037         * zextract.c (read_zip_archive): Now takes into account the
17038         extra_field field.
17039         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
17040
17041 1997-09-20  Per Bothner  <bothner@cygnus.com>
17042
17043         * constants.c, java-tree.h (build_internal_class_name):  New function.
17044         (alloc_class_constant):  Re-implement using build_internal_class_name.
17045         * class.c (make_class_data):  Likewise.
17046         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
17047
17048 1997-09-17  Per Bothner  <bothner@cygnus.com>
17049
17050         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
17051         to NULL before pushing an exception handler target.
17052
17053         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
17054         (java_stack_swap, java_stack_dup):  Re-write to be safe from
17055         clobbering registers.
17056         (build_class_init):  New function.
17057
17058 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17059
17060         * typeck.c (build_java_array_type): Temporary use
17061         permanent_obstack to create the array 'length' field.
17062         * expr.c (lookup_label): Temporay use permanent_obstack to create
17063         label if not found.
17064         * class.c (push_super_field): Tempory use permanent_obstack.
17065
17066 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17067
17068         * typeck.c (type_for_mode): Now handles double_type_node and
17069         float_type_node.
17070         * verify.c (verify_jvm_instructions): The instruction following
17071         the wide bytecode is checked. OPCODE_ret added to the list of
17072         wide.
17073
17074 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17075
17076         * class.c (make_class): Temporary use permanent_obstack. Set the
17077         class CLASS_P field to 1.
17078         (push_class): Temporary use permanent_obstack.
17079         (set_super_info): Temporary use permanent_obstack.
17080         (add_method): Temporary use permanent_obstack, set
17081         METHOD_TRANSIENT().
17082         (add_field): Temporary use permanent_obstack. Sets
17083         FIELD_VOLATILE() and FIELD_TRANSIENT().
17084         (build_class_ref): Temporary use permanent_obstack if the class
17085         isn't compiled.
17086         (build_static_field_ref): Temporary use permanent_obstack when
17087         creating field's rtl.
17088         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
17089         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
17090         and fields. Function finalized, as far as flag handling.
17091         (push_class_static_dummy_field): Temporary use permanent_obstack.
17092         (emit_register_class): Force generation of class registration at
17093         -O3 or deeper.
17094         * decl.c (end_java_method): Call permanent_allocation() before
17095         returning.
17096         * expr.c (can_widen_reference_to): Added comment to interface
17097         handling, fixed typo.
17098         (lookup_field): Now uses CLASS_P() to correct FIXME
17099         (expand_invoke): Verification on public && !static &&
17100         !abstract moved into soft_lookupinterfacemethod (kaffe).
17101         Use Object class dtable if objectref is an array when expanding
17102         invokeinterface.
17103         (java_push_constant_from_pool): Temporary use permanent_obstack
17104         for CONSTANT_string
17105         * parse.c (get_ref_constant): Temporary use permanent_obstack to
17106         create constant references.
17107         (get_constant): Temporary use permanent_obstack to create constant.
17108         (load_class): Temporary use permanent_obstack to load class.
17109         (jcf_parse): Temporary use permanent_obstack to perform class
17110         layout.
17111         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
17112         (build_java_signature): Temporary use permanent_obstack.
17113         * verify.c: (verify_jvm_instruction): removed unnecessary verification
17114         on ACC_SUPER flag.
17115         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
17116         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
17117         (CLASS_P): Defined
17118
17119 1997-09-11  Per Bothner  <bothner@cygnus.com>
17120
17121         * class.c (append_gpp_mangled_type):  Fix typo.
17122         (emit_register_class):  Use main_class to get class object, rather
17123         than looking for no-longer-existing static decl starting with _CL.
17124         * typeck.c (parse_signature_type):  Promote array element type
17125         if it is a RECORD_TYPE.
17126
17127 1997-09-10  Per Bothner  <bothner@cygnus.com>
17128
17129         * class.c (push_class_static_dummy_field):  New function.
17130         (mangle_static_field):  New. Do G++-style mangling of static fields.
17131         (layout_class):  Mandle static fields here, not in add_field.
17132         (build_class_ref):  The class object is now a dummy static field.
17133         * decl.c (find_local_variable):  Look for best, instead of first match.
17134         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
17135         (build_java_athrow):  Don't check here if exception is Throwable.
17136         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
17137         (TYPE_USED):  Removed.  No longer used ...
17138         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
17139         * verify.c (push_pending_label):  New function.
17140         (push_pending_block):  Renamed to check_pending_block.
17141         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
17142         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
17143         re-checking possible handlers) after a store (less wasted work).
17144         Check for null handler (finally) before calling add_handler.
17145         Various changes to (finally?) correctly handle try/finally.
17146
17147 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
17148
17149         * class.c: Include stdio.h.
17150
17151 1997-09-04  Per Bothner  <bothner@cygnus.com>
17152
17153         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
17154         to make sure class is initialized before static/special invoke.
17155
17156         * verify.c (verify_jvm_instructions):  On a store instruction,
17157         call find_local_variable to force pre-allocation of decl and rtx.
17158         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
17159
17160 1997-09-03  Per Bothner  <bothner@cygnus.com>
17161
17162         * class.c (build_class_ref):   Strip off "promoted_" if need be.
17163         (make_field_value): Call build_java_signature when needed.
17164         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
17165         * expr.c (build_java_athrow):  Don't push_value of exception.
17166         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
17167         match specification of [fd]cmp[lg] for NaNs.
17168         (expand_byte_code):  Add support for exception handler ranges.
17169         * except.c:  Add skeleton for EH code-generation.
17170         * verify.c (merge_types):  Treat all promoted integral types as equal.
17171         * constants.c (build_constants_constructor):  To force creation of
17172         current_constant_pool_data_ref, call build_constant_data_ref.
17173
17174         * javaop.def (lload):  Fix typo.
17175         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
17176
17177 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
17178
17179         * parse.c: Don't include function.h.
17180
17181 1997-08-27  Per Bothner  <bothner@cygnus.com>
17182
17183         * except.[ch]:  New files.
17184         * Makefile.in (JAVA_OBJS):  Add except.o
17185         * expr.c:  Temporary warning about unimplemented exceptions.
17186         * verify.c:  Verify exception handlers.
17187
17188         * jcf-dump.c (disassemble_method):  Print exception table.
17189
17190 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17191
17192         * expr.c (verify_jvm_instructions): Started a thorough
17193         verification of invoke* bytecodes.
17194         (expand_byte_code): flush quick stack if PC is the target of a
17195         branch.  and undef RET (conflicting with config/i386/i386.h).
17196         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
17197         used.
17198         (expand_invoke): Now handles invokeinterface and do more
17199         verification according to the bytecode.
17200         (lookup_field): Don't try to load the class if processing
17201         dtable_type.
17202         (can_widen_reference_to): Now handles interfaces.
17203         * decl.c (init_decl_processing): New global variable
17204         soft_lookupinterfacemethod_node, declared in java-tree.h.
17205         Call set_super_info on string_type_node.
17206         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
17207         defined.
17208         * class.c (set_super_info): Fills the CLASS_* flags according to
17209         access_flags.
17210         (get_access_flags_from_decl): Handles all class flags.
17211
17212 1997-08-26  Per Bothner  <bothner@cygnus.com>
17213
17214         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
17215         * parse.c (yyparse):  Check for abstract method, and missing code.
17216         * expr.c (expand_byte_code):  Change interface.
17217         * lang.c (put_decl_node):  Print promoted types prettier.
17218         * verify.c (verify_jvm_instruction):  Change interface.
17219         Partial support for scanning exception table.
17220         For load instructions, handle promoted integral types.
17221
17222 1997-08-21  Per Bothner  <bothner@cygnus.com>
17223
17224         * verify.c:  New file, with contents moved from expr.c.
17225         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
17226         * typeck.c (is_array_type_p):  Moved here from expr.c.
17227         * java-tree.h:  Add some now-needed function declarations.
17228         * Makefile.in (JAVA_OBJS): Added verify.o.
17229
17230 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17231
17232         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
17233         METHOD_ABSTRACT flag.
17234
17235         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
17236         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
17237         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
17238
17239         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
17240         variables.
17241         (start_java_method): Hook for SYNCHRONIZED methods.
17242
17243         * expr.c (build_java_jsr, build_java_ret): New functions
17244         (JSR,PRE): New macros
17245         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
17246         (verify_jvm_instructions): tableswitch, lookupswitch,
17247         monitorenter, monitorexit, goto_w: verified.
17248         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
17249         (build_java_monitor): New function.
17250         (MONITOR_OPERATION): Modified to call build_java_monitor()
17251         (verify_jvm_instructions): Started a thorough verification of
17252         invoke* bytecodes.
17253
17254 1997-08-19  Per Bothner  <bothner@cygnus.com>
17255
17256         Support verification of jsr/ret subroutines (used for try/finally).
17257         * decl.c (return_address_type_node):  New type node.
17258         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
17259         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
17260         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
17261         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
17262         TYPE_USED):  New macros for special types in type_map.
17263
17264         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
17265         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
17266         BCODE_JUMP_TARGET.
17267         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
17268
17269         * expr.c (can_widen_reference_to):  New function.
17270         (pop_type):  Use it.
17271         (merge_type_state):  Support handling start of subroutine.
17272         (push_pending_block):  Return char* error message, instead of calling
17273         fatal on an error.  Also handle subroutines.
17274         (verify_jvm_instructions):  Handle errors from push_poending_block.
17275         Support jsr and ret instructions.
17276
17277 1997-08-19  Per Bothner  <bothner@cygnus.com>
17278
17279         * jcf-io.c (find_classfile):  Fix thinko.
17280         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
17281
17282 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
17283
17284         * Makefile.in (BISON): Remove.
17285
17286 1997-08-07  Per Bothner  <bothner@cygnus.com>
17287
17288         * Makefile.in:  Convert to autoconf.
17289         * config-lang.in (outputs):  Added java/Makefile.
17290
17291         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
17292         Rename cc1java to jc1.
17293
17294         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
17295         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
17296
17297         * class.c (class_depth):  Do load_class if needed.
17298
17299         Mostly better verification.
17300         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
17301         (init_decl_processing):  Change return type of soft_checkcast.
17302         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
17303         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
17304         lang_print_error):  New functions.
17305         (lang_init):  Set global hook print_error_function to lang_print_error.
17306         * expr.c:  In the type_map ptr_type_node is only used for null now.
17307         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
17308         (merge_types):  Dererence pointer to record types before comparing.
17309         (decode_newarray_type, merge_types):  On error just return NULL.
17310         (build_java_binop):  Add preliminary implementation (with warning)
17311         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
17312         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
17313         (expand_compare, expand_java_goto, expand_java_call):  Don't
17314         push_pending_block, since that only makes sense when verifying.
17315         (merge_type_state):  Different return codes.
17316         (push_pending_block):  A block may need to be verified more than once.
17317         (expand_byte_code):  Warn about unused code at code generation time.
17318         (verify_jvm_instruction):  Changed logic, since code may need to be
17319         re-verified if type-state has changed.  Also, better error handling.
17320         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
17321         Improve newarray, anewarray, ?aload, athrow,
17322         * java-tree.h (LABEL_CHANGED):  New macro.
17323
17324 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17325
17326         * decl.c (soft_athrow_node): New global variable initialized.
17327         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
17328         * typeck.c (convert): Added support for REAL_TYPE.
17329         (convert_to_char): New function.
17330         (convert): Handle CHAR_TYPE.
17331         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
17332         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
17333         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
17334         promoted type.
17335         (verify_jvm_instructions): Added break a the end of bogus unop: label.
17336         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
17337         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
17338         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
17339         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
17340         to Use The Right Things.
17341         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
17342         compatible with INT. BOOLEAN is made equivalent to BYTE.
17343         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
17344         OPCODE_ifnonnull): Now supported.
17345         (build_java_athrow): New function.
17346
17347 1997-08-04  Per Bothner  <bothner@cygnus.com>
17348
17349         Rename method name <init> to match G++ (and fix mangling).
17350         * class.c (layout_class):  Replace method name of <init> by class name.
17351         (make_method_value):  Do inverse renaming of constructor from <init>.
17352         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
17353         * typeck.c (lookup_java_constructor):  New function.
17354         * expr.c (expand_invoke):  If method_name is <init>, call
17355         lookup_java_constructor to find constructor.
17356
17357         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
17358
17359 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17360
17361         * parse.c (get_class_constant): Modified to handle array "classes"
17362         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
17363         wide type.
17364         (convert): Modified to handle real type.
17365         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
17366         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
17367         variables declared.
17368         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
17369         soft_multianewarray, soft_newarray_node, soft_throw_node): New
17370         global variables initialized.
17371         (find_local_variable): Handles the case of a pointer
17372         (end_java_method): Restore the use of one more scope
17373         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
17374         build_java_array_length_access, expand_java_arrayload,
17375         expand_java_arraystore, expand_java_array_length,
17376         expand_java_multianewarray, expand_java_anewarray,
17377         build_java_check_indexed_type, is_array_type_p,
17378         build_java_throw_out_of_bound_exception): New functions.
17379         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
17380         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
17381         OPCODE_<t>aload): Implemented code for verification.
17382         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
17383         ARRAY_NEW_MULTI): Macro defined.
17384         (CONVERT): Modified to invoke convert().
17385         (case OPCODE_aload2): Fixed index typo from 2 to 1.
17386
17387 1997-07-31  Per Bothner  <bothner@cygnus.com>
17388
17389         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
17390         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
17391         (make_class_data):  Field name needs '/' as package prefix.
17392         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
17393
17394 1997-07-25  Per Bothner  <bothner@cygnus.com>
17395
17396         Implement debug information for local variables.
17397         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
17398         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
17399         DECL_LOCAL_SLOT_CHAIN):  New macros.
17400         (struct lang_decl_var):  New type.
17401         * parse.c (give_name_to_locals):  Move to decl.c.
17402         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
17403         (start_java_method):  Re-write parameter handling.
17404         (pending_local_decls):  New global variable.
17405         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
17406         (find_local_variable):  Accept pc so we can skips decls not in range.
17407         (struct binding_level):  Add end_pc field.
17408         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
17409         (various):  Change so current pc gets passed to find_local_variable.
17410
17411         * decl.c (init_decl_processing):  Re-arrange fields in
17412         class_type_node and and method_type_node to match kaffe 0.9.1.
17413         * class.c (make_method_value, make_class_data):  Update
17414         initializations to match.
17415
17416 1997-07-16  Per Bothner  <bothner@cygnus.com>
17417
17418         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
17419         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
17420         (push_super_field):  New function.
17421         (make_class_data):  Handle inheritance of class static initializer.
17422         (layout_class):  New name mangling.
17423         * constants.c (build_constant_data_ref):  Init type of data array
17424         to a one-element array.
17425         (build_constants_constructor):  Set DECL_SIZE from complete array type.
17426         * decl.c:  Rename class_type, object_type etc to class_type_node,
17427         object_type_node etc.  Make former inherit from latter.
17428         * expr.c (expand_invoke):  Add cast of function address.
17429         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
17430         * parse.c (yyparse):  Don't call layout_class here.
17431         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
17432
17433 1997-06-14  Per Bothner  <bothner@cygnus.com>
17434
17435         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
17436         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
17437         (alloc_class_constant):  New.
17438         * expr.c (expand_invoke):  Make sure method's class is initialized.
17439         * class.c (interits_from_p, emit_register_class):  New functions.
17440         * parse.c (yyparse):  Call emit_register_class.
17441
17442 1997-06-09  Per Bothner  <bothner@cygnus.com>
17443
17444         * constants.c:  New file, to handle constant pool.
17445         * Makefile.in (JAVA_OBJS):  Add constants.o.
17446         * decl.c (init_decl_processing):  Update, fix, finish various structs.
17447         (pushdecl_top_level):  New.
17448         * parse.c (layout_class):  Moved to class.c.
17449         * expr.c (java_push_constant_from_pool):  New function.
17450         * class.c (build_class_ref):  Make work fully
17451         (make_class_data):  Emit super-class, constant pool, interface vector.
17452
17453 1997-06-03  Per Bothner  <bothner@cygnus.com>
17454
17455         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
17456         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
17457         * class.c (class_depth):  New function.
17458         (lookup_named_class):  Replaced by new function lookup_class.
17459         * decl.c (object_type_node, string_type_node):  New.
17460         Remove various types that we no longer need.
17461         * expr.c (verify_jvm_instructions):  New separate verifier pass.
17462         (push_type, pop_type):  New functions for verifier.
17463         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
17464         (expand_byte_code):  Simplify, since we assume already verified.
17465         (expand_invoke):  Now mostly works.
17466         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
17467         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
17468         * parse.c:  Wait to allocate class object until we know its name.
17469         (layout_class):  Calculate DECL_VINDEX for each virtual method.
17470         * typeck.c (get_array_type):  Rename to ...
17471         (build_java_array_type):  ... and provide working implementation.
17472         (build_java_signature):  New function - build Java signature of type.
17473         (set_java_signature):  New function - cache signature with type.
17474         (lookup_java_method):  New function.
17475
17476 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
17477
17478         * class.c (ident_subst):  Take extra SUFFIX parameter.
17479         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
17480         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
17481         (build_class_ref):  Actually implement.
17482         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
17483         * decl.c (builtin_function):  New.
17484         (init_decl_processing):  Update for current Kaffe.  Declare some
17485         builtin Kaffe functions.
17486         * expr.c (build_address_of):  New.
17487         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
17488         Renamed (from expand_java_new etc), and added working implementations.
17489         (build_field_ref):  Now also handle static fields.
17490         (expand_invoke):  Implement invokestatic, and start implement rest.
17491         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
17492         * javaop.def:  Rename invokevirt -> invokevirtual.
17493         * lang.c (use_handles):  Removed.
17494         * parse.c:  Add support for ConstantValue attribute.
17495         Handle nested loading of a class.  (JPOOL_UTF):  New.
17496
17497 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
17498
17499         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
17500
17501 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
17502
17503         * Make-lang.in (java.install-man):  New empty rule.
17504         * typeck.c (set_local_type):  New function.
17505         * expr.c (STORE_INTERNAL):  Call find_local_variable,
17506         not find_stack_slot.  Call set_local_type.
17507
17508 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
17509
17510         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
17511         and building RECORD_TYPE CONSTRUCTORs.
17512         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
17513
17514         * lang.c (use_handles):  Change the default to 0.
17515         * decl.c:  Define and build class_type, field_type, utf8const_type.
17516         * class.c (make_class_data, make_field_value,
17517         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
17518         hashUtf8String, strLengthUtf8, mangled_classname:
17519         Functions to build reflective data structures.
17520         * parse.c (yyparse):  Call make_class_data.
17521
17522         * jcf-io.c (open_class, find_classfile):  New functions.
17523         * jcf-dump.c:  Support reading classfile from explicitly-named
17524         class file (without CLASSPATH searching).
17525
17526 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
17527
17528         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
17529         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
17530         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
17531         (get_constant):  Now trivial for CONSTANT_Utf8.
17532
17533         * jcf.h:  Make NEW_CPOOL the default.
17534         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
17535
17536 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
17537
17538         New directory.