OSDN Git Service

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