OSDN Git Service

* cpp.texi: Update for -MP. Clarify behaviour of -MT.
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
2
3         * lang.c (lang_decode_option): Change -MA to -MP.
4         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
5         Update to new prototype; do quote targets.
6         (jcf_dependency_write): Update.
7
8 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
9
10         Shorten primitive array allocation path:
11         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12         to create new primitive arrays.
13         * expr.c (build_newarray): If generating native code, call 
14         soft_newarray_node with a reference to the primitive TYPE identifier
15         instead of type_value.
16         
17 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
18
19         Fix for PRs gcj/312 and gcj/253:
20         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
21         dest if they arn't already.
22         * class.c (layout_class): Call maybe_layout_super_class on 
23         superinterfaces also, but only if compiling from bytecode.
24
25         Fix for PR gcj/373:
26         * parse.y (create_class): Set ACC_STATIC if class is declared in an
27         interface.
28
29 2000-12-15  Tom Tromey  <tromey@redhat.com>
30
31         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
32         set.
33
34 2000-12-14  Andrew Haley  <aph@redhat.com>
35
36         * boehm.c (mark_reference_fields): Change test to correctly detect
37         bitmap overflow.
38
39 2000-12-15  Andreas Jaeger  <aj@suse.de>
40
41         * config-lang.in (lang_dirs): Added.
42
43 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
44
45         * parse.y (end_artificial_method_body): Fixed undefined behavior.
46         Credits go to rth for finding it.
47
48 2000-12-13  Mike Stump  <mrs@wrs.com>
49
50         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
51
52 2000-11-07  Tom Tromey  <tromey@cygnus.com>
53
54         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
55         * lex.c (java_ignorable_control_p): Removed.
56         (java_letter_or_digit_p): Removed.
57         (java_start_char_p): New function.
58         (java_read_char): Return `int', not `unicode_t'.  Changed
59         callers.
60         (java_read_unicode): Likewise.
61         (java_read_unicode_collapsing_terminators): Likewise.
62         (java_get_unicode): Likewise.
63         (java_new_lexer): Initialize hit_eof.
64         (java_parse_end_comment): Take `int' argument.
65         (java_parse_doc_section): Likewise.
66         (java_parse_escape_sequence): Don't allow backlash-newline.
67         Return `int'.
68         * lex.h (JAVA_DIGIT_P): Removed.
69         (_JAVA_LETTER_OR_DIGIT_P): Removed.
70         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
71         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
72         (JAVA_PART_CHAR_P): New macro.
73         (UEOF): Now -1.
74         (JAVA_CHAR_ERROR): Now -2.
75         (java_lexer): New field `hit_eof'.
76         * chartables.h: New file.
77         * gen-table.pl: new file.
78
79 2000-11-20  Tom Tromey  <tromey@cygnus.com>
80             Alexandre Petit-Bianco  <apbianco@cygnus.com>
81
82         * parse.y (java_complete_lhs): Only allow compound assignment of
83         reference type if type is String.
84
85 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
86
87         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
88         jcf-path.c: Likewise.
89
90 2000-12-09  Anthony Green  <green@redhat.com>
91
92         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
93         filestart and filename_length as int values.
94
95 2000-12-07  Mo DeJong  <mdejong@redhat.com>
96
97         * jcf-io.c (find_class): Correct the logic that tests to see if a
98         .java file is newer than its .class file. The compiler was
99         incorrectly printing a warning when file mod times were equal.
100
101 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
102
103         * jvgenmain.c: Use ISPRINT not isascii.
104
105 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
106
107         * parse.y (end_artificial_method_body): Fixed typo.
108
109 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
110
111         * parse.y (patch_method_invocation): Pick the correct enclosing
112         context when creating inner class instances.
113         Fixes gcj/332.
114
115 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
116
117         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
118         Update copyright year to 2000.
119
120 2000-11-23  Anthony Green  <green@redhat.com>
121
122         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
123         Move current_file_list out of yyparse and make it static.
124
125         * expr.c: Declare quick_stack and tree_list_free_list as static
126         (init_expr_processing): Register quick_stack and
127         tree_list_free_list roots.
128
129 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
130
131         * parse.y (build_outer_field_access): New local `decl_ctx', use
132         it. Check for field's context and current class immediate outer
133         context inheritance.
134         (outer_field_access_p): Consider fields inherited from the last
135         enclosing context.
136         (build_access_to_thisn): Stop at the last enclosing context if
137         necessary.
138         Fixes gcj/367.
139
140 Thu Nov 23 02:19:14 2000  J"orn Rennecke <amylaar@redhat.com>
141
142         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
143
144 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
145
146         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
147         scratch buffer.
148
149 2000-11-20  Tom Tromey  <tromey@cygnus.com>
150
151         * jv-scan.c (help): Document --complexity.
152         (options): Added --complexity.
153         (flag_complexity): New global.
154         (main): Call `report'.
155         * parse-scan.y (complexity): New global.
156         (if_then_statement, if_then_else_statement,
157         if_then_else_statement_nsi, switch_block_statement_group,
158         while_expression, do_statement, for_begin, continue_statement,
159         throw_statement, catch_clause, finally, method_invocation,
160         conditional_and_expression, conditional_or_expression,
161         conditional_expression): Update complexity.
162         (reset_report): Reset complexity.
163         (report): New function.
164
165 2000-11-20  Tom Tromey  <tromey@cygnus.com>
166
167         * lex.c (yylex): Added STRICT_TK case.
168         * parse.y (STRICT_TK): Added.
169         * parse-scan.y (STRICT_TK): Added.
170         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
171         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
172         file.
173         * keyword.h: Rebuilt.
174         * keyword.gperf (strictfp): Added.
175
176 2000-11-20  Tom Tromey  <tromey@cygnus.com>
177
178         * lex.c (yylex): Recognize floating point constants with leading
179         0.
180
181 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
182
183         * java-tree.h (cyclic_inheritance_report): Constify.
184         * parse.y (cyclic_inheritance_report): Likewise.
185
186 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
187
188         * parse.y (goal): Remove call to ggc_add_string_root.
189
190 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
191
192         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
193         Create string in scratch buffer, then pass to build_string.
194
195 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
196
197         * parse.y (issue_warning_error_from_context): Add
198         ATTRIBUTE_PRINTF.
199
200 2000-11-11  Anthony Green  <green@redhat.com>
201
202         * jcf-parse.c (process_zip_dir): Add finput parameter.
203         (jcf_figure_file_type): Call process_zip_dir with appropriate
204         argument.
205
206 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
207
208         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
209         * jcf-parse.c (jcf_figure_file_type): Likewise.
210
211 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
212
213         * parse.y (create_new_parser_context): Use memset () instead of
214         bzero ().
215
216 2000-11-08  Tom Tromey  <tromey@cygnus.com>
217
218         * gjavah.c (process_file): Only include gcj/cni.h when generating
219         CNI stubs.
220
221 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
222
223         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
224         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
225         instead of bzero ().
226
227 2000-11-05  Tom Tromey  <tromey@cygnus.com>
228
229         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
230         * lex.c (IS_ZERO): New define.
231         (java_perform_atof): Error on floating point underflow.
232
233 2000-11-04  Tom Tromey  <tromey@cygnus.com>
234
235         * lex.c (java_parse_escape_sequence): Only read two octal
236         characters if the first one is greater than 3.  Don't allow
237         "octal" numbers to include the digits 8 or 9.
238
239 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
240
241         * Make-lang.in (java.distdir): Remove.
242
243 2000-11-03  Tom Tromey  <tromey@cygnus.com>
244
245         * Make-lang.in (java.dvi): New target.
246         Partial fix for PR other/567.
247
248         * lang-options.h: Mention -Wout-of-date.
249         * jcf-dump.c (flag_newer): New global.
250         * gjavah.c (flag_newer): New global.
251         * jcf-io.c (find_class): Only warn when flag_newer set.
252         * lang.c (flag_newer): New global.
253         (struct string_option): New declaration.
254         (lang_W_options): New global.
255         (process_option_with_no): New function.
256         (lang_decode_option): Use it.
257
258         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
259         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
260         `$'.
261
262         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
263         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
264         * lex.c (java_read_unicode): Removed `term_context' argument.
265         Recognize any number of `u' in `\u'.
266         (java_read_unicode_collapsing_terminators): New function.
267         (java_get_unicode): Use it.
268         (java_lineterminator): Removed.
269         (yylex): Produce error if character literal is newline or single
270         quote.  Return if eof found in middle of `//' comment.  EOF in
271         `//' comment is only an error if pedantic.
272         (java_ignorable_control_p): New function.
273         (java_parse_end_comment): Return if eof found in middle of
274         comment.
275         Include flags.h.
276         * jv-scan.c (pedantic): New global.
277
278 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
279
280         * parse.y (outer_field_access_p): Inherited fields aren't
281         consider outer fields.
282         (maybe_build_thisn_access_method): Use
283         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
284         (resolve_expression_name): Trigger an error if a static field
285         is being accessed as an outer field.
286
287 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
288
289         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
290         Fixes gcj/365.
291
292 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
293
294         * Make-lang.in: Move all build rules here from Makefile.in,
295         adapt to new context.  Wrap all rules that change the current
296         directory in parentheses.  Expunge all references to $(P).
297         When one command depends on another and they're run all at
298         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
299         all object-file generation rules.  Delete obsolete variables.
300
301         * Makefile.in: Delete.
302         * config-lang.in: Delete outputs= line.
303
304 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
305
306         * parse.y (patch_method_invocation): NULLify this_arg when already
307         inserted.
308         (maybe_use_access_method): Handle call to methods unrelated to the
309         current class. Fixed comment.
310         Fixes gcj/361.
311
312 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
313
314        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
315        scope.
316
317 2000-10-24  Tom Tromey  <tromey@cygnus.com>
318
319         * lex.c (java_new_lexer): Initialize new fields.  Work around
320         broken iconv() implementations.
321         (java_read_char): Swap bytes if required.  Use fallback decoder if
322         required.
323         (byteswap_init, need_byteswap): New globals.
324         (java_destroy_lexer): Only close iconv handle if it is in use.
325         * lex.h (java_lexer): New fields read_anything, byte_swap,
326         use_fallback.
327         Made out_buffer unsigned.
328
329 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
330
331         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
332         where an enclosing context can be set on the jdep.
333         (do_resolve_class): Fixed identation.
334
335 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
336
337         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
338
339         * jcf-reader.c (peek_attribute, skip_attribute): Only define
340         when requested.
341
342         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
343
344         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
345
346 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
347
348         * jcf-write.c (OP1): Update `last_bc'.
349         (struct jcf_block): Fixed indentation and typo in comments.  New
350         field `last_bc'.
351         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
352         follows `monitorenter'.
353         * parse.y (patch_synchronized_statement): New local `tmp'. Call
354         `patch_string'.
355         Fixes gcj/232.
356
357 2000-10-16  Tom Tromey  <tromey@cygnus.com>
358
359         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
360         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
361         * lang-options.h: Added -MA, -MT, -MF..
362         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
363         (DEPEND_TARGET_SET): New macro.
364         (DEPEND_FILE_ALREADY_SET): Likewise.
365         (init_parse): Handle new flags.
366         * jcf.h (jcf_dependency_print_dummies): Declare.
367         * Make-lang.in (s-java): Added mkdeps.o.
368         * Makefile.in (BACKEND): Added mkdeps.o.
369         (../gcjh$(exeext)): Added mkdeps.o.
370         (../jcf-dump$(exeext)): Added mkdeps.o.
371         * jcf-depend.c: Include mkdeps.h.
372         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
373         add_entry): Removed.
374         (jcf_dependency_reset): Rewrote.
375         (dependencies): New global.
376         (jcf_dependency_set_target): Rewrote.
377         (jcf_dependency_add_target): Likewise.
378         (jcf_dependency_add_file): Likewise.
379         (munge): Removed.
380         (print_ents): Removed.
381         (jcf_dependency_write): Rewrote.
382         (print_dummies): New global.
383         (jcf_dependency_print_dummies): New function
384         (jcf_dependency_write): Call deps_dummy_targets if required.
385
386 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
387
388         * gjavah.c (add_class_decl): Removed unused variables `tname',
389         `tlen' and `name_index'.
390         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
391         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
392         in `wfl_operator' with value.
393         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
394         (jcf_figure_file_type): Fixed identation.
395         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
396         * parse.y (analyze_clinit_body): New function.
397         (static_initializer:): Reset `current_static_block'.
398         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
399         `wfl_operator' with new value.
400         (lookup_cl): Use EXPR_WFL_FILENAME.
401         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
402         analyze_clinit_body.
403         (build_outer_field_access): Access to this$<n> built from
404         current_class, not its outer context.
405         (build_access_to_thisn): Fixed leading comment. Tidied things up.
406         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
407         (patch_method_invocation): Use `is_static_flag' when already
408         initialized.
409         (patch_newarray): Removed assignment in ternary operator.
410
411 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
412
413         * except.c (free_eh_ranges): Don't free `whole_range'.
414
415 2000-10-15  Anthony Green  <green@redhat.com>
416
417         * decl.c (init_decl_processing): Call init_class_processing before
418         anything else.
419
420 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
421
422         * check-init.c (check_init): Fixed leading comment. Use
423         LOCAL_FINAL_P.
424         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
425         (give_name_to_locals): Likewise.
426         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
427         fields in lang_decl_var.
428         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
429         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
430         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
431         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
432         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
433         (LOCAL_FINAL): Rewritten.
434         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
435         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
436         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
437         `init_final' fields.
438         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
439         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
440         (TYPE_HAS_FINAL_VARIABLE): New macro.
441         (struct lang_type): Added `afv' field.
442         * parse.y (check_static_final_variable_assignment_flag): New function.
443         (reset_static_final_variable_assignment_flag): Likewise.
444         (check_final_variable_local_assignment_flag): Likewise.
445         (reset_final_variable_local_assignment_flag): Likewise.
446         (check_final_variable_indirect_assignment): Likewise.
447         (check_final_variable_global_assignment_flag): Likewise.
448         (add_inner_class_fields): Use LOCAL_FINAL_P.
449         (register_fields): Handle local finals and final variables.
450         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
451         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
452         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
453         on local finals.
454         (java_complete_expand_methods): Loop to set
455         TYPE_HAS_FINAL_VARIABLE. Call
456         `reset_final_variable_local_assignment_flag' and
457         `check_final_variable_local_assignment_flag' accordingly before
458         and after constructor expansion. Call
459         `reset_static_final_variable_assignment_flag'
460         before expanding <clinit> and after call
461         `check_static_final_variable_assignment_flag' if the
462         current_class isn't an interface. After all methods have been
463         expanded, call `check_final_variable_global_assignment_flag' and
464         `check_static_final_variable_assignment_flag' if the current class
465         is an interface.
466         (maybe_yank_clinit): Fixed typo in comment.
467         (build_outer_field_access_methods): Removed old sanity check. Use
468         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
469         Don't create access methods for finals.
470         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
471         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
472         existing DECL_INIT has been processed.
473         (java_complete_lhs): Likewise.
474         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
475         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
476         logic.
477         (patch_assignment): Use LOCAL_FINAL_P.
478         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
479         DECL_INITIAL is nullified.
480         Fixes gcj/163.
481
482 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
483
484         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
485
486         * Makefile.in (parse.c, parse-scan.c): Likewise.
487
488 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
489
490         * class.c (temporary_obstack): Remove.
491         (make_class): Don't mess with obstascks.
492         (push_class): Likewise.
493         (set_super_info): Likewise.
494         (add_method_1): Likewise.
495         (add_method): Likewise.
496         (add_field): Likewise.
497         (build_utf8_ref): Likewise.
498         (build_class_ref): Likewise.
499         (build_static_field_ref): Likewise.
500         (finish_class): Likewise.
501         (push_super_field): Likewise.
502         (layout_class): Likewise.
503         (layout_class_methods): Likewise.
504         (init_class_processing): Likewise.
505         * constants.c (get_tag_node): Likewise.
506         (build_constant_data_ref): Likewise.
507         * decl.c (ggc_p): Remove.
508         (copy_lang_decl): Use ggc_alloc.
509         (complete_start_java_method): Don't mess with obstacks.
510         (start_java_method): Likewise.
511         (end_java_method): Likewise.
512         * except.c (link_handler): Use xmalloc.
513         (free_eh_ranges): New function.
514         (method_init_exceptions): Use it.
515         (add_handler): Use xmalloc.
516         (expand_start_java_handler): Don't mess with obstacks.
517         (prepare_eh_table_type): Likewise.
518         (expand_end_java_handler): Likewise.
519         * expr.c (push_value): Likewise.
520         (create_label_decl): Likewise.
521         (build_jni_stub): Likewise.
522         (java_lang_expand_expr): Likewise.
523         (note_instructions): Use xrealloc.
524         (java_push_constant_from_pool): Don't mess with obstacks.
525         (process_jvm_instruction): Likewise.
526         * java-tree.h (cyclic_inheritance_report): Remove duplicate
527         declaration.
528         * jcf-parse.c (get_constant): Don't mess with obstacks.
529         (read_class): Likewise.
530         (jcf_parse): Likewise.
531         * lex.c (expresion_obstack): Remove.
532         (java_lex): Don't use obstack_free.
533         * parse.h (exit_java_complete_class): Don't mess with obstacks.
534         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
535         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
536         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
537         * parse.y (gaol): Add more GC roots.
538         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
539         (lookup_field_wrapper): Likewise.
540         (obtain_incomplete_type): Don't mess with obstacks.
541         (build_alias_initializer_paramter_list): Adjust calls to MANGLE_*
542         macros.
543         (craft_constructor): Don't mess with obstacks.
544         (safe_layout_class): Likewise.
545         (java_complete_class): Likewise.
546         (source_end_java_method): Likewise.
547         (build_outer_field_access_methods): Likewise.
548         (build_outer_method_access_method): Likewise.
549         (maybe_build_thisn_access_method): Likewise.
550         (build_dot_class_method_invocation): Likewise.
551         (java_complete_tree): Likewise.
552         (java_complete_lhs): Likewise.
553         (do_merge_string_cste): Likewise.
554         (patch_string_cst): Likewise.
555         (array_constructor_check_entry): Likewise.
556         * typeck.c (build_java_array_type): Likewise.
557         (parse_signature_string): Likewise.
558         (build_java_signature): Likewise.
559
560 2000-10-12  Tom Tromey  <tromey@cygnus.com>
561
562         Fix for PR gcj/356:
563         * gjavah.c (add_class_decl): Don't special-case inner classes.
564         (add_namelet): Likewise.
565
566 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
567
568         * java-tree.h: Constify current_encoding.
569         * lang.c: Constify current_encoding.
570
571 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
572
573         * jvgenmain.c (class_mangling_suffix): Omit `.'.
574         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
575
576 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
577
578         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
579         patch. Fixes gcj/340.
580
581 2000-10-10  Tom Tromey  <tromey@cygnus.com>
582
583         * lex.c (java_new_lexer): Initialize out_first and out_last
584         fields.
585         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
586
587 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
588
589         * parse.y (pop_current_osb): New function.
590         (array_type:): Use `dims:', changed actions
591         accordingly. Suggested by Anthony Green.
592         (array_creation_expression:): Used pop_current_osb.
593         (cast_expression:): Likewise.
594         (search_applicable_method_list): Fixed indentation.
595
596 2000-10-08  Anthony Green  <green@redhat.com>
597
598         * parse.y (array_type_literal): Remove production.
599         (type_literals): Refer to array_type, not array_type_literal.
600
601 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
602
603         Patch contributed by Corey Minyard.
604         * decl.c (check_local_named_variable): New function.
605         (tree check_local_unnamed_variable): Likewise.
606         (find_local_variable): Splitted. Call check_local_{un}named_variable.
607
608 2000-10-07  Anthony Green  <green@redhat.com>
609
610         * class.c (layout_class): Handle case where superclass can't be
611         layed out yet.
612
613 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
614
615         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
616         gperf.
617
618 2000-10-05  Tom Tromey  <tromey@cygnus.com>
619
620         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
621         * jvgenmain.c (class_mangling_prefix): Removed.
622         (class_mangling_suffix): New global.
623         (main): Use it.
624         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
625         `$'.
626         (print_method_info): Handle overrides for static and final
627         methods.
628         (process_file): Generate declaration for class object field.
629         * class.c (cxx_keywords): New array.
630         (utf8_cmp): New function.
631         (cxx_keyword_p): New function.
632         (layout_class_method): Mangle C++ keywords by appending `$'.
633         (mangle_field): New function.
634         (mangle_class_field): Use mangle_field.  Mangle class name as
635         `class$'.
636         (mangle_static_field): Use mangle_field.
637
638 Tue Oct  3 13:44:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
639
640         * decl.c (find_local_variable): Removed uncessary type check and
641         fixed range check typo. From Corey Minyard.
642
643 Wed Sep 13 16:06:52 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
644
645         * decl.c (give_name_to_locals): New local `code_offset'. Call
646         `maybe_adjust_start_pc'.
647         * expr.c (note_instructions): New function.
648         (expand_byte_code): Don't collect insn starts here.
649         (peek_opcode_at_pc): New function.
650         (maybe_adjust_start_pc): Likewise.
651         * java-tree.h (maybe_adjust_start_pc): Declare.
652         (note_instructions): Likewise.
653         * jcf-parse.c (parse_class_file): Call `note_instructions'.
654
655 Wed Sep 13 11:50:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
656
657         * parse.y (field_access:): Fixed indentation.
658         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
659
660 2000-09-07  Tom Tromey  <tromey@cygnus.com>
661
662         Fix for PR gcj/307:
663         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
664         JPRIMITIVE_TYPE_P, for arithmetic operators.
665         (patch_method_invocation): Indentation fix.
666         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
667         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
668         (do_unary_numeric_promotion): Cleaned up code.
669         (valid_cast_to_p): Handle boolean correctly.
670
671 2000-09-27  Tom Tromey  <tromey@cygnus.com>
672
673         * lex.c (java_read_unicode): Reset bs_count when finished with
674         `\u' sequence.
675
676 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
677
678         Convert to GC.
679         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
680         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
681         (typeck.o): Depend on ggc.h.
682         * class.c (add_method_1): Use GC functions for allocation.
683         (init_class_processing): Register roots.
684         * decl.c (ggc_p): Set to 1.
685         (pending_local_decls): Make it static.
686         (push_jvm_slot): Use GC functions for allocation.
687         (init_decl_processing): Register roots.
688         (give_name_to_locals): Use GC functions for allocation.
689         (lang_mark_tree): New function.
690         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
691         functions for allocation.
692         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
693         * lex.c (java_lex): Use build_string, rather than replicating it
694         inline.
695         * parse.y (goal): Add more roots.
696         (mark_parser_ctxt): New function.
697         * typeck.c: Include ggc.h.
698
699 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
700
701         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
702         contains something else than MODIFY_EXPR.
703
704 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
705
706         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
707         * Makefile.in (parse.o): Depend on ggc.h.
708         (class.o): Likewise.
709         (constants.o): Likewise.
710         (decl.o): Likewise.
711         (expr.o): Likewise.
712         (jcf-parse.o): Likewise.
713         (jcf-write.o): Likewise.
714         (mangle.o): Likewise.
715         * class.c: Include ggc.h.
716         (build_static_field_ref): Register GC roots.
717         (layout_class): Likewise.
718         (init_class_processing): Likewise.
719         * constants.c: Include ggc.h.
720         (current_constant_pool_data_ref): Remove.
721         (tag_nodes): Move it to ...
722         (get_tag_node): ... here.  Register GC roots.
723         * decl.c: Include ggc.h.  Remove many global tree definitions.
724         (throw_node): Define.
725         (java_global_trees): Likewise.
726         (predef_filenames): Make the size a constant.
727         (init_decl_processing): Adjust accordingly.
728         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
729         * expr.c: Include ggc.h.
730         (init_expr_processing): Register GC roots.
731         (build_invokeinterface): Likewise.
732         * java-tree.h: Replace extern tree declarations with macros.
733         (java_global_trees): New variable.
734         (java_tree_index): New enumeration.
735         (init_jcf_parse): Declare.
736         * jcf-parse.c: Include ggc.h.
737         (current_class): Remove declaration.
738         (main_class): Likewise.
739         (all_class_list): Likewise.
740         (predefined_filename_p): Adjust for constant size of
741         predef_filenames.
742         (init_jcf_parse): New function.
743         * jcf-write.c: Include ggc.h.
744         (generate_classfile): Register GC roots.
745         (append_synthetic_attribute): Likewise.
746         (append_innerclass_attribute_entry): Likewise.
747         * lang.c: Include ggc.h.
748         (lang_print_error): Register GC roots.
749         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
750         with macros.
751         * parse.y: Include ggc.h.
752         (wfl_operator): Remove.
753         (goal): Register GC roots.
754         (java_pop_parser_context): Adjust for new field names.
755         (java_parser_context_save_global): Likewse.
756         (java_parser_context_restore_global): Likewise.
757         (java_parser_context_suspend): Likewise.
758         (java_parser_context_resume): Likewise.
759         (verify_constructor_circularity): Register GC roots.
760         (lookup_cl): Likewise.
761         (java_reorder_fields): Likewise.
762         (build_current_this): Likewise.
763         (class_in_current_package): Likewise.
764         (argument_types_convertible): Likewise.
765         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
766
767 2000-09-14  Tom Tromey  <tromey@cygnus.com>
768
769         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
770
771 2000-09-13  Tom Tromey  <tromey@cygnus.com>
772
773         * jcf-parse.c: Include <locale.h>.
774         * jv-scan.c: Include <locale.h>.
775
776 2000-09-12  Tom Tromey  <tromey@cygnus.com>
777
778         * expr.c (pop_type_0): Return `Object' if trying to merge two
779         interface types.
780         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
781         interface types; `Object' is always a valid supertype.
782
783 2000-09-12  Tom Tromey  <tromey@cygnus.com>
784
785         Fix for PR gcj/33:
786         * jv-scan.c (help): Document --encoding.
787         (options): Added `encoding' entry.
788         (OPT_ENCODING): New define.
789         (main): Handle --encoding.
790         Include <langinfo.h> if nl_langinfo exists.
791         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
792         --encoding.
793         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
794         (parse_source_file): Correctly call java_init_lex.  Added `finput'
795         argument.  Use nl_langinfo to determine default encoding.
796         * java-tree.h (current_encoding): Declare.
797         * parse.y (java_parser_context_restore_global): Don't restore
798         `finput'.
799         (java_parser_context_save_global): Don't set `finput' field.
800         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
801         if required.
802         * lang.c (current_encoding): New global.
803         (lang_decode_option): Recognize `-fencoding='.
804         (finish_parse): Don't close finput.
805         * parse.h (struct parser_ctxt): Removed `finput' and
806         `unget_utf8_value' fields.  Added `lexer' field.
807         (java_init_lex): Fixed declaration.
808         * lex.c (java_new_lexer): New function.
809         (java_destroy_lexer): Likewise.
810         (java_read_char): Added `lex' argument.  Handle iconv case.
811         (java_read_unicode): Added `lex' argument.  Count backslashes in
812         lexer structure.
813         (java_init_lex): Added `finput' and `encoding' arguments.  Set
814         `lexer' field in ctxp.
815         (BAD_UTF8_VALUE): Removed.
816         (java_lex): Handle seeing UEOF in the middle of a string literal.
817         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
818         (java_lexer): New structure.
819         (UNGETC): Removed.
820         (GETC): Removed.
821         (DEFAULT_ENCODING): New define.
822         (java_destroy_lexer): Declare.
823
824 2000-09-12  Tom Tromey  <tromey@cygnus.com>
825
826         Fix for PR gcj/343:
827         * lex.c (java_init_lex): Initialize java_io_serializable.
828         * parse.y (java_io_serializable): New global.
829         (valid_ref_assignconv_cast_p): An array can be cast to
830         serializable.
831
832 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
833
834         * decl.c, expr.c: Include defaults.h if not already included.
835         Don't define the *_TYPE_SIZE macros.
836
837 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
838
839         * typeck.c (build_java_array_type): Correct first parameter
840         in ADJUST_FIELD_ALIGN invocation.
841
842 2000-09-06  Tom Tromey  <tromey@cygnus.com>
843
844         * lang-specs.h: Also recognize `-femit-class-files'.
845
846 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
847
848         * verify.c (merge_types): Load the types to merge if necessary.
849
850 2000-09-02  Anthony Green  <green@redhat.com>
851
852         * jcf-io.c: Include zlib.h.
853         (open_in_zip): Read compressed class file archives.
854         * zipfile.h (ZipDirectory): Add uncompressed_size and
855         compression_method fields.
856         * zextract.c (read_zip_archive): Collect file compression info.
857
858 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
859
860         * parse.y (do_resolve_class): Also explore superclasses of
861         intermediate enclosing contexts when searching for inner classes.
862
863 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
864
865         * parse.y (variable_declarator_id:): Better error message.
866         (expression_statement:): Use YYNOT_TWICE.
867         (cast_expression:): Likewise.
868         (assignment:): Likewise.
869
870 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
871
872         * parse.y (do_merge_string_cste): New locals. Create new
873         STRING_CSTs each time, use memcpy. Fixes gcj/311.
874
875 2000-08-07  Hans Boehm  <boehm@acm.org>
876
877         * boehm.c (mark_reference_fields): Set marking bits for all words in
878         a multiple-word record.
879         (get_boehm_type_descriptor): Use the procedure marking descriptor for
880         java.lang.Class.
881
882 2000-08-31  Mike Stump  <mrs@wrs.com>
883
884         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
885         jcf-dump$(exeext)): Make parallel safe.
886
887 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
888
889         * jcf-parse.c (set_source_filename): Constify a char *.
890         * jcf-write.c (append_innerclasses_attribute,
891         make_class_file_name): Constify a char *.  Don't recycle a
892         variable for an unrelated purpose.
893         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
894         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
895
896 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
897
898         * expr.c (can_widen_reference_to): Fixed indentation.
899         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
900         * parse.y: `finit$' replaces `$finit$' in comments.
901         (try_builtin_assignconv): Fixed leading comment.
902
903 2000-08-25  Greg McGary  <greg@mcgary.org>
904
905         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
906
907 2000-08-24  Greg McGary  <greg@mcgary.org>
908
909         * lang.c (lang_decode_option): Use ARRAY_SIZE.
910         * parse.y (BINOP_LOOKUP): Likewise.
911
912 2000-08-22  Andrew Haley  <aph@cygnus.com>
913
914         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
915         sign extending. Fixes gcj/321.
916         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
917         combining to make a jlong. Fixes gcj/321.
918
919 2000-08-21  Nix  <nix@esperi.demon.co.uk>
920
921         * lang-specs.h: Do not process -o or run the assembler if
922         -fsyntax-only.
923
924 2000-08-16  Andrew Haley  <aph@cygnus.com>
925
926         * typeck.c (build_java_array_type): Rewrite code to do array
927         alignment.  Take into account back-end macros when aligning array
928         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
929         user to set alignment. Fixes gcj/252 and 160.
930
931 2000-08-09  Tom Tromey  <tromey@cygnus.com>
932
933         * parse.y (check_abstract_method_definitions): Now return `int'.
934         Check implemented interfaces.  Fixes PR gcj/305.
935
936         * parse.y (patch_switch_statement): Disallow `long' in switch
937         expressions.  Fixes PR gcj/310.
938
939 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
940
941         * decl.c (finit_leg_identifier_node): New global.
942         (init_decl_processing): Use `finit$' to initialize
943         finit_identifier_node. Use `$finit$' to initialize
944         finit_leg_identifier_node.
945         * expr.c (expand_java_field_op): Use ID_FINIT_P.
946         * java-tree.h (finit_identifier_node): Changed attached comment.
947         (finit_leg_identifier_node): New declaration.
948         (ID_FINIT_P): Take finit_identifier_node and
949         finit_leg_identifier_node into account. This is a backward
950         compatibility hack.
951
952 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
953
954         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
955         Jan 6 2000 patch.
956         (generate_bytecode_insns): Check `nargs' before emitting it.
957         * verify.c (merge_type_state): Fixed typo.
958         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
959         generate_bytecode_{conditional,insns}.
960
961 Sun Aug 13 09:41:49 2000  Anthony Green  <green@redhat.com>
962
963         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
964         for -pg builds).
965
966 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
967
968         * class.c (maybe_layout_super_class): Fixed indentation.
969         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
970         (java_check_methods): New function declaration.
971         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
972         instead of `str_ptr'.
973         * jcf-write.c (generate_bytecode_insns): Emit number the of args
974         of a `invokeinterface' at the right time.
975         * parse.h (WFL_STRIP_BRACKET): New macro.
976         (SET_TYPE_FOR_RESOLUTION): Use it.
977         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
978         (check_class_interface_creation): Don't check for cross package
979         innerclass name clashes.
980         (method_header): Behave properly if MDECL is `error_mark_node'.
981         (method_declarator): Return `error_mark_node' if bogus current
982         class.
983         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
984         (resolve_and_layout): New local `decl_type', set and used. Call
985         java_check_methods.
986         (java_check_methods): New method.
987         (java_layout_classes): Use it.
988         (resolve_qualified_expression_name): No EH check necessary in
989         access$<n>.
990         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
991         `case' statement.
992         (patch_assignment): Set DECL_INITIAL on integral final local.
993
994 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
995
996         * java-tree.h (flag_extraneous_semicolon): New extern.
997         * lang-options.h: (-Wextraneous-semicolon): New option.
998         * lang.c (flag_redundant): Fixed typo in leading comment.
999         (flag_extraneous_semicolon): New global.
1000         (lang_decode_option): Set `flag_extraneous_semicolon' when
1001         -Wall. Decode `-Wextraneous-semicolon'.
1002         * parse.y (type_declaration:): Removed `SC_TK' hack, added
1003         `empty_statement' rule.
1004         (class_body_declaration): Likewise.
1005         (method_body:): Accept `;' as a method body.
1006         (static_initializer:): Removed `SC_TK' hack.
1007         (constructor_block_end:): Likewise.
1008         (empty_statement:): Report deprecated empty declaration. Fixes
1009         gcj/295
1010
1011 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1012
1013         * parse.y (build_dot_class_method_invocation): Changed parameter
1014         name to `type'. Build signature from `type' and convert it to a
1015         STRING_CST if it's an array.
1016         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
1017         to use `ref_type' directly.
1018
1019 Sun Aug  6 00:47:24 2000  Ovidiu Predescu  <ovidiu@cup.hp.com>
1020
1021         * lang-options.h: Added a comma after the last element to avoid
1022         syntax errors when other languages define additional options.
1023
1024 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
1025
1026         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
1027         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
1028         (jc1): Link with $(BACKEND).
1029         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
1030
1031 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
1032
1033         * jvspec.c: Adjust type of second argument to
1034         lang_specific_driver, and update code as necessary.
1035
1036         * class.c (build_dtable_decl): Initialize dummy.
1037
1038 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1039
1040         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
1041         method bodies not to rule out discarding `<clinit>'; don't use
1042         <clinit> to initialize static fields with constant initializers.
1043
1044 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1045
1046         * gjavah.c (print_method_info): Added `synth' parameter. Skip
1047         synthetic methods.
1048         (method_synthetic): New global.
1049         (HANDLE_METHOD): Recognize synthetic method and tell
1050         `print_method_info' about it.
1051         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
1052         processing a synthetic method.
1053         * jcf-reader.c (skip_attribute): New function.
1054         ( skip_attribute): Likewise.
1055
1056 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1057
1058         * parse.y (build_outer_field_access): Fixed comments.
1059         (fix_constructors): Emit the initialization of this$<n> before
1060         calling $finit$.
1061         (resolve_qualified_expression_name): Build an access to `decl' if
1062         necessary.
1063
1064 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1065
1066         * parse-scan.y (curent_class): Non longer const.
1067         (inner_qualifier, inner_qualifier_length): Deleted.
1068         (current_class_length): New global.
1069         (bracket_count): Fixed typo in leading comment.
1070         (anonymous_count): New global.
1071         (class_instance_creation_expression:): Handle anonymous classes.
1072         (anonymous_class_creation:): New rule.
1073         (push_class_context): Rewritten.
1074         (pop_class_context): Likewise.
1075         (INNER_QUALIFIER): Macro deleted.
1076         (report_class_declaration): call `push_class_context' when
1077         entering the function. `fprintf' format modified not to use
1078         INNER_QUALIFIER.
1079         (report_class_declaration): Assign `package_name' and
1080         `current_class' to NULL separatly.
1081
1082 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1083
1084         * expr.c (build_invokeinterface): Call layout_class_methods on
1085         target interface.
1086
1087 2000-07-27  Tom Tromey  <tromey@cygnus.com>
1088             Anthony Green  <green@cygnus.com>
1089             Alexandre Petit-Bianco  <apbianco@cygnus.com>
1090
1091         * class.c (make_class_data): Create vtable for abstract classes.
1092         (get_dispatch_table): Changed to cope with abstract classes.
1093
1094 2000-07-27  Tom Tromey  <tromey@cygnus.com>
1095
1096         * parse.y (patch_method_invocation): Don't reverse the argument
1097         list when dealing with anonymous class constructors. Fixed typo in
1098         comment.
1099
1100 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1101
1102         * parse.y (build_alias_initializer_parameter_list): Reverse
1103         crafted list when building aliases for anonymous class
1104         constructors.
1105
1106 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1107
1108         * parse.y (jdep_resolve_class): Don't bother checking potential
1109         innerclass access if `decl' is NULL.
1110         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
1111         WFL.
1112
1113 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1114
1115         * parse.c: Remove (again.)
1116
1117 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1118
1119         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
1120         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
1121         outside the `if' statement, alias to innerclass removed, `decl'
1122         used to mark the class complete.
1123
1124 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1125
1126         * parse.y (simple_name:): Fixed typo in error message.
1127
1128 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1129
1130         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
1131         or its first operand can be error marks.
1132
1133 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1134
1135         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
1136         * parse.y (method_header): Likewise.
1137
1138 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1139
1140         * parse.y (process_imports): Consider that one might be trying to
1141         import an innerclass. Fixes gcj/254
1142
1143 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1144
1145         * parse.y (find_as_inner_class): Handle the case where the
1146         enclosing context of an innerclass has been loaded as bytecode.
1147
1148 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1149
1150         * parse.y (simple_name:): Reject `$' in type names.
1151         (resolve_type_during_patch): Use `type' as a second
1152         argument to resolve_no_layout. Fixes gcj/257.
1153
1154 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
1155
1156         * parse.y (find_most_specific_methods_list): Select the only
1157         non-abstract method even if max has been set.
1158         Fixes gcj/285, gcj/298.
1159
1160 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
1161
1162         * lang-specs.h: Added %(jc1) to java compiler options.
1163
1164 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
1165
1166         * .cvsignore: New file.
1167
1168 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1169
1170         * parse.y (not_accessible_p): Access granted to innerclasses
1171         (indirectly) extending the reference type. Fixes gcj/249.
1172
1173 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1174
1175         * parse.y (patch_method_invocation): Fixed comment.
1176         (maybe_use_access_method): Build this$<n>s to the context of the
1177         target method, or a type that extends it. Fixes gcj/242.
1178
1179 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
1180
1181         * parse.c: Remove.
1182
1183 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1184
1185         * parse.y (fold_constant_for_init): Avoid bullish conversion.
1186
1187 2000-07-13  Tom Tromey  <tromey@cygnus.com>
1188
1189         * lang-specs.h: Added %{I*}.
1190
1191 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
1192
1193         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
1194
1195 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
1196
1197         * parse-scan.c: Remove.
1198
1199 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1200
1201         * class.c (set_super_info): Handled protected inner classes.
1202         (common_enclosing_context_p): Bail early if arguments aren't both
1203         inner classes.
1204         (get_access_flags_from_decl): Handle private and protected inner
1205         classes.
1206         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
1207         (CLASS_PROTECTED): Likewise.
1208         (struct lang_type): New bitfield `poic'.
1209         * parse.y (jdep_resolve_class): Call check_inner_class_access on
1210         inner classes only.
1211         (check_inner_class_access): Renamed arguments, added
1212         comments. Handles protected inner classes (fixes gcj/225)
1213         (not_accessible_p): Fixed comments. Avoid handling inner classes.
1214
1215 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1216
1217         * parse.y (resolve_qualified_expression_name): Verify qualified
1218         access to `this'. Fixes gcj/239.
1219
1220 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1221
1222         * jcf-write.c (generate_classfile): Don't install ConstantValue
1223         for null pointers.
1224
1225 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1226
1227         * parse.y (resolve_qualified_expression_name): Handle inner class
1228         access. Fixes gcj/256.
1229
1230 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1231
1232         * jcf-write.c (generate_classfile): Properly install the
1233         ConstantValue attribute and the initial value constant pool index
1234         on string constants.
1235         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
1236         class files.
1237
1238 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1239
1240         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
1241         construct.
1242         * parse.y (find_as_inner_class): Fixed typo.
1243         (do_resolve_class): Explore enclosing contexts when searching for
1244         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
1245         (check_inner_class_access): Check `decl' which can be null in case
1246         of previous errors.
1247
1248 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1249
1250         * java-tree.h (java_debug_context): Declared `extern'.
1251         (safe_layout_class): Likewise.
1252         * parse.y (resolve_field_access): Field must be `static' in order
1253         to be replaced by its initial value. Added comments.
1254         (find_applicable_accessible_methods_list): Fixed typo.
1255         (find_most_specific_methods_list): Methods found in innerclasses
1256         take over methods founds in the enclosing contexts.
1257         (java_complete_tree): Loosen restrictions on the type of DECLs
1258         that can be replaced by their initialization values.
1259         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
1260
1261 2000-07-05  Tom Tromey  <tromey@cygnus.com>
1262
1263         * Make-lang.in (PARSE_DIR): New macro.
1264         (PARSE_RELDIR): Likewise.
1265         (PARSE_C): Likewise.
1266         (PARSE_SCAN_C): Likewise.
1267         ($(PARSE_C)): New target.
1268         ($(PARSE_SCAN_C)): Likewise.
1269         (SET_BISON): New macro.
1270         (BISONFLAGS): Likewise.
1271         (JAVABISONFLAGS): Likewise.
1272
1273 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
1274
1275         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
1276         argument on the first pass for CNI as well as JNI.
1277         (print_method_info): Set up method name on the first pass only.
1278
1279 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1280
1281         * parse.y (parser_qualified_classname): Removed parameter
1282         `is_static'.
1283         (create_interface): Removed first passed parameter to
1284         parser_qualified_classname.
1285         (create_class): Likewise. Don't install alias on static
1286         innerclasses. Fixes gcj/275.
1287
1288 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1289
1290         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
1291         debugable statement with empty_stmt_node. Fixes gcj/272
1292
1293 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1294
1295         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
1296         gcj/271.
1297
1298 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1299
1300         * jcf-write.c (push_long_const): Appropriately cast short negative
1301         constant to jword.
1302
1303 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1304
1305         * parse.y (verify_constructor_super): Use loop variable
1306         `m_arg_type' initialized with `mdecl_arg_type'.
1307
1308 2000-06-29  Tom Tromey  <tromey@cygnus.com>
1309
1310         * parse.y (resolve_field_access): Handle case where `type_found'
1311         is NULL.
1312
1313 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1314
1315         * expr.c (lookup_field): The same field can be found through two
1316         different interface. Don't declare it ambiguous in that case.
1317
1318 2000-06-27  Tom Tromey  <tromey@cygnus.com>
1319
1320         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
1321         follows \r, then unget it at a lower level.
1322
1323 2000-06-26  Tom Tromey  <tromey@cygnus.com>
1324
1325         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
1326         java_complete_tree.
1327
1328 2000-06-25  Tom Tromey  <tromey@cygnus.com>
1329
1330         * parse.y (for_statement): Wrap expression in a WFL if it is a
1331         constant.  For PR gcj/268.
1332
1333 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1334
1335         * parse.y (do_resolve_class): Minor optimiztion in the package
1336         list search. Removed unecessary test and return statement.
1337         (valid_ref_assignconv_cast_p): Order of arguments to
1338         enclosing_context_p fixed.
1339
1340 2000-06-24  Tom Tromey  <tromey@cygnus.com>
1341
1342         * expr.c (lookup_field): Print error and return error_mark_node if
1343         field reference is ambiguous.
1344
1345         * parse.y (check_abstract_method_definitions): Also check if
1346         `other_method' is abstract.
1347
1348 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1349
1350         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
1351         classes.
1352         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
1353         (struct lang_type): New field `pic'.
1354         (CLASS_PRIVATE): New macro.
1355         * parse.y (check_inner_class_access): New function.
1356         (jdep_resolve_class): Call it.
1357
1358 2000-06-23  Tom Tromey  <tromey@cygnus.com>
1359
1360         * parse.y (patch_incomplete_class_ref): Initialize the returned
1361         class.  For PR gcj/260.
1362
1363 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1364
1365         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
1366
1367 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1368
1369         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
1370         Java specific checks.
1371         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
1372         screened by DECL_P.
1373         * java-tree.def (CASE_EXPR): Marked 'e'.
1374         (DEFAULT_EXPR): Likewise.
1375         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
1376         screened by DECL_P.
1377         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
1378         Java specific checks.
1379         (generate_bytecode_insns): Test try_block for BLOCK before using
1380         BLOCK_EXPR_BODY.
1381         * parse.y (build_wfl_wrap): Added `location' argument. Set
1382         EXPR_WFL_LINECOL accordingly.
1383         (dim_expr:): Wrap constants with WFLs.
1384         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
1385         (resolve_package): Check for `stmt' not being a BLOCK before
1386         building a debuggable statement with it.
1387         (make_qualified_primary): Added extra parameter to build_wfl_wrap
1388         invocation.
1389         (resolve_field_access): Make sure `decl' is a DECL before treating
1390         it as such.
1391         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
1392         IDENTIFIER_NODE before treating it as such.
1393         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
1394         treating it as such.
1395         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
1396         to be applied only on non array types.
1397
1398 2000-06-16  Per Bothner  <per@bothner.com>
1399
1400         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
1401         define in terms of DECL_RESULT, as that fails when --enable-checking.
1402
1403 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1404
1405         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
1406         types the same in comparison.
1407         (CHECK_OP): Add static prototype.
1408
1409 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
1410
1411         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
1412         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
1413         * parse.c: Rebuilt.
1414
1415 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1416
1417         * decl.c (create_primitive_vtable): Prototype.
1418
1419         * jcf-write.c (generate_bytecode_insns): Initialize variable
1420         `saved_context'.
1421
1422         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
1423
1424 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
1425
1426         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
1427         to track searched classes, and do not search the same class more than
1428         once. Call find_applicable_accessible_methods_list on immediate
1429         superclass, instead of search_applicable_method_list on all ancestors.
1430         Fix for PR gcj/238.
1431
1432 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
1433
1434         * parse.y (register_fields): Permit static fields in inner classes
1435         if they are final. Fix for PR gcj/255.
1436
1437 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1438
1439         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
1440         * parse.y (find_in_imports): Returned type changed to void,
1441         leading comment fixed.
1442         (register_package): New function.
1443         (qualify_and_find): Likewise.
1444         (package_declaration:): Use `register_package'.
1445         (single_type_import_declaration:): Removed local variable
1446         `node'. Added missing `;' for consistency.
1447         (type_import_on_demand_declaration:): Use `chainon' to link new
1448         entries.
1449         (lookup_field_wrapper): Lookup local variables defined in outer
1450         contexts first.
1451         (java_complete_class): Don't reverse the list of imported on demand.
1452         (do_resolve_class): Reorganized. Removed local variable
1453         `original_name'. Call `qualify_and_find' with the current package
1454         name, invoke `find_in_imports_on_demand' right after. Call
1455         `qualify_and_find' with the packages we've seen so far. Fixed
1456         operations numbering in comments.
1457         (java_expand_class): Don't reverse `package_list'.
1458         (find_most_specific_methods_list): New local variables `abstract'
1459         and `candidates'. Use them to pick the right method.
1460
1461 Tue Jun  6 11:39:05 2000  Tom Tromey  <tromey@ferrule.cygnus.com>
1462
1463         * parse.y (check_modifiers_consistency): Don't subtract out
1464         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
1465
1466 2000-06-04  Philipp Thomas  <pthomas@suse.de>
1467
1468         * Makefile.in (INTLLIBS): New.
1469         (LIBS): Add above.
1470         (DEPLIBS): Ditto.
1471
1472 Fri Jun  2 16:48:55 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1473
1474         * class.c (get_dispatch_table): Build the vtable dummy entry list
1475         element with a null purpose. Fixed leading comment.
1476         (build_dtable_decl): Build an accurate dtable type when appropriate
1477         and use it.
1478
1479 2000-06-02  Richard Henderson  <rth@cygnus.com>
1480
1481         * lang.c (lang_get_alias_set): New.
1482
1483 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1484
1485         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
1486         before using it as the accessed field.
1487
1488 2000-05-31  Tom Tromey  <tromey@cygnus.com>
1489
1490         * java-tree.h (boolean_array_vtable, byte_array_vtable,
1491         char_array_vtable, short_array_vtable, int_array_vtable,
1492         long_array_vtable, float_array_vtable, double_array_vtable):
1493         Declare.
1494         * expr.c (get_primitive_array_vtable): New function.
1495         (create_primitive_vtable): New function.
1496         (java_lang_expand_expr): Enable code to statically generate
1497         arrays.
1498         * decl.c (init_decl_processing): Create primitive vtables.
1499         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
1500         short_array_vtable, int_array_vtable, long_array_vtable,
1501         float_array_vtable, double_array_vtable): Define.
1502
1503 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
1504
1505         * java/parse.y (find_applicable_accessible_methods_list):
1506         Don't add an uninitialized value to the list.
1507
1508 2000-05-25  Tom Tromey  <tromey@cygnus.com>
1509
1510         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
1511         when trying to see if field's class should be initialized.  Always
1512         initialize field's declaring class, not qualified class.
1513         For PR gcj/162.
1514
1515         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
1516         `wfl_operator', to maybe_build_primttype_type_ref.
1517         Fixes PR gcj/235.
1518
1519 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
1520
1521        * parse.y (patch_method_invocation): Don't try to lookup methods
1522        in primitive types.
1523
1524 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1525
1526         * parse.y (resolve_field_access): Call the appropriate <clinit>
1527         before accessing the length of a static array. Craft a decl for
1528         the field while its time. Fixes PR gcj/129.
1529
1530 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1531
1532         * parse.y (resolve_package): Correctly set `*next' (was off by
1533         one.)
1534         (resolve_qualified_expression_name): Fixed comment.
1535
1536 Thu Apr 27 17:47:34 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1537
1538         * jcf-parse.c (jcf_parse_source): Reset current_class and
1539         current_function_decl to NULL before parsing a new file.
1540
1541 Thu Apr 27 17:25:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1542
1543         * parse.y (block_end:): If the collected block doesn't feature a
1544         statement, insert an empty statement.
1545
1546 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1547
1548         * parse.y (maybe_yank_clinit): New function.
1549         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
1550         end of the list of methods belonging to a class.
1551         (java_complete_expand_method): Check whether <clinit> is really
1552         necessary and expand it accordingly.
1553
1554 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1555
1556         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
1557         processed by the method's switch statement.
1558
1559 2000-05-19  Tom Tromey  <tromey@cygnus.com>
1560
1561         * java-tree.h: Added init state enum.
1562         * decl.c (emit_init_test_initialization): Initialize class
1563         initialization check variable by looking at class' state.
1564
1565 2000-05-19  Tom Tromey  <tromey@cygnus.com>
1566
1567         * java-tree.h (build_instanceof): Declare.
1568         (build_get_class): Declare.
1569         * parse.y (patch_binop): Use build_instanceof.
1570         * expr.c (build_instanceof): New function.  If class is final,
1571         don't make a function call.
1572         (expand_java_INSTANCEOF): Use it.
1573         (build_get_class): New function.
1574
1575 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1576
1577         * jcf-write.c (generate_classfile): Scan the source_file for
1578         slashes with the right pointer variable.
1579
1580 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1581
1582         * lang.c (lang_decode_option): Update -Wunused flags by calling
1583         set_Wunused.
1584         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
1585
1586 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
1587
1588         * check_init.c (check_init): Constify local char *.
1589         * class.c (push_class): Constify local char *.
1590         * java_tree.h: Update prototypes.
1591         * jcf-io.c (open_class): Constify filename parameter and
1592         return value.
1593         (find_class): Remove redundant string copy.  Cast return from
1594         open_class.
1595         * jcf-parse.c (read_class, parse_class_file, yyparse):
1596         Constify local char *.
1597         * jcf-write.c (generate_bytecode_insns, generate_classfile):
1598         Constify local char *.
1599         * jcf.h (JCF): Constify filename and classname.
1600         (JCF_FINISH): Cast args to FREE to char * when appropriate.
1601         * lang.c (init_parse): Constify parameter and return value.
1602         * lex.c (java_get_line_col): Constify filename parameter.
1603         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
1604         * parse.y (java_parser_context_suspend,
1605         issue_warning_error_from_context, safe_layout_class): Constify
1606         local char *.
1607         * parse.c: Regenerate.
1608
1609 2000-05-08  Tom Tromey  <tromey@cygnus.com>
1610
1611         * expr.c (build_jni_stub): Cache the result of
1612         _Jv_LookupJNIMethod.
1613
1614 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1615
1616         * decl.c (predef_filenames_size): Now 7.
1617         (predef_filenames): New seventh entry.
1618
1619 2000-05-04  Tom Tromey  <tromey@cygnus.com>
1620
1621         * boehm.c (mark_reference_fields): Don't mark RawData fields.
1622         Keep track of when we've seen a reference field after a
1623         non-reference field.
1624         (get_boehm_type_descriptor): Handle case where we see
1625         non-reference fields but no trailing reference field.
1626         * decl.c (rawdata_ptr_type_node): Define.
1627         (init_decl_processing): Initialize rawdata_ptr_type_node.
1628         * java-tree.h (rawdata_ptr_type_node): Declare.
1629
1630 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1631
1632         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
1633         specifiers in calls to fprintf.
1634
1635 2000-05-03  Andrew Haley  <aph@cygnus.com>
1636
1637         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
1638
1639         * javaop.h (WORD_TO_INT): New function.
1640         (IMMEDIATE_s4): Use WORD_TO_INT.
1641         * jcf.h (JPOOL_INT): Ditto.
1642
1643         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
1644         separator.
1645
1646 2000-04-19  Tom Tromey  <tromey@cygnus.com>
1647
1648         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
1649         on native function.
1650         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
1651         JNI methods.
1652         * expr.c (build_jni_stub): New function.
1653         * lang-specs.h: -fjni and -femit-class-file are incompatible.
1654         * parse.c: Rebuilt.
1655         * parse.y (java_complete_expand_methods): Expand a native method
1656         and call build_jni_stub if -fjni given.
1657         * lang-options.h: Document -fjni.
1658         * lang.c (flag_jni): New global.
1659         (lang_f_options): Added `jni' entry.
1660         * java-tree.h (soft_lookupjnimethod_node,
1661         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
1662         Declare.
1663         (flag_jni): Declare.
1664         (build_jni_stub): Declare.
1665         (struct lang_decl): Added `native' flag.
1666         (METHOD_NATIVE): Redefined to use `native' field of lang specific
1667         structure.
1668         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
1669         soft_jnipopsystemframe_node): New globals.
1670         (init_decl_processing): Set them.  _Jv_InitClass only takes one
1671         argument.
1672
1673         * java-tree.def: Put into `C' mode.
1674
1675 2000-04-27  Tom Tromey  <tromey@cygnus.com>
1676
1677         Fix for PR gcj/2:
1678         * expr.c (expand_invoke): Generate check to see if object pointer
1679         is null in nonvirtual invocation case.
1680         * java-tree.h (soft_nullpointer_node): Declare.
1681         * decl.c (soft_nullpointer_node): New global.
1682         (init_decl_processing): Initialize soft_nullpointer_node.
1683         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
1684         or `private' methods.
1685         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
1686
1687 Wed Apr 26 14:29:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1688
1689         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
1690         from <clinit>
1691
1692 2000-04-26  Tom Tromey  <tromey@cygnus.com>
1693
1694         * zextract.c (find_zip_file_start): New function.
1695         (read_zip_archive): Use it.
1696
1697 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1698
1699         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
1700
1701 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1702
1703         * class.c (common_enclosing_context_p): New function.
1704         * java-tree.h (common_enclosing_context_p): Added prototype.
1705         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
1706         classes sharing an outer context with the current instance.
1707         * parse.y (build_access_to_thisn): Fixed leading comment.
1708         (verify_constructor_super): New local `supper_inner'. Skip
1709         enclosing context argument in the case of inner class constructors.
1710         (patch_method_invocation): Insert proper context as second
1711         parameter to pure inner class constructor super invocations.
1712
1713 Mon Apr 24 14:59:36 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1714
1715         * parse.y (end_class_declaration): Reset the interface number
1716         counter.
1717
1718 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1719
1720         * parse.y (source_start_java_method): Deleted unecessary code.
1721         (patch_method_invocation): Fixed comment.
1722
1723 2000-04-24  Robert Lipe <robertlipe@usa.net>
1724
1725         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
1726
1727 2000-04-23  Tom Tromey  <tromey@cygnus.com>
1728
1729         * boehm.c (mark_reference_fields): Use int_byte_position.
1730
1731 2000-04-22  Tom Tromey  <tromey@cygnus.com>
1732
1733         * boehm.c (mark_reference_fields): Only call byte_position on
1734         non-static fields.
1735
1736 2000-04-22  Tom Tromey  <tromey@cygnus.com>
1737
1738         * boehm.c (mark_reference_fields): Added `last_view_index'
1739         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
1740
1741 Thu Apr 20 17:41:28 2000  Mo DeJong  <mdejong@cygnus.com>
1742
1743         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
1744         * parse.y (check_class_interface_creation): Fixed comments. Select
1745         permitted modifiers for (inner) interfaces. Changed error message
1746         to report rejected modifiers used with local classes.
1747
1748 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1749
1750         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
1751         of directly inherited type considered in scope.
1752         * parse.y (do_resolve_class): Search inherited classes for inner
1753         classes.
1754
1755 2000-04-20  Tom Tromey  <tromey@cygnus.com>
1756
1757         * parse.y (not_accessible_p): Use member's class, not current
1758         class, when doing inheritance check for protected reference.
1759         Fixes PR gcj/124.
1760
1761 Thu Apr 20 18:20:58 2000  Jason Schroeder  <shrode@subnature.com>
1762
1763         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
1764
1765 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1766
1767         * parse.y (lookup_field_wrapper): Search for final local aliases.
1768         (resolve_expression_name): Let lookup_field_wrapper search for
1769         final local aliases. Force the value of `name' if one is found.
1770         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
1771         an expression name. Fixed comments.
1772
1773 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1774
1775         * parse.y (yyerror): `msg' can be null, don't use it in that case.
1776
1777 2000-04-19  Tom Tromey  <tromey@cygnus.com>
1778
1779         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
1780
1781 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1782
1783         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
1784
1785 2000-04-18  Tom Tromey  <tromey@cygnus.com>
1786
1787         PR gcj/211:
1788         * gjavah.c (utf8_cmp): Changed return value.
1789         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
1790         result.
1791         (cxx_keywords): New global.
1792         (get_field_name): Handle new result of cxx_keyword_subst.
1793         (print_method_info): Likewise.
1794
1795 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
1796
1797         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
1798         with a newline, for CNI.
1799         (print_stub_or_jni): Print a space or newline before method name for
1800         CNI as well as JNI.
1801         (print_cxx_classname): Don't write leading "::" in CNI stub method.
1802         (process_file): Include gcj/cni.h if generating CNI stubs.
1803
1804 2000-04-16  Tom Tromey  <tromey@cygnus.com>
1805
1806         * gjavah.c (decompile_method): Use print_field_name.
1807         Fixes PR gcj/205.
1808
1809 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1810
1811         * parse.y (java_expand_classes): Reverse the package list once.
1812         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
1813         reduction.
1814         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
1815         the `==' and `!=' operators.
1816
1817 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1818
1819         * jcf-write.c (generate_bytecode_insns): At invokation time,
1820         always relate an interface method to the type of its selector.
1821
1822 2000-04-05  Tom Tromey  <tromey@cygnus.com>
1823
1824         Fix for PR gcj/2:
1825         * expr.c (expand_invoke): Generate check to see if object pointer
1826         is null in nonvirtual invocation case.
1827         * java-tree.h (soft_nullpointer_node): Declare.
1828         * decl.c (soft_nullpointer_node): New global.
1829         (init_decl_processing): Initialize soft_nullpointer_node.
1830         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
1831         or `private' methods.
1832         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
1833
1834 2000-04-05  Tom Tromey  <tromey@cygnus.com>
1835
1836         Fix for PR gcj/140:
1837         * parse.y (check_final_assignment): Recognize assignments to the
1838         `length' field of an array when generating class files.
1839
1840 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1841
1842         * class.c (decl_hash): Prototype removed.
1843         (decl_compare): Likewise.
1844
1845 2000-04-05  Tom Tromey  <tromey@cygnus.com>
1846
1847         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
1848         * parse.y (check_modifiers_consistency): Check for final/volatile
1849         clash.  Fixes PR gcj/164.
1850
1851 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1852
1853         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
1854         made global.
1855         (java_hash_compare_tree_node): Renamed from `decl_compare, made
1856         global.
1857         (add_method_1): Use `java_hash_hash_tree_node' and
1858         `java_hash_compare_tree_node'.
1859         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
1860         (java_hash_compare_tree_node): Likewise.
1861         * parse.y (find_applicable_accessible_methods_list): Create,
1862         delete and use a hash table to remember already searched interfaces.
1863
1864 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
1865
1866         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
1867         with latest entry.
1868
1869 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1870
1871         * boehm.c (mark_reference_fields, set_bit): Prototype.
1872         (set_bit): Un-ANSI-fy definition.
1873
1874         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
1875         Prototype.
1876
1877         * decl.c (emit_init_test_initialization): Likewise.
1878
1879         * gjavah.c (jni_print_char): Likewise.
1880
1881         * parse.y (create_new_parser_context): Likewise.
1882
1883 Thu Mar 30 15:26:56 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1884
1885         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
1886         patch missing hunk. Fixed indentation.
1887
1888 2000-03-30  Tom Tromey  <tromey@cygnus.com>
1889
1890         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
1891         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
1892
1893 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1894
1895         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
1896         when negative *before* using it as an array index.
1897         * ChangeLog: Fixed typo.
1898
1899 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1900
1901         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
1902         to 0 when it reaches -1.
1903
1904 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1905
1906         * jcf-parse.c (get_constant): Properly cast `num' during the
1907         invocation of `add_double'.
1908         * jcf-write.c (push_long_const): Properly cast `lo' before
1909         comparing it to short bounds.
1910         * parse-scan.y (interface_declaration:): Rule re-arrange so that
1911         `interface_body:' is reduced after the current interface is
1912         pushed.
1913
1914 2000-03-26  Tom Tromey  <tromey@cygnus.com>
1915
1916         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
1917         Java-specific `-f' option.
1918
1919 Sun Mar 26 11:37:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1920
1921         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
1922         Adjust order of making types.
1923         Make bitsize_*_node values.
1924
1925 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1926
1927         * class.c (make_field_value): Use byte_position.
1928         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
1929         (java_array_data_offset): Likewise.
1930         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
1931         bzero call.
1932
1933 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1934
1935         * parse.y (check_abstract_method_definitions): New local
1936         `end_type_reached'. Make sure we also consider `end_type'.
1937         (java_check_abstract_method_definitions): Make sure we eventually
1938         consider `java.lang.Object'.
1939         (maybe_use_access_method): Don't use access method if not in the
1940         context of a pure inner class or if the method's context is right.
1941         (find_applicable_accessible_methods_list): New static flag
1942         `object_done'. Don't search abstract classes as interfaces. Fixed
1943         indentation. Fixed the `java.lang.Object' only search. Search
1944         class interface(s) first, then fully search enclosing contexts.
1945         (find_most_specific_methods_list): Pick the closest candidate when
1946         they're all abstract.
1947
1948 Mon Mar 20 08:58:51 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1949
1950         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
1951         properly initialize `finished_label'. Don't emit gotos for empty
1952         try statements.
1953
1954 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1955
1956         * except.c (emit_handlers): Clear catch_clauses_last.
1957
1958 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1959
1960         * parse.y (check_method_types_complete): New function.
1961         (create_class): Reset anonymous class counter only when seeing an
1962         non inner classe.
1963         (java_complete_class): JDEP_METHOD: Don't recompute signature
1964         if incomplete.
1965
1966 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1967
1968         * class.c (build_static_ref): Fixed indentation in comment.
1969         * java-tree.def (TRY_EXPR): Fixed typo in name.
1970         (CLASS_LITERAL): Likewise.
1971         * java-tree.h: (TYPE_DOT_CLASS): New macro.
1972         (struct lang_type): New field `dot_class'.
1973         * jcf-write.c (generate_bytecode_insns): Fixed error message.
1974         (generate_classfile): Method `class$' is synthetic.
1975         * parse.y (build_do_class_method): New function.
1976         (build_dot_class_method_invocation): Likewise.
1977         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
1978         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
1979         (qualify_ambiguous_name): Likewise.
1980         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
1981         (build_try_statement): Fixed leading comment.
1982
1983 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1984
1985         * class.c (make_field_value): Properly handle sizes.
1986         (get_dispatch_vector): Use tree_low_cst and host_integerp.
1987         (layout_class_method): Count using trees.
1988         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
1989         * expr.c (java_array_data_offset): Use int_bit_position.
1990         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
1991         (build_invokevirtual): Use tree_low_cst and do computations with trees.
1992
1993 2000-03-16  Tom Tromey  <tromey@cygnus.com>
1994
1995         * lang.c (flag_hash_synchronization): New global.
1996         (lang_f_options): Added `hash-synchronization'.
1997         * lang-options.h: Mention -fhash-synchronization.
1998         * java-tree.h (flag_hash_synchronization): Declare.
1999         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
2000         hash table synchronization is disabled.
2001         * decl.c (init_decl_processing): Only push `sync_info' value when
2002         hash table synchronization is disabled.
2003         * class.c (make_class_data): Only push `sync_info' field when hash
2004         table synchronization is disabled.  Removed dead code.
2005
2006 2000-03-16  Tom Tromey  <tromey@cygnus.com>
2007
2008         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
2009
2010 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2011
2012         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
2013         classes.
2014         * parse.y (patch_method_invocation): Handle anonymous classes
2015         creation in static context.
2016
2017 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2018
2019         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
2020         * parse.y (resolve_qualified_expression_name): Use it.
2021         (patch_method_invocation): Likewise.
2022
2023 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2024
2025         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
2026         depending on the type of dependency which dictates what the
2027         current class is.
2028         (unresolved_type_p): Resolved types limited to the current class.
2029
2030 2000-03-15  Tom Tromey  <tromey@cygnus.com>
2031
2032         * decl.c (init_decl_processing): Set type of `sync_info' to be
2033         pointer to Object.
2034
2035         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
2036         Correctly compute bit number for current slot.  Zero `high' and
2037         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
2038         mark_reference_fields.
2039         (mark_reference_fields): New function.
2040
2041 Tue Mar 14 17:15:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2042
2043         * parse.y (register_incomplete_type): Fixed initialization of
2044         JDEP_ENCLOSING.
2045
2046 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2047
2048         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
2049         static globals.
2050         (push_class_context, pop_class_context): New function.
2051         (class_body:): Call pop_class_context.
2052         (interface_body:): Likewise.
2053         (INNER_QUALIFIER): New macro.
2054         (report_class_declaration): Changed output format and use
2055         INNER_QUALIFIER. Call push_class_context.
2056
2057 2000-02-14  Andrew Haley  <aph@cygnus.com>
2058
2059         * check-init.c (check_init): Add new cases for unary and binary
2060         tree nodes.
2061
2062 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2063
2064         * parse.y (resolve_package): Set `next' once a type name has been
2065         progressively discovered.
2066         (resolve_qualified_expression_name): Propagate resolution only if
2067         there are remaining qualifiers. Take into account `q' might have
2068         been cleared after re-qualification.
2069         * parse.y (patch_method_invocation): New local `resolved'.
2070         Section dealing with qualified expression rewritten to use
2071         resolve_field_access.
2072
2073 Mon Mar 13 12:21:13 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2074
2075         * parse.h (PUSH_CPC): Fixed indentation.
2076         (DEBUG_CPC): New macro.
2077         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
2078         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
2079         * parse.y (class_body_declaration:): Use
2080         SET_CPC_INSTANCE_INITIALIZER_STMT.
2081         (method_declaration:): Check for null current_function_decl.
2082         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
2083         (java_parser_context_pop_initialized_field): Better handling of
2084         empty lists.
2085         (maybe_make_nested_class_name): Mark nested class name as
2086         qualified when necessary.
2087         (end_class_declaration): Don't call java_parse_context_resume when
2088         one or more error occured.
2089         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
2090         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
2091         SET_CPC_INITIALIZER_STMT.
2092         (method_header): Check for inner classes declaring static methods.
2093         (resolve_qualified_expression_name): Handle situation where `this'
2094         is implied.
2095
2096 Mon Mar 13 11:36:51 2000  Hans Boehm <boehm@acm.org>
2097
2098         * typeck.c (build_prim_array_type): Correctly set the high word too.
2099
2100 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2101
2102         * parse.y (java_complete_expand_methods): Leave <clinit> out of
2103         ordinary methods.
2104         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
2105         list of methods for interfaces.
2106
2107 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2108
2109         * parse.y (qualify_ambiguous_name): Properly handle expressions
2110         using `null'.
2111
2112 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2113
2114         * parse.y (check_final_assignment): Extended to process
2115         COMPOUND_EXPR.
2116         (patch_assignment): Have check_final_assignment called only once.
2117
2118 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2119
2120         * java-tree.h (IS_INIT_CHECKED): New flag.
2121         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
2122         * parse.y (patch_string): Call force_evaluation_order on the
2123         completed string concatenation tree.
2124         * expr.c (force_evaluation_order): Call force_evaluation_order on
2125         function's arguments too.
2126
2127 Mon Mar  6 18:07:07 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2128
2129         * decl.c (emit_init_test_initialization): Mark KEY as unused.
2130         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
2131         (build_anewarray): Likewise.
2132         * parse.y (patch_newarray): Likewise.
2133         * parse.c: Regenerated.
2134
2135 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
2136
2137         * decl.c (init_decl_processing): Added new class fields `depth',
2138         `ancestors', and `idt' to class_type_node. Use
2139         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
2140         * class.c (make_class_data): Push initial values for new fields.
2141         * java-tree.h: Updated prototype for `build_invokeinterface'.
2142         * expr.c (build_invokeinterface): Changed parameters to accept
2143         `method' tree. Calculate index of `method' in its declaring
2144         interface. Build call to _Jv_LookupInterfaceMethodIdx.
2145         (expand_invoke): Call `build_invokeinterface' with new parameters.
2146         * parse.y (patch_invoke): Call `build_invokeinterface' with new
2147         parameters.
2148
2149 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
2150
2151         * typeck.c (lookup_do): Search superinterfaces first
2152         when looking up an interface method. From Godmar Back
2153         <gback@cs.utah.edu>
2154
2155 2000-03-06  Tom Tromey  <tromey@cygnus.com>
2156
2157         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
2158
2159 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2160
2161         * java-tree.h (lookup_argument_method2): Declared.
2162         (safe_layout_class): Prototype moved from parse.h.
2163         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
2164         * parse.y (java_check_regular_methods): Local `super_class' gone.
2165         Call lookup_argument_method2 instead of lookup_argument_method.
2166         Perform modifier match for methods found declared in implemented
2167         interfaces. Fixed indentation problem. Overriding/hiding error
2168         report to take place only for methods found in classes.
2169         * typeck.c (lookup_argument_method): Changed leading
2170         comment. Re-written by calling lookup_do.
2171         (lookup_argument_method2): New function.
2172         (lookup_java_method): Re-written by calling lookup_do.
2173         (lookup_do): New function.
2174
2175 Thu Mar  2 15:18:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2176
2177         * check-init.c (check_init): Removed dead code. Handle (blank)
2178         final variables.
2179         * parse.y (declare_local_variables): New local `final_p', set it
2180         and use it to initialize LOCAL_FINAL.
2181         (check_final_assignment): Only check FIELD_DECLs.
2182
2183 2000-02-17  Tom Tromey  <tromey@cygnus.com>
2184
2185         * Makefile.in (JAVA_OBJS): Added boehm.o.
2186         (boehm.o): New target.
2187         * Make-lang.in (JAVA_SRCS): Added boehm.c.
2188         * java-tree.h (flag_use_boehm_gc): Declare.
2189         (get_boehm_type_descriptor): Declare.
2190         * lang.c (lang_f_options): Added `use-boehm-gc'.
2191         (flag_use_boehm_gc): New global.
2192         * lang-options.h: Added -fuse-boehm-gc.
2193         * boehm.c: New file.
2194         * class.c (get_dispatch_table): If class uses a Boehm type
2195         descriptor, put it in the vtable.
2196         (make_class_data): Removed dead code.
2197
2198 2000-03-03  Per Bothner  <per@bothner.com>
2199
2200         * decl.c (init_decl_processing):  Initialize sizetype properly.
2201
2202 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2203
2204         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
2205         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
2206         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
2207         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
2208         (jcf_parse): New local `current'. Load innerclasses seen in outer
2209         context being processed.
2210         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
2211         * jcf-write.c (append_innerclasses_attribute): New function.
2212         (append_innerclasses_attribute_entry): Likewise.
2213         (get_access_flags): Handle static classes. Set anonymous and local
2214         classes to be private.
2215         (generate_classfile): Attribute count adjusted. Call
2216         append_innerclasses_attribute.
2217         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
2218         PURE_INNER_CLASS_TYPE_P.
2219         * parse.y (parser_qualified_classname): New parameter `is_static',
2220         produce non qualified name accordingly.
2221         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
2222         (create_interface): Added argument to parser_qualified_classname.
2223         (create_class): Added argument to parser_qualified_classname. Setup
2224         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
2225         (add_inner_class_fields): Fixed indentation.
2226         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
2227         (method_declarator): Fixed typo in comment.
2228         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
2229         (build_current_thisn): Likewise.
2230         (patch_method_invocation): Likewise.
2231
2232 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2233
2234         * decl.c (current_function_decl): Move to toplev.c.
2235
2236 Mon Feb 28 08:20:42 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2237
2238         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
2239         (DECL_BIT_INDEX): Use underlying representation.
2240         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
2241
2242 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2243
2244         * expr.c (build_java_ret): Pass proper type to size_binop.
2245
2246 2000-02-25  Anthony Green  <green@cygnus.com>
2247
2248         * expr.c (build_class_init): Mark the decl to be ignored by
2249         check_init.
2250         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
2251         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
2252         * class.c (init_test_hash_newfunc): New function.
2253         (decl_hash): New function.
2254         (decl_compare): New function.
2255         * decl.c (emit_init_test_initialization): New function.
2256         (complete_start_java_method): Traverse the init test hashtable,
2257         calling emit_init_test_initialization.
2258         (always_initialize_class_p): Define.
2259         * expr.c (build_class_init): Use initialization tests when
2260         emitting class initialization code.
2261         (always_initialize_class_p): Declare.
2262         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
2263         1.
2264         * java-tree.h: Include hash.h.
2265         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
2266         (struct lang_decl): Add init_test_table field.
2267         (init_test_hash_entry): Define.
2268
2269 Fri Feb 25 18:41:31 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2270
2271         * gjavah.c (main): Avoid using `argi' to report unimplemented
2272         options.
2273
2274 Fri Feb 25 18:47:25 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2275
2276         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
2277         initialize locals to avoid warnings. Local `exception_type' moved
2278         into if statement.
2279
2280 Fri Feb 25 18:00:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2281
2282         * parse.y (resolve_expression_name): Use `orig' as a second
2283         argument to resolve_field_access.
2284         (resolve_field_access): Removed unecessary code when dealing with
2285         static fields.
2286
2287 Wed Feb 23 17:41:50 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2288
2289         * class.c (push_super_field): Don't push the field twice.
2290         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
2291         * parse.h (java_reorder_fields): Prototyped.
2292         * parse.y (java_reorder_fields): New function.
2293         (java_layout_class): Simplified not to worry about re-ordering.
2294
2295 2000-02-23  Tom Tromey  <tromey@cygnus.com>
2296
2297         * gjavah.c (print_name): In JNI case, correctly quote string.
2298         (print_method_info): Don't handle overrides in JNI mode.
2299
2300 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2301
2302         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
2303         value type set to `boolean_type_node'.
2304
2305 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
2306
2307         * jcf-dump.c (main): Test for correct condition after
2308         output file creation.
2309
2310 2000-02-19  Anthony Green  <green@cygnus.com>
2311
2312         * jcf-depend.c (add_entry): Fix test for first list entry.
2313
2314 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2315
2316         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
2317         * constants.c (build_constants_constructor): Likewise.
2318
2319 2000-02-19  Anthony Green  <green@cygnus.com>
2320
2321         * jcf-depend.c (add_entry): Add entries to the end of the list.
2322
2323 Wed Nov 03 02:16:00 PST 1999  Pekka Nikander  <pekka.nikander@hut.fi>
2324
2325         * decl.c (INT_TYPE_SIZE): Define if necessary.
2326         (expand_java_return): Handle the case of a native integer smaller
2327         than a JVM integer.
2328
2329 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2330
2331         * gjavah.c (help): Use GCCBUGURL.
2332         * jv-scan.c (help): Likewise.
2333         * jcf-dump.c (help): Likewise.
2334
2335 Thu Feb 17 14:30:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2336
2337         * jcf-write.c (generate_bytecode_insns): Don't generate empty
2338         `finally' clauses.
2339
2340 Thu Feb 17 13:20:58 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2341
2342         * jcf-parse.c (load_class): Call `fatal' if no file containing
2343         the target class are found.
2344
2345 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
2346
2347         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
2348         lex.c, lex.h, and PARSE_H to...
2349         (parse.o, parse-scan.o): ...here, respectively.
2350
2351         * lex.c: Split out code that may trigger SIGFPE from yylex()
2352         to its own function.
2353         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
2354
2355 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2356
2357         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
2358
2359 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2360
2361         * parse.y (outer_field_access_p): Stop in time when outer contexts
2362         are exhausted.
2363         (resolve_qualified_expression_name): Properly qualify *everything*
2364         after a package.type to be resoled as expression names.
2365         (find_applicable_accessible_methods_list): Save/restore `class' to
2366         isolate it from a possible outer context search.
2367
2368 2000-02-15  Tom Tromey  <tromey@cygnus.com>
2369
2370         * gjavah.c (jni_print_char): New function.
2371         (print_full_cxx_name): Use it.
2372         (decode_signature_piece): Likewise.
2373         (print_cxx_classname): Likewise.
2374
2375 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2376
2377         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
2378         version.o.
2379         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
2380
2381         * gjavah.c: Include version.h.
2382
2383         * jcf-dump.c: Likewise.
2384
2385         * jv-scan.c: Likewise.
2386
2387 Sat Feb 12 04:34:04 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2388
2389         * parse.y (outer_field_access_fix): First parameter now a tree
2390         node. Check for assignement to final. First argument to
2391         build_outer_field_access_fix modified to accomodate prototype.
2392         (build_outer_field_access): Don't check for assignment to final
2393         here.
2394         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
2395         possibly returned by outer_field_access_fix. Changed
2396         outer_field_access_fix's first argument.
2397         (check_final_assignment): $finit$'s context is OK.
2398         (patch_unaryop): Use node instead of its line/column value when
2399         calling outer_field_access_fix.
2400
2401 Fri Feb 11 17:38:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2402
2403         * parse.y (interface_declaration:): No longer tagged
2404         <node>. Re-installed default action.
2405         (class_member_declaration:): Handle inner interfaces.
2406         (interface_member_declaration): Handle inner interfaces and
2407         classes.
2408         (create_interface): Push error if one seen. Suspend parsing
2409         context when processing an inner interface.
2410         (register_fields): Inner class static field limitations not to
2411         apply to inner interfaces.
2412
2413 Thu Feb 10 22:07:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2414
2415         * jcf-parse.c (load_class): Update `java_error_count' when a
2416         class' file can't be found.
2417         (parse.y): Avoid (byte)code generation when errors seen.
2418
2419 Thu Feb 10 20:10:43 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2420
2421         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
2422         decodes a valid node.
2423         (patch_binop): Handle TRUNC_DIV_EXPR.
2424
2425 Thu Feb 10 16:04:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2426
2427         * parse.y (resolve_package): New local `acc'. Try to progressively
2428         build and guess a package and type name.
2429
2430 Thu Feb 10 12:52:09 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2431
2432         * parse.y (find_applicable_accessible_methods_list): Load and
2433         layout the search class if necessary.
2434         (java_complete_tree): Keep to original type of the folded initial
2435         value.
2436
2437 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2438
2439         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
2440         Generate error message if circularity is detected. New static
2441         local `list'.
2442         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
2443         * jcf-write.c (generate_bytecode_insns): Very simply handle
2444         SAVE_EXPR.
2445         * parse.y (java_check_circular_reference): Use
2446         `cyclic_inheritance_report' during report, if necessary.
2447         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
2448         walking NEW_ARRAY_INIT twice.
2449
2450 2000-02-09  Tom Tromey  <tromey@cygnus.com>
2451
2452         * parse.y (check_class_interface_creation): Allow inner classes to
2453         be `private' or `protected', check modifiers' consistency. Prevent
2454         block local classes from bearing any modifiers.
2455
2456 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2457
2458         * except.c (check_start_handlers): Re-add prototype lost in last
2459         patch.
2460         (maybe_start_try): Remove excess argument to `check_start_handlers'.
2461
2462 2000-02-09  Andrew Haley  <aph@cygnus.com>
2463
2464         * decl.c (clear_binding_level): Remove excess initializer.
2465         (maybe_poplevels): Remove unused variable.
2466         (force_poplevels): Ditto.
2467         (struct binding_level): Add comment.
2468
2469 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2470
2471         * jcf-write.c (generate_classfile): Don't consider
2472         pre-initialization with reference value (use <clinit> instead.)
2473         * parse.y (java_fix_constructors): No generated constructor for
2474         interfaces.
2475         (build_outer_field_access): Removed debug message.
2476         (outer_field_expanded_access_p): Adapted to bytecode generation.
2477         (build_outer_field_access_method): Use fix_method_argument_names.
2478         (build_outer_method_access_method): Fixed indentation. Added
2479         comment. Handle access method generation for static and also void
2480         methods.
2481         (build_access_to_thisn): Inserted debug message.
2482         (maybe_build_thisn_access_method): Use fix_method_argument_names.
2483         (resolve_qualified_expression_name): Fixed comment.
2484         (not_accessible_p): Adapted to bytecode generation. Added comment.
2485         (patch_method_invocation): Added comment.
2486         (maybe_use_access_method): Fixed leading comment. Handle static
2487         methods.
2488         (java_complete_lhs): Don't shortcut handling of initialized upon
2489         declaration String type static fields when generating bytecode.
2490         (patch_unaryop): Handle outer field access when generating
2491         bytecode.
2492
2493 Thu Feb  3 20:23:19 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2494
2495         * java-tree.h (FIELD_THISN): New macro.
2496         * jcf-write.c (append_synthetic_attribute): New function.
2497         (generate_classfile): Set "Synthetic" attribute on this$<n>,
2498         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
2499         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
2500         this$<n> fields.
2501         (build_outer_field_access): Turned on access functions usage and
2502         generation when compiling to bytecode.
2503         (maybe_use_access_method): Likewise.
2504
2505 2000-01-25  Andrew Haley  <aph@cygnus.com>
2506
2507         * java-except.h (struct eh_range): Add `expanded' field.
2508         (maybe_start_try): Add end_pc arg.
2509         (maybe_end_try): Ditto.
2510         * java-tree.h (force_poplevels): new function.
2511         * expr.c (expand_byte_code): Don't call maybe_start_try or
2512         maybe_end_try.
2513         * except.c (add_handler): Reset expanded.
2514         (expand_start_java_handler): Set expanded.
2515         (check_start_handlers): Don't expand a start handler that's
2516         already been expanded.
2517         (maybe_start_try): Add end_pc arg.  Only expand a handler which
2518         ends after end_pc.
2519         (expand_end_java_handler): call force_poplevels.
2520         (force_poplevels): new function.
2521         * decl.c (binding_level): Add start_pc of binding level.
2522         (maybe_pushlevels): Call maybe_start_try when pushing binding
2523         levels.
2524         (maybe_poplevels): Call maybe_end_try when popping binding levels.
2525         (LARGEST_PC): Define.
2526         (clear_binding_level): Use LARGEST_PC.
2527
2528         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
2529         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
2530         (binding_depth, is_class_level, current_pc): new variables.
2531         (struct binding_level): ditto.
2532         (indent): new function.
2533         (push_jvm_slot): add debugging info.
2534         (maybe_pushlevels): ditto.
2535         (maybe_poplevels): ditto.
2536         (pushlevel): ditto.
2537         (poplevel): ditto.
2538         (start_java_method): ditto.
2539         (give_name_to_locals): comment only.
2540         * except.c (binding_depth, is_class_level, current_pc):
2541         new variables.
2542         (expand_start_java_handler): add debugging info.
2543         (expand_end_java_handler): ditto.
2544
2545 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2546
2547         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
2548         (print_name_for_stub_or_jni, process_file): Constify a char*.
2549
2550 2000-02-03  Tom Tromey  <tromey@cygnus.com>
2551
2552         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
2553
2554 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
2555
2556         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
2557         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
2558         defined to be 1.
2559
2560 Wed Feb  2 18:43:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2561
2562         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
2563         * java-tree.h (TYPE_II_STMT_LIST): New macro.
2564         (struct lang_type): New field `ii_block'.
2565         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
2566         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
2567         * parse.h (struct parser_ctxt): New field `instance_initializers'.
2568         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
2569         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
2570         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
2571         macros.
2572         * parse.y (add_instance_initializer): New function.
2573         (in_instance_initializer): New static global.
2574         (class_body_declaration:): Link instance initializer block.
2575         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
2576         (array_creation_expression:): Remove unused local.
2577         (java_parser_context_push_initialized_field): Fixed leading
2578         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
2579         CPC_INSTANCE_INITIALIZER_LIST.
2580         (java_parser_context_pop_initialized_field): Likewise.
2581         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
2582         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
2583         CPC_INITIALIZER_STMT.
2584         (fix_constructors): New local `class_type'. Use it. Call
2585         add_instance_initializer.
2586         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
2587         (patch_return): Forbid return in instance initializers.
2588         (patch_throw_statement): Enforce exception handling in the context
2589         of instance initializers.
2590
2591 2000-02-03  Tom Tromey  <tromey@cygnus.com>
2592
2593         * Make-lang.in (java.mostlyclean): Remove executables in
2594         `mostlyclean'.
2595
2596 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
2597
2598         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
2599         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
2600         (java_float_finite): Convert to use union Word from javaop.h.
2601         (java_double_finite): Convert to use union DWord from javaop.h.
2602
2603 2000-02-02  Tom Tromey  <tromey@cygnus.com>
2604
2605         * gjavah.c (options): Added `jni' entry.
2606         (help): Document -jni.
2607         (flag_jni): New global.
2608         (process_file): Handle JNI output.  Don't print text from
2609         -prepend, -add, etc, when generating stubs.  Only remove `.class'
2610         suffix if it actually exists.
2611         (main): Create a `.c' file when run with `--jni --stubs'.  Create
2612         correct output file name with `--jni'.
2613         (print_include): Mangle header name differently in JNI case.
2614         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
2615         method list.
2616         (print_method_info): Handle JNI case.  Put signature info into
2617         method name.  Handle case when STREAM is NULL.
2618         (print_name_for_stub_or_jni): New function.
2619         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
2620         (print_cxx_classname): Handle JNI.
2621         (print_full_cxx_name): Likewise.
2622         (decode_signature_piece): Likewise.
2623         (overloaded_jni_method_exists_p): New function.
2624         (struct method_name): Added `signature' and `sig_length' fields.
2625         (HANDLE_END_FIELD): Do nothing in JNI mode.
2626
2627 2000-02-02  Tom Tromey  <tromey@cygnus.com>
2628
2629         * jv-scan.c: Include version.c, <getopt.h>.
2630         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
2631         (options): New array.
2632         (usage): New function.
2633         (version): New function.
2634         (main): Use getopt_long to parse command line.
2635         * jcf-dump.c: Include version.c, <getopt.h>.
2636         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
2637         OPT_JAVAP): New macros.
2638         (options): New array.
2639         (usage): Return `void'.  Changed message.
2640         (help): New function.
2641         (version): New function.
2642         (main): Use getopt_long_only to parse command line.
2643         * gjavah.c: Include <getopt.h>.
2644         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
2645         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
2646         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
2647         (options): New array.
2648         (java_no_argument): Removed.
2649         (help): Updated with missing options.
2650         (main): Use getopt_long_only to parse command line.
2651         (usage): Changed message.
2652
2653 Tue Feb  1 22:23:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2654
2655         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
2656         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
2657         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
2658         * parse.y (array_creation_expression:): Handle anonymous arrays.
2659         (build_array_from_name): Don't set `ret_name' if null.
2660         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
2661         (qualify_ambiguous_name): Likewise.
2662         (java_complete_expand_class): Likewise.
2663
2664 Tue Feb  1 14:59:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2665
2666         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
2667         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
2668         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
2669         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
2670         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
2671         AIPL_FUNCTION_COMPLETED_INVOCATION.
2672         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
2673         AIPL_FUNCTION_INVOCATION_READY.
2674         (AIPL_FUNCTION_DECLARATION): New enum entry.
2675         * parse.y (reorder_static_initialized): New function.
2676         (java_parser_context_pop_initialized_field): Use it.
2677         (add_inner_class_fields): Use
2678         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
2679         augmented. Install marker after last alias initializer, if any.
2680         (generate_finit): Fixed typo. Don't try to retain only the used
2681         fields.
2682         (method_header): Compute and set DECL_FUNCTION_NAP.
2683         (method_declarator): Fixed comment. Insert alias initializer in
2684         parameter list.
2685         (build_alias_initializer_parameter_list): Fixed leading
2686         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
2687         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
2688         (java_complete_expand_class): Code to retain only used aliases
2689         removed.
2690         (java_complete_expand_methods): New local `first_decl'. Generate
2691         $finit$ first, then expand the constructors, regular methods and
2692         <clinit>.
2693         (java_complete_expand_method): Don't report error on missing
2694         return statement if previously detected bogus.
2695         (fix_constructors): Don't patch constructor parameters list.
2696         (patch_method_invocation): Use new AIPL enum values. Reverse
2697         alias initializer list for anonymous classes.
2698
2699 2000-01-30  Anthony Green  <green@redhat.com>
2700
2701         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
2702         determine how many stack slots to pop.
2703
2704 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2705
2706         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
2707         error handling/recovery.
2708         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
2709
2710 Fri Jan 28 20:10:57 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2711
2712         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
2713         FIELD_LOCAL_ALIAS_USED): New macros.
2714         (DECL_FUNCTION_NAP): New macro.
2715         (struct lang_decl): New field `nap'.
2716         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
2717         (struct lang_type): New fields `finit_stmt_list' and
2718         `clinit_stmt_list'.
2719         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
2720         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
2721         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2722         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
2723         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
2724         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
2725         (BUILD_THROW): Macro line separator re-indented.
2726         * parse.y (end_class_declaration): New function.
2727         (maybe_generate_pre_expand_clinit): New name for
2728         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
2729         pre-expand static fields.
2730         (maybe_generate_clinit): Function deleted.
2731         (check_for_static_method_reference): Prototype's parameter list
2732         indented.
2733         (generate_finit): New name for maybe_generate_finit. Changed
2734         leading comment. Function rewritten to use
2735         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
2736         (build_alias_initializer_parameter_list): New function.
2737         (java_parser_context_pop_initialized_field): Likewise.
2738         (add_inner_class_fields): Likewise.
2739         (type_declaration:): Call end_class_declaration.
2740         (class_member_declaration:): Likewise.
2741         (formal_parameter_list:): Fixed typos.
2742         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
2743         element. Improved error handling.
2744         (block_statement:): Call end_class_declaration.
2745         (anonymous_class_creation:): Likewise.
2746         (create_anonymous_class): Fixed comments.
2747         (create_class): Call add_inner_class_fields.
2748         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
2749         (method_header): Use MARK_FINAL_PARMS.
2750         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
2751         (method_declarator): Propagate final argument flag.
2752         (craft_constructor): New local `artificial'. Call
2753         build_alias_initializer_parameter_list. Use
2754         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
2755         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
2756         necessary.
2757         (complete_expand_class): Get rid of unused outer context local
2758         alias fields.
2759         (java_complete_expand_methods): Fixed leading
2760         comment. Generate/pre-expand <clinit> first. Changed method
2761         expansion order to regular, $finit$, constructors, <clinit>.
2762         (java_complete_expand_method): Set current_function_decl.
2763         (fix_constructors): Fix constructor parameter list to account for
2764         outer context local alias initializers.
2765         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
2766         (resolve_expression_name): Lookup outer context local aliases. New
2767         local `access', use it.
2768         (patch_method_invocation): Patch inner class ctor invocation with
2769         outer context local aliases initialization values. $finit$
2770         invocation patching now includes things generated with
2771         build_alias_initializer_parameter_list.
2772         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
2773         (build_super_invocation): Likewise.
2774         (patch_assignment): Changed comment.
2775
2776 2000-01-27  Andrew Haley  <aph@cygnus.com>
2777
2778         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
2779         (emit_if): Ditto.
2780         (emit_jsr): Ditto.
2781
2782 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2783
2784         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
2785         concatenation.
2786         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
2787
2788         * parse.y (register_fields): Don't pass a format specifier to
2789         OBSOLETE_MODIFIER_WARNING.
2790         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
2791         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
2792         specifier.
2793         (check_modifiers): Change function into a macro.
2794         (check_class_interface_creation): Pass a literal format string.
2795
2796 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2797
2798         * buffer.h: PROTO -> PARAMS.
2799         * check-init.c: Likewise.
2800         * class.c: Likewise.
2801         * constants.c: Likewise.
2802         * convert.h: Likewise.
2803         * decl.c: Likewise.
2804         * except.c: Likewise.
2805         * expr.c: Likewise.
2806         * gjavah.c: Likewise.
2807         * java-except.h: Likewise.
2808         * java-tree.h: Likewise.
2809         * jcf-depend.c: Likewise.
2810         * jcf-dump.c: Likewise.
2811         * jcf-parse.c: Likewise.
2812         * jcf-path.c: Likewise.
2813         * jcf-reader.c: Likewise.
2814         * jcf-write.c: Likewise.
2815         * jcf.h: Likewise.
2816         * jv-scan.c: Likewise.
2817         * jvgenmain.c: Likewise.
2818         * jvspec.c: Likewise.
2819         * lang.c: Likewise.
2820         * lex.c: Likewise.
2821         * lex.h: Likewise.
2822         * parse-scan.y: Likewise.
2823         * parse.h: Likewise.
2824         * parse.y: Likewise.
2825         * typeck.c: Likewise.
2826         * verify.c: Likewise.
2827         * xref.c: Likewise.
2828         * xref.h: Likewise.
2829         * zextract.c: Likewise.
2830         * zipfile.h: Likewise.
2831
2832 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2833
2834         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
2835         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
2836         * constants.c (build_constant_data_ref): Check for cached
2837         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
2838         in TYPE_CPOOL_DATE_REF.
2839         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
2840         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
2841         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
2842         (LOCAL_FINAL): New macro.
2843         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
2844         constant pool -- don't try to reuse.
2845         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
2846         TYPE_LANG_SPECIFIC.
2847         (find_in_current_zip): Use TYPE_JCF.
2848         * parse.h (java_check_final): Prototype removed.
2849         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
2850         (maybe_create_class_interface_decl,
2851         check_class_interface_creation): Likewise.
2852         (java_expand_finals): Function removed.
2853         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
2854         (block_statement:): Fixed comment.
2855         (anonymous_class_creation:): Likewise.
2856         (check_class_interface_creation): Reversed Jan 12, 2000 extra
2857         argument patch.
2858         (check_class_interface_creation): Loosened error report on (inner)
2859         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
2860         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
2861         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
2862         argument patch.
2863         (create_interface): Likewise.
2864         (anonymous_class_counter): New static global.
2865         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
2866         patch. Fixed comments.
2867         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
2868         anonymous_class_counter when declaring a toplevel class.
2869         (craft_constructor): Fixed constructor name when handling
2870         anonymous classes. Anonymous class constructors to feature hidden
2871         this$<n> parameter.
2872         (java_fix_constructors): Added comment.
2873         (java_check_final): Function removed.
2874         (java_complete_expand_methods): Fixed comment. Don't generate
2875         class data, save its outgoing constant pool instead.
2876         (verify_constructor_super): Skip anonymous class constructor
2877         hidden this$<n> parameter.
2878         (java_expand_classes): New local `saved_ctxp'. Removed call to
2879         java_expand_finals and java_check_final. Expand anonymous class
2880         constructors. Generate class data.
2881         (build_super_invocation): Skip anonymous class hidden this$<n>
2882         parameter.
2883         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
2884         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
2885         (set_java_signature): Likewise.
2886
2887 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
2888
2889         * gjavah.c: Delete ACC_VISIBILITY define.
2890         * jcf.h: Add ACC_VISIBILITY define.
2891         * parse.y: final: rule tagged <value>.
2892         (java_check_regular_methods): Use ACC_VISIBILITY define for
2893         default package access check.
2894         (local_variable_declaration_statement): Use final: rule.
2895
2896 Mon Jan 17 11:58:17 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
2897
2898         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
2899         (final:): New rule.
2900
2901 2000-01-17  Tom Tromey  <tromey@cygnus.com>
2902
2903         * gjavah.c (print_field_info): Allow non-static final fields.
2904
2905 Fri Jan 14 18:03:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2906
2907         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
2908         * parse.y (patch_anonymous_class): New function.
2909         (create_anonymous_class): Register incomplete type when the
2910         class/interface to extends/implement isn't known yet.
2911         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
2912         (verify_constructor_super): Tuned error message.
2913
2914 Fri Jan 14 00:14:24 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2915
2916         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
2917         (ANONYMOUS_CLASS_P): New macro.
2918         (TYPE_SIGNATURE, TYPE_JCF): New macros.
2919         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
2920         * parse.y (create_class): Added leading argument.
2921         (maybe_create_class_interface_decl,
2922         check_class_interface_creation): Likewise.
2923         (craft_constructor): New function.
2924         (verify_constructor_super): Added argument in prototype.
2925         (class_declaration:): Inserted leading argument.
2926         (for_begin:): Use FOR_LOOP_P.
2927         (anonymous_class_creation): Create WFL of the anonymous class to
2928         instantiate. Call build_new_invocation. Added comments.
2929         (check_class_interface_creation): Handle parameter `anonymous' in
2930         verbose mode class creation announce.
2931         (link_nested_class_to_enclosing): Exclude anonymous classes.
2932         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
2933         anonymous class, even though they appear to have an enclosing
2934         context.
2935         (create_interface): Pass extra argument to
2936         check_class_interface_creation.
2937         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
2938         (create_class): Call check_class_interface_creation and
2939         maybe_create_class_interface_decl with extra new argument. Don't
2940         add private this$<n> to anonymous classes.
2941         (method_declarator): Insert hidden this$<n> to anonymous class
2942         constructors.
2943         (java_fix_constructors): Deleted code creating default
2944         constructor. Call craft_constructor instead.
2945         (java_check_regular_methods): Set `saw_constructor' to 1 for
2946         anonymous classes.
2947         (fix_constructors): Pass extra argument to verify_constructor_super.
2948         (verify_constructor_super): New local `sdecl', use it. Search for
2949         matching constructor (possibly featuring arguments) in super
2950         class.
2951         (lookup_method_invoke): Craft constructor according to arguments
2952         list when dealing with anonymous class constructors.
2953         (build_super_invocation): Pass arguments to anonymous class super
2954         constructors.
2955         (search_loop): Use FOR_LOOP_P.
2956         (labeled_block_contains_loop_p): Likewise.
2957
2958 Wed Jan 12 00:38:47 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2959
2960         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
2961         (enclosing_context_p): New function.
2962         (get_access_flags_from_decl): Handle CLASS_STATIC.
2963         (maybe_layout_super_class): Extra first argument passed to
2964         do_resolve_class.
2965         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
2966         ID_INIT_P.
2967         * decl.c (access0_identifier_node): New global.
2968         (init_decl_processing): access0_identifier_node initialized.
2969         (pushdecl): Set DECL_CONTEXT only on non type decls.
2970         * expr.c (lookup_field): Lookup inner class fields in enclosing
2971         contexts.
2972         (expand_invoke): Use ID_INIT_P.
2973         (expand_java_field_op): Use DECL_CLINIT_P.
2974         * java-tree.def (CLASS_LITERAL): New tree code.
2975         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
2976         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
2977         (struct lang_decl): New field `inner_access'.
2978         (enclosing_context_p): Prototyped.
2979         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
2980         ID_CLINIT_P): New macros.
2981         (CLASS_STATIC): New macro.
2982         (CLASS_ACCESS0_GENERATED_P): New macro.
2983         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
2984         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2985         INNER_CLASS_P): New macros.
2986         (DECL_INNER_CLASS_LIST): New macro.
2987         * jcf-parse.c (yyparse): Avoid the use of ANSI string
2988         concatenation.
2989         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
2990         the shift value to int. Fixed typo in comment.
2991         * lex.c (inst_id, wpv_id): Initialize.
2992         * mangle.c (unicode_mangling_length): Take `$' into account.
2993         * parse.h (DRECOVER, RECOVER): Terminate properly.
2994         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
2995         (typedef struct _jdep): New field `enclosing'.
2996         (JDEP_ENCLOSING): New macro.
2997         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
2998         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
2999         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
3000         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
3001         GET_ENCLOSING_CPC_CONTEXT): New macros.
3002         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
3003         (do_resolve_class): Added extra argument in prototype.
3004         * parse.y (resolve_class): Added extra argument in prototype.
3005         (maybe_create_class_interface_decl): Likewise.
3006         (maybe_use_access_method, build_wfl_wrap): New functions.
3007         (java_complete_expand_classes, java_complete_expand_class):
3008         Likewise.
3009         (java_parser_context_push_initialized_field,
3010         java_parser_context_suspend, java_parser_context_resume):
3011         Likewise.
3012         (maybe_make_nested_class_name, make_nested_class_name,
3013         set_nested_class_simple_name_value,
3014         link_nested_class_to_enclosing, find_as_inner_class,
3015         find_as_inner_class_do, check_inner_class_redefinition,
3016         build_thisn_assign, build_current_thisn, build_access_to_thisn,
3017         maybe_build_thisn_access_method, build_outer_field_access,
3018         build_outer_field_access_methods, build_outer_field_access_expr,
3019         build_outer_method_access_method, build_new_access_id,
3020         build_outer_field_access_method, outer_field_access_p,
3021         outer_field_expanded_access_p, outer_field_access_fix,
3022         build_incomplete_class_ref, patch_incomplete_class_ref,
3023         create_anonymous_class): Likewise.
3024         (inst_id, wpv_id): New static global variables.
3025         (synchronized:): New rule, tagged <node>.
3026         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
3027         rules.
3028         (anonymous_class_creation:): New rule, tagged <node>.
3029         (NEW_TK): Tagged <node>.
3030         (type_literals, array_type_literal): New rules, tagged <node>.
3031         (class_declaration:): Removed action when reducing by class_body:
3032         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
3033         using GET_CPC in sub-rules.
3034         (class_member_declaration): Handle inner classes.
3035         (method_declaration): When reducing method_header:, reset
3036         current_function_decl when appropriate.
3037         (method_declarator:): Set the number of formal parameter to 0 for
3038         method declared without arguments.
3039         (constructor_declarator:): Likewise.
3040         (static_initializer:): List of elements kept in a list.
3041         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
3042         use of the keyword `static' for type declarations.
3043         (block_statement:): Handle inner class declarations.
3044         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
3045         type qualified `this'.
3046         (class_instance_creation_expression): Use anonymous_class_creation:
3047         to handle inner class instances creation. Handle qualified `new'.
3048         (something_dot_new): Added appropriate actions.
3049         (create_new_parser_context): New function.
3050         (java_push_parser_context, java_parser_context_save_global,
3051         java_parser_context_suspend): Use create_new_parser_context.
3052         (check_modifiers): Changed leading comment.
3053         (check_class_interface_creation): Handle interclasses.
3054         (add_superinterfaces): Fixed comment.
3055         (create_interface): Build qualified name from the raw_name instead
3056         of its matching WFL. Push the initialized fields list. raw_name added
3057         as an extra argument to maybe_create_class_interface_decl.
3058         (create_class): Build qualified name from the raw_name instead of
3059         its matching WFL. Removed assignment to current_parsed_class_un.
3060         Call PUSH_ERROR before returning an error. Suspend the current
3061         parser context when processing an inner class. Push the
3062         initialized fields list. raw_name added as an extra argument to
3063         maybe_create_class_interface_decl. Add the private this$<n>
3064         field.
3065         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
3066         (register_fields): Get the class type from GET_CPC and handle
3067         previous errors.  Added code to handle the creation of static
3068         fields in inner classes. Initialized fields initialization
3069         statements kept in a list of lists.
3070         (maybe_generate_finit): Initialized fields initialization
3071         statements kept in a list of lists. Use GET_CPC.
3072         (maybe_generate_clinit): Likewise.
3073         (method_header): Use GET_CPC and GET_CPC_UN.
3074         (parser_qualified_classname): Handle inner classes.
3075         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
3076         (java_fix_constructors): Hide pointer to enclosing context
3077         instance in constructor list when dealing with inner classes.
3078         (jdep_resolve_class): Call resolve_class with extra first argument
3079         JDEP_ENCLOSING.
3080         (resolve_class): Add enclosing context as a first extra argument
3081         to do_resolve_class.
3082         (do_resolve_class): Call find_as_inner_class. Handle WFLs
3083         properly.
3084         (resolve_no_layout): Extra argument added to resolve_class
3085         invocation.
3086         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
3087         (java_get_real_method_name): Use GET_CPC_UN.
3088         (check_abstract_method_definitions): Use DECL_CLINIT_P.
3089         (java_check_abstract_methods): Handle static method declared in
3090         inner classes by an error.
3091         (java_check_regular_methods): Use DECL_CLINIT_P.
3092         (source_start_java_method): Also set DECL_MAX_LOCALS.
3093         (create_artificial_method): Call java_parser_context_save_global
3094         and java_parser_context_restore_global instead of saving/restoring
3095         the context by hand.
3096         (expand_start_java_method): Improved verbose mode message.
3097         (java_complete_expand_methods): Fixed leading comment. Use
3098         DECL_CLINIT_P.
3099         (fix_constructors): Added assignment to this$<n> if necessary.
3100         (java_expand_classes): Call java_complete_expand_classes instead
3101         of java_complete_expand_methods.
3102         (make_qualified_primary): Simplified.
3103         (merge_qualified_name): Optimized for missing left or right parts.
3104         (resolve_expression_name): Handle access to outer class fields from
3105         interclasses.
3106         (resolve_qualified_expression_name): New macro
3107         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
3108         classes. Report error on non appropriate qualification of
3109         `new'. Handle qualified `this'.
3110         (not_accessible_p): Allow access to outer class private fields from
3111         inner classes.
3112         (patch_method_invocation): Handle method invocations through
3113         access methods and inner class constructor invocations.
3114         (find_applicable_accessible_methods_list): Search enclosing
3115         contexts of an inner class.
3116         (search_applicable_methods_list): Fixed typo.
3117         (argument_types_convertible): Handle inner class constructors'
3118         hidden outer context reference argument.
3119         (qualify_ambiguous_name): Handle qualified `this'.
3120         (java_complete_lhs): Handle use of field accessed through
3121         artificial access methods in various cases of assignments. Handle
3122         CLASS_LITERAL node.
3123         (check_final_assignment): Use DECL_CLINIT_P.
3124         (valid_ref_assignconv_cast_p): Handle the destination being an
3125         enclosing context of the source.
3126         (patch_unaryop): Handle use of field accessed through artificial
3127         access methods.
3128         (patch_return): Use DECL_CLINIT_P.
3129         (patch_throw_statement): Use DECL_CLINIT_P.
3130         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
3131         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
3132         ID_INIT_P.
3133
3134 2000-01-16  Anthony Green  <green@cygnus.com>
3135
3136         * parse.y (build_string_concatenation): Only use
3137         StringBuffer(String) shortcut if String arg is constant.
3138
3139 Wed Jan 12 20:20:11 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3140
3141         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
3142         the shift value to int. Fixed typo in comment.
3143
3144 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
3145
3146         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
3147         * jcf-write.c: Likewise.
3148         * parse.y: Likewise.
3149         * parse.c: Regenerate.
3150
3151 2000-01-09  Anthony Green  <green@cygnus.com>
3152
3153         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
3154         bytecodes in the correct order.
3155
3156 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3157
3158         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
3159
3160 Thu Jan  6 16:31:28 2000  Anthony Green  <green@cygnus.com>
3161
3162         * expr.c (java_lang_expand_expr): Switch to permanent obstack
3163         before building constant array decl.
3164
3165 Thu Jan  6 00:54:10 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3166
3167         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
3168         method invocation and typo in conditional expression.
3169         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
3170         the appropriate NOTE_POP.
3171         * parse.y (patch_binop): Shift value mask to feature the right
3172         type.
3173
3174 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3175
3176         * class.c (assume_compiled, assume_compiled_node): Add static
3177         prototype.
3178         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
3179
3180         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
3181
3182         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
3183
3184         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
3185         to `__modifier' to avoid stringifying it.
3186
3187         * parse.y (verify_constructor_circularity): Don't call a variadic
3188         function with a non-literal format string.
3189         (java_check_abstract_methods): Move unreachable code inside
3190         `continue' statement.
3191         (lookup_method_invoke): Call xstrdup, not strdup.
3192
3193         * expr.c (expand_java_field_op): Avoid the use of ANSI string
3194         concatenation.
3195
3196         * jcf-parse.c (yyparse): Likewise.
3197
3198         * jv-scan.c (main): Likewise.
3199
3200 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3201
3202         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
3203         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
3204         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
3205         concatenation.
3206
3207         * parse.y (synchronized, variable_redefinition_error,
3208         check_class_interface_creation, create_interface, create_class,
3209         method_header, finish_method_declaration,
3210         check_modifiers_consistency, method_declarator,
3211         complete_class_report_errors, check_abstract_method_definitions,
3212         java_check_regular_methods, check_throws_clauses,
3213         java_check_abstract_methods, read_import_dir,
3214         check_pkg_class_access, declare_local_variables, fix_constructors,
3215         cut_identifier_in_qualified, resolve_expression_name,
3216         resolve_qualified_expression_name, patch_method_invocation,
3217         java_complete_lhs, patch_assignment, try_builtin_assignconv,
3218         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
3219         patch_exit_expr, patch_exit_expr, patch_switch_statement,
3220         patch_try_statement, patch_synchronized_statement,
3221         patch_throw_statement, check_thrown_exceptions,
3222         patch_conditional_expr): Likewise.
3223
3224 Fri Dec 24 00:25:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3225
3226         * Makefile.in (LIBDEPS): Added gcc's errors.o
3227         (../jcf-dump$(exeext):): Link with gcc's errors.o
3228         (../gcjh$(exeext):): Likewise.
3229         * expr.c (expand_java_NEW): Layout the entire target type instead of
3230         laying out its methods only.
3231         (lookup_field): Layout the class after having loaded it.
3232         * java-tree.h (java_debug_context): Declared.
3233         * jcf-io.c (toplev.h): Included.
3234         (find_class): Removed assignment to jcf's outofsynch
3235         field. Force source file to be read if newer than its matching
3236         class file. Tweaked debug messages.
3237         * jcf-parse.c (jcf_out_of_synch): Deleted.
3238         (read_class): Call to jcf_out_of_synch removed.
3239         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
3240         (jcf_out_of_synch): Prototype deleted.
3241         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
3242         `deprecated' and `class_err': integer turned into bit fields.
3243         New bit fields `saved_data_ctx' and `saved_data'. Fixed comments.
3244         * parse.y (package_list): New global.
3245         (package_declaration:): Record newly parsed package name.
3246         (extra_ctxp_pushed_p): Static global deleted.
3247         (java_parser_context_save_global): Create buffer context for the
3248         purpose of saving globals, if necessary.
3249         (java_parser_context_restore_global): Pop context pushed for the
3250         purpose of saving globals, if necessary.
3251         (java_debug_context_do): New prototype and function.
3252         (java_debug_context): Likewise.
3253         (do_resolve_class): Use already parsed package names to qualify
3254         and lookup class candidate.
3255         (java_pre_expand_clinit): Removed unnecessary local variable.
3256
3257 1999-12-17  Tom Tromey  <tromey@cygnus.com>
3258
3259         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
3260         fixes PR gcj/119.
3261         (process_file): Use `\n\' at end of each line in string.
3262
3263 Thu Dec 16 00:09:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3264
3265         * expr.c (expand_invoke): Layout the loaded class before
3266         attempting to use it.
3267         (expand_java_field_op): Allow final field assignments to take
3268         place in $finit$.
3269         * typeck.c (convert): Return error_mark_node if expr is null.
3270
3271 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3272
3273         * class.c (class_depth): Return -1 if the class doesn't load
3274         properly.
3275         * expr.c (can_widen_reference_to): Check for errors during depth
3276         computation and return 0 accordingly.
3277         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
3278         create default constructors and add an other error check.
3279         * parse.h (java_fix_constructors): Prototyped.
3280         * parse.y (java_pre_expand_clinit): Likewise.
3281         (build_super_invocation): Re-prototyped to feature one argument.
3282         (java_check_circular_reference): Directly use `current'.
3283         (java_fix_constructors): New function.
3284         (java_check_regular_methods): Don't create default constructors
3285         here, but abort if none were found.
3286         (java_complete_expand_methods): Pre-process <clinit> calling
3287         java_pre_expand_clinit.
3288         (java_pre_expand_clinit): New function.
3289         (fix_constructors): build_super_invocation invoked with the
3290         current method declaration as an argument.
3291         (build_super_invocation): Use the context of the processed method
3292         decl argument instead of current_class.
3293         * typeck.c (lookup_java_method): Take WFLs in method names into
3294         account.
3295
3296 Tue Dec 14 14:20:16 1999  Per Bothner  <per@bothner.com>
3297
3298         * class.c (make_class_data): flag_keep_inline_functions to keep
3299         private methods in the method array.
3300
3301 1999-12-15  Anthony Green  <green@cygnus.com>
3302
3303         * check-init.c (check_init): Take into account both types of
3304         `throw's when checking for uninitialized variables.
3305
3306 Fri Dec 10 21:53:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3307
3308         * parse.y (java_complete_lhs): Force convertion of array
3309         dimensions to int_type_node, that's what runtime's ABI expects.
3310
3311 Fri Dec 10 16:13:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3312
3313         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
3314         operand of a WFL, until the Java front-end gets fixed with regard
3315         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
3316
3317 1999-12-10  Andrew Haley  <aph@cygnus.com>
3318
3319         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
3320         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
3321         expr.c (build_java_athrow): Add support for sjlj-exceptions.
3322         java-tree.h: Ditto.
3323         jcf-write.c: Ditto.
3324
3325 Wed Dec  8 15:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3326
3327         * expr.c (java_lang_expand_expr): Switch to permanent obstack
3328         before calling expand_eh_region_start and expand_start_all_catch.
3329         * except.c (expand_start_java_handler): Switch to permanent
3330         obstack before calling expand_eh_region_start.
3331         (expand_end_java_handler): Switch to permanent obstack before
3332         calling expand_start_all_catch.
3333
3334 1999-12-5  Anthony Green  <green@cygnus.com>
3335
3336         * decl.c (init_decl_processing): Mark throw_node as a noreturn
3337         function with side effects.
3338         (init_decl_processing): Mark all memory allocating DECLs with
3339         DECL_IS_MALLOC.
3340
3341 Wed Dec  1 04:25:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3342
3343         * except.c (expand_end_java_handler): Call
3344         expand_resume_after_catch and end_catch_handler.
3345
3346 Tue Nov 30 12:36:15 1999  Anthony Green  <green@cygnus.com>
3347
3348         * verify.c (verify_jvm_instructions): Create new return label
3349         chain if non existant (don't rely on the verified state of the jsr
3350         target.)
3351
3352 Tue Nov 30 12:28:34 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3353
3354         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
3355         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
3356
3357         * parse.y (patch_assignment): Removed bogus final class test on
3358         lhs when checking on whether to emit an ArrayStoreException runtime
3359         check.
3360         * expr.c (expand_java_arraystore): Likewise.
3361
3362 1999-11-28 Anthony Green <green@cygnus.com>
3363
3364         * decl.c (find_local_variable): Reuse single slot decls when
3365           appropriate.
3366
3367 Wed Nov 24 17:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3368
3369         * jcf-parse.c (saw_java_source): Global variable removed.
3370         (read_class): Don't use `saw_java_source'. Added extra braces.
3371         (yyparse): Code setting `saw_java_source' removed.
3372
3373 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
3374
3375         * except.c (emit_handlers): Zero catch_clauses after emitting them.
3376
3377 Tue Nov 23 17:29:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3378
3379         * verify.c (merge_type_state): Non verified subroutines being
3380         considered more than once to trigger passive type merge.
3381
3382 Tue Nov 23 10:55:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3383
3384         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
3385         in case of error. Error message tuned.
3386
3387 1999-11-21  Anthony Green  <green@cygnus.com>
3388
3389         * constants.c (find_methodref_index): Unwrap method names before
3390         inserting them in the constant pool.
3391
3392         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
3393
3394         * class.c (assume_compiled_node): New typedef.
3395         (assume_compiled_tree): New static data.
3396         (find_assume_compiled_node): New function.
3397         (add_assume_compiled): New function.
3398         (assume_compiled): New function.
3399         * class.c (make_class_data): Use assume_compiled.
3400         (is_compiled_class): Use assume_compiled.
3401
3402         * java-tree.h (add_assume_compiled): Declare.
3403
3404         * lang.c (lang_decode_option): Parse new options.
3405
3406 Wed Nov 17 21:09:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3407
3408         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
3409         int_type_node: that's what `_Jv_AllocObject' expects.
3410
3411 Thu Nov 11 01:57:14 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3412
3413         * parse.y (lookup_method_invoke): Use lang_printable_name to
3414         reliably build the type name during error report. Fixes PR gcj/97.
3415
3416 1999-11-09  Tom Tromey  <tromey@cygnus.com>
3417
3418         * jcf-path.c: Include <sys/stat.h>.
3419         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
3420         (DIR_UP): New macro.
3421
3422 Tue Nov  9 12:12:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3423
3424         * parse.y (source_end_java_method): Resume permanent allocation,
3425         reversing Apr 27 1998 patch.
3426         (patch_string_cst): Pop obstacks after having pushed the permanent
3427         ones.
3428
3429 1999-11-05  Tom Tromey  <tromey@cygnus.com>
3430
3431         * class.c (finish_class): Emit inlined methods if any native
3432         methods exist in the class.  Fixes PR gcj/85.
3433
3434 Thu Nov  4 16:27:01 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3435
3436         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
3437         (qualify_ambiguous_name): Likewise.
3438
3439 Wed Nov  3 15:20:02 MST 1999  Godmar Back <gback@cs.utah.edu>
3440
3441         * typeck.c: (lookup_java_method):  search all inherited
3442         interfaces when looking up interface method.
3443
3444 Mon Nov  1 23:42:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3445
3446         * parse.y (method_header:): Issue error message for rule `type
3447         error'.
3448         (synchronized:): Error report when not using synchronized.
3449
3450 Mon Nov  1 01:32:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3451
3452         * parse.y (resolve_qualified_expression_name): Prevent `this' from
3453         being used before the superclass constructor has been called.
3454         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
3455         instead of `CALL_THIS_CONSTRUCTOR_P'.
3456
3457 Sat Oct 30 21:35:13 1999  Todd T. Fries <todd@lighthouse.fries.net>
3458
3459         * check-init.c: Fix typo in comment.
3460
3461 Fri Oct 29 14:35:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3462
3463         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
3464         and final method.
3465
3466 Fri Oct 29 14:23:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3467
3468         * parse.y (expression_statement:): Call function to report
3469         improper invocation of a constructor.
3470         (parse_ctor_invocation_error): New function.
3471
3472 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
3473
3474         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
3475         remember_end_note.
3476
3477 1999-10-21  Tom Tromey  <tromey@cygnus.com>
3478
3479         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
3480         in generated `main'.
3481
3482 Thu Oct 21 01:27:31 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3483
3484         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
3485         (qualify_ambiguous_name): Likewise.
3486
3487 Wed Oct 20 01:41:47 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3488
3489         * parse.y (java_complete_tree): fold_constant_for_init to work on
3490         permanent_obstack.
3491         (java_complete_lhs): Likewise.
3492         (array_constructor_check_entry): Complete an initializer element
3493         on permanent_obstack.
3494
3495 1999-10-19  Tom Tromey  <tromey@cygnus.com>
3496
3497         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
3498         From Mike Moreton <mike@pillim.demon.co.uk>.
3499
3500 1999-10-15  Greg McGary  <gkm@gnu.org>
3501
3502         * java-tree.h (flag_bounds_check): Remove extern decl.
3503         * lang.c (flag_bounds_check): Remove global variable.
3504         (lang_f_options): Remove "bounds-check" entry.
3505         (lang_init_options): Default flag_bounds_check to "on".
3506
3507 1999-10-14  Tom Tromey  <tromey@cygnus.com>
3508
3509         * jvgenmain.c (usage): New function.
3510         (main): Use it.  Also, handle `-D' options.
3511         * jvspec.c (lang_specific_driver): Recognize -D.
3512         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
3513
3514         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
3515
3516 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3517
3518         * jcf-dump.c (print_constant, disassemble_method): Don't call a
3519         variadic function with a non-literal format string.
3520
3521         * parse-scan.y (report_main_declaration): Likewise.
3522
3523         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
3524
3525         * parse.y (read_import_dir, patch_assignment, patch_binop,
3526         patch_array_ref): Likewise.
3527
3528         * typeck.c (build_java_array_type): Likewise.
3529
3530         * verify.c (verify_jvm_instructions): Likewise.
3531
3532 Tue Oct 12 22:28:10 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3533
3534         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
3535
3536 1999-10-07  Anthony Green  <green@cygnus.com>
3537
3538         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
3539         where CHECK_PUT may fail for valid reasons.
3540
3541         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
3542         UNSAFE_PUTN): New macros.
3543
3544 1999-10-04  Tom Tromey  <tromey@cygnus.com>
3545
3546         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
3547         well.  Fixes Java PR gcj/59.
3548         * parse-scan.y (yyerror): Report errors.
3549
3550 Fri Sep 24 12:23:05 1999  Glenn Chambers  <GChambers@provsol.com>
3551
3552         * decl.c (insert_block): Remove unconditional `abort'.
3553
3554 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3555
3556         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
3557         FUNCTION_CODE now of type int.  All callers changed.
3558         Set the builtin's DECL_BUILT_IN_CLASS.
3559
3560 1999-09-23  Tom Tromey  <tromey@cygnus.com>
3561
3562         * jvspec.c (lang_specific_driver): Don't read spec file if
3563         -fsyntax-only given.
3564
3565 1999-09-22  Tom Tromey  <tromey@cygnus.com>
3566
3567         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
3568
3569         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
3570         (WORDS_TO_LONG): Likewise.
3571         (WORDS_TO_DOUBLE): Likewise.
3572
3573 Tue Sep 14 16:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3574
3575         * jcf-write.c (RELOCATION_VALUE_0): New macro.
3576         (RELOCATION_VALUE_1): Likewise.
3577         (emit_iinc, emit_reloc, push_constant1, push_constant2,
3578         push_in_const, push_long_const): Prototyped.
3579         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
3580         (push_constant2): Likewise.
3581         (push_int_const): Cast find_constant1's integer arguments to `jword'.
3582         (find_constant_wide): Cast find_constant2's integer arguments to
3583         `jword'.
3584         (find_constant_index): Cast find_constant2's and find_constant2's
3585         integer arguments to `jword'.
3586         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
3587         (emit_switch_reloc): Use RELOCATION_VALUE_0.
3588         (emit_if): Use RELOCATION_VALUE_1.
3589         (emit_goto): Likewise.
3590         (emit_jsr): Likewise.
3591         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
3592         argument to push_long_const to HOST_WIDE_INT.
3593
3594 1999-09-15  Andreas Schwab  <schwab@suse.de>
3595
3596         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
3597
3598 1999-09-20  Nick Clifton  <nickc@cygnus.com>
3599
3600         * lang.c (lang_decode_option): Extend comment.
3601
3602 Thu Sep 16 15:42:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3603
3604         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
3605         instead of fndecl.
3606
3607 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3608
3609         * gjavah.c (get_field_name, print_method_info, print_include,
3610         add_namelet): Use xmalloc, not malloc.
3611
3612         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
3613         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
3614         NULL pointer.
3615
3616         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
3617
3618         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
3619
3620         * jcf-path.c (add_entry): Likewise.
3621
3622         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
3623
3624         * jv-scan.c (xmalloc): Remove definition.
3625
3626         * jvgenmain.c (xmalloc): Likewise.
3627
3628         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
3629
3630         * lex.c (java_store_unicode): Use xrealloc, not realloc.
3631
3632         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
3633         concat, not xmalloc/sprintf.
3634         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
3635         (xstrdup): Remove definition.
3636
3637         * parse.y (duplicate_declaration_error_p,
3638         constructor_circularity_msg, verify_constructor_circularity,
3639         check_abstract_method_definitions, java_check_regular_methods,
3640         java_check_abstract_methods, patch_method_invocation,
3641         check_for_static_method_reference, patch_assignment, patch_binop,
3642         patch_cast, array_constructor_check_entry, patch_return,
3643         patch_conditional_expr): Use xstrdup, not strdup.
3644
3645         * zextract.c (ALLOC): Use xmalloc, not malloc.
3646
3647 Sun Sep 12 23:30:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3648
3649         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
3650
3651         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
3652         (do_spec, lang_specific_pre_link, lang_specific_driver,
3653         input_filename, input_filename_length): Don't declare.
3654         (main_class_name, jvgenmain_spec, lang_specific_driver):
3655         Constify a char*.
3656         (lang_specific_driver): All calls to the function pointer
3657         parameter now explicitly call `fatal'.
3658
3659 Sat Sep 11 16:46:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3660
3661         * parse.y (find_applicable_accessible_methods_list): Search
3662         abstract classes as interfaces.
3663
3664 Thu Sep  9 17:33:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3665
3666         * class.c (finish_class): We're now outside a valid method
3667         declaration. Tell the rest of gcc so.
3668
3669 1999-09-08  Bruce Korb  autogen@linuxbox.com
3670
3671         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
3672
3673 1999-09-07  Tom Tromey  <tromey@cygnus.com>
3674
3675         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
3676         java-array.h.
3677         (decode_signature_piece): Don't emit "::" in JArray<>.
3678         (print_namelet): Only print trailing `;' when printing a class.
3679
3680 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3681
3682         * java-tree.h: Delete declarations for all tree nodes now moved to
3683         global_trees.
3684         * decl.c: Delete their definitions.
3685
3686 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
3687
3688         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
3689         * Makefile.in (OBJS): Add ggc-callbacks.o.
3690         (OBJDEPS): Likewise.
3691
3692 1999-09-03  Tom Tromey  <tromey@cygnus.com>
3693
3694         * parse.y (strip_out_static_field_access_decl): Return operand if
3695         it satisfies JDECL_P.
3696
3697 1999-09-02  Tom Tromey  <tromey@cygnus.com>
3698
3699         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
3700         Handle nested arrays, like `[[I'.
3701
3702 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3703
3704         * class.c (finish_class): Remove unused parameter, all callers
3705         changed.
3706
3707         * expr.c (build_java_athrow): Change return type to void.
3708         (java_lang_expand_expr): Make sure each case in switch returns a
3709         value.
3710
3711         * java-tree.h (finish_class): Fix prototype to take void args.
3712
3713         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
3714         (main): Issue return from main, not exit.
3715
3716         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
3717
3718         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
3719
3720         * jv-scan.c (main): Issue return from main, not exit.
3721
3722         * parse.y (check_abstract_method_definitions,
3723         java_check_abstract_method_definitions): Add static prototypes.
3724         (java_complete_expand_methods): Fix call to `finish_class'.
3725
3726         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
3727         and `prevpc'.
3728
3729 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3730
3731         * lang.c (language_string): Constify.
3732
3733 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3734
3735         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
3736         Remove hacks for stuff which comes from libiberty.
3737
3738         * Make-lang.in: Likewise.
3739
3740 Mon Aug 30 16:41:41 1999  Hans-Peter Nilsson  <hp@axis.se>
3741
3742         * Makefile.in (xref.o): Depend on xref.c explicitly.
3743
3744 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3745
3746         * java-tree.h (lang_printable_name): Constify a char*.
3747
3748         * lang.c (lang_printable_name): Likewise.
3749
3750 Fri Aug 27 23:31:57 1999  Jeffrey A Law  (law@cygnus.com)
3751
3752         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
3753         comments in C code.
3754
3755 1999-08-26  Tom Tromey  <tromey@cygnus.com>
3756
3757         * gjavah.c (print_cxx_classname): Print "::" before qualified
3758         name.
3759
3760 Thu Aug 26 09:10:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3761
3762         * parse.y (lookup_cl): Changed leading comment. Now does its best
3763         to set the column number.
3764         (qualify_ambiguous_name): Take WFL wrappers into account.
3765
3766 Wed Aug 25 15:37:15 1999  Gregg Townsend  <gmt@cs.arizona.edu>
3767
3768         * verify.c (verify_jvm_instructions): Don't check instruction
3769         validity beyond end of method.
3770
3771 1999-08-25  Tom Tromey  <tromey@cygnus.com>
3772
3773         * jvspec.c (lang_specific_driver): Correctly handle --help again.
3774
3775 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3776
3777         * gjavah.c (print_name, print_base_classname, utf8_cmp,
3778         cxx_keyword_subst, generate_access, name_is_method_p,
3779         get_field_name, print_field_name, super_class_name, print_include,
3780         decode_signature_piece, print_class_decls, usage, help,
3781         java_no_argument, version, add_namelet, print_namelet): Add static
3782         prototype.
3783         (print_base_classname, utf8_cmp, cxx_keyword_subst,
3784         name_is_method_p): Constify a char*.
3785         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
3786         Provide a final else clause in an if-else-if.
3787         (print_field_info): Add missing final arg in function call to
3788         `print_field_name'.
3789         (print_method_info, decompile_method, decode_signature_piece,
3790         print_c_decl, print_full_cxx_name, print_stub,
3791         print_mangled_classname, super_class_name, print_include,
3792         add_namelet, add_class_decl, print_class_decls, process_file,
3793         help): Constify a char*.
3794
3795         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
3796         push_int_const, find_constant_wide, find_constant_index,
3797         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
3798         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
3799         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
3800         emit_if, emit_goto, emit_jsr, call_cleanups,
3801         make_class_file_name): Add static prototypes.
3802         (generate_bytecode_return, generate_bytecode_insns): Pass a
3803         NULL_PTR, not a NULL_TREE.
3804
3805         * jv-scan.c: Include "jcf.h".
3806         (main): Declare using DEFUN macro.
3807
3808         * jvspec.c (find_spec_file, lang_specific_pre_link,
3809         lang_specific_driver): Add prototypes.
3810         (find_spec_file): Constify a char*.
3811
3812         * keyword.gperf (hash, java_keyword): Add prototypes.
3813
3814         * lang.c (lang_print_error): Add static prototype.
3815         (lang_init): Prefer memcpy over bcopy to avoid casts.
3816
3817         * lex.c (yylex): Add static prototype.
3818
3819         * parse-scan.y: Include "lex.c" earlier.
3820
3821         * parse.h: Remove redundant declaration for `yylex'.
3822
3823         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
3824         labeled_block_contains_loop_p): Add static prototypes.
3825         (not_accessible_p): Make static to match prototype.
3826
3827         * verify.c (start_pc_cmp): Don't needlessly cast away const.
3828
3829 Sun Aug 22 11:07:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3830
3831         * parse.y (check_method_redefinition): Changed leading comment.
3832         (check_abstract_method_definitions): New function.
3833         (java_check_abstract_method_definitions): New function.
3834         (java_check_regular_methods): Call it.
3835         (verify_constructor_super): Fixed indentation.
3836         (lookup_method_invoke): Likewise.
3837
3838 Thu Aug 19 10:26:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3839
3840         * parse.y (method_header): Return a null pointer if the current
3841         class node is null.
3842         (finish_method_declaration): Return if the current function decl
3843         is null.
3844         (source_start_java_method): Likewise.
3845         (java_method_add_stmt): Likewise.
3846
3847 Wed Aug 18 13:17:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3848
3849         * class.c (emit_register_class): Removed unnecessary call to
3850         start_sequence.
3851         * parse.y (labeled_block_contains_loop_p): Removed unused local
3852         variable.
3853
3854 Tue Aug 17 22:51:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3855
3856         * parse.y (java_refold): Added prototype.
3857
3858 Tue Aug 17 21:48:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3859
3860         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
3861         (java_stabilize_reference): Removed unnecessary `else'.
3862         (java_complete_lhs): Set flag to remember boolean. Call
3863         java_refold. Added comments.
3864         (java_decl_equiv): New function.
3865         (binop_compound_p): Likewise.
3866         (java_refold): Likewise.
3867         (patch_unaryop): Striped static field access assigned to decl and
3868         op. Changed promotion scheme for ++/-- operators.
3869         (search_loop): New function.
3870         (labeled_block_contains_loop_p): Likewise.
3871         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
3872         comment.
3873         (patch_bc_statement): Call search_loop. Fixed comment.
3874
3875 1999-08-14  Anthony Green  <green@cygnus.com>
3876
3877         * expr.c (java_lang_expand_expr): Mark static array data as
3878         referenced.
3879
3880 Tue Aug 10 00:28:31 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3881
3882         * jvgenmain.c (main): NUL-terminate name_obstack.
3883
3884 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3885
3886         * check-init.c (check_bool2_init, done_alternative): Add static
3887         prototypes.
3888
3889         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
3890         (add_method, build_utf8_ref, build_class_ref,
3891         append_gpp_mangled_type, layout_class_method): Constify a char*.
3892
3893         * decl.c (push_promoted_type, make_binding_level): Add static
3894         prototypes.
3895         (push_promoted_type, pushdecl): Constify a char*.
3896
3897         * except.c (find_handler_in_range, link_handler,
3898         check_start_handlers): Add static prototypes.
3899
3900         * expr.c (process_jvm_instruction): Constify a char*.
3901
3902         * gjavah.c (main): Constify a char*.
3903
3904         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
3905         Constify a char*.
3906
3907         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
3908         static prototypes.
3909         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
3910         munge, print_ents): Constify a char*.
3911
3912         * jcf-dump.c (disassemble_method): Constify a char*.
3913         (print_constant_pool, print_exception_table): Add static prototypes.
3914         (print_constant, print_exception_table, main, disassemble_method):
3915         Constify a char*.
3916
3917         * jcf-io.c (find_classfile, find_class): Likewise.
3918
3919         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
3920         (set_source_filename, predefined_filename_p): Add static prototypes.
3921         (set_source_filename, get_constant, get_class_constant,
3922         find_in_current_zip): Constify a char*.
3923
3924         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
3925         static prototypes.
3926         (add_entry, add_path, jcf_path_classpath_arg,
3927         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
3928
3929         * jcf-reader.c (get_attribute, jcf_parse_preamble,
3930         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
3931         jcf_parse_one_method, jcf_parse_methods,
3932         jcf_parse_final_attributes): Add static prototypes.
3933         (get_attribute): Constify a char*.
3934
3935         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
3936         jcf_dependency_add_target, jcf_path_classpath_arg,
3937         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
3938
3939         * jv-scan.c (main): Constify a char*.
3940         (gcc_obstack_init): Add prototype arguments.
3941
3942         * jvgenmain.c (gcc_obstack_init): Likewise.
3943         (main): Constify a char*.
3944
3945         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
3946         static prototypes.
3947         (put_decl_string, lang_print_error): Constify a char*.
3948         (lang_init): Remove redundant extern prototype.
3949
3950         * mangle.c (emit_unicode_mangled_name): Constify a char*.
3951
3952         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
3953         Add static prototypes.
3954         (get_type_from_signature): Constify a char*.
3955
3956         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
3957         Add static prototypes.
3958         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
3959         (verify_jvm_instructions): Constify a char*.
3960
3961         * xref.c (xref_flag_value): Likewise.
3962
3963         * xref.h (xref_flag_value): Likewise.
3964
3965         * zextract.c (makeword, makelong): Add static prototypes.
3966         (makeword, makelong): Constify a uch*.
3967
3968 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3969
3970         * lang.c (java_dummy_print): Constify a char*.
3971         (lang_print_error): Likewise.
3972         (lang_init): Remove redundant prototype for `print_error_function'.
3973         (lang_init_source): Likewise.
3974         (lang_identify): Constify a char*.
3975
3976 1999-08-09  Tom Tromey  <tromey@cygnus.com>
3977
3978         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
3979         (WORDS_TO_LONG): Likewise.
3980         (WORDS_TO_DOUBLE): Likewise.
3981
3982 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3983
3984         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
3985
3986         * expr.c (java_stack_pop, java_array_data_offset,
3987         build_java_throw_out_of_bounds_exception, case_identity,
3988         build_java_check_indexed_type): Add static prototypes.
3989         (linenumber_table, expand_invoke, expand_java_field_op,
3990         build_primtype_type_ref, expand_byte_code): Constify a char*.
3991
3992         * java-tree.h (build_primtype_type_ref, linenumber_table):
3993         Constify a char*.
3994         (java_lang_expand_expr): Add prototype.
3995
3996         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
3997         `java_lang_expand_expr'.
3998
3999         * lex.c (java_lex_error): Constify a char*.
4000         (java_get_unicode, java_read_char, java_allocate_new_line,
4001         java_unget_unicode, java_sneak_unicode): Prototype.
4002
4003         * parse-scan.y (current_class, package_name, method_declarator,
4004         report_class_declaration, yyerror): Constify a char*.
4005
4006         * parse.h (java_report_errors): Prototype.
4007         (yyerror): Constify a char*.
4008
4009         * parse.y (classitf_redefinition_error, check_modifiers,
4010         parse_jdk1_1_error, lookup_package_type,
4011         lookup_package_type_and_set_next, get_printable_method_name,
4012         purify_type_name): Constify a char*.
4013         (build_super_invocation, maybe_generate_finit,
4014         verify_constructor_super, parser_add_interface,
4015         add_superinterfaces, jdep_resolve_class, note_possible_classname,
4016         java_complete_expand_methods, java_expand_finals,
4017         cut_identifier_in_qualified, java_stabilize_reference,
4018         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
4019         merge_string_cste): Prototype.
4020         (single_type_import_declaration, yyerror,
4021         variable_redefinition_error, build_array_from_name,
4022         build_unresolved_array_type, check_class_interface_creation,
4023         resolve_class, complete_class_report_errors,
4024         note_possible_classname, read_import_dir,
4025         find_in_imports_on_demand, resolve_package, fix_constructors,
4026         check_deprecation, lookup_method_invoke,
4027         maybe_build_primttype_type_ref, array_constructor_check_entry):
4028         Constify a char*.
4029         (java_complete_expand_methods, java_expand_finals): Make static.
4030         (convert_narrow): Remove static prototype.
4031
4032 Tue Aug  3 20:21:20 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
4033
4034         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
4035
4036 1999-08-02  Richard Henderson  <rth@cygnus.com>
4037
4038         * decl.c: Include defaults.h instead of expr.h.
4039         * parse.y: Likewise.
4040
4041 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
4042
4043         * java/decl.c (start_java_method): Change all uses of
4044         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
4045         Ensure expr.h is included.
4046         * java/expr.c (pop_arguments): Ditto.
4047         * java/parse.y (expand_start_java_method): Ditto.
4048
4049 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4050
4051         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
4052
4053 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
4054
4055         * decl.c: Include "function.h".
4056         * except.c: Likewise.
4057         * parse.y: Likewise.
4058         * Makefile.in: Update dependencies.
4059
4060 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4061
4062         * expr.c (build_java_soft_divmod): Provide a default case in switch.
4063         (java_lang_expand_expr): Mark parameters `target', `tmode' and
4064         `modifier' with ATTRIBUTE_UNUSED.
4065
4066         * gjavah.c (process_file): Add braces around ambiguous `else'.
4067
4068         * jcf-dump.c (print_access_flags, localvar_free): Change return
4069         type to void.
4070
4071         * parse.y (java_complete_expand_method): Initialize variable
4072         `exception_copy'.
4073         (resolve_qualified_expression_name): Likewise for `field_decl'.
4074         (patch_method_invocation): Likewise for `class_to_search'.
4075         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
4076         (patch_assignment): Likewise for `lhs_type'.
4077
4078         * verify.c (verify_jvm_instructions): Remove unused variable
4079         `caller'.
4080
4081 1999-07-25  Richard Henderson  <rth@cygnus.com>
4082
4083         * decl.c (va_list_type_node): New.
4084
4085 1999-07-25  Anthony Green  <green@cygnus.com>
4086
4087         * gjavah.c (print_stub): New function.
4088         (METHOD_IS_NATIVE): New macro.
4089         (print_mangled_classname): Make static.
4090         (HANDLE_END_FIELD): Don't emit fields during stub generation.
4091         (process_file): Perform stub generation.
4092         (HANDLE_METHOD): Don't emit class decls during stub
4093         generation.
4094         (HANDLE_END_METHOD): Take into account stub generation.
4095         (print_method_info): Handle stub generation.
4096         (print_stub): New function.
4097         (print_cxx_classname): Make signature consistant with others.
4098         (help): Describe -stubs option.
4099         (main): Create stub file.
4100         (version): Use version.c.
4101         (print_full_cxx_name): New function.
4102         (print_c_decl): Use print_full_cxx_name.
4103
4104 Thu Jul 22 12:41:12 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4105
4106         * check-init.c (check_init): Handle MAX_EXPR.
4107
4108 1999-07-15  Andrew Haley  <aph@cygnus.com>
4109
4110         * lang.c (flag_use_divide_subroutine): New variable.
4111         * typeck.c: (convert_ieee_real_to_integer): Bounds check
4112         fp-to-integer conversion.
4113         (convert): Call convert_ieee_real_to_integer when flag_fast_math
4114         is not set.
4115
4116         * expr.c (build_java_soft_divmod): New function.
4117         (build_java_binop): Call build_java_soft_divmod if
4118         flag_use_divide_subroutine is set.
4119         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
4120         soft_lrem_node: new builtin functions.
4121         (init_decl_processing) Initialize the new builtins.
4122         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
4123         soft_lrem_node: new builtin functions.
4124         (build_java_soft_divmod): New function.
4125         * parse.y: Call build_java_soft_divmod if
4126         flag_use_divide_subroutine is set.
4127         * parse.c: Rebuilt.
4128
4129         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
4130         a --specs= arg) even if not linking.
4131         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
4132         -fuse-divide-subroutine
4133
4134 Tue Jul 20 13:20:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4135
4136         * parse.y (resolve_and_layout): Check methods only once.
4137         (resolve_qualified_expression_name): Verify thrown exceptions
4138         compatibility.
4139         (check_thrown_exceptions): Reject exceptions thrown in
4140         initializer. Error message tuned.
4141
4142 1999-07-14  Andrew Haley  <aph@cygnus.com>
4143
4144         * expr.c (expand_expr): Do not return the last statement in a
4145         block as the block's value.
4146
4147 Sat Jul  3 22:26:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4148
4149         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
4150         CALL_EXPR, to avoid order of evaluation changes.
4151
4152 Fri Jul  2 17:44:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4153
4154         * parse.y (qualify_ambiguous_name): Do not use
4155         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
4156
4157 Thu Jul  1 23:31:16 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4158
4159         * check-init.c (check_init): Handle MAX_EXPR.
4160         * expr.c (force_evaluation_order): Force method call arguments to
4161         be evaluated in left-to-right order.
4162         * parse.y (qualify_ambiguous_name): Loop again to qualify
4163         NEW_ARRAY_EXPR properly.
4164
4165 Wed Jun 30 17:27:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4166
4167         * parse.y (patch_invoke): Resolve unresolved invoked method
4168         returned type.
4169         (qualify_ambiguous_name): STRING_CST to qualify expression for
4170         type name resolution.
4171
4172 1999-06-24  Andrew Haley  <aph@cygnus.com>
4173
4174         * class.c (finish_class): Whenever a deferred method is
4175         output, rescan the list of methods to see if a new candidate for
4176         output can be found.
4177
4178 1999-06-28  Tom Tromey  <tromey@cygnus.com>
4179
4180         * jvspec.c (lang_specific_driver): Recognize --help.
4181
4182 Fri Jun 25 13:35:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4183
4184         * parse.y (resolve_package): Fixed bogus return statement.
4185         (patch_method_invocation): Resolve method invocation beginning with
4186         a package name qualifier.
4187
4188 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4189
4190         * Make-lang.in (java.stage1): Depend on stage1-start.
4191         (java.stage2): Likewise for stage2-start.
4192         (java.stage3): Likewise for stage3-start.
4193         (java.stage4): Likewise for stage4-start.
4194
4195 Thu Jun 24 13:12:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4196
4197         * parse.y (java_complete_lhs): When doing cross referencing, don't
4198         try to keep file location on a WFL expanded as a CALL_EXPR.
4199
4200 Wed Jun 23 14:37:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4201
4202         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
4203         compiling to class file a void method with an empty method body.
4204         As a side effect, the bytecode backend will generate the
4205         appropriate `return' instruction.
4206
4207 Tue Jun 22 20:43:49 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4208
4209         * parse.y (lookup_package_type_and_set_next): New function prototype.
4210         (resolve_package): Search current and imported packages.
4211         (lookup_package_type_and_set_next): New function.
4212
4213 1999-06-22  Andrew Haley  <aph@cygnus.com>
4214
4215         * verify.c (verify_jvm_instructions): Check for pending blocks
4216         before invalid PC test and opcode switch, not after.
4217
4218 1999-06-21  Andrew Haley  <aph@cygnus.com>
4219
4220         * except.c (find_handler_in_range): The upper limit for exception
4221         ranges is exclusive, not inclusive: (start <= pc < end).
4222         (link_handler): find child pointer which points to outer by
4223         searching sibling list: previous code incorrectly assumed that
4224         outer->outer->first_child must point to outer.
4225         * verify.c (verify_jvm_instructions): FIXME added to code for
4226         `athrow'.
4227         (verify_jvm_instructions): Do not assume that the last block
4228         processed in a subroutine is a block which ends with a `ret'
4229         instruction.  With some control flows it is possible that the last
4230         block ends with an `athrow'.
4231
4232 Mon Jun 14 13:13:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4233
4234         * parse.y (qualify_ambiguous_name): Reorganized the post
4235         evaluation of non WFL leading expression nodes.
4236
4237 Fri Jun 11 21:37:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4238
4239         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
4240         CONVERT_EXPR.
4241
4242 Thu Jun 10 22:26:17 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4243
4244         * parse.y (qualify_ambiguous_name): Handle qualified expression
4245         beginning with a STRING_CST.
4246
4247 Thu Jun 10 20:27:25 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4248
4249         * parse.y (register_fields): Set DECL_INITIAL on both
4250         pre-initialized static and public fields.
4251         (resolve_field_access): Static field access expressions to always
4252         use pointer types.
4253         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
4254         qualification. CONVERT_EXPR to be resolved as an expression name.
4255         (java_complete_lhs): Identify and access qualified final
4256         initialized field in switch statement case expression.
4257         (fold_constant_for_init): Pre-initialized field decl constant to
4258         be folded.
4259
4260 Mon Jun  7 16:09:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4261
4262         * parse.y (note_possible_classname): Mark returned node with
4263         QUALIFIED_P only if the original class name contained a '/'.
4264
4265 Sat Jun  5 11:46:59 1999  Anthony Green  <green@cygnus.com>
4266
4267         * Make-lang.in (gcjh): More parallel build fixes.
4268
4269 1999-06-03  Mike Stump  <mrs@wrs.com>
4270
4271         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
4272
4273 Wed Jun  2 10:44:38 1999  Anthony Green  <green@cygnus.com>
4274
4275         * except.c (link_handler): Chain exception handlers in order.
4276
4277 Wed Jun  2 10:41:24 1999  Anthony Green  <green@cygnus.com>
4278
4279         * expr.c (expand_byte_code): Fill unreachable bytecode regions
4280         with nops and process as usual in order to always set correct EH
4281         ranges.  Emit detailed warnings about unreachable bytecodes.
4282
4283 Wed Jun  2 10:35:13 1999  Anthony Green  <green@cygnus.com>
4284
4285         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
4286         constant.
4287
4288 Fri May 28 18:22:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4289
4290         * parse.y (lookup_field_wrapper): Unified returned value to NULL
4291           or the searched field decl.
4292
4293 Fri May 28 11:34:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4294
4295         * parse.y (fold_constant_for_init): Convert numerical constant
4296         values to the type of the assigned field.
4297
4298 Thu May 27 19:57:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4299
4300         * expr.c (lookup_field): Relaxed the test on class loading error
4301         detection.
4302         * parse.y (fold_constant_for_init): Enabeled old code.
4303
4304 Wed May 26 18:06:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4305
4306         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
4307         decide the validity of the cast of a java.lang.Cloneable reference
4308         to an array.
4309         (patch_conditional_expr): Fixed first argument passed to
4310         binary_numeric_promotion.
4311
4312 Wed May 26 15:33:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4313
4314         * parse.y (qualify_ambiguous_name): Take into account that a
4315         CONVERT_EXPR might specify a type as a WFL.
4316
4317 Tue May 25 15:06:13 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4318
4319         * parse.y (patch_assignment): Save the rhs before using it as an
4320         argument to _Jv_CheckArrayStore.
4321
4322 Tue May 25 11:23:59 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4323
4324         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
4325
4326 Mon May 24 13:26:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4327
4328         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
4329         floating point litteral only when the exponent indicator has been
4330         parsed.
4331
4332 Sat May 22 13:54:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4333
4334         * parse.y (formal_parameter:): Construct argument tree list
4335         element even if a yet unsupported final parameter was encountered.
4336
4337 Tue May 18 00:28:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4338
4339         * parse.y (finish_method_declaration): Issue errors for native or
4340         abstract methods declared with a method body, as well as for non
4341         native or non abstract methods with no method body.
4342
4343 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4344
4345         * class.c (build_utf8_ref): Initialize variable `field'.
4346
4347         * decl.c (init_decl_processing): Initialize variable `field'.
4348
4349         * expr.c (build_known_method_ref): Mark parameters `method_type',
4350         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
4351         (process_jvm_instruction): Likewise for parameter `length'.
4352
4353         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
4354         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
4355         ATTRIBUTE_UNUSED.
4356
4357         * parse.y (maybe_generate_clinit): Remove unused variable
4358         `has_non_primitive_fields'.
4359         (find_in_imports_on_demand): Initialize variables `node_to_use'
4360         and `cl'.
4361         (patch_binop): Likewise for variable `prom_type'.
4362         (patch_unaryop): Likewise for variable `prom_type'.
4363
4364         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
4365
4366         * xref.c (xref_table): Add missing initializer.
4367
4368 1999-05-14  Tom Tromey  <tromey@cygnus.com>
4369
4370         * java-except.h (struct eh_range): Removed unused `next' member.
4371         * verify.c (verify_jvm_instructions): Call check_nested_ranges
4372         after adding all exception handlers.  Sort exception ranges in
4373         order of start PC.
4374         (struct pc_index): New structure.
4375         (start_pc_cmp): New function.
4376         * except.c (add_handler): Return `void'.  Don't call link_handler;
4377         instead construct an ordinary linked list and do range
4378         coalescing.
4379         (check_nested_ranges): New function.
4380         (link_handler): Changed interface to allow merging of eh_ranges.
4381         Split overlapping ranges.  Return `void'.
4382
4383 Mon May 17 19:20:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4384
4385         * parse.y (constructor_block_end:): New rule, tagged <node>.
4386         (constructor_body:): Use `constructor_block_end' instead of
4387         `block_end'.
4388
4389 Mon May 17 18:01:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4390
4391         * parse.y (statement_nsi:): Pop `for' statement block.
4392         (java_complete_lhs): Labeled blocks containing no statement are
4393         marked as completing normally.
4394
4395 Fri May 14 12:31:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4396
4397         * xref.c (xref_set_current_fp): New function, defined.
4398         * xref.h (xref_set_current_fp): New function, prototyped.
4399
4400 Fri May 14 11:57:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4401
4402         * check-init.c (check_init): Take into account that
4403         LABELED_BLOCK_STMT can be empty.
4404
4405 Thu May 13 18:30:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4406
4407         * parse.y (java_check_regular_methods): Warning check on not
4408         overriding methods with default access in other packages does not
4409         apply to `<clinit>'.
4410         (java_complete_lhs): If block body is an empty_stmt_node, replace
4411         it by NULL_TREE. This prevents gcc from generating an irrelevant
4412         warning.
4413
4414 Thu May 13 13:23:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4415
4416         * check-init.c (check_init): Removed code accepting to see things
4417         falling through default:, when doing xrefs.
4418         * java-tree.h (do_not_fold): New global variable, declared.
4419         * parse.y (do_not_fold): New global variable, defined.
4420         (java_complete_expand_method): Set `do_not_fold' to the value of
4421         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
4422         and reinstall them after them have been purged; do not check for
4423         initializations; do not issue missing return errors.
4424         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
4425         when doing xrefs.
4426         (patch_binop): Skip the fold part when doing xrefs.
4427         (build_string_concatenation): Skip the concatenation part when
4428         doing xrefs.
4429         (patch_synchronized_statement): Do not generate a try-finally when
4430         doing xrefs.
4431         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
4432         and keep the location where the throw was seen.
4433         * typeck.c (convert): When `do_not_fold' is set, do not attempt
4434         any treatment on the converted node an simply return a NOP_EXPR of
4435         the targeted type.
4436         * xref.c (xref_get_data): New function, defined.
4437         * xref.h (xref_get_data): New function, declared.
4438         (XREF_GET_DATA): Use xref_get_data.
4439
4440 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4441
4442         * gjavah.c (print_include): Cast the result of `strlen' to int
4443         when comparing against a signed value.
4444         (add_namelet): Likewise.
4445
4446 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4447
4448         * expr.c (expand_invoke): Mark parameter `nargs' with
4449         ATTRIBUTE_UNUSED.
4450         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
4451
4452         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
4453         ATTRIBUTE_UNUSED.
4454
4455         * jcf-reader.c (get_attribute): Cast a value to long
4456         when comparing against a signed expression.  Likewise.
4457
4458         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
4459         HOST_BITS_PER_CHAR.
4460
4461 1999-05-11  Andrew Haley  <aph@cygnus.com>
4462
4463         * parse.y (source_end_java_method): If the current method contains
4464         any exception handlers, force asynchronous_exceptions: this is
4465         necessary because signal handlers in libjava may throw exceptions.
4466         * decl.c (end_java_method): Ditto.
4467
4468 1999-05-11  Tom Tromey  <tromey@cygnus.com>
4469
4470         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
4471         flags.
4472         * jvspec.c (THREAD_NAME): Removed.
4473         (GC_NAME): Likewise.
4474         (MATHLIB): Likewise.
4475         (WITHLIBC): Likewise.
4476         (GCLIB): Likewise.
4477         (THREADLIB): Likewise.
4478         (MATH_LIBRARY): Likewise.
4479         (lang_specific_driver): Don't add `-l' options to command line.
4480         Instead, add a single --specs option.  Recognize `-L' options and
4481         use them to search for spec file.
4482         (find_spec_file): New function.
4483         (SPEC_FILE): New define.
4484
4485 Tue May 11 11:46:36 1999  Dave Brolley  <brolley@cygnus.com>
4486
4487         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
4488         cpplib-enabled build.
4489
4490 1999-05-05  Per Bothner  <bothner@cygnus.com>
4491
4492         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
4493         temporarily zero it while calling rest_of_decl_compilation.
4494
4495         * java-tree.h (string_ptr_type_node):  Add declaration.
4496         * decl.c:  Define and initialize string_ptr_type_node.
4497         * parse.y (patch_string_cst):  Use string_ptr_type_node.
4498
4499         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
4500         * parse.y (for_statement):  Now unconditionally exit_block.
4501         (finish_labeled_statement):  No longer exit_block if for-loop.
4502         (patch_loop_statement):  Check harder if the loop is already labeled.
4503
4504         * parse.y (patch_initialized_static_field):  Removed function.
4505         (maybe_generate_clinit):  Removed special handling for interfaces.
4506         (java_complete_expand_methods):  Do a preliminary java_complete_tree
4507         on <clinit> to determine if it can be removed.
4508         (java_complete_expand_method):  Remove special handling for <clinit>.
4509         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
4510         optimize if we get back empty_stmt_node.
4511         For MODIFY_EXPR, re-do checking of static initializers.
4512         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
4513         For VAR_DECL, pass correct context.
4514
4515         * verify.c (verify_jvm_instructions):  Better error messages.
4516
4517 1999-05-03  Tom Tromey  <tromey@cygnus.com>
4518
4519         * parse-scan.y (interface_declaration): Call
4520         report_class_declaration for interfaces.
4521
4522 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
4523
4524         * Makefile.in: Remove -v from bison command lines.
4525
4526 Fri Apr 30 17:54:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4527
4528         * check-init.c (check_init): Exclude a case of error when doing
4529         xrefs.
4530         * class.c (layout_class_method): Don't generate the error message
4531         twice when compiling from source.
4532         * lang-options.h: Added `-Wredundant-modifers' and
4533         `-Wunusupported-jdk11' flags and help text.
4534         * lang.c (lang_decode_option): Added support for
4535         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
4536         flag_static_local_jdk11 and flag_redundant set accordingly.
4537         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
4538         * parse.h (EXPR_WFL_ADD_COL): New macro.
4539         (DECL_END_SOURCE_LINE): Likewise.
4540         (DECL_INHERITED_SOURCE_LINE): Likewise.
4541         * parse.y (static_ref_err): New function, prototyped.
4542         (CCB_TK): Now tagged <operator>.
4543         (class_body:): Remember the location of the closing '}' of a class
4544         definition when doing xrefs.
4545         (block:): Likewise.
4546         (block_end:): Likewise.
4547         (create_class): Remember the location of the inherited class
4548         identifier when doing xrefs.
4549         (register_fields): Added test on first operand of `init' before
4550         testing it TREE_CODE.
4551         (method_header): Store the location of the class identifier in the
4552         class decl when doing xrefs.
4553         (finish_method_declaration): Don't combine first/last method line
4554         when doing xref.
4555         (java_check_regular_methods): Warning check on not overriding
4556         methods with default access on other packages move before check on
4557         static methods. Initialization of `aflags' also moved up.
4558         (resolve_expression_name): Call static_ref_err to report the error.
4559         (static_ref_err): New function, implemented.
4560         (resolve_field_access): Returned simplified static field access
4561         when doing xrefs.
4562         (resolve_qualified_expression_name): Check for illegal use of
4563         static fields in a non static context. Call static_ref_err to
4564         report error in various places.
4565         (java_complete_tree): Do not fold initialized static fields when
4566         doing xrefs.
4567         (java_complete_lhs): Likewise.
4568
4569 1999-04-29  Anthony Green  <green@cygnus.com>
4570
4571         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
4572         create internal labels.
4573         (lookup_label): Ditto.
4574
4575 Sat Apr 24 16:50:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4576
4577         * class.c (layout_class_method): Generate <clinit>'s rtl for
4578         interfaces.
4579         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
4580         for interfaces' <clinit>.
4581         * expr.c (lookup_field): Search for fields in interfaces.
4582         (expand_invoke): Fixed indentation.
4583         (expand_java_field_op): Likewise. Use IS_CLINIT.
4584         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
4585         (IS_CLINIT): New macro.
4586         * parse.y (type_declaration:): Call maybe_generate_clinit after an
4587         interface was parsed.
4588         (maybe_generate_clinit): Don't generate if the current class is an
4589         interface with only fields of primitive types.
4590         (reset_method_name): Use IS_CLINIT.
4591         (java_complete_expand_method): Expand <clinit> when it exists for
4592         interfaces. Use IS_CLINIT.
4593         (resolve_expression_name): Use DECL_CONTEXT instead of
4594         current_class to build static field references.
4595         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
4596         ARRAY_REF when doing xreferencing.
4597         (check_final_assignment): Fixed typo in leading comment. Use
4598         IS_CLINIT.
4599         (patch_array_ref): Don't fully expand array references when
4600         xreferencing.
4601         (patch_return): Use IS_CLINIT.
4602         (patch_throw_statement): Likewise.
4603
4604 1999-04-22  Tom Tromey  <tromey@cygnus.com>
4605
4606         * Make-lang.in (JAVA_SRCS): Added check-init.c.
4607
4608 Wed Apr 21 11:13:36 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4609
4610         * decl.c (predef_filenames, predef_filenames_size): New globals
4611         (init_decl_processing): predef_filenames and predef_filenames_size
4612         initialized.
4613         * java-tree.h (predef_filenames, predef_filenames_size): Declared
4614         extern.
4615         * jcf-parse.c (predefined_filename_p): New function.
4616         (yyparse): Check that files on the command line are specified only
4617         once and issue a warning otherwise.
4618         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
4619         * parse.y (source_end_java_method): Nullify NOP method bodies, to
4620         avoid a gcc warning with -W -Wall turned on.
4621         (java_expand_classes): Abort if errors were encountered.
4622         (java_complete_lhs): If the cross reference flag is set, wrap
4623         field DECL node around a WFL when resolving expression name.
4624
4625 Mon Apr 19 14:44:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4626
4627         * lang.c (lang_decode_option): Fixed returned value when parsing
4628         `-fxref=...' and `-Wall'.
4629         * parse.y (source_end_java_method): Do not generate code when
4630         flag_emit_xref is set.
4631         (resolve_expression_name): Do not build static field access when
4632         flag_emit_xref is set.
4633         (resolve_field_access): No special treatment on `length' when
4634         flag_emit_xref is set. Do not build qualified static field access
4635         when flag_emit_xref is set.
4636         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
4637         when flag_emit_xref is set.
4638         (patch_assignment): Do not generate array store runtime check when
4639         flag_emit_xref is set.
4640         * xref.c (xref_flag_value): Fixed function declaration
4641         indentation.
4642         (xset_set_data): New function.
4643         * xref.h (xref_set_data): Added prototype for new function.
4644         (typedef struct xref_flag_table): New field data.
4645         (XREF_GET_DATA): New macro.
4646
4647 1999-04-19  Tom Tromey  <tromey@cygnus.com>
4648
4649         * xref.h (enum): Removed trailing comma.
4650
4651         * parse.y (resolve_qualified_expression_name): Added missing
4652         `break'.
4653
4654 Thu Apr 15 13:08:03 1999  Anthony Green  <green@cygnus.com>
4655
4656         * gjavah.c: New prototypes for java_float_finite and
4657         java_double_finite.
4658
4659 Mon Apr 12 18:27:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4660
4661         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
4662         references.
4663
4664 Tue Apr  6 23:15:52 1999  Jeffrey A Law  (law@cygnus.com)
4665
4666         * Makefile.in (TREE_H): Add tree-check.h.
4667         (RTL_H): Add genrtl.h.
4668
4669 Tue Apr  6 15:15:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4670
4671         * parse.y (patch_assignment): Added ArrayStoreException runtime
4672         check.
4673
4674 1999-04-06  Per Bothner  <bothner@cygnus.com>
4675
4676         * expr.c (pop_type_0):  New function.
4677         (pop_type):  Use pop_type_0.
4678         * java-tree.h (pop_type_0):  New declaration.
4679         * verify.c (verify_jvm_instructions):  Check return instructions.
4680
4681         * parse.y (patch_binop):  Don't fold if non-constant and emiting
4682         class files.
4683
4684 Mon Apr  5 16:06:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4685
4686         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
4687
4688         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
4689         (main_jcf): Don't define.
4690         (process_file): Don't set `main_jcf'.
4691
4692         * java-tree.h (main_jcf): Don't declare.
4693
4694         * jcf-parse.c (main_jcf): Add static definition.
4695
4696         * lang.c (main_jcf): Don't define.
4697
4698 Mon Apr  5 15:43:51 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4699
4700         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
4701
4702         * decl.c (copy_lang_decl): Likewise for `bcopy'.
4703
4704         * jcf-depend.c: Include "config.h", not <config.h>.
4705
4706         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
4707         `bcopy' to PTR.
4708
4709         * jcf-path.c: Include "config.h", not <config.h>.
4710
4711         * lex.c: Don't include various system header files.
4712         (java_init_lex): Cast the argument of `bzero' to PTR
4713
4714         * parse-scan.y (java_push_parser_context): Likewise.
4715
4716         * parse.y (java_push_parser_context): Likewise.
4717         (patch_bc_statement): Match format specifier to variable argument.
4718
4719         * xref.c: Don't include <stdio.h>.
4720
4721 Mon Apr  5 11:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4722
4723         * parse.y (struct parser_ctxt *ctxp): Now global.
4724         (declare_local_variables): Use WFL compound value for the
4725         declaration source line value, when doing cross-referencing.
4726
4727 1999-03-31  Tom Tromey  <tromey@cygnus.com>
4728
4729         * gjavah.c (print_field_info): Allow constants of other types.
4730         (print_include): Generate include when new name is proper prefix
4731         of already printed name.
4732         (add_namelet): Likewise.
4733         (cxx_keyword_subst): New function.
4734         (print_method_info): Use it.
4735         (print_field_name): New function.
4736         (get_field_name): New function.
4737         (print_field_info): Use get_field_name and print_field_name.
4738
4739 Wed Mar 31 11:00:32 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4740
4741         * Makefile.in (keyword.h): Generate using gperf language 'C', not
4742         'KR-C', so gperf uses the `const' keyword on strings.
4743
4744         * keyword.gperf (java_keyword): Const-ify a char*.
4745
4746 Tue Mar 30 11:31:53 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4747
4748         * parse.y (patch_bc_statement): Fixed identation and a bogus
4749         `printf' format.
4750
4751 Tue Mar 30 11:29:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4752
4753         * parse.y (patch_assignment): Allow static variables in other
4754         classes to be assigned.
4755
4756 Sun Mar 28 22:12:10 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4757
4758         * class.c (maybe_add_interface): Remove unused variable
4759         `interface_binfo'.
4760         (make_class_data): Use = for assignment, not ==.  Likewise.
4761         (emit_register_classes): Remove unused variable `decl'.
4762
4763         * lex.c: Fix comment so as not to contain an embedded `/*'.
4764
4765         * verify.c (verify_jvm_instructions): Remove unused variable
4766         `self_type'.
4767
4768 Sat Mar 27 15:49:18 1999  Per Bothner  <bothner@cygnus.com>
4769
4770         * parse.y (complete_loop_body):  Rename to finish_loop_body.
4771         (complete_labeled_statement):  Rename to finish_labeled_statement.
4772         (complete_for_loop):  Rename to finish_for_loop.
4773         (complete_method_declaration):  Rename to finish_method_declaration.
4774
4775         * java-tree.h (continue_identifier_node):  New global node.
4776         * decl.c:  Define and initialize continue_identifier_node.
4777         * parse.y (generate_labeled_block):  Remove - no longer needed.
4778         (build_loop_body):  Use continue_identifier_node for continue block.
4779         (finish_labeled_statement):  Also do pop_labeled_block actions.
4780         (java_complete_lhs):  POP_LOOP even if error.
4781         (build_labeled_block):  Special handling for continue_identifier_node.
4782         (patch_loop_statement):  Re-organize.
4783         (patch_bc_statement):  Re-write.
4784
4785 Sat Mar 27 15:13:21 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4786
4787         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
4788         using a WFL compound value.
4789         * parse.y (xref.h): Include.
4790         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
4791         WFL compound value.
4792         (register_fields): Set WFL compound value to lineno if doing
4793         xrefs.
4794         (java_complete_expand_method): Call expand_xref if flag_emit_xref
4795         is set.
4796         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
4797         * xref.h (expand_xref): Prototype renamed from xref_generate.
4798
4799 Sat Mar 27 14:16:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4800
4801         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
4802         (GET_CURRENT_BLOCK): New macro.
4803         * parse.y (current_static_block): New global variable.
4804         (method_body:): Define action.
4805         (complete_method_declaration): Set current_function_decl to NULL
4806         when work on the current method is done.
4807         (declare_local_variables): Use GET_CURRENT_BLOCK.
4808         (java_method_add_stmt): Likewise.
4809         (java_complete_expand_method): Disable the use of `this' when
4810         expanding <clinit>.
4811         (enter_a_block): If no current method exist, use
4812         current_static_block to link static initializer blocks.
4813         (exit_block): Rewritten to use current_static_block when no current
4814         method decl exists.
4815         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
4816         (patch_return): Forbid the use of `return' in static initializers.
4817         (patch_throw_statement): Fixed indentation. Issue specific error
4818         for uncaught thrown checked exception in static initializer
4819         blocks. Removed FIXME.
4820
4821 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4822
4823         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
4824         Link gcj from gcc.o.
4825
4826 Tue Mar 23 10:48:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4827
4828         * parse.y (find_applicable_accessible_methods_list): When dealing
4829         with interface: ensure that a given interface or java.lang.Object
4830         are searched only once.
4831
4832 Tue Mar 23 10:05:27 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4833
4834         * gjavah.c (print_c_decl): Remove unused argument `flags'.
4835
4836         * jcf-dump.c (print_access_flags): Add braces around if-else.
4837
4838         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
4839         COMBINE_INPUTS.
4840
4841         * lex.c (build_wfl_node): Add static prototype.
4842
4843         * lex.h (build_wfl_node): Remove static prototype.
4844
4845         * parse.y: Include lex.c early enough to declare everything needed.
4846         Ensure calls to `build_wfl_node' pass the proper arguments.
4847         (create_class): Remove unused variable `super_decl'.
4848         (get_printable_method_name): Initialize variable `name'.
4849
4850 Mon Mar 22 20:14:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4851
4852         * Changelog: Fixed 1999-03-22 typos.
4853         * lang.c (lang_decode_option): Fixed typo in error string in the
4854         XARG section.
4855
4856 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4857
4858         * Makefile.in (JAVA_OBJS): Added entry xref.o.
4859         (xref.o): New rule.
4860         * java-tree.h (flag_emit_xref): Declared extern.
4861         * lang.c (xref.h): Included.
4862         (flag_emit_xref): New global variable.
4863         (lang_decode_option): Added support for -fxref.
4864         * xref.c: Created.
4865         * xref.h: Likewise.
4866
4867 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
4868
4869         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
4870         linked with.
4871
4872 Sun Mar 21 08:30:30 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4873
4874         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
4875         $(srcdir)/../system.h and $(JAVA_TREE_H).
4876         (jcf-io.o): Depend on $(JAVA_TREE_H).
4877         (mangle.o): Likewise.
4878
4879         * check-init.c (check_cond_init): Add static prototype.
4880
4881         * class.c (build_java_method_type, hashUtf8String,
4882         make_field_value, get_dispatch_vector, get_dispatch_table,
4883         append_gpp_mangled_type, mangle_static_field): Likewise.
4884         (strLengthUtf8): Hide unused definition.
4885         (hashUtf8String): Const-ify.
4886         (make_field_value): Un-ANSI-fy.
4887
4888         * constants.c: Move inclusion of jcf.h above java-tree.h.
4889         (set_constant_entry, find_class_or_string_constant,
4890         find_name_and_type_constant, get_tag_node,
4891         build_constant_data_ref): Add static prototype.
4892
4893         * decl.c (push_jvm_slot, builtin_function,
4894         lookup_name_current_level): Likewise.
4895         (builtin_function): Const-ify.
4896
4897         * except.c (expand_start_java_handler, expand_end_java_handler):
4898         Add static prototype.
4899
4900         * expr.c (flush_quick_stack, push_value, pop_value,
4901         java_stack_swap, java_stack_dup, build_java_athrow,
4902         build_java_jsr, build_java_ret, expand_java_multianewarray,
4903         expand_java_arraystore, expand_java_arrayload,
4904         expand_java_array_length, build_java_monitor, expand_java_pushc,
4905         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
4906         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
4907         expand_compare, expand_test, expand_cond, expand_java_goto,
4908         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
4909         expand_java_field_op, java_push_constant_from_pool): Likewise.
4910
4911         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
4912         (build_java_arraynull_check): Mark parameters `node' and `type'
4913         with ATTRIBUTE_UNUSED.
4914         (note_label): Likewise for parameter `current_pc'.
4915         (expand_java_call, expand_java_ret): Hide unused definition.
4916
4917         * java-tree.h (make_class, build_constants_constructor,
4918         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
4919         init_outgoing_cpool, register_class, emit_register_classes,
4920         java_layout_seen_class_methods): Prototype.
4921         (unicode_mangling_length): Const-ify.
4922         (append_gpp_mangled_name, append_gpp_mangled_classtype,
4923         emit_unicode_mangled_name, format_int, format_uint,
4924         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
4925         jcf_print_utf8_replace, open_class): Prototype.
4926
4927         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
4928         <stdio.h>.  Include tree.h/java-tree.h.
4929         (utf8_equal_string usage, process_class): Add static prototype.
4930         (open_class): Don't prototype this here.
4931         (utf8_equal_string): Match arguments to format specifiers.
4932         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
4933         TABLE_SWITCH, disassemble_method): Likewise.
4934
4935         * jcf-io.c: Include tree.h/java-tree.h.
4936         (open_class, find_classfile, jcf_print_utf8,
4937         jcf_print_utf8_replace): Const-ify.
4938
4939         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
4940         parse_class_file): Add static prototype.
4941         (find_in_current_zip): Match definition to existing static
4942         prototype.
4943
4944         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
4945         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
4946         finish_jcf_block, define_jcf_label, get_jcf_label_here,
4947         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
4948         write_chunks, adjust_typed_op, generate_bytecode_conditional,
4949         generate_bytecode_return, perform_relocations, init_jcf_state,
4950         init_jcf_method, release_jcf_state, generate_classfile):
4951         Add static prototype.
4952         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
4953         (make_class_file_name): Const-ify.
4954
4955         * jcf.h (find_classfile): Const-ify.
4956
4957         * jv-scan.c (reset_report): Remove prototype.
4958
4959         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
4960         (error): Rewrite to allow varargs.
4961
4962         * lang.c (lang_f_options): Const-ify.
4963
4964         * lex.c (java_parse_escape_sequence): Add static prototype.
4965         (java_allocate_new_line): Match definition to existing static
4966         prototype.
4967
4968         * mangle.c Include tree.h/java-tree.h.
4969         (unicode_mangling_length, emit_unicode_mangled_name,
4970         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
4971
4972         * parse.h (jdep_code): Remove trailing comma in enumeration.
4973         (java_get_line_col): Move prototype outside of !JC1_LITE test.
4974         (reset_report): Add prototype.
4975
4976         * verify.c (push_pending_label, merge_types): Add static
4977         prototypes.
4978
4979         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
4980
4981 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4982
4983         * parse.y (find_applicable_accessible_methods_list): Extend the
4984         search to superinterfaces when relevant.
4985         (search_applicable_methods_list): New function.
4986
4987 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4988
4989         * class.c (unmangle_classname): Implemented stricter testing
4990         before setting the QUALIFIED_P flag on an identifier.
4991
4992 Tue Mar 16 15:15:41 1999  Per Bothner  <bothner@cygnus.com>
4993
4994         * parse.y (java_complete_lhs):  Call force_evaluation_order
4995         after patch_newarray.
4996         (patch_binop):  Don't call fold if there are side effects.
4997
4998 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4999
5000         * parse.y (java_stabilize_reference): Use save_expr instead of
5001         building a SAVE_EXPR node.
5002         (java_complete_lhs): Patch the resulting string of the `+='
5003         operator (if necessary) and complete the RHS after having built
5004         the cast.
5005
5006 Mon Mar 15 12:18:29 1999  Per Bothner  <bothner@cygnus.com>
5007
5008         * class.c (make_class):  Don't set CLASS_P here (because
5009         this function is also called by build_java_array_type).
5010         (push_class):  Set CLASS_P here instead.
5011         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
5012
5013         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
5014         context.  If the context is class, perfer "super" over "synchronized".
5015         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
5016
5017         * parse.y (create_class):  Don't call parser_check_super here;
5018         it is not robust.  Always wait until later.
5019
5020         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
5021         match what JDK 1.2 does), but don't set ACC_PUBLIC.
5022
5023 Sat Mar 13 18:16:34 1999  Per Bothner  <bothner@cygnus.com>
5024
5025         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
5026         * lex.h (UNGETC):  Change misleading macro.
5027
5028 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5029
5030         * parse.y (java_stabilize_reference): Return NODE when patching a
5031         COMPOUND_EXPR.
5032         (java_complete_lhs): Put parenthesis around truth values.
5033
5034 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5035
5036         * class.c (layout_class_method): Don't make rtl for interface
5037         methods.
5038         * parse.h (GET_TYPE_NAME): New macro.
5039         * parse.y (if_then_statement:): Fixed indentation.
5040         (if_then_else_statement:): Likewise.
5041         (for_statement:): Fixed spacing.
5042         (try_statement:): Fixed indentation.
5043         (create_interface): Don't force interfaces to be abstract.
5044         (method_header): Abstract methods are OK in interfaces.
5045         (declare_local_variables): Fixed typo in comment.
5046         (java_complete_expand_method): Fixed indentation.
5047         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
5048         non accessible fields.
5049         (java_stabilize_reference): New function.
5050         (java_complete_lhs): Fixed indentation. Use
5051         java_stabilize_reference in compound assignement. Insert the
5052         cast. If not processing `+' fix string constants before processing
5053         binop.
5054
5055 Fri Mar 12 19:42:55 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5056
5057         * constants.c (find_class_or_string_constant): Cast variable `j'
5058         to a `jword' when comparing against one.
5059
5060         * expr.c (java_lang_expand_expr): Remove unused variables
5061         `has_finally_p' and `op0'.
5062
5063         * gjavah.c (print_field_info): Cast a value to jint when comparing
5064         against one.  Likewise for a jlong.
5065         (add_namelet): Likewise cast a `sizeof' to an int when comparing
5066         against a signed quantity.
5067
5068         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
5069         (print_signature): Don't needlessly dereference variable `str'
5070
5071         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
5072         `max_locals' with ATTRIBUTE_UNUSED.
5073         (jcf_parse_class): Likewise for variable `index'.
5074
5075         * parse.h (reverse_jdep_list): Remove static prototype.
5076
5077         * parse.y (build_jump_to_finally): Remove prototype and definition.
5078         (reverse_jdep_list): Add static prototype.
5079
5080         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
5081         `assignment' and `expr_decl'.
5082
5083         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
5084
5085 1999-03-12  Andrew Haley  <aph@cygnus.com>
5086
5087         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
5088         we'll need a directory separator and a null character.
5089
5090 Wed Mar 10 23:20:11 1999  Per Bothner  <bothner@cygnus.com>
5091
5092         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
5093
5094   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5095
5096         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
5097         interfaces.
5098
5099 Fri Mar  5 15:17:29 1999  Per Bothner  <bothner@cygnus.com>
5100
5101         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
5102
5103         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
5104
5105         * class.c (layout_class_method):  A static method in a base class
5106         is never overridden, so treat it like it doesn't exist.
5107         However, do complain about private non-static method overriding
5108         public static method.
5109
5110         * parse.y:  Don't set unused INITIALIZED_P flag.
5111         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
5112
5113         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
5114         (build_array_from_name):  Re-order &index[string] to &string[index].
5115
5116         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
5117         error_mark (it might catch more errors, but it is more likely to lose).
5118
5119 Sat Mar  6 11:17:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5120
5121         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
5122         (parse-scan.o): Depend on toplev.h.
5123
5124         * class.c (make_method_value): Add prototype.  Make it static.
5125         Remove unused second argument, caller changed.
5126
5127         * expr.c (java_lang_expand_expr): Remove unused variable
5128         `return_label'.
5129
5130         * java-tree.h: Don't prototype find_in_current_zip.
5131         Add prototypes for verify_constant_pool, start_java_method,
5132         end_java_method, give_name_to_locals, expand_byte_code,
5133         open_in_zip, set_constant_value, find_constant1, find_constant2,
5134         find_utf8_constant, find_string_constant, find_class_constant,
5135         find_fieldref_index, find_methodref_index, write_constant_pool,
5136         count_constant_pool_bytes and encode_newarray_type.
5137
5138         * jcf-dump.c: Remove unused variable `LONG_temp'.
5139
5140         * jcf-parse.c: Include parse.h.
5141         (jcf_parse_source): Remove unused parameter, all callers changed.
5142         (jcf_figure_file_type): Add static prototype.
5143         (find_in_current_zip): Likewise.  Also remove unused parameter,
5144         all callers changed.
5145         (read_class): Initialize variable `saved_pos'.
5146
5147         * jcf-reader.c (jcf_parse_preamble): Mark variables
5148         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
5149
5150         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
5151         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
5152         (java_parse_doc_section): Initialize variable `seen_star'.
5153         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
5154         (java_lex_error): Mark parameters `msg' and `forward' with
5155         ATTRIBUTE_UNUSED.
5156         (java_get_line_col): Mark parameters `filename' and `line' with
5157         ATTRIBUTE_UNUSED.
5158
5159         * parse-scan.y: Include toplev.h.
5160         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
5161
5162         * parse.h: use `struct JCF', not plain `JCF'.
5163         (java_parser_context_save_global, java_expand_classes
5164         java_parser_context_restore_global, java_parse): Add prototypes.
5165
5166         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
5167         `node'.
5168
5169 Wed Feb 24 16:13:59 1999  Per Bothner  <bothner@deneb.cygnus.com>
5170
5171         *  check-init.c (check_init):  COPYN takes word count, not bit count.
5172
5173 Fri Feb 26 14:06:21 1999  Per Bothner  <bothner@cygnus.com>
5174
5175         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
5176         explicit build_decl.  (Avoids crash in reload when optimizing.)
5177
5178 Thu Feb 25 21:05:04 1999  Per Bothner  <bothner@cygnus.com>
5179
5180         * decl.c (complete_start_java_method):  Handle synchronized method
5181         even when compiling from bytecode.
5182
5183 1999-02-26  Tom Tromey  <tromey@cygnus.com>
5184
5185         * gjavah.c (add_class_decl): Only generate `#include' if outer
5186         class is not the name of the class we are processing.  Correctly
5187         append `.h' in #include.
5188         (process_file): Clean up newlines around generated `#include's.
5189         (decode_signature_piece): Correctly handle inner classes.
5190         (struct include): New structure.
5191         (all_includes): New global.
5192         (print_include): New function.
5193         (add_class_decl): Use it.
5194         (process_file): Likewise.
5195         (add_class_decl): Generate include for java-array.h if array
5196         seen.
5197         (process_file): Don't generate java-array.h include.
5198
5199         * gjavah.c (add_namelet): Check for standard package names here.
5200         (add_class_decl): Don't check for standard package names here.
5201
5202 1999-02-25  Tom Tromey  <tromey@cygnus.com>
5203
5204         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
5205         When reading a zip file, only use strncmp if both strings are
5206         bigger than the buffer length.  Initialize `k' when looping
5207         through zip file.
5208
5209 1999-02-24  Tom Tromey  <tromey@cygnus.com>
5210
5211         * gjavah.c (struct namelet): New structure.
5212         (add_namelet): New function.
5213         (print_namelet): New function.
5214         (print_class_decls): Use add_namelet and print_namelet to generate
5215         namespaces and not classes.
5216         (method_printed): New global.
5217         (HANDLE_END_METHOD): Examine method_printed.
5218         (print_method_info): Set method_printed when required.  Print
5219         error if function to be ignored is marked virtual.  Handle $finit$
5220         method.
5221         (METHOD_IS_FINAL): New macro.
5222         (print_field_info): Use it.
5223         (HANDLE_METHOD): Clear method_printed.
5224         (method_pass): New global.
5225         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
5226         (process_file): Do two passes over both fields and methods.
5227         (HANDLE_METHOD): Examine method_pass.
5228         (root): New global.
5229         (add_class_decl): New function.
5230         (print_class_decls): Don't scan over entire constant pool.
5231
5232 1999-02-23  Tom Tromey  <tromey@cygnus.com>
5233
5234         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
5235         disable linking in that case.
5236
5237 1999-02-20  Tom Tromey  <tromey@cygnus.com>
5238
5239         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
5240         not 0x1f.
5241
5242 Sun Feb 21 14:56:11 1999  Per Bothner  <bothner@cygnus.com>
5243
5244         * decl.c (build_result_decl), java-tree.h:  New method.
5245         (complete_start_java_method):  Handle synchronized methods.
5246         Don't build DECL_RESULT here.  (Ordering dependency problem.)
5247         (start_java_method):  Call build_result_decl here instead  ...
5248         * parse.y (java_complete_expand_method):  ... and here.
5249         (expand_start_java_method): Don't call complete_start_java_method here.
5250         (java_complete_expand_method):  Call it here instead.
5251         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
5252         * java-tree.h:  ... here.
5253
5254         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
5255         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
5256         for ARRAY_REF - it doesn't work when array bounds are checked.
5257         (patch_array_ref):  Handle it here instead.
5258
5259         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
5260
5261 Fri Feb 19 15:35:01 1999  Per Bothner  <bothner@cygnus.com>
5262
5263         Force left-to-right evaluation of binary operations etc.
5264         * expr.c (force_evaluation_order), java-tree.h:  New function.
5265         * parse.y (java_complete_lhs):  Pass binary operations, procedure
5266         calls, and ARRAY_REFs to force_evaluation_order.
5267         (various):  Set TREE_SIDE_EFFECTS more carefully.
5268
5269         Tolerate random (non-UTF8) encoding in comments without complaining.
5270         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
5271         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
5272
5273         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
5274         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
5275
5276         * parse.y (java_complete_lhs):  Ignore an empty statement in a
5277         COMPOUND_EXPR.  Don't complain about empty statement after return.
5278
5279 Fri Feb 19 13:00:56 1999  Per Bothner  <bothner@cygnus.com>
5280
5281         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
5282         in TREE_LIST - just chain the POINTER_TYPEs together.
5283         (resolve_class):  If type already resolved, return decl.
5284         After resolving, update TREE_TYPE(class_type), and name (if array).
5285         * parse.h (do_resolve_class), parse.y:  Make non-static.
5286         * class.c (maybe_layout_super_class):  Take this_class argument.
5287         Do do_resolve_class if necessary.
5288         (layout_class, layout_class_methods): Adjust calls appropriately.
5289         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
5290         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
5291         * typeck.c (build_java_array_type):  Don't call layout_class.
5292
5293 Wed Feb 17 15:47:20 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5294
5295         * parse.y (check_pkg_class_access): Allow private class access
5296         within the same package.
5297         (strip_out_static_field_access_decl): New function.
5298         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
5299         operator argument before testing its nature.
5300
5301 Wed Feb  3 12:38:43 1999  Per Bothner  <bothner@cygnus.com>
5302
5303         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
5304         (TRY_EXPR):  Simplify - it no longer has a finally clause.
5305         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
5306         Simpler handling of TRY_EXPR, which no longer has a finally clause.
5307         * expr.c (java_lang_expand_expr):  Likewise.
5308         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
5309         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
5310         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
5311         (build_try_statement):  Remove finally parameter and handling.
5312         (build_try_finally_statement):  New function.
5313         (patch_try_statement):   No longer need to support finally clause.
5314         (try_statement):  Update grammar action rules.
5315         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
5316         Simpler handling of TRY_EXPR, which no longer has a finally clause.
5317
5318 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
5319
5320         * jcf-parse.c (get_constant): Add braces around computation of 'd'
5321         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
5322
5323 1999-02-17  Andrew Haley  <aph@cygnus.com>
5324
5325         * class.c (build_utf8_ref): Back out broken patch which was
5326         intended to to output signatures using '.' as a separator.
5327
5328         * class.c (make_class_data): Output signatures using '.' as a
5329         separator, rather than '/'.
5330         (mangled_classname): Likewise.
5331         (make_field_value): Likewise.
5332         (make_method_value): Likewise.
5333         * constants.c (alloc_class_constant): Likewise.
5334         * expr.c (build_invokeinterface): Likewise.
5335
5336 Thu Feb 11 21:25:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5337
5338         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
5339         of an ancient workaround.
5340
5341 Wed Feb 10 23:27:33 1999  Jeffrey A Law  (law@cygnus.com)
5342
5343         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
5344         here anymore.
5345
5346 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5347
5348         * lex.c (yylex): Encode \0 as UTF8.
5349
5350 1999-02-10  Tom Tromey  <tromey@cygnus.com>
5351
5352         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
5353         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
5354         (libgcj_zip): Renamed.
5355         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
5356         LIBJAVA_ZIP_FILE.
5357         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
5358
5359         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
5360         (GC_NAME): Renamed -lgc to -lgcjgc.
5361
5362 Tue Feb  9 19:31:09 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5363
5364         * lex.c (java_lang_cloneable): Initialize.
5365         * parse.y (java_lang_cloneable): New static variable.
5366         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
5367         doing one more qualification round.
5368         (valid_ref_assignconv_cast_p): Reject null source or
5369         destination. Allow an array to be cast into java.lang.Cloneable.
5370         (patch_cast): Swapped two first arguments to first call to
5371         valid_ref_assignconv_cast_p.
5372
5373 Mon Feb  8 11:50:50 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5374
5375         * parse.h: DECL_P renamed JDECL_P.
5376         * parse.y: DECL_P replaced by JDECL_P.
5377         (build_array_from_name): Always use pointer's type.
5378         (patch_bc_statement): Extra code to search continue target in a
5379         for loop. Fixed comments. Continue target is current loop when
5380         unlabeled.
5381
5382 1999-02-05  Andrew Haley  <aph@cygnus.com>
5383
5384         * class.c (make_class_data): The superclass of an interface should
5385         be null, not class Object.
5386
5387         * lex.c (java_lex): Sign extend hex literals.
5388
5389 1999-02-04  Andrew Haley  <aph@cygnus.com>
5390
5391         * class.c (build_utf8_ref): Output signatures using '.' as a
5392         separator, rather than '/'.
5393         (make_class_data): Likewise.
5394
5395 Wed Feb  3 22:50:17 1999  Marc Espie <Marc.Espie@liafa.jussieu.fr>
5396
5397         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
5398         mkstemp.o.  Get them from libiberty now.
5399
5400 Tue Feb  2 19:49:12 1999  Jeffrey A Law  (law@cygnus.com)
5401
5402         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
5403
5404 Tue Feb  2 20:04:50 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5405
5406         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
5407         from libiberty.h
5408
5409 Tue Feb  2 10:39:47 1999  Per Bothner  <bothner@cygnus.com>
5410
5411         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
5412         * jcf-write.c (generate_bytecode_return):  New function.
5413         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
5414
5415         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
5416         generate special [fd]const_[01] instructions.
5417
5418         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
5419
5420         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
5421         handling OPCODE_lookupswitch or OPCODE_tableswitch.
5422
5423 Mon Feb  1 20:44:47 1999  Per Bothner  <bothner@cygnus.com>
5424
5425         * parse.y (patch_method_invocation):  Handle calling static methods,
5426         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
5427
5428         * parse.y (java_complete_lhs):  Don't complain about unreachable
5429         exit condition in a do-while statement.
5430
5431 Fri Jan 29 18:19:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5432
5433         * lex.c (java_read_char): Fixed utf8 decoding.
5434         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
5435         range.
5436         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
5437         comments. Local variable `all_primitive' is gone. Broadened
5438         acceptance of `0' to floating point targets. `long' can now be
5439         widened to `double' or `float'.
5440         (valid_method_invocation_conversion_p): Added leading
5441         comment. Fixed tabulation.
5442         (build_string_concatenation): Optimize out left or right empty
5443         string constants.
5444
5445 Thu Jan 28 18:51:26 1999  Per Bothner  <bothner@cygnus.com>
5446
5447         * jcf-write.c (localvar_alloc):  Only emit entry for
5448         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
5449         (generate_bytecode_insns):  Only call put_linenumber if
5450         debug_info_level > DINFO_LEVEL_NONE.
5451         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
5452         is specified, add -g1 (for compatibility wih javac).
5453
5454 Thu Jan 28 09:17:51 1999  Hans-Peter Nilsson  <hp@axis.se>
5455
5456         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
5457         gjavah.o, check-init.o, jv-scan.o
5458
5459 Mon Feb  1 09:50:48 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5460
5461         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
5462
5463         * gjavah.c: Include config.h and system.h.
5464
5465         * javaop.h (inline): Don't define, its handled by system.h.
5466         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
5467         from `inline' to `static inline'.
5468
5469         * jcf.h (inline): Don't define, its handled by system.h.
5470
5471         * lex.c (inline): Likewise.
5472
5473 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
5474
5475         * lang-specs.h: Map -Qn to -fno-ident.
5476
5477 Fri Jan 29 16:51:56 1999  Richard Henderson  <rth@cygnus.com>
5478
5479         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
5480
5481 1999-01-29  Tom Tromey  <tromey@cygnus.com>
5482
5483         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
5484         then cast it to Object before calling `append' method.
5485
5486 Thu Jan 28 14:45:39 1999  Per Bothner  <bothner@cygnus.com>
5487
5488         * check-init.c (check_bool2_init, check_bool_init, check_init):
5489         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
5490         * jcf-write.c (generate_bytecode_insns):  Likewise.
5491
5492 Thu Jan 28 11:50:11 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5493
5494         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
5495         * parse.y (patch_cast): Allow a boolean to be cast into a
5496         boolean.
5497
5498 Wed Jan 27 10:19:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5499
5500         * parse.y: (class_declaration:): Fixed indentation.
5501         (class_member_declaration:): Extra `;' after field declaration now
5502         accepted.
5503         (interface_declaration:): Removed debug messages in error reports.
5504         (patch_binop): Nodes created and returned inherit the orignal
5505         node's COMPOUND_ASSIGN_P flag value.
5506         (patch_cast): Fix cast from char to floating point.
5507
5508 Mon Jan 25 17:39:19 1999  Andrew Haley  <aph@cygnus.com>
5509
5510         * except.c, java-except.h (expand_resume_after_catch): new
5511         function.
5512         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
5513         to branch back to main flow of control after a catch block.
5514
5515 Sat Jan 23 23:02:43 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5516
5517         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
5518         $(srcdir)/../system.h.
5519         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
5520         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
5521         (jcf-write.o): Likewise.
5522         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
5523         (mangle.o): Depend on $(srcdir)/../toplev.h.
5524         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
5525         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
5526
5527         * class.c: Include output.h and parse.h.
5528         (mangled_classname): Add the `const' keyword to a char*.
5529         (find_named_method): Hide unused function definition.
5530         (build_utf8_ref): Change type of variable `c' to unsigned char.
5531         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
5532         (build_class_ref): Add the `const' keyword to a char*.
5533         (layout_class_method): Remove unused variable `buf'.
5534
5535         * decl.c (find_local_variable): Remove unused variable `rtl'.
5536         (pushdecl): Likewise for variables `different_binding_level' and
5537         `oldglobal'.
5538         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
5539         (maybe_build_cleanup): Likewise for parameter `decl'.
5540
5541         * except.c (expand_start_java_handler): Mark parameter `range'
5542         with ATTRIBUTE_UNUSED.
5543
5544         * expr.c: Include except.h.
5545         (pop_type): Remove unused variable `i'.
5546         (pop_value): Likewise for variables `n_words' and `i'.
5547         (expand_java_arrayload): Likewise for variable `convert'.
5548         (java_lang_expand_expr): Likewise for variables `op0', `type',
5549         `mode', `unsignedp', `node' and `elements'.
5550         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
5551         `eh_ranges'.
5552         (process_jvm_instruction): Add a `const' qualifier to a char*.
5553
5554         * gjavah.c (output_directory): Add the `const' keyword to a char*.
5555         (temp_directory): Likewise.
5556         (print_c_decl): Likewise.
5557         (print_method_info): Likewise.
5558         (decode_signature_piece): Likewise.
5559         (print_mangled_classname): Likewise.
5560
5561         * java-except.h: Provide prototypes for maybe_start_try,
5562         maybe_end_try and add_handler.
5563
5564         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
5565         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
5566         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
5567         init_expr_processing, push_super_field, init_class_processing,
5568         can_widen_reference_to, class_depth, verify_jvm_instructions,
5569         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
5570         set_local_type, merge_type_state, push_type, load_type_state,
5571         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
5572         emit_unicode_mangled_name): Add prototypes.
5573
5574         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
5575         (print_signature_type): Use ISDIGIT, not isdigit.
5576         (print_signature): Remove unused variable `j'.
5577
5578         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
5579         int when comparing against one.
5580
5581         * jcf-parse.c: Include toplev.h.
5582
5583         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
5584         (localvar_free): Remove unused variable `i'.
5585         (generate_bytecode_conditional): Likewise for variable `kind'.
5586
5587         * jv-scan.c: Include config.h and system.h.  Remove redundant
5588         OS header and gansidecl.h includes.
5589         (warning): Add the `const' keyword to a char*.  Also add
5590         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
5591         __STDC__, when determining whether to use ANSI-isms.
5592         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
5593         (xmalloc): Don't redundantly prototype here.
5594         (main): Remove unused parameter `envp'.  Also fix the arguments
5595         passed to function `fatal' to match the format specifier.
5596
5597         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
5598
5599         * mangle.c: Include toplev.h.
5600         (emit_unicode_mangled_name): Declare parameter `len'.
5601
5602         * parse.y (parse_warning_context): Add the `const' keyword to a
5603         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
5604         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
5605         (issue_warning_error_from_context): Add the `const' keyword to
5606         a char*.
5607         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
5608         not `__STDC__' for whether to use ANSI-isms.
5609
5610         * typeck.c (incomplete_type_error): Mark parameters `value' and
5611         `type' with ATTRIBUTE_UNUSED.
5612         (parse_signature_type): Use ISDIGIT, not isdigit.
5613
5614         * verify.c (check_pending_block): Add the `const' keyword to a char*.
5615         (verify_jvm_instructions): Likewise.  Remove unused variables
5616         `field_name' and `default_val'.
5617
5618         * zextract.c: Include config.h and system.h.  Remove redundant
5619         OS header includes.
5620
5621         * zipfile.h: Prototype `read_zip_archive'.
5622
5623 Thu Jan 21 16:00:06 1999  Andrew Haley  <aph@cygnus.com>
5624
5625         * typeck.c (convert): Allow conversions to void type: some
5626         optimizations in gcc do this.
5627
5628 Thu Jan 21 15:21:49 1999  Andrew Haley  <aph@cygnus.com>
5629
5630         * typeck.c (convert_ieee_real_to_integer): New function.
5631         (convert): When not using fast-math and using hardware fp, convert
5632         an IEEE NaN to zero.
5633
5634 1999-01-18  Andrew Haley  <aph@cygnus.com>
5635
5636         * parse.y (patch_binop): Do a type conversion from signed to
5637         unsigned and then back to signed when a ">>>" is found.
5638
5639 Sun Jan 17 22:34:22 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5640
5641         * java-tree.h: (check_for_initialization): Added prototype.
5642         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
5643         * parse.y (do_resolve_class): Removed unused locals.
5644         (read_import_dir): Likewise.
5645         (resolve_qualified_expression_name): Array creation
5646         expressions are valid primary expressions.
5647         (qualify_ambiguous_name): Likewise.
5648         (patch_synchronized_statement): Removed unused local.
5649
5650 Sun Jan 17 21:55:42 1999  Jeffrey A Law  (law@cygnus.com)
5651
5652         * Makefile.in (zextract.o): Add dependencies.
5653
5654         * Makefile.in: Do not put ^Ls at the start of a line.
5655
5656 Fri Jan 15 20:16:20 1999  Per Bothner  <bothner@cygnus.com>
5657
5658         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
5659         sub-type the result of the call that gets the exception value.
5660
5661         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
5662         don't call finish_class.
5663
5664         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
5665         clear found before continuing.
5666
5667         * verify.c (verify_jvm_instructions):  On an array load, allow
5668         and handle top of stack to be TYPE_NULL.
5669
5670         * gjavah.c (generate_access):  Translate Java package private or
5671         protected access to C++ public, but with a comment.
5672
5673 1999-01-13  Andrew Haley  <aph@cygnus.com>
5674
5675         * expr.c (generate_name): Name prefix changed to avoid clashes
5676         with assembler temp labels.
5677
5678         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
5679         MODIFY_EXPR.  Without this, code for the assignement may not be
5680         generated at all and the synchronized statement will read an
5681         uninitialized variable.
5682
5683 Wed Jan 13 01:24:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5684
5685         * class.c (maybe_layout_super_class): Fixed returned value.
5686         * lex.c: Added 1999 to the copyright.
5687         (java_init_lex): Initialize java_lang_imported.
5688         * lex.h: Added 1999 to the copyright.
5689         * parse.h: Added 1999 to the copyright.
5690         (REGISTER_IMPORT): Fixed typo in trailing macro.
5691         (CURRENT_OSB): New macro.
5692         (struct parser_ctxt): New fields osb_depth, osb_limit.
5693         * parse.y (java_lang_id): New global variable.
5694         (type_import_on_demand_declaration): Don't import java.lang.* twice.
5695         (array_creation_expression:): Use CURRENT_OSB.
5696         (dims:): Uses a stack to keep track of array dimensions.
5697         (cast_expression:): Use CURRENT_OSB.
5698         (find_expr_with_wfl): Return NULL if node found doesn't meet the
5699         conditions.
5700         (register_fields): Fixed typos in comment.
5701         (check_method_redefinition): Fixed comment indentation.
5702         (java_check_regular_methods): Set saved found wfl to NULL after
5703         having reinstalled it in the previously found DECL_NAME.
5704
5705 Sun Jan 10 13:36:14 1999  Richard Henderson  <rth@cygnus.com>
5706
5707         * gjavah.c (java_float_finite): Use a union to do type punning.
5708         (java_double_finite): Likewise.
5709
5710 Sat Jan  9 11:25:00 1999  Per Bothner  <bothner@cygnus.com>
5711
5712         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
5713         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
5714         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
5715         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
5716         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
5717         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
5718
5719 Fri Jan  8 15:48:03 1999  Per Bothner  <bothner@cygnus.com>
5720
5721         * check-init.c (check_init):  If compiling to native, we don't
5722         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
5723
5724 1999-01-08  Tom Tromey  <tromey@cygnus.com>
5725
5726         * parse-scan.y (variable_declarator_id): Set or increment
5727         bracket_count.
5728         (bracket_count): New global.
5729         (formal_parameter): Handle case where bracket pairs trail variable
5730         declarator id.
5731
5732 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
5733
5734         * jcf-parse.c (yyparse): variable len changed from a char to an
5735         int to prevent overflow.
5736
5737 Wed Jan  6 17:19:46 1999  Per Bothner  <bothner@cygnus.com>
5738
5739         * java-tree.h:  Declare read_class.
5740         * jcf-parse.c (read_class):  New function.
5741         (load_class):  Now just call read_class.
5742
5743         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
5744         * jcf-parse.c (parse_source_file):  Declare save_error_count,
5745         which is needed by java_parse_abort_on_error macro,
5746         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
5747
5748         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
5749         constructor, if initializing a static field.
5750         (patch_new_array_init):  Set TREE_CONSTANT if it is.
5751         * expr.c (java_lang_expand_expr):  For a static array constructor
5752         of primitive elements, allocate the array itself statically.
5753         Disabled until we can set the vtable field statically.
5754
5755         * check-init.c:  New file.  Checks for definite assignment.
5756         * Makefile.in (JAVA_OBJS):  Add check-init.o.
5757         * parse.y (java_complete_expand_method): Call check_for_initialization.
5758         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
5759
5760 Wed Jan  6 14:53:10 1999  Graham <grahams@rcp.co.uk>
5761
5762         * parse.y : include system.h instead of including
5763         standard headers directly with the exception of <dirent.h>.
5764
5765 Wed Jan  6 16:20:06 1999  Per Bothner  <bothner@cygnus.com>
5766
5767         * lex.h:  Moved static function declarations to lex.c,
5768         to shut up some -Wall warnings.
5769         * lex.c:  Static function declarations moved here.
5770         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
5771
5772 Tue Jan  5 22:15:40 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5773
5774         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
5775
5776 Tue Dec 22 11:25:19 1998  Per Bothner  <bothner@cygnus.com>
5777
5778         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
5779         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
5780
5781         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
5782         (localvar_alloc):  Change return type to void,
5783         (emit_unop):  Remove unused variable size.
5784
5785         * jcf-write.c (struct jcf_block):  Add new union.
5786         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
5787         (call_cleanups):  New functions.
5788         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
5789         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
5790         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
5791         * lang.c (lang_init):  Call using_eh_for_cleanups.
5792         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
5793         completing operands to patch_synchronized_statement.
5794         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
5795         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
5796         WITH_CLEANUP_EXPR instead of TRY_EXPR.
5797
5798 Sun Dec 20 16:15:44 1998  John F. Carr  <jfc@mit.edu>
5799
5800         * Make-lang.in: Comment out control-Ls; they upset some makes.
5801
5802 1998-12-18  Tom Tromey  <tromey@cygnus.com>
5803
5804         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
5805         consistently.
5806
5807 1998-12-17  Tom Tromey  <tromey@cygnus.com>
5808
5809         * parse.y (DIR_SEPARATOR): New define.
5810         (check_class_interface_creation): Use it.
5811
5812         * parse-scan.y (report_main_declaration): Recognize
5813         `java.lang.String' in argument to main.
5814
5815 Wed Dec 16 16:18:59 1998  Per Bothner  <bothner@cygnus.com>
5816
5817         * parse.y (create_interface):  Remove bogus test.
5818
5819 Wed Dec 16 14:42:19 1998  Per Bothner  <bothner@cygnus.com>
5820
5821         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
5822         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
5823
5824 1998-12-16  Tom Tromey  <tromey@cygnus.com>
5825
5826         * parse-scan.y (qualified_name): Use correct sprintf format.
5827
5828 1998-12-15  Tom Tromey  <tromey@cygnus.com>
5829
5830         * gjavah.c (print_field_info): Changed how most negative number is
5831         printed.
5832
5833 Mon Dec 14 18:49:29 1998  Per Bothner  <bothner@cygnus.com>
5834
5835         * parse.y (fold_constant_for_init):  New function.
5836         (resolve_expression_name):  Don't replace static final
5837         constant-initialized fields by its value.
5838         (java_complete_lhs):  New.  Same as java_complete_tree, except does
5839         not replace static final constant-initialized fields by their values.
5840         (register_fields):  If there is an initializer, set DECL_INITIAL and
5841         MODIFY_EXPR_FROM_INITIALIZATION_P.
5842         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
5843         Only call patch_initialized_static_field if
5844         MODIFY_EXPR_FROM_INITIALIZATION_P.
5845         (patch_initialized_static_field):  If not valid constant, clear
5846         DECL_INITIAL.
5847
5848         * parse.y (lookup_field_wrapper):  Fix thinko.
5849
5850         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
5851         set and restore global lineno.
5852
5853 1998-12-14  Tom Tromey  <tromey@cygnus.com>
5854
5855         * gjavah.c (print_field_info): If value to print is the smallest
5856         value of its size, then print as hex to avoid later warnings from
5857         C++ compiler.
5858
5859 1998-12-14  Tom Tromey  <tromey@cygnus.com>
5860
5861         * gjavah.c (decompile_method): Decompile `return null'.
5862         (process_file): Generate `#pragma interface'.
5863         (method_declared): New global.
5864         (print_method_info): Set it.
5865         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
5866         (print_method_info): Handle abstract methods.
5867
5868 Sun Dec 13 17:31:40 1998  Per Bothner  <bothner@cygnus.com>
5869
5870         * parse.y (patch_method_invocation):  If class_decl is null
5871         (e.g. an array type), use original type.
5872
5873         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
5874         errors about uncaught exception from clone (of array, specifically).
5875
5876 1998-12-13  Tom Tromey  <tromey@cygnus.com>
5877
5878         * gjavah.c (decompile_method): Handle all types of `return'
5879         opcode.  Decompile `return this' and `return'.
5880         (method_access): New global.
5881         (print_method_info): Set it.
5882         (decompile_method): Don't decompile a synchronized method.
5883
5884 1998-12-13  Tom Tromey  <tromey@cygnus.com>
5885
5886         * jcf-reader.c (jcf_parse_one_method): Recognize
5887         HANDLE_END_METHOD.
5888         * gjavah.c (HANDLE_END_METHOD): New macro.
5889         (HANDLE_CODE_ATTRIBUTE): New macro.
5890         (decompile_method): New function.
5891         (print_method_info): Don't print `;\n' at end of function decl.
5892         Include java-opcodes.h.
5893         (decompiled): New global.
5894
5895 Sat Dec 12 20:13:19 1998  Per Bothner  <bothner@cygnus.com>
5896
5897         * class.c (build_class_ref):  Handle PRIMTYPE.class if
5898         flag_emit_class_files.
5899         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
5900         if flag_emit_class_files.
5901         * parse.y (java_complete_tree):  Pre-liminary support for
5902         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
5903
5904         * parse.y (patch_synchronized_statement):   Don't call monitorexit
5905         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
5906
5907         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
5908
5909         * zipfile.h (opendir_in_zip):  New declaration.
5910         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
5911         (opendir_in_zip):  New function, using code from open_in_zip.
5912         (open_in_zip):  Call opendir_in_zip.
5913         (find_class):  Remove no-longer-used do_class_file parameter,
5914         but add source_ok parameter.  Change logic so if we find a .java file,
5915         we don't look for .class in later classpath emtries.
5916         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
5917         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
5918         * gjavah.c: Update call to find_class.
5919         * jcf-dump.c:  Likewise.
5920
5921         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
5922         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
5923         nothing if body is empty_stmt_node.
5924         Various little fixes so SP gets correctly adjusted.
5925         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
5926         For CALL_EXPR, test if static first.
5927         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
5928         such as the ones we create for Object and Class.
5929         Set and restore current_function_decl.
5930         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
5931         (note_possible_classname):  New function.
5932         (read_import_entry):  Removed.  Merged with read_import_dir.
5933         (read_import_dir):  Don't call find_class - that only gives us
5934         the first classpath entry having the needed package.
5935         Use the struct buffer data structure from buffer.h.
5936         (read_import_dir, find_in_imports_on_demand):  The remembered
5937         class names now use '.' (not '/') as package separator.
5938
5939         * parse.y (java_complete_expand_methods):  Call write_classfile
5940         here, and not in java_expand_classes (which only gets first class).
5941
5942 Sat Dec 12 19:46:04 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5943
5944         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
5945         (register_fields):  If a static fields has an initializer, just
5946         chain it on ctxp->static_initialized, and handle later.
5947         (java_complete_expand_methods):  Force <clinit> first.
5948         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
5949         - it's already been completed.
5950         (patch_initialized_static_field):  New function.
5951         (java_complete_field):  Call it.
5952
5953 Sat Dec 12 19:21:11 1998  Per Bothner  <bothner@cygnus.com>
5954
5955         * expr.c (encode_newarray_type, build_new_array):  New functions.
5956         * java-tree.h:  Declare build_new_array.
5957         * jcf-write.c (patch_newarray):  Use build_new_array.
5958
5959         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
5960         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
5961
5962         * parse.y (patch_new_array_init):  Re-organize.
5963         Now is passed the actual array (pointer) type of the value.
5964         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
5965         (patch_array_constructor):  Removed - merged into patch_new_array_init.
5966         (java_complete_tree):  Update patch_new_array_init.
5967
5968         * jcf-write.c (find_constant_index):  New function.
5969         (generate_bytecode_insns):  Use find_constant_index.
5970         (generate_classfile):  Use find_constant_index for ConstantValue.
5971
5972 1998-12-11  Tom Tromey  <tromey@cygnus.com>
5973
5974         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
5975         * decl.c (init_decl_processing): Renamed dtable -> vtable.
5976         * class.c (make_class_data): Renamed dtable -> vtable, and
5977         dtable_method_count -> vtable_method_count.
5978
5979 Thu Dec 10 20:00:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5980
5981         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
5982         global variables, initialized.
5983         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
5984         Declared new global variables.
5985         * lex.c (java_lex): Return long_zero_node, float_zero_node,
5986         double_zero_node, integer_zero_node upon direct matching.
5987         * parse.y (purify_type_name): Added function prototype.
5988         (duplicate_declaration_error_p): Consider new_type as potentially
5989         being a incomplete type. Use purify_type_name on type string.
5990         (method_header): saved_type: unused variable removed. Don't figure
5991         return type if method name is invalid.
5992         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
5993         processed by patch_unaryop.
5994         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
5995         increment/decrement node into its original type after binary
5996         numeric promotion on its operands.
5997
5998 Thu Dec 10 11:02:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5999
6000         * parse.y (array_initializer:): Array init operand is NULL_TREE
6001         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
6002         now an error. Fixed indentation problems.
6003         (patch_string): Handle error_mark_node as an argument.
6004         (patch_new_array_init): Fixed indentation problems.
6005         (array_constructor_check_entry): Removed check on null wfl_value.
6006         Return an error if wfl_value's walk returns an error.
6007
6008 Wed Dec  9 15:37:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6009
6010         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
6011         * lex.c (java_lex): Remember column position before advancing one
6012         token. Retain location information on OCB_TK.
6013         * lex.h (typedef struct java_lc): Added new field.
6014         * parse.h (GET_SKIP_TYPE): New macro.
6015         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
6016         * parse.y (build_new_array_init, patch_new_array_init,
6017         patch_array_constructor, maybe_build_array_element_wfl,
6018         array_constructor_check_entry): New function prototypes.
6019         (switch_block:): Tagged <node>.
6020         (OCB_TK): Tagged <operator>.
6021         (array_initializer:): Installed actions.
6022         (variable_initializer): Build location information on element if
6023         necessary.
6024         (switch_statement:): Fixed indentation typo.
6025         (switch_block:): Redefined default action.
6026         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
6027         (patch_assignment): Removed duplicate code.
6028         (maybe_build_array_element_wfl, build_new_array_init,
6029         patch_new_array_init, patch_array_constructor,
6030         array_constructor_check_entry): New functions.
6031
6032 Mon Dec  7 15:13:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6033
6034         * parse.y (array_initializer): Tagged <node>.
6035         (variable_initializer:): Use default rule.
6036         (array_initializer:): Defined actions.
6037         (variable_initializers:): Likewise.
6038         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
6039         non-static field accesses.
6040         (patch_invoke): Fixed indentation typo.
6041         (java_complete_tree): Likewise.
6042         (build_labeled_block): Changed leading comment. Generate an error
6043         in case of duplicate loop labels.
6044         (patch_conditional_expr): Patch results of string concatenation
6045         operations.
6046
6047 Sun Dec  6 13:45:00 1998  Per Bothner  <bothner@cygnus.com>
6048
6049         * constants.c (find_methodref_index):  When the class is an interface,
6050         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
6051
6052         * decl.c (finit_identifier_node):  Use "$finit$", rather than
6053         "<finit>" (which Sun's verifier rejects).
6054         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
6055         (generate_field_initialization_code):  Removed.
6056         (fix_constructors)  Don't add call to $finit$ here (wrong order).
6057         (patch_method_invocation):  Add $finit$ call here.
6058
6059         * java-tree.h (CALL_USING_SUPER):  New macro.
6060         * parse.y (patch_invoke):  Remove im local variable.
6061         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
6062         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
6063         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
6064
6065         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
6066
6067         * parse.y (java_complete_tree):  Don't complain about unreachable
6068         statement if it is empty_stmt_node.
6069
6070         * jcf-write.c (find_constant_wide):  New function.
6071         (push_long_const):  Use find_constant_wide.
6072
6073         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
6074         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
6075         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
6076         Emit invokeinterface when calling an interface method.
6077         Emit invokespecial also when calling super or private methods.
6078
6079         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
6080
6081 Sun Dec  6 13:21:18 1998  Per Bothner  <bothner@cygnus.com>
6082
6083         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
6084
6085 Thu Dec  3 17:11:12 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6086
6087         * java-tree.h (java_layout_seen_class_methods): New function
6088         prototype.
6089         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
6090         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
6091         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
6092         * parse.y (method_declarator:): Defined action.
6093         (issue_warning_error_from_context): input_filename saved, set to
6094         the appropriate value and restored after java_error is called.
6095         (build_unresolved_array_type): Fixed comment.
6096         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
6097         (method_header): Deal with return type the same way type are
6098         handled for fields and method's parameters and local variables
6099         types are handled.
6100         (check_method_redefinition): Removed extra CR.
6101         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
6102         (java_layout_seen_class_methods): New function.
6103         (java_layout_classes): Call java_layout_seen_class_methods.
6104
6105 Thu Dec  3 15:56:50 1998  Per Bothner  <bothner@cygnus.com>
6106
6107         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
6108
6109 Thu Dec  3 15:08:30 1998  Per Bothner  <bothner@cygnus.com>
6110
6111         * jcf-dump.c (main):  Fix error message.
6112         * jcf-path.c (add_entry):  Style fix.
6113
6114 Wed Dec  2 15:52:25 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6115
6116         * class.c (layout_class_method): Call build_java_argument_signature
6117         on constructors too.
6118         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
6119         (patch_method_invocation): Define a primary when resolving an
6120         expression name. Augmented comment on code checking illegal `this'
6121         usage. Loosened it test by accepting NEW_CLASS_EXPR.
6122
6123 Tue Dec  1 13:53:24 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6124
6125         * class.c (layout_class_method): Don't report error on non-static
6126         overriding static if the method is private.
6127         * java-tree.h (finish_class): Prototype added.
6128         * lex.c (java_get_line_col): Handle col argument -2 value.
6129         * parse.h: All static method declarations moved to parse.y.
6130         * parse.y: Now contains all static method declarations previously
6131         found in parse.h.
6132         (find_expr_with_wfl, missing_return_error,
6133         unreachable_stmt_error): New functions.
6134         (java_get_real_method_name): Identify constructors bearing class
6135         names in source code compiled classes only.
6136         (java_complete_expand_methods): Call missing_return_error.
6137         (invocation_mode): Private methods invoked as static methods.
6138         (java_complete_tree): Call unreachable_stmt_error.
6139
6140 1998-12-01  Tom Tromey  <tromey@cygnus.com>
6141
6142         * Makefile.in (+target): Removed.
6143         (+xmake_file): Likewise.
6144         (+tmake_file): Likewise.
6145         (.NOEXPORT): Removed duplicate.
6146
6147 Fri Nov 27 13:20:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6148
6149         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
6150
6151         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
6152
6153         * jvgenmain.c: Remove the xmalloc prototype, we get it from
6154         libiberty.h.  Provide an xmalloc definition.
6155
6156         * jvspec.c: Remove the xmalloc prototype.
6157
6158         * parse-scan.y: Include config.h and system.h.  Don't include
6159         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
6160         Provide an xstrdup definition.
6161
6162 Thu Nov 26 22:03:58 1998  Alexandre Oliva  <oliva@dcc.unicamp.br>
6163
6164         * jcf-path.c (add_entry): Recognize ".jar" too.
6165         * lang-specs.h: Likewise.
6166
6167 Thu Nov 26 12:44:07 1998  Per Bothner  <bothner@cygnus.com>
6168
6169         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
6170         soft_monitorenter_node, soft_monitorexit_node, throw_node.
6171
6172         * jcf-write.c (generate_bytecode_insns):
6173         Handle pre/post-increment/decrement of long.
6174
6175         * jcf-write.c (generate_bytecode_insns):
6176         Handle missing exception handler (finally for synchronized).
6177
6178 Wed Nov 25 09:47:15 1998  Per Bothner  <bothner@cygnus.com>
6179
6180         * java-tree.h (end_params_node):  Declare global.
6181         * decl.c (end_params_node):  New global.
6182         (init_decl_processing, start_java_method):  Use end_params_node for
6183         end of list of parameter types.  Follows correct gcc conventions.
6184         * expr.c (pop_argument_types, pop_arguments):  Likewise.
6185         * lang.c (put_decl_node):  Likewise.
6186         * typeck.c (various places):  Likewise.
6187         * class.y (various places):  Likewise.
6188         * parse.y (various places):  Likewise.
6189
6190         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
6191         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
6192
6193         * class.c:  Add #include flags.h, remove no-longer needed declaration.
6194
6195         * class.c (layout_class_method):  Remove commented-out code, re-format.
6196         Don't add vtable entry (or index) for private methods.
6197         * expr.c (expand_invoke):  A private method is implicitly final.
6198         * class.c (make_class_data):  If inlining or optimizing,
6199         skip private methods.
6200
6201         * class.c (finish_class):  New function.  Calls existing methods,
6202         but alls emits deferred inline functions.
6203         * jcf-parse.c (parse_class_file):  Call finish_class.
6204         * parse.y (java_complete_expand_methods):  Likewise.
6205
6206         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
6207
6208         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
6209
6210 Wed Nov 25 00:50:58 1998  Marc Espie <espie@quatramaran.ens.fr>
6211
6212         * jcf-write.c (generate_bytecode_conditional): Fix typo.
6213
6214 Tue Nov 24 17:06:38 1998  Per Bothner  <bothner@cygnus.com>
6215
6216         * (generate_classfile): Always write class access flag with
6217         ACC_SUPER set.
6218
6219 Tue Nov 24 16:34:33 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6220
6221         * class.c (maybe_layout_super_class): New function.
6222         (layout_class): Reorganized. Loop on class methods dispatched into
6223         a new function. Call maybe_layout_super_class.
6224         (layout_class_methods, layout_class_method): New functions.
6225         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
6226         class.
6227         (expand_invoke): Likewise.
6228         * java-tree.h (all_class_list): New global variable declared.
6229         (layout_class_methods, layout_class_method): New function
6230         prototypes.
6231         (LAYOUT_SEEN_CLASS_METHODS): New macro.
6232         * jcf-parse.c (all_class_list): New global variable.
6233         (load_class): Extended what class_or_name can be. Use parser
6234         context mechanism to save globals before calling jcf_parse.
6235         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
6236         is set on the file name.
6237         (jcf_parse): Layout class methods when Object is loaded, otherwise
6238         record class in all_class_list for delayed method layout.
6239         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
6240         * lang.c (put_decl_node): Decode <init> into the decl context
6241         class name.
6242         * lex.c (java_allocate_new_line): Use xmalloc.
6243         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
6244         pointers, not TREE_LIST elements.
6245         (struct parser_ctxt): Fixed comment indentations, added comments
6246         and reordered some fields.
6247         (java_check_methods): Function prototype removed.
6248         * parse.y (java_push_parser_context): Use xmalloc.
6249         (java_parser_context_restore_global): Pop extra pushed ctxp only
6250         when there's nothing next.
6251         (maybe_create_class_interface_decl): Fixed comment, add new
6252         created class decl to all_class_list.
6253         (method_header): Use GET_REAL_TYPE on argument's types.
6254         (method_declarator): Use GET_REAL_TYPE, change type to the real
6255         type in TREE_LIST dependency node. Build argument list with the
6256         real type.
6257         (create_jdep_list): Use xmalloc. Removed allocation error message.
6258         (obtain_incomplete_type): Fixed leading comment. Broadened
6259         incoming argument meaning.
6260         (register_incomplete_type): Use xmalloc. Removed allocation error
6261         message.
6262         (safe_layout_class): Fixed leading comment.
6263         (jdep_resolve_class): Reversed if statement condition and switch
6264         if and else bodies.
6265         (resolve_and_layout): Fixed leading comment. Broadened incoming
6266         argument meaning.
6267         (complete_class_report_errors): New local variable name, for
6268         clarity. purify_type_name used for all error cases.
6269         (java_get_real_method_name): Stricter check on constructors.
6270         (java_check_regular_methods): Reverse methods list only if not
6271         already laid out. Layout artificial constructor.
6272         (java_check_methods): Deleted.
6273         (source_start_java_method): Obtain incomplete type for patchable
6274         method arguments.
6275         (java_layout_classes): Fixed leading comment. Use
6276         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
6277         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
6278         before returning. Fixed comments.
6279         (java_expand_classes): Check for errors up front.
6280         (patch_method_invocation): Class to search is resolved and laid
6281         out.
6282
6283 Tue Nov 24 12:57:13 1998  Per Bothner  <bothner@cygnus.com>
6284
6285         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
6286
6287         * javaop.h (int8):  Removed - not used.
6288         (jbyte):  Redefine portably with correct signedness.
6289
6290         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
6291
6292         * jcf-write.c (generate_bytecode_insns):  Fix typo
6293         OPCODE_getstatic to OPCODE_getfield.
6294
6295         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
6296         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
6297         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
6298
6299 Thu Nov 19 11:16:55 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6300
6301         * jcf-parse.c (jcf_parse_source): Function returned type is
6302         void. Added prototype.
6303         (jcf_parse): Function returned type is void.
6304         (yyparse): Remove call to fclose on the last parsed file.
6305
6306         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
6307
6308 Wed Nov 18 23:54:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6309
6310         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
6311         (layout_class): Cope with methods featuring WFL in decl names.
6312         * decl.c (unqualified_object_id_node): New global variable,
6313         initialized.
6314         (build_decl_no_layout): Removed.
6315         * expr.c (build_primtype_type_ref): Handle Double.
6316         (java_lang_expand_expr): Fixed indentations.
6317         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
6318         (flag_wall, flag_redundant, flag_not_overriding,
6319         flag_static_local_jdk1_1, unqualified_object_id_node): Global
6320         variable declarations.
6321         (build_decl_no_layout): Removed prototype.
6322         (java_get_real_method_name): Added prototype.
6323         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
6324         (java_parse_abort_on_error): Macro now just returns.
6325         * jcf-parse.c (jcf_parse_source): Check fclose returned
6326         value. Call emit_register_classes if java_report_errors returns
6327         zero.
6328         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
6329         flag_static_local_jdk1_1): New integer flags.
6330         (lang_decode_option): New flags set here.
6331         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
6332         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
6333         the flag_redundant variable.
6334         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
6335         when parsing java.lang.Object class.
6336         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
6337         NULL_TREE to build.
6338         (resolve_qualified_expression_name): Fixed indentation.
6339         (patch_array_ref): Changed prototype.
6340         (not_initialized_as_it_should_p): Prototype removed.
6341         (java_report_errors): Added function prototype.
6342         * parse.y (formal_parameter:): Changed error message for not yet
6343         supported final parameters.
6344         (class_type_list:): Set both PURPOSE and VALUE of created
6345         TREE_LIST to be class_type.
6346         (primary_no_new_array:): Handle class literals on primitive types.
6347         (parse_warning_context): Reinstalled correct force_error and
6348         do_warning flags setups.
6349         (java_report_errors): Changed prototype. Return java_error_count
6350         value.
6351         (variable_redefinition_error): Consider treating variable type as
6352         a fake pointer.
6353         (create_interface): Warn about redundant abstract modifier if
6354         flag_redundant is set. Changed error message.
6355         (lookup_field_wrapper): Save/restore globals before/after looking
6356         up field.
6357         (duplicate_declaration_error_p): Consider treating declaration
6358         type as a fake pointer.
6359         (register_fields): Extract real type from dependency node. Check
6360         for duplicate field declaration after type adjustment. Use
6361         DECL_INITIAL to store static final initialized values.
6362         (method_header): Extract real function type from dependency node.
6363         (check_abstract_method_header): Use GET_METHOD_NAME.
6364         (obtain_incomplete_type): Layout fake pointer type.
6365         (safe_layout_class): Don't try to check for methods before layout.
6366         (java_complete_class): Don't check for correct throws clause
6367         elements inheritance here.
6368         (resolve_and_layout): Broadened name parameter meaning.
6369         (reset_method_name): Use GET_METHOD_NAME.
6370         (java_get_real_method_name): New function.
6371         (java_check_regular_methods): Don't check methods in
6372         java.lang.Object.  Verify lineage of throws clause elements. Use
6373         flag_no_overriding in warning report.
6374         (check_throws_clauses): Don't check if class was from
6375         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
6376         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
6377         (declare_local_variables): Use flag_static_local_jdk1_1 to report
6378         warning on unsupported final local variables. Use build_decl
6379         instead of build_decl_no_layout. Get real local variable type from
6380         dependency node.
6381         (source_start_java_method): Get real parameter type from
6382         dependency node. Call build_decl instead of build_decl_no_layout.
6383         (java_layout_classes): Reverse tree and layout type and class as
6384         required. Mark class as loaded when done.
6385         (resolve_field_access): Fixed indentation. Restricted condition
6386         leading to static field access code generation. Set field_type
6387         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
6388         (resolve_qualified_expression_name): Initialize type_found to
6389         null. Handle static field resolved during qualification. Fixed
6390         layout on non primitive field decl types.
6391         (not_accessible_p): Fixed typo in comment.
6392         (patch_method_invocation): Resolve and layout class to search from
6393         type.
6394         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
6395         layout non primitive type, if necessary. Make method node only to
6396         report errors.
6397         (find_applicable_accessible_methods_list): Consider WFL'ed method
6398         decl names. Fixed indentation.
6399         (argument_types_convertible): Resolve and layout target type if
6400         necessary.
6401         (java_complete_tree): Fixed indentation problems. Rewrote
6402         CALL_EXPR thrown exceptions check. Re-installed further processing
6403         of the assignment in certain cases.
6404         (patch_assignment): Call maybe_build_primttype_type_ref to perform
6405         inlining on class literals.
6406         (valid_builtin_assignconv_identity_widening_p): Cope with constant
6407         0 literal.
6408         (valid_method_invocation_conversion_p): Likewise.
6409         (patch_string): Temporary disable forbidden use of `this' in
6410         explicit constructor invocations when doing string concatenation
6411         within their scope.
6412         (patch_unaryop): Added comment. Reinstalled code to disable
6413         further check on assignment operation with cast expression RHS.
6414         (patch_switch_statement): Fixed indentation.
6415         (build_try_statement): Call build_decl instead of
6416         build_decl_no_layout.
6417         (patch_synchronized_statement): Likewise.
6418         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
6419         IS_UNCHECKED_EXPRESSION_P.
6420         (check_thrown_exceptions_do): Changed leading comment. Resolve and
6421         layout argument exception type.
6422         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
6423         of IS_UNCHECKED_EXPRESSION_P.
6424
6425 Wed Nov 18 14:21:48 1998  Anthony Green  <green@cygnus.com>
6426
6427         * jcf-parse.c (yyparse): Open class file in binary mode.
6428
6429 Sun Nov 15 17:14:17 1998  Per Bothner  <bothner@cygnus.com>
6430
6431         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
6432
6433         * jcf-write.c (perform_relocations):  Move check out one loop.
6434
6435 Sun Nov 15 15:09:56 1998  Anthony Green  <green@hoser.cygnus.com>
6436
6437         * Make-lang.in: Fix reference to srcdir.
6438         * jv-scan.c: Add missing xmalloc prototype.
6439         * jvgenmain.c: Ditto.
6440
6441 Sun Nov 15 14:36:29 1998  Per Bothner  <bothner@cygnus.com>
6442
6443         * decl.c (error_mark_node), java-tree.h:  New global.
6444         * parse.y:  Use empty_stmt_node instead of size_zero_node.
6445         (build_if_else_statement):  If missing else, use empty_stmt_node.
6446
6447         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
6448         (java_complete_expand_method):  Complain if return is missing.
6449         (java_check_regular_methods):  Comment out incorrect error check.
6450         (not_accessible_p):  Fix incorrect handling of protected methods.
6451         (patch_method_invocation):  Pass correct context to not_accessible_p.
6452         (find_applicable_accessible_methods_list):  Likewise.
6453         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
6454         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
6455         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
6456         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
6457
6458         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
6459         (push_int_const):  Remove reundant NOTE_PUSH.
6460         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
6461         (- case SWITCH_EXPR):  Fix code generation bug.
6462         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
6463         (generate_classfile):  More robust for abstract methods.
6464
6465 Sun Nov 15 13:52:39 1998  Anthony Green  <green@cygnus.com>
6466
6467         * Makefile.in: jv-scan and jvgenmain all require libiberty.
6468         * Make-lang.in: Ditto.
6469
6470         * jv-scan.c: Remove xmalloc and xstrdup definitions.
6471         * jvgenmain: Ditto.
6472
6473 Sun Nov 15 14:10:56 1998  Per Bothner  <bothner@cygnus.com>
6474
6475         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
6476
6477         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
6478
6479 Sat Nov 14 17:19:18 1998  Per Bothner  <bothner@cygnus.com>
6480
6481         Allow uses of interface types to verify.  This is not really
6482         type-safe, but it matches what Sun does, and is OK as long as
6483         there are appropriate run-time checks.
6484         * verify.c (merge_types):  If merging two interface types,
6485         just set the result to java.lang.Object.
6486         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
6487
6488 1998-11-13  Tom Tromey  <tromey@cygnus.com>
6489
6490         * gjavah.c (main): Handle --output-class-directory argument.
6491         * jvspec.c (lang_specific_driver): Translate `-d' into
6492         -foutput-class-dir.
6493         * jcf.h (jcf_write_base_directory): Declare.
6494         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
6495         * lang-options.h: Mention -foutput-class-dir.
6496         * jcf-write.c (jcf_write_base_directory): New global.
6497         (make_class_file_name): Put generated .class file into `-d'
6498         directory, or into source directory if -d not given.  Function now
6499         static.
6500         (write_classfile): Free class file name.  Handle case where class
6501         file name is NULL.
6502         (DIR_SEPARATOR): New macro.
6503         Include <sys/stat.h>
6504
6505         * Makefile.in (prefix): New macro.
6506
6507 Thu Nov 12 14:15:07 1998  Per Bothner  <bothner@cygnus.com>
6508
6509         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
6510         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
6511         here (done in patch_invoke instead).
6512         (case_identity):  Moved here from parse.y.
6513
6514         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
6515         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
6516         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
6517         so they can be efficiently scanned without recursion.
6518         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
6519         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
6520         in BLOCK iteratively, rather than recursively.
6521
6522         * parse.y (do_unary_numeric_promotion):  New function.
6523         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
6524
6525         * parse.y (patch_newarray):  Various fixes.
6526
6527         Re-do handling of switch statements (for proper block scoping).
6528         * parse.y:  Add just a single block for the enture switch block,
6529         but don't create any "case blocks".
6530         (group_of_labels):  Rmeoved unneeded non-terminal.
6531         CASE_EXPR and DEFAULT_EXPR are added to current block.
6532         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
6533         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
6534         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
6535         * parse.y (wfl_operator, print_int_node): Make non-static.
6536         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
6537         as part of recursive scan of block.
6538         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
6539         (patch_switch_statement):  Most tests move dinto java_complete_tree.
6540
6541         * parse.y:  Make various production be non-typed (void).
6542         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
6543         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
6544         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
6545
6546         * jcf-write.c (struct jcf_handler):  New type.
6547         (struct jcf_switch_state):  New type.
6548         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
6549         (alloc_handler, emit_unop, emit_reloc):  New functions.
6550         (adjust_typed_op):  Add extra parameter ("max type" offset).
6551         (emit_switch_reloc, emit_case-reloc):  New function.
6552         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
6553         (generate_bytecode_insns):  Support REAL_CST, switch statements,
6554         exception handling, method calls, object/array creation, and more.
6555
6556         * class.c:  Remove some unused variables.
6557         * constants.c (find_string_constant):  New function.
6558         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
6559         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
6560         if flag_emit_class_files.
6561
6562 1998-11-12  Tom Tromey  <tromey@cygnus.com>
6563
6564         * jcf-io.c (find_class): Added explanatory comment.
6565
6566         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
6567         trailing slash to `.zip' entries.
6568
6569         * jvspec.c (lang_specific_driver): Correctly handle case where
6570         GC_NAME not defined.
6571
6572 1998-11-11  Tom Tromey  <tromey@cygnus.com>
6573
6574         * jvspec.c (GC_NAME): New define.
6575         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
6576         if required.
6577         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
6578
6579 Wed Nov 11 19:08:52 1998  Per Bothner  <bothner@cygnus.com>
6580
6581         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
6582
6583 1998-11-11  Tom Tromey  <tromey@cygnus.com>
6584
6585         * jcf-dump.c (main): Correctly recognize `--'-style long options.
6586
6587 Tue Nov 10 12:34:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6588
6589         * class.c (is_compiled_class): Call safe_layout_class for class
6590         compiled from source.
6591         * conver.h (convert_to_integer, convert_to_real,
6592         convert_to_pointer): Added prototypes.
6593         * decl.c (init_decl_processing): Non longer push the decls of
6594         `methodtable', `constants', `Class', `Field', `dispatchTable'
6595         `jexception' and `Method'.
6596         * expr.c (build_invokeinterface): New function.
6597         (expand_invoke): static variable CLASS_IDENT now in
6598         build_invokeinterface. Use build_invokeinterface.
6599         (expand_java_field_op): Moved code to inline
6600         java.lang.PRIMTYPE.TYPE into a function.
6601         (build_primtype_type_ref): New function.
6602         * java-tree.def (INSTANCEOF_EXPR): New tree code.
6603         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
6604         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
6605         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
6606         (DECL_LOCAL_STATIC_VALUE): New macro.
6607         (build_invokeinterface, build_primtype_type_ref): New function
6608         prototypes.
6609         (java_parse_abort_on_error): Macro rewritten.
6610         * jcf-parse.c (current_method): Add comment to declaration.
6611         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
6612         Function prototypes fixed.
6613         (jcf_parse_source): push/pop parser context. save/restore global.
6614         (parse_source_file): Fixed leading comment. Now take a
6615         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
6616         classes and pop the parser context anymore.
6617         (yyparse): Push parser context, save globals, parse the source
6618         file, restore globals and pop the parser context when processing a
6619         source file.
6620         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
6621         * lex.c (java_parse_doc_section): New function.
6622         (java_lex): Call java_parse_doc_section when appropriate. Build an
6623         operator around INSTANCEOF_TK.
6624         * lex.h (java_lineterminator, java_sprint_unicode,
6625         java_unicode_2_utf8, java_lex_error, java_store_unicode):
6626         Prototypes rewritten.
6627         (java_parse_escape_sequence, java_letter_or_digit_p,
6628         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
6629         java_read_unicode, java_store_unicode, java_read_char,
6630         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
6631         Added function prototypes.
6632         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
6633         define.
6634         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
6635         New macros
6636         (struct parser_ctxt): New fields: deprecated,
6637         current_parsed_class_un, gclass_list.
6638         (fix_method_argument_names, issue_warning_error_from_context,
6639         resolve_package, lookup_package_type): New function prototypes.
6640         (resolve_expression_name): Fixed function prototype.
6641         (find_applicable_accessible_methods_list): Fixed indentation, added
6642         extra argument in prototype.
6643         (check_final_assignment, build_null_of_type, check_deprecation,
6644         check_method_redefinition, reset_method_name,
6645         java_check_regular_methods, java_check_abstract_methods,
6646         maybe_build_primttype_type_ref): New function prototype.
6647         * parse.y (conver.h): Include.
6648         (INSTANCEOF_TK): Tagged <operator>.
6649         (single_type_import_declaration): Use REGISTER_IMPORT macro.
6650         (relational_expression:): Build binop for instanceof.
6651         (java_push_parser_context): Remember ctxp->gclass_list across
6652         contexts.
6653         (java_pop_parser_context): Simply return if no context
6654         exists. Remember gclass_list across contexts.
6655         (issue_warning_error_from_context): New function.
6656         (parse_error_context): Don't setup ctxp->elc here. Call
6657         issue_warning_error_from_context instead.
6658         (parse_warning_context): Likewise.
6659         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
6660         setup. Link new class/interface to ctxp->gclass_list.
6661         (add_superinterfaces): Register interface as incomplete if not
6662         loaded.
6663         (create_class): Remember class unqualified name in
6664         ctxp->current_parsed_class_un. Check class deprecation.
6665         (register_fields): Check field deprecation. Remember static final
6666         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
6667         processing INIT.
6668         (method_header): New local variable ORIG_ARG. Use unqualified
6669         current class name for check on constructor errors. Promote return
6670         type if of record type. Argument list fix moved in
6671         fix_method_argument_names, called here. Check method deprecation.
6672         (fix_method_argument_names): New function.
6673         (method_declarator): Promote record typed arguments.
6674         (safe_layout_class): Check class methods before layout.
6675         (java_complete_class): Compute field layout when patched.
6676         (do_resolve_class): Try to load class after having it renamed
6677         after the package name.
6678         (get_printable_method_name): Use DECL_CONTEXT.
6679         (reset_method_name): New function.
6680         (check_method_redefinition): Use reset_method_name.
6681         (java_check_regular_methods): New local variable
6682         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
6683         names for error report. Check for compile-time error when method
6684         found has default (package) access.
6685         (java_check_abstract_methods): Now takes an interface DECL node as
6686         an argument. Also reinstall real name on unchecked
6687         overriding/hiding methods for error report.
6688         (java_check_methods): Fixed leading comment. Get classes to verify
6689         from ctxp->gclass_list. Use CHECK_METHODS macro and set
6690         CLASS_METHOD_CHECKED_P on class verification.
6691         (lookup_java_method2): Get real method name if necessary.
6692         (find_in_imports): Don't check package class access here.
6693         (resolve_package, lookup_package_type): New functions.
6694         (java_layout_classes): Fixed leading comment. Take classes to be
6695         laid out from ctxp->gclass_list.
6696         (java_complete_expand_methods): Don't expand native and abstract
6697         methods.
6698         (java_expand_classes): New function.
6699         (resolve_expression_name): Use additional argument ORIG.  Retrieve
6700         values of static final field of primitive types.
6701         (resolve_field_access): Handles static final field of promotive
6702         type.
6703         (resolve_qualified_expression_name): Handle STRING_CST as
6704         primaries and package name resolution. Check deprecation on found
6705         decls. Set where_found and type_found on non static field resolved
6706         during qualification. Layout non primitive field decl types.
6707         (check_deprecation): New function.
6708         (maybe_access_field): Simplified.
6709         (patch_method_invocation_stmt): Local variable CLASS_TYPE
6710         removed. Reverse method's argument when primary is a type. Don't
6711         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
6712         instead. Include abstract class in the list of class searchable
6713         for constructors. Use DECL_CONTEXT of found method for access
6714         checks. Check method deprecation.
6715         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
6716         converting arguments. Handle INVOKE_INTERFACE.
6717         (lookup_method_invoke): Search constructor using existing
6718         infrastructure (don't rely on lookup_java_constructor anymore).
6719         (find_applicable_accessible_methods_list): Extra argument flag
6720         LC. Now include constructor in the search.
6721         (qualify_ambiguous_name): Conditional expression are primaries.
6722         (not_initialized_as_it_should_p): static final are always
6723         initialized.
6724         (java_complete_tree): Pass extra NULL argument to
6725         resolve_expression_name. Stricter test to carry on patching
6726         assignments. New case for INSTANCEOF_EXPR.
6727         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
6728         (check_final_assignment, maybe_build_primttype_type_ref): New
6729         functions.
6730         (patch_assignment): Detect resolved static finals and carry normal
6731         assignment error check on them. Inline PRIMTYPE.TYPE read access.
6732         (try_builtin_assignconv): Access constant 0 on all primitive
6733         types.
6734         (valid_builtin_assignconv_identity_widening_p): Accept identical
6735         types. Accept all promoted type on int type.
6736         (valid_ref_assignconv_cast_p): Accept a null pointer to be
6737         assigned to a reference.
6738         (valid_method_invocation_conversion_p): Accept to check null
6739         pointers.
6740         (build_binop): Merge declaration and initialization of local
6741         variable BINOP.
6742         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
6743         numeric types. Improved validity test for qualify operators on
6744         references.
6745         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
6746         and PREINCREMENT_EXPR. Also detect resolved static finals of a
6747         primitive type and issue the appropriate error message.
6748         (resolve_type_during_patch): Mark class loaded when resolved.
6749         (patch_cast): Allow null to be cased to reference types.
6750         (build_null_of_type): New function.
6751         (patch_array_ref): Handle array on references correctly.
6752         (patch_return): Removed unused local variable MODIFY. Force
6753         boolean to be returned as integers. Allows null to be returned by
6754         a function returning a reference.
6755         * typeck.c (convert_to_integer, convert_to_real,
6756         convert_to_pointer): Prototypes moved to convert.h
6757         (lookup_argument_method): Use method real name, if necessary.
6758
6759 1998-10-30  Tom Tromey  <tromey@cygnus.com>
6760
6761         * class.c (build_class_ref): Changed name of primitive classes to
6762         start with `_Jv_'.
6763
6764         * class.c (make_class_data): Renamed fields: nmethods to
6765         method_count, method_count to dtable_method_count.  Always set
6766         `state' field to 0.
6767         * decl.c (init_decl_processing): Likewise.
6768
6769 Wed Oct 28 08:03:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6770
6771         * class.c (layout_class): Don't mangle <finit>, produce
6772         __finit<class> instead. Don't verify artificial methods.
6773         * decl.c (finit_identifier_node): New declared global.
6774         (init_decl_processing): finit_identifier_node initialized.
6775         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
6776         * java-tree.h (finit_identifier_node): Declared as extern.
6777         (struct lang_decl): New field called_constructor.
6778         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
6779         (CLASS_HAS_FINIT_P): New macro.
6780         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
6781         explicit constructor invocation.
6782         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
6783         CALL_SUPER_CONSTRUCTOR_P): New macros.
6784         (write_classfile): Added prototype.
6785         * jcf-parse.c (jcf_parse_source): Parse and remember for
6786         generation if the file was seen on the command line.
6787         (parse_source_file): Don't write the class file here.
6788         (yyparse): Loop on files rewritten. Set current_jcf.
6789         (parse_zip_file_entries): Parse class file only if it was found.
6790         * lang.c (init_parse): Don't open command line provided filename
6791         here.
6792         (lang_parse): Don't set main_jcf anymore.
6793         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
6794         (JCONSTRUCTOR_CHECK): New macro.
6795         (JBSC_TYPE_P): New macro.
6796         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
6797         (COMPLETE_CHECK_OP_2): New macro.
6798         (struct parse_ctxt): New field explicit_constructor_p.
6799         (check_class_interface_creation): Fixed prototype indentation.
6800         (patch_method_invocation_stmt): Prototype reflects added argument.
6801         (patch_invoke): Likewise.
6802         (complete_method_declaration, build_super_invocation,
6803         verify_constructor_circularity,
6804         build_this_super_qualified_invocation, get_printable_method_name,
6805         patch_conditional_expr, maybe_generate_finit, fix_constructors,
6806         verify_constructor_super, create_artificial_method,
6807         start_artificial_method_body, end_artificial_method_body,
6808         generate_field_initialization_code): New function prototypes.
6809         * parse.y: Fixed leading comment
6810         (constructor_header:, constructor_body:, block_end:): Rules tagged
6811         <node>.
6812         (type_declaration:): Call maybe_generate_finit.
6813         (method_declaration:): Action for method_body: placed in new
6814         function complete_method_declaration, called here.
6815         (constructor_declaration:): Defined actions. Removed leading
6816         FIXME.
6817         (constructor_header:): New rule with action.
6818         (constructor_body:): Rule rewritten using block_begin: and
6819         block_end:. Defined actions.
6820         (constructor_declarator:, explicit_constructor_invocation:):
6821         Defined actions.
6822         (block:): Use new rules block_begin: block_end:.
6823         (block_begin:, block_end:): New rules and actions.
6824         (block_statements:): Fixed error message for explicit
6825         constructors.
6826         (method_invocation:): Call build_this_super_qualified_invocation
6827         if primary is `this' or `super' was seen.
6828         (conditional_expression:): Action defined.
6829         (extra_ctxp_pushed_p): New static global flag.
6830         (java_parser_context_save_global): Create parser context if
6831         necessary. Use extra_ctxp_pushed_p to remember it.
6832         (java_parser_context_restore_global): Pop extra parser context if
6833         one exists.
6834         (build_array_from_name): Array on primitive types are marked
6835         loaded.
6836         (register_fields): Restore new name in field initializer
6837         expression if type was altered. Non static fields initialized upon
6838         declaration marked initialized.
6839         (maybe_generate_finit): New function.
6840         (maybe_generate_clinit): Use create_artificial_method,
6841         start_artificial_method_body, end_artificial_method_body. Generate
6842         debug info for enclosed initialization statements.
6843         (method_header): Fixed leading comment. Check constructor
6844         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
6845         accordingly.
6846         (complete_method_declaration, constructor_circularity_msg,
6847         verify_constructor_circularity): New functions.
6848         (get_printable_method_name): New function.
6849         (check_method_redefinition): Don't rename <finit> methods. Fix
6850         declared constructor names. Error message for
6851         constructors modified.
6852         (java_check_regular_methods): Local variable seen_constructor
6853         renamed saw_constructor. Skip verification on constructors. Create
6854         default constructor with create_artificial_method.
6855         (java_check_methods): Removed unnecessary empty line.
6856         (create_artificial_method, start_artificial_method_body,
6857         end_artificial_method_body): New functions.
6858         (java_layout_classes): Changed leading comment. Reverse fields
6859         list if necessary. Always layout java.lang.Object if being
6860         defined.
6861         (java_complete_expand_methods): Verify constructor circularity.
6862         (java_complete_expand_method): Call fix_constructor on
6863         constructors.  Local variable no_ac_found removed. Restore
6864         bindings if method body expansion failed.
6865         (fix_constructors, verify_constructor_super,
6866         generate_field_initialization_code): New function.
6867         (java_expand_classes): Fixed leading comment. Write class file
6868         here.
6869         (resolve_expression_name): Check for illegal instance variable
6870         usage within the argument scope of an explicit constructor
6871         invocation.
6872         (resolve_qualified_expression_name): Pass extra from_super flag
6873         when invoking patch_method_invocation_stmt. New case for
6874         conditional expression when used as a primary. Check for error
6875         when acquiring super.
6876         (patch_method_invocation_stmt): Added extra argument super. New
6877         local variable is_static_flag. Set class_to_search according to
6878         the nature of the constructor invocation. Don't add `this'
6879         argument when expanding NEW_CLASS_EXPR. Check for illegal method
6880         invocation within the argument scope of explicit constructor
6881         invocation. Set is_static according to is_static_flag. Provide
6882         extra `super' argument to patch_invoke invocation.
6883         (patch_invoke): New argument from_super. Loop on arguments
6884         indentation fixed. Pass from_super to invocation_mode. New switch
6885         case INVOKE_SUPER. Fixed error message in switch default case.
6886         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
6887         value.
6888         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
6889         (lookup_method_invoke): Fixed prototypes in candidates list. Error
6890         message takes constructors into account.
6891         (find_applicable_accessible_methods_list): Fixed indentation.
6892         (qualify_ambiguous_name): Take explicit constructor invocation
6893         into account. Deal with a conditional expression as a primary to
6894         a method call.
6895         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
6896         case. Added extra argument to patch_method_invocation_stmt.
6897         Register calls made to explicit constructor `this'. Don't call
6898         save_expr in ARRAY_REF case when emitting class files. Check for
6899         illegal use of this when expanding explicit constructor invocation
6900         arguments.
6901         (complete_function_arguments): Set and reset parser context
6902         explicit_constructor_p field value when appropriate.
6903         (build_super_invocation, build_this_super_qualified_invocation):
6904         New functions.
6905         (patch_assignment): Fixed typo.
6906         (patch_unaryop): Check on final fields occurs only when a decl
6907         exits.
6908         (patch_return): Take constructors into account.
6909         (patch_conditional_expr): New function.
6910         * typeck.c (build_java_signature): Removed unnecessary empty line.
6911
6912 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
6913
6914         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
6915
6916 1998-10-28  Tom Tromey  <tromey@cygnus.com>
6917
6918         * decl.c (init_decl_processing): Renamed fields.
6919         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
6920         interface_len, msize fields.
6921
6922         * class.c (make_class_data): Removed subclass_head and
6923         subclass_next fields.
6924         * decl.c (init_decl_processing): Removed subclass_head and
6925         subclass_next fields.
6926
6927 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
6928
6929         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
6930         * mangle.c (emit_unicode_mangled_name): Similarly.
6931
6932 Mon Oct 26 12:17:23 1998  Nick Clifton  <nickc@cygnus.com>
6933
6934         * jcf-parse.c (get_constant): Place braces around code to compute
6935         'd' when REAL_ARITHMETIC is not defined.
6936
6937 Sun Oct 25 14:58:05 1998  H.J. Lu  (hjl@gnu.org)
6938
6939         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
6940         dependency.
6941
6942 1998-10-23  Tom Tromey  <tromey@cygnus.com>
6943
6944         * lang-specs.h: `.zip' files are input to jc1.
6945
6946 Thu Oct 22 23:01:54 1998  Per Bothner  <bothner@cygnus.com>
6947
6948         * jvspecs.c:  Add (but don't enable) support for combining multiple
6949         .class and .java input filenames to a single jc1 invocation.
6950         Add support for -C flag (copile to .class files).
6951         Translate -classpath and -CLASSPATH arguments.
6952         * lang-specs.h:  Don't set %2 spec.
6953
6954 1998-10-22  Tom Tromey  <tromey@cygnus.com>
6955
6956         * jcf-path.c (add_entry): Don't add trailing separator if entry is
6957         a .zip file.
6958         (add_path): Don't add trailing separator to non-empty path
6959         elements.
6960
6961         * lang.c (lang_decode_option): Check for -fclasspath and
6962         -fCLASSPATH before examining other `-f' options.
6963
6964         * java-tree.h (finalize_identifier_node): Don't declare.
6965         * class.c (make_class_data): Don't push "final" field.
6966         * decl.c (init_decl_processing): Don't push "final" field.
6967         (finalize_identifier_node): Removed.
6968         (init_decl_processing): Don't set finalize_identifier_node.
6969
6970         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
6971
6972 Sun Oct 11 10:31:52 1998  Anthony Green  <green@cygnus.com>
6973
6974         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
6975         (JV_SCAN_SOURCES): New macro.
6976         (JCF_DUMP_SOURCES): Likewise.
6977         (jcf-dump$(exeext)): New target.
6978         (jv-scan$(exeext)): New target.
6979
6980 1998-10-22  Tom Tromey  <tromey@cygnus.com>
6981
6982         * Makefile.in (LEX): Removed.
6983         (LEXFLAGS): Likewise.
6984         (SET_BISON): New macro.
6985         (BISON): Removed.
6986         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
6987         spurious diffs in parse.c.
6988         ($(PARSE_SCAN_C)): Likewise.
6989         (PARSE_DIR): New macro.
6990         (PARSE_C): Use it.
6991         (PARSE_SCAN_C): Likewise.
6992         (PARSE_RELDIR): New macro.
6993
6994         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
6995
6996         * jcf-io.c (find_class): Use saw_java_source to determine when to
6997         look for `.java' file.
6998         * jcf-parse.c (saw_java_source): New global.
6999         (yyparse): Set it if `.java' file seen.
7000
7001         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
7002         (GCJH_SOURCES): Likewise.
7003         * Makefile.in (datadir): New macro.
7004         (libjava_zip): Likewise.
7005         (JAVA_OBJS): Added jcf-path.o.
7006         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
7007         (../gcjh$(exeext)): Likewise.
7008         (jcf-path.o): New target.
7009         * java-tree.h (fix_classpath): Removed decl.
7010         * jcf-parse.c (fix_classpath): Removed.
7011         (load_class): Don't call fix_classpath.
7012         * parse.y (read_import_dir): Don't call fix_classpath.
7013         * lex.h: Don't mention classpath.
7014         * lex.c (java_init_lex): Don't initialize classpath.
7015         * jcf-io.c (classpath): Removed global.
7016         (find_class): Use jcf_path iteration functions.  Correctly search
7017         class path for .java file.
7018         (open_in_zip): New argument `is_system'.
7019         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
7020         classpath-related options.
7021         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
7022         and -I.
7023         (lang_init): Call jcf_path_init.
7024         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
7025         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
7026         Correctly put braces around second string in each entry.
7027         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
7028         classpath-related options.
7029         (help): Updated for new options.
7030         * jcf.h: Declare functions from jcf-path.c.  Don't mention
7031         `classpath' global.
7032         * jcf-path.c: New file.
7033
7034         * jcf-depend.c: Include jcf.h.
7035
7036         * jcf-write.c (localvar_alloc): Returns `void'.
7037         (localvar_free): Removed unused variable.
7038
7039         * lang.c (OBJECT_SUFFIX): Define if not already defined.
7040         (init_parse): Use OBJECT_SUFFIX, not ".o".
7041
7042 Wed Oct 21 07:54:11 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7043
7044         * class.c (emit_register_classes): Renamed from
7045         emit_register_class.
7046         * java-tree.h (emit_register_classes): Prototype renamed from
7047         emit_register_class.
7048         * jcf-parse.c (yyparse): Call emit_register_classes once before
7049         returning.
7050         * parse.y (java_expand_classes): No longer register classes.
7051
7052 Tue Oct 20 09:15:38 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7053
7054         * class.c (is_compiled_class): New local variable
7055         seen_in_zip. Identify classes found in currently compiled source
7056         file(s).
7057         * decl.c (complete_start_java_method): Fixed typo.
7058         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
7059         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
7060         (CLASS_P): Moved around.
7061         (java_parse_abort_on_error): Macro moved from jcf-parse.c
7062         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
7063         java-parse.h
7064         (jcf_parse_source): Changed leading comment. Removed unnecessary
7065         fclose and CLASS_FROM_SOURCE_P marking.
7066         (parse_source_file): New local variables remember_for_generation
7067         and filename. Mark parsed file name identifier node. Removed block
7068         executed when parse_only was null. Set remember_for_generation.
7069         Use it as an argument to java_pop_parser_context.
7070         (yyparse): New local variables several_files, list, next node and
7071         current_file_list. Split ampersand separated file names into
7072         current_file_list. Iterate through the list and parse accordingly.
7073         * parse.h (java_pop_parser_context): New function prototype.
7074         * parse.y (ctxp_for_generation): New static global variable.
7075         (java_pop_parser_context): New argument generate. Link popped ctxp
7076         to ctxp_for_generation list accordingly.
7077         (java_complete_expand_methods): Fixed indentation.
7078         (java_expand_classes): New function.
7079
7080 Sat Oct 17 11:25:21 1998  Per Bothner  <bothner@cygnus.com>
7081
7082         * Makefile.in:  Link with libiberty.a instead of memmove.o.
7083
7084 Fri Oct 16 10:59:01 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7085
7086         * lex.c (setjmp.h): No longer included.
7087         * lex.h (setjmp.h): Included.
7088         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
7089         (duplicate_declaration_error_p): Renamed from
7090         duplicate_declaration_error.
7091         (build_array_from_name): New function prototype.
7092         * parse.y (setjmp.h): No longer included.
7093         (variable_declarator_id): Define action.
7094         (build_array_from_name): New function.
7095         (duplicate_declaration_error_p): Renamed from
7096         duplicate_declaration_error.  Fixed leading comment.
7097         (register_fields): Main `for' loop reorganized. Uses
7098         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
7099         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
7100         build_array_from_name.
7101         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
7102         types.
7103         (read_import_dir): Don't try to skip `.' and `..'.
7104         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
7105         build_array_from_name. Main `for' loop reorganized.
7106         (resolve_qualified_expression_name): When building access to a
7107         field, use the type where the field was found, not its own type.
7108         (maybe_access_field): Use field DECL_CONTEXT if the type where the
7109         field was found is null.
7110         (qualify_ambiguous_name): Sweep through all successive array
7111         dimensions.
7112
7113 Wed Oct 14 18:21:29 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7114
7115         * java-tree.h (pop_labeled_block, lang_printable_name,
7116         maybe_add_interface, set_super_info, get_access_flags_from_decl,
7117         interface_of_p, inherits_from_p, fix_classpath,
7118         complete_start_java_method, emit_handlers, init_outgoing_cpool,
7119         make_class_data, register_class, alloc_name_constant): New
7120         function prototypes.
7121         * lang.c (lang_decode_option): Set argc argument unused. Fixed
7122         indentation. Added cast to remove warning.
7123         (lang_printable_name): Set v argument unused.
7124         (lang_print_error): Added argument to lang_printable_name call.
7125         (java_dummy_print, print_lang_decl, print_lang_type,
7126         print_lang_identifier, lang_print_xnode): All argument marked
7127         unused.
7128         * lex.c (java_unget_unicode): Removed unnecessary argument.
7129         (java_allocate_new_line): Unused local variable is gone.
7130         (java_read_char): Added parenthesis in expressions to remove
7131         warnings.  Added final return statement.
7132         (java_read_unicode): Added parenthesis in expression to remove
7133         warning.
7134         (java_parse_end_comment): Fixed java_unget_unicode invocation.
7135         (java_parse_escape_sequence): Likewise.
7136         (java_lex): Unused local variables are gone. Fixed
7137         java_unget_unicode invocation.
7138         * lex.h (set_float_handler): Prototype added when JC1_LITE not
7139         defined.
7140         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
7141         lang_printable_name invocation in macro.
7142         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
7143         Likewise.
7144         (duplicate_declaration_error): Suppressed unused argument in
7145         prototype.
7146         (identical_subpath_p): Function declaration is gone.
7147         (patch_invoke): Suppressed unused argument in prototype.
7148         (patch_cast, build_labeled_block, check_thrown_exceptions):
7149         Likewise.
7150         * parse.y (setjmp.h): Included
7151         (toplev.h): Likewise.
7152         (field_declaration:): Suppressed unused local
7153         (label_decl:): Fixed build_labeled_block invocation.
7154         (java_pop_parser_context): Put extra parenthesis around assignment
7155         in if.
7156         (yyerror): Suppressed unused local variables.
7157         (variable_redefinition_error): Fixed lang_printable_name
7158         invocation.
7159         (create_interface): Suppressed unused local variables.
7160         (create_class): Likewise.
7161         (duplicate_declaration_error): Suppressed unused argument. Fixed
7162         lang_printable_name invocation.
7163         (register_fields): Suppressed unused local variable. Fixed
7164         duplicate_declaration_error invocation.
7165         (method_header): Suppressed unused local variable.
7166         (method_declarator, parser_check_super): Likewise.
7167         (java_complete_class): Suppressed unused local variable. Fixed
7168         fatal error message.
7169         (complete_class_report_errors): Added default: in switch.
7170         (java_check_regular_methods): Fixed lang_printable_name
7171         invocations.
7172         (check_throws_clauses): Likewise.
7173         (java_check_abstract_methods): Suppressed unused local
7174         variable. Fixed lang_printable_name invocation.
7175         (read_import_entry): Added supplemental return statement.
7176         (read_import_dir): Suppressed unused local variables.
7177         (check_pkg_class_access, declare_local_variables): Likewise.
7178         (source_start_java_method): Suppressed unused extern variable
7179         declarations
7180         (expand_start_java_method): Suppressed unused extern and local
7181         variable declarations.
7182         (java_complete_expand_methods): Likewise.
7183         (java_complete_expand_method): Suppressed unused local variables.
7184         (make_qualified_name): Likewise.
7185         (resolve_qualified_expression_name): Added default: in
7186         switch. Fixed lang_printable_name invocation.
7187         (class_instance_creation_expression): Added parenthesis around
7188         expressions.
7189         (patch_method_invocation_stmt): Fixed lang_printable_name and
7190         patch_invoke invocations.
7191         (check_for_static_method_reference): Fixed lang_printable_name
7192         invocation.
7193         (patch_invoke): Suppressed unused arguments and local variables.
7194         (lookup_method_invoke): Suppressed unused local variables.
7195         (qualify_ambiguous_name): Added default: in switch.
7196         (identical_subpath_p): Function removed.
7197         (patch_assignment): Suppressed unused local variables. Suppressed
7198         unnecessary if statement. Fixed lang_printable_name invocations.
7199         (try_builtin_assignconv): Fixed lang_printable_name invocations.
7200         (valid_ref_assignconv_cast_p): Parenthesis around
7201         expression. Suppressed unused local variables.
7202         (build_binop): Suppressed unused local variables. fixed
7203         lang_printable_name invocations.
7204         (string_constant_concatenation): Suppressed unused local
7205         variables.
7206         (patch_unaryop): Fixed lang_printable_name invocation.
7207         (patch_cast): Suppressed unnecessary argument. Fixed
7208         lang_printable_name invocation.
7209         (patch_array_ref): Fixed lang_printable_name invocation.
7210         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
7211         (build_labeled_block): Suppressed unused argument.
7212         (generate_labeled_block): Fixed build_labeled_block invocation.
7213         (build_loop_body): Suppressed unused local variables.
7214         (patch_loop_statement): Likewise.
7215         (patch_exit): Fixed lang_printable_name invocation.
7216         (patch_switch_statement): Likewise.
7217         (case_identity): First argument marked unused.
7218         (patch_try_statement): Fixed lang_printable_name invocations.
7219         (patch_synchronized_statement, patch_throw_statement): Likewise.
7220         (check_thrown_exceptions): Fixed check_thrown_exceptions and
7221         lang_printable_name invocations.
7222         (check_thrown_exceptions_do): Suppressed unused argument.
7223
7224 1998-10-14  Tom Tromey  <tromey@cygnus.com>
7225
7226         * jcf-write.c (write_classfile): Add output class file as target.
7227         * lang-options.h: Added -MD, -MMD, -M, and -MM.
7228         * jcf.h: Added declarations for dependency-tracking functions.
7229         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
7230         * lang.c (lang_decode_option): Recognize -MD and -MMD.
7231         (finish_parse): Call jcf_dependency_write.
7232         (dependency_tracking): New global.
7233         (DEPEND_SET_FILE): New define.
7234         (DEPEND_ENABLE): New define.
7235         (init_parse): Enable dependency tracking if required.
7236         Include "flags.h".
7237         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
7238         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
7239         (../gcjh$(exeext)): Likewise.
7240         (jcf-depend.o): New target.
7241         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
7242         (GCJH_SOURCES): Likewise.
7243         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
7244         dep_name argument.
7245         (find_classfile): Added dep_name argument.
7246         (find_class): Compute name of dependency.
7247         (open_in_zip): Call jcf_dependency_add_file.
7248         * gjavah.c (output_file): No longer global.
7249         (usage): Don't mention "gjavah".
7250         (help): Likewise.
7251         (java_no_argument): Likewise.
7252         (version): Likewise.
7253         (main): Recognize and handle -M family of options.
7254         (print_mangled_classname): Return is void.
7255         (process_file): Handle case where output is suppressed.
7256         (HANDLE_END_FIELD): Likewise.
7257         (HANDLE_METHOD): Likewise.
7258         * jcf-depend.c: New file.
7259
7260 Tue Oct 13 23:34:12 1998  Jeffrey A Law  (law@cygnus.com)
7261
7262         * java-tree.def: Add missing newline at EOF.
7263
7264 1998-10-13  Tom Tromey  <tromey@cygnus.com>
7265
7266         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
7267         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
7268         function.
7269         Include <config.h> and "system.h".
7270         (disassemble_method): Undefine RET to avoid clash with
7271         config/i386/i386.h.
7272
7273 Tue Oct 13 03:50:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7274
7275         * decl.c (runtime_exception_type_node, error_exception_type_node):
7276         New global variables.
7277         (init_decl_processing): Initialized.
7278         * expr.c (java_lang_expand_expr): Set caught exception type to
7279         null if catch handler argument doesn't exit.
7280         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
7281         tree codes.
7282         * java-tree.h (runtime_exception_type_node,
7283         error_exception_type_node): Global variables declared.
7284         (DECL_FUNCTION_THROWS): New macro.
7285         (DECL_FUNCTION_BODY): Modified comment.
7286         (DECL_SPECIFIC_COUNT): Likewise.
7287         (struct lang_decl): New field throws_list.
7288         (IS_UNCHECKED_EXPRESSION_P): New macro.
7289         * lex.c (java_lex): Generate location information for THROW_TK.
7290         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
7291         EXCEPTIONS_P): New macros.
7292         (enum jdep_code): New value JDEP_EXCEPTION.
7293         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
7294         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
7295         PATCH_METHOD_RETURN_ERROR): New macros.
7296         (patch_method_invocation_stmt): Added new argument to prototype.
7297         (patch_synchronized_statement, patch_throw_statement,
7298         check_thrown_exceptions, check_thrown_exceptions_do,
7299         purge_unchecked_exceptions, check_throws_clauses): New function
7300         prototypes.
7301         * parse.y Fixed typo in keyword section.
7302         (throw:): Rule tagged <node>.
7303         (THROW_TK): Keyword tagged <operator>.
7304         (method_header:): Last argument to call to method_header passed
7305         from throws: rule.
7306         (throws:, class_type_list:, throw_statement:,
7307         synchronized_statement:, synchronized:): Defined actions.
7308         (method_header): New local variable current. Register exceptions
7309         from throws clause.
7310         (java_complete_tree): Complete and verify exceptions from throws
7311         clause.
7312         (complete_class_report_errors): Error message on exceptions not
7313         found
7314         (java_check_regular_methods): Fixed typo. Shortcut on private
7315         overriding methods. Changed error message on method
7316         redefinition. Check for throws clause compatibility.
7317         (check_throws_clauses): New function.
7318         (java_check_abstract_methods): Use DECL_NAME for wfl or current
7319         method. Changed error message on method redefinition.
7320         (currently_caught_type_list): New static variable.
7321         (java_complete_expand_methods): Purge unchecked exceptions from
7322         throws clause list. Call PUSH_EXCEPTIONS before walk and
7323         POP_EXCEPTIONS after.
7324         (resolve_qualified_expression_name): Pass new argument as NULL to
7325         patch_method_invocation_stmt.
7326         (patch_method_invocation_stmt): New argument ref_decl. Invoke
7327         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
7328         argument list when appropriate. Use new argument if non null to
7329         store selected method decl.
7330         (patch_invoke): Convert if necessary args of builtin types before
7331         forming CALL_EXPR. Argument list no longer reversed here.
7332         (invocation_mode): Treat final methods as static methods.
7333         (java_complete_tree): New cases for THROW_EXPR: and
7334         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
7335         function call.
7336         (complete_function_arguments): No more RECORD_TYPE
7337         conversion. Function parameter nodes no longer saved.
7338         (valid_ref_assignconv_cast_p): Avoid handling null type.
7339         (patch_binop): Fixed null constant reference handling.
7340         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
7341         BUILD_THROW macros.
7342         (patch_try_statement): Fixed comments. Record caught types in
7343         list, push the list, expand try block and pop the list.
7344         (patch_synchronized_statement, patch_throw_statement,
7345         check_thrown_exceptions, check_thrown_exceptions_do,
7346         purge_unchecked_exceptions): New functions.
7347         * typeck.c (lookup_argument_method): Allow WFL in place of method
7348         DECL_NAME during method definition check
7349
7350 1998-10-09  Tom Tromey  <tromey@cygnus.com>
7351
7352         * gjavah.c (decode_signature_piece): New function.
7353         (print_c_decl): Use it.  Added `name_override' argument.
7354         (print_method_info): Use name_override argument to print_c_decl.
7355         (seen_fields): Removed.
7356         (print_field_info): Don't update seen_fields.
7357         (struct method_name): New structure.
7358         (method_name_list): New global.
7359         (print_method_info): Add new method to list of methods.
7360         (name_is_method_p): New function.
7361         (print_field_info): If field name has same name as method, then
7362         change field name.
7363         (process_file): Parse methods before fields.
7364         (field_pass): New global.
7365         (HANDLE_END_FIELD): Take field_pass into account.
7366
7367 Wed Oct  7 12:10:48 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7368
7369         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
7370         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
7371
7372 Sat Oct  3 13:29:46 1998  Anthony Green  <green@cygnus.com>
7373
7374         * jvspec.c: Fix bug in jvgenmain_spec patch.
7375
7376 Fri Oct  2 17:22:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7377
7378         * Makefile.in (lang.o:): Install dependency on java-tree.def.
7379         * decl.c (soft_exceptioninfo_call_node): New global variable.
7380         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
7381         takes extra integer argument. soft_exceptioninfo_call_node
7382         initialized.
7383         * except.c (java_set_exception_lang_code): New function
7384         (method_init_exceptions): Called here.
7385         (prepare_eh_table_type): New function.
7386         (expand_end_java_handler): Called here.
7387         * expr.c (build_java_throw_out_of_bounds_exception): Now features
7388         one argument. Modified generation of call to
7389         soft_badarrayindex_node to use new argument.
7390         (build_java_arrayaccess): Pass faulty index value to
7391         build_java_throw_out_of_bounds_exception.
7392         (generate_name): New function.
7393         (java_lang_expand_expr): New local variables node, current,
7394         has_finally_p. Expand TRY_EXPR node.
7395         (process_jvm_instruction): Replace top of the stack with thrown
7396         object reference when entering exception handler.
7397         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
7398         specific tree codes.
7399         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
7400         global.
7401         (DECL_SPECIFIC_COUNT): New macro.
7402         (prepare_eh_table_type, java_set_exception_lang_code,
7403         generate_name): New function declarations.
7404         (match_java_method): Declaration deleted.
7405         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
7406         macros.
7407         * lex.c (TRY_TK, CATCH_TK): Generate location information.
7408         * parse.h (redefinition_error, refine_accessible_methods_list,
7409         can_cast_to_p): Function declaration removed.
7410         (classitf_redefinition_error, variable_redefinition_error,
7411         parse_jdk1_1_error, find_applicable_accessible_methods_list,
7412         find_most_specific_methods_list, argument_types_convertible,
7413         enter_a_block, valid_builtin_assignconv_identity_widening_p,
7414         valid_cast_to_p, valid_method_invocation_conversion_p,
7415         try_reference_assignconv, add_stmt_to_compound,
7416         build_jump_to_finally, build_tree_list, patch_try_statement,
7417         java_get_catch_block): New function declarations.
7418         * parse.y (string_buffer_type): Global variable deleted.
7419         (group_of_labels, catches, catch_clause, catch_clause_parameter,
7420         finally): Rules tagged <node>.
7421         (TRY_TK, CATCH_TK): Token tagged <operator>.
7422         (class_body_declaration:, class_member_declaration:,
7423         formal_parameter:, explicit_constructor_invocation:,
7424         interface_member_declaration:, constant_declaration:,
7425         primary_no_new_array:, class_instance_creation_expression:,
7426         array_creation_expression:): Issue error on unsuported JDK1.1
7427         features.
7428         (try_statement:, catches:, finally:): Define actions.
7429         (catch_clause_parameter): New rule.
7430         (catch_clause:): Use new rule catch_clause_parameter.
7431         (parse_jdk1_1_error): New function.
7432         (redefinition_error): Renamed classitf_redefinition_error.
7433         (variable_redefinition_error): New function.
7434         (check_class_interface_creation): Call
7435         classitf_redefinition_error.
7436         (java_complete_tree): Added error message on JDEP_TYPE: case.
7437         (complete_class_report_errors): Fixed indentation.
7438         (declare_local_variables): Call variable_redefinition_error.
7439         (source_end_java_method): Call java_set_exception_lang_code and
7440         emit_handlers where appropriate.
7441         (java_method_add_stmt): Call add_stmt_to_block.
7442         (add_stmt_to_block): New function.
7443         (lookup_method_invoke): Fixed outside comment. new local variable
7444         candicates.  Call find_applicable_accessible_methods_list and
7445         find_most_specific_methods_list when searching for a
7446         method. Modified error report to list possible candidates when
7447         applicable.
7448         (find_applicable_accessible_methods_list,
7449         find_most_specific_methods_list, argument_types_convertible): New
7450         function.
7451         (refine_accessible_methods_list): Function deleted.
7452         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
7453         expr (if applicable) before calling patch_array_ref.
7454         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
7455         (enter_block): Fixed comment.
7456         (enter_a_block): New function.
7457         (patch_assignment): Reorganized. Call try_reference_assignconv for
7458         references. Call valid_cast_to_p instead of can_cast_to_p.
7459         (try_reference_assignconv,
7460         valid_builtin_assignconv_identity_widening_p): New functions.
7461         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
7462         (valid_cast_to_p, valid_method_invocation_conversion_p): New
7463         functions.
7464         (build_string_concatenation): Don't resolve StringBuffer.
7465         (patch_cast): Fixed inverted arguments.
7466         (patch_array_ref): Code to save array expr deleted. Call
7467         valid_cast_to_p instead of can_cast_to_p.
7468         (generate_labeled_block): Call generate_name.
7469         (build_jump_to_finally, build_try_statement, java_get_catch_block,
7470         patch_try_statement): New functions.
7471         * typeck.c (match_java_method): Function deleted.
7472
7473 Fri Oct  2 13:48:36 1998  Anthony Green  <green@cygnus.com>
7474
7475         * jvspec.c: jvgenmain_spec uses different temporary file names.
7476
7477 Fri Oct  2 12:50:19 1998  Anthony Green  <green@cygnus.com>
7478
7479         * jvspec.c (lang_specific_driver): Fail if user specifies
7480         --main= when not linking.
7481
7482 Mon Sep 28 13:48:33 1998  Tom Tromey  <tromey@cygnus.com>
7483
7484         * class.c (make_class_data): Push value for `thread' field.
7485         * decl.c (init_decl_processing): Added `thread' field to class.
7486
7487         * class.c (add_field): Always make static fields externally
7488         visible.
7489
7490 Sat Sep 26 08:22:47 1998  Anthony Green  <green@cygnus.com>
7491
7492         * expr.c (build_java_athrow,
7493         build_java_throw_out_of_bounds_exception, expand_invoke,
7494         build_newarray, expand_java_multianewarray, build_java_monitor):
7495         Update comments to reflect _Jv_* function names.
7496
7497 Fri Sep 25 16:03:02 1998  Per Bothner  <bothner@cygnus.com>
7498
7499         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
7500         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
7501         * parse.y (expand_start_java_method):  Likewise.
7502
7503 Thu Sep 24 12:20:35 1998  Per Bothner  <bothner@cygnus.com>
7504
7505         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
7506
7507         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
7508         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
7509         * expr.c:  Remove no-longer-needed calls to promote_type.
7510         * decl.c (give_name_to_locals):  Liekwise.
7511         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
7512         * parse.y:  Add/remove promote_type calls as appropriate.
7513         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
7514         (parse_signature_string):  Likewise.
7515         (build_java_array_type):  Fix for now signature convenions.
7516
7517         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
7518
7519 Wed Sep 23 14:49:35 1998  Tom Tromey  <tromey@cygnus.com>
7520
7521         * class.c (init_class_processing): libjava function renamed to
7522         _Jv_RegisterClass.
7523
7524 Tue Sep 22 12:00:02 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7525
7526         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
7527         * java-tree.def: Fixed DEFTREECODE third argument.
7528         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
7529         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
7530         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
7531         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
7532         JAVA_THIS_EXPR): Now replaced by tree code definitions.
7533         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
7534         * lang.c (java_tree_code_type, java_tree_code_length,
7535         java_tree_code_name): New arrays.
7536         (lang_init): Append Java tree node definitions to Gcc ones.
7537         * lex.c (expression_obstack): Declared as extern when JC1_LITE
7538         defined.
7539         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
7540         wfl_to_string.
7541         (java_lex): Allow declaration of empty string constants. Retain
7542         location information on CASE_TK and DEFAULT_TK.
7543         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
7544         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
7545         Modified to be more robust.
7546         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
7547         (build_new_invocation, try_builtin_assignconv,
7548         patch_switch_statement, string_constant_concatenation,
7549         build_string_concatenation, patch_string_cst, patch_string,
7550         java_expand_switch): New function declarations.
7551         * parse.y: Rules related to switch and EH tagged <node>.
7552         (label_id): Set to NULL_TREE
7553         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
7554         tree nodes.
7555         (this_or_super:): Fixed indentation.
7556         (statement:, statement_nsi:, statement_without_trailing_substatement:,
7557         statement_expression:): Removed call to RULE on all sub-rules.
7558         (switch_expression:, switch_labels:): New rules.
7559         (switch_statement:, switch_block:, switch_block_statement_groups:,
7560         switch_block_statement_group:, switch_labels:, switch_label:):
7561         Defined actions.
7562         (throw_statement:, synchronized_statement:, try_statement:):
7563         Defined temporary actions.
7564         (class_instance_creation_expression:): Call
7565         build_new_invocation. Fixed indentation.
7566         (field_access): Fixed indentation.
7567         (method_invocation): Likewise.
7568         (make_qualified_primary): Use THIS_EXPR.
7569         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
7570         resolving from SUPER, set *type_found.
7571         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
7572         (java_complete_tree): Removed unused local variable `location'. Case
7573         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
7574         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
7575         on MODIFY_EXPR: and all binary operator tree code cases. Removed
7576         STRING_CST: case. default: checks for patchable strings.
7577         (complete_function_arguments): Transform string constant or
7578         crafted StringBuffer if necessary.
7579         (build_method_invocation): Fixed comments.
7580         (build_new_invocation): New function.
7581         (patch_assignment): Call try_builtin_assignconv to figure a valid
7582         assignment conversion between builtin types.
7583         (try_builtin_assignconv): New function.
7584         (build_binop): Use URSHIFT_EXPR directly to call build.
7585         (operator_string): Use UNARY_PLUS_EXPR.
7586         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
7587         operator.
7588         (do_merge_string_cste, merge_string_cste,
7589         string_constant_concatenation, build_string_concatenation,
7590         patch_string, patch_string_cst): New function.
7591         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
7592         (patch_unaryop): Likewise. New test of valid ++/-- operands.
7593         (build_newarray_node): Use NEW_ARRAY_EXPR.
7594         (build_this): Use THIS_EXPR.
7595         (build_return): Enable debug information on return statement.
7596         (build_if_else_statement): Likewise.
7597         (complete_labeled_statement): Fixed related comment.
7598         (build_loop_body): Fixed comment.
7599         (build_bc_statement): Enable debug information on break/continue
7600         statements.
7601         (patch_bc_statement): Fixed typos. Handle SWITCH statement
7602         context.
7603         (patch_switch_statement, case_identity, java_expand_switch): New
7604         functions.
7605
7606 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
7607
7608         * buffer.h (BUFFER_INIT):  New macro.
7609         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
7610         Pass (struct jcf_partial *state) to most functions.
7611         (jcf_block, jcf_relocation):  New types.
7612         Support labels, branches, conditionals, loops.
7613
7614 Mon Sep 21 15:08:48 1998  Tom Tromey  <tromey@cygnus.com>
7615
7616         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
7617
7618 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
7619
7620         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
7621         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
7622         not integer_type_node (INT_TYPE_SIZ bits).
7623
7624         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
7625
7626         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
7627         * jcf-dump.c (print_exception_table):  New function.
7628         (disassemble_method):  Better handling of wide instructions.
7629         Make more robust for bad input.
7630
7631 Wed Sep 30 20:53:51 1998  Jeffrey A Law  (law@cygnus.com)
7632
7633         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
7634         FreeBSD.
7635
7636 Thu Sep 17 19:45:01 1998  Jeffrey A Law  (law@cygnus.com)
7637
7638         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
7639
7640 Thu Sep 17 16:21:52 1998  Tom Tromey  <tromey@cygnus.com>
7641
7642         * Makefile.in ($(PARSE_H)): Removed target.
7643
7644 Thu Sep 17 01:57:07 1998  Jeffrey A Law  (law@cygnus.com)
7645
7646         * Makefile.in (JAVA_OBJS): Add memmove.o
7647         (memmove.o): New target & rules.
7648
7649 Tue Sep 15 23:21:55 1998  Tom Tromey  <tromey@cygnus.com>
7650
7651         * expr.c (expand_invoke): Don't generate a call to the class init
7652         code.
7653
7654 Mon Sep 14 10:14:47 1998  Jeffrey A Law  (law@cygnus.com)
7655
7656         * Makefile.in: Add many missing dependencies.
7657         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
7658         as appropriate.
7659         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
7660         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
7661
7662 Fri Sep 11 14:05:21 1998  Per Bothner  <bothner@cygnus.com>
7663
7664         * decl.c (complete_start_java_method):  If method is static (and
7665         not private) call _Jv_InitClass.
7666         * expr.c (expand_invoke):  Don't call build_class_init.
7667
7668         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
7669
7670 Thu Sep 10 10:33:31 1998  Jeffrey A Law  (law@cygnus.com)
7671
7672         * Make-lang.in (GCJ): Define before using.
7673
7674 Wed Sep  9 21:23:10 1998  Jeffrey A Law  (law@cygnus.com)
7675
7676         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
7677         losing due to namespace pollution in GNU getopt.h
7678
7679 Wed Sep  9 13:33:39 1998  Tom Tromey  <tromey@cygnus.com>
7680
7681         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
7682         (java.all.cross): Likewise.
7683         (java.rest.encap): Likewise.
7684
7685 Tue Sep  8 10:34:05 1998  Jeffrey A Law  (law@cygnus.com)
7686
7687         * gjavah.c (print_class_decls): Fix thinko in arglist
7688         * jcv-io.c (find_classfile): Similarly.
7689
7690 Mon Sep  7 13:59:49 1998  Jeffrey A Law  (law@cygnus.com)
7691
7692         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
7693
7694 Sat Sep  5 16:08:01 1998  Tom Tromey  <tromey@cygnus.com>
7695
7696         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
7697         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
7698         * Makefile.in (PARSE_C): New macro.
7699         (PARSE_H): Likewise.
7700         (PARSE_SCAN_C): Likewise.
7701         ($(PARSE_C)): Target renamed from parse.c.
7702         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
7703         (clean): Remove parse-scan.c as well.
7704         (parse.o): Depend on $(PARSE_C).
7705
7706 Sat Sep  5 08:48:40 1998  Anthony Green  <green@cygnus.com>
7707
7708         * README, license.terms: Removed.
7709
7710         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
7711         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
7712         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
7713         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
7714         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
7715         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
7716         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
7717         and Java trademark attribution.
7718
7719 Fri Sep  4 10:42:05 1998  Tom Tromey  <tromey@cygnus.com>
7720
7721         * Makefile.in: Use gcjh, not gjavah.
7722         * config-lang.in (stagestuff): Use gcjh, not gjavah.
7723         * Make-lang.in: Changed gjavah to gcjh everywhere.
7724
7725 Thu Sep  3 18:04:09 1998  Per Bothner  <bothner@cygnus.com>
7726
7727         * gjavah.c:  Support new -prepend -add -append flags.
7728         (print_method_info):  Method is not virtual if class is final.
7729
7730 Thu Sep  3 12:03:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7731
7732         * jv-scan.c: Fixed copyright assignment.
7733         * keyword.gperf: Likewise.
7734         * keyword.h: Likewise.
7735         * lex.c: Fixed copyright assignment.
7736         (java_lex): Push unicode back when parsing '<'.
7737         * lex.h: Fixed copyright assignment.
7738         * parse-scan.y: Likewise.
7739         * parse.h: Fixed copyright assignment.
7740         (build_debugable_stmt, complete_for_loop): New function prototypes.
7741         * parse.y: Fixed copyright assignment.
7742         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
7743         size_zero_node when completing a loop with no exit condition.
7744         (for_statement_nsi:): Define action.
7745         (for_init:, for_update:): Return size_zero_node when empty.
7746         (declare_local_variables): Call build_debugable_stmt.
7747         (build_debugable_stmt): New function.
7748         (build_loop_body): Build debugable statement around loop
7749         condition part.
7750         (complete_loop_body): Take into account the debugable statement
7751         around the EXIT_EXPR.
7752         (complete_loop_body): New function.
7753         (patch_exit_expr): Fixed condition inversion.
7754
7755 Wed Sep  2 11:53:58 1998  Tom Tromey  <tromey@cygnus.com>
7756
7757         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
7758         name of thread define.
7759         * jvspec.c (THREAD_NAME): New macro.
7760         (GCLIB): Likewise.
7761         (THREADLIB): Likewise.
7762         (lang_specific_driver): Recognize attempt to link with thread
7763         library or gc library.  Recognize -ljava on command line so it
7764         isn't linked against more than once.
7765
7766 Wed Sep  2 11:28:35 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7767
7768         * parse-scan.y (report_main_declaration): Name of the class
7769         containing `main' can be a qualified name.
7770
7771 Mon Aug 31 13:25:58 1998  Tom Tromey  <tromey@cygnus.com>
7772
7773         * config-lang.in: Changed gjavac to gjc everywhere.
7774         * Make-lang.in: Changed gjavac to gjc everywhere.
7775
7776 Thu Aug 27 02:28:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7777
7778         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
7779         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
7780         and install the files.
7781         * Makefile.in (JAVA_OBJS_LITE): New variable.
7782         (compiler:): Now include jv-scan as a dependency.
7783         (../jv-scan$(exeext), parse-scan.c): New targets.
7784         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
7785         * config-lang.in (compilers): Removed gcj, gjavah from the list.
7786         * jcf-parse.c (parse_source_file): Call java_layout_classes and
7787         check for errors even if parse_only.
7788         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
7789         defined.
7790         (yylex): New function. Uses java_lex body.
7791         (java_lex): Removed commented out statement. Remove local variable
7792         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
7793         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
7794         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
7795         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
7796         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
7797         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
7798         where appropriate.
7799         (java_lex_error): Empty if JC1_LITE is defined.
7800         (java_get_line_col): Return 0 if JC1_LITE is defined.
7801         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
7802         SET_MODIFIER_CTX): Moved into the section containing the macros
7803         conditionally defined by JC1_LITE.
7804         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
7805         argument if JC1_LITE is defined.
7806         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
7807         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
7808         is defined.
7809         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
7810         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
7811         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
7812         to different values according to JC1_LITE.
7813         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
7814         declared if JC1_LITE set.
7815         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
7816         defined if JC1_LITE not set.
7817         (struct parser_ctx): Reorganized and skip the jc1 front end part
7818         if JC1_LITE set.
7819         (java_layout_classes): New function definition.
7820         (java_push_parser_context, java_init_lex, yyparse, yylex,
7821         yyerror): Prototype always declared. All other static function
7822         prototypes declared only if JC1_LITE is not set.
7823         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
7824         declared in parse.h.
7825         (java_layout_classes): New function.
7826         (java_complete_expand_methods): No longer layout the class here.
7827         * parse-scan.y: New file.
7828         * jv-scan.c: New file.
7829
7830 Tue Aug 25 10:17:54 1998  Tom Tromey  <tromey@cygnus.com>
7831
7832         * gjavah.c (main): Handle -friend option.
7833         (friend_specs): New global.
7834         (generate_access): Handle friend_specs.
7835         (process_file): Likewise.
7836         (MAX_FRIENDS): New macro.
7837         (friend_count): New global.
7838         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
7839         Changed all callers.
7840
7841 Mon Aug 24 20:19:27 1998  Per Bothner  <bothner@cygnus.com>
7842
7843         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
7844         (main):  Handle processing all the entries of a named .zip archive.
7845         * jcf-io.c (jcf_trim_old_input):  New function.
7846         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
7847
7848 Mon Aug 24 07:35:13 1998  Per Bothner  <bothner@cygnus.com>
7849
7850         * lang.c (flag_assume_compiled):  Make default be on.
7851
7852 Fri Aug 21 17:29:04 1998  Per Bothner  <bothner@cygnus.com>
7853
7854         * jcf-dump.c:  Add bunches of flags to control output more.
7855         (process_class):  New function;  support printing more than one class.
7856         (main): Support new --print-main and --javap flags.
7857         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
7858         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
7859
7860 Thu Aug 20 14:24:47 1998  Per Bothner  <bothner@cygnus.com>
7861
7862         Change mangling of dispatch table to match C++ vtable (w/thunks).
7863         * class.c (build_dtable_decl), java-tree.h:  New function.
7864         (make_class_data):  Call it.
7865         * decl.c (init_decl_processing):  Likewise.
7866
7867 Wed Aug 19 17:57:07 1998  Warren Levy  <warrenl@cygnus.com>
7868
7869         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
7870         soft_anewarray; adjust args passed.
7871         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
7872         match _Jv_NewObjectArray.
7873
7874 Wed Aug 19 09:33:23 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7875
7876         * decl.c (push_labeled_block, pop_labeled_block): New functions.
7877         * expr.c (loopup_label): Call create_label_decl.
7878         (create_label_decl): New function.
7879         (java_lang_expand_expr): Call expand_start_bindings with argument
7880         set to zero.
7881         * java-tree.h Added space after PROTO in function declarations
7882         when necessary.
7883         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
7884         (create_label_decl, push_labeled_block): New function
7885         declarations.
7886         * lex.c (label_id): Initialize.
7887         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
7888         switch.
7889         * parse.h Added space after PROTO in function declarations when
7890         necessary.
7891         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
7892         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
7893         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
7894         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
7895         macros.
7896         (struct parser_ctxt): New fields current_loop,
7897         current_labeled_block.
7898         (build_if_else_statement, patch_if_else_statement,
7899         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
7900         generate_labeled_block, complete_labeled_statement,
7901         build_bc_statement, patch_bc_statement, patch_loop_statement,
7902         build_new_loop, build_loop_body, complete_loop_body): New function
7903         declarations.
7904         * parse.y (java_warning_count): New global variable.
7905         (label_id): New static variable.
7906         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
7907         (block:): Return size_zero_node when block is empty.
7908         (empty_statement:): Return size_zero_node.
7909         (statement:): Implement supplemental action when for_statement: is
7910         reduced.
7911         (label_decl:): New rule.
7912         (labeled_statement:): Rewritten using label_decl. Actions
7913         implemented.
7914         (labeled_statement_nsi:): Likewise.
7915         (if_then_statement): Actions implemented.
7916         (while_expression): New rule.
7917         (while_statement:): Rewritten using while_expression. Actions
7918         implemented.
7919         (while_statement_nsi:): Likewise.
7920         (do_statement_begin:): New rule.
7921         (do_statement:): Rewritten using do_statement_begin. Actions
7922         implemented.
7923         (for_statement:): Rewritten using for_begin. Actions implemented.
7924         (for_statement_nsi:): Likewise.
7925         (for_header:, for_begin:): New rules.
7926         (for_init:): Actions implemented.
7927         (statement_expression_list:, break_statement:,
7928         continue_statement:): Likewise.
7929         (yyerror): Count number of issued warning(s).
7930         (java_report_errors): Report error(s) and/or warning(s).
7931         (java_complete_class): Use build_java_argument_signature to
7932         recompute completed method signature.
7933         (java_check_regular_methods): New locals method_wfl and aflags.
7934         Use method_wfl instead of lookup_cl during error reports. Fixed
7935         indentation and modified some error messages. Use
7936         lang_printable_name in method instead of the DECL_NAME. New code
7937         to issue warnings on methods not overriding corresponding methods
7938         private to a different package.
7939         (java_method_add_stmt): Call add_stmt_to_compound.
7940         (add_stmt_to_compound): New function.
7941         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
7942         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
7943         (build_if_else_statement, patch_if_else_statement,
7944         build_labeled_block, generate_labeled_block,
7945         complete_labeled_statement, build_new_loop, build_loop_body,
7946         complete_loop_body, patch_loop_statement, build_bc_statement,
7947         patch_bc_statement, patch_exit_expr): New functions.
7948         * typeck.c (build_java_signature): Build argument signature before
7949         enclosing it in between parenthesis.
7950
7951 Mon Aug 17 17:44:24 1998  Warren Levy  <warrenl@cygnus.com>
7952
7953         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
7954         (JAVA_OBJS): Added reminder comment
7955
7956 Thu Aug 13 10:01:45 1998  Nick Clifton  <nickc@cygnus.com>
7957
7958         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
7959         be interpreted as a long long.
7960
7961 Thu Aug 13 14:34:07 1998  Warren Levy  <warrenl@cygnus.com>
7962
7963         * decl.c (init_decl_processing): Use _Jv_InitClass, not
7964         soft_initialise_class.  Use _Jv_NewMultiArray, not
7965         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
7966         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
7967         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
7968         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
7969
7970 Wed Aug 12 14:23:13 1998  Per Bothner  <bothner@cygnus.com>
7971
7972         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
7973         length_identifier_node):  New global tree node constants.
7974         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
7975         Replace uses by super_identifier_node etc.
7976         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
7977
7978         * parse.y (resolve_field_access):  Don't special-case ".length" if
7979         flag_emit_class_files.
7980         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
7981         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
7982         and ARRAY.length.
7983
7984 Tue Aug 11 11:31:55 1998  Per Bothner  <bothner@cygnus.com>
7985
7986         * decl.c (init_decl_processing): Remove unused method_type_node fields.
7987         * class.c (make_method_value):  Remove init for removed fields.
7988
7989         * class.c (layout_class):  Use build_java_argument_signature.
7990         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
7991
7992         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
7993         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
7994         (build_java_signature):  Don't use push_java_argument_signature.
7995
7996         * typeck.c (lookup_argument_method):  New function.
7997         * parse.y (java_check_regular_methods):  Use lookup_argument_method
7998         instead of lookup_java_method2 followed by lookup_java_method.
7999
8000         * parse.y (check_method_redefinition):  Minor optimization.
8001
8002         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
8003         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
8004
8005 Mon Aug 10 09:57:15 1998  Tom Tromey  <tromey@cygnus.com>
8006
8007         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
8008         c-pragma.o.
8009
8010         * gjavah.c (java_float_finite): Use K&R-style definition.
8011         (java_double_finite): Likewise.
8012         (generate_access): Now returns void.  Changed all callers.
8013         (last_access_generated): Removed.
8014         (process_file): Only make a single pass over the .class file.
8015
8016 Wed Jul 29 17:50:23 1998  Per Bothner  <bothner@cygnus.com>
8017
8018         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
8019         for compatibility for G++ (with -fvtable-thunks).
8020         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
8021
8022         * gjavah.c (process_file):  Use public inheritance for super-class.
8023
8024 Wed Jul 29 13:19:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8025
8026         * lex.c (java_init_lex): Initialize ctxp->package.
8027         * parse.h (struct parser_ctxt): package and package_len replaced
8028         by tree package, an identifier node. Field method_decl_list is
8029         gone. Fixed comments.
8030         (lookup_field_wrapper, merge_qualified_name, not_accessible,
8031         class_in_current_package): New function prototypes.
8032         * parse.y (array_type:): Set class loaded flag on primitive type
8033         arrays.
8034         (package_declaration:): Assign ctxp->package to the
8035         identifier node.
8036         (method_invocation:): Handle invocation of method qualified by
8037         `super'.
8038         (single_type_import_declaration:): Removed ambiguity check.
8039         (java_pop_parser_context): New local variable `next'. Reset and
8040         set IMPORT_CLASSFILE_NAME flags on current and previous import
8041         list.
8042         (java_accstring_lookup): Use new local macro COPY_RETURN.
8043         (lookup_field_wrapper): New function.
8044         (parser_qualified_classname): Use merge_qualified_name.
8045         (parser_check_super_interface): Broaden error message.
8046         (do_resolve_class): Check for qualified class name in the current
8047         compilation unit if appropriate.
8048         (process_imports): Check for already defined classes.
8049         (check_pkg_class_access): Got rid of call to
8050         get_access_flags_from_decl.
8051         (java_complete_expand_methods): Call safe_layout_class based on
8052         the current class size.
8053         (make_qualified_primary): Build a WFL qualification on primary if
8054         none exists.
8055         (merge_qualified_name): New function.
8056         (make_qualified_name): Use merge_qualified_name.
8057         (resolve_expression_name): Use safe_lookup_field.
8058         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
8059         (resolve_qualified_expression_name): Likewise. Check on resolved
8060         element accessibility.
8061         (not_accessible_p, class_in_current_package): New functions.
8062         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
8063         (patch_method_invocation_stmt): Merged common pieces. Check
8064         accessibility of invoked method.
8065         (check_for_static_method_reference): Add returned type in error
8066         message.
8067         (invocation_mode): Get rid of bogus check on PRIVATE methods.
8068         (refine_accessible_methods_list): Merged two conditions in test.
8069         (java_complete_class): Sanity check on stabilize_ref gone.
8070         * zextract.c (read_zip_archive): Cast lseek second argument to long.
8071
8072 Tue Jul 28 21:39:22 1998  Per Bothner  <bothner@cygnus.com>
8073
8074         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
8075
8076 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
8077
8078         * gjavah.c (F_NAN): Removed.
8079         (F_NAN_MASK): New macro.
8080         (F_POSITIVE_INFINITY): Removed.
8081         (F_NEGATIVE_INFINITY): Likewise.
8082         (java_float_finite): Rewrote.
8083         (D_NAN_MASK): Renamed.
8084         (java_double_finite): Rewrote.
8085         (D_POSITIVE_INFINITY): Removed.
8086         (D_NEGATIVE_INFINITY): Likewise.
8087
8088         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
8089         If verbose, print underlying representation of value in hex.
8090
8091 Fri Jul 24 14:14:32 1998  Per Bothner  <bothner@cygnus.com>
8092
8093         * buffer.h, buffer.c:  New files.
8094         * Makefile.in (JAVA_OBJS):  Add buffer.o.
8095
8096         Support locals variables and writing their debug entries to .class.
8097         * jcf-write.c:  Simplify some by user new buffer type.
8098         (vode_buffer_grow):  Removed.
8099         (struct localvar_info):  New type.
8100         (localsvars, localvartable):  New buffers.
8101         (localvar_alloc, localvar_free):  New functions.
8102         (generate_bytecode_insns):  Handle local variables.
8103         (generate_classfile):  Write LocalVariableTable attribute.
8104
8105 Fri Jul 24 13:46:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8106
8107         * jcf-io.c (open_in_zip): Check the zipfile magic number.
8108         * zipfile.h (ZIPMAGIC): New macro.
8109
8110 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
8111
8112         * Makefile.in (gjavah.o): Updated dependencies.
8113         (jcf-dump.o): Likewise.
8114         (all.indirect): Use ../gjavah.
8115         (../gjavah$(exeext)): Likewise.
8116         (clean): Don't remove gjavah.
8117         (clean): Remove parse.c, not java/parse.c.
8118         * Make-lang.in (java): Added gjavah.
8119         (gjavah$(exeext)): New target.
8120         (GJAVAH_SOURCES): New macro.
8121         (java.all.build): Added gjavah.
8122         (java.all.cross): Likewise.
8123         (java.rest.encap): Likewise.
8124         * config-lang.in (compilers, stagestuff): Added gjavah.
8125
8126 Thu Jul 23 18:33:56 1998  Tom Tromey  <tromey@cygnus.com>
8127
8128         * gjavah.c (java_float_finite): New function.
8129         (java_double_finite): Likewise.
8130         (F_POSITIVE_INFINITY): New macro.
8131         (F_NEGATIVE_INFINITY): Likewise.
8132         (F_NAN): Likewise.
8133         (D_POSITIVE_INFINITY): Likewise.
8134         (D_NEGATIVE_INFINITY): Likewise.
8135         (D_NAN): Likewise.
8136         (print_field_info): Use java_float_finite and java_double_finite.
8137
8138 Thu Jul 23 15:28:24 1998  Per Bothner  <bothner@cygnus.com>
8139
8140         * parse.y (method_header):  Name "this" implicit argument.
8141
8142 Wed Jul 22 15:47:30 1998  Per Bothner  <bothner@cygnus.com>
8143
8144         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
8145         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
8146         (put_linenumber):  New function.
8147         (generate_bytecode_insns, generate_classfile):  Write line numbers.
8148
8149 Wed Jul 22 14:39:00 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8150
8151         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
8152         (lookup_name, build_known_method_ref, build_class_init,
8153         build_invokevirtual, invoke_build_dtable, match_java_method,
8154         build_field_ref, pushdecl_force_head, build_java_binop,
8155         binary_numeric_promotion, build_decl_no_layout,
8156         build_java_arrayaccess, build_newarray, build_anewarray,
8157         build_java_array_length_access, build_java_arraynull_check): New
8158         extern function prototypes.
8159         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
8160         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
8161         java-tree.h.
8162         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
8163         to NULL
8164         * jcf.h (jcf_out_of_synch): New extern function prototype.
8165         * parse.h: Static/global function implemented in parse.y
8166         prototyped and declarations moved at the end of the file.
8167         (DECL_P): Check that the argument isn't null.
8168         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
8169         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
8170         (QUAL_DECL_TYPE): New macro.
8171         (PARAMS): Macro definition removed.
8172         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
8173         (return_statement:): Call build_return.
8174         (field_access:): Call make_qualified_primary in sub rule.
8175         (method_invocation:): Build method invocation and call
8176         make_qualified_primary when processing primaries.
8177         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
8178         get_type_from_signature.
8179         (java_check_regular_method): Extra integer 0 argument when calling
8180         lookup_java_method2.
8181         (lookup_java_interface_method2): Extra method DECL argument when
8182         calling lookup_java_interface_method2.
8183         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
8184         COMPOUND_EXPR node.
8185         (java_complete_expand_method): Layout current class iff not
8186         already done. Don't process interface's methods.
8187         (java_complete_expand_method): Use super class only if it
8188         exists. Use current class otherwise.
8189         (make_qualified_primary): New function.
8190         (resolve_expression_name): Process qualified expression or
8191         expression from primary the same way.
8192         (resolve_expression_name): Two last arguments to
8193         resolve_field_access are now NULL_TREEs.
8194         (resolve_field_access): New variable is_static. Local field must
8195         be DECLs. is_static computed on field DECLs only. Append code in
8196         where_found to the field access if necessary. Use QUAL_DECL_TYPE
8197         to initialize field_type.
8198         (resolve_qualified_expression_name): New local variable,
8199         previous_call_static and is_static. Handle primaries with function
8200         calls, casts, array references and `this'. `super' now handled as
8201         `(super_class)this'. Use is_static to clarify boolean expressions.
8202         Added code to handle case where a proper handle is required to
8203         access a field. Use QUAL_DECL_TYPE where applicable.
8204         (maybe_access_field): New function.
8205         (patch_method_invocation_stmt): New arguments primary, where,
8206         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
8207         deleted. Use `where' as a type to search from if specified. Check
8208         for static method reference where forbidden. Append primary or
8209         current_this to the argument list if not calling constructor nor
8210         static methods.
8211         (check_for_static_method_reference): New function.
8212         (patch_invoke): Layout the class on which new is done if
8213         necessary.
8214         (lookup_method_invoke): Changed format to report errors on
8215         methods.
8216         (qualify_ambiguous_name): New local variable this_found. Now
8217         handle things from primaries. Method call are considered
8218         expression names.
8219         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
8220         changed into NULLs.
8221         (not_initialized_as_it_should_p): Comply with the new DECL_P.
8222         (java_complete_tree): New case fo RETURN_EXPR. Process function
8223         call arguments in separate function.
8224         (complete_function_arguments): New function.
8225         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
8226         anymore.
8227         (patch_assignment): Take the return function slot into account as
8228         a RHS. Distinguish assignment from a return.
8229         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
8230         when checking methods in interfaces.
8231         (resolve_type_during_patch): NULL argument to unresolve_type_p
8232         instead of NULL_TREE.
8233         (patch_newarray): Fixed typo in comment.
8234         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
8235         (build_return, patch_return): New functions.
8236         * typeck.c (lookup_java_constructor): Fixed typo in comment.
8237
8238 Tue Jul 21 12:10:04 1998  Per Bothner  <bothner@cygnus.com>
8239
8240         * constants.c (find_name_and_type_constant, find_fieldref_index,
8241         find_methodref_index):  New methods.
8242         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
8243         just return given method.  Also, rename to build_known_method_ref.
8244         (expand_invoke):  Rename call to build_invoke_non_interface.
8245         * java-tree.h, parse.h:  Update prototype.
8246         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
8247         (such as expand_expr_stmt) if flag_emit_class_files.
8248         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
8249         STACK_TARGET, IGNORE_TARGET):  New macros.
8250         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
8251         (generate_bytecode_insn):  New function to generate method's bytecode.
8252         (generate_classfile):  Node generate Code attribute for a method.
8253         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
8254         push_long_const, field_op, adjust_typed_op, maybe_wide):
8255         New functions used by generate_bytecode_insn.
8256
8257         * typeck.c (signature_include_return):  Remove variable.
8258         (push_java_argument_signature, build_java_argument_signature):  New.
8259         (build_java_signature):  Use push_java_argument_signature.
8260         * parse.y:  Use build_java_argument_signature instead of fiddling
8261         with signature_include_return.
8262
8263 Fri Jul 17 09:48:51 1998  Tom Tromey  <tromey@cygnus.com>
8264
8265         * gjavah.c (print_c_decl): Always generate JArray<>* for array
8266         types.
8267
8268         * Makefile.in (all.indirect): Added gjavah$(exeext).
8269         (gjavah$(exeext)): Added $(exeext).
8270         (clean): Likewise.
8271
8272 Thu Jul 16 15:29:20 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8273
8274         * class.c (layout_class): Call to java_layout_parsed_class replace
8275         by safe_layout_class.
8276         * expr.c (build_java_array_length_access): Removed static storage
8277         class in the function definition.
8278         (build_java_arraynull_check): Likewise.
8279         Also fixed typos in two comments.
8280         * lex.c (java_init_lex): Initialize static global kw_length.
8281         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
8282         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
8283         java_lex_error.
8284         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
8285         * parse.h (resolve_no_layout): New static function declaration.
8286         (get_identifier_in_static): Declaration removed.
8287         (java_layout_parsed_class): Function name declaration changed to
8288         safe_layout_class.
8289         (build_newarray_node, patch_newarray, resolve_type_during_patch,
8290         not_initialized_as_it_should_p, build_this): New static function
8291         declarations.
8292         (pushdecl_force_head, build_java_binop, int_fits_type_p,
8293         binary_numeric_promotion, stabilize_reference,
8294         build_decl_no_layout, build_java_arrayaccess): Extern function
8295         declarations moved into their own section.
8296         (build_newarray, build_anewarray, build_java_array_length_access,
8297         build_java_arraynull_check): New extern function declarations.
8298         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
8299         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
8300         fake tree codes.
8301         (CALL_CONSTRUCTOR_P): New macro.
8302         * parse.y (kw_length): New static global tree node.
8303         (return_statement): Tagged <node>.
8304         (RETURN_TK): Tagged <operator>.
8305         (variable_declarator_id:): Build variable declaration with an
8306         empty initialization value if a syntax error was found in the
8307         initialization part of the variable declaration.
8308         (statement_without_trailing_substatement:): return_statement: now
8309         uses the default rule.
8310         (return_statement:): Temporarily fixed to return NULL_TREE.
8311         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
8312         (class_instance_creation_expression:): Class creation rules now
8313         call build_method_invocation upon reduction.
8314         (array_creation_expression:): Rules call build_newarray_node upon
8315         reduction.
8316         (dim_exprs:): Build a list of dimension expressions.
8317         (dim_expr:): Store location of the OSB_TK in the dimension
8318         expression node.
8319         (method_invocation:): Added a new error rule.
8320         (build_unresolved_array_type): WFL argument may also be an array
8321         on a primitive type. Name of the argument changed to reflect this.
8322         (method_declarator): Insert argument type at the beginning of the
8323         argument type list and later reverse the list.
8324         (unresolved_type_p): Argument 'returned' may be optionally
8325         NULL_TREE.
8326         (java_layout_class_from_source): Function renamed
8327         safe_layout_class.
8328         (resolve_and_layout): Now call resolve_no_layout and
8329         safe_layout_class.
8330         (resolve_no_layout): New function.
8331         (purify_type_name): New function.
8332         (complete_class_report_errors): Call purify_type_name during error
8333         report on a type not found.
8334         (process_imports): error_found local variable doesn't need to be
8335         initialized to zero.
8336         (declare_local_variables): New local type_wfl. Fixed typo in error
8337         message. type_wfl assigned to unresolved type and used to register
8338         incomplete type. Build a WFL around the variable initialization
8339         statement so that debug info can be generated on it.
8340         (source_start_java_method): Reverse argument list after they've
8341         been processed.
8342         (current_this): New static global variable.
8343         (java_complete_expand_methods): Set current_this when appropriate.
8344         (resolve_expression_name): Build correct static and non static
8345         field access bearing a simple name.
8346         (resolve_field_access): Resolve the length field of arrays. Handle
8347         f.m() cases.
8348         (patch_method_invocation_stmt): Set the type of the method
8349         invocation to error_mark_node. This value is later overridden by a
8350         valid type, if any. Don't handle qualified constructor invocation
8351         as qualified method invocation. Call lookup_method_invoke with its
8352         new flag. It's no longer necessary to access the selected method
8353         as the value of a tree list. Handle constructor invocation.
8354         (patch_invoke): Reverse argument list when invoking non interface
8355         methods. Insert call to new as the first argument of the
8356         constructor.
8357         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
8358         defined within a final class. Return INVOKE_STATIC if the invoked
8359         method is a constructor.
8360         (lookup_method_invoke): New lc argument is a flag to indicate a
8361         constructor lookup. Now handle constructor lookup. Choose the most
8362         specific method in case several were matching the invocation
8363         requirements. Return a method decl instead of a tree list featuring
8364         one single method decl element.
8365         (refine_accessible_methods_list): New lc flag argument to
8366         indicate that a constructor is being looked up.
8367         (not_initialized_as_it_should_p): New function.
8368         (java_complete_tree): Now process fake tree codes
8369         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
8370         save_expr on resolved function call arguments. Case on
8371         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
8372         (patch_assignment): LHS can be a field access expression. When
8373         dealing with reference, lhs_type is the promoted type of the
8374         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
8375         applicable.
8376         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
8377         (patch_binop): Use not_initialized_as_it_should_p where
8378         applicable.
8379         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
8380         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
8381         where applicable.
8382         (resolve_type_during_patch): New function.
8383         (patch_cast): Call resolve_type_during_patch to resolve type and
8384         report error accordingly.
8385         (patch_array_ref): Use not_initialized_as_it_should_p where
8386         applicable. Array base expression is saved before being
8387         used. Promote the type of an array elements if it contains non
8388         builtin types.
8389         (build_newarray_node, patch_newarray, build_this): New functions.
8390
8391 Thu Jul 16 10:46:47 1998  Tom Tromey  <tromey@cygnus.com>
8392
8393         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
8394         increment it in `for' statement.
8395         (print_field_info): If number is inf or nan, don't print it.
8396         (print_method_info): If method name is `delete', just ignore it.
8397         (print_c_decl): Special-case jstringArray.
8398
8399         * gjavah.c (help): New function.
8400         (no_argument): New function.
8401         (usage): Changed text.
8402         (main): Rewrote argument handling.  Now handles -v, --help,
8403         --version.
8404         (version): New function.
8405         (found_error): New global.
8406         (main): Return found_error.
8407         (generate_access): Set found_error.
8408         (print_c_decl): Likewise.
8409
8410 Wed Jul 15 10:36:27 1998  Tom Tromey  <tromey@cygnus.com>
8411
8412         * gjavah.c (print_c_decl): Don't print "," when examining field.
8413         Skip type name when looking at "[L" types.
8414         (process_file): Now static.
8415         (generate_access): Now returns int.
8416         (last_access_generated): New global.
8417         (process_file): Clear last_access_generated; make multiple passes
8418         over the class.
8419         (print_field_info): Just return if generate_access returns true.
8420         (print_method_info): Likewise.  Also, allow <init> functions to
8421         pass through.
8422         (print_c_decl): Added is_init argument.  Print constructors
8423         properly.
8424         (print_cxx_classname): Use UTF8_GET to extract characters from
8425         string.
8426         (print_base_classname): New function.
8427         (print_class_decls): New function.
8428         (process_file): Use it.
8429         (utf8_cmp): New function.
8430
8431 Mon Jul 13 14:21:47 1998  Nick Clifton  <nickc@cygnus.com>
8432
8433         * lang-options.h: Format changed to match changes in gcc/toplev.c
8434         to implement a --help option.
8435
8436 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
8437
8438         * decl.c (init_decl_processing): Revert change to dtable_type.
8439
8440 Thu Jul  9 18:22:12 1998  Per Bothner  <bothner@cygnus.com>
8441
8442         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
8443
8444 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
8445
8446         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
8447
8448         * lang.c (lang_init): Default flag_exceptions to 1, without
8449         checking to see if it's 2 first.
8450
8451 Wed Jul  8 03:01:32 1998  Jeffrey A Law  (law@cygnus.com)
8452
8453         * constants.c: Include "system.h".
8454         * decl.c: Likewise.
8455         * lang.c (flag_new_exceptions): Get via extern now.
8456         (lang_init_options): New functions.  Turn on flag_new_exceptions.
8457
8458 Tue Jul  7 12:56:48 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8459
8460         * lex.c (java_lex): Return 0 when we see an invalid character in
8461         the input.
8462
8463         * lex.c (java_read_char): Specify extra argument when calling
8464         java_lex_error.
8465         (java_read_unicode, java_parse_end_comment,
8466         java_parse_escape_sequence): Likewise,
8467         (java_lex): Specify extra argument when calling
8468         java_lex_error. Test that IDs are beginning with a legal character
8469         for IDs. Handle invalid characters with an error message and a
8470         call to java_lex_error.
8471         (java_lex_error): Adjust column position by new argument
8472         `forward'. Issue an error even if in the middle of reporting an
8473         other error.
8474
8475 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
8476
8477         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
8478         we don't explicitly put a null pointer when we're copying it.
8479
8480 Tue Jul  7 09:38:38 1998  Tom Tromey  <tromey@cygnus.com>
8481
8482         * gjavah.c (print_cxx_classname): New function.
8483         (super_class_name): Likewise.
8484         (print_super_fields): Removed.
8485         (in_super): Removed.
8486         (print_field_info): Never generate #defines.
8487         (print_c_decl): Changed generated types to match JNI.  No longer
8488         print class name before method name.
8489         (print_method_info): Print "static" before static methods.
8490         Print "virtual" before non-final methods.
8491         (usage): Use exit(1), not exit(-1).
8492         (main): Likewise.
8493         (print_field_info): Use %.17g to print a double.
8494         (last_access): New globals.
8495         (process_file): Initialize last_access.
8496         (usage): Now static.
8497         (ACC_VISIBILITY): New define.
8498         (generate_access): New function.
8499         (print_field_info): Call it.
8500         (print_method_info): Likewise.  Also, generate information for all
8501         methods, not just native methods.  Return void.
8502         (print_c_decl): Return void.
8503         (print_field_info): Return void.
8504
8505 Thu Jul  2 16:53:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8506
8507         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
8508         processing the jc1 grammar file. Prefix bison functions and
8509         variables with java_.
8510         (parse.c): Dependencies on parse.h and lex.h
8511         * expr.c (build_java_arrayaccess): Function now global.
8512         * java-tree.h: Comment reorganized to carry on previous
8513         classification effort.
8514         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
8515         RESOLVE_TYPE_NAME_P): New flags on WFLs.
8516         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
8517         java_parse (new prefix java_ generated by bison).
8518         (java_layout_parsed_class, java_register_parsed_class): Function
8519         call removed.
8520         (yyparse): Removed unnecessary call to init_outgoing_cpool.
8521         * lex.c (static tree wfl_op): Variable deleted.
8522         (java_init_lex): Initialize kw_super and kw_this. Initialize more
8523         ctxp fields to NULL_TREE.
8524         (java_lex): No longer create WFL for operators. Filename caching
8525         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
8526         created as STRING_CST and later expanded. Removed extra argument
8527         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
8528         and SUPER.
8529         (build_wfl_node): Removed code in comments.
8530         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
8531         store token and location data in the current bison token.
8532         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
8533         static/extern function declaration at the beginning of the file.
8534         (struct qualification): Data structure definition deleted.
8535         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
8536         (qualify_ambiguous_name): Function declaration modified. Function
8537         now returns nothing.
8538         (build_array_ref, patch_array_ref, make_qualified_name,
8539         resolve_qualified_expression_name, maybe_generate_clinit,
8540         resolve_field_access): New static function declarations.
8541         (build_java_arrayaccess): New extern function declaration.
8542         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
8543         (CALL_EXPR_PRIMARY): Macro deleted.
8544         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
8545         (struct parser_ctxt): Field initialized_final
8546         removed. non_static_initialized, static_initialized: New fields.
8547         * parse.y (static tree kw_super, static tree kw_this): New global
8548         static.
8549         (%union): tree wfl field of operator member replaced by int
8550         location. WFLs are non longer created for operators.
8551         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
8552         (qualified_name:): Now calls make_qualified_name to build the
8553         identifier.
8554         (type_declaration:): Consider generating <clinit> when class
8555         parsing completed.
8556         (variable_declarator:): Directly build an assignment node when the
8557         variable is initialized when declared.
8558         (this_or_super:): Build a WFL and set current location when THIS
8559         or SUPER are parsed.
8560         (expression_statement:): Wrap statement around a WFL.
8561         (primary_no_new_array:): Fixed typo. Changed value returned by
8562         THIS_TK because of its new type (temporary).
8563         (dim_exprs:): Temporary fix because of OSB_TK's new type.
8564         (field_access:): Build qualified name with SUPER.
8565         (method_invocation:): Fixed returned value because of SUPER's new
8566         type.
8567         (array_access:): Use OSB_TK location information.
8568         (post_increment_expression:, post_decrement_expression:,
8569         unary_expression:, pre_increment_expression:,
8570         pre_decrement_expression:, unary_expression_not_plus_minus:,
8571         cast_expression:, multiplicative_expression:,
8572         additive_expression:, shift_expression:, relational_expression:,
8573         equality_expression:, and_expression:, exclusive_or_expression:,
8574         inclusive_or_expression:, conditional_and_expression:,
8575         conditional_or_expression:, assignment:): Use new location/token
8576         information available on operators.
8577         (create_class): Set super_decl_type to NULL_TREE when processing
8578         java.lang.Object.
8579         (register_fields): Field initialization is now a MODIFY_EXPR
8580         node. Chain initialization code to the matching lists (according
8581         the the field declaration modifiers).
8582         (maybe_generate_clinit): New function.
8583         (method_header): Don't set method's DECL_NAME to a WFL when adding
8584         methods to java.lang.Object.
8585         (resolve_and_layout): Now can return NULL_TREE if the type
8586         resolution fails. Otherwise, return the class DECL instead of its
8587         TYPE.
8588         (check_method_redefinition): Don't patch method DECL_NAME if it
8589         belongs to java.lang.Object.
8590         (process_imports): Simply assign error_found to the value returned
8591         by check_pkg_class_access.
8592         (declare_local_variables): Don't use their init statements (if
8593         any) when parsing error were previously found. Reuse MODIFY_EXPR
8594         build during parsing as an init statement.
8595         (java_method_add_stmt): Now return the current method body.
8596         (java_layout_parsed_class, java_register_parsed_class): Functions
8597         removed.
8598         (java_complete_expand_methods): Initialize the constant pool on a
8599         per class basis. Layout the classes before expanding their method
8600         bodies. Don't try expand artificial constructor code if error were
8601         found. Make the classes data and register them if no error were
8602         found.
8603         (java_complete_expand_method): Retrieve an artificial constructor
8604         argument list before entering its body. Assign the top block to
8605         the artificial constructor function body and set types of declared
8606         blocks and compound statements to void. Walk method body if not an
8607         artificial constructor.
8608         (make_qualified_name, cut_identifier_in_qualified): New functions.
8609         (resolve_expression_name): Fixed comments. Save/restore the
8610         current class CLASS_LOADED_P flag value. Build non qualified
8611         static field access and handle qualified expression names.
8612         (resolve_field_access, resolve_qualified_expression_name): New
8613         functions.
8614         (patch_method_invocation_stmt): Use the new expression resolution
8615         scheme, calling resolve_field_access when the function call is
8616         resolved as an expression.
8617         (qualify_ambiguous_name): Function rewritten to work on qualified
8618         expression produced by make_qualified_name.
8619         (java_complete_tree): Promote type when function's argument are
8620         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
8621         the assignment to discover further errors if RHS is a expression
8622         name that fails to evaluate. Declare LHS initialized even though
8623         the assignment failed. Don't use the location variable and removed
8624         extra argument in patch function calls. Now handle the ARRAY_REF
8625         case and build internal string representation when STRING_CSTs are
8626         walked.
8627         (build_method_invocation): Don't wrap function call around a WFL.
8628         (build_assignment): Likewise. Use the operator location
8629         information.
8630         (patch_assignment): Handle array access LHSs. Handle error
8631         provenance, resulting in a better error report.
8632         (build_binop): Use op_location from operator as binop location
8633         information.
8634         (build_unaryop, build_incdec, build_cast): Likewise.
8635         (patch_binop): Extract location information from the node. Fixed
8636         typo in error message.
8637         (patch_unary_op): Extract location information from the node.
8638         (build_array_ref, patch_array_ref): New functions.
8639
8640 Wed Jul  1 13:11:36 1998  Tom Tromey  <tromey@cygnus.com>
8641
8642         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
8643         match _Jv_IsInstanceOf.
8644         * decl.c (init_decl_processing): Use _Jv_NewArray, not
8645         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
8646
8647 Tue Jun 30 14:12:54 1998  Tom Tromey  <tromey@cygnus.com>
8648
8649         * decl.c (init_decl_processing): Functions are now named
8650         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
8651
8652 Mon Jun 29 14:47:10 1998  Per Bothner  <bothner@cygnus.com>
8653
8654         * java-tree.h (load_class):  Add prototype.
8655         * class.c (is_compiled_class):  Add missing arg to load_class.
8656         * expr.c (expand_java_NEW):  Call load_class.
8657         * parse.y (process_import):  Removed bogus use of void return value.
8658
8659 Thu Jun 25 11:50:48 1998  Per Bothner  <bothner@cygnus.com>
8660
8661         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
8662         Function name is "_Jv_Throw" instead of "soft_athrow".
8663         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
8664         Function name is "_Jv_AllocObject" instead of "soft_new".
8665         Takes an extra parameter (object size).
8666         * expr.c:  Update calls.
8667
8668 Wed Jun 24 13:59:02 1998  Per Bothner  <bothner@cygnus.com>
8669
8670         * lex.c (java_get_line_col):  Handle end-of-file.
8671         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
8672
8673 Wed Jun 24 09:22:34 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
8674
8675         * lang.c (lang_init): Make -fexceptions the default.
8676         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
8677         exception handling is not turned on.
8678
8679 Tue Jun 23 10:17:09 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
8680
8681         * lang.c (flag_new_exceptions): Make this this default.
8682         * decl.c (end_java_method): Call emit_handlers.
8683         * except.c (method_init_exceptions): Set language code and version.
8684         (expand_start_java_handler): Enable exception, and call
8685         expand_eh_region_start.
8686         (expand_end_java_handler): Enable exception, and set up catch blocks.
8687         (emit_handlers): New routine to generate the saved handlers.
8688         * java-except.h (emit_handlers): Add prototype.
8689
8690 Fri Jun 12 11:31:24 1998  Per Bothner  <bothner@cygnus.com>
8691
8692         We used to have three different representations of the constant pool:
8693         the CPool structure, the tree_constant_pool, and the constructures
8694         used to build the Class object (which may need class and string
8695         constants) in compiled code.  None were appropriate for compiling
8696         to .class files, so I did a major overhaul.
8697
8698         First, the tree_constant_pool array was removed.  Things were
8699         modified to the CPool structure in the JCF could be used.
8700         Second, a "capacity" field was added to the CPool, and functions
8701         written to search for a matching constant, adding one if not found.
8702         The code that generated the Class object was changed to use a CPool.
8703         The actual TREE_LISTs used to build the CONSTRUCTORs used for
8704         the static Class object are now only in build_constants_constructor.
8705         Finally, I wrote code which can generate a .class file (including its
8706         constant pool) from the RECORD_TYPE of a class.  This is a big step
8707         on the way to compiling Java source into .class files.
8708
8709         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
8710         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
8711
8712         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
8713         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
8714         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
8715         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
8716         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
8717         (lang_type):  Removed constant_pool field.
8718         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
8719         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
8720         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
8721         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
8722
8723         * constants.c (current_constant_pool_tags, current_constant_pool_data,
8724         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
8725         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
8726         (set_constant_entry, find_constant1, find_constant2,
8727         find_class_constant, count_constant_pool_bytes, write_constant_pool,
8728         find_utf8_constant, find_class_or_string_constant):  New functions.
8729
8730         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
8731         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
8732         (give_name_to_class, get_class_constant):  Likewise.
8733         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
8734         (get_name_and_type_constant, get_ref_constant):  Removed.
8735         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
8736         * parse.y:  Don't save/restore tree_constant_pool.
8737         * verify.c (verify_jvm_instructions):  Update for new approach.
8738         * expr.c (expand_invoke, expand_java_field_op): Likewise.
8739
8740         * lang-options.h:  Added -femit-class-file, -femit-class-files.
8741         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
8742         (lang_f_options):  Added "emit-class-file(s)".
8743
8744         * expr.c (build_java_arrayaccess):  Generate more efficient array
8745         bounds checking, by using unsigned compare.
8746
8747         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
8748
8749 Wed Jun 10 17:34:42 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8750
8751         * parse.h: New comment on the handling of unresolved type
8752         identifiers. JDEPs are now part of the jdep_code enum.
8753         (typedef struct jdep): Now use enum jdep_code or int, depending on
8754         availability. Both are narrowed down to an 8 bits bitfield.
8755         (CALL_EXPR_PRIMARY): Fixed comment.
8756
8757 Wed Jun 10 10:54:39 1998  Tom Tromey  <tromey@cygnus.com>
8758
8759         * Make-lang.in (java): Added gjavac and jvgenmain.
8760         (java.start.encap): Depend on gjavac.
8761         (java.rest.encap): Depend on jvgenmain.
8762
8763         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
8764         (JAVA_CROSS_NAME): Likewise.
8765         (java.all.build): Depend on jvgenmain and gjavac.
8766         (java.all.cross): Depend on jvgenmain and gjavac-cross.
8767         (jvgenmain$(exeext)): New target.
8768         (java.install-common): Wrote.
8769         * config-lang.in (compilers, stagestuff): Added gjavac and
8770         jvgenmain.
8771
8772 Wed Jun 10 12:19:04 1998  Dave Brolley  <brolley@cygnus.com>
8773
8774         * lang.c (lang_decode_option): New argc/argv interface.
8775
8776 Tue Jun  9 18:12:46 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8777
8778         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
8779         * decl.c (build_decl_no_layout): New function.
8780         * expr.c (java_lang_expand_expr): Layout declarations found in
8781         blocks before they're pushed.
8782         * jcf-parse.c (load_class): Save current line when parsing class
8783         file.
8784         (parse_source_file): Register class before expanding their
8785         methods.
8786         * lang.c (put_decl_node): Produce `null' when `void *' is
8787         processed.
8788         * lex.c (static tree wfl_op): New static global, for error report
8789         on casts.
8790         (java_init_lex): wfl_operator and wfl_op initialized
8791         here. Filename caching added for wfl_op. Return wfl_op when `(' is
8792         parsed.
8793         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
8794         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
8795         build_unresolved_array_type): New static function definitions.
8796         (build_decl_no_layout): New extern function declared.
8797         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
8798         faulty modifier exists.
8799         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
8800         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
8801         (UNARY_PLUS_EXPR): New fake operator.
8802         (struct parser_ctxt): New field osb_number.
8803         * parse.y (static tree wfl_operator): New static WFL for operator
8804         bound error messages.
8805         (DECR_TK, INCR_TK): Moved.
8806         (OP_TK): Tagged <operator>.
8807         (array_type:): Now call build_unresolved_array_type.
8808         (dim_expr:): Count the number of '[' seen.
8809         (post_increment_expression, post_decrement_expression,
8810         pre_increment_expression, pre_decrement_expression,
8811         unary_expression_not_plus_minus, unary_expression:): Actions are
8812         now building the corresponding unary expressions.
8813         (cast_expression:): Actions are now building cast expressions.
8814         (build_unresolved_array_type): New function.
8815         (create_interface): Reset the number of declared interfaces.
8816         (create_class): Likewise.
8817         (method_header): Methods declared within the scope of an interface
8818         are now implicitly set public and abstract.
8819         (java_complete_class): Variable's and parameter's type are patched
8820         with a promoted type.
8821         (declare_local_variables): Resolved non builtin types are promoted
8822         before being used to build a variable decl. Removed type patch
8823         posted on variable initialization statement.
8824         (source_start_java_method): Use build_decl_no_layout to build the
8825         decl of a parameter of incomplete type.
8826         (java_register_parsed_class): Process interfaces too. Call
8827         rest_of_decl_compilation on each processed class declarations.
8828         (java_complete_expand_methods): Don't attempt to expand things in
8829         interfaces.
8830         (java_complete_tree): Process CONVERT_EXPR, even though it always
8831         has a type. Propagate error_mark_node to node's type too. Promote
8832         method's call argument type and return error_mark_node if
8833         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
8834         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
8835         handle unary operator nodes.
8836         (build_assignment): Added comment.
8837         (print_int_node): New function.
8838         (patch_assignment): New second argument. New error handling. Use
8839         print_int_node. Handle references. Use can_cast_to_p to issue
8840         different error message according to the context and check upon
8841         the initialization of the RHS.
8842         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
8843         (operator_string): Handle more operators.
8844         (patch_binop): No longer use a function static
8845         wfl_operator. Improved error message on shift distance.
8846         (build_unaryop, build_incdec, build_cast, patch_unaryop,
8847         patch_cast): New functions.
8848
8849 Fri Jun  5 18:03:07 1998  Per Bothner  <bothner@cygnus.com>
8850
8851         * jvspec.c:  New file.
8852         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
8853
8854         * java-tree.h (identifier_subst):  Add declaration.
8855
8856 Thu Jun  4 13:44:23 1998  Tom Tromey  <tromey@cygnus.com>
8857
8858         * jvgenmain.c (main): Generate call to JvRunMain.
8859
8860         * class.c (make_class_data): Push value for "sync_info" field.
8861         * decl.c (init_decl_processing): Push "sync_info" field.
8862
8863 Wed Jun  3 20:39:14 1998  Per Bothner  <bothner@cygnus.com>
8864
8865         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
8866         Java (source) name, not signature.
8867         Set TYPE_ALIGN to (at least) that of element_type.
8868
8869 Tue Jun  2 15:19:19 1998  Per Bothner  <bothner@cygnus.com>
8870
8871         * class.c:  Moved classname-mangling-rekated code to ...
8872         * mangle.c:  ... this new file.
8873         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
8874         * Makefile.in:  Update for above changes.
8875
8876 Mon Jun  1 09:58:36 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8877
8878         * expr.c (truthvalue_conversion): Convert integer and floating
8879         point value to their truth value.
8880         * lex.c (java_lex): Handle the `null' literal.
8881         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
8882         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
8883         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
8884         New macros.
8885
8886         * parse.y: Reorganization/documentation on token declaration.
8887         (binop_lookup[]): New added new tree codes.
8888         (relational_expression): Build corresponding binary operators.
8889         (equality_expression, conditional_and_expression,
8890         conditional_or_expression): Likewise.
8891         (java_complete_class): Fix crash in debug message.
8892         (java_complete_tree): Check initialization of method call
8893         arguments. Further bogus node evaluation to detect more error
8894         during assignments. Handles more binary operators.
8895         (patch_assignment): Use DECL_P.
8896         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
8897         code.
8898         (operator_string): Handle more case. Compacted source.
8899         (patch_binop): Changed function comment. Checking for
8900         uninitialized first operand takes the compound assignment into
8901         account and uses DECL_P. Checking for uninitialized second operand
8902         delayed to routine's end. Use macros to issue type bound error
8903         messages and issue messages on both operands if their types are
8904         different. Force fixed type into node. Handle all binary
8905         operators.
8906
8907 Wed May 27 10:30:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8908
8909         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
8910         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
8911         build operator node and return tokens.
8912         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
8913         * parse.h (java_complete_tree): Changed returned type in prototype.
8914         (build_method_invocation, build_assignment, patch_assignment,
8915         patch_binop): New static function declarations.
8916         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
8917         BUILD_EXPR_WFL): New macros.
8918         * parse.y (enum tree_code binop_lookup[]): New static for token to
8919         TREE_CODE lookup.
8920         (%union): Parser union has new sub-structure `operator'.
8921         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
8922         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
8923         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
8924         ASSIGN_ANY_TK): Tokens tagged `operator'.
8925         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
8926         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
8927         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
8928         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
8929         (assignment_operator:): Rule tagged `operator'.
8930         (expression_statement:): Re-installed default rule.
8931         (method_invocation:): Sub rules call build_method_invocation.
8932         (postfix_expression:): Don't attempt to resolve name here. Just
8933         return an ID.
8934         (multiplicative_expression:): Sub-rules build corresponding binop
8935         expression node.
8936         (additive_expression:, shift_expression:, and_expression:,
8937         exclusive_or_expression:, inclusive_or_expression:): Likewise.
8938         (assignment:): Sub rule invoke build_assignment.
8939         (assignment_operator:): Default rules on sub rules.
8940         (force_error): Added documentation on this variable.
8941         (declare_local_variables): Build initialization calling
8942         build_assignment.
8943         (expand_start_java_method): Removed unused rtx declaration. Mark
8944         arguments as already initialized.
8945         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
8946         (java_complete_expand_methods): Don't process next method if
8947         completion of the previous one triggered errors.
8948         (java_complete_expand_method): Call source_end_java_method if no
8949         error were found during completion.
8950         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
8951         locals declaratilon. Handle names found within a class. Return
8952         error_mark_node when things aren't found.
8953         (patch_method_invocation_stmt): Return error_mark_node on failures.
8954         (patch_invoke): Removed unused local. Return the correct node.
8955         (java_complete_tree): Now returns a value. The BLOCK section binds
8956         local identifiers and the type of a BLOCK is now void. Assign the
8957         result of operand completion on COMPOUND_EXPR. Assign the
8958         encapsulated node of a WFL to the result of its completion, except
8959         when the node is an identifier. Now handle MODIFY_EXPR and several
8960         binary operators. Return error_mark_node on errors.
8961         (build_method_invocation, build_assignment, patch_assignment,
8962         build_binop, operator_string, patch_binop): New functions.
8963         * typeck.c (binary_numeric_promotion): New function.
8964
8965 Thu May 21 12:01:04 1998  Per Bothner  <bothner@cygnus.com>
8966
8967         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
8968         Replace most uses of ident_subst by identifier_subst.
8969
8970         * class.c (push_class_static_dummy_field):  Removed function.
8971         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
8972         instead of looking got "class" static field.  Create that decl here.
8973         (class_identifier_node):  Removed;  no longer needed.
8974         (init_class_processing):  Don't init class_identifier_node.
8975         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
8976         Do nreverse 0 times (instead of twice) for Object and Class.
8977         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
8978
8979 Wed May 20 16:35:04 1998  Per Bothner  <bothner@cygnus.com>
8980
8981         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
8982         while initializing linenumber_count and linenumber_table.
8983         Do it before init_function_start (which calls emit_line_note).
8984         * expr.c (expand_byte_code):  Don't need to clear lineno here.
8985
8986 Mon May 18 16:23:32 1998  Tom Tromey  <tromey@cygnus.com>
8987
8988         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
8989         then mangle number as _N_.
8990
8991         * class.c (mangle_class_field): New function.
8992         (build_class_ref): Set assembler name of class reference using
8993         mangle_class_field.
8994         (push_class_static_dummy_field): Likewise.
8995
8996 Sun May 17 12:52:35 1998  Michael Tiemann <tiemann@cygnus.com>
8997
8998         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
8999         of assigning to TREE_CODE.  The latter method exploits a feature
9000         of GCC that is not ANSI compliant.
9001
9002 Thu May 12 13:44:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9003
9004         * decl.c (pushdecl_force_head): New function.
9005         (pushlevel): Removed conditional printf.
9006         (complete_start_java_method): Don't enter local variable scope if
9007         function is compiled from source code.
9008         * expr.c: parse.h now included
9009         (java_lang_expand_expr): New function.
9010         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
9011         printf. Terminate buffer when doing directories.
9012         * jcf-parse.c (parse_source_file): Call lang_init_source before
9013         parsing and before code generation.
9014         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
9015         use printf if the macro is defined.
9016         * lang.c (lang_init): Install lang_expand_expr hook on
9017         java_lang_expand_expr.
9018         (java_dummy_print): New function.
9019         (lang_init_source): New function.
9020         * lex.c (java_lex): Remember location of an opening brace at the
9021         second nesting level.
9022         (java_is_eol): Unget character seen after a CR if it is EOF.
9023         * parse.h: Now includes lex.h
9024         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
9025         printf if the macro is defined.
9026         (expand_start_java_method, build_expr_block, enter_block,
9027         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
9028         New static function declarations.
9029         (pushdecl_force_head): New extern function declaration.
9030         (INCOMPLETE_TYPE_P): New macro.
9031         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
9032         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
9033         BLOCK_EXPR_ORIGIN): New macros.
9034         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
9035         DECL_SOURCE_LINE_LAST): New macros.
9036         (struct parser_ctxt): Removed field current_method_decl, redundant
9037         with the field current_function_decl. Added fields
9038         first_ccb_indent1 and pending_block.
9039         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
9040         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
9041         tagged <node>
9042         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
9043         (compilation_unit:): Cosmetic on sub rule.
9044         (type_declaration:): Cosmetic on sub rules. Added an error rule.
9045         (variable_initializer:): Installed default rule on expression:.
9046         (method_declaration:): method_header: starts a new
9047         method. method_body: installs the function body, absorbs blocks
9048         emitted for temporary variable scopings, pops function's body block
9049         and merges function's last statement lineno in DECL_SOURCE_LINE.
9050         (method_body:): Installed default rules.
9051         (block:): Call enter_block when an opening brace is seen.  Absorb
9052         scoping blocks and call exit_block when a closing brace is seen.
9053         (block_statement:): Cosmetic changes.
9054         (method_invocation:): Create WFL around CALL_EXPR node.
9055         (patch_stage): Added comment around definition.
9056         (method_header): Try to use first_ccb_indent1 as the first line of
9057         the method, so BP debug info are emitted at the first opening
9058         brace of the function. If the function has no body, use the
9059         location of the function's name. Override currently defined method
9060         name with the matching WFL so we can point redefinition errors
9061         using the location where the function's name was declared.
9062         (check_abstract_method_header): Interprets DECL_NAME as an
9063         identifier or as a WFL, accordingly.
9064         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
9065         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
9066         location and name information out of it and reinstall DECL_NAME to
9067         its original identifier node value.
9068         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
9069         function's source code).
9070         (read_import_dir): Test the value returned by find_class and issue
9071         a fatal accordingly.
9072         (declare_local_variables): Push a new block for the scope of the
9073         new variable(s) if code has been already generated at that nesting
9074         level. Pinpoint redefinition errors using the variable id
9075         WFLs. Generate initialization code if necessary. If the variable
9076         type is incomplete, register a patch on its decl.
9077         (source_start_java_method): Rewritten. Define a new block for the
9078         function's parameters. Build parameter decl out of function's
9079         arguments and register them for a patch if their types are
9080         incomplete.
9081         (expand_start_java_method): Includes the part of
9082         source_start_java_method that was pushing the parameter decls and
9083         completing the method start code.
9084         (source_end_java_method): Removed call the expand_end_bindings and
9085         poplevel (already taken care of). Reinstall function's arguments
9086         and get function's last line of code before calling
9087         expand_function_end.
9088         (java_method_add_stmt): New comment before the function's
9089         code. Complement the second operand of the current COMPOUND_EXPR
9090         if necessary.
9091         (java_complete_expand_methods): Don't generate debug info on line
9092         zero when expanding a generated constructor.
9093         (java_complete_expand_method): Set start and end line numbers for
9094         a artificially generated constructor to one and manually call
9095         enter_block and exit_block when defining it. For all methods:
9096         expand function's start calling the new expand_start_java_method
9097         and invoke java_complete_tree on the effective method's body, if
9098         any.
9099         (resolve_expression_name): Now use lookup_name_in_blocks to search
9100         local variable decls and print out an error when variables are
9101         undefined.
9102         (patch_method_invocation_stmt): Inserted comment before the
9103         function's code.
9104         (lookup_method_invoke): Chain method's arguments using chainon
9105         with the current arg list as a second argument. Inserted missing
9106         IDENTIFIER_POINTER when reporting an error on methods not found.
9107         (refine_accessible_methods_list): Don't retain constructors.
9108         (patch_arguments): Function removed.
9109         (java_complete_tree): Inserted comment before the function's
9110         code. New case for BLOCKs. Moved the WFL case a bit
9111         further. Complete function's arguments.
9112         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
9113         maybe_absorb_scoping_blocks): New functions.
9114
9115 Mon Apr 27 10:50:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9116
9117         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
9118         previously set.
9119         * jcf-parse.c (parse_source_file, java_error_count): New forward
9120         and extern declarations.
9121         (java_parse_abort_on_error): Macro moved.
9122         (jcf_parse_source): fatal called if fopen fails. Now calls
9123         parse_source_file.
9124         (parse_source_file): New parse_only parameter. Reflects the
9125         elimination of the second pass.
9126         (yyparse): parse_source_file called with argument set to 0.
9127         * jcf.h (JCF_ZERO): Sets java_source to zero.
9128         * lex.c (java_init_lex): pass argument is gone. Function modified
9129         to be called once during the analysis of a file.
9130         (java_unget_unicode): Fixed typo in fatal message.
9131         (java_get_line_col): Likewise.
9132         (java_lval): Likewise. String literals no longer built during
9133         second pass.
9134         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
9135         account.
9136         * parse.h (MODIFIER_WFL): New macro.
9137         (parse_check_super, parser_check_super_interface): Now return int.
9138         (parser_chain_incomplete_item, not_builtin_p,
9139         complete_method_decl): Declarations removed.
9140         (build_method_invocation_stmt, build_invoke): Renamed using the
9141         `patch' instead of `build'
9142         (register-incomplete_type, obtain_incomplete_type,
9143         java_complete_tree, java_complete_expand_method,
9144         unresolved_type_p, create_jdep_list): New function declarations.
9145         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
9146         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
9147         (jdep): New typedef on new struct _jdep.
9148         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
9149         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
9150         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
9151         JDEP_RESOLVED_P): New macros.
9152         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
9153         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
9154         JDEP_VARIABLE): New enum values and jdep kinds.
9155         (jdeplist): New typedef on struct _jdeplist.
9156         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
9157         macros.
9158         (CALL_EXPR_PRIMARY): New macro.
9159         (struct parser_ctxt): Fields java_pass, current_method_decl,
9160         method_decl_list deleted. New field jdeplist.
9161         (INCOMPLETE_P): Macro deleted.
9162         * parse.y (single_type_import_declaration:): Removed pass switch.
9163         (type_import_on_demand_declaration): Likewise.
9164         (field_declaration:): Removed pass switch on all sub rules.
9165         (class_declaration:): Call the complete_class_decl removed on
9166         class_body rules.
9167         (method_declaration:): Removed second pass switch. No longer chain
9168         methods decl when method_header reduced.
9169         (method_header:): Sub rules no longer depend on pass switch.
9170         (method_declarator:): Likewise.
9171         (method_body:): Likewise.
9172         (abstract_method_declaration:): Likewise.
9173         (block_statement:): Likewise.
9174         (local_variable_declaration:): Likewise.
9175         (argument_list:): Likewise.
9176         (method_invocation:): Likewise. Call to build_method_invocation_stmt
9177         removed. Partial CLASS_EXPR tree node built instead.
9178         (postfix_expression:): Removed pass switch on all sub rules.
9179         (java_pop_parser_context): Free classd_list content.
9180         (yyerror): Call obstrack_grow0 to finalize error message.
9181         (check_class_interface_creation): Comment modified to reflect new
9182         returned value meaning. Removed second pass switch. Return 1 if an
9183         error was found, 0 otherwise. Adjust pointer on filename if a
9184         leading path separator was found.
9185         (maybe_create_class_interface_decl): Removed first pass switch
9186         when linking the class decl to the class_list. Install a new
9187         jdep_list for the class.
9188         (add_superinterfaces): List of unresolved interfaces is
9189         gone. Unresolved interfaces are directly added to the current
9190         dependencies list.
9191         (create_interface): Second pass shortcut removed.
9192         ctpx->modifier_ctx access through MODIFIER_WFL.
9193         (create_class): Second pass shortcut removed. Call to
9194         register_incomplete_type replaces the call to
9195         parser_chain_incomplete_item.
9196         (complete_class_decl): Function removed.
9197         (duplicate_declaration_error): New way of retrieving redeclared
9198         item type.
9199         (register_fields): Call to lookup_modifier_cl replaced by
9200         MODIFIER_WFL. New way of handling unresolved type, using
9201         unresolved_type_p and obtain_incomplete_type.
9202         register_incomplete_type replaces call to parser_chain_incomplete_item.
9203         (patch_stage): New static global variable.
9204         (method_header): New way of handling unresolved type, using
9205         unresolved_type_p and obtain_incomplete_type. patch_stage used to
9206         indicates that the method decl needs to be patched.
9207         (check_abstract_method_header): Call to lookup_modifier_cl
9208         replaced by MODIFIER_WFL.
9209         (method_declarator): Incomplete argument type are registered
9210         calling register_incomplete_type. Patch on the declared method is
9211         issued in that case.
9212         (unresolved_type_p): New function.
9213         (parser_check_super_interface): New comment to reflect function's
9214         modified returned type (int). Function and has a new argument
9215         this_wfl. Call to parse_error_context uses this_wfl instead of
9216         relying on lookup_cl.
9217         (parser_check_super): Comment reflects function's new returned
9218         type (int). Function returns non zero value on error.
9219         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
9220         register_incomplete_type, jdep_resolve_class): New functions to
9221         handle incomplete types in declarations.
9222         (java_complete_class): Rewritten to work with the new incomplete
9223         type handling scheme.
9224         (complete_class_report_errors): Likewise.
9225         (complete_method_decl): Removed: it jobs is now handled by
9226         java_complete_class.
9227         (do_resolve_class): Class loaded in not already loaded and not
9228         found in Java source code.
9229         (java_check_regular_methods, java_check_abstract_methods): Don't
9230         call complete_method_decl anymore.
9231         (lookup_modifier_cl, not_builtin_p): Functions deleted.
9232         (read_import_dir): Got rid of the pass number dependency.
9233         (declare_local_variables): New handling of unresolved types (patch
9234         issued).
9235         (source_start_java_method): New parameter level. Function called
9236         with level set to 1 when argument types are potentially
9237         unresolved.  Called to complete the job with level set to 2 once
9238         types are complete.
9239         (source_end_java_method): Call to permanent_allocation
9240         removed. Waiting to be replaced by a more suitable obstack
9241         management.
9242         (java_complete_expand_methods, java_complete_expand_method,
9243         java_expand_finals): New functions.
9244         (build_method_invocation_stmt): Renamed
9245         patch_method_invocation_stmt. Extracts function call expression
9246         (wfl) and arguments (args) from CALL_EXPR tree operands.
9247         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
9248         call. Patch the function and argument operand of the CALL_EXPR
9249         tree argument.
9250         (patch_argument, java_complete_tree): New functions.
9251
9252 Mon Apr 20 18:26:57 1998  Per Bothner  <bothner@cygnus.com>
9253
9254         Recover from missing fields and methods (i.e. error instead of fatal).
9255         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
9256         * expr.c (expand_invoke):  Recover from missing method.
9257         (expand_java_field_op):  Recover from missing field.
9258         Inline references to java.lang.{Integer,Char,...}.TYPE.
9259         * typeck.c (get_type_from_signature), java-tree.h:  New function.
9260         * class.c (add_method):  Use get_type_from_signature.
9261         (build_class_ref):  Handle a class that was not found.
9262         * typeck.c (convert):  Handle conversion to pointers (for convenience).
9263         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
9264         instead of lookup_field to handle missing fields.
9265
9266         * jcf-parse.c (process_zip_dir):  Set java_source.
9267
9268 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
9269
9270         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
9271
9272 Tue Apr 14 15:59:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9273
9274         * jcf-parse.c (load_class): Don't change input_filename before
9275         calling jcf_parse_source (but still do it before calling
9276         jcf_parse).
9277         (jcf_parse_source): Assign input_filename after having saved the
9278         parser context.
9279         * lex.c (java_init_lex): Chain a WFL node to the import on demand
9280         list. ctxp->modifier_ctx zeroed according to its new
9281         definition. ctxp->filename initialized. Removed
9282         JAVA_MODIFIER_CTX_UNMARK.
9283         (java_unget_unicode): Update the character based column position.
9284         (java_allocate_new_line): ref_count not used anymore. Always free
9285         ctxp->p_line. Initialize c_line->char_col to 0.
9286         (java_get_unicode): Update the character based column position.
9287         (java_lex): Use ctxp->elc to store current position in source
9288         file, at the beginning of the parsed token. Set modifier_ctx entry
9289         corresponding to the parse modifier to a WFL node. Return a WFL
9290         node when an identifier is parsed.
9291         (java_lex_error): Now uses ctxp->elc to store current position in
9292         source.
9293         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
9294         * lex.h (build_wfl_node): New function definitions.
9295         (struct java_line): ref_count and next fields are gone. New field
9296         char_col.
9297         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
9298         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
9299         (JAVA_COLUMN_DELTA): New macro.
9300         (java_lc): New typedef on new struct _java_lc.
9301         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
9302         (parse_error_context, parse_warning_context): Changed prototypes.
9303         (java_get_line_col): Added as an available global function.
9304         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
9305         (IC_DECL): Replaced by macro IC_TYPE
9306         (DEPEND_WFL): New macro.
9307         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
9308         wrong modifier.
9309         (exit_java_complete_class): Removed a commented out statement.
9310         (struct parser_ctxt): Added comments on fields. modifier_ctx is
9311         now an array of tree nodes. Deleted fields line_list and
9312         e_line. New field elc, to replace e_line.
9313         * parse.y (array_type:): Build WFL node.
9314         (qualified_name:): Build a single WFL node out of two. Retain
9315         the location information of the first node in the resulting node.
9316         (package_declaration:): Use package name as a WFL node
9317         (single_type_import_declaration:): Use imported name as a WFL node.
9318         (type_import_on_demand_declaration:): Use root of the imported
9319         packages as a WFL node.
9320         (field_declaration:): Removed unused local variable cl.
9321         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
9322         (yyerror): New static elc. Removed static error_line, error_pos.
9323         New local code_from_source. Save ctxp->elc into elc at the first
9324         pass. Call java_get_line_col to get a string of the line where
9325         the error occured.
9326         (debug_line): Removed static function.
9327         (parse_error_context, parse_warning_context): Parameter cl is now
9328         a WFL node. Use its value to initialize ctxp->elc.
9329         (redefinition_error): Parameter cl is now a WFL node.
9330         (parse_add_interface): New parameter wfl. No longer call
9331         lookup_cl, use wfl instead.
9332         (check_class_interface_creation): Parameter cl is now a WFL node.
9333         (maybe_create_class_interface_decl): Likewise.
9334         (add_superinterfaces): New function.
9335         (create_interface): Removed local cl, node, super_decl,
9336         super_decl_type.  Function now uses id as a WFL node. Better
9337         warning/error report on obsolete or forbidden mix of
9338         modifiers. Now calls add_superinterfaces to register interfaces.
9339         (create_class): Removed local cl, node. Local variable id is used
9340         as a WFL node. Better error report on forbidden modifier
9341         mix. Uses add_superinterfaces to register interfaces.
9342         (find_field): Argument cl is now a WFL node. Now store the WFL
9343         node of a fields that needs to be checked for their
9344         initialization.
9345         (method_header): Local variable node non longer used. Local
9346         variable id replaces cl.
9347         (check_modifiers_consistency): Local variable cl is now a WFL
9348         node.
9349         (method_declarator): Local variable cl replaced by parameter id.
9350         (parser_qualified_name): Now uses parameter name as a WFL node.
9351         (parser_check_super_interface): New parameter wfl, for achieve
9352         greater accuracy during error reports.
9353         (parser_chain_incomplete_item): New parameter named location. Used,
9354         along the decl, to construct the incomplete item node.
9355         (java_complete_class): resolve_class now uses WFL node extracted
9356         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
9357         where appropriate.
9358         (complete_method_decl): Unresolved function's argument types are WFL.
9359         (resolve_class): Parameter cl is now a WFL node.
9360         (resolve_and_layout): Likewise.
9361         (do_resolve_class): Likewise. Try first to use cl and then do the
9362         lookup on the decl when calling check_pkg_class_access.
9363         (complete_class_report_errors): Use IC_TYPE in place of
9364         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
9365         instead of doing a lookup over the decl.
9366         (java_check_final): Use WFL info from field tree list.
9367         (lookup_cl): Rewritten and returns a statically defined WFL node.
9368         (lookup_modifier_cl): Now uses information from WFL nodes.
9369         (process_imports): Likewise.
9370         (read_import_dir): name and cl arguments replaced by a single WFL
9371         node. Function modified accordingly.
9372         (find_in_imports_on_demand): Now uses WFL node.
9373         (check_pkg_class_access): cl argument is now a WFL node.
9374         (declare_local_variables): Fixed to use WFL nodes.
9375         (resolve_expression_name): Likewise.
9376         (build_method_invocation_stmt): name_combo argument renamed
9377         wfl. Function modified to use WFL nodes.
9378         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
9379         (lookup_method_invoke): cl is now a WFL node. Added missing
9380         IDENTIFIER_POINTER to class type decl name.
9381
9382 Tue Apr 14 15:23:29 1998  Dave Brolley  <brolley@cygnus.com>
9383
9384         * lang.c (init_parse): Now returns char* containing the filename.
9385
9386 Fri Apr 10 11:36:04 1998  Per Bothner  <bothner@cygnus.com>
9387
9388         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
9389
9390         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
9391         * class.c (make_class_data):  If flag_assume_compiled, initial class
9392         state is CSTATE_PREPARED; make superclass and interfaces direct
9393         references, rather than constant pool indexes.
9394
9395 Thu Apr  9 16:10:56 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9396
9397         * parser.y: Include flags.h. Removed debug variable pl.
9398         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
9399         (block:): Likewise.
9400         (labeled_statement_nsi:): Generate debug info when reducing
9401         expression_statement:.
9402         (check_pkg_class_access): get_access_flags_from_decl invokation
9403         fixed for new CLASS_* flags location.
9404         (source_end_java_method): Save/restore parser context when
9405         entering/leaving this routine. Restore lineno to its right value
9406         before calling expand_end_bindings.
9407         (build_method_invocation_stmt): build_invoke called with the
9408         current line information.
9409         (build_invoke): New argument cl. Wrap the function call around a
9410         wfl node.
9411         (refine_accessible_methods_list): Changed comment, removed
9412         unnecessary code.
9413         * parse.h: Fixed typo in comments.
9414         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
9415         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
9416         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
9417         parser_ccb_indent.
9418         * lex.c (java_lex): Record the last closing curly bracket of a
9419         function.
9420         * jcf-parse.c (jcf_parse_source): Now calls
9421         java_check_methods. Clarified comment, fixed typo.
9422
9423 1998-04-09  Dave Brolley  <brolley@cygnus.com>
9424
9425         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
9426         (finish_parse): Expose for non USE_CPPLIB builds.
9427
9428 Wed Apr  8 13:06:23 1998  Jeffrey A Law  (law@cygnus.com)
9429
9430         * lang.c (lang_print_xnode): New function.
9431
9432 Fri Apr  3 13:22:41 1998  Per Bothner  <bothner@cygnus.com>
9433
9434         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
9435         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
9436         used to build a class's dispatch table.
9437         (make_class_data):  Generate dispatch table if flag_assume_compiled.
9438         Set dtable of class object to address of class_dtable_decl.
9439
9440         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
9441         be volatile and have side effects - generates better code.
9442
9443         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
9444         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
9445
9446         * expr.c (expand_invoke):  If class is final, method is
9447         effectively final, so can call it directly.
9448
9449         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
9450
9451         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
9452
9453 Thu Mar 19 16:59:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9454
9455         * parse.y (build_method_invocation_stmt): Removed extra argument
9456         to build_invoke.
9457
9458 Mon Mar 16 17:25:19 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9459
9460         * expr.c (dtable_indent): Now static global.
9461         (expand_invoke): Now call invoke_build_dtable and
9462         build_invokevirtual.
9463         (invoke_build_dtable, build_invokevirtual): New functions.
9464         * jcf-io.c (find_class): Defer issuing a warning by setting
9465         jcf->outofsynch to 1.
9466         * jcf-parse.c (jcf_out_of_synch): New function.
9467         (load_class): Test this_jcf.outofsynch flag and call
9468         jcf_out_of_synch accordingly.
9469         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
9470         comment indentation.
9471         * lex.c (java_get_unicode): Fixed code indentation.
9472         (java_lex): Create string literal. Fixed typo. Removed several
9473         premature obstack_free.
9474         * parse.h: New enums for name resolution and invocation mode.
9475         (struct qualification): New data structure.
9476         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
9477         (do_resolve_class, build_method_invocation_stmt,
9478         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
9479         debug_line, identical_subpath_p, invocation_mode,
9480         refine_accessible_methods_list, build_invoke,
9481         lookup_method_invoke): New functions declared.
9482         (build_invokevirtual, invoke_build_dtable, match_java_method,
9483         build_field_ref, jcf_out_of_synch): New references to external
9484         functions.
9485         (struct parse_ctxt): Removed artificial_constructor field.
9486         * parse.y: (array_type:): Type defined for this rule.
9487         (class_type:): Installed default rule for interface_type:.
9488         (array_type:): Now build Java array type.
9489         (qualified_name:): Now use obstack_grow0.
9490         (method_declaration:): Skip the artificial constructor added to
9491         the list, if any.
9492         (abstract_method_declaration:): Execute the code only during pass 1.
9493         (block:): Installed default rule in block_statements:.
9494         (block_statement:): Add the statement to the method during pass 2.
9495         (statement_expression): Installed default rule for
9496         method_invocation:.
9497         (argument_list:): Added code to build the argument list.
9498         (method_invocation:): Added call to create the method invocation
9499         node.
9500         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
9501         (debug_line): New function for debug.
9502         (complete_class_decl): No longer do something during pass 1.
9503         (method_header): Use BUILD_PTR_FROM_NAME.
9504         (parser_qualified_classname): Use obstack_grow0. Removed bogus
9505         obstack_free.
9506         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
9507         function's main comment.
9508         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
9509         classes.
9510         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
9511         (resolve_class): Now works with arrays.
9512         (do_resolve_class, resolve_and_layout): New functions.
9513         (java_check_regular_methods): Reverse method list before and after
9514         having processed it. No longer set ctxp->artificial_constructor.
9515         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
9516         accordingly. Fixed typo in issued error message. Now use
9517         obstack_grow0.
9518         (find_in_imports_on_demand): Now use obstack_grow0.
9519         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
9520         (source_end_java_method): Call expand_expr_stmt instead of
9521         expand_expr. Calls it before calling expand_function_end.
9522         (java_method_add_stmt): Do nothing if errors were found during
9523         parsing.
9524         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
9525         (build_method_invocation_stmt, build_invoke, invocation_mode,
9526         lookup_method_invoke, refine_accessible_methods_list,
9527         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
9528         New functions.
9529         * typeck.c (build_java_signature): Properly end method signature
9530         if return type skipped.
9531         (match_java_method): New function.
9532
9533 Mon Mar 16 10:40:47 1998  Per Bothner  <bothner@cygnus.com>
9534
9535         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
9536
9537 Wed Feb 25 08:55:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9538
9539         * expr.c (build_invoke_non_interface): New function.
9540         (methods_ident, ncode_ident): Now static globals.
9541         (expand_invoke): Use build_invoke_non_interface.
9542         * java-tree.h (struct lang_decl): New field function_decl_body.
9543         (DECL_FUNCTION_BODY): New macro.
9544         * jcf-parse.c (jcf_parse_source): Deeper check before setting
9545         CLASS_FROM_SOURCE_P.
9546         (parse_source_file): Fixed typos. Call java_layout_parsed_class
9547         before starting pass 2. Call to java_generate_parsed_class replaced
9548         by java_register_parsed_class.
9549         * lex.c: Fixed typo in header. Some line width related formating.
9550         * lex.h: Some line width related formating.
9551         * parse.h (source_end_java_method, resolve_expression_name,
9552         complete_class_decl, maybe_create_class_interface_decl,
9553         check_class_interface_creation): New static function declarations.
9554         (java_layout_parsed_class, java_method_add_stmt): New function
9555         declarations.
9556         (struct parser_ctxt): Field mark_class_generate removed. New
9557         fields class_list and artificial_constructor.
9558         * parse.y: Fixed typo in header.
9559         (class_declaration:): Call complete_class_decl when class body
9560         parsed.
9561         (method_declaration:): Call source_end_java_method in pass 2 when
9562         the method body is defined.
9563         (postfix_expression:): Do expression name resolution on sub-rule
9564         name during pass 2.
9565         (create_class, create_interface): Merged common pieces.
9566         (check_class_interface_creation, maybe_create_class_interface_decl):
9567         New functions.
9568         (complete_class_decl): New function.
9569         (register_fields): Fixed line width related typo.
9570         (method_header): Correctly skip first argument when fixing
9571         argument line. Changed the loop.
9572         (java_check_circular_reference): Now use ctxp->class_list.
9573         (java_complete_class): Removed start/stop marking.
9574         (java_check_regular_methods): Now takes a class decl as an
9575         argument.  Add default constructor if none were encountered.
9576         (java_check_methods): Now use ctxp->class_list. Changed call to
9577         java_check_regular_methods.
9578         (source_start_java_method): Set DECL_ARG_TYPE for each function
9579         arguments.
9580         (source_end_java_method, java_method_add_stmt): New functions.
9581         (java_generate_parsed_class): No longer exists.
9582         (java_layout_parsed_class, java_register_parsed_class): New functions.
9583         (resolve_expression_name): New function.
9584
9585 Thu Feb 12 11:54:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9586
9587         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
9588         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
9589         until pass initializations are done. Call read_import_dir with
9590         pass set to 0.
9591         * parse.h: (lookup_modifier_cl): New function declared.
9592         (INTERFACE_FIELD_MODIFIERS): New macro.
9593         (OBSOLETE_MODIFIER_WARNING): New macro.
9594         * parse.y: (register_fields): Class type and current field name in
9595         local variables. Check modifier(s) if adding field(s) to an interface.
9596         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
9597         and report errors using the faulty modifier line context.
9598         (lookup_modifier_cl): New function.
9599         (read_import_dir): Detect and report default import processing
9600         failure.
9601
9602 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
9603
9604         Add a pair of -fassume-compiled/-fno-assume-compiled options.
9605         * class.c (is_compiled_class): Return 1 after making sure it
9606         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
9607         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
9608         * java-tree.h (flag_assume_compiled): Add decl.
9609         * lang.c (lang_f_options): Add the flag.
9610         (flag_assume_compiled): Add decl, default to 0.
9611
9612 Wed Feb 11 11:27:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9613
9614         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
9615         (is_compiled_class): Likewise.
9616         (layout_class): Likewise.
9617         (layout_class): Detect and lay out classes defined in source code.
9618         (interface_of_p, add_interface_do, may_add_interface): New
9619         function.
9620         (add_interface): Now use add_interface_do.
9621         (add_method_1): New function.
9622         (add_method): Now use add_method_1.
9623         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
9624         (complete_start_java_method): New function.
9625         (start_java_mehod): Now call complete_start_java_method.
9626         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
9627         (expand_invoke): Likewise and fixed typo.
9628         *gjava.c: (print_super_field): Use new argument to find_class
9629         DO_CLASS_FILE.
9630         (main): Likewise.
9631         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
9632         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
9633         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
9634         IDENTIFIER_NODE.
9635         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
9636         (add_method_1, push_class): New prototypes.
9637         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
9638         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
9639         directory where the class was found.
9640         (find_class): New argument DO_CLASS_FILE. Function find_class
9641         modified accordingly.
9642         *jcf-parse.c: (fix_class_path): New function.
9643         (load_class): Use new VERBOSE argument. load_class now finds and
9644         loads/parses .class/.java files. Save read_state of current_jcf
9645         if necessary.
9646         (java_parser_abort_on_error): New macro.
9647         (jcf_parse_source, parse_source_file): New function.
9648         (jcf_parse): Fixed typo.
9649         (yyparse): Call parse_source_file () only.
9650         (process_zip_dir): Fixed typo, fix zdir->filename_length when
9651         writing the real class name back in the zip directory entry.
9652         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
9653         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
9654         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
9655         (find_class): Prototype fixed.
9656         *lex.c: Added 1998 time stamp.
9657         Removed all static global variables, moved into the parser
9658         context data structure.. Now include unistd.h if SEEK_SET not
9659         defined.
9660         (java_init_lex): Rewritten.
9661         (java_sneak_unicode): Modified current unicode access in current line.
9662         (java_unget_unicode): Likewise.
9663         (java_allocate_new_line): New allocation management.
9664         (java_read_char): Modified access and storage of unget_utf8_value.
9665         New way of processing current unicode.
9666         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
9667         (java_get_unicode): Now use the parser context.
9668         (java_lineterminator): Likewise.
9669         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
9670         of the reentrant parser implementation. Function now use the
9671         parser context data structure and java_lval. Fixed production of
9672         the float and double constant "out of range" error message. Fixed
9673         obstack use. Return integer value when hitting a modifier. Now
9674         return type for TRUE, FALSE and other predefined types. Return
9675         identifier as a TREE_LIST list containing the current line context
9676         as the TREE_VALUE sub-node.
9677         (java_unicode_2_utf8): Fixed typo in declaration.
9678         (java_lex_error): Now use the parser context data structure.
9679         *lex.h: Added 1998 time stamp.
9680         (struct java_line): New fields ref_count and next.
9681         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
9682         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
9683         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
9684         *parse.h: Added 1998 time stamp.
9685         (java_parse_source_file): Renamed from parse_source_file.
9686         (YYERROR_NOW, YYNOT_TWICE): Fixed.
9687         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
9688         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
9689         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
9690         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
9691         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
9692         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
9693         (struct parser_ctxt): New data structure to keep the parser context.
9694         *parse.y: Added 1998 time stamp, got rid of static global variables.
9695         (java_error_count, ctxp): New global variables.
9696         (%union): New value field.
9697         (numeric_type, integral_type): Rules removed.
9698         (primitive_type): Rule defined to handle integral, float, double and
9699         boolean types.
9700         (qualified_name, package_declaration,
9701         single_type_import_declaration, type_import_on_demand_declaration,
9702         modifiers, class_declaration, super, interfaces,
9703         interface_type_list, class_body, field_declaration,
9704         field_declaration, variable_declarators, variable_declarator,
9705         variable_declarator_id, method_declaration, method_header,
9706         formal_parameter_list, formal_parameter, method_body, block,
9707         static, interface_declaration, extends_interfaces,
9708         abstract_method_declaration, local_variable_declarators): Rules now
9709         define actions.
9710         (force_error, do_warning): New global statics.
9711         (push_parser_context, parser_context_save_global,
9712         parser_context_restore_global, pop_parser_context): New functions.
9713         (yyerror): Now uses the global parser context. Fixed use of obstack.
9714         (parse_error, parse_error_context, parse_warning_context,
9715         java_accstring_lookup, redefinition_error, check_modifiers,
9716         parser_add_interface, create_interface, create_class, find_field,
9717         duplicate_declaration_error, register_fields, method_header,
9718         check_modifiers_consistency, check_abstract_method_header,
9719         method_declarator, parser_qualified_classname,
9720         parser_check_super_interface, parser_check_super,
9721         parser_chain_incomplete_item, java_check_circular_reference,
9722         layout_class_from_source, java_complete_class,
9723         complete_method_decl, resolve_class, complete_class_report_errors,
9724         java_check_final, check_method_redefinition,
9725         java_check_regular_methods, java_check_abstract_methods,
9726         java_check_methods, lookup_java_interface_method2,
9727         lookup_java_method2, lookup_cl, find_name_in_single_imports,
9728         process_imports, find_in_imports, read_import_entry,
9729         read_import_dir, find_in_imports_on_demand,
9730         check_pkg_class_access, not_builtin_p, declare_local_variables,
9731         source_start_java_method, java_generate_parsed_class): New
9732         functions.
9733         *typeck.c: (signature_include_return): New global variable.
9734         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
9735         to add the function returned type in the signature.
9736
9737 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
9738
9739         * jcf-io.c (open_in_zip): Use strncmp and LEN.
9740
9741 Thu Jan 29 16:12:13 1998  Dave Brolley  <brolley@cygnus.com>
9742
9743         * Make-lang.in (java.info): Added.
9744         (java.install-info): Added
9745
9746 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
9747
9748         * Makefile.in (clean): Also remove java/parse.c.
9749
9750 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
9751
9752         Add a pair of -fbounds-check/-fno-bounds-check options.
9753         * lang.c (lang_decode_option): Add code to grok arguments.
9754         (flag_bounds_check): Add decl.
9755         (lang_f_options): New array w/ the option in it.
9756         * java-tree.h (flag_bounds_check): Add decl.
9757         * lang-options.h: New file.
9758         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
9759         of a static macro value.
9760         (JAVA_ARRAY_EXCEPTION): Delete macro.
9761
9762 Fri Jan 23 14:19:47 1998  Per Bothner  <bothner@cygnus.com>
9763
9764         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
9765         * expr.c (build_anewarray):  Add missing promote_type.
9766
9767 Thu Jan 22 17:43:45 1998  Per Bothner  <bothner@cygnus.com>
9768
9769         Add array types with known length to optimize bounds checking.
9770         * typeck.c (build_java_array_type):  Take length parameter.
9771         (java_array_type_length, build_prim_array_type):  New functions.
9772         * java-tree.h:  Update for new functions.
9773         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
9774         * class.c:  Use build_prim_array_type.
9775         * expr.c (can_widen_reference_to):  Handle known-length array types.
9776         (verify_jvm_instructions):  Keep track of integer push instructions
9777         followed by newarray/anewarray, so we can build known-length arrays.
9778         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
9779         (java_array_data_offset):  New function.
9780         (build_java_array_length_access):  New function.  Optimize if constant.
9781         (build_java_arrayaccess):  Constant fold bounds check.
9782         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
9783         (build_newarray, build_anewarray):  New functions.
9784         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
9785         * verify.c (merge_types):  Handle known-lengh array types.
9786
9787 Mon Jan 19 13:09:25 1998  Per Bothner  <bothner@cygnus.com>
9788
9789         * expr.c (expand_byte_code):  Fix performace bug, which caused
9790         searching linenumber_table to be linear rather than constant.
9791
9792 Fri Dec 12 19:18:42 1997  Per Bothner  <bothner@cygnus.com>
9793
9794         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
9795
9796         * decl.c, java-tree.h (soft_fmod_node):  New global.
9797         * decl.c (init_decl_processing):  Define __builtin_fmod.
9798         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
9799         using __builtin_fmod.
9800
9801 Thu Dec  4 13:22:59 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9802
9803         * keyword.h: New file, output of keyword.gperf as processed by
9804         gperf.
9805         * lex.c (java_lex_init): Initialize java_error_flag.
9806         * parse.c (YYERROR_NOW): Uses java_error_flag.
9807         * parse.y: New static java_error_flag. Useless definition of
9808         buffer_error gone.
9809         * parse.y (java_error): Portable error recovery using
9810         java_error_flag (not yet completely tuned).
9811
9812 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
9813
9814         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
9815
9816 Wed Dec  3 18:37:42 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9817
9818         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
9819         (parse.c, lex.c, keyword.h): New rules for Java source code
9820         front-end.
9821         * parse.c: Renamed into jcf-parse.c.
9822         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
9823         * keyword.gperf: New file, Java keywords.
9824         * parse.y: New file, Java language grammar.
9825         * parse.h: New file, Java language grammar definitions.
9826         * lex.c: New file, Java language lexer.
9827         * lex.h: New file, Java language lexer definitions.
9828
9829 Wed Dec  3 17:00:17 1997  Per Bothner  <bothner@cygnus.com>
9830
9831         * decl.c (clinit_identifier_node), java-tree.h:  New global.
9832         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
9833         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
9834         * expr.c (expand_java_field_op):  Check for invalid assignment
9835         to final field.
9836
9837         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
9838
9839 Mon Oct 27 17:46:36 1997  Per Bothner  <bothner@cygnus.com>
9840
9841         * verify.c (verify_jvm_instructions):  When processing a handler,
9842         attempt to set the current_subr to the right value.
9843         (More complicated code combines Sep 17 and Oct 22 versions.)
9844
9845 Fri Oct 24 11:36:54 1997  Per Bothner  <bothner@cygnus.com>
9846
9847         * class.c (push_class):  Figure out (guess) name of source file.
9848         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
9849         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
9850         (parse_class_file):  Change return type from int to void.
9851         Call debug_start_source_file/debug_end_source_file.
9852
9853         * expr.c (build_java_binop):  Fix masking 2nd operand.
9854         * decl.c (init_decl_processing):  Set sizetype first.
9855
9856 Wed Oct 22 19:39:05 1997  Per Bothner  <bothner@cygnus.com>
9857
9858         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
9859         (Revert Sep 17 change.)
9860
9861 Tue Oct 21 15:09:02 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9862
9863         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
9864         .class extension in their name and fix thing so we don't process
9865         them parse_zip_file_entries().
9866         (parse_zip_file_entries): Cleaned unused local variables.
9867
9868 Mon Oct 20 14:52:42 1997  Per Bothner  <bothner@cygnus.com>
9869
9870         * expr.c (can_widen_reference_to):  Allows equal array element types.
9871         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
9872         * jcf-dump.c (RET):  Get (and print) index.
9873
9874         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
9875         Promote element type to POINTER_TYPE.
9876
9877 Mon Oct 20 13:40:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9878
9879         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
9880         find_in_current_zip, jcf_figure_file_type): Moved from
9881         jcf-reader.c to parse.c.
9882         * zextract.c: (read_zip_archive): takes file_comment_length possible
9883         field into account.
9884
9885 Mon Oct 20 11:45:06 1997  Per Bothner  <bothner@cygnus.com>
9886
9887         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
9888
9889         * verify.c (merge_types):  Handle array types even better ...
9890
9891 Fri Oct 17 15:56:37 1997  Per Bothner  <bothner@cygnus.com>
9892
9893         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
9894
9895         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
9896         * class.c (make_class_data):  Don't build fields_decl if no fields.
9897         When building fields_decl, skip if DECL_ARTIFICAL.
9898
9899         * expr.c (java_stack_swap):  Update stack_type_map.
9900         * verify.c (merge_types):  Handle array types better.
9901
9902 Wed Oct 15 18:09:45 1997  Per Bothner  <bothner@cygnus.com>
9903
9904         * class.c (add_field):  Don't promote short integral fields to
9905         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
9906         * expr.c (push_value):  Promote and convert short integral values.
9907
9908         * decl.c, java-tree.h (integer_two_node):  New constant node.
9909         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
9910
9911 Wed Oct 15 17:04:50 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9912
9913         * class.c (append_gpp_mangled_type): Use function argument
9914         unpromoted type to generate mangled name.
9915
9916 Mon Oct 13 16:52:55 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9917
9918         * constants.c (build_constant_data_ref): Now uses current_class
9919         instead of main_class.
9920         (build_constants_constructor): Now uses current_class instead of
9921         main_class.
9922         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
9923         of the global variable SeepZipFiles done here.
9924         * zextract.c (read_zip_archive): extra_field optional field taken
9925         into account while computing the position of the class file in the
9926         archive.
9927         * verify.c (verify_jvm_instructions): Use current_jcf to search
9928         the constant pool.
9929         * parse.c (load_class): First search for the class to load in the
9930         current zip file. Saves current_jcf (restored before returning
9931         from that function). Don't call JCF_FINISH in the class was found
9932         in the current ZIP file.
9933         (jcf_parse): If the class was found in the current ZIP file, save
9934         its tree_constant_pool (for later reuse).
9935         (parse_class_file): New function. Process each method defined in
9936         the current class and record the class as to be later registered.
9937         (yyparse): Rewritten. Figure the type of the current file and switch
9938         accordingly.
9939         * lang.c: New global variable current_jcf.
9940         (lang_init): Removed compiling_from_source test (done later, in
9941         yyparse). Removed call the jcf_parse ().
9942         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
9943         (typedef struct JCF): New fields seen_in_zip (to mark a class found
9944         in the current ZIP file) and zip_offset (offset to the class data in
9945         the current zip file).
9946         * jcf-reader.c: zipfile.h included.
9947         localToFile: New ZipFileCache static global variable
9948         (parse_zip_file_entries): New function. Browse the current ZIP
9949         file directory and process each class found.
9950         (process_zip_dir): New function. Register each class found in the
9951         ZIP file directory. The class aren't parsed but a valid JCF is
9952         link to each of them.
9953         (find_in_current_zip): New function. Search for a class in the
9954         current ZIP file directory. If found, prepare the class so that it
9955         can be loaded.
9956         (jcf_figure_file_type): New function. Examine the file structure
9957         to figure a class file, a ZIP file. If none of these categories are
9958         matched, a source file is assumed.
9959         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
9960         SeenZipFile: New global variable.
9961         (open_in_zip): Use zipmember's length to accelerate the search for
9962         a member. If zipmember was NULL and zip file successfully read,
9963         return 0.
9964         * java-tree.h: New global variable current_jcf declared.  Added
9965         declaration for current_constant_pool_tags, current_constant_pool_data,
9966         current_constant_pool_length, current_constant_pool_data_ref.
9967         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
9968         store the JCF of classes seen in a zip file) and tree *constant_pool
9969         (to save a loaded class constant pool). current_class declared here.
9970         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
9971         retrieve method_ref_constant.
9972         (PUSHC): java_push_constant_from_pool now uses current_jcf.
9973         (OBJECT): get_class_constant now uses current_jcf.
9974         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
9975         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
9976         (expand_invoke): Now uses current_class instead of main_class
9977         (build_class_init): Now uses current_class instead of main_class
9978         * class.c: New static global variable registered_class.
9979         (register_class): New function.
9980         (emit_register_class): Modified to use registered_class instead of
9981         main_class
9982         (is_compiled_class): Now take into account class seen in the archive.
9983
9984 Mon Oct  6 12:03:23 1997  Per Bothner  <bothner@cygnus.com>
9985
9986         * except.h:  Renamed to: java-except.h.
9987         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
9988         * except.c:  Add semi-working (commented out) implementation.
9989
9990         * expr.c (expand_iinc):  Add needed flush_quick_stack.
9991         * parse.c (set_source_filename):  New function.
9992         (give_name_to_class):  Set input_filename from package.classname.java.
9993
9994         * jcf-io.c (find_class):  Don't look first in ".".
9995
9996 Wed Oct  1 11:26:10 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9997
9998         * zextract.c (read_zip_archive): Now takes into account the
9999         extra_field field.
10000         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
10001
10002 Sat Sep 20 12:44:28 1997  Per Bothner  <bothner@cygnus.com>
10003
10004         * constants.c, java-tree.h (build_internal_class_name):  New function.
10005         (alloc_class_constant):  Re-implement using build_internal_class_name.
10006         * class.c (make_class_data):  Likewise.
10007         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
10008
10009 Wed Sep 17 13:15:23 1997  Per Bothner  <bothner@cygnus.com>
10010
10011         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
10012         to NULL before pushing an exception handler target.
10013
10014         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
10015         (java_stack_swap, java_stack_dup):  Re-write to be safe from
10016         clobbering registers.
10017         (build_class_init):  New function.
10018
10019 Wed Sep 17 11:02:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10020
10021         * typeck.c (build_java_array_type): Temporary use
10022         permanent_obstack to create the array 'length' field.
10023         * expr.c (lookup_label): Temporay use permanent_obstack to create
10024         label if not found.
10025         * class.c (push_super_field): Tempory use permanent_obstack.
10026
10027 Mon Sep 15 11:33:31 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10028
10029         * typeck.c (type_for_mode): Now handles double_type_node and
10030         float_type_node.
10031         * verify.c (verify_jvm_instructions): The instruction following
10032         the wide bytecode is checked. OPCODE_ret added to the list of
10033         wide.
10034
10035 Thu Sep 11 19:45:18 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10036
10037         * class.c (make_class): Temporary use permanent_obstack. Set the
10038         class CLASS_P field to 1.
10039         (push_class): Temporary use permanent_obstack.
10040         (set_super_info): Temporary use permanent_obstack.
10041         (add_method): Temporary use permanent_obstack, set
10042         METHOD_TRANSIENT().
10043         (add_field): Temporary use permanent_obstack. Sets
10044         FIELD_VOLATILE() and FIELD_TRANSIENT().
10045         (build_class_ref): Temporary use permanent_obstack if the class
10046         isn't compiled.
10047         (build_static_field_ref): Temporary use permanent_obstack when
10048         creating field's rtl.
10049         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
10050         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
10051         and fields. Function finalized, as far as flag handling.
10052         (push_class_static_dummy_field): Temporary use permanent_obstack.
10053         (emit_register_class): Force generation of class registration at
10054         -O3 or deeper.
10055         * decl.c (end_java_method): Call permanent_allocation() before
10056         returning.
10057         * expr.c (can_widen_reference_to): Added comment to interface
10058         handling, fixed typo.
10059         (lookup_field): Now uses CLASS_P() to correct FIXME
10060         (expand_invoke): Verification on public && !static &&
10061         !abstract moved into soft_lookupinterfacemethod (kaffe).
10062         Use Object class dtable if objectref is an array when expanding
10063         invokeinterface.
10064         (java_push_constant_from_pool): Temporary use permanent_obstack
10065         for CONSTANT_string
10066         * parse.c (get_ref_constant): Temporary use permanent_obstack to
10067         create constant references.
10068         (get_constant): Temporary use permanent_obstack to create constant.
10069         (load_class): Temporary use permanent_obstack to load class.
10070         (jcf_parse): Temporary use permanent_obstack to perform class
10071         layout.
10072         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
10073         (build_java_signature): Temporary use permanent_obstack.
10074         * verify.c: (verify_jvm_instruction): removed unecessary verification
10075         on ACC_SUPER flag.
10076         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
10077         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
10078         (CLASS_P): Defined
10079
10080 Thu Sep 11 11:57:32 1997  Per Bothner  <bothner@cygnus.com>
10081
10082         * class.c (append_gpp_mangled_type):  Fix typo.
10083         (emit_register_class):  Use main_class to get class object, rather
10084         than looking for no-longer-existing static decl starting with _CL.
10085         * typeck.c (parse_signature_type):  Promote array element type
10086         if it is a RECORD_TYPE.
10087
10088 Wed Sep 10 16:09:23 1997  Per Bothner  <bothner@cygnus.com>
10089
10090         * class.c (push_class_static_dummy_field):  New function.
10091         (mangle_static_field):  New. Do G++-style mangling of static fields.
10092         (layout_class):  Mandle static fields here, not in add_field.
10093         (build_class_ref):  The class object is now a dummy static field.
10094         * decl.c (find_local_variable):  Look for best, instead of first match.
10095         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
10096         (build_java_athrow):  Don't check here if exception is Throwable.
10097         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
10098         (TYPE_USED):  Removed.  No longer used ...
10099         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
10100         * verify.c (push_pending_label):  New function.
10101         (push_pending_block):  Renamed to check_pending_block.
10102         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
10103         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
10104         re-checking possible handlers) after a store (less wasted work).
10105         Check for null handler (finally) before calling add_handler.
10106         Various changes to (finally?) correctly handle try/finally.
10107
10108 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
10109
10110         * class.c: Include stdio.h.
10111
10112 Thu Sep  4 21:30:55 1997  Per Bothner  <bothner@cygnus.com>
10113
10114         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
10115         to make sure class is initialized before static/special invoke.
10116
10117         * verify.c (verify_jvm_instructions):  On a store instruction,
10118         call find_local_variable to force pre-allocation of decl and rtx.
10119         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
10120
10121 Wed Sep  3 16:13:23 1997  Per Bothner  <bothner@cygnus.com>
10122
10123         * class.c (build_class_ref):   Strip off "promoted_" if need be.
10124         (make_field_value): Call build_java_signature when needed.
10125         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
10126         * expr.c (build_java_athrow):  Don't push_value of exception.
10127         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
10128         match specification of [fd]cmp[lg] for NaNs.
10129         (expand_byte_code):  Add support for exception handler ranges.
10130         * except.c:  Add skeleton for EH code-generation.
10131         * verify.c (merge_types):  Treat all promoted integral types as equal.
10132         * constants.c (build_constants_constructor):  To force creation of
10133         current_constant_pool_data_ref, call build_constant_data_ref.
10134
10135         * javaop.def (lload):  Fix typo.
10136         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
10137
10138 Tue Sep  2 17:37:25 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
10139
10140         * parse.c: Don't include function.h.
10141
10142 Wed Aug 27 18:33:04 1997  Per Bothner  <bothner@cygnus.com>
10143
10144         * except.[ch]:  New files.
10145         * Makefile.in (JAVA_OBJS):  Add except.o
10146         * expr.c:  Temporary warning about unimplemented exceptions.
10147         * verify.c:  Verify exception handlers.
10148
10149         * jcf-dump.c (disassemble_method):  Print exception table.
10150
10151 Wed Aug 27 13:26:58 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10152
10153         * expr.c (verify_jvm_instructions): Started a thorough
10154         verification of invoke* bytecodes.
10155         (expand_byte_code): flush quick stack if PC is the target of a
10156         branch.  and undef RET (conflicting with config/i386/i386.h).
10157         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
10158         used.
10159         (expand_invoke): Now handles invokeinterface and do more
10160         verification according to the bytecode.
10161         (lookup_field): Don't try to load the class if processing
10162         dtable_type.
10163         (can_widen_reference_to): Now handles interfaces.
10164         * decl.c (init_decl_processing): New global variable
10165         soft_lookupinterfacemethod_node, declared in java-tree.h.
10166         Call set_super_info on string_type_node.
10167         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
10168         defined.
10169         * class.c (set_super_info): Fills the CLASS_* flags according to
10170         access_flags.
10171         (get_access_flags_from_decl): Handles all class flags.
10172
10173 Tue Aug 26 18:54:34 1997  Per Bothner  <bothner@cygnus.com>
10174
10175         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
10176         * parse.c (yyparse):  Check for abstract method, and missing code.
10177         * expr.c (expand_byte_code):  Change interface.
10178         * lang.c (put_decl_node):  Print promoted types prettier.
10179         * verify.c (verify_jvm_instruction):  Change interface.
10180         Partial support for scanning exception table.
10181         For load instructions, handle promoted integral types.
10182
10183 Thu Aug 21 13:48:01 1997  Per Bothner  <bothner@cygnus.com>
10184
10185         * verify.c:  New file, with contents moved from expr.c.
10186         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
10187         * typeck.c (is_array_type_p):  Moved here from expr.c.
10188         * java-tree.h:  Add some now-needed function declarations.
10189         * Makefile.in (JAVA_OBJS): Added verify.o.
10190
10191 Wed Aug 20 14:34:34 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10192
10193         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
10194         METHOD_ABSTRACT flag.
10195
10196         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
10197         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
10198         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
10199
10200         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
10201         variables.
10202         (start_java_method): Hook for SYNCHRONIZED methods.
10203
10204         * expr.c (build_java_jsr, build_java_ret): New functions
10205         (JSR,PRE): New macros
10206         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
10207         (verify_jvm_instructions): tableswitch, lookupswitch,
10208         monitorenter, monitorexit, goto_w: verified.
10209         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
10210         (build_java_monitor): New function.
10211         (MONITOR_OPERATION): Modified to call build_java_monitor()
10212         (verify_jvm_instructions): Started a thorough verification of
10213         invoke* bytecodes.
10214
10215 Tue Aug 19 13:35:49 1997  Per Bothner  <bothner@cygnus.com>
10216
10217         Support verification of jsr/ret subroutines (used for try/finally).
10218         * decl.c (return_address_type_node):  New type node.
10219         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
10220         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
10221         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
10222         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
10223         TYPE_USED):  New macros for special types in type_map.
10224
10225         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
10226         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
10227         BCODE_JUMP_TARGET.
10228         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
10229
10230         * expr.c (can_widen_reference_to):  New function.
10231         (pop_type):  Use it.
10232         (merge_type_state):  Support handling start of subroutine.
10233         (push_pending_block):  Return char* error message, instead of calling
10234         fatal on an error.  Also handle subroutines.
10235         (verify_jvm_instructions):  Handle errors from push_poending_block.
10236         Support jsr and ret instructions.
10237
10238 Tue Aug 19 13:33:36 1997  Per Bothner  <bothner@cygnus.com>
10239
10240         * jcf-io.c (find_classfile):  Fix thinko.
10241         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
10242
10243 Tue Aug 12 20:14:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
10244
10245         * Makefile.in (BISON): Remove.
10246
10247 Thu Aug  7 23:08:24 1997  Per Bothner  <bothner@cygnus.com>
10248
10249         * Makefile.in:  Convert to autoconf.
10250         * config-lang.in (outputs):  Added java/Makefile.
10251
10252         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
10253         Rename cc1java to jc1.
10254
10255         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
10256         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
10257
10258         * class.c (class_depth):  Do load_class if needed.
10259
10260         Mostly better verification.
10261         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
10262         (init_decl_processing):  Change return type of soft_checkcast.
10263         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
10264         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
10265         lang_print_error):  New functions.
10266         (lang_init):  Set global hook print_error_function to lang_print_error.
10267         * expr.c:  In the type_map ptr_type_node is only used for null now.
10268         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
10269         (merge_types):  Dererence pointer to record types before comparing.
10270         (decode_newarray_type, merge_types):  On error just return NULL.
10271         (build_java_binop):  Add preliminary implementation (with warning)
10272         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
10273         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
10274         (expand_compare, expand_java_goto, expand_java_call):  Don't
10275         push_pending_block, since that only makes sense when verifying.
10276         (merge_type_state):  Different return codes.
10277         (push_pending_block):  A block may need to be verified more than once.
10278         (expand_byte_code):  Warn about unused code at code generation time.
10279         (verify_jvm_instruction):  Changed logic, since code may need to be
10280         re-verified if type-state has changed.  Also, better error handling.
10281         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
10282         Improve newarray, anewarray, ?aload, athrow,
10283         * java-tree.h (LABEL_CHANGED):  New macro.
10284
10285 Tue Aug  5 12:21:27 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10286
10287         * decl.c (soft_athrow_node): New global variable initialized.
10288         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
10289         * typeck.c (convert): Added support for REAL_TYPE.
10290         (convert_to_char): New function.
10291         (convert): Handle CHAR_TYPE.
10292         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
10293         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
10294         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
10295         promoted type.
10296         (verify_jvm_instructions): Added break a the end of bogus unop: label.
10297         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
10298         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
10299         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
10300         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
10301         to Use The Right Things.
10302         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
10303         compatible with INT. BOOLEAN is made equivalent to BYTE.
10304         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
10305         OPCODE_ifnonnull): Now supported.
10306         (build_java_athrow): New function.
10307
10308 Mon Aug  4 15:46:45 1997  Per Bothner  <bothner@cygnus.com>
10309
10310         Rename method name <init> to match G++ (and fix mangling).
10311         * class.c (layout_class):  Replace method name of <init> by class name.
10312         (make_method_value):  Do inverse renaming of constructor from <init>.
10313         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
10314         * typeck.c (lookup_java_constructor):  New function.
10315         * expr.c (expand_invoke):  If method_name is <init>, call
10316         lookup_java_constructor to find constructor.
10317
10318         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
10319
10320 Fri Aug  1 11:37:09 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10321
10322         * parse.c (get_class_constant): Modified to handle array "classes"
10323         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
10324         wide type.
10325         (convert): Modified to handle real type.
10326         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
10327         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
10328         variables declared.
10329         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
10330         soft_multianewarray, soft_newarray_node, soft_throw_node): New
10331         global variables initialized.
10332         (find_local_variable): Handles the case of a pointer
10333         (end_java_method): Restore the use of one more scope
10334         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
10335         build_java_array_length_access, expand_java_arrayload,
10336         expand_java_arraystore, expand_java_array_length,
10337         expand_java_multianewarray, expand_java_anewarray,
10338         build_java_check_indexed_type, is_array_type_p,
10339         build_java_throw_out_of_bound_exception): New functions.
10340         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
10341         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
10342         OPCODE_<t>aload): Implemented code for verification.
10343         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
10344         ARRAY_NEW_MULTI): Macro defined.
10345         (CONVERT): Modified to invoke convert().
10346         (case OPCODE_aload2): Fixed index typo from 2 to 1.
10347
10348 Thu Jul 31 12:48:18 1997  Per Bothner  <bothner@cygnus.com>
10349
10350         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
10351         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
10352         (make_class_data):  Field name needs '/' as package prefix.
10353         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
10354
10355 Fri Jul 25 11:44:21 1997  Per Bothner  <bothner@cygnus.com>
10356
10357         Implement debug information for local variables.
10358         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
10359         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
10360         DECL_LOCAL_SLOT_CHAIN):  New macros.
10361         (struct lang_decl_var):  New type.
10362         * parse.c (give_name_to_locals):  Move to decl.c.
10363         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
10364         (start_java_method):  Re-write parameter handling.
10365         (pending_local_decls):  New global variable.
10366         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
10367         (find_local_variable):  Accept pc so we can skips decls not in range.
10368         (struct binding_level):  Add end_pc field.
10369         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
10370         (various):  Change so current pc gets passed to find_local_variable.
10371
10372         * decl.c (init_decl_processing):  Re-arrange fields in
10373         class_type_node and and method_type_node to match kaffe 0.9.1.
10374         * class.c (make_method_value, make_class_data):  Update
10375         initializations to match.
10376
10377 Wed Jul 16 17:17:50 1997  Per Bothner  <bothner@cygnus.com>
10378
10379         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
10380         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
10381         (push_super_field):  New function.
10382         (make_class_data):  Handle inheritance of class static initializer.
10383         (layout_class):  New name mangling.
10384         * constants.c (build_constant_data_ref):  Init type of data array
10385         to a one-element array.
10386         (build_constants_constructor):  Set DECL_SIZE from complete array type.
10387         * decl.c:  Rename class_type, object_type etc to class_type_node,
10388         object_type_node etc.  Make former inherit from latter.
10389         * expr.c (expand_invoke):  Add cast of function address.
10390         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
10391         * parse.c (yyparse):  Don't call layout_class here.
10392         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
10393
10394 Sat Jun 14 12:06:57 1997  Per Bothner  <bothner@cygnus.com>
10395
10396         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
10397         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
10398         (alloc_class_constant):  New.
10399         * expr.c (expand_invoke):  Make sure method's class is initialized.
10400         * class.c (interits_from_p, emit_register_class):  New functions.
10401         * parse.c (yyparse):  Call emit_register_class.
10402
10403 Mon Jun  9 18:08:06 1997  Per Bothner  <bothner@cygnus.com>
10404
10405         * constants.c:  New file, to handle constant pool.
10406         * Makefile.in (JAVA_OBJS):  Add constants.o.
10407         * decl.c (init_decl_processing):  Update, fix, finish various structs.
10408         (pushdecl_top_level):  New.
10409         * parse.c (layout_class):  Moved to class.c.
10410         * expr.c (java_push_constant_from_pool):  New function.
10411         * class.c (build_class_ref):  Make work fully
10412         (make_class_data):  Emit super-class, constant pool, interface vector.
10413
10414 Tue Jun  3 10:14:31 1997  Per Bothner  <bothner@cygnus.com>
10415
10416         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
10417         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
10418         * class.c (class_depth):  New function.
10419         (lookup_named_class):  Replaced by new function lookup_class.
10420         * decl.c (object_type_node, string_type_node):  New.
10421         Remove various types that we no longer need.
10422         * expr.c (verify_jvm_instructions):  New separate verifier pass.
10423         (push_type, pop_type):  New functions for verifier.
10424         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
10425         (expand_byte_code):  Simplify, since we assume already verified.
10426         (expand_invoke):  Now mostly works.
10427         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
10428         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
10429         * parse.c:  Wait to allocate class object until we know its name.
10430         (layout_class):  Calculate DECL_VINDEX for each virtual method.
10431         * typeck.c (get_array_type):  Rename to ...
10432         (build_java_array_type):  ... and provide working implementation.
10433         (build_java_signature):  New function - build Java signature of type.
10434         (set_java_signature):  New function - cache signature with type.
10435         (lookup_java_method):  New function.
10436
10437 Tue May  6 22:08:24 1997  Per Bothner  <bothner@deneb.cygnus.com>
10438
10439         * class.c (ident_subst):  Take extra SUFFIX parameter.
10440         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
10441         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
10442         (build_class_ref):  Actually implement.
10443         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
10444         * decl.c (builtin_function):  New.
10445         (init_decl_processing):  Update for current Kaffe.  Declare some
10446         builtin Kaffe functions.
10447         * expr.c (build_address_of):  New.
10448         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
10449         Renamed (from expand_java_new etc), and added working implementations.
10450         (build_field_ref):  Now also handle static fields.
10451         (expand_invoke):  Implement invokestatic, and start implement rest.
10452         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
10453         * javaop.def:  Rename invokevirt -> invokevirtual.
10454         * lang.c (use_handles):  Removed.
10455         * parse.c:  Add support for ConstantValue atribute.
10456         Handle nested loading of a class.  (JPOOL_UTF):  New.
10457
10458 Tue Mar 11 20:11:05 1997  Per Bothner  <bothner@deneb.cygnus.com>
10459
10460         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
10461
10462 Thu Feb 27 14:24:29 1997  Per Bothner  <bothner@deneb.cygnus.com>
10463
10464         * Make-lang.in (java.install-man):  New empty rule.
10465         * typeck.c (set_local_type):  New function.
10466         * expr.c (STORE_INTERNAL):  Call find_local_variable,
10467         not find_stack_slot.  Call set_local_type.
10468
10469 Wed Feb 12 16:11:05 1997  Per Bothner  <bothner@kalessin.cygnus.com>
10470
10471         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
10472         and building RECORD_TYPE CONSTRUCTORs.
10473         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
10474
10475         * lang.c (use_handles):  Change the default to 0.
10476         * decl.c:  Define and build class_type, field_type, utf8const_type.
10477         * class.c (make_class_data, make_field_value,
10478         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
10479         hashUtf8String, strLengthUtf8, mangled_classname:
10480         Functions to build reflective data structures.
10481         * parse.c (yyparse):  Call make_class_data.
10482
10483         * jcf-io.c (open_class, find_classfile):  New functions.
10484         * jcf-dump.c:  Support reading classfile from explicitly-named
10485         class file (without CLASSPATH searching).
10486
10487 Thu Oct 24 14:10:16 1996  Per Bothner  <bothner@deneb.cygnus.com>
10488
10489         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
10490         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
10491         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
10492         (get_constant):  Now trivial for CONSTANT_Utf8.
10493
10494         * jcf.h:  Make NEW_CPOOL the default.
10495         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
10496
10497 Thu Oct 24 13:52:45 1996  Per Bothner  <bothner@deneb.cygnus.com>
10498
10499         New directory.