OSDN Git Service

* gcj.texi: Markup for man page generation. Document missing
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2001-12-14  Matthias Klose  <doko@debian.org>
2
3         * gcj.texi: Markup for man page generation. Document missing
4         options printed by <tool> --help.
5         Terminate description of gij's -ms option with a dot.
6         * Make-lang.in ($(srcdir)/java/*.1): New targets.
7         (java.generated-manpages java.install-man, java.uninstall,
8         java-maintainer-clean) Updated.
9
10 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
11
12         * class.c (get_dispatch_table): Fix java vtable layout
13         for TARGET_VTABLE_USES_DESCRIPTORS.
14         * decl.c (java_init_decl_processing): Initialize
15         alloc_no_finalizer_node, finalize_identifier_node.
16         * expr.c (class_has_finalize_method): New function.
17         (expand_java_NEW): Generate calls for finalizer-free allocation.
18         (build_invokevirtual): Fix java vtable layout for
19         TARGET_VTABLE_USES_DESCRIPTORS.
20         * java-tree.h (enum java_tree_index): New entries: 
21         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
22         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
23         (class_has_finalize_method): declare.
24         (HAS_FINALIZER_P): New macro.
25         * parse.y (patch_invoke): Generate calls for finalizer-free
26         allocation.
27
28 2001-12-12  Matthias Klose  <doko@debian.org>
29
30         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
31         whitespace at end of line.
32
33 2001-12-11  Tom Tromey  <tromey@redhat.com>
34
35         * lex.c (java_init_lex): Define wfl_to_string as
36         gnu.gcj.runtime.StringBuffer unless generating bytecode.
37
38 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
39
40         * class.c (make_method_value): Use null_pointer_node to
41         represent empty exception table.
42
43 2001-12-10  Tom Tromey  <tromey@redhat.com>
44
45         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
46
47 Mon Dec 10 06:09:57 2001  Douglas B. Rupp  <rupp@gnat.com>
48
49         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
50
51 2001-12-09  Per Bothner  <per@bothner.com>
52
53         * check-init.c (current_switch_has_default):  New static field.
54         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
55         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
56         DEFAULT_EXPR seen, simulate a default alternative that copies state.
57
58 2001-12-09  Tom Tromey  <tromey@redhat.com>
59
60         * check-init.c (check_init): Don't allow pre- or post- increment
61         or decrement of final variable.
62         (final_assign_error): Minor error message rewording.
63
64 2001-12-08  Tom Tromey  <tromey@redhat.com>
65
66         * java-tree.h: Fixed typo.
67
68         * gjavah.c (decompile_method): Don't decompile to `return this'
69         for static methods.
70
71         * gjavah.c (cxx_keywords): Re-sorted.
72         * lex.c (cxx_keywords): Re-sorted.
73
74         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
75         else.
76
77         * gjavah.c (print_namelet): Clear subnamelets.
78         (HANDLE_METHOD): Set `method_printed' earlier.
79
80 2001-12-07  Tom Tromey  <tromey@redhat.com>
81
82         * lang.c (lang_f_options): Added
83         optimize-static-class-initialization.
84         (java_decode_option): Removed special case.
85
86 2001-12-07  Per Bothner  <per@bothner.com>
87
88         * check-init.c (check_init):  Fix typo freeing memory twice.
89
90 2001-12-05  Per Bothner  <per@bothner.com>
91
92         Restore support for static class initialization optimization.
93         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
94         * check-init.c (check_int):  At end of BLOCK handle initialization
95         blocks, which used to be done in java_complete_expand_method but did
96         not handle the case where check_for_initialization might allocate
97         more than a word of bits.
98         * decl.c (lang_make_tree):  The smic field is now a tree.
99         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
100         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
101
102         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
103
104         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
105         Change from a hash table to a list.
106         (struct_lang_decl):  Change field 'smic' to match.
107         * class.c (add_method_1):  Initialize
108         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
109         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
110         (java_expand_method_bodies): -here, since 'smic' is now a list.
111         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
112
113         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
114
115         * class.c (java_hash_compare_tree_node):  Fix casts.
116
117 2001-12-04  Per Bothner  <per@bothner.com>
118
119         * check-init.c:   Handle definite unassignment to finals in addition
120         to definite assignment.
121         (loop_current_locals):  New field.
122         (num_current_locals, int start_current_locals, num_current_words):
123         Make static.
124         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
125         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
126         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
127         (get_variable_decl, check_final_reassigned):  New functions.
128         (check_init, check_bool_init):  Modify as needed for checking finals.
129         (check_for_initialization):  Take extra parameter and return void.
130         Do extra start-up logic to check final fields for assignment.
131         * parse.y (check_static_final_variable_assignment_flag,
132         reset_static_final_variable_assignment_flag, check_final_assignment,
133         check_final_variable_local_assignment_flag,
134         reset_final_variable_indirect_assignment_flag,
135         reset_final_variable_global_assignment_flag):  Remove functions.
136         (java_complete_expand_methods, outer_field_access_fix,
137         patch_assignment): Remove no-longer used logic.
138         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
139         * parse.y (register_fields, java_complete_tree):  Update accordingly.
140
141         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
142         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
143         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
144
145         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
146
147         * java-tree.h (DECL FINAL):  New bit-field.
148         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
149         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
150         (DECL_INIT_CALLS_THIS):  New macro.
151         (struct lang_decl):  New bit-field init_calls_this.
152         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
153         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
154         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
155         use it for both local variables and final fields.
156         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
157         and local_final.
158         (struct lang_type):  Remove hfv bit-field.
159         (check_for_initialization):  Change to return void.
160
161         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
162         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
163         * check-init.c (final_assign_error):  New helper function.
164         (check_final_reassigned, check_init):  Use it.
165         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
166         
167         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
168         bit-fields to unsigned.
169
170 2001-12-03  Per Bothner  <per@bothner.com>
171
172         * parse.y (patch_binop):  Minor constant folding.
173
174         * parse.y (build_current_thisn):  Shorter 'buffer'.
175
176 2001-12-03  Per Bothner  <per@bothner.com>
177
178         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
179         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
180         * jcf-write.c (generate_bytecode_insns):  Remove support for
181         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
182         * check-init.c (check_init):  Likewise.
183
184 2001-12-03  Per Bothner  <per@bothner.com>
185
186         * verify.c (subroutine_nesting):  New function.
187         (verify_jvm_instructions):  Use it to fix logic for checking that
188         we're done with the current subroutine.
189
190         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
191         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
192
193 2001-12-03  Per Bothner  <per@bothner.com>
194
195         * jcf.h:  Fix obvious typo in comment.
196         * typeck.c (build_null_signature):  Add comment.
197
198 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
199
200         * expr.c: Remove leading capital from diagnostic messages, as
201         per GNU coding standards.
202         * jcf-io.c: Similarly.
203         * jcf-parse.c: Similarly.
204         * jv-scan.c: Similarly.
205         * jvspec.c: Similarly.
206         * mangle.c: Similarly.
207
208 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
209             Alexandre Petit-Bianco  <apbianco@redhat.com>
210
211         * expr.c (build_java_arrayaccess): Call save_expr on array for 
212         correct evaluation order, modified comment, fixed indentation.
213         * parse.y: (patch_assignment): Correctly extract the array base
214         from the tree generate by build_java_arrayaccess, added comments.
215         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
216         Fixes PR java/3096, PR java/3803, PR java/3965.
217
218 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
219
220         * expr.c (expand_byte_code): Remove trailing periods from messages.
221         * jcf-parse.c (load_class, jcf_parse): Similarly.
222         * jcf-write.c (generate_classfile): Similarly.
223         * lex.c (java_lex): Similarly.
224
225 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
226
227         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
228
229 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
230
231         * Make-lang.in (java.generated-manpages): New dummy target.
232
233 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
234
235         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
236         ASM_FINAL_SPEC.
237         (lang_specific_pre_link): Use set_input to set input_filename.
238         Append `main' here.
239         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
240         (main): Fix definition.
241         Strip `main' from classname.
242         Fixes PR java/227.
243
244 2001-11-18  Roger Sayle <roger@eyesopen.com>
245
246         * parse.h (java_expand_switch): Remove old prototype.
247
248 2001-11-18  Tom Tromey  <tromey@redhat.com>
249
250         Fix for PR java/1401:
251         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
252         arg0 is null.
253         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
254         correctly.
255
256 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
257
258         * lang.c (finish_parse): Rename to java_finish.
259         (LANG_HOOKS_FINISH, java_finish): New.
260
261 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
262
263         * decl.c (init_decl_processing): Rename java_init_decl_processing.
264         * java-tree.h: New prototype.
265         * lang.c (java_init): Update prototype.  Combine with old init_parse.
266
267 2001-11-13  Tom Tromey  <tromey@redhat.com>
268
269         * gjavah.c (method_signature): New global.
270         (HANDLE_METHOD): Set it.
271         (decompile_return_statement): New function.
272         (decompile_method): Use it.
273         (print_method_info): Removed `synth' argument.
274
275 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
276
277         * java-tree.h (java_set_yydebug): New.
278         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
279         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
280         (print_lang_decl, print_lang_type, print_lang_identifier,
281         print_lang_statistics, lang_print_xnode): Remove.
282
283 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
284
285         * jcf-parse.c (init_lex): Remove.
286         * lang.c (language_string, lang_identify): Remove.
287         (struct lang_hooks): Constify.
288         (LANG_HOOKS_NAME): Override.
289         (init_parse): Update.
290
291 2001-11-08  Andreas Franck  <afranck@gmx.de>
292
293         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle 
294         program_transform_name the way suggested by autoconf.
295         (java.install-common): Also transform auxiliary program names with
296         program_transform_name.
297
298 2001-11-08  Tom Tromey  <tromey@cygnus.com>
299
300         * parse.y (trap_overflow_corner_case): New rule.
301         (unary_expression): Use it.
302         * lex.c (java_init_lex): Don't set minus_seen.
303         (yylex): Don't use minus_seen.  Communicate overflow to parser for
304         it to handle.
305         (error_if_numeric_overflow): New function.
306         * parse.h (minus_seen): Removed field.
307         (JAVA_RADIX10_FLAG): New define.
308
309 2001-11-07  Tom Tromey  <tromey@redhat.com>
310
311         Patch for PR java/1414:
312         * parse.y (case_label_list): New global.
313         (goal): Register case_label_list with GC.
314         (java_complete_lhs): Save new case on case_label_list.
315         (patch_switch_statement): Check for duplicate case labels.
316
317 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
318
319         * parse.y (patch_assignment): Removed unused third argument.
320         (java_complete_lhs): Removed unused third argument to patch_assignment.
321
322 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
323
324         * lang.c: Include langhooks-def.h.
325         * Make-lang.in: Update.
326
327 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
328
329         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
330
331 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
332
333         * mangle.c (find_compression_record_match): Don't match compression
334         records for package name elements unless they occur at the start of
335         the name. Fix for PR java/4717.
336
337 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
338
339         * expr.c (expand_java_field_op): Don't special-case references to
340         java.lang.PRIMTYPE.TYPE.
341         (build_primtype_type_ref): Removed.
342         * java-tree.h (build_primtype_type_ref): Remove prototype.
343         * parse.y (maybe_build_primttype_type_ref): Removed.
344         (complete_function_arguments): Don't special-case references to
345         java.lang.PRIMTYPE.TYPE.
346         (patch_assignment): Likewise.
347         (array_constructor_check_entry): Likewise.
348
349 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
350
351         * mangle.c (static tree compression_table): Fixed leading comment.
352         * parse.h (struct parser_ctxt): Fixed field comment.
353         * parse.y (check_pkg_class_access): New prototype, fixed leading
354         comment, new parameter used to emit error only if passed as true.
355         (parse_check_super): Pass extra argument to check_pkg_class_access.
356         (do_resolve_class): Likewise.
357         (process_imports): Likewise.
358         (read_import_dir): Fixed indentation.
359         (find_in_imports_on_demand): New local class_type_name. Local
360         node_to_use deleted. while loop changed into for loop. Report
361         multiple definition only for accessible classes. Improved error
362         message.
363         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
364         assigned to parameter list, fixed indentation. while loop changed
365         into for loop, restore TREE_CHAIN on local `tem' before the next
366         iteration.
367
368 Tue Oct 23 14:02:17 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
369
370         * lang.c (lang_get_alias_set): Deleted.
371
372 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
373
374         * gjavah.c (jni_print_char): Fix thinko in last change.
375
376         * gjavah.c (jni_print_char, decode_signature_piece): Use
377         safe-ctype macros and/or fold extra calls into fewer ones.
378         * lex.c (java_read_unicode, java_lex): Likewise.
379         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
380         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
381         * mangle_name.c (append_unicode_mangled_name,
382         unicode_mangling_length): Likewise.
383
384 2001-10-17  Richard Henderson  <rth@redhat.com>
385
386         * Make-lang.in (java/lang.o): Depend on langhooks.h.
387
388 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
389
390         * lang.c (langhooks.h): Included.
391         (LANG_HOOKS_INIT): Redefined.
392         (LANG_HOOKS_INIT_OPTIONS): Likewise.
393         (LANG_HOOKS_DECODE_OPTION): Likewise.
394         (struct lang_hooks lang_hooks): New initialization.
395
396 2001-10-11  Per Bothner  <per@bothner.com>
397
398         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
399         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
400         The former is simpler, and jcf-write.c handles it better.
401         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
402         or WITH_CLEANUP_EXPR.
403         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
404         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
405
406         * parse.y (patch_if_else_statement):  If the condition is constant,
407         optimize away the test.
408
409 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
410
411         * parse.y (patch_cast): Call patch_string on the first operand of
412         the incoming node, update it if necessary. Fixes PR java/4510.
413
414 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
415
416         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
417         when name qualifier matches a package name.
418
419 2001-10-08  Tom Tromey  <tromey@redhat.com>
420
421         Fix for PR java/4489:
422         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
423         force a new label when computing `body_block'.
424
425 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
426
427         * jcf-io.c (format_uint): Const-ify.
428         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
429         * lex.c (java_get_line_col): Likewise.
430         * parse.y (build_incdec): Likewise.
431
432 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
433
434         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
435         a NULL enclosing context if appropriate. Fixes PR java/4466.
436
437 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
438
439         * parse.y (patch_assignment): Use lvalue's original TYPE when
440         building the final COMPOUND_EXPR.
441         (try_reference_assignconv): Fixed leading comment.
442
443 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
444
445         * parse.y (check_final_variable_indirect_assignment): For
446         COMPOUND_EXPR, return only if finals were found initialized
447         properly, if not, keep on checking.
448         (check_final_variable_global_assignment_flag): New local
449         error_found, set when appropriate and used to decide whether to
450         report uninitialized finals. Fixed typo in comment.
451
452 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
453
454         * decl.c (init_decl_processing): Fixed typo in predef_filenames
455         last three initializations. Fixes PR java/4360.
456
457 2001-09-21  Richard Henderson  <rth@redhat.com>
458
459         * class.c (get_dispatch_table): Handle function descriptors.
460         (build_dtable_decl): Likewise.
461         * expr.c (build_invokevirtual): Likewise.
462
463 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
464
465         * parse.y (patch_method_invocation): Build class initialization
466         when static finals are used to qualify method invocation.
467         Fixes PR java/4366.
468
469 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
470
471         * parse.h: (WFL_STRIP_BRACKET): Re-written using
472         build_type_name_from_array_name.
473         (STRING_STRIP_BRACKETS): New macro.
474         * parse.y (build_type_name_from_array_name): New function.
475         (array_creation_expression:): Accumulate []s instead of [s.
476         (cast_expression:): Accumulate []s instead of [s after cast type
477         name.
478         (build_array_from_name): Local string deleted, use
479         build_type_name_from_array_name.
480         (build_unresolved_array_type): Accumulate []s instead of [s after
481         type name.
482         (register_fields): Fixed comment.
483         (resolve_class): Local name, base deleted, new locals tname and
484         array_dims. Use build_type_name_from_array_name. Use array_dims to
485         build array type.
486         (purify_type_name): Use STRING_STRIP_BRACKETS.
487
488 2001-09-18  Andreas Jaeger  <aj@suse.de>
489
490         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
491         * jv-scan.c: Likewise.
492
493 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
494
495         * parse.y (patch_method_invocation): Inner class creation context
496         check not enforced within constructors. Fixes PR java/1873.
497
498 2001-09-16  Tom Tromey  <tromey@redhat.com>
499
500         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
501         NOTE_PUSH for single-case push.  Fixes PR java/4189.
502
503 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
504
505         * java-tree.h (TYPE_IMPORT_LIST): New macro.
506         (TYPE_IMPORT_DEMAND_LIST): Likewise.
507         (struct lang_type): New fields import_list and import_demand_list.
508         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
509         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
510         (do_resolve_class): New local saved_enclosing_type, initialized,
511         passed as parameter to find_in_imports and find_in_imports_on_demand.
512         (find_in_imports): Added paramater enclosing_type, use its
513         TYPE_IMPORT_LIST when applicable.
514         (find_in_imports_on_demand): Added parameter enclosing_type, use
515         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
516         declaration and initialization.
517         (fold_constant_for_init): Switch/restore current_class to the
518         appropriate context.
519
520 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
521
522         * verify.c (verify_jvm_instructions): Fix typo.
523
524 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
525
526         * expr.c (expand_invoke): Const-ification.
527         * parse.y (patch_method_invocation): Likewise.
528
529 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
530
531         * gjavah.c (cxx_keywords): Const-ification.
532         * keyword.gperf (java_keyword): Likewise.
533         * lang.c (java_tree_code_name): Likewise.
534         * lex.c (cxx_keywords): Likewise.
535         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
536
537 2001-09-11  Richard Henderson  <rth@redhat.com>
538
539         * parse.h (ctxp_for_generation): Mark extern.
540
541 2001-09-10  Richard Henderson  <rth@redhat.com>
542
543         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
544
545 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
546
547         * typeck.c (java_array_type_length, build_prim_array_type):
548         Represent empty arrays by NULL index.
549
550 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
551
552         * java-tree.h (compile_resource_file): Grouped with other prototypes.
553         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
554
555 2001-09-06  Anthony Green  <green@redhat.com>
556
557         * class.c (O_BINARY): Define if necessary.
558         (registerResource_libfunc): Declare.
559         (init_class_processing): Initilize registerResource_libfunc.
560         (compile_resource_file): New function.
561         * java-tree.h (resource_name): Declare.
562         (compile_resource_file): Declare.
563         * jcf-parse.c (yyparse): Handle compiling java resource files.
564         * lang.c (java_decode_option): Handle -fcompile-resource option.
565         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
566         resource files.
567         * gcj.texi (Code Generation): Add documentation for -R flag.
568
569 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
570
571         * jcf-write.c (generate_classfile): Issue an error in case of
572         field/initial value mismatch.
573         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
574         being initialized and we're generating bytecode.
575         (java_complete_lhs): In MODIFY_EXPR section: added comments,
576         set DECL_INITIAL properly when appropriate.
577         Fixes PR java/4230
578         Fixes PR java/4204
579
580 2001-09-01  Per Bothner  <per@bothner.com>
581
582         * parse.y (maybe_yank_clinit):  A field without an initializer is not
583         relevant.  All initializers except static final and constant require
584         <clinit>, regardless of flag_emit_class_files.
585
586 2001-08-31  Per Bothner  <per@bothner.com>
587
588         * class.c (set_constant_value):  When not emiting class files, then a
589         String ConstantValue is a utf8const_ptr_type.
590
591 2001-08-30  Per Bothner  <per@bothner.com>
592
593         * jcf-write.c (generate_classfile):  Check that field is primitive
594         or string before emitting ConstantValue attribute.
595
596 2001-08-30  Per Bothner  <per@bothner.com>
597
598         * parse.y (resolve_qualified_expression_name):  If creating a
599         COMPOUND_EXPR, set it's type correctly.
600
601 2001-08-30  Per Bothner  <per@bothner.com>
602
603         * jcf-io.c (open_class):  Set filename field.
604
605         * jcf-parse,c (parse_class_file):  Set current_function_decl
606         for better error message when Code attribute is missing.
607
608         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
609         better diagnostics, especially for constructors.
610
611 2001-08-30  Per Bothner  <per@bothner.com>
612
613         * jcf-write.c (generate_classfile):  Don't write ConstantValue
614         attribute if field is not final, for compatibility with jdk.
615
616         * jcf-write.c (generate_classfile):  Convert ConstantValue values
617         to correct type.  Work-around for front-end bug.
618         * class.c (set_constant_value):  Error if constant has wrong type.
619
620 2001-08-30  Per Bothner  <per@bothner.com>
621
622         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
623         "Double" are printed at verbosity 1.
624
625         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
626
627         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
628
629 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
630
631         * parse.y (patch_assignment): Don't verify final re-assignment here.
632         (java_complete_lhs): Verify assignments to finals calling
633         patch_assignment. Verify re-assignments to finals before calling
634         patch_assignment.
635
636 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
637
638         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
639         Fixes PR java/1413
640
641 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
642
643         * lex.c (java_lex): new local found_hex_digits. Set and then used
644         in test to reject invalid hexadecimal numbers.
645         * parse.y (java_complete_tree): Prevent unwanted cast with
646         initialized floating point finals.
647         (patch_binop): Emit a warning when detecting a division by zero,
648         mark result not constant, don't simplify non integer division.
649
650 2001-08-28  Per Bothner  <per@bothner.com>
651
652         * jcf-write.c  (generate_bytecode_insns):  For increments and
653         decrements just recurse to push constant.  Improvement on Mark's patch.
654
655 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
656
657         * jcf-write.c (generate_bytecode_insns): Generate an integer to
658         real conversion for increments and decrements of reals.
659
660 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
661
662         * parse.y (resolve_qualified_expression_name): Handle unresolved
663         qualified expressions, prevent numerical qualifiers, fixed typo.
664         Fixes PR java/4141
665
666 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
667
668         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
669         don't report anything but deprecated class when marked so. Handle
670         VAR_DECL.
671         (patch_method_invocation): Check deprecation on methods and types.
672         (patch_binop): code becomes an enum tree_code, added default: to
673         switch to handle that. Detect division by zero, try to fold and
674         return before using a subroutine.
675
676 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
677
678         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
679         file smaller than 4 bytes.
680         * parse.y (check_inner_circular_reference): New function.
681         (check_circular_reference): Likewise.
682         (array_initializer:): Accept {,}.
683         (java_check_circular_reference): Rewritten using
684         check_circular_reference and check_inner_circular_reference.
685         (java_complete_expand_method): Unconditionally save and restore
686         the unpurged exception list.
687         (build_dot_class_method_invocation): Unmangle signature parameter.
688
689 2001-08-21  Tom Tromey  <tromey@redhat.com>
690
691         * decl.c (init_decl_processing): Add `throws' field to method
692         descriptor.
693         * class.c (make_method_value): Compute `throws' field for method.
694
695 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
696
697         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
698         circularity is detected.
699         (ctors_unchecked_throws_clause_p): Fixed leading comment.
700
701 2001-08-17  Richard Henderson  <rth@redhat.com>
702
703         * class.c (emit_register_classes): Add align parameter to
704         call to assemble_integer.
705
706 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
707
708         * jcf-parse.c (load_class): New locals saved and class_loaded. If
709         loading a class_or_name fails, try considering an innerclass name
710         and load the enclosing context.
711         * parse.y (resolve_inner_class): New function.
712         (find_as_inner_class): Added leading comment.
713         (register_incomplete_type): Keep the current context as enclosing
714         context for JDEP_FIELD dependencies.
715         (do_resolve_class): Locals new_class_decl and super initialized to
716         NULL. Call resolve_inner_class, explore the enclosing context
717         superclass if necessary.
718         Fixes PR java/4007
719
720 2001-08-16  Tom Tromey  <tromey@redhat.com>
721
722         * jcf-dump.c (main): Updated for change to jcf_path_seal.
723         * gjavah.c (main): Updated for change to jcf_path_seal.
724         * lang.c (version_flag): New global.
725         (java_decode_option): Recognize `-version'.
726         (java_init): Update for change to jcf_path_seal.
727         * jcf.h (jcf_path_seal): Added `print' argument.
728         * jcf-path.c (jcf_path_seal): Added `print' argument.
729
730 2001-08-13  Zack Weinberg  <zackw@panix.com>
731
732         * Make-lang.in (java/decl.o): Update dependencies.
733         * decl.c: Include libfuncs.h, don't include toplev.h.
734
735 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
736
737         * decl.c (init_decl_processing): exception_type_node,
738         class_not_found_type_node, and no_class_def_found_type_node
739         initialized. predef_filenames augmented accordingly.
740         instinit_identifier_node initialized.
741         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
742         * java-tree.h (enum java_tree_index): New entries
743         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
744         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
745         (exception_type_node): New macro.
746         (class_not_found_type_node): Likewise.
747         (no_class_def_found_type_node): Likewise.
748         (instinit_identifier_node): Likewise.
749         (PREDEF_FILENAMES_SIZE): Adjusted.
750         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
751         (struct lang_type): Fixed typo in bitfield name.
752         (DECL_INSTINIT_P): New macro.
753         (ID_INSTINIT_P): Likewise.
754         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
755         attribute.
756         * parse.y (encapsulate_with_try_catch): New function.
757         (generate_instinit): Likewise.
758         (build_instinit_invocation): Likewise.
759         (ctors_unchecked_throws_clause_p): Likewise.
760         (add_instance_initializer): Deleted.
761         (build_instance_initializer): Likewise.
762         (in_instance_initializer): Likewise.
763         (check_method_redefinition): instinit$ not to be verified.
764         (java_complete_expand_methods): Generate instinit$, simplified code.
765         (build_dot_class_method): Eliminated unnecessary locals. Use
766         encapsulate_with_try_catch, removed unnecessary code.
767         (fix_constructors): New local iii. Use build_instinit_invocation.
768         (patch_method_invocation): Added comment.
769         (maybe_use_access_method): Don't consider instinit$.
770         (find_applicable_accessible_methods_list): Shorten the search for
771         instinit$ too.
772         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
773         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
774         (patch_throw_statement): Likewise. Fixed typo.
775
776 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
777
778         Revert:
779         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
780         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
781         ASM_FINAL_SPEC.
782         (lang_specific_pre_link): Use set_input to set input_filename.
783         Append `main' here.
784         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
785         (main): Fix definition.
786         Strip `main' from classname.
787         Fixes PR java/227.
788
789 2001-08-11  Zack Weinberg  <zackw@panix.com>
790
791         * lex.h: Don't include setjmp.h.  Don't define
792         SET_FLOAT_HANDLER or prototype set_float_handler.
793
794 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
795
796         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
797         `poplevel' in the right order.
798
799 2001-08-09  Richard Henderson  <rth@redhat.com>
800
801         * Make-lang.in (class.o): Depend on TARGET_H.
802         * class.c (emit_register_classes): Use target hooks instead of
803         assemble_constructor and assemble_destructor.
804
805 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
806
807         * check-init.c (flags.h): Include
808         (check_init): Don't report uninitialized static class
809         initialization flags, don't free bit index when doing static class
810         initialization optimization.
811         (check_for_initialization): Return type changed to `unsigned int.'
812         (attach_initialized_static_class): New function.
813         * class.c (add_method_1): Create the initialized static class
814         table if necessary.
815         (finish_class): Always emit deferred inline methods.
816         * decl.c (emit_init_test_initialization): Moved to expr.c
817         (complete_start_java_method): Don't traverse
818         DECL_FUNCTION_INIT_TEST_TABLE.
819         (lang_mark_tree): Mark hash tables in function decls.
820         * expr.c (emit_init_test_initialization): Moved from decl.c.
821         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
822         initialization flag, set DECL_CONTEXT and
823         LOCAL_CLASS_INITIALIZATION_FLAG.
824         (java_lang_expand_expr): Emit initialization code for static class
825         initialized flags when entering block, if necessary.
826         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
827         * java-tree.h (flag_optimize_sci): New global variable declaration.
828         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
829         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
830         (LOCAL_FINAL_P): Fixed typo in comment.
831         (FINAL_VARIABLE_P): Likewise.
832         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
833         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
834         (struct lang_decl): New fields `ict', `smic' and `cif.'
835         (check_for_initialization): New returned value for global.
836         (attach_initialized_static_class): New global function.
837         (STATIC_CLASS_INIT_OPT_P): New macro.
838         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
839         * lang.c (java_decode_option): Handle
840         `-fno-optimize-static-class-initialization'
841         * parse.y (start_complete_expand_method): New function.
842         (java_expand_method_bodies): Likewise.
843         (attach_init_test_initialization_flags): Likewise.
844         (adjust_init_test_initialization): Likewise.
845         (emit_test_initialization): Likewise.
846         (java_complete_expand_methods): Nullify abstract and native method
847         bodies.
848         (java_complete_expand_method): New locals `fbody', `block_body'
849         and `exception_copy.' Reorganized: directly return on empty method
850         bodies, call `start_complete_expand_method', remember definitely
851         initialized static class in function, don't expand method bodies.
852         (java_expand_classes): Call `java_expand_method_bodies' before
853         `finish_class' when compiling to native.
854         (resolve_expression_name): Use `orig' after building outer class
855         field access.
856         (patch_invoke): Remember static method invokations.
857
858 2001-08-06  Richard Henderson  <rth@redhat.com>
859
860         * class.c (emit_register_classes): Pass a symbol_ref and priority
861         to assemble_constructor.
862
863 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
864
865         * java-tree.h (all_class_filename): New macro.
866         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
867         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
868         newly created IDENTIFIER_NODE to `all_class_filename.'
869
870 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
871
872         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
873         Use ggc_add_tree_root to register roots.
874
875 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
876
877         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
878         second operand calling check_init.
879         * decl.c (complete_start_java_method): Swaped second and third
880         arguments while creating WITH_CLEANUP_EXPR node.
881         * jcf-write.c (generate_bytecode_insns): Use second operand
882         instead of third when handling WITH_CLEANUP_EXPR.
883         * parse.y (java_complete_lhs): Expand second operand of
884         WITH_CLEANUP_EXPR nodes.
885         (patch_synchronized_statement): Swaped second and third arguments
886         while creating WITH_CLEANUP_EXPR node.
887
888 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
889
890         * parse.y (create_interface): Avoid cyclic inheritance report when
891         syntax error encountered during class definition.
892         Fixes PR java/2956
893
894 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
895
896         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
897         ASM_FINAL_SPEC.
898         (lang_specific_pre_link): Use set_input to set input_filename.
899         Append `main' here.
900         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
901         (main): Fix definition.
902         Strip `main' from classname.
903         Fixes PR java/227.
904
905 2001-07-18  Tom Tromey  <tromey@redhat.com>
906
907         For PR java/2812:
908         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
909         * lex.c (java_new_lexer): Use ICONV_CONST.
910         (java_read_char): Likewise.
911         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
912         (jv-scan$(exeext)): Likewise.
913
914 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
915
916         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
917         * parse.y (check_class_interface_creation): Allow `private' if the
918         enclosing is not an interface.
919         (create_interface): Interface tagged public if the enclosing
920         context is an interface.
921         (create_class): Class tagged public if the enclosing context
922         is an interface.
923         Fixes PR java/2959
924
925 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
926
927         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
928         Fixes PR java/2665
929
930 2001-07-14  Tim Josling  <tej@melbpc.org.au>
931
932         * check-init.c (check_init): Remove references to EXPON_EXPR.
933
934 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
935
936         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
937         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
938         Fixes PR java/3602
939
940 2001-07-13  Tom Tromey  <tromey@redhat.com>
941
942         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
943         invocation.
944
945 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
946
947         * parse.y (patch_method_invocation): Don't override primary if one
948         is already provided, but let this$<n> be built. Fixed comment.
949
950 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
951
952         * parse.y (empty_statement:): Report empty statement error only
953         when found at class declaration level.
954         Fixes PR java/3635
955
956 2001-07-12  Tom Tromey  <tromey@redhat.com>
957
958         * expr.c (expand_load_internal): New function.
959         (LOAD_INTERNAL): Use it.
960
961 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
962
963         * parse.y (verify_constructor_super): Compare anonymous class ctor
964         args with `valid_method_invocation_conversion_p.'
965         Fixes PR java/3285
966
967 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
968
969         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
970         `-fsyntax-only.' Fixes PR java/3248
971
972 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
973
974         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
975
976 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
977
978         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
979         current function is static. Fixes PR java/1970
980
981 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
982
983         * parse.y (patch_method_invocation): Add enclosing context to ctor
984         calls if necessary. Fixes PR java/2953
985
986 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
987
988         * parse.y (resolve_package): Abort if qualified expression member
989         isn't right.
990         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
991         Fixes PR java/1391
992
993 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
994
995         * verify.c: Don't use // comments.
996
997 2001-07-05  Tom Tromey  <tromey@redhat.com>
998
999         * lang.c (flag_assume_compiled): Removed.
1000         * java-tree.h (flag_assume_compiled): Removed.
1001         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
1002         -fhash-synchronization, -fuse-divide-subroutine,
1003         -fcheck-references, -femit-class-file, -femit-class-files,
1004         -fassume-compiled.  Updated --encoding information.  Changed
1005         -foutput-class-dir to `-d'.
1006
1007 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
1008
1009         * jcf-parse.c (parse_class_file): Add lineno parameter to
1010         debug_start_source_file call.
1011
1012 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
1013
1014         * gcj.texi: Use gpl.texi.
1015         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
1016         dependencies and use doc/include in search path.
1017
1018 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
1019
1020         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
1021         `this'.  If so, don't build instance initializers.
1022
1023 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
1024
1025         * parse.y (resolve_expression_name): Improved error message for
1026         inner class cases. Fixes PR java/1958
1027
1028 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
1029
1030         * lang.c: #include diagnostic.h
1031         (lang_print_error): Add a `diagnostic_context *' parameter.
1032         (java_dummy_print): Likewise.
1033         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
1034
1035 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1036
1037         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
1038         * jcf.h (typedef struct JCF): New bitfield `finished.'
1039         (JCF_FINISH): Set `finished.'
1040         (JCF_ZERO): Reset `finished.'
1041         Fixes PR java/2633
1042
1043 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1044
1045         * parse.y (class_body_declaration:): Don't install empty instance
1046         initializers.
1047         Fixes PR java/1314
1048
1049 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
1050
1051         * class.c (set_super_info): Call `set_class_decl_access_flags.'
1052         (set_class_decl_access_flags): New function.
1053         * java-tree.h (set_class_decl_access_flags): New prototype.
1054         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
1055         (parse_class_file): New local `decl_max_locals.' Take wide types
1056         into account to compute DECL_MAX_LOCALS.
1057         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
1058         imports on demand.
1059
1060 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
1061
1062         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
1063
1064 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
1065
1066         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
1067         * parse.y (do_resolve_class): Moved comments out to leading comment
1068         section. Removed local `start', New local `_ht' and
1069         `circularity_hash.'  Record `enclosing' in hash table and search
1070         it to detect circularity.  Use `enclosing' as an argument to
1071         `lookup_cl.' Free the hash table when done.
1072
1073 2001-06-19  Tom Tromey  <tromey@redhat.com>
1074
1075         * lex.c (java_read_char): Disallow invalid and overlong
1076         sequences.  Fixes PR java/2319.
1077
1078 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
1079
1080         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
1081
1082 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
1083
1084         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
1085         arguments accordingly.
1086
1087 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
1088
1089         * gcj.texi: Move contents to just after title page.
1090
1091 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
1092
1093         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
1094         builtin type.
1095         (patch_incomplete_class_ref): Build the class ref, build the class
1096         init if necessary, complete the tree.
1097         Fixes PR java/2605
1098
1099 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
1100
1101         * parse.y (lookup_field_wrapper): Test `name' code.
1102         (resolve_qualified_expression_name): Test `qual_wfl' code.
1103         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
1104         handle `qual_wfl' by code.
1105         (maybe_build_primttype_type_ref): Test `wfl' code.
1106
1107 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
1108
1109         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
1110         fdl.texi.
1111         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
1112         the dvi file in the java directory.
1113
1114 2001-05-25  Sam TH  <sam@uchicago.edu>
1115
1116         * gen-table.pl javaop.h jcf.h lex.h,
1117         parse.h: Fix header include guards.
1118
1119 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
1120
1121         * jv-scan.c (version): Update copyright year.
1122
1123 2001-05-21  Per Bothner  <per@bothner.com>
1124
1125         * jcf-parse.c (read_class):  If class is from .class or .zip file
1126         and it's already been read, don't push/pop parser context.
1127
1128 2001-05-18  Per Bothner  <per@bothner.com>
1129
1130         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
1131         command line so the jvgenmain-generated main program comes first.
1132
1133 2001-05-15  Tom Tromey  <tromey@redhat.com>
1134
1135         * class.c (build_utf8_ref): Don't generate identifier based on
1136         utf8const contents.
1137
1138 2001-05-12  Richard Henderson  <rth@redhat.com>
1139
1140         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
1141         * expr.c (java_lang_expand_expr): Expand it.
1142         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
1143         calling build_exception_object_ref.
1144         * parse.y (catch_clause_parameter): Likewise.
1145         (build_dot_class_method): Likewise.
1146         (try_reference_assignconv): Likewise.
1147         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
1148         * jcf-write.c (generate_bytecode_insns): Likewise.
1149
1150 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
1151
1152         * parse.y (build_unresolved_array_type): Set
1153         EXPR_WFL_QUALIFICATION on the newly created wfl.
1154         Fixes PR java/2538. Fixes PR java/2535.
1155
1156 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
1157
1158         * parse.y (fix_constructors): Removed unnecessary assignment to
1159         local. Moved assignment to `this$<n>', fixed comments and
1160         indentation.
1161         (build_wfl_wrap): Fixed indentation.
1162         Fixes PR java/2598, java/2579 and java/2658.
1163
1164 2001-05-03  Mo DeJong  <mdejong@redhat.com>
1165
1166         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
1167         check for byte swap.
1168
1169 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
1170
1171         * expr.c (build_class_init): Move MODIFY_EXPR
1172         outside of COND_EXPR.  Remove variable `call'.
1173
1174 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1175
1176         * decl.c: NULL_PTR -> NULL.
1177         * jcf-write.c: Likewise.
1178
1179 2001-05-01  Tom Tromey  <tromey@redhat.com>
1180
1181         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
1182         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
1183         * gcj.texi: Updated copyright text.  Include fdl.texi.
1184         (Top): Link to new node.
1185
1186 2001-05-01  Per Bothner  <per@bothner.com>
1187
1188         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
1189
1190 2001-05-01  Per Bothner  <per@bothner.com>
1191
1192         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
1193         import_list contains the name, not the TREE_PURPOSE.
1194
1195 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1196
1197         * jcf-io.c (read_zip_member): Cast to long in comparison with
1198         signed value.
1199
1200         * jvspec.c (lang_specific_driver): Initialize variables.
1201
1202         * mangle.c (find_compression_record_match): Likewise.
1203
1204         * typeck.c (build_null_signature): Provide static prototype.  Mark
1205         parameter with ATTRIBUTE_UNUSED.
1206
1207         * verify.c (verify_jvm_instructions): Initialize variable.
1208
1209 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1210
1211         * parse.y (do_resolve_class): Check for cyclic inheritance during
1212         inner class resolution.
1213
1214 2001-04-27  Per Bothner  <per@bothner.com>
1215
1216         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
1217         while iterating, since that could cause gc to lose stuff.
1218
1219 2001-04-26  Per Bothner  <per@bothner.com>
1220
1221         Fix method search wrt scope of inner classes to match JLS2.
1222         * typeck.c (build_null_signature):  New static function.
1223         (has_method):  New function.  Uses build_null_signature and lookup_do.
1224         * java-tree.h (has_method):  New declaration.
1225         * parse.y (find_applicable_accessible_methods_list):  Do not search
1226         context of inner classes here.
1227         (patch_method_invocation):  Search scope, ie. current and outer clases,
1228         for method matching simple name, to find class.
1229
1230 2001-04-26  Per Bothner  <per@bothner.com>
1231
1232         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
1233         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
1234
1235         * constants.c (find_methodref_with_class_index):  New function.
1236         (find_methodref_index):  Use find_methodref_with_class_index.
1237         * java-tree.h (find_methodref_with_class_index):  New declaration.
1238         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
1239         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
1240         If context changed from interface to class, don't use invokeinterface.
1241
1242 2001-04-25  Per Bothner  <per@bothner.com>
1243
1244         * verify.c (verify_jvm_instructions):  For field instructions,
1245         check that field index is valid.  For invoke instructions, check that
1246         method index is valid.
1247
1248 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
1249
1250         * config-lang.in (target_libs): Copy from $libgcj_saved.
1251
1252 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1253
1254         * decl.c (init_decl_processing): Add new class "protectionDomain"
1255         field.
1256         * class.c (make_class_data): Set initial value for "protectionDomain".
1257
1258 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1259
1260         * jvspec.c (lang_specific_driver): Fix memory allocation
1261         deficit, by using concat in lieu of xmalloc/sprintf.
1262
1263 2001-04-20  Per Bothner  <per@bothner.com>
1264
1265         Fixes to compile multiple .class files at once.
1266         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
1267         * java-tree.h (CLASS_PARSED_P):  New macro.
1268         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
1269         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
1270         (read_class):  Avoid some code duplication.
1271         Don't call JCF_FINISH for a .class file - might be needed later.
1272         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
1273         rather than CLASS_LOADED_P, since latter implies class laid out.
1274         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
1275         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
1276
1277 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1278
1279         * Make-lang.in (java/boehm.o): Depend on toplev.h.
1280
1281         * boehm.c: Include toplev.h.
1282
1283 2001-04-06  Tom Tromey  <tromey@redhat.com>
1284             Alexandre Petit-Bianco  <apbianco@redhat.com>
1285
1286         Fix for PR gcj/1404 and PR gcj/2332:
1287         * parse.y (build_array_from_name): If we use the type_wfl then
1288         accumulate dimensions from the original type as well.
1289         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
1290
1291 2001-04-06  Tom Tromey  <tromey@redhat.com>
1292
1293         * parse.y (analyze_clinit_body): Return true if the second operand
1294         of a METHOD_EXPR is nonzero.
1295
1296 2001-04-06  Tom Tromey  <tromey@redhat.com>
1297
1298         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
1299         directory.
1300         ($(srcdir)/java/parse.c): Likewise.
1301
1302 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
1303
1304         * gcj.texi: Use `which-gcj' instead of `which-g77.'
1305         (version-gcc): Initialized.
1306         (which-gcj): Likewise.
1307
1308 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
1309
1310         * java-tree.h (struct lang_decl): New macro
1311         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
1312         * parse.y (build_instance_initializer): New function.
1313         (add_instance_initializer): Use it.
1314         (java_fix_constructors): Set `current_class' before fix pass.
1315         (fix_constructors): Just return if already fixed. Move `super()'
1316         invokation ahead. Use `build_instance_initializer.'
1317         Fixes PR java/1315.
1318
1319 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
1320
1321         * parse.y (resolve_qualified_expression_name): Pass field's
1322         DECL_CONTEXT to `not_accessible_p.'
1323         (not_accessible_p): Changed parameters order in `inherits_from_p'
1324         invokation.
1325
1326 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
1327
1328         * lang-options.h: Add flag_check_references.
1329
1330 2001-04-04  Per Bothner  <per@bothner.com>
1331
1332         * java-tree.h (CONSTANT_VALUE_P):  New macro.
1333         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
1334         * parse.y (maybe_build_class_init_for_field):  New static function.
1335         (resolve_expression_name, resolve_field_access):  Use
1336         maybe_build_class_init_for_field instead of build_class_init
1337         This does not do the init if the field is compile-time-constant.
1338         (resolve_field_access):  Simplify.
1339
1340         * parse.y (fold_constant_for_init):  Merge test into switch.
1341
1342 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
1343
1344         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
1345         on gansidecl.h.
1346         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
1347
1348 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
1349
1350         * expr.c (pop_type_0): Save the result of the first
1351         lang_printable_name call in a scratch buffer, so it
1352         won't be clobbered by the second call.
1353
1354 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
1355
1356         * parse-scan.y (array_type:): Rewritten.
1357         (type_declaration:): `empty_statement' replaces `SC_TK.'
1358         (class_member_declaration:): `empty statement' added.
1359         (method_body:): Simplified.
1360         (static_initializer:): Likewise.
1361         (primary_no_new_array:): Use `type_literals.'
1362         (type_literals:): New rule.
1363         (dims:): Set and update `bracket_count.'
1364         Fixes PR java/1074. Fixes PR java/2412.
1365
1366 2001-03-28  Hans Boehm  <boehm@acm.org>
1367
1368         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
1369         (get_boehm_type_descriptor): Set type on returned value to be a
1370         pointer length integer.
1371
1372 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1373
1374         * expr.c (pop_type_0): Call `concat' rather than building the
1375         string manually.
1376         (pop_type): Add format specifier in call to `error'.
1377
1378         * parse.y (patch_method_invocation): Avoid casting away
1379         const-ness.
1380
1381 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
1382
1383         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
1384
1385 2001-03-28  Richard Henderson  <rth@redhat.com>
1386
1387         IA-64 ABI Exception Handling:
1388         * Make-lang.in (except.o): Don't depend on eh-common.h.
1389         * check-init.c (check_init): Handle EXC_PTR_EXPR.
1390         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
1391         [soft_exceptioninfo_call_node]: Remove.
1392         [eh_personality_libfunc, lang_eh_runtime_type]: New.
1393         (end_java_method): No emit_handlers.
1394         * except.c (java_set_exception_lang_code): Remove.
1395         (method_init_exceptions): Don't call it.
1396         (prepare_eh_table_type): No CATCH_ALL_TYPE.
1397         (build_exception_object_ref): New.
1398         (expand_end_java_handler): Update for except.h name changes.
1399         (emit_handlers, expand_resume_after_catch): Remove.
1400         * expr.c (java_lang_expand_expr): Update for except.h name changes.
1401         (process_jvm_instruction): Use build_exception_object_ref.
1402         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
1403         (soft_exceptioninfo_call_node): Remove.
1404         (build_exception_object_ref): Declare.
1405         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
1406         soft_exceptioninfo_call_node.  Move processing ...
1407         [EXC_PTR_EXPR]: ... here.
1408         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
1409         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
1410         (source_end_java_method): No java_set_exception_lang_code or
1411         emit_handlers.
1412         (build_dot_class_method): Use build_exception_object_ref.
1413         (try_reference_assignconv): Check EXC_PTR_EXPR not
1414         soft_exceptioninfo_call_node.
1415
1416 2001-03-28  Richard Henderson  <rth@redhat.com>
1417
1418         * java-tree.h (throw_node): Define as a single member of
1419         java_global_trees instead of a separate array.
1420         (JTI_THROW_NODE): New.
1421         * decl.c (throw_node): Don't declare.
1422         (init_decl_processing): Init a scalar throw_node.
1423         Don't register it for gc.
1424         * check-init.c (check_init): Reference scalar throw_node.
1425         * expr.c (build_java_athrow): Likewise.
1426         * jcf-write.c (generate_bytecode_insns): Likewise.
1427         * parse.h (BUILD_THROW): Likewise.
1428
1429 2001-03-28  Richard Henderson  <rth@redhat.com>
1430
1431         * decl.c (end_java_method): Do not save and restore
1432         flag_non_call_exceptions.
1433         * parse.y (source_end_java_method): Likewise.
1434         * lang.c (flag_exceptions): Don't declare.
1435         (java_init_options): Set flag_non_call_exceptions.  Set
1436         flag_exceptions here ...
1437         (java_init): ... not here.
1438
1439 2001-03-27  Richard Henderson  <rth@redhat.com>
1440
1441         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
1442         exceptions_via_longjmp.
1443
1444         * lang.c (flag_new_exceptions): Don't declare it.
1445         (java_init_options): Or set it.
1446
1447 2001-03-27  Richard Henderson  <rth@redhat.com>
1448
1449         * decl.c (end_java_method): Rename asynchronous_exceptions to
1450         flag_non_call_exceptions.
1451         * parse.y (source_end_java_method): Likewise.
1452
1453 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1454
1455         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1456
1457 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
1458
1459         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
1460
1461 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
1462
1463         * parse.y (find_as_inner_class): Follow current package
1464         indications not to mistakingly load an unrelated class.
1465
1466 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1467
1468         * constants.c (PUTN): Use memcpy, not bcopy.
1469
1470         * lex.c (java_read_char): Use memmove, not bcopy.
1471
1472         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
1473
1474 2001-03-23  Per Bothner  <per@bothner.com>
1475
1476         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
1477         macro for better error pin-pointing.
1478         * java-tree.h:  Fix typo in comment.
1479
1480         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
1481         Don't include jsr/goto in exception range.
1482         Check if start and end of exception range are the same (also TRY_EXPR).
1483         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
1484         However, do emit the following goto even if try_block is empty.
1485         Defer freeing exception_decl until after the finalizer, to make
1486         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
1487
1488         * parse.y (java_complete_lhs):  If the try-clause is empty, just
1489         return the finally-clause and vice versa.
1490
1491 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
1492
1493         * gcj.texi (Input Options): documented the check for attribute
1494         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
1495         * java-tree.h (flag_force_classes_archive_check): Declared extern.
1496         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
1497         (jcf_parse): Check for the right classes archive if necessary.
1498         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
1499         (jcf_parse_fields): Fixed indentation.
1500         * jcf-write.c (append_gcj_attribute): New function.
1501         (generate_classfile): Compute the attribute count, invoke
1502         `append_gcj_attribute'.
1503         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
1504         turned into bit fields. New bit field `right_zip.'
1505         (JCF_ZERO): Set `right_zip' to zero.
1506         * lang-options.h (-fforce-classes-archive-check): Added flag.
1507         * lang.c (flag_force_classes_archive_check): New flag.
1508         (lang_f_options): New entry `force-classes-archive-check.'
1509         Fixes PR java/1213.
1510
1511 2001-02-07  Andrew Haley  <aph@redhat.com>
1512
1513         * gcj.texi (Configure-time Options): Add -fcheck-references.
1514         * expr.c (build_java_indirect_ref): New function.
1515         (java_check_reference): New function.
1516         (build_java_array_length_access): Use build_java_indirect_ref to
1517         check for null references.
1518         (build_java_arrayaccess): Likewise.
1519         (build_get_class): Likewise.
1520         (build_field_ref): Likewise.
1521         (invoke_build_dtable): Likewise.
1522         (build_invokeinterface): Likewise.
1523         * lang.c (lang_f_options): Add flag_check_references.
1524         * jvspec.c (jvgenmain_spec): Add flag_check_references.
1525         * java-tree.h (flag_check_references): New variable.
1526         * lang.c (flag_check_references): Likewise.
1527         * parse.y (patch_invoke): Use java_check_reference.
1528         (patch_assignment): Allow for extra nesting in
1529         _Jv_CheckArrayStore.
1530
1531 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
1532
1533         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
1534         * lex.c (cxx_keywords): Likewise.
1535
1536 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
1537
1538         * parse.y (qualify_ambiguous_name): Broaden `length'
1539         recognition. Help MODIFY_EXPR be resolved as expression names.
1540         Fixes PR java/2066. Fixes PR java/2400.
1541
1542 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
1543
1544         * gjavah.c (process_file): Mark interface definitions with
1545         "__attribute__ ((java_interface))".
1546
1547 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
1548
1549         * class.c (layout_class): Fixed push_super_field's second
1550         argument. Fixes PR java/2333.
1551         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
1552         too early to lay innerclasses out.
1553
1554 2001-03-20  Tom Tromey  <tromey@redhat.com>
1555             Alexandre Petit-Bianco <apbianco@redhat.com>
1556
1557         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
1558         inside an array reference. Insertion of the array store check
1559         rewritten. Fixes PR java/2299.
1560
1561 2001-03-20  Tom Tromey  <tromey@redhat.com>
1562
1563         * lex.c (java_read_unicode): Only accept leading `u's.
1564
1565 2001-03-20  Tom Tromey  <tromey@redhat.com>
1566
1567         * jcf-parse.c (read_class): Initialize `class'.
1568
1569 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
1570
1571         * jcf_parse.c (jcf_parse): Eliminate unused variable.
1572
1573 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
1574
1575         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
1576         (layout_class): Likewise.
1577         (layout_class_method): Likewise.
1578         (emit_register_classes): Likewise.
1579         * decl.c (builtin_function): Likewise.
1580         (give_name_to_locals): Likewise.
1581
1582 2001-03-19  Per Bothner  <per@bothner.com>
1583
1584         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
1585         before trying to load an inner class.
1586
1587         Fixes to process to command-line .class files in two passes.
1588         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
1589         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
1590         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
1591         * class.c (is_compiled_class):  Fix for renamed flag.
1592         * parse.y (maybe_create_class_interface_decl):  Likewise.
1593         * jcf-parse.c (yyparse):  Also set if compiling .class files.
1594         * jcf-parse.c (read_class);  Read current_class.
1595         (jcf_parse):  Make static.
1596         (load_inner_classes):  New function, with code moved from jcf_parse,
1597         because we need to inner classes after the command-line files are read.
1598         (yyparse):  Set finput to NULL when it doesn't need to be closed.
1599         Reduce use of main_jcf (basically only for archive) and
1600         use finput instead of main_jcf->read_state.
1601         Inline jcf_figure_file_type into yyparse.
1602         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
1603         Defer load_inner_classes and parse_class_file to a second pass,
1604         after we've correctly mapped command-line .clas fiels to classes.
1605         (jcf_figure_file_type):  Removed.
1606         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
1607         (JCF_ZERO):  Also clear zipd field.
1608         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
1609
1610 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
1611
1612         * jcf-parse.c (yyparse): Change ch from char * to char.
1613
1614 2001-03-19  Per Bothner  <per@bothner.com>
1615
1616         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
1617         Add constructed filelist-file at end, following -xjava.  Thus any .o
1618         and library files are not affected by the -xjava.  Also wrap
1619         explicit @FILE with -xjava and -xnone.
1620
1621 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
1622
1623         * class.c (build_static_field_ref): Call make_decl_rtl() after
1624         setting the DECL_EXTERNAL flag.
1625
1626 2001-03-17  Per Bothner  <per@bothner.com>
1627
1628         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
1629
1630         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
1631         when result is is needed (target is STACK_TARGET).
1632
1633         * parse.h (JDEP_SOLV):  Removed.
1634         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
1635
1636         * parse.y (incomplete_class_list): Removed.
1637         (obtain_incomplete_type): Don't use or set incomplete_class_list.
1638         It doesn't work if resolve_class changes the name of an array type
1639         that is on the list and then someone else looks for the modified name.
1640         Also, seems liable to break when compiling multiple source files at
1641         once.  So the simplest is to just remove incomplete_class_list -
1642         it is only a minor space win and it is not even clear it saves time.
1643
1644         * parse.y (resolve_class):  Remove unneeded promote_type.
1645
1646 2001-03-15  Per Bothner  <per@bothner.com>
1647
1648         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
1649         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
1650         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
1651         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
1652
1653         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
1654         * parse.y (java_expand_classes):  Likewise.
1655
1656         * parse.y (expand_start_java_method):  Was only called once and had a
1657         misleading name, so inline in caller java_complete_expand_method.
1658         (enter_a_block):  Likewise inline in enter_block and remove.
1659
1660         Remove junk from when gcc/java was created (by copying from C/C++).
1661         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
1662         (struct binding_level):  Remove fields keep, keep_if_subblocks,
1663         more_cleanups_ok, have_cleanups (which have never been used).
1664         (pushlevel, poplevel):  Remove related useless code.
1665
1666         * class.c (make_class_data):  The class_dtable_decl (i.e. the
1667         vtable for Class) should be external, except when compiling Class.
1668
1669         * jvspec.c (lang_specific_driver):  Fix -C handling.
1670         Check -save-temps to see if temp @FILE should be deleted.
1671         Follow-up to/fix for February 16 patch.
1672
1673         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
1674         (type_stack_dup):  Remove no-longer neded error check.
1675
1676 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
1677
1678         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
1679         to 'for_pointer'. If this type is for a pointer (argument) mangling,
1680         don't surround the element with 'N..E' if the type name is
1681         unqualified.
1682
1683 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
1684
1685         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
1686         DECL_RTL_SET_P, etc.
1687         (make_method_value): Likewise.
1688         (get_dispatch_table): Likewise.
1689
1690         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1691
1692 2001-03-07  Tom Tromey  <tromey@redhat.com>
1693
1694         * config-lang.in (lang_requires): Define.
1695
1696 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
1697
1698         * typeck.c (convert): Check flag_unsafe_math_optimizations,
1699         not flag_fast_math.
1700
1701 2001-03-05  Per Bothner  <per@bothner.com>
1702
1703         Fix a problem where rest_of_decl_compilation applied to
1704         class_dtable_decl causes problems because it was done too early,
1705         before output file was opened.
1706         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
1707         * class.c (class_dtable_decl):  Add macro - element of class_roots.
1708         (make_class_data):  Define class_dtable_decl.
1709         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
1710
1711 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
1712
1713         * java/class.c, java/decl.c, java/java-tree.h: Replace all
1714         uses of 'boolean' with 'bool'.
1715
1716 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
1717
1718         * lang-specs.h: Add zero initializer for cpp_spec field to all
1719         array elements.
1720
1721 2001-02-16  Per Bothner  <per@bothner.com>
1722
1723         Handle compiling multiple input files at once, and @FILE syntax.
1724         * gcj.texi:  Updated documentation to match.
1725         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
1726         * jcf-parse.c (parse_source_file):  Split into ...
1727         (parse_source_file_1):  New function - and:
1728         (parse_source_file_2):  New function.
1729         (yyparse):  On -ffilelist-file, open and scan named file.
1730         On first pass over files, only do parse_source_file_1.
1731         A new second pass calls parse_source_file_2 for each file to compile.
1732         (init_jcf_parse):  Call init_src_parse.
1733         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
1734         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
1735         as multiple input file combined in one compilation.
1736         * lang-options.h:  Add -ffilelist-file
1737         * lang.c (flag_filelist_file):  New flag variable.
1738         (lang_f_options):  Handle -ffilelist-file.
1739         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
1740         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
1741         gclass_list - use global fields of src_parse_roots instead.
1742         * parse.y (src_parse_roots):  New array.
1743         (incomplete_class_list, gclass_list):  New macros.
1744         (push_parser_context, java_pop_parser_context,
1745         java_parser_context_resume):  Don't fiddle with deleted fields.
1746         (various):  Use incomplete_class gclass_list and global macros
1747         instead of parse_ctxt fields - the lists are global.
1748         (init_src_parse):  New function.
1749
1750 Fri Feb 23 15:28:39 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1751
1752         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
1753
1754 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
1755
1756         * parse.y (check_inner_class_access): Moved declaration of local
1757         `enclosing_decl_type' to the right location.
1758
1759 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
1760
1761         * parse.y (parser_check_super_interface): Don't call
1762         check_pkg_class_access for an inner interface.
1763         (parser_check_super): Don't call check_pkg_class_access for inner
1764         class.
1765         (do_resolve_class): Simplify enclosing type loop. Don't call
1766         check_pkg_class_access if CL and DECL are not set.
1767         (find_in_imports_on_demand): Set DECL if class_type needed to be
1768         loaded. Don't call check_pkg_class_access for an inner class.
1769         (check_inner_class_access): Rewritten to implement member access
1770         rules as per spec 6.6.1.
1771         (check_pkg_class_access): Handle the empty package correctly.
1772         (in_same_package): New function. Determine if two classes are in the
1773         same package.
1774
1775 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
1776
1777         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
1778         method into array types.
1779         * parse.y (patch_method_invocation): Bypass access check on clone call
1780         to array instance.
1781
1782 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
1783
1784         * expr.c (build_instanceof): Check for arrays when trying fold to
1785         false.
1786
1787 2001-02-15  Jim Meyering  <meyering@lucent.com>
1788
1789         * Make-lang.in (java.install-common): Depend on `installdirs'.
1790         (java.install-info): Likewise.
1791
1792 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
1793
1794         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
1795
1796 2001-02-14  Tom Tromey  <tromey@redhat.com>
1797             Alexandre Petit-Bianco  <apbianco@cygnus.com>
1798
1799         Fix for PR java/1261.
1800         * typeck.c (build_java_array_type): Add public `clone' method to
1801         arrays.
1802         * parse.y (resolve_qualified_expression_name): Use current_class
1803         when checking for inaccessibility.
1804         (patch_method_invocation): Fixed error message when accessibility
1805         denied.  Added `from_super' argument.
1806
1807 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
1808
1809         * parse.y (resolve_class): Don't build a fake decl. Use the one
1810         already built.
1811         * typeck.c (build_java_array_type): Build and assign decl to array
1812         type.
1813
1814 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
1815
1816         * parse.y (not_accessible_p): Changed leading comment. Added extra
1817         `where' argument. Use it to enforce protected access rules.
1818         (resolve_qualified_expression_name): Added extra argument to
1819         not_accessible_p.
1820         (patch_method_invocation): Use argument `primary' to provide
1821         not_accessible_p with an extra argument.
1822         (lookup_method_invoke): Added extra argument to not_accessible_p.
1823         (search_applicable_method_list): Likewise.
1824
1825 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
1826
1827         * parse.y (resolve_qualified_expression_name): Try to resolve as
1828         an inner class access only if `decl' is a TYPE_DECL.
1829
1830 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1831
1832         * decl.c (classdollar_identifier_node): Initialize.
1833         * java-tree.h (enum java_tree_index): New entry
1834         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
1835         (classdollar_identifier_node): New macro.
1836         (ID_CLASSDOLLAR_P): Likewise.
1837         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
1838         (build_dot_class_method_invocation): Likewise.
1839         (find_applicable_accessible_methods_list): `class$' can't be
1840         inherited.
1841
1842 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
1843
1844         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
1845
1846 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
1847
1848         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
1849         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
1850         gone.
1851
1852 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
1853
1854         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
1855         outside of the `__U' sequence too.
1856         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
1857         sequence too.
1858
1859 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
1860
1861         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
1862
1863 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1864
1865         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
1866         (JVGENMAIN_OBJS): Likewise.
1867         * java-tree.h (append_gpp_mangled_name): New prototype.
1868         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
1869         Removed cast calling `gcc_add_root.'
1870         * jvgenmain.c (mangle_obstack): New global, initialized.
1871         (main): Use it.
1872         (do_mangle_class): Constify local `ptr.'
1873         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
1874         append_gpp_mangle_name and update `count' if necessary.
1875         Use `mangle_obstack.'
1876         * mangle.c (append_unicode_mangled_name): Removed.
1877         (append_gpp_mangled_name): Likewise.
1878         (unicode_mangling_length): Likewise.
1879         (mangle_member_name): Return type set to `void.'
1880         (mangle_field_decl): Don't append `U' in escaped names.
1881         (mangle_method_decl): Likewise.
1882         (mangle_member_name): Just use `append_gpp_mangled_name.'
1883         * mangle_name.c: New file.
1884
1885 2001-02-07  Per Bothner  <per@bothner.com>
1886
1887         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
1888
1889         * check-init.c (check_init):  Don't call done_alternative after
1890         processing loop code, as a LOOP_EXPR never terminates normally.
1891
1892 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
1893
1894         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
1895
1896 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1897
1898         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
1899         DECLs.
1900
1901 2001-02-06  Tom Tromey  <tromey@redhat.com>
1902
1903         * lex.c (java_new_lexer): Longer error message.
1904
1905 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
1906             Alexandre Petit-Bianco  <apbianco@cygnus.com>
1907
1908         * typeck.c (build_prim_array_type): Added leading comment.
1909         (build_java_array_type): Moved locals out of
1910         block. Always create the `data' field, fixed alignment to match
1911         C++.
1912
1913 2001-02-04  Tom Tromey  <tromey@redhat.com>
1914
1915         * expr.c (java_lang_expand_expr): Don't bother recomputing
1916         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
1917         Fixes PR java/1866.
1918
1919 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1920
1921         * parse.y (process_imports): Save the original name of the import
1922         for better error report.
1923
1924 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
1925
1926         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
1927         of macros used when compiling jvspec.c.
1928         * jvspec.c (lang_specific_driver): Link with the shared
1929         libgcc by default.
1930
1931 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1932
1933         * check-init.c (check_init): Call internal_error instead of fatal.
1934         * expr.c (java_lang_expand_expr): Likewise.
1935         * jcf-parse.c (get_constant): Likewise.
1936         * mangle.c (java_mangle_decl): Likewise.
1937         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
1938         (operator_string): Likewise.
1939         * check-init.c (check_init): Call abort instead of fatal.
1940         * class.c (build_class_ref): Likewise.
1941         * constants.c (write_constant_pool): Likewise.
1942         * decl.c (start_java_method): Likewise.
1943         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
1944         (java_stack_dup, encode_newarray_type): Likewise.
1945         (build_java_array_length_access): Likewise.
1946         (build_java_check_indexed_type, expand_java_pushc): Likewise.
1947         (build_java_soft_divmod, build_invokeinterface): Likewise.
1948         * java-tree.h (INNER_CLASS_P): Likewise.
1949         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
1950         (give_name_to_class, get_class_constant): Likewise.
1951         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
1952         (find_constant_index, generate_bytecode_conditional): Likewise.
1953         (generate_bytecode_insns, perform_relocations): Likewise.
1954         * lex.c (java_unget_unicode, java_lex): Likewise.
1955         * mangle.c (mangle_type, mangle_record_type): Likewise.
1956         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
1957         (finish_mangling): Likewise.
1958         * parse.h (MARK_FINAL_PARMS): Likewise.
1959         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
1960         (obtain_incomplete_type, java_complete_class): Likewise.
1961         (java_check_regular_methods, java_complete_expand_method): Likewise.
1962         (cut_identifier_in_qualified, check_deprecation): Likewise.
1963         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
1964         (java_complete_lhs, lookup_name_in_blocks): Likewise.
1965         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
1966         * typeck.c (set_local_type, parse_signature_type): Likewise.
1967         (parse_signature_string, build_java_signature): Likewise;
1968         (set_java_signature): Likewise.
1969         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
1970         * class.c (add_method): Call fatal_error instead of fatal.
1971         (build_static_field_ref): Likewise.
1972         * expr.c (build_known_method_ref, expand_invoke): Likewise.
1973         * jcf-parse.c (get_constant, jcf_parse): Likewise.
1974         * lex.c (java_new_new_lexer): Likewise.
1975         * jv-scan.c (main): Likewise.
1976         (fatal_error): Renamed from fatal.
1977         * jcf-parse.c (yyparse): Call fatal_io_error instead of
1978         pfatal_with_name.
1979         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
1980         (yyparse): Likewise.
1981         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
1982         * lex.c (java_get_line_col): Likewise.
1983         * jcf-parse.c (load_class): Make errors non-fatal.
1984         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
1985
1986 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
1987
1988         * jvgenmain.c (class_mangling_suffix): Remove unused string.
1989         (error): Remove unused function.
1990         (main): Don't use "__attribute__ alias" on generated class symbol.
1991
1992 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1993
1994         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
1995         argument.
1996         * parse.y (finish_method_declaration): Code accounting for WFLed
1997         method DECL_NAMEs deleted.
1998         (check_abstract_method_definitions): Likewise.
1999         (resolve_type_during_patch): Layout resolved type.
2000         * typeck.c (lookup_do): Removed unused local.
2001
2002 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
2003
2004         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
2005         * decl.c (init_decl_processing): Use integer_minus_one_node, not
2006         integer_negative_one_node.
2007         * expr.c (build_java_binop): Likewise.
2008
2009 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
2010
2011         * zextract.c (read_zip_archive): Read file_offset before writing
2012         zipd and consequently clobbering the header contents.
2013
2014 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2015
2016         * Make-lang.in: Remove all dependencies on defaults.h.
2017         * decl.c: Don't include defaults.h.
2018         * expr.c: Likewise.
2019         * parse.y: Likewise.
2020
2021 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2022
2023         * ChangeLog (2001-01-21): Fixed typo.
2024         * class.c (layout_class_method): Code accounting for WFLed
2025         method DECL_NAMEs deleted.
2026         * constant.c (find_methodref_index): Likewise.
2027         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
2028         * java-tree.h (DECL_FUNCTION_WFL): New macro.
2029         (struct lang_decl): New field `wfl'.
2030         (java_get_real_method_name): Prototype deleted.
2031         * mangle.c (mangle_method_decl): Code accounting for WFLed
2032         method DECL_NAMEs deleted.
2033         * parse.h (GET_METHOD_NAME): Macro deleted.
2034         * parse.y (reset_method_name): Deleted.
2035         (method_header): Set DECL_FUNCTION_WFL.
2036         (check_abstract_method_header): Code accounting for WFLed method
2037         DECL_NAMEs deleted.
2038         (java_get_real_method_name): Deleted.
2039         (check_method_redefinition): Code accounting for WFLed method
2040         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
2041         (java_check_regular_methods): Likewise.
2042         (java_check_abstract_methods): Likewise.
2043         (java_expand_classes): Don't call `reset_method_name.'
2044         (search_applicable_method_list): Use DECL_NAMEs instead of
2045         GET_METHOD_NAME.
2046         * typeck.c (lookup_do): Code accounting for WFLed method
2047         DECL_NAMEs deleted.
2048
2049 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
2050
2051         * lex.c (java_read_char): Check for EOF from getc first.
2052
2053 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2054
2055         * class.c (layout_class): Don't lay the superclass out if it's
2056         already being laid out.
2057         * jcf-parse.c (handle_innerclass_attribute): New function.
2058         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
2059         handle_innerclasses_attribute.
2060         (jcf_parse): Don't load an innerclasses if it's already being
2061         laid out.
2062         * jcf-write.c (append_innerclass_attribute_entry): Static
2063         `anonymous_name' and its initialization deleted. `ocii' and `ini'
2064         to be zero for anonymous classes.
2065
2066 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2067
2068         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
2069         necessary.
2070         * jcf-parse.c (set_source_filename): Use
2071         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
2072
2073 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2074
2075         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
2076         gets a unique asm name.
2077
2078 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2079
2080         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
2081         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
2082         if necessary.
2083         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
2084         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
2085         * parse.y (lookup_package_type_and_set_next): Deleted.
2086         (resolve_package): Removed unnecessary code.
2087         (find_applicable_accessible_methods_list): `finit$' can't be
2088         inherited.
2089         * verify.c (pop_argument_types): Added missing prototype.
2090
2091 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
2092
2093         * config-lang.in: Disable java by default.
2094
2095 2001-01-23  Tom Tromey  <tromey@redhat.com>
2096
2097         * gcj.texi (Copying): New node.
2098         Added copyright information.
2099
2100 2001-01-21  Per Bothner  <per@bothner.com>
2101
2102         Various fixes to allow compiling a compressed .jar/.zip archive.
2103         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
2104         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
2105         (struct ZipDirectory):  New field zipf points to owning ZipFile.
2106         * jcf.h (struct ZipDirectory):  Add forward declaration.
2107         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
2108         Remove seen_in_zip and zip_offset fields.
2109         (JCF_SEEN_IN_ZIP):  New macro.
2110         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
2111         * jcf-io.c:  Change all ZipFileCache to ZipFile.
2112         (read_zip_member):  New function.
2113         (open_in_zip):  Call read_zip_member.
2114         * jcf-parse.c (find_in_current_zip):  Remove function.
2115         (read_class):  Merge in find_in_current_zip functionality.
2116         Call read_zip_member if needed.
2117         (parse_zip_file_entries):  Use read_zip_member.
2118         (process_zip_dir):  Update for removed and added JCF fields.
2119         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
2120
2121 2001-01-21  Per Bothner  <per@bothner.com>
2122
2123         Minor optimization of static ggc roots.
2124         * jcf-parse.c (parse_roots):  New static field.
2125         (current_field, current_method, current_file_list):  Replace by macros
2126         naming fields of parse_roots.
2127         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
2128         * class.c (class_roots):  New static field.
2129         (registered_class, fields_ident, info_ident, class_list):
2130         New macros naming fields of parse_roots.
2131         (build_static_field_ref):  Don't register roots here.
2132         (layout_class):  Static field list replaced by macro class_list.
2133         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
2134         Initialize fields_ident and info_ident here.
2135
2136 2001-01-21  Per Bothner  <per@bothner.com>
2137
2138         * jcf-parse.c (ggc_mark_jcf):  New function.
2139         (init_jcf_parse):  Register current_jcf as ggc root.
2140
2141 2001-01-21  Per Bothner  <per@bothner.com>
2142
2143         * lang.c (put_decl_node):  Print method's name.
2144
2145 2001-01-21  Per Bothner  <per@bothner.com>
2146
2147         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
2148         (verify_jvm_instructions):  Use it, for better error messages on loads.
2149
2150 2001-01-21  Per Bothner  <per@bothner.com>
2151
2152         * verify.c (merge_type_state):  Still may have to merge even if
2153         LABEL_VERIFIED (label).
2154
2155 2001-01-21  Per Bothner  <per@bothner.com>
2156
2157         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
2158         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
2159
2160 2001-01-19  Per Bothner  <per@bothner.com>
2161
2162         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
2163         if expeting an interface type.  Refines Tom's change of 2000-09-12.
2164
2165 2001-01-18  Per Bothner  <per@bothner.com>
2166
2167         * gcj.texi (Input Options): Mention .java files.
2168
2169 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2170
2171         * lang-options.h (-Wunsupported-jdk11): Removed.
2172         * lang.c (flag_not_overriding): Deleted.
2173         (flag_static_local_jdk1_1): Likewise.
2174         (lang_W_options): Removed "unsupported-jdk11" entry.
2175         * parse.y (java_check_methods): Removed dead code.
2176
2177 2001-01-17  Tom Tromey  <tromey@redhat.com>
2178
2179         Changes suggested by Per Bothner:
2180         * gcj.texi (Input Options): Don't mention input files.
2181         (Code Generation): Updated --main information.
2182         (Invoking jcf-dump): Mention that --javap is incomplete.
2183         From Alexandre Petit-Bianco:
2184         (Warnings): Don't mention -Wunsupported-jdk11.
2185         My stuff:
2186         (Compatibility): Mention JDK 1.2-ness of libraries.
2187         (Resources): Mention resources used when writing gcj.
2188
2189 2001-01-17  Tom Tromey  <tromey@redhat.com>
2190
2191         * gcj.texi: New file.
2192         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
2193         (java.info): Depend on gcj.info.
2194         (java/gcj.dvi): New target.
2195         (java.dvi): Depend on gcj.dvi.
2196         (java.install-info): Wrote.
2197
2198 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
2199
2200         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
2201         having called make_decl_rtl.
2202
2203 2001-01-14  Per Bothner  <per@bothner.com>
2204
2205         Various patches to emit better messages on verification errors.
2206         * expr.c (push_type_0):  Return error indication on stack overflow,
2207         instead of callinfg fatal.
2208         (push_type):  Now just call push_type_0 (nd fatal on overflow).
2209         (pop_type_0):  Return detailed error message (in a char** argument).
2210         (pop_type):  If pop_type_0 fails, print error message.
2211         (pop_argument_types):  Moved to verify.c.
2212         * verify.c (pop_argument_types):  Moved from expr.c.
2213         Return a (possible) error message, rather than void.
2214         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
2215         (verify_jvm_instruction):  Use new macros, improving error messages.
2216         For case OPCODE_astore use object_ptr_type_node.
2217         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
2218         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
2219
2220         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
2221         constant, return body without wrapper.  (Improves constant folding.)
2222         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
2223
2224 2001-01-13  Per Bothner  <per@bothner.com>
2225
2226         * expr.c (expand_java_field_op):  Assigning to a final field outside
2227         an initializer does not violate JVM spec, so should be warning, not
2228         error.  (Sun's verifier does not complain - though MicroSoft's does.)
2229
2230 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
2231
2232         * gjavah.c (version), jcf-dump.c (version): Update copyright year
2233         to 2001.
2234
2235 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
2236
2237         * parse.y (resolve_expression_name): Permit instance variables from
2238         enclosing context in super constructor call.
2239         (resolve_qualified_expression_name): Permit enclosing class's qualified
2240         "this" in super constructor call.
2241
2242 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
2243
2244         * class.c (build_utf8_ref): Remove last argument in call to
2245         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2246         (build_class_ref): Likewise.
2247         (build_static_field_ref): Likewise.
2248         (get_dispatch_table): Likewise.
2249         (layout_class_method): Likewise.
2250         (emit_register_classes): Likewise.
2251         * constants.c (build_constant_data_ref): Likewise.
2252         * decl.c (builtin_function): Likewise.
2253         (create_primitive_vtable): Likewise.
2254         * expr.c (build_known_method_def): Likewise.
2255         (build_jni_stub): Likewise.
2256         (java_lang_expand_expr): Likewise.
2257
2258 2001-01-10  Tom Tromey  <tromey@redhat.com>
2259
2260         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
2261
2262 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2263
2264         * java-tree.h (lang_printable_name_wls): New prototype.
2265         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
2266         rather than `current_class' to print type name. Don't prepend type
2267         names when printing constructor names.
2268         (lang_printable_name_wls): New function.
2269         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
2270         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
2271         * parse.y (patch_method_invocation): Message tuned for constructors.
2272         (not_accessible_p): Grant `private' access from within
2273         enclosing contexts.
2274
2275 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2276
2277         All files with updated copyright when applicable.
2278         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
2279         * class.c (mangle_class_field): Function removed.
2280         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
2281         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
2282         (build_class_ref): Call `java_mangle_class_field' instead of
2283         `mangle_class_field.'
2284         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
2285         (layout_class): Call `java_mangle_decl' instead of
2286         `mangle_static_field.'
2287         (cxx_keywords): Initialized static array moved to `lex.c.'
2288         (layout_class_method): Changed leading comment. Simplified to
2289         call `java_mangle_decl.' Local `ptr' moved in for loop body.
2290         * decl.c (lang_mark_tree): Mark field `package_list.'
2291         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
2292         (struct lang_type): New field `package_list.'
2293         (unicode_mangling_length): Prototype removed.
2294         (append_gpp_mangled_name, append_gpp_mangled_classtype,
2295         emit_unicode_mangled_name): Likewise.
2296         (cxx_keyword_p): New prototype.
2297         (java_mangle_decl, java_mangle_class_field,
2298         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
2299         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
2300         `build_expr_wfl.'
2301         * jvgenmain.c (main_method_prefix): Global variable removed.
2302         (main_method_suffix): Likewise.
2303         (do_mangle_classname): New function.
2304         (main): Call it. Format changed to accomodate new mangling scheme.
2305         * lex.c: (utf8_cmp): Conditionally prototyped.
2306         (cxx_keywords): Moved from class.c, conditionally defined.
2307         (utf8_cmp, cxx_keyword_p): Likewise.
2308         * mangle.c (obstack.h, ggc.h): Included.
2309         (mangle_field_decl): New function.
2310         (mangle_method_decl, mangle_type, mangle_pointer_type,
2311         mangle_array_type, mangle_record_type,
2312         find_compression_pointer_match, find_compression_array_match,
2313         find_compression_record_match,
2314         find_compression_array_template_match, set_type_package_list,
2315         entry_match_pointer_p, emit_compression_string, init_mangling,
2316         finish_mangling, compression_table_add, mangle_member_name): Likewise.
2317         (mangle_obstack): New global.
2318         (MANGLE_RAW_STRING): New macro.
2319         (unicode_mangling_length): Turned static.
2320         (append_unicode_mangled_name): Renamed from
2321         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
2322         replaces `obstack', removed from the parameter list.
2323         (append_gpp_mangled_name): Turned static. `mangle_obstack'
2324         replaces parameter `obstack', removed from the parameter list. Call
2325         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
2326         (append_gpp_mangled_classtype): Removed.
2327         (compression_table, compression_next): New static variables.
2328         * parse.y (temporary_obstack): Extern declaration removed.
2329
2330 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2331
2332         * parse.y (patch_binop): Compute missing type in error situations.
2333
2334 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
2335
2336         * class.c (make_class_data): Push initial value for "arrayclass".
2337         * decl.c (init_decl_processing): Add new class field "arrayclass".
2338
2339 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
2340
2341         From patha@softlab.ericsson.se:
2342         * parse.y (switch_label): Use build, not build1, to construct
2343         DEFAULT_EXPR.
2344
2345 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
2346
2347         * lang.c (lang_decode_option): Change -MA to -MP.
2348         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
2349         Update to new prototype; do quote targets.
2350         (jcf_dependency_write): Update.
2351
2352 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
2353
2354         Shorten primitive array allocation path:
2355         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
2356         to create new primitive arrays.
2357         * expr.c (build_newarray): If generating native code, call
2358         soft_newarray_node with a reference to the primitive TYPE identifier
2359         instead of type_value.
2360
2361 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
2362
2363         Fix for PRs gcj/312 and gcj/253:
2364         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
2365         dest if they arn't already.
2366         * class.c (layout_class): Call maybe_layout_super_class on
2367         superinterfaces also, but only if compiling from bytecode.
2368
2369         Fix for PR gcj/373:
2370         * parse.y (create_class): Set ACC_STATIC if class is declared in an
2371         interface.
2372
2373 2000-12-15  Tom Tromey  <tromey@redhat.com>
2374
2375         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
2376         set.
2377
2378 2000-12-14  Andrew Haley  <aph@redhat.com>
2379
2380         * boehm.c (mark_reference_fields): Change test to correctly detect
2381         bitmap overflow.
2382
2383 2000-12-15  Andreas Jaeger  <aj@suse.de>
2384
2385         * config-lang.in (lang_dirs): Added.
2386
2387 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2388
2389         * parse.y (end_artificial_method_body): Fixed undefined behavior.
2390         Credits go to rth for finding it.
2391
2392 2000-12-13  Mike Stump  <mrs@wrs.com>
2393
2394         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
2395
2396 2000-11-07  Tom Tromey  <tromey@cygnus.com>
2397
2398         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
2399         * lex.c (java_ignorable_control_p): Removed.
2400         (java_letter_or_digit_p): Removed.
2401         (java_start_char_p): New function.
2402         (java_read_char): Return `int', not `unicode_t'.  Changed
2403         callers.
2404         (java_read_unicode): Likewise.
2405         (java_read_unicode_collapsing_terminators): Likewise.
2406         (java_get_unicode): Likewise.
2407         (java_new_lexer): Initialize hit_eof.
2408         (java_parse_end_comment): Take `int' argument.
2409         (java_parse_doc_section): Likewise.
2410         (java_parse_escape_sequence): Don't allow backlash-newline.
2411         Return `int'.
2412         * lex.h (JAVA_DIGIT_P): Removed.
2413         (_JAVA_LETTER_OR_DIGIT_P): Removed.
2414         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
2415         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
2416         (JAVA_PART_CHAR_P): New macro.
2417         (UEOF): Now -1.
2418         (JAVA_CHAR_ERROR): Now -2.
2419         (java_lexer): New field `hit_eof'.
2420         * chartables.h: New file.
2421         * gen-table.pl: new file.
2422
2423 2000-11-20  Tom Tromey  <tromey@cygnus.com>
2424             Alexandre Petit-Bianco  <apbianco@cygnus.com>
2425
2426         * parse.y (java_complete_lhs): Only allow compound assignment of
2427         reference type if type is String.
2428
2429 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2430
2431         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
2432         jcf-path.c: Likewise.
2433
2434 2000-12-09  Anthony Green  <green@redhat.com>
2435
2436         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
2437         filestart and filename_length as int values.
2438
2439 2000-12-07  Mo DeJong  <mdejong@redhat.com>
2440
2441         * jcf-io.c (find_class): Correct the logic that tests to see if a
2442         .java file is newer than its .class file. The compiler was
2443         incorrectly printing a warning when file mod times were equal.
2444
2445 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
2446
2447         * jvgenmain.c: Use ISPRINT not isascii.
2448
2449 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2450
2451         * parse.y (end_artificial_method_body): Fixed typo.
2452
2453 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2454
2455         * parse.y (patch_method_invocation): Pick the correct enclosing
2456         context when creating inner class instances.
2457         Fixes gcj/332.
2458
2459 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
2460
2461         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
2462         Update copyright year to 2000.
2463
2464 2000-11-23  Anthony Green  <green@redhat.com>
2465
2466         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
2467         Move current_file_list out of yyparse and make it static.
2468
2469         * expr.c: Declare quick_stack and tree_list_free_list as static
2470         (init_expr_processing): Register quick_stack and
2471         tree_list_free_list roots.
2472
2473 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2474
2475         * parse.y (build_outer_field_access): New local `decl_ctx', use
2476         it. Check for field's context and current class immediate outer
2477         context inheritance.
2478         (outer_field_access_p): Consider fields inherited from the last
2479         enclosing context.
2480         (build_access_to_thisn): Stop at the last enclosing context if
2481         necessary.
2482         Fixes gcj/367.
2483
2484 Thu Nov 23 02:19:14 2000  J"orn Rennecke <amylaar@redhat.com>
2485
2486         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
2487
2488 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
2489
2490         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
2491         scratch buffer.
2492
2493 2000-11-20  Tom Tromey  <tromey@cygnus.com>
2494
2495         * jv-scan.c (help): Document --complexity.
2496         (options): Added --complexity.
2497         (flag_complexity): New global.
2498         (main): Call `report'.
2499         * parse-scan.y (complexity): New global.
2500         (if_then_statement, if_then_else_statement,
2501         if_then_else_statement_nsi, switch_block_statement_group,
2502         while_expression, do_statement, for_begin, continue_statement,
2503         throw_statement, catch_clause, finally, method_invocation,
2504         conditional_and_expression, conditional_or_expression,
2505         conditional_expression): Update complexity.
2506         (reset_report): Reset complexity.
2507         (report): New function.
2508
2509 2000-11-20  Tom Tromey  <tromey@cygnus.com>
2510
2511         * lex.c (yylex): Added STRICT_TK case.
2512         * parse.y (STRICT_TK): Added.
2513         * parse-scan.y (STRICT_TK): Added.
2514         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
2515         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
2516         file.
2517         * keyword.h: Rebuilt.
2518         * keyword.gperf (strictfp): Added.
2519
2520 2000-11-20  Tom Tromey  <tromey@cygnus.com>
2521
2522         * lex.c (yylex): Recognize floating point constants with leading
2523         0.
2524
2525 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2526
2527         * java-tree.h (cyclic_inheritance_report): Constify.
2528         * parse.y (cyclic_inheritance_report): Likewise.
2529
2530 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
2531
2532         * parse.y (goal): Remove call to ggc_add_string_root.
2533
2534 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
2535
2536         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
2537         Create string in scratch buffer, then pass to build_string.
2538
2539 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
2540
2541         * parse.y (issue_warning_error_from_context): Add
2542         ATTRIBUTE_PRINTF.
2543
2544 2000-11-11  Anthony Green  <green@redhat.com>
2545
2546         * jcf-parse.c (process_zip_dir): Add finput parameter.
2547         (jcf_figure_file_type): Call process_zip_dir with appropriate
2548         argument.
2549
2550 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2551
2552         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
2553         * jcf-parse.c (jcf_figure_file_type): Likewise.
2554
2555 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
2556
2557         * parse.y (create_new_parser_context): Use memset () instead of
2558         bzero ().
2559
2560 2000-11-08  Tom Tromey  <tromey@cygnus.com>
2561
2562         * gjavah.c (process_file): Only include gcj/cni.h when generating
2563         CNI stubs.
2564
2565 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
2566
2567         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
2568         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
2569         instead of bzero ().
2570
2571 2000-11-05  Tom Tromey  <tromey@cygnus.com>
2572
2573         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
2574         * lex.c (IS_ZERO): New define.
2575         (java_perform_atof): Error on floating point underflow.
2576
2577 2000-11-04  Tom Tromey  <tromey@cygnus.com>
2578
2579         * lex.c (java_parse_escape_sequence): Only read two octal
2580         characters if the first one is greater than 3.  Don't allow
2581         "octal" numbers to include the digits 8 or 9.
2582
2583 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
2584
2585         * Make-lang.in (java.distdir): Remove.
2586
2587 2000-11-03  Tom Tromey  <tromey@cygnus.com>
2588
2589         * Make-lang.in (java.dvi): New target.
2590         Partial fix for PR other/567.
2591
2592         * lang-options.h: Mention -Wout-of-date.
2593         * jcf-dump.c (flag_newer): New global.
2594         * gjavah.c (flag_newer): New global.
2595         * jcf-io.c (find_class): Only warn when flag_newer set.
2596         * lang.c (flag_newer): New global.
2597         (struct string_option): New declaration.
2598         (lang_W_options): New global.
2599         (process_option_with_no): New function.
2600         (lang_decode_option): Use it.
2601
2602         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
2603         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
2604         `$'.
2605
2606         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
2607         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
2608         * lex.c (java_read_unicode): Removed `term_context' argument.
2609         Recognize any number of `u' in `\u'.
2610         (java_read_unicode_collapsing_terminators): New function.
2611         (java_get_unicode): Use it.
2612         (java_lineterminator): Removed.
2613         (yylex): Produce error if character literal is newline or single
2614         quote.  Return if eof found in middle of `//' comment.  EOF in
2615         `//' comment is only an error if pedantic.
2616         (java_ignorable_control_p): New function.
2617         (java_parse_end_comment): Return if eof found in middle of
2618         comment.
2619         Include flags.h.
2620         * jv-scan.c (pedantic): New global.
2621
2622 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2623
2624         * parse.y (outer_field_access_p): Inherited fields aren't
2625         consider outer fields.
2626         (maybe_build_thisn_access_method): Use
2627         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
2628         (resolve_expression_name): Trigger an error if a static field
2629         is being accessed as an outer field.
2630
2631 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2632
2633         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
2634         Fixes gcj/365.
2635
2636 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
2637
2638         * Make-lang.in: Move all build rules here from Makefile.in,
2639         adapt to new context.  Wrap all rules that change the current
2640         directory in parentheses.  Expunge all references to $(P).
2641         When one command depends on another and they're run all at
2642         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
2643         all object-file generation rules.  Delete obsolete variables.
2644
2645         * Makefile.in: Delete.
2646         * config-lang.in: Delete outputs= line.
2647
2648 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2649
2650         * parse.y (patch_method_invocation): NULLify this_arg when already
2651         inserted.
2652         (maybe_use_access_method): Handle call to methods unrelated to the
2653         current class. Fixed comment.
2654         Fixes gcj/361.
2655
2656 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2657
2658        * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
2659        scope.
2660
2661 2000-10-24  Tom Tromey  <tromey@cygnus.com>
2662
2663         * lex.c (java_new_lexer): Initialize new fields.  Work around
2664         broken iconv() implementations.
2665         (java_read_char): Swap bytes if required.  Use fallback decoder if
2666         required.
2667         (byteswap_init, need_byteswap): New globals.
2668         (java_destroy_lexer): Only close iconv handle if it is in use.
2669         * lex.h (java_lexer): New fields read_anything, byte_swap,
2670         use_fallback.
2671         Made out_buffer unsigned.
2672
2673 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2674
2675         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
2676         where an enclosing context can be set on the jdep.
2677         (do_resolve_class): Fixed identation.
2678
2679 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2680
2681         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
2682
2683         * jcf-reader.c (peek_attribute, skip_attribute): Only define
2684         when requested.
2685
2686         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
2687
2688         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
2689
2690 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2691
2692         * jcf-write.c (OP1): Update `last_bc'.
2693         (struct jcf_block): Fixed indentation and typo in comments.  New
2694         field `last_bc'.
2695         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
2696         follows `monitorenter'.
2697         * parse.y (patch_synchronized_statement): New local `tmp'. Call
2698         `patch_string'.
2699         Fixes gcj/232.
2700
2701 2000-10-16  Tom Tromey  <tromey@cygnus.com>
2702
2703         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
2704         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
2705         * lang-options.h: Added -MA, -MT, -MF..
2706         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
2707         (DEPEND_TARGET_SET): New macro.
2708         (DEPEND_FILE_ALREADY_SET): Likewise.
2709         (init_parse): Handle new flags.
2710         * jcf.h (jcf_dependency_print_dummies): Declare.
2711         * Make-lang.in (s-java): Added mkdeps.o.
2712         * Makefile.in (BACKEND): Added mkdeps.o.
2713         (../gcjh$(exeext)): Added mkdeps.o.
2714         (../jcf-dump$(exeext)): Added mkdeps.o.
2715         * jcf-depend.c: Include mkdeps.h.
2716         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
2717         add_entry): Removed.
2718         (jcf_dependency_reset): Rewrote.
2719         (dependencies): New global.
2720         (jcf_dependency_set_target): Rewrote.
2721         (jcf_dependency_add_target): Likewise.
2722         (jcf_dependency_add_file): Likewise.
2723         (munge): Removed.
2724         (print_ents): Removed.
2725         (jcf_dependency_write): Rewrote.
2726         (print_dummies): New global.
2727         (jcf_dependency_print_dummies): New function
2728         (jcf_dependency_write): Call deps_dummy_targets if required.
2729
2730 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2731
2732         * gjavah.c (add_class_decl): Removed unused variables `tname',
2733         `tlen' and `name_index'.
2734         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
2735         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
2736         in `wfl_operator' with value.
2737         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
2738         (jcf_figure_file_type): Fixed identation.
2739         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
2740         * parse.y (analyze_clinit_body): New function.
2741         (static_initializer:): Reset `current_static_block'.
2742         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
2743         `wfl_operator' with new value.
2744         (lookup_cl): Use EXPR_WFL_FILENAME.
2745         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
2746         analyze_clinit_body.
2747         (build_outer_field_access): Access to this$<n> built from
2748         current_class, not its outer context.
2749         (build_access_to_thisn): Fixed leading comment. Tidied things up.
2750         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
2751         (patch_method_invocation): Use `is_static_flag' when already
2752         initialized.
2753         (patch_newarray): Removed assignment in ternary operator.
2754
2755 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2756
2757         * except.c (free_eh_ranges): Don't free `whole_range'.
2758
2759 2000-10-15  Anthony Green  <green@redhat.com>
2760
2761         * decl.c (init_decl_processing): Call init_class_processing before
2762         anything else.
2763
2764 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2765
2766         * check-init.c (check_init): Fixed leading comment. Use
2767         LOCAL_FINAL_P.
2768         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
2769         (give_name_to_locals): Likewise.
2770         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
2771         fields in lang_decl_var.
2772         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
2773         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
2774         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
2775         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
2776         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
2777         (LOCAL_FINAL): Rewritten.
2778         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
2779         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
2780         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
2781         `init_final' fields.
2782         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
2783         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
2784         (TYPE_HAS_FINAL_VARIABLE): New macro.
2785         (struct lang_type): Added `afv' field.
2786         * parse.y (check_static_final_variable_assignment_flag): New function.
2787         (reset_static_final_variable_assignment_flag): Likewise.
2788         (check_final_variable_local_assignment_flag): Likewise.
2789         (reset_final_variable_local_assignment_flag): Likewise.
2790         (check_final_variable_indirect_assignment): Likewise.
2791         (check_final_variable_global_assignment_flag): Likewise.
2792         (add_inner_class_fields): Use LOCAL_FINAL_P.
2793         (register_fields): Handle local finals and final variables.
2794         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
2795         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
2796         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
2797         on local finals.
2798         (java_complete_expand_methods): Loop to set
2799         TYPE_HAS_FINAL_VARIABLE. Call
2800         `reset_final_variable_local_assignment_flag' and
2801         `check_final_variable_local_assignment_flag' accordingly before
2802         and after constructor expansion. Call
2803         `reset_static_final_variable_assignment_flag'
2804         before expanding <clinit> and after call
2805         `check_static_final_variable_assignment_flag' if the
2806         current_class isn't an interface. After all methods have been
2807         expanded, call `check_final_variable_global_assignment_flag' and
2808         `check_static_final_variable_assignment_flag' if the current class
2809         is an interface.
2810         (maybe_yank_clinit): Fixed typo in comment.
2811         (build_outer_field_access_methods): Removed old sanity check. Use
2812         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
2813         Don't create access methods for finals.
2814         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
2815         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
2816         existing DECL_INIT has been processed.
2817         (java_complete_lhs): Likewise.
2818         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
2819         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
2820         logic.
2821         (patch_assignment): Use LOCAL_FINAL_P.
2822         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
2823         DECL_INITIAL is nullified.
2824         Fixes gcj/163.
2825
2826 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2827
2828         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
2829
2830         * Makefile.in (parse.c, parse-scan.c): Likewise.
2831
2832 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
2833
2834         * class.c (temporary_obstack): Remove.
2835         (make_class): Don't mess with obstascks.
2836         (push_class): Likewise.
2837         (set_super_info): Likewise.
2838         (add_method_1): Likewise.
2839         (add_method): Likewise.
2840         (add_field): Likewise.
2841         (build_utf8_ref): Likewise.
2842         (build_class_ref): Likewise.
2843         (build_static_field_ref): Likewise.
2844         (finish_class): Likewise.
2845         (push_super_field): Likewise.
2846         (layout_class): Likewise.
2847         (layout_class_methods): Likewise.
2848         (init_class_processing): Likewise.
2849         * constants.c (get_tag_node): Likewise.
2850         (build_constant_data_ref): Likewise.
2851         * decl.c (ggc_p): Remove.
2852         (copy_lang_decl): Use ggc_alloc.
2853         (complete_start_java_method): Don't mess with obstacks.
2854         (start_java_method): Likewise.
2855         (end_java_method): Likewise.
2856         * except.c (link_handler): Use xmalloc.
2857         (free_eh_ranges): New function.
2858         (method_init_exceptions): Use it.
2859         (add_handler): Use xmalloc.
2860         (expand_start_java_handler): Don't mess with obstacks.
2861         (prepare_eh_table_type): Likewise.
2862         (expand_end_java_handler): Likewise.
2863         * expr.c (push_value): Likewise.
2864         (create_label_decl): Likewise.
2865         (build_jni_stub): Likewise.
2866         (java_lang_expand_expr): Likewise.
2867         (note_instructions): Use xrealloc.
2868         (java_push_constant_from_pool): Don't mess with obstacks.
2869         (process_jvm_instruction): Likewise.
2870         * java-tree.h (cyclic_inheritance_report): Remove duplicate
2871         declaration.
2872         * jcf-parse.c (get_constant): Don't mess with obstacks.
2873         (read_class): Likewise.
2874         (jcf_parse): Likewise.
2875         * lex.c (expresion_obstack): Remove.
2876         (java_lex): Don't use obstack_free.
2877         * parse.h (exit_java_complete_class): Don't mess with obstacks.
2878         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
2879         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
2880         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
2881         * parse.y (gaol): Add more GC roots.
2882         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
2883         (lookup_field_wrapper): Likewise.
2884         (obtain_incomplete_type): Don't mess with obstacks.
2885         (build_alias_initializer_paramter_list): Adjust calls to MANGLE_*
2886         macros.
2887         (craft_constructor): Don't mess with obstacks.
2888         (safe_layout_class): Likewise.
2889         (java_complete_class): Likewise.
2890         (source_end_java_method): Likewise.
2891         (build_outer_field_access_methods): Likewise.
2892         (build_outer_method_access_method): Likewise.
2893         (maybe_build_thisn_access_method): Likewise.
2894         (build_dot_class_method_invocation): Likewise.
2895         (java_complete_tree): Likewise.
2896         (java_complete_lhs): Likewise.
2897         (do_merge_string_cste): Likewise.
2898         (patch_string_cst): Likewise.
2899         (array_constructor_check_entry): Likewise.
2900         * typeck.c (build_java_array_type): Likewise.
2901         (parse_signature_string): Likewise.
2902         (build_java_signature): Likewise.
2903
2904 2000-10-12  Tom Tromey  <tromey@cygnus.com>
2905
2906         Fix for PR gcj/356:
2907         * gjavah.c (add_class_decl): Don't special-case inner classes.
2908         (add_namelet): Likewise.
2909
2910 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
2911
2912         * java-tree.h: Constify current_encoding.
2913         * lang.c: Constify current_encoding.
2914
2915 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
2916
2917         * jvgenmain.c (class_mangling_suffix): Omit `.'.
2918         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
2919
2920 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2921
2922         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
2923         patch. Fixes gcj/340.
2924
2925 2000-10-10  Tom Tromey  <tromey@cygnus.com>
2926
2927         * lex.c (java_new_lexer): Initialize out_first and out_last
2928         fields.
2929         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
2930
2931 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2932
2933         * parse.y (pop_current_osb): New function.
2934         (array_type:): Use `dims:', changed actions
2935         accordingly. Suggested by Anthony Green.
2936         (array_creation_expression:): Used pop_current_osb.
2937         (cast_expression:): Likewise.
2938         (search_applicable_method_list): Fixed indentation.
2939
2940 2000-10-08  Anthony Green  <green@redhat.com>
2941
2942         * parse.y (array_type_literal): Remove production.
2943         (type_literals): Refer to array_type, not array_type_literal.
2944
2945 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2946
2947         Patch contributed by Corey Minyard.
2948         * decl.c (check_local_named_variable): New function.
2949         (tree check_local_unnamed_variable): Likewise.
2950         (find_local_variable): Splitted. Call check_local_{un}named_variable.
2951
2952 2000-10-07  Anthony Green  <green@redhat.com>
2953
2954         * class.c (layout_class): Handle case where superclass can't be
2955         layed out yet.
2956
2957 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
2958
2959         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
2960         gperf.
2961
2962 2000-10-05  Tom Tromey  <tromey@cygnus.com>
2963
2964         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
2965         * jvgenmain.c (class_mangling_prefix): Removed.
2966         (class_mangling_suffix): New global.
2967         (main): Use it.
2968         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
2969         `$'.
2970         (print_method_info): Handle overrides for static and final
2971         methods.
2972         (process_file): Generate declaration for class object field.
2973         * class.c (cxx_keywords): New array.
2974         (utf8_cmp): New function.
2975         (cxx_keyword_p): New function.
2976         (layout_class_method): Mangle C++ keywords by appending `$'.
2977         (mangle_field): New function.
2978         (mangle_class_field): Use mangle_field.  Mangle class name as
2979         `class$'.
2980         (mangle_static_field): Use mangle_field.
2981
2982 Tue Oct  3 13:44:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2983
2984         * decl.c (find_local_variable): Removed uncessary type check and
2985         fixed range check typo. From Corey Minyard.
2986
2987 Wed Sep 13 16:06:52 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2988
2989         * decl.c (give_name_to_locals): New local `code_offset'. Call
2990         `maybe_adjust_start_pc'.
2991         * expr.c (note_instructions): New function.
2992         (expand_byte_code): Don't collect insn starts here.
2993         (peek_opcode_at_pc): New function.
2994         (maybe_adjust_start_pc): Likewise.
2995         * java-tree.h (maybe_adjust_start_pc): Declare.
2996         (note_instructions): Likewise.
2997         * jcf-parse.c (parse_class_file): Call `note_instructions'.
2998
2999 Wed Sep 13 11:50:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3000
3001         * parse.y (field_access:): Fixed indentation.
3002         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
3003
3004 2000-09-07  Tom Tromey  <tromey@cygnus.com>
3005
3006         Fix for PR gcj/307:
3007         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
3008         JPRIMITIVE_TYPE_P, for arithmetic operators.
3009         (patch_method_invocation): Indentation fix.
3010         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
3011         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
3012         (do_unary_numeric_promotion): Cleaned up code.
3013         (valid_cast_to_p): Handle boolean correctly.
3014
3015 2000-09-27  Tom Tromey  <tromey@cygnus.com>
3016
3017         * lex.c (java_read_unicode): Reset bs_count when finished with
3018         `\u' sequence.
3019
3020 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
3021
3022         Convert to GC.
3023         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
3024         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
3025         (typeck.o): Depend on ggc.h.
3026         * class.c (add_method_1): Use GC functions for allocation.
3027         (init_class_processing): Register roots.
3028         * decl.c (ggc_p): Set to 1.
3029         (pending_local_decls): Make it static.
3030         (push_jvm_slot): Use GC functions for allocation.
3031         (init_decl_processing): Register roots.
3032         (give_name_to_locals): Use GC functions for allocation.
3033         (lang_mark_tree): New function.
3034         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
3035         functions for allocation.
3036         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
3037         * lex.c (java_lex): Use build_string, rather than replicating it
3038         inline.
3039         * parse.y (goal): Add more roots.
3040         (mark_parser_ctxt): New function.
3041         * typeck.c: Include ggc.h.
3042
3043 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3044
3045         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
3046         contains something else than MODIFY_EXPR.
3047
3048 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
3049
3050         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
3051         * Makefile.in (parse.o): Depend on ggc.h.
3052         (class.o): Likewise.
3053         (constants.o): Likewise.
3054         (decl.o): Likewise.
3055         (expr.o): Likewise.
3056         (jcf-parse.o): Likewise.
3057         (jcf-write.o): Likewise.
3058         (mangle.o): Likewise.
3059         * class.c: Include ggc.h.
3060         (build_static_field_ref): Register GC roots.
3061         (layout_class): Likewise.
3062         (init_class_processing): Likewise.
3063         * constants.c: Include ggc.h.
3064         (current_constant_pool_data_ref): Remove.
3065         (tag_nodes): Move it to ...
3066         (get_tag_node): ... here.  Register GC roots.
3067         * decl.c: Include ggc.h.  Remove many global tree definitions.
3068         (throw_node): Define.
3069         (java_global_trees): Likewise.
3070         (predef_filenames): Make the size a constant.
3071         (init_decl_processing): Adjust accordingly.
3072         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
3073         * expr.c: Include ggc.h.
3074         (init_expr_processing): Register GC roots.
3075         (build_invokeinterface): Likewise.
3076         * java-tree.h: Replace extern tree declarations with macros.
3077         (java_global_trees): New variable.
3078         (java_tree_index): New enumeration.
3079         (init_jcf_parse): Declare.
3080         * jcf-parse.c: Include ggc.h.
3081         (current_class): Remove declaration.
3082         (main_class): Likewise.
3083         (all_class_list): Likewise.
3084         (predefined_filename_p): Adjust for constant size of
3085         predef_filenames.
3086         (init_jcf_parse): New function.
3087         * jcf-write.c: Include ggc.h.
3088         (generate_classfile): Register GC roots.
3089         (append_synthetic_attribute): Likewise.
3090         (append_innerclass_attribute_entry): Likewise.
3091         * lang.c: Include ggc.h.
3092         (lang_print_error): Register GC roots.
3093         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
3094         with macros.
3095         * parse.y: Include ggc.h.
3096         (wfl_operator): Remove.
3097         (goal): Register GC roots.
3098         (java_pop_parser_context): Adjust for new field names.
3099         (java_parser_context_save_global): Likewse.
3100         (java_parser_context_restore_global): Likewise.
3101         (java_parser_context_suspend): Likewise.
3102         (java_parser_context_resume): Likewise.
3103         (verify_constructor_circularity): Register GC roots.
3104         (lookup_cl): Likewise.
3105         (java_reorder_fields): Likewise.
3106         (build_current_this): Likewise.
3107         (class_in_current_package): Likewise.
3108         (argument_types_convertible): Likewise.
3109         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
3110
3111 2000-09-14  Tom Tromey  <tromey@cygnus.com>
3112
3113         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
3114
3115 2000-09-13  Tom Tromey  <tromey@cygnus.com>
3116
3117         * jcf-parse.c: Include <locale.h>.
3118         * jv-scan.c: Include <locale.h>.
3119
3120 2000-09-12  Tom Tromey  <tromey@cygnus.com>
3121
3122         * expr.c (pop_type_0): Return `Object' if trying to merge two
3123         interface types.
3124         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
3125         interface types; `Object' is always a valid supertype.
3126
3127 2000-09-12  Tom Tromey  <tromey@cygnus.com>
3128
3129         Fix for PR gcj/33:
3130         * jv-scan.c (help): Document --encoding.
3131         (options): Added `encoding' entry.
3132         (OPT_ENCODING): New define.
3133         (main): Handle --encoding.
3134         Include <langinfo.h> if nl_langinfo exists.
3135         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
3136         --encoding.
3137         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
3138         (parse_source_file): Correctly call java_init_lex.  Added `finput'
3139         argument.  Use nl_langinfo to determine default encoding.
3140         * java-tree.h (current_encoding): Declare.
3141         * parse.y (java_parser_context_restore_global): Don't restore
3142         `finput'.
3143         (java_parser_context_save_global): Don't set `finput' field.
3144         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
3145         if required.
3146         * lang.c (current_encoding): New global.
3147         (lang_decode_option): Recognize `-fencoding='.
3148         (finish_parse): Don't close finput.
3149         * parse.h (struct parser_ctxt): Removed `finput' and
3150         `unget_utf8_value' fields.  Added `lexer' field.
3151         (java_init_lex): Fixed declaration.
3152         * lex.c (java_new_lexer): New function.
3153         (java_destroy_lexer): Likewise.
3154         (java_read_char): Added `lex' argument.  Handle iconv case.
3155         (java_read_unicode): Added `lex' argument.  Count backslashes in
3156         lexer structure.
3157         (java_init_lex): Added `finput' and `encoding' arguments.  Set
3158         `lexer' field in ctxp.
3159         (BAD_UTF8_VALUE): Removed.
3160         (java_lex): Handle seeing UEOF in the middle of a string literal.
3161         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
3162         (java_lexer): New structure.
3163         (UNGETC): Removed.
3164         (GETC): Removed.
3165         (DEFAULT_ENCODING): New define.
3166         (java_destroy_lexer): Declare.
3167
3168 2000-09-12  Tom Tromey  <tromey@cygnus.com>
3169
3170         Fix for PR gcj/343:
3171         * lex.c (java_init_lex): Initialize java_io_serializable.
3172         * parse.y (java_io_serializable): New global.
3173         (valid_ref_assignconv_cast_p): An array can be cast to
3174         serializable.
3175
3176 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
3177
3178         * decl.c, expr.c: Include defaults.h if not already included.
3179         Don't define the *_TYPE_SIZE macros.
3180
3181 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
3182
3183         * typeck.c (build_java_array_type): Correct first parameter
3184         in ADJUST_FIELD_ALIGN invocation.
3185
3186 2000-09-06  Tom Tromey  <tromey@cygnus.com>
3187
3188         * lang-specs.h: Also recognize `-femit-class-files'.
3189
3190 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3191
3192         * verify.c (merge_types): Load the types to merge if necessary.
3193
3194 2000-09-02  Anthony Green  <green@redhat.com>
3195
3196         * jcf-io.c: Include zlib.h.
3197         (open_in_zip): Read compressed class file archives.
3198         * zipfile.h (ZipDirectory): Add uncompressed_size and
3199         compression_method fields.
3200         * zextract.c (read_zip_archive): Collect file compression info.
3201
3202 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
3203
3204         * parse.y (do_resolve_class): Also explore superclasses of
3205         intermediate enclosing contexts when searching for inner classes.
3206
3207 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3208
3209         * parse.y (variable_declarator_id:): Better error message.
3210         (expression_statement:): Use YYNOT_TWICE.
3211         (cast_expression:): Likewise.
3212         (assignment:): Likewise.
3213
3214 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3215
3216         * parse.y (do_merge_string_cste): New locals. Create new
3217         STRING_CSTs each time, use memcpy. Fixes gcj/311.
3218
3219 2000-08-07  Hans Boehm  <boehm@acm.org>
3220
3221         * boehm.c (mark_reference_fields): Set marking bits for all words in
3222         a multiple-word record.
3223         (get_boehm_type_descriptor): Use the procedure marking descriptor for
3224         java.lang.Class.
3225
3226 2000-08-31  Mike Stump  <mrs@wrs.com>
3227
3228         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
3229         jcf-dump$(exeext)): Make parallel safe.
3230
3231 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
3232
3233         * jcf-parse.c (set_source_filename): Constify a char *.
3234         * jcf-write.c (append_innerclasses_attribute,
3235         make_class_file_name): Constify a char *.  Don't recycle a
3236         variable for an unrelated purpose.
3237         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
3238         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
3239
3240 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3241
3242         * expr.c (can_widen_reference_to): Fixed indentation.
3243         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
3244         * parse.y: `finit$' replaces `$finit$' in comments.
3245         (try_builtin_assignconv): Fixed leading comment.
3246
3247 2000-08-25  Greg McGary  <greg@mcgary.org>
3248
3249         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
3250
3251 2000-08-24  Greg McGary  <greg@mcgary.org>
3252
3253         * lang.c (lang_decode_option): Use ARRAY_SIZE.
3254         * parse.y (BINOP_LOOKUP): Likewise.
3255
3256 2000-08-22  Andrew Haley  <aph@cygnus.com>
3257
3258         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
3259         sign extending. Fixes gcj/321.
3260         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
3261         combining to make a jlong. Fixes gcj/321.
3262
3263 2000-08-21  Nix  <nix@esperi.demon.co.uk>
3264
3265         * lang-specs.h: Do not process -o or run the assembler if
3266         -fsyntax-only.
3267
3268 2000-08-16  Andrew Haley  <aph@cygnus.com>
3269
3270         * typeck.c (build_java_array_type): Rewrite code to do array
3271         alignment.  Take into account back-end macros when aligning array
3272         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
3273         user to set alignment. Fixes gcj/252 and 160.
3274
3275 2000-08-09  Tom Tromey  <tromey@cygnus.com>
3276
3277         * parse.y (check_abstract_method_definitions): Now return `int'.
3278         Check implemented interfaces.  Fixes PR gcj/305.
3279
3280         * parse.y (patch_switch_statement): Disallow `long' in switch
3281         expressions.  Fixes PR gcj/310.
3282
3283 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3284
3285         * decl.c (finit_leg_identifier_node): New global.
3286         (init_decl_processing): Use `finit$' to initialize
3287         finit_identifier_node. Use `$finit$' to initialize
3288         finit_leg_identifier_node.
3289         * expr.c (expand_java_field_op): Use ID_FINIT_P.
3290         * java-tree.h (finit_identifier_node): Changed attached comment.
3291         (finit_leg_identifier_node): New declaration.
3292         (ID_FINIT_P): Take finit_identifier_node and
3293         finit_leg_identifier_node into account. This is a backward
3294         compatibility hack.
3295
3296 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3297
3298         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
3299         Jan 6 2000 patch.
3300         (generate_bytecode_insns): Check `nargs' before emitting it.
3301         * verify.c (merge_type_state): Fixed typo.
3302         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
3303         generate_bytecode_{conditional,insns}.
3304
3305 Sun Aug 13 09:41:49 2000  Anthony Green  <green@redhat.com>
3306
3307         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
3308         for -pg builds).
3309
3310 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3311
3312         * class.c (maybe_layout_super_class): Fixed indentation.
3313         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
3314         (java_check_methods): New function declaration.
3315         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
3316         instead of `str_ptr'.
3317         * jcf-write.c (generate_bytecode_insns): Emit number the of args
3318         of a `invokeinterface' at the right time.
3319         * parse.h (WFL_STRIP_BRACKET): New macro.
3320         (SET_TYPE_FOR_RESOLUTION): Use it.
3321         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
3322         (check_class_interface_creation): Don't check for cross package
3323         innerclass name clashes.
3324         (method_header): Behave properly if MDECL is `error_mark_node'.
3325         (method_declarator): Return `error_mark_node' if bogus current
3326         class.
3327         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
3328         (resolve_and_layout): New local `decl_type', set and used. Call
3329         java_check_methods.
3330         (java_check_methods): New method.
3331         (java_layout_classes): Use it.
3332         (resolve_qualified_expression_name): No EH check necessary in
3333         access$<n>.
3334         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
3335         `case' statement.
3336         (patch_assignment): Set DECL_INITIAL on integral final local.
3337
3338 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3339
3340         * java-tree.h (flag_extraneous_semicolon): New extern.
3341         * lang-options.h: (-Wextraneous-semicolon): New option.
3342         * lang.c (flag_redundant): Fixed typo in leading comment.
3343         (flag_extraneous_semicolon): New global.
3344         (lang_decode_option): Set `flag_extraneous_semicolon' when
3345         -Wall. Decode `-Wextraneous-semicolon'.
3346         * parse.y (type_declaration:): Removed `SC_TK' hack, added
3347         `empty_statement' rule.
3348         (class_body_declaration): Likewise.
3349         (method_body:): Accept `;' as a method body.
3350         (static_initializer:): Removed `SC_TK' hack.
3351         (constructor_block_end:): Likewise.
3352         (empty_statement:): Report deprecated empty declaration. Fixes
3353         gcj/295
3354
3355 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3356
3357         * parse.y (build_dot_class_method_invocation): Changed parameter
3358         name to `type'. Build signature from `type' and convert it to a
3359         STRING_CST if it's an array.
3360         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
3361         to use `ref_type' directly.
3362
3363 Sun Aug  6 00:47:24 2000  Ovidiu Predescu  <ovidiu@cup.hp.com>
3364
3365         * lang-options.h: Added a comma after the last element to avoid
3366         syntax errors when other languages define additional options.
3367
3368 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
3369
3370         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
3371         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
3372         (jc1): Link with $(BACKEND).
3373         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
3374
3375 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
3376
3377         * jvspec.c: Adjust type of second argument to
3378         lang_specific_driver, and update code as necessary.
3379
3380         * class.c (build_dtable_decl): Initialize dummy.
3381
3382 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3383
3384         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
3385         method bodies not to rule out discarding `<clinit>'; don't use
3386         <clinit> to initialize static fields with constant initializers.
3387
3388 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3389
3390         * gjavah.c (print_method_info): Added `synth' parameter. Skip
3391         synthetic methods.
3392         (method_synthetic): New global.
3393         (HANDLE_METHOD): Recognize synthetic method and tell
3394         `print_method_info' about it.
3395         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
3396         processing a synthetic method.
3397         * jcf-reader.c (skip_attribute): New function.
3398         ( skip_attribute): Likewise.
3399
3400 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3401
3402         * parse.y (build_outer_field_access): Fixed comments.
3403         (fix_constructors): Emit the initialization of this$<n> before
3404         calling $finit$.
3405         (resolve_qualified_expression_name): Build an access to `decl' if
3406         necessary.
3407
3408 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3409
3410         * parse-scan.y (curent_class): Non longer const.
3411         (inner_qualifier, inner_qualifier_length): Deleted.
3412         (current_class_length): New global.
3413         (bracket_count): Fixed typo in leading comment.
3414         (anonymous_count): New global.
3415         (class_instance_creation_expression:): Handle anonymous classes.
3416         (anonymous_class_creation:): New rule.
3417         (push_class_context): Rewritten.
3418         (pop_class_context): Likewise.
3419         (INNER_QUALIFIER): Macro deleted.
3420         (report_class_declaration): call `push_class_context' when
3421         entering the function. `fprintf' format modified not to use
3422         INNER_QUALIFIER.
3423         (report_class_declaration): Assign `package_name' and
3424         `current_class' to NULL separatly.
3425
3426 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3427
3428         * expr.c (build_invokeinterface): Call layout_class_methods on
3429         target interface.
3430
3431 2000-07-27  Tom Tromey  <tromey@cygnus.com>
3432             Anthony Green  <green@cygnus.com>
3433             Alexandre Petit-Bianco  <apbianco@cygnus.com>
3434
3435         * class.c (make_class_data): Create vtable for abstract classes.
3436         (get_dispatch_table): Changed to cope with abstract classes.
3437
3438 2000-07-27  Tom Tromey  <tromey@cygnus.com>
3439
3440         * parse.y (patch_method_invocation): Don't reverse the argument
3441         list when dealing with anonymous class constructors. Fixed typo in
3442         comment.
3443
3444 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3445
3446         * parse.y (build_alias_initializer_parameter_list): Reverse
3447         crafted list when building aliases for anonymous class
3448         constructors.
3449
3450 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3451
3452         * parse.y (jdep_resolve_class): Don't bother checking potential
3453         innerclass access if `decl' is NULL.
3454         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
3455         WFL.
3456
3457 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3458
3459         * parse.c: Remove (again.)
3460
3461 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3462
3463         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
3464         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
3465         outside the `if' statement, alias to innerclass removed, `decl'
3466         used to mark the class complete.
3467
3468 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3469
3470         * parse.y (simple_name:): Fixed typo in error message.
3471
3472 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3473
3474         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
3475         or its first operand can be error marks.
3476
3477 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3478
3479         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
3480         * parse.y (method_header): Likewise.
3481
3482 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3483
3484         * parse.y (process_imports): Consider that one might be trying to
3485         import an innerclass. Fixes gcj/254
3486
3487 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3488
3489         * parse.y (find_as_inner_class): Handle the case where the
3490         enclosing context of an innerclass has been loaded as bytecode.
3491
3492 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3493
3494         * parse.y (simple_name:): Reject `$' in type names.
3495         (resolve_type_during_patch): Use `type' as a second
3496         argument to resolve_no_layout. Fixes gcj/257.
3497
3498 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
3499
3500         * parse.y (find_most_specific_methods_list): Select the only
3501         non-abstract method even if max has been set.
3502         Fixes gcj/285, gcj/298.
3503
3504 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
3505
3506         * lang-specs.h: Added %(jc1) to java compiler options.
3507
3508 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
3509
3510         * .cvsignore: New file.
3511
3512 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3513
3514         * parse.y (not_accessible_p): Access granted to innerclasses
3515         (indirectly) extending the reference type. Fixes gcj/249.
3516
3517 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3518
3519         * parse.y (patch_method_invocation): Fixed comment.
3520         (maybe_use_access_method): Build this$<n>s to the context of the
3521         target method, or a type that extends it. Fixes gcj/242.
3522
3523 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
3524
3525         * parse.c: Remove.
3526
3527 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3528
3529         * parse.y (fold_constant_for_init): Avoid bullish conversion.
3530
3531 2000-07-13  Tom Tromey  <tromey@cygnus.com>
3532
3533         * lang-specs.h: Added %{I*}.
3534
3535 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
3536
3537         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
3538
3539 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
3540
3541         * parse-scan.c: Remove.
3542
3543 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3544
3545         * class.c (set_super_info): Handled protected inner classes.
3546         (common_enclosing_context_p): Bail early if arguments aren't both
3547         inner classes.
3548         (get_access_flags_from_decl): Handle private and protected inner
3549         classes.
3550         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
3551         (CLASS_PROTECTED): Likewise.
3552         (struct lang_type): New bitfield `poic'.
3553         * parse.y (jdep_resolve_class): Call check_inner_class_access on
3554         inner classes only.
3555         (check_inner_class_access): Renamed arguments, added
3556         comments. Handles protected inner classes (fixes gcj/225)
3557         (not_accessible_p): Fixed comments. Avoid handling inner classes.
3558
3559 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3560
3561         * parse.y (resolve_qualified_expression_name): Verify qualified
3562         access to `this'. Fixes gcj/239.
3563
3564 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3565
3566         * jcf-write.c (generate_classfile): Don't install ConstantValue
3567         for null pointers.
3568
3569 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3570
3571         * parse.y (resolve_qualified_expression_name): Handle inner class
3572         access. Fixes gcj/256.
3573
3574 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3575
3576         * jcf-write.c (generate_classfile): Properly install the
3577         ConstantValue attribute and the initial value constant pool index
3578         on string constants.
3579         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
3580         class files.
3581
3582 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3583
3584         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
3585         construct.
3586         * parse.y (find_as_inner_class): Fixed typo.
3587         (do_resolve_class): Explore enclosing contexts when searching for
3588         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
3589         (check_inner_class_access): Check `decl' which can be null in case
3590         of previous errors.
3591
3592 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3593
3594         * java-tree.h (java_debug_context): Declared `extern'.
3595         (safe_layout_class): Likewise.
3596         * parse.y (resolve_field_access): Field must be `static' in order
3597         to be replaced by its initial value. Added comments.
3598         (find_applicable_accessible_methods_list): Fixed typo.
3599         (find_most_specific_methods_list): Methods found in innerclasses
3600         take over methods founds in the enclosing contexts.
3601         (java_complete_tree): Loosen restrictions on the type of DECLs
3602         that can be replaced by their initialization values.
3603         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
3604
3605 2000-07-05  Tom Tromey  <tromey@cygnus.com>
3606
3607         * Make-lang.in (PARSE_DIR): New macro.
3608         (PARSE_RELDIR): Likewise.
3609         (PARSE_C): Likewise.
3610         (PARSE_SCAN_C): Likewise.
3611         ($(PARSE_C)): New target.
3612         ($(PARSE_SCAN_C)): Likewise.
3613         (SET_BISON): New macro.
3614         (BISONFLAGS): Likewise.
3615         (JAVABISONFLAGS): Likewise.
3616
3617 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
3618
3619         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
3620         argument on the first pass for CNI as well as JNI.
3621         (print_method_info): Set up method name on the first pass only.
3622
3623 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3624
3625         * parse.y (parser_qualified_classname): Removed parameter
3626         `is_static'.
3627         (create_interface): Removed first passed parameter to
3628         parser_qualified_classname.
3629         (create_class): Likewise. Don't install alias on static
3630         innerclasses. Fixes gcj/275.
3631
3632 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3633
3634         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
3635         debugable statement with empty_stmt_node. Fixes gcj/272
3636
3637 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3638
3639         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
3640         gcj/271.
3641
3642 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3643
3644         * jcf-write.c (push_long_const): Appropriately cast short negative
3645         constant to jword.
3646
3647 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3648
3649         * parse.y (verify_constructor_super): Use loop variable
3650         `m_arg_type' initialized with `mdecl_arg_type'.
3651
3652 2000-06-29  Tom Tromey  <tromey@cygnus.com>
3653
3654         * parse.y (resolve_field_access): Handle case where `type_found'
3655         is NULL.
3656
3657 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3658
3659         * expr.c (lookup_field): The same field can be found through two
3660         different interface. Don't declare it ambiguous in that case.
3661
3662 2000-06-27  Tom Tromey  <tromey@cygnus.com>
3663
3664         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
3665         follows \r, then unget it at a lower level.
3666
3667 2000-06-26  Tom Tromey  <tromey@cygnus.com>
3668
3669         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
3670         java_complete_tree.
3671
3672 2000-06-25  Tom Tromey  <tromey@cygnus.com>
3673
3674         * parse.y (for_statement): Wrap expression in a WFL if it is a
3675         constant.  For PR gcj/268.
3676
3677 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3678
3679         * parse.y (do_resolve_class): Minor optimiztion in the package
3680         list search. Removed unnecessary test and return statement.
3681         (valid_ref_assignconv_cast_p): Order of arguments to
3682         enclosing_context_p fixed.
3683
3684 2000-06-24  Tom Tromey  <tromey@cygnus.com>
3685
3686         * expr.c (lookup_field): Print error and return error_mark_node if
3687         field reference is ambiguous.
3688
3689         * parse.y (check_abstract_method_definitions): Also check if
3690         `other_method' is abstract.
3691
3692 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3693
3694         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
3695         classes.
3696         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
3697         (struct lang_type): New field `pic'.
3698         (CLASS_PRIVATE): New macro.
3699         * parse.y (check_inner_class_access): New function.
3700         (jdep_resolve_class): Call it.
3701
3702 2000-06-23  Tom Tromey  <tromey@cygnus.com>
3703
3704         * parse.y (patch_incomplete_class_ref): Initialize the returned
3705         class.  For PR gcj/260.
3706
3707 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3708
3709         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
3710
3711 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3712
3713         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
3714         Java specific checks.
3715         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
3716         screened by DECL_P.
3717         * java-tree.def (CASE_EXPR): Marked 'e'.
3718         (DEFAULT_EXPR): Likewise.
3719         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
3720         screened by DECL_P.
3721         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
3722         Java specific checks.
3723         (generate_bytecode_insns): Test try_block for BLOCK before using
3724         BLOCK_EXPR_BODY.
3725         * parse.y (build_wfl_wrap): Added `location' argument. Set
3726         EXPR_WFL_LINECOL accordingly.
3727         (dim_expr:): Wrap constants with WFLs.
3728         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
3729         (resolve_package): Check for `stmt' not being a BLOCK before
3730         building a debuggable statement with it.
3731         (make_qualified_primary): Added extra parameter to build_wfl_wrap
3732         invocation.
3733         (resolve_field_access): Make sure `decl' is a DECL before treating
3734         it as such.
3735         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
3736         IDENTIFIER_NODE before treating it as such.
3737         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
3738         treating it as such.
3739         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
3740         to be applied only on non array types.
3741
3742 2000-06-16  Per Bothner  <per@bothner.com>
3743
3744         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
3745         define in terms of DECL_RESULT, as that fails when --enable-checking.
3746
3747 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3748
3749         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
3750         types the same in comparison.
3751         (CHECK_OP): Add static prototype.
3752
3753 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
3754
3755         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
3756         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
3757         * parse.c: Rebuilt.
3758
3759 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3760
3761         * decl.c (create_primitive_vtable): Prototype.
3762
3763         * jcf-write.c (generate_bytecode_insns): Initialize variable
3764         `saved_context'.
3765
3766         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
3767
3768 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
3769
3770         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
3771         to track searched classes, and do not search the same class more than
3772         once. Call find_applicable_accessible_methods_list on immediate
3773         superclass, instead of search_applicable_method_list on all ancestors.
3774         Fix for PR gcj/238.
3775
3776 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
3777
3778         * parse.y (register_fields): Permit static fields in inner classes
3779         if they are final. Fix for PR gcj/255.
3780
3781 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3782
3783         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
3784         * parse.y (find_in_imports): Returned type changed to void,
3785         leading comment fixed.
3786         (register_package): New function.
3787         (qualify_and_find): Likewise.
3788         (package_declaration:): Use `register_package'.
3789         (single_type_import_declaration:): Removed local variable
3790         `node'. Added missing `;' for consistency.
3791         (type_import_on_demand_declaration:): Use `chainon' to link new
3792         entries.
3793         (lookup_field_wrapper): Lookup local variables defined in outer
3794         contexts first.
3795         (java_complete_class): Don't reverse the list of imported on demand.
3796         (do_resolve_class): Reorganized. Removed local variable
3797         `original_name'. Call `qualify_and_find' with the current package
3798         name, invoke `find_in_imports_on_demand' right after. Call
3799         `qualify_and_find' with the packages we've seen so far. Fixed
3800         operations numbering in comments.
3801         (java_expand_class): Don't reverse `package_list'.
3802         (find_most_specific_methods_list): New local variables `abstract'
3803         and `candidates'. Use them to pick the right method.
3804
3805 Tue Jun  6 11:39:05 2000  Tom Tromey  <tromey@ferrule.cygnus.com>
3806
3807         * parse.y (check_modifiers_consistency): Don't subtract out
3808         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
3809
3810 2000-06-04  Philipp Thomas  <pthomas@suse.de>
3811
3812         * Makefile.in (INTLLIBS): New.
3813         (LIBS): Add above.
3814         (DEPLIBS): Ditto.
3815
3816 Fri Jun  2 16:48:55 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3817
3818         * class.c (get_dispatch_table): Build the vtable dummy entry list
3819         element with a null purpose. Fixed leading comment.
3820         (build_dtable_decl): Build an accurate dtable type when appropriate
3821         and use it.
3822
3823 2000-06-02  Richard Henderson  <rth@cygnus.com>
3824
3825         * lang.c (lang_get_alias_set): New.
3826
3827 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3828
3829         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
3830         before using it as the accessed field.
3831
3832 2000-05-31  Tom Tromey  <tromey@cygnus.com>
3833
3834         * java-tree.h (boolean_array_vtable, byte_array_vtable,
3835         char_array_vtable, short_array_vtable, int_array_vtable,
3836         long_array_vtable, float_array_vtable, double_array_vtable):
3837         Declare.
3838         * expr.c (get_primitive_array_vtable): New function.
3839         (create_primitive_vtable): New function.
3840         (java_lang_expand_expr): Enable code to statically generate
3841         arrays.
3842         * decl.c (init_decl_processing): Create primitive vtables.
3843         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
3844         short_array_vtable, int_array_vtable, long_array_vtable,
3845         float_array_vtable, double_array_vtable): Define.
3846
3847 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
3848
3849         * java/parse.y (find_applicable_accessible_methods_list):
3850         Don't add an uninitialized value to the list.
3851
3852 2000-05-25  Tom Tromey  <tromey@cygnus.com>
3853
3854         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
3855         when trying to see if field's class should be initialized.  Always
3856         initialize field's declaring class, not qualified class.
3857         For PR gcj/162.
3858
3859         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
3860         `wfl_operator', to maybe_build_primttype_type_ref.
3861         Fixes PR gcj/235.
3862
3863 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
3864
3865        * parse.y (patch_method_invocation): Don't try to lookup methods
3866        in primitive types.
3867
3868 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3869
3870         * parse.y (resolve_field_access): Call the appropriate <clinit>
3871         before accessing the length of a static array. Craft a decl for
3872         the field while its time. Fixes PR gcj/129.
3873
3874 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3875
3876         * parse.y (resolve_package): Correctly set `*next' (was off by
3877         one.)
3878         (resolve_qualified_expression_name): Fixed comment.
3879
3880 Thu Apr 27 17:47:34 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3881
3882         * jcf-parse.c (jcf_parse_source): Reset current_class and
3883         current_function_decl to NULL before parsing a new file.
3884
3885 Thu Apr 27 17:25:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3886
3887         * parse.y (block_end:): If the collected block doesn't feature a
3888         statement, insert an empty statement.
3889
3890 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3891
3892         * parse.y (maybe_yank_clinit): New function.
3893         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
3894         end of the list of methods belonging to a class.
3895         (java_complete_expand_method): Check whether <clinit> is really
3896         necessary and expand it accordingly.
3897
3898 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3899
3900         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
3901         processed by the method's switch statement.
3902
3903 2000-05-19  Tom Tromey  <tromey@cygnus.com>
3904
3905         * java-tree.h: Added init state enum.
3906         * decl.c (emit_init_test_initialization): Initialize class
3907         initialization check variable by looking at class' state.
3908
3909 2000-05-19  Tom Tromey  <tromey@cygnus.com>
3910
3911         * java-tree.h (build_instanceof): Declare.
3912         (build_get_class): Declare.
3913         * parse.y (patch_binop): Use build_instanceof.
3914         * expr.c (build_instanceof): New function.  If class is final,
3915         don't make a function call.
3916         (expand_java_INSTANCEOF): Use it.
3917         (build_get_class): New function.
3918
3919 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3920
3921         * jcf-write.c (generate_classfile): Scan the source_file for
3922         slashes with the right pointer variable.
3923
3924 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
3925
3926         * lang.c (lang_decode_option): Update -Wunused flags by calling
3927         set_Wunused.
3928         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
3929
3930 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
3931
3932         * check_init.c (check_init): Constify local char *.
3933         * class.c (push_class): Constify local char *.
3934         * java_tree.h: Update prototypes.
3935         * jcf-io.c (open_class): Constify filename parameter and
3936         return value.
3937         (find_class): Remove redundant string copy.  Cast return from
3938         open_class.
3939         * jcf-parse.c (read_class, parse_class_file, yyparse):
3940         Constify local char *.
3941         * jcf-write.c (generate_bytecode_insns, generate_classfile):
3942         Constify local char *.
3943         * jcf.h (JCF): Constify filename and classname.
3944         (JCF_FINISH): Cast args to FREE to char * when appropriate.
3945         * lang.c (init_parse): Constify parameter and return value.
3946         * lex.c (java_get_line_col): Constify filename parameter.
3947         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
3948         * parse.y (java_parser_context_suspend,
3949         issue_warning_error_from_context, safe_layout_class): Constify
3950         local char *.
3951         * parse.c: Regenerate.
3952
3953 2000-05-08  Tom Tromey  <tromey@cygnus.com>
3954
3955         * expr.c (build_jni_stub): Cache the result of
3956         _Jv_LookupJNIMethod.
3957
3958 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3959
3960         * decl.c (predef_filenames_size): Now 7.
3961         (predef_filenames): New seventh entry.
3962
3963 2000-05-04  Tom Tromey  <tromey@cygnus.com>
3964
3965         * boehm.c (mark_reference_fields): Don't mark RawData fields.
3966         Keep track of when we've seen a reference field after a
3967         non-reference field.
3968         (get_boehm_type_descriptor): Handle case where we see
3969         non-reference fields but no trailing reference field.
3970         * decl.c (rawdata_ptr_type_node): Define.
3971         (init_decl_processing): Initialize rawdata_ptr_type_node.
3972         * java-tree.h (rawdata_ptr_type_node): Declare.
3973
3974 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3975
3976         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
3977         specifiers in calls to fprintf.
3978
3979 2000-05-03  Andrew Haley  <aph@cygnus.com>
3980
3981         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
3982
3983         * javaop.h (WORD_TO_INT): New function.
3984         (IMMEDIATE_s4): Use WORD_TO_INT.
3985         * jcf.h (JPOOL_INT): Ditto.
3986
3987         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
3988         separator.
3989
3990 2000-04-19  Tom Tromey  <tromey@cygnus.com>
3991
3992         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
3993         on native function.
3994         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
3995         JNI methods.
3996         * expr.c (build_jni_stub): New function.
3997         * lang-specs.h: -fjni and -femit-class-file are incompatible.
3998         * parse.c: Rebuilt.
3999         * parse.y (java_complete_expand_methods): Expand a native method
4000         and call build_jni_stub if -fjni given.
4001         * lang-options.h: Document -fjni.
4002         * lang.c (flag_jni): New global.
4003         (lang_f_options): Added `jni' entry.
4004         * java-tree.h (soft_lookupjnimethod_node,
4005         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
4006         Declare.
4007         (flag_jni): Declare.
4008         (build_jni_stub): Declare.
4009         (struct lang_decl): Added `native' flag.
4010         (METHOD_NATIVE): Redefined to use `native' field of lang specific
4011         structure.
4012         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
4013         soft_jnipopsystemframe_node): New globals.
4014         (init_decl_processing): Set them.  _Jv_InitClass only takes one
4015         argument.
4016
4017         * java-tree.def: Put into `C' mode.
4018
4019 2000-04-27  Tom Tromey  <tromey@cygnus.com>
4020
4021         Fix for PR gcj/2:
4022         * expr.c (expand_invoke): Generate check to see if object pointer
4023         is null in nonvirtual invocation case.
4024         * java-tree.h (soft_nullpointer_node): Declare.
4025         * decl.c (soft_nullpointer_node): New global.
4026         (init_decl_processing): Initialize soft_nullpointer_node.
4027         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
4028         or `private' methods.
4029         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
4030
4031 Wed Apr 26 14:29:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4032
4033         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
4034         from <clinit>
4035
4036 2000-04-26  Tom Tromey  <tromey@cygnus.com>
4037
4038         * zextract.c (find_zip_file_start): New function.
4039         (read_zip_archive): Use it.
4040
4041 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4042
4043         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
4044
4045 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4046
4047         * class.c (common_enclosing_context_p): New function.
4048         * java-tree.h (common_enclosing_context_p): Added prototype.
4049         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
4050         classes sharing an outer context with the current instance.
4051         * parse.y (build_access_to_thisn): Fixed leading comment.
4052         (verify_constructor_super): New local `supper_inner'. Skip
4053         enclosing context argument in the case of inner class constructors.
4054         (patch_method_invocation): Insert proper context as second
4055         parameter to pure inner class constructor super invocations.
4056
4057 Mon Apr 24 14:59:36 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4058
4059         * parse.y (end_class_declaration): Reset the interface number
4060         counter.
4061
4062 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4063
4064         * parse.y (source_start_java_method): Deleted unnecessary code.
4065         (patch_method_invocation): Fixed comment.
4066
4067 2000-04-24  Robert Lipe <robertlipe@usa.net>
4068
4069         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
4070
4071 2000-04-23  Tom Tromey  <tromey@cygnus.com>
4072
4073         * boehm.c (mark_reference_fields): Use int_byte_position.
4074
4075 2000-04-22  Tom Tromey  <tromey@cygnus.com>
4076
4077         * boehm.c (mark_reference_fields): Only call byte_position on
4078         non-static fields.
4079
4080 2000-04-22  Tom Tromey  <tromey@cygnus.com>
4081
4082         * boehm.c (mark_reference_fields): Added `last_view_index'
4083         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
4084
4085 Thu Apr 20 17:41:28 2000  Mo DeJong  <mdejong@cygnus.com>
4086
4087         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
4088         * parse.y (check_class_interface_creation): Fixed comments. Select
4089         permitted modifiers for (inner) interfaces. Changed error message
4090         to report rejected modifiers used with local classes.
4091
4092 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4093
4094         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
4095         of directly inherited type considered in scope.
4096         * parse.y (do_resolve_class): Search inherited classes for inner
4097         classes.
4098
4099 2000-04-20  Tom Tromey  <tromey@cygnus.com>
4100
4101         * parse.y (not_accessible_p): Use member's class, not current
4102         class, when doing inheritance check for protected reference.
4103         Fixes PR gcj/124.
4104
4105 Thu Apr 20 18:20:58 2000  Jason Schroeder  <shrode@subnature.com>
4106
4107         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
4108
4109 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4110
4111         * parse.y (lookup_field_wrapper): Search for final local aliases.
4112         (resolve_expression_name): Let lookup_field_wrapper search for
4113         final local aliases. Force the value of `name' if one is found.
4114         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
4115         an expression name. Fixed comments.
4116
4117 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4118
4119         * parse.y (yyerror): `msg' can be null, don't use it in that case.
4120
4121 2000-04-19  Tom Tromey  <tromey@cygnus.com>
4122
4123         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
4124
4125 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4126
4127         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
4128
4129 2000-04-18  Tom Tromey  <tromey@cygnus.com>
4130
4131         PR gcj/211:
4132         * gjavah.c (utf8_cmp): Changed return value.
4133         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
4134         result.
4135         (cxx_keywords): New global.
4136         (get_field_name): Handle new result of cxx_keyword_subst.
4137         (print_method_info): Likewise.
4138
4139 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
4140
4141         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
4142         with a newline, for CNI.
4143         (print_stub_or_jni): Print a space or newline before method name for
4144         CNI as well as JNI.
4145         (print_cxx_classname): Don't write leading "::" in CNI stub method.
4146         (process_file): Include gcj/cni.h if generating CNI stubs.
4147
4148 2000-04-16  Tom Tromey  <tromey@cygnus.com>
4149
4150         * gjavah.c (decompile_method): Use print_field_name.
4151         Fixes PR gcj/205.
4152
4153 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4154
4155         * parse.y (java_expand_classes): Reverse the package list once.
4156         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
4157         reduction.
4158         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
4159         the `==' and `!=' operators.
4160
4161 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4162
4163         * jcf-write.c (generate_bytecode_insns): At invokation time,
4164         always relate an interface method to the type of its selector.
4165
4166 2000-04-05  Tom Tromey  <tromey@cygnus.com>
4167
4168         Fix for PR gcj/2:
4169         * expr.c (expand_invoke): Generate check to see if object pointer
4170         is null in nonvirtual invocation case.
4171         * java-tree.h (soft_nullpointer_node): Declare.
4172         * decl.c (soft_nullpointer_node): New global.
4173         (init_decl_processing): Initialize soft_nullpointer_node.
4174         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
4175         or `private' methods.
4176         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
4177
4178 2000-04-05  Tom Tromey  <tromey@cygnus.com>
4179
4180         Fix for PR gcj/140:
4181         * parse.y (check_final_assignment): Recognize assignments to the
4182         `length' field of an array when generating class files.
4183
4184 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4185
4186         * class.c (decl_hash): Prototype removed.
4187         (decl_compare): Likewise.
4188
4189 2000-04-05  Tom Tromey  <tromey@cygnus.com>
4190
4191         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
4192         * parse.y (check_modifiers_consistency): Check for final/volatile
4193         clash.  Fixes PR gcj/164.
4194
4195 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4196
4197         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
4198         made global.
4199         (java_hash_compare_tree_node): Renamed from `decl_compare, made
4200         global.
4201         (add_method_1): Use `java_hash_hash_tree_node' and
4202         `java_hash_compare_tree_node'.
4203         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
4204         (java_hash_compare_tree_node): Likewise.
4205         * parse.y (find_applicable_accessible_methods_list): Create,
4206         delete and use a hash table to remember already searched interfaces.
4207
4208 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
4209
4210         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
4211         with latest entry.
4212
4213 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4214
4215         * boehm.c (mark_reference_fields, set_bit): Prototype.
4216         (set_bit): Un-ANSI-fy definition.
4217
4218         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
4219         Prototype.
4220
4221         * decl.c (emit_init_test_initialization): Likewise.
4222
4223         * gjavah.c (jni_print_char): Likewise.
4224
4225         * parse.y (create_new_parser_context): Likewise.
4226
4227 Thu Mar 30 15:26:56 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4228
4229         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
4230         patch missing hunk. Fixed indentation.
4231
4232 2000-03-30  Tom Tromey  <tromey@cygnus.com>
4233
4234         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
4235         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
4236
4237 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4238
4239         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
4240         when negative *before* using it as an array index.
4241         * ChangeLog: Fixed typo.
4242
4243 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4244
4245         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
4246         to 0 when it reaches -1.
4247
4248 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4249
4250         * jcf-parse.c (get_constant): Properly cast `num' during the
4251         invocation of `add_double'.
4252         * jcf-write.c (push_long_const): Properly cast `lo' before
4253         comparing it to short bounds.
4254         * parse-scan.y (interface_declaration:): Rule re-arrange so that
4255         `interface_body:' is reduced after the current interface is
4256         pushed.
4257
4258 2000-03-26  Tom Tromey  <tromey@cygnus.com>
4259
4260         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
4261         Java-specific `-f' option.
4262
4263 Sun Mar 26 11:37:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4264
4265         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
4266         Adjust order of making types.
4267         Make bitsize_*_node values.
4268
4269 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4270
4271         * class.c (make_field_value): Use byte_position.
4272         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
4273         (java_array_data_offset): Likewise.
4274         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
4275         bzero call.
4276
4277 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4278
4279         * parse.y (check_abstract_method_definitions): New local
4280         `end_type_reached'. Make sure we also consider `end_type'.
4281         (java_check_abstract_method_definitions): Make sure we eventually
4282         consider `java.lang.Object'.
4283         (maybe_use_access_method): Don't use access method if not in the
4284         context of a pure inner class or if the method's context is right.
4285         (find_applicable_accessible_methods_list): New static flag
4286         `object_done'. Don't search abstract classes as interfaces. Fixed
4287         indentation. Fixed the `java.lang.Object' only search. Search
4288         class interface(s) first, then fully search enclosing contexts.
4289         (find_most_specific_methods_list): Pick the closest candidate when
4290         they're all abstract.
4291
4292 Mon Mar 20 08:58:51 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4293
4294         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
4295         properly initialize `finished_label'. Don't emit gotos for empty
4296         try statements.
4297
4298 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4299
4300         * except.c (emit_handlers): Clear catch_clauses_last.
4301
4302 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4303
4304         * parse.y (check_method_types_complete): New function.
4305         (create_class): Reset anonymous class counter only when seeing an
4306         non inner classe.
4307         (java_complete_class): JDEP_METHOD: Don't recompute signature
4308         if incomplete.
4309
4310 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4311
4312         * class.c (build_static_ref): Fixed indentation in comment.
4313         * java-tree.def (TRY_EXPR): Fixed typo in name.
4314         (CLASS_LITERAL): Likewise.
4315         * java-tree.h: (TYPE_DOT_CLASS): New macro.
4316         (struct lang_type): New field `dot_class'.
4317         * jcf-write.c (generate_bytecode_insns): Fixed error message.
4318         (generate_classfile): Method `class$' is synthetic.
4319         * parse.y (build_do_class_method): New function.
4320         (build_dot_class_method_invocation): Likewise.
4321         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
4322         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
4323         (qualify_ambiguous_name): Likewise.
4324         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
4325         (build_try_statement): Fixed leading comment.
4326
4327 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4328
4329         * class.c (make_field_value): Properly handle sizes.
4330         (get_dispatch_vector): Use tree_low_cst and host_integerp.
4331         (layout_class_method): Count using trees.
4332         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
4333         * expr.c (java_array_data_offset): Use int_bit_position.
4334         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
4335         (build_invokevirtual): Use tree_low_cst and do computations with trees.
4336
4337 2000-03-16  Tom Tromey  <tromey@cygnus.com>
4338
4339         * lang.c (flag_hash_synchronization): New global.
4340         (lang_f_options): Added `hash-synchronization'.
4341         * lang-options.h: Mention -fhash-synchronization.
4342         * java-tree.h (flag_hash_synchronization): Declare.
4343         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
4344         hash table synchronization is disabled.
4345         * decl.c (init_decl_processing): Only push `sync_info' value when
4346         hash table synchronization is disabled.
4347         * class.c (make_class_data): Only push `sync_info' field when hash
4348         table synchronization is disabled.  Removed dead code.
4349
4350 2000-03-16  Tom Tromey  <tromey@cygnus.com>
4351
4352         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
4353
4354 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4355
4356         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
4357         classes.
4358         * parse.y (patch_method_invocation): Handle anonymous classes
4359         creation in static context.
4360
4361 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4362
4363         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
4364         * parse.y (resolve_qualified_expression_name): Use it.
4365         (patch_method_invocation): Likewise.
4366
4367 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4368
4369         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
4370         depending on the type of dependency which dictates what the
4371         current class is.
4372         (unresolved_type_p): Resolved types limited to the current class.
4373
4374 2000-03-15  Tom Tromey  <tromey@cygnus.com>
4375
4376         * decl.c (init_decl_processing): Set type of `sync_info' to be
4377         pointer to Object.
4378
4379         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
4380         Correctly compute bit number for current slot.  Zero `high' and
4381         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
4382         mark_reference_fields.
4383         (mark_reference_fields): New function.
4384
4385 Tue Mar 14 17:15:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4386
4387         * parse.y (register_incomplete_type): Fixed initialization of
4388         JDEP_ENCLOSING.
4389
4390 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4391
4392         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
4393         static globals.
4394         (push_class_context, pop_class_context): New function.
4395         (class_body:): Call pop_class_context.
4396         (interface_body:): Likewise.
4397         (INNER_QUALIFIER): New macro.
4398         (report_class_declaration): Changed output format and use
4399         INNER_QUALIFIER. Call push_class_context.
4400
4401 2000-02-14  Andrew Haley  <aph@cygnus.com>
4402
4403         * check-init.c (check_init): Add new cases for unary and binary
4404         tree nodes.
4405
4406 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4407
4408         * parse.y (resolve_package): Set `next' once a type name has been
4409         progressively discovered.
4410         (resolve_qualified_expression_name): Propagate resolution only if
4411         there are remaining qualifiers. Take into account `q' might have
4412         been cleared after re-qualification.
4413         * parse.y (patch_method_invocation): New local `resolved'.
4414         Section dealing with qualified expression rewritten to use
4415         resolve_field_access.
4416
4417 Mon Mar 13 12:21:13 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4418
4419         * parse.h (PUSH_CPC): Fixed indentation.
4420         (DEBUG_CPC): New macro.
4421         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
4422         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
4423         * parse.y (class_body_declaration:): Use
4424         SET_CPC_INSTANCE_INITIALIZER_STMT.
4425         (method_declaration:): Check for null current_function_decl.
4426         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
4427         (java_parser_context_pop_initialized_field): Better handling of
4428         empty lists.
4429         (maybe_make_nested_class_name): Mark nested class name as
4430         qualified when necessary.
4431         (end_class_declaration): Don't call java_parse_context_resume when
4432         one or more error occured.
4433         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
4434         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
4435         SET_CPC_INITIALIZER_STMT.
4436         (method_header): Check for inner classes declaring static methods.
4437         (resolve_qualified_expression_name): Handle situation where `this'
4438         is implied.
4439
4440 Mon Mar 13 11:36:51 2000  Hans Boehm <boehm@acm.org>
4441
4442         * typeck.c (build_prim_array_type): Correctly set the high word too.
4443
4444 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4445
4446         * parse.y (java_complete_expand_methods): Leave <clinit> out of
4447         ordinary methods.
4448         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
4449         list of methods for interfaces.
4450
4451 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4452
4453         * parse.y (qualify_ambiguous_name): Properly handle expressions
4454         using `null'.
4455
4456 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4457
4458         * parse.y (check_final_assignment): Extended to process
4459         COMPOUND_EXPR.
4460         (patch_assignment): Have check_final_assignment called only once.
4461
4462 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4463
4464         * java-tree.h (IS_INIT_CHECKED): New flag.
4465         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
4466         * parse.y (patch_string): Call force_evaluation_order on the
4467         completed string concatenation tree.
4468         * expr.c (force_evaluation_order): Call force_evaluation_order on
4469         function's arguments too.
4470
4471 Mon Mar  6 18:07:07 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4472
4473         * decl.c (emit_init_test_initialization): Mark KEY as unused.
4474         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
4475         (build_anewarray): Likewise.
4476         * parse.y (patch_newarray): Likewise.
4477         * parse.c: Regenerated.
4478
4479 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
4480
4481         * decl.c (init_decl_processing): Added new class fields `depth',
4482         `ancestors', and `idt' to class_type_node. Use
4483         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
4484         * class.c (make_class_data): Push initial values for new fields.
4485         * java-tree.h: Updated prototype for `build_invokeinterface'.
4486         * expr.c (build_invokeinterface): Changed parameters to accept
4487         `method' tree. Calculate index of `method' in its declaring
4488         interface. Build call to _Jv_LookupInterfaceMethodIdx.
4489         (expand_invoke): Call `build_invokeinterface' with new parameters.
4490         * parse.y (patch_invoke): Call `build_invokeinterface' with new
4491         parameters.
4492
4493 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
4494
4495         * typeck.c (lookup_do): Search superinterfaces first
4496         when looking up an interface method. From Godmar Back
4497         <gback@cs.utah.edu>
4498
4499 2000-03-06  Tom Tromey  <tromey@cygnus.com>
4500
4501         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
4502
4503 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4504
4505         * java-tree.h (lookup_argument_method2): Declared.
4506         (safe_layout_class): Prototype moved from parse.h.
4507         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
4508         * parse.y (java_check_regular_methods): Local `super_class' gone.
4509         Call lookup_argument_method2 instead of lookup_argument_method.
4510         Perform modifier match for methods found declared in implemented
4511         interfaces. Fixed indentation problem. Overriding/hiding error
4512         report to take place only for methods found in classes.
4513         * typeck.c (lookup_argument_method): Changed leading
4514         comment. Re-written by calling lookup_do.
4515         (lookup_argument_method2): New function.
4516         (lookup_java_method): Re-written by calling lookup_do.
4517         (lookup_do): New function.
4518
4519 Thu Mar  2 15:18:33 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4520
4521         * check-init.c (check_init): Removed dead code. Handle (blank)
4522         final variables.
4523         * parse.y (declare_local_variables): New local `final_p', set it
4524         and use it to initialize LOCAL_FINAL.
4525         (check_final_assignment): Only check FIELD_DECLs.
4526
4527 2000-02-17  Tom Tromey  <tromey@cygnus.com>
4528
4529         * Makefile.in (JAVA_OBJS): Added boehm.o.
4530         (boehm.o): New target.
4531         * Make-lang.in (JAVA_SRCS): Added boehm.c.
4532         * java-tree.h (flag_use_boehm_gc): Declare.
4533         (get_boehm_type_descriptor): Declare.
4534         * lang.c (lang_f_options): Added `use-boehm-gc'.
4535         (flag_use_boehm_gc): New global.
4536         * lang-options.h: Added -fuse-boehm-gc.
4537         * boehm.c: New file.
4538         * class.c (get_dispatch_table): If class uses a Boehm type
4539         descriptor, put it in the vtable.
4540         (make_class_data): Removed dead code.
4541
4542 2000-03-03  Per Bothner  <per@bothner.com>
4543
4544         * decl.c (init_decl_processing):  Initialize sizetype properly.
4545
4546 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4547
4548         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
4549         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
4550         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
4551         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
4552         (jcf_parse): New local `current'. Load innerclasses seen in outer
4553         context being processed.
4554         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
4555         * jcf-write.c (append_innerclasses_attribute): New function.
4556         (append_innerclasses_attribute_entry): Likewise.
4557         (get_access_flags): Handle static classes. Set anonymous and local
4558         classes to be private.
4559         (generate_classfile): Attribute count adjusted. Call
4560         append_innerclasses_attribute.
4561         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
4562         PURE_INNER_CLASS_TYPE_P.
4563         * parse.y (parser_qualified_classname): New parameter `is_static',
4564         produce non qualified name accordingly.
4565         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
4566         (create_interface): Added argument to parser_qualified_classname.
4567         (create_class): Added argument to parser_qualified_classname. Setup
4568         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
4569         (add_inner_class_fields): Fixed indentation.
4570         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
4571         (method_declarator): Fixed typo in comment.
4572         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
4573         (build_current_thisn): Likewise.
4574         (patch_method_invocation): Likewise.
4575
4576 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4577
4578         * decl.c (current_function_decl): Move to toplev.c.
4579
4580 Mon Feb 28 08:20:42 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4581
4582         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
4583         (DECL_BIT_INDEX): Use underlying representation.
4584         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
4585
4586 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4587
4588         * expr.c (build_java_ret): Pass proper type to size_binop.
4589
4590 2000-02-25  Anthony Green  <green@cygnus.com>
4591
4592         * expr.c (build_class_init): Mark the decl to be ignored by
4593         check_init.
4594         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
4595         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
4596         * class.c (init_test_hash_newfunc): New function.
4597         (decl_hash): New function.
4598         (decl_compare): New function.
4599         * decl.c (emit_init_test_initialization): New function.
4600         (complete_start_java_method): Traverse the init test hashtable,
4601         calling emit_init_test_initialization.
4602         (always_initialize_class_p): Define.
4603         * expr.c (build_class_init): Use initialization tests when
4604         emitting class initialization code.
4605         (always_initialize_class_p): Declare.
4606         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
4607         1.
4608         * java-tree.h: Include hash.h.
4609         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
4610         (struct lang_decl): Add init_test_table field.
4611         (init_test_hash_entry): Define.
4612
4613 Fri Feb 25 18:41:31 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4614
4615         * gjavah.c (main): Avoid using `argi' to report unimplemented
4616         options.
4617
4618 Fri Feb 25 18:47:25 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4619
4620         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
4621         initialize locals to avoid warnings. Local `exception_type' moved
4622         into if statement.
4623
4624 Fri Feb 25 18:00:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4625
4626         * parse.y (resolve_expression_name): Use `orig' as a second
4627         argument to resolve_field_access.
4628         (resolve_field_access): Removed unnecessary code when dealing with
4629         static fields.
4630
4631 Wed Feb 23 17:41:50 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4632
4633         * class.c (push_super_field): Don't push the field twice.
4634         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
4635         * parse.h (java_reorder_fields): Prototyped.
4636         * parse.y (java_reorder_fields): New function.
4637         (java_layout_class): Simplified not to worry about re-ordering.
4638
4639 2000-02-23  Tom Tromey  <tromey@cygnus.com>
4640
4641         * gjavah.c (print_name): In JNI case, correctly quote string.
4642         (print_method_info): Don't handle overrides in JNI mode.
4643
4644 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4645
4646         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
4647         value type set to `boolean_type_node'.
4648
4649 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
4650
4651         * jcf-dump.c (main): Test for correct condition after
4652         output file creation.
4653
4654 2000-02-19  Anthony Green  <green@cygnus.com>
4655
4656         * jcf-depend.c (add_entry): Fix test for first list entry.
4657
4658 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4659
4660         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
4661         * constants.c (build_constants_constructor): Likewise.
4662
4663 2000-02-19  Anthony Green  <green@cygnus.com>
4664
4665         * jcf-depend.c (add_entry): Add entries to the end of the list.
4666
4667 Wed Nov 03 02:16:00 PST 1999  Pekka Nikander  <pekka.nikander@hut.fi>
4668
4669         * decl.c (INT_TYPE_SIZE): Define if necessary.
4670         (expand_java_return): Handle the case of a native integer smaller
4671         than a JVM integer.
4672
4673 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4674
4675         * gjavah.c (help): Use GCCBUGURL.
4676         * jv-scan.c (help): Likewise.
4677         * jcf-dump.c (help): Likewise.
4678
4679 Thu Feb 17 14:30:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4680
4681         * jcf-write.c (generate_bytecode_insns): Don't generate empty
4682         `finally' clauses.
4683
4684 Thu Feb 17 13:20:58 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4685
4686         * jcf-parse.c (load_class): Call `fatal' if no file containing
4687         the target class are found.
4688
4689 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
4690
4691         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
4692         lex.c, lex.h, and PARSE_H to...
4693         (parse.o, parse-scan.o): ...here, respectively.
4694
4695         * lex.c: Split out code that may trigger SIGFPE from yylex()
4696         to its own function.
4697         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
4698
4699 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4700
4701         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
4702
4703 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4704
4705         * parse.y (outer_field_access_p): Stop in time when outer contexts
4706         are exhausted.
4707         (resolve_qualified_expression_name): Properly qualify *everything*
4708         after a package.type to be resoled as expression names.
4709         (find_applicable_accessible_methods_list): Save/restore `class' to
4710         isolate it from a possible outer context search.
4711
4712 2000-02-15  Tom Tromey  <tromey@cygnus.com>
4713
4714         * gjavah.c (jni_print_char): New function.
4715         (print_full_cxx_name): Use it.
4716         (decode_signature_piece): Likewise.
4717         (print_cxx_classname): Likewise.
4718
4719 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4720
4721         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
4722         version.o.
4723         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
4724
4725         * gjavah.c: Include version.h.
4726
4727         * jcf-dump.c: Likewise.
4728
4729         * jv-scan.c: Likewise.
4730
4731 Sat Feb 12 04:34:04 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4732
4733         * parse.y (outer_field_access_fix): First parameter now a tree
4734         node. Check for assignement to final. First argument to
4735         build_outer_field_access_fix modified to accomodate prototype.
4736         (build_outer_field_access): Don't check for assignment to final
4737         here.
4738         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
4739         possibly returned by outer_field_access_fix. Changed
4740         outer_field_access_fix's first argument.
4741         (check_final_assignment): $finit$'s context is OK.
4742         (patch_unaryop): Use node instead of its line/column value when
4743         calling outer_field_access_fix.
4744
4745 Fri Feb 11 17:38:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4746
4747         * parse.y (interface_declaration:): No longer tagged
4748         <node>. Re-installed default action.
4749         (class_member_declaration:): Handle inner interfaces.
4750         (interface_member_declaration): Handle inner interfaces and
4751         classes.
4752         (create_interface): Push error if one seen. Suspend parsing
4753         context when processing an inner interface.
4754         (register_fields): Inner class static field limitations not to
4755         apply to inner interfaces.
4756
4757 Thu Feb 10 22:07:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4758
4759         * jcf-parse.c (load_class): Update `java_error_count' when a
4760         class' file can't be found.
4761         (parse.y): Avoid (byte)code generation when errors seen.
4762
4763 Thu Feb 10 20:10:43 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4764
4765         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
4766         decodes a valid node.
4767         (patch_binop): Handle TRUNC_DIV_EXPR.
4768
4769 Thu Feb 10 16:04:26 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4770
4771         * parse.y (resolve_package): New local `acc'. Try to progressively
4772         build and guess a package and type name.
4773
4774 Thu Feb 10 12:52:09 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4775
4776         * parse.y (find_applicable_accessible_methods_list): Load and
4777         layout the search class if necessary.
4778         (java_complete_tree): Keep to original type of the folded initial
4779         value.
4780
4781 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4782
4783         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
4784         Generate error message if circularity is detected. New static
4785         local `list'.
4786         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
4787         * jcf-write.c (generate_bytecode_insns): Very simply handle
4788         SAVE_EXPR.
4789         * parse.y (java_check_circular_reference): Use
4790         `cyclic_inheritance_report' during report, if necessary.
4791         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
4792         walking NEW_ARRAY_INIT twice.
4793
4794 2000-02-09  Tom Tromey  <tromey@cygnus.com>
4795
4796         * parse.y (check_class_interface_creation): Allow inner classes to
4797         be `private' or `protected', check modifiers' consistency. Prevent
4798         block local classes from bearing any modifiers.
4799
4800 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4801
4802         * except.c (check_start_handlers): Re-add prototype lost in last
4803         patch.
4804         (maybe_start_try): Remove excess argument to `check_start_handlers'.
4805
4806 2000-02-09  Andrew Haley  <aph@cygnus.com>
4807
4808         * decl.c (clear_binding_level): Remove excess initializer.
4809         (maybe_poplevels): Remove unused variable.
4810         (force_poplevels): Ditto.
4811         (struct binding_level): Add comment.
4812
4813 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4814
4815         * jcf-write.c (generate_classfile): Don't consider
4816         pre-initialization with reference value (use <clinit> instead.)
4817         * parse.y (java_fix_constructors): No generated constructor for
4818         interfaces.
4819         (build_outer_field_access): Removed debug message.
4820         (outer_field_expanded_access_p): Adapted to bytecode generation.
4821         (build_outer_field_access_method): Use fix_method_argument_names.
4822         (build_outer_method_access_method): Fixed indentation. Added
4823         comment. Handle access method generation for static and also void
4824         methods.
4825         (build_access_to_thisn): Inserted debug message.
4826         (maybe_build_thisn_access_method): Use fix_method_argument_names.
4827         (resolve_qualified_expression_name): Fixed comment.
4828         (not_accessible_p): Adapted to bytecode generation. Added comment.
4829         (patch_method_invocation): Added comment.
4830         (maybe_use_access_method): Fixed leading comment. Handle static
4831         methods.
4832         (java_complete_lhs): Don't shortcut handling of initialized upon
4833         declaration String type static fields when generating bytecode.
4834         (patch_unaryop): Handle outer field access when generating
4835         bytecode.
4836
4837 Thu Feb  3 20:23:19 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4838
4839         * java-tree.h (FIELD_THISN): New macro.
4840         * jcf-write.c (append_synthetic_attribute): New function.
4841         (generate_classfile): Set "Synthetic" attribute on this$<n>,
4842         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
4843         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
4844         this$<n> fields.
4845         (build_outer_field_access): Turned on access functions usage and
4846         generation when compiling to bytecode.
4847         (maybe_use_access_method): Likewise.
4848
4849 2000-01-25  Andrew Haley  <aph@cygnus.com>
4850
4851         * java-except.h (struct eh_range): Add `expanded' field.
4852         (maybe_start_try): Add end_pc arg.
4853         (maybe_end_try): Ditto.
4854         * java-tree.h (force_poplevels): new function.
4855         * expr.c (expand_byte_code): Don't call maybe_start_try or
4856         maybe_end_try.
4857         * except.c (add_handler): Reset expanded.
4858         (expand_start_java_handler): Set expanded.
4859         (check_start_handlers): Don't expand a start handler that's
4860         already been expanded.
4861         (maybe_start_try): Add end_pc arg.  Only expand a handler which
4862         ends after end_pc.
4863         (expand_end_java_handler): call force_poplevels.
4864         (force_poplevels): new function.
4865         * decl.c (binding_level): Add start_pc of binding level.
4866         (maybe_pushlevels): Call maybe_start_try when pushing binding
4867         levels.
4868         (maybe_poplevels): Call maybe_end_try when popping binding levels.
4869         (LARGEST_PC): Define.
4870         (clear_binding_level): Use LARGEST_PC.
4871
4872         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
4873         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
4874         (binding_depth, is_class_level, current_pc): new variables.
4875         (struct binding_level): ditto.
4876         (indent): new function.
4877         (push_jvm_slot): add debugging info.
4878         (maybe_pushlevels): ditto.
4879         (maybe_poplevels): ditto.
4880         (pushlevel): ditto.
4881         (poplevel): ditto.
4882         (start_java_method): ditto.
4883         (give_name_to_locals): comment only.
4884         * except.c (binding_depth, is_class_level, current_pc):
4885         new variables.
4886         (expand_start_java_handler): add debugging info.
4887         (expand_end_java_handler): ditto.
4888
4889 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4890
4891         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
4892         (print_name_for_stub_or_jni, process_file): Constify a char*.
4893
4894 2000-02-03  Tom Tromey  <tromey@cygnus.com>
4895
4896         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
4897
4898 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
4899
4900         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
4901         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
4902         defined to be 1.
4903
4904 Wed Feb  2 18:43:37 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4905
4906         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
4907         * java-tree.h (TYPE_II_STMT_LIST): New macro.
4908         (struct lang_type): New field `ii_block'.
4909         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
4910         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
4911         * parse.h (struct parser_ctxt): New field `instance_initializers'.
4912         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
4913         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
4914         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
4915         macros.
4916         * parse.y (add_instance_initializer): New function.
4917         (in_instance_initializer): New static global.
4918         (class_body_declaration:): Link instance initializer block.
4919         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
4920         (array_creation_expression:): Remove unused local.
4921         (java_parser_context_push_initialized_field): Fixed leading
4922         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
4923         CPC_INSTANCE_INITIALIZER_LIST.
4924         (java_parser_context_pop_initialized_field): Likewise.
4925         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
4926         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
4927         CPC_INITIALIZER_STMT.
4928         (fix_constructors): New local `class_type'. Use it. Call
4929         add_instance_initializer.
4930         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
4931         (patch_return): Forbid return in instance initializers.
4932         (patch_throw_statement): Enforce exception handling in the context
4933         of instance initializers.
4934
4935 2000-02-03  Tom Tromey  <tromey@cygnus.com>
4936
4937         * Make-lang.in (java.mostlyclean): Remove executables in
4938         `mostlyclean'.
4939
4940 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
4941
4942         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
4943         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
4944         (java_float_finite): Convert to use union Word from javaop.h.
4945         (java_double_finite): Convert to use union DWord from javaop.h.
4946
4947 2000-02-02  Tom Tromey  <tromey@cygnus.com>
4948
4949         * gjavah.c (options): Added `jni' entry.
4950         (help): Document -jni.
4951         (flag_jni): New global.
4952         (process_file): Handle JNI output.  Don't print text from
4953         -prepend, -add, etc, when generating stubs.  Only remove `.class'
4954         suffix if it actually exists.
4955         (main): Create a `.c' file when run with `--jni --stubs'.  Create
4956         correct output file name with `--jni'.
4957         (print_include): Mangle header name differently in JNI case.
4958         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
4959         method list.
4960         (print_method_info): Handle JNI case.  Put signature info into
4961         method name.  Handle case when STREAM is NULL.
4962         (print_name_for_stub_or_jni): New function.
4963         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
4964         (print_cxx_classname): Handle JNI.
4965         (print_full_cxx_name): Likewise.
4966         (decode_signature_piece): Likewise.
4967         (overloaded_jni_method_exists_p): New function.
4968         (struct method_name): Added `signature' and `sig_length' fields.
4969         (HANDLE_END_FIELD): Do nothing in JNI mode.
4970
4971 2000-02-02  Tom Tromey  <tromey@cygnus.com>
4972
4973         * jv-scan.c: Include version.c, <getopt.h>.
4974         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
4975         (options): New array.
4976         (usage): New function.
4977         (version): New function.
4978         (main): Use getopt_long to parse command line.
4979         * jcf-dump.c: Include version.c, <getopt.h>.
4980         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
4981         OPT_JAVAP): New macros.
4982         (options): New array.
4983         (usage): Return `void'.  Changed message.
4984         (help): New function.
4985         (version): New function.
4986         (main): Use getopt_long_only to parse command line.
4987         * gjavah.c: Include <getopt.h>.
4988         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
4989         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
4990         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
4991         (options): New array.
4992         (java_no_argument): Removed.
4993         (help): Updated with missing options.
4994         (main): Use getopt_long_only to parse command line.
4995         (usage): Changed message.
4996
4997 Tue Feb  1 22:23:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4998
4999         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
5000         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
5001         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
5002         * parse.y (array_creation_expression:): Handle anonymous arrays.
5003         (build_array_from_name): Don't set `ret_name' if null.
5004         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
5005         (qualify_ambiguous_name): Likewise.
5006         (java_complete_expand_class): Likewise.
5007
5008 Tue Feb  1 14:59:35 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5009
5010         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
5011         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
5012         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
5013         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
5014         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
5015         AIPL_FUNCTION_COMPLETED_INVOCATION.
5016         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
5017         AIPL_FUNCTION_INVOCATION_READY.
5018         (AIPL_FUNCTION_DECLARATION): New enum entry.
5019         * parse.y (reorder_static_initialized): New function.
5020         (java_parser_context_pop_initialized_field): Use it.
5021         (add_inner_class_fields): Use
5022         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
5023         augmented. Install marker after last alias initializer, if any.
5024         (generate_finit): Fixed typo. Don't try to retain only the used
5025         fields.
5026         (method_header): Compute and set DECL_FUNCTION_NAP.
5027         (method_declarator): Fixed comment. Insert alias initializer in
5028         parameter list.
5029         (build_alias_initializer_parameter_list): Fixed leading
5030         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
5031         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
5032         (java_complete_expand_class): Code to retain only used aliases
5033         removed.
5034         (java_complete_expand_methods): New local `first_decl'. Generate
5035         $finit$ first, then expand the constructors, regular methods and
5036         <clinit>.
5037         (java_complete_expand_method): Don't report error on missing
5038         return statement if previously detected bogus.
5039         (fix_constructors): Don't patch constructor parameters list.
5040         (patch_method_invocation): Use new AIPL enum values. Reverse
5041         alias initializer list for anonymous classes.
5042
5043 2000-01-30  Anthony Green  <green@redhat.com>
5044
5045         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
5046         determine how many stack slots to pop.
5047
5048 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5049
5050         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
5051         error handling/recovery.
5052         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
5053
5054 Fri Jan 28 20:10:57 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5055
5056         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
5057         FIELD_LOCAL_ALIAS_USED): New macros.
5058         (DECL_FUNCTION_NAP): New macro.
5059         (struct lang_decl): New field `nap'.
5060         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
5061         (struct lang_type): New fields `finit_stmt_list' and
5062         `clinit_stmt_list'.
5063         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
5064         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
5065         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
5066         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
5067         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
5068         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
5069         (BUILD_THROW): Macro line separator re-indented.
5070         * parse.y (end_class_declaration): New function.
5071         (maybe_generate_pre_expand_clinit): New name for
5072         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
5073         pre-expand static fields.
5074         (maybe_generate_clinit): Function deleted.
5075         (check_for_static_method_reference): Prototype's parameter list
5076         indented.
5077         (generate_finit): New name for maybe_generate_finit. Changed
5078         leading comment. Function rewritten to use
5079         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
5080         (build_alias_initializer_parameter_list): New function.
5081         (java_parser_context_pop_initialized_field): Likewise.
5082         (add_inner_class_fields): Likewise.
5083         (type_declaration:): Call end_class_declaration.
5084         (class_member_declaration:): Likewise.
5085         (formal_parameter_list:): Fixed typos.
5086         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
5087         element. Improved error handling.
5088         (block_statement:): Call end_class_declaration.
5089         (anonymous_class_creation:): Likewise.
5090         (create_anonymous_class): Fixed comments.
5091         (create_class): Call add_inner_class_fields.
5092         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
5093         (method_header): Use MARK_FINAL_PARMS.
5094         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
5095         (method_declarator): Propagate final argument flag.
5096         (craft_constructor): New local `artificial'. Call
5097         build_alias_initializer_parameter_list. Use
5098         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
5099         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
5100         necessary.
5101         (complete_expand_class): Get rid of unused outer context local
5102         alias fields.
5103         (java_complete_expand_methods): Fixed leading
5104         comment. Generate/pre-expand <clinit> first. Changed method
5105         expansion order to regular, $finit$, constructors, <clinit>.
5106         (java_complete_expand_method): Set current_function_decl.
5107         (fix_constructors): Fix constructor parameter list to account for
5108         outer context local alias initializers.
5109         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
5110         (resolve_expression_name): Lookup outer context local aliases. New
5111         local `access', use it.
5112         (patch_method_invocation): Patch inner class ctor invocation with
5113         outer context local aliases initialization values. $finit$
5114         invocation patching now includes things generated with
5115         build_alias_initializer_parameter_list.
5116         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
5117         (build_super_invocation): Likewise.
5118         (patch_assignment): Changed comment.
5119
5120 2000-01-27  Andrew Haley  <aph@cygnus.com>
5121
5122         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
5123         (emit_if): Ditto.
5124         (emit_jsr): Ditto.
5125
5126 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5127
5128         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
5129         concatenation.
5130         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
5131
5132         * parse.y (register_fields): Don't pass a format specifier to
5133         OBSOLETE_MODIFIER_WARNING.
5134         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
5135         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
5136         specifier.
5137         (check_modifiers): Change function into a macro.
5138         (check_class_interface_creation): Pass a literal format string.
5139
5140 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5141
5142         * buffer.h: PROTO -> PARAMS.
5143         * check-init.c: Likewise.
5144         * class.c: Likewise.
5145         * constants.c: Likewise.
5146         * convert.h: Likewise.
5147         * decl.c: Likewise.
5148         * except.c: Likewise.
5149         * expr.c: Likewise.
5150         * gjavah.c: Likewise.
5151         * java-except.h: Likewise.
5152         * java-tree.h: Likewise.
5153         * jcf-depend.c: Likewise.
5154         * jcf-dump.c: Likewise.
5155         * jcf-parse.c: Likewise.
5156         * jcf-path.c: Likewise.
5157         * jcf-reader.c: Likewise.
5158         * jcf-write.c: Likewise.
5159         * jcf.h: Likewise.
5160         * jv-scan.c: Likewise.
5161         * jvgenmain.c: Likewise.
5162         * jvspec.c: Likewise.
5163         * lang.c: Likewise.
5164         * lex.c: Likewise.
5165         * lex.h: Likewise.
5166         * parse-scan.y: Likewise.
5167         * parse.h: Likewise.
5168         * parse.y: Likewise.
5169         * typeck.c: Likewise.
5170         * verify.c: Likewise.
5171         * xref.c: Likewise.
5172         * xref.h: Likewise.
5173         * zextract.c: Likewise.
5174         * zipfile.h: Likewise.
5175
5176 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5177
5178         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
5179         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
5180         * constants.c (build_constant_data_ref): Check for cached
5181         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
5182         in TYPE_CPOOL_DATE_REF.
5183         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
5184         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
5185         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
5186         (LOCAL_FINAL): New macro.
5187         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
5188         constant pool -- don't try to reuse.
5189         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
5190         TYPE_LANG_SPECIFIC.
5191         (find_in_current_zip): Use TYPE_JCF.
5192         * parse.h (java_check_final): Prototype removed.
5193         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
5194         (maybe_create_class_interface_decl,
5195         check_class_interface_creation): Likewise.
5196         (java_expand_finals): Function removed.
5197         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
5198         (block_statement:): Fixed comment.
5199         (anonymous_class_creation:): Likewise.
5200         (check_class_interface_creation): Reversed Jan 12, 2000 extra
5201         argument patch.
5202         (check_class_interface_creation): Loosened error report on (inner)
5203         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
5204         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
5205         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
5206         argument patch.
5207         (create_interface): Likewise.
5208         (anonymous_class_counter): New static global.
5209         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
5210         patch. Fixed comments.
5211         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
5212         anonymous_class_counter when declaring a toplevel class.
5213         (craft_constructor): Fixed constructor name when handling
5214         anonymous classes. Anonymous class constructors to feature hidden
5215         this$<n> parameter.
5216         (java_fix_constructors): Added comment.
5217         (java_check_final): Function removed.
5218         (java_complete_expand_methods): Fixed comment. Don't generate
5219         class data, save its outgoing constant pool instead.
5220         (verify_constructor_super): Skip anonymous class constructor
5221         hidden this$<n> parameter.
5222         (java_expand_classes): New local `saved_ctxp'. Removed call to
5223         java_expand_finals and java_check_final. Expand anonymous class
5224         constructors. Generate class data.
5225         (build_super_invocation): Skip anonymous class hidden this$<n>
5226         parameter.
5227         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
5228         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
5229         (set_java_signature): Likewise.
5230
5231 Mon Jan 18 14:30:09 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
5232
5233         * gjavah.c: Delete ACC_VISIBILITY define.
5234         * jcf.h: Add ACC_VISIBILITY define.
5235         * parse.y: final: rule tagged <value>.
5236         (java_check_regular_methods): Use ACC_VISIBILITY define for
5237         default package access check.
5238         (local_variable_declaration_statement): Use final: rule.
5239
5240 Mon Jan 17 11:58:17 2000  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
5241
5242         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
5243         (final:): New rule.
5244
5245 2000-01-17  Tom Tromey  <tromey@cygnus.com>
5246
5247         * gjavah.c (print_field_info): Allow non-static final fields.
5248
5249 Fri Jan 14 18:03:41 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5250
5251         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
5252         * parse.y (patch_anonymous_class): New function.
5253         (create_anonymous_class): Register incomplete type when the
5254         class/interface to extends/implement isn't known yet.
5255         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
5256         (verify_constructor_super): Tuned error message.
5257
5258 Fri Jan 14 00:14:24 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5259
5260         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
5261         (ANONYMOUS_CLASS_P): New macro.
5262         (TYPE_SIGNATURE, TYPE_JCF): New macros.
5263         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
5264         * parse.y (create_class): Added leading argument.
5265         (maybe_create_class_interface_decl,
5266         check_class_interface_creation): Likewise.
5267         (craft_constructor): New function.
5268         (verify_constructor_super): Added argument in prototype.
5269         (class_declaration:): Inserted leading argument.
5270         (for_begin:): Use FOR_LOOP_P.
5271         (anonymous_class_creation): Create WFL of the anonymous class to
5272         instantiate. Call build_new_invocation. Added comments.
5273         (check_class_interface_creation): Handle parameter `anonymous' in
5274         verbose mode class creation announce.
5275         (link_nested_class_to_enclosing): Exclude anonymous classes.
5276         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
5277         anonymous class, even though they appear to have an enclosing
5278         context.
5279         (create_interface): Pass extra argument to
5280         check_class_interface_creation.
5281         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
5282         (create_class): Call check_class_interface_creation and
5283         maybe_create_class_interface_decl with extra new argument. Don't
5284         add private this$<n> to anonymous classes.
5285         (method_declarator): Insert hidden this$<n> to anonymous class
5286         constructors.
5287         (java_fix_constructors): Deleted code creating default
5288         constructor. Call craft_constructor instead.
5289         (java_check_regular_methods): Set `saw_constructor' to 1 for
5290         anonymous classes.
5291         (fix_constructors): Pass extra argument to verify_constructor_super.
5292         (verify_constructor_super): New local `sdecl', use it. Search for
5293         matching constructor (possibly featuring arguments) in super
5294         class.
5295         (lookup_method_invoke): Craft constructor according to arguments
5296         list when dealing with anonymous class constructors.
5297         (build_super_invocation): Pass arguments to anonymous class super
5298         constructors.
5299         (search_loop): Use FOR_LOOP_P.
5300         (labeled_block_contains_loop_p): Likewise.
5301
5302 Wed Jan 12 00:38:47 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5303
5304         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
5305         (enclosing_context_p): New function.
5306         (get_access_flags_from_decl): Handle CLASS_STATIC.
5307         (maybe_layout_super_class): Extra first argument passed to
5308         do_resolve_class.
5309         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
5310         ID_INIT_P.
5311         * decl.c (access0_identifier_node): New global.
5312         (init_decl_processing): access0_identifier_node initialized.
5313         (pushdecl): Set DECL_CONTEXT only on non type decls.
5314         * expr.c (lookup_field): Lookup inner class fields in enclosing
5315         contexts.
5316         (expand_invoke): Use ID_INIT_P.
5317         (expand_java_field_op): Use DECL_CLINIT_P.
5318         * java-tree.def (CLASS_LITERAL): New tree code.
5319         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
5320         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
5321         (struct lang_decl): New field `inner_access'.
5322         (enclosing_context_p): Prototyped.
5323         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
5324         ID_CLINIT_P): New macros.
5325         (CLASS_STATIC): New macro.
5326         (CLASS_ACCESS0_GENERATED_P): New macro.
5327         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
5328         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
5329         INNER_CLASS_P): New macros.
5330         (DECL_INNER_CLASS_LIST): New macro.
5331         * jcf-parse.c (yyparse): Avoid the use of ANSI string
5332         concatenation.
5333         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
5334         the shift value to int. Fixed typo in comment.
5335         * lex.c (inst_id, wpv_id): Initialize.
5336         * mangle.c (unicode_mangling_length): Take `$' into account.
5337         * parse.h (DRECOVER, RECOVER): Terminate properly.
5338         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
5339         (typedef struct _jdep): New field `enclosing'.
5340         (JDEP_ENCLOSING): New macro.
5341         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
5342         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
5343         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
5344         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
5345         GET_ENCLOSING_CPC_CONTEXT): New macros.
5346         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
5347         (do_resolve_class): Added extra argument in prototype.
5348         * parse.y (resolve_class): Added extra argument in prototype.
5349         (maybe_create_class_interface_decl): Likewise.
5350         (maybe_use_access_method, build_wfl_wrap): New functions.
5351         (java_complete_expand_classes, java_complete_expand_class):
5352         Likewise.
5353         (java_parser_context_push_initialized_field,
5354         java_parser_context_suspend, java_parser_context_resume):
5355         Likewise.
5356         (maybe_make_nested_class_name, make_nested_class_name,
5357         set_nested_class_simple_name_value,
5358         link_nested_class_to_enclosing, find_as_inner_class,
5359         find_as_inner_class_do, check_inner_class_redefinition,
5360         build_thisn_assign, build_current_thisn, build_access_to_thisn,
5361         maybe_build_thisn_access_method, build_outer_field_access,
5362         build_outer_field_access_methods, build_outer_field_access_expr,
5363         build_outer_method_access_method, build_new_access_id,
5364         build_outer_field_access_method, outer_field_access_p,
5365         outer_field_expanded_access_p, outer_field_access_fix,
5366         build_incomplete_class_ref, patch_incomplete_class_ref,
5367         create_anonymous_class): Likewise.
5368         (inst_id, wpv_id): New static global variables.
5369         (synchronized:): New rule, tagged <node>.
5370         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
5371         rules.
5372         (anonymous_class_creation:): New rule, tagged <node>.
5373         (NEW_TK): Tagged <node>.
5374         (type_literals, array_type_literal): New rules, tagged <node>.
5375         (class_declaration:): Removed action when reducing by class_body:
5376         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
5377         using GET_CPC in sub-rules.
5378         (class_member_declaration): Handle inner classes.
5379         (method_declaration): When reducing method_header:, reset
5380         current_function_decl when appropriate.
5381         (method_declarator:): Set the number of formal parameter to 0 for
5382         method declared without arguments.
5383         (constructor_declarator:): Likewise.
5384         (static_initializer:): List of elements kept in a list.
5385         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
5386         use of the keyword `static' for type declarations.
5387         (block_statement:): Handle inner class declarations.
5388         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
5389         type qualified `this'.
5390         (class_instance_creation_expression): Use anonymous_class_creation:
5391         to handle inner class instances creation. Handle qualified `new'.
5392         (something_dot_new): Added appropriate actions.
5393         (create_new_parser_context): New function.
5394         (java_push_parser_context, java_parser_context_save_global,
5395         java_parser_context_suspend): Use create_new_parser_context.
5396         (check_modifiers): Changed leading comment.
5397         (check_class_interface_creation): Handle interclasses.
5398         (add_superinterfaces): Fixed comment.
5399         (create_interface): Build qualified name from the raw_name instead
5400         of its matching WFL. Push the initialized fields list. raw_name added
5401         as an extra argument to maybe_create_class_interface_decl.
5402         (create_class): Build qualified name from the raw_name instead of
5403         its matching WFL. Removed assignment to current_parsed_class_un.
5404         Call PUSH_ERROR before returning an error. Suspend the current
5405         parser context when processing an inner class. Push the
5406         initialized fields list. raw_name added as an extra argument to
5407         maybe_create_class_interface_decl. Add the private this$<n>
5408         field.
5409         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
5410         (register_fields): Get the class type from GET_CPC and handle
5411         previous errors.  Added code to handle the creation of static
5412         fields in inner classes. Initialized fields initialization
5413         statements kept in a list of lists.
5414         (maybe_generate_finit): Initialized fields initialization
5415         statements kept in a list of lists. Use GET_CPC.
5416         (maybe_generate_clinit): Likewise.
5417         (method_header): Use GET_CPC and GET_CPC_UN.
5418         (parser_qualified_classname): Handle inner classes.
5419         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
5420         (java_fix_constructors): Hide pointer to enclosing context
5421         instance in constructor list when dealing with inner classes.
5422         (jdep_resolve_class): Call resolve_class with extra first argument
5423         JDEP_ENCLOSING.
5424         (resolve_class): Add enclosing context as a first extra argument
5425         to do_resolve_class.
5426         (do_resolve_class): Call find_as_inner_class. Handle WFLs
5427         properly.
5428         (resolve_no_layout): Extra argument added to resolve_class
5429         invocation.
5430         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
5431         (java_get_real_method_name): Use GET_CPC_UN.
5432         (check_abstract_method_definitions): Use DECL_CLINIT_P.
5433         (java_check_abstract_methods): Handle static method declared in
5434         inner classes by an error.
5435         (java_check_regular_methods): Use DECL_CLINIT_P.
5436         (source_start_java_method): Also set DECL_MAX_LOCALS.
5437         (create_artificial_method): Call java_parser_context_save_global
5438         and java_parser_context_restore_global instead of saving/restoring
5439         the context by hand.
5440         (expand_start_java_method): Improved verbose mode message.
5441         (java_complete_expand_methods): Fixed leading comment. Use
5442         DECL_CLINIT_P.
5443         (fix_constructors): Added assignment to this$<n> if necessary.
5444         (java_expand_classes): Call java_complete_expand_classes instead
5445         of java_complete_expand_methods.
5446         (make_qualified_primary): Simplified.
5447         (merge_qualified_name): Optimized for missing left or right parts.
5448         (resolve_expression_name): Handle access to outer class fields from
5449         interclasses.
5450         (resolve_qualified_expression_name): New macro
5451         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
5452         classes. Report error on non appropriate qualification of
5453         `new'. Handle qualified `this'.
5454         (not_accessible_p): Allow access to outer class private fields from
5455         inner classes.
5456         (patch_method_invocation): Handle method invocations through
5457         access methods and inner class constructor invocations.
5458         (find_applicable_accessible_methods_list): Search enclosing
5459         contexts of an inner class.
5460         (search_applicable_methods_list): Fixed typo.
5461         (argument_types_convertible): Handle inner class constructors'
5462         hidden outer context reference argument.
5463         (qualify_ambiguous_name): Handle qualified `this'.
5464         (java_complete_lhs): Handle use of field accessed through
5465         artificial access methods in various cases of assignments. Handle
5466         CLASS_LITERAL node.
5467         (check_final_assignment): Use DECL_CLINIT_P.
5468         (valid_ref_assignconv_cast_p): Handle the destination being an
5469         enclosing context of the source.
5470         (patch_unaryop): Handle use of field accessed through artificial
5471         access methods.
5472         (patch_return): Use DECL_CLINIT_P.
5473         (patch_throw_statement): Use DECL_CLINIT_P.
5474         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
5475         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
5476         ID_INIT_P.
5477
5478 2000-01-16  Anthony Green  <green@cygnus.com>
5479
5480         * parse.y (build_string_concatenation): Only use
5481         StringBuffer(String) shortcut if String arg is constant.
5482
5483 Wed Jan 12 20:20:11 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5484
5485         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
5486         the shift value to int. Fixed typo in comment.
5487
5488 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
5489
5490         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
5491         * jcf-write.c: Likewise.
5492         * parse.y: Likewise.
5493         * parse.c: Regenerate.
5494
5495 2000-01-09  Anthony Green  <green@cygnus.com>
5496
5497         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
5498         bytecodes in the correct order.
5499
5500 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5501
5502         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
5503
5504 Thu Jan  6 16:31:28 2000  Anthony Green  <green@cygnus.com>
5505
5506         * expr.c (java_lang_expand_expr): Switch to permanent obstack
5507         before building constant array decl.
5508
5509 Thu Jan  6 00:54:10 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5510
5511         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
5512         method invocation and typo in conditional expression.
5513         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
5514         the appropriate NOTE_POP.
5515         * parse.y (patch_binop): Shift value mask to feature the right
5516         type.
5517
5518 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5519
5520         * class.c (assume_compiled, assume_compiled_node): Add static
5521         prototype.
5522         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
5523
5524         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
5525
5526         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
5527
5528         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
5529         to `__modifier' to avoid stringifying it.
5530
5531         * parse.y (verify_constructor_circularity): Don't call a variadic
5532         function with a non-literal format string.
5533         (java_check_abstract_methods): Move unreachable code inside
5534         `continue' statement.
5535         (lookup_method_invoke): Call xstrdup, not strdup.
5536
5537         * expr.c (expand_java_field_op): Avoid the use of ANSI string
5538         concatenation.
5539
5540         * jcf-parse.c (yyparse): Likewise.
5541
5542         * jv-scan.c (main): Likewise.
5543
5544 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5545
5546         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
5547         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
5548         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
5549         concatenation.
5550
5551         * parse.y (synchronized, variable_redefinition_error,
5552         check_class_interface_creation, create_interface, create_class,
5553         method_header, finish_method_declaration,
5554         check_modifiers_consistency, method_declarator,
5555         complete_class_report_errors, check_abstract_method_definitions,
5556         java_check_regular_methods, check_throws_clauses,
5557         java_check_abstract_methods, read_import_dir,
5558         check_pkg_class_access, declare_local_variables, fix_constructors,
5559         cut_identifier_in_qualified, resolve_expression_name,
5560         resolve_qualified_expression_name, patch_method_invocation,
5561         java_complete_lhs, patch_assignment, try_builtin_assignconv,
5562         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
5563         patch_exit_expr, patch_exit_expr, patch_switch_statement,
5564         patch_try_statement, patch_synchronized_statement,
5565         patch_throw_statement, check_thrown_exceptions,
5566         patch_conditional_expr): Likewise.
5567
5568 Fri Dec 24 00:25:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5569
5570         * Makefile.in (LIBDEPS): Added gcc's errors.o
5571         (../jcf-dump$(exeext):): Link with gcc's errors.o
5572         (../gcjh$(exeext):): Likewise.
5573         * expr.c (expand_java_NEW): Layout the entire target type instead of
5574         laying out its methods only.
5575         (lookup_field): Layout the class after having loaded it.
5576         * java-tree.h (java_debug_context): Declared.
5577         * jcf-io.c (toplev.h): Included.
5578         (find_class): Removed assignment to jcf's outofsynch
5579         field. Force source file to be read if newer than its matching
5580         class file. Tweaked debug messages.
5581         * jcf-parse.c (jcf_out_of_synch): Deleted.
5582         (read_class): Call to jcf_out_of_synch removed.
5583         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
5584         (jcf_out_of_synch): Prototype deleted.
5585         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
5586         `deprecated' and `class_err': integer turned into bit fields.
5587         New bit fields `saved_data_ctx' and `saved_data'. Fixed comments.
5588         * parse.y (package_list): New global.
5589         (package_declaration:): Record newly parsed package name.
5590         (extra_ctxp_pushed_p): Static global deleted.
5591         (java_parser_context_save_global): Create buffer context for the
5592         purpose of saving globals, if necessary.
5593         (java_parser_context_restore_global): Pop context pushed for the
5594         purpose of saving globals, if necessary.
5595         (java_debug_context_do): New prototype and function.
5596         (java_debug_context): Likewise.
5597         (do_resolve_class): Use already parsed package names to qualify
5598         and lookup class candidate.
5599         (java_pre_expand_clinit): Removed unnecessary local variable.
5600
5601 1999-12-17  Tom Tromey  <tromey@cygnus.com>
5602
5603         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
5604         fixes PR gcj/119.
5605         (process_file): Use `\n\' at end of each line in string.
5606
5607 Thu Dec 16 00:09:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5608
5609         * expr.c (expand_invoke): Layout the loaded class before
5610         attempting to use it.
5611         (expand_java_field_op): Allow final field assignments to take
5612         place in $finit$.
5613         * typeck.c (convert): Return error_mark_node if expr is null.
5614
5615 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5616
5617         * class.c (class_depth): Return -1 if the class doesn't load
5618         properly.
5619         * expr.c (can_widen_reference_to): Check for errors during depth
5620         computation and return 0 accordingly.
5621         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
5622         create default constructors and add an other error check.
5623         * parse.h (java_fix_constructors): Prototyped.
5624         * parse.y (java_pre_expand_clinit): Likewise.
5625         (build_super_invocation): Re-prototyped to feature one argument.
5626         (java_check_circular_reference): Directly use `current'.
5627         (java_fix_constructors): New function.
5628         (java_check_regular_methods): Don't create default constructors
5629         here, but abort if none were found.
5630         (java_complete_expand_methods): Pre-process <clinit> calling
5631         java_pre_expand_clinit.
5632         (java_pre_expand_clinit): New function.
5633         (fix_constructors): build_super_invocation invoked with the
5634         current method declaration as an argument.
5635         (build_super_invocation): Use the context of the processed method
5636         decl argument instead of current_class.
5637         * typeck.c (lookup_java_method): Take WFLs in method names into
5638         account.
5639
5640 Tue Dec 14 14:20:16 1999  Per Bothner  <per@bothner.com>
5641
5642         * class.c (make_class_data): flag_keep_inline_functions to keep
5643         private methods in the method array.
5644
5645 1999-12-15  Anthony Green  <green@cygnus.com>
5646
5647         * check-init.c (check_init): Take into account both types of
5648         `throw's when checking for uninitialized variables.
5649
5650 Fri Dec 10 21:53:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5651
5652         * parse.y (java_complete_lhs): Force convertion of array
5653         dimensions to int_type_node, that's what runtime's ABI expects.
5654
5655 Fri Dec 10 16:13:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5656
5657         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
5658         operand of a WFL, until the Java front-end gets fixed with regard
5659         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
5660
5661 1999-12-10  Andrew Haley  <aph@cygnus.com>
5662
5663         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
5664         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
5665         expr.c (build_java_athrow): Add support for sjlj-exceptions.
5666         java-tree.h: Ditto.
5667         jcf-write.c: Ditto.
5668
5669 Wed Dec  8 15:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5670
5671         * expr.c (java_lang_expand_expr): Switch to permanent obstack
5672         before calling expand_eh_region_start and expand_start_all_catch.
5673         * except.c (expand_start_java_handler): Switch to permanent
5674         obstack before calling expand_eh_region_start.
5675         (expand_end_java_handler): Switch to permanent obstack before
5676         calling expand_start_all_catch.
5677
5678 1999-12-5  Anthony Green  <green@cygnus.com>
5679
5680         * decl.c (init_decl_processing): Mark throw_node as a noreturn
5681         function with side effects.
5682         (init_decl_processing): Mark all memory allocating DECLs with
5683         DECL_IS_MALLOC.
5684
5685 Wed Dec  1 04:25:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5686
5687         * except.c (expand_end_java_handler): Call
5688         expand_resume_after_catch and end_catch_handler.
5689
5690 Tue Nov 30 12:36:15 1999  Anthony Green  <green@cygnus.com>
5691
5692         * verify.c (verify_jvm_instructions): Create new return label
5693         chain if non existant (don't rely on the verified state of the jsr
5694         target.)
5695
5696 Tue Nov 30 12:28:34 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5697
5698         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
5699         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
5700
5701         * parse.y (patch_assignment): Removed bogus final class test on
5702         lhs when checking on whether to emit an ArrayStoreException runtime
5703         check.
5704         * expr.c (expand_java_arraystore): Likewise.
5705
5706 1999-11-28 Anthony Green <green@cygnus.com>
5707
5708         * decl.c (find_local_variable): Reuse single slot decls when
5709           appropriate.
5710
5711 Wed Nov 24 17:33:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5712
5713         * jcf-parse.c (saw_java_source): Global variable removed.
5714         (read_class): Don't use `saw_java_source'. Added extra braces.
5715         (yyparse): Code setting `saw_java_source' removed.
5716
5717 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
5718
5719         * except.c (emit_handlers): Zero catch_clauses after emitting them.
5720
5721 Tue Nov 23 17:29:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5722
5723         * verify.c (merge_type_state): Non verified subroutines being
5724         considered more than once to trigger passive type merge.
5725
5726 Tue Nov 23 10:55:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5727
5728         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
5729         in case of error. Error message tuned.
5730
5731 1999-11-21  Anthony Green  <green@cygnus.com>
5732
5733         * constants.c (find_methodref_index): Unwrap method names before
5734         inserting them in the constant pool.
5735
5736         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
5737
5738         * class.c (assume_compiled_node): New typedef.
5739         (assume_compiled_tree): New static data.
5740         (find_assume_compiled_node): New function.
5741         (add_assume_compiled): New function.
5742         (assume_compiled): New function.
5743         * class.c (make_class_data): Use assume_compiled.
5744         (is_compiled_class): Use assume_compiled.
5745
5746         * java-tree.h (add_assume_compiled): Declare.
5747
5748         * lang.c (lang_decode_option): Parse new options.
5749
5750 Wed Nov 17 21:09:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5751
5752         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
5753         int_type_node: that's what `_Jv_AllocObject' expects.
5754
5755 Thu Nov 11 01:57:14 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5756
5757         * parse.y (lookup_method_invoke): Use lang_printable_name to
5758         reliably build the type name during error report. Fixes PR gcj/97.
5759
5760 1999-11-09  Tom Tromey  <tromey@cygnus.com>
5761
5762         * jcf-path.c: Include <sys/stat.h>.
5763         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
5764         (DIR_UP): New macro.
5765
5766 Tue Nov  9 12:12:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5767
5768         * parse.y (source_end_java_method): Resume permanent allocation,
5769         reversing Apr 27 1998 patch.
5770         (patch_string_cst): Pop obstacks after having pushed the permanent
5771         ones.
5772
5773 1999-11-05  Tom Tromey  <tromey@cygnus.com>
5774
5775         * class.c (finish_class): Emit inlined methods if any native
5776         methods exist in the class.  Fixes PR gcj/85.
5777
5778 Thu Nov  4 16:27:01 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5779
5780         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
5781         (qualify_ambiguous_name): Likewise.
5782
5783 Wed Nov  3 15:20:02 MST 1999  Godmar Back <gback@cs.utah.edu>
5784
5785         * typeck.c: (lookup_java_method):  search all inherited
5786         interfaces when looking up interface method.
5787
5788 Mon Nov  1 23:42:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5789
5790         * parse.y (method_header:): Issue error message for rule `type
5791         error'.
5792         (synchronized:): Error report when not using synchronized.
5793
5794 Mon Nov  1 01:32:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5795
5796         * parse.y (resolve_qualified_expression_name): Prevent `this' from
5797         being used before the superclass constructor has been called.
5798         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
5799         instead of `CALL_THIS_CONSTRUCTOR_P'.
5800
5801 Sat Oct 30 21:35:13 1999  Todd T. Fries <todd@lighthouse.fries.net>
5802
5803         * check-init.c: Fix typo in comment.
5804
5805 Fri Oct 29 14:35:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5806
5807         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
5808         and final method.
5809
5810 Fri Oct 29 14:23:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5811
5812         * parse.y (expression_statement:): Call function to report
5813         improper invocation of a constructor.
5814         (parse_ctor_invocation_error): New function.
5815
5816 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
5817
5818         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
5819         remember_end_note.
5820
5821 1999-10-21  Tom Tromey  <tromey@cygnus.com>
5822
5823         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
5824         in generated `main'.
5825
5826 Thu Oct 21 01:27:31 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5827
5828         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
5829         (qualify_ambiguous_name): Likewise.
5830
5831 Wed Oct 20 01:41:47 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5832
5833         * parse.y (java_complete_tree): fold_constant_for_init to work on
5834         permanent_obstack.
5835         (java_complete_lhs): Likewise.
5836         (array_constructor_check_entry): Complete an initializer element
5837         on permanent_obstack.
5838
5839 1999-10-19  Tom Tromey  <tromey@cygnus.com>
5840
5841         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
5842         From Mike Moreton <mike@pillim.demon.co.uk>.
5843
5844 1999-10-15  Greg McGary  <gkm@gnu.org>
5845
5846         * java-tree.h (flag_bounds_check): Remove extern decl.
5847         * lang.c (flag_bounds_check): Remove global variable.
5848         (lang_f_options): Remove "bounds-check" entry.
5849         (lang_init_options): Default flag_bounds_check to "on".
5850
5851 1999-10-14  Tom Tromey  <tromey@cygnus.com>
5852
5853         * jvgenmain.c (usage): New function.
5854         (main): Use it.  Also, handle `-D' options.
5855         * jvspec.c (lang_specific_driver): Recognize -D.
5856         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
5857
5858         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
5859
5860 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5861
5862         * jcf-dump.c (print_constant, disassemble_method): Don't call a
5863         variadic function with a non-literal format string.
5864
5865         * parse-scan.y (report_main_declaration): Likewise.
5866
5867         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
5868
5869         * parse.y (read_import_dir, patch_assignment, patch_binop,
5870         patch_array_ref): Likewise.
5871
5872         * typeck.c (build_java_array_type): Likewise.
5873
5874         * verify.c (verify_jvm_instructions): Likewise.
5875
5876 Tue Oct 12 22:28:10 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5877
5878         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
5879
5880 1999-10-07  Anthony Green  <green@cygnus.com>
5881
5882         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
5883         where CHECK_PUT may fail for valid reasons.
5884
5885         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
5886         UNSAFE_PUTN): New macros.
5887
5888 1999-10-04  Tom Tromey  <tromey@cygnus.com>
5889
5890         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
5891         well.  Fixes Java PR gcj/59.
5892         * parse-scan.y (yyerror): Report errors.
5893
5894 Fri Sep 24 12:23:05 1999  Glenn Chambers  <GChambers@provsol.com>
5895
5896         * decl.c (insert_block): Remove unconditional `abort'.
5897
5898 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
5899
5900         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
5901         FUNCTION_CODE now of type int.  All callers changed.
5902         Set the builtin's DECL_BUILT_IN_CLASS.
5903
5904 1999-09-23  Tom Tromey  <tromey@cygnus.com>
5905
5906         * jvspec.c (lang_specific_driver): Don't read spec file if
5907         -fsyntax-only given.
5908
5909 1999-09-22  Tom Tromey  <tromey@cygnus.com>
5910
5911         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
5912
5913         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
5914         (WORDS_TO_LONG): Likewise.
5915         (WORDS_TO_DOUBLE): Likewise.
5916
5917 Tue Sep 14 16:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5918
5919         * jcf-write.c (RELOCATION_VALUE_0): New macro.
5920         (RELOCATION_VALUE_1): Likewise.
5921         (emit_iinc, emit_reloc, push_constant1, push_constant2,
5922         push_in_const, push_long_const): Prototyped.
5923         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
5924         (push_constant2): Likewise.
5925         (push_int_const): Cast find_constant1's integer arguments to `jword'.
5926         (find_constant_wide): Cast find_constant2's integer arguments to
5927         `jword'.
5928         (find_constant_index): Cast find_constant2's and find_constant2's
5929         integer arguments to `jword'.
5930         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
5931         (emit_switch_reloc): Use RELOCATION_VALUE_0.
5932         (emit_if): Use RELOCATION_VALUE_1.
5933         (emit_goto): Likewise.
5934         (emit_jsr): Likewise.
5935         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
5936         argument to push_long_const to HOST_WIDE_INT.
5937
5938 1999-09-15  Andreas Schwab  <schwab@suse.de>
5939
5940         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
5941
5942 1999-09-20  Nick Clifton  <nickc@cygnus.com>
5943
5944         * lang.c (lang_decode_option): Extend comment.
5945
5946 Thu Sep 16 15:42:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5947
5948         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
5949         instead of fndecl.
5950
5951 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5952
5953         * gjavah.c (get_field_name, print_method_info, print_include,
5954         add_namelet): Use xmalloc, not malloc.
5955
5956         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
5957         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
5958         NULL pointer.
5959
5960         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
5961
5962         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
5963
5964         * jcf-path.c (add_entry): Likewise.
5965
5966         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
5967
5968         * jv-scan.c (xmalloc): Remove definition.
5969
5970         * jvgenmain.c (xmalloc): Likewise.
5971
5972         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
5973
5974         * lex.c (java_store_unicode): Use xrealloc, not realloc.
5975
5976         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
5977         concat, not xmalloc/sprintf.
5978         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
5979         (xstrdup): Remove definition.
5980
5981         * parse.y (duplicate_declaration_error_p,
5982         constructor_circularity_msg, verify_constructor_circularity,
5983         check_abstract_method_definitions, java_check_regular_methods,
5984         java_check_abstract_methods, patch_method_invocation,
5985         check_for_static_method_reference, patch_assignment, patch_binop,
5986         patch_cast, array_constructor_check_entry, patch_return,
5987         patch_conditional_expr): Use xstrdup, not strdup.
5988
5989         * zextract.c (ALLOC): Use xmalloc, not malloc.
5990
5991 Sun Sep 12 23:30:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5992
5993         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
5994
5995         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
5996         (do_spec, lang_specific_pre_link, lang_specific_driver,
5997         input_filename, input_filename_length): Don't declare.
5998         (main_class_name, jvgenmain_spec, lang_specific_driver):
5999         Constify a char*.
6000         (lang_specific_driver): All calls to the function pointer
6001         parameter now explicitly call `fatal'.
6002
6003 Sat Sep 11 16:46:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6004
6005         * parse.y (find_applicable_accessible_methods_list): Search
6006         abstract classes as interfaces.
6007
6008 Thu Sep  9 17:33:28 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6009
6010         * class.c (finish_class): We're now outside a valid method
6011         declaration. Tell the rest of gcc so.
6012
6013 1999-09-08  Bruce Korb  autogen@linuxbox.com
6014
6015         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
6016
6017 1999-09-07  Tom Tromey  <tromey@cygnus.com>
6018
6019         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
6020         java-array.h.
6021         (decode_signature_piece): Don't emit "::" in JArray<>.
6022         (print_namelet): Only print trailing `;' when printing a class.
6023
6024 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6025
6026         * java-tree.h: Delete declarations for all tree nodes now moved to
6027         global_trees.
6028         * decl.c: Delete their definitions.
6029
6030 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
6031
6032         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
6033         * Makefile.in (OBJS): Add ggc-callbacks.o.
6034         (OBJDEPS): Likewise.
6035
6036 1999-09-03  Tom Tromey  <tromey@cygnus.com>
6037
6038         * parse.y (strip_out_static_field_access_decl): Return operand if
6039         it satisfies JDECL_P.
6040
6041 1999-09-02  Tom Tromey  <tromey@cygnus.com>
6042
6043         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
6044         Handle nested arrays, like `[[I'.
6045
6046 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6047
6048         * class.c (finish_class): Remove unused parameter, all callers
6049         changed.
6050
6051         * expr.c (build_java_athrow): Change return type to void.
6052         (java_lang_expand_expr): Make sure each case in switch returns a
6053         value.
6054
6055         * java-tree.h (finish_class): Fix prototype to take void args.
6056
6057         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
6058         (main): Issue return from main, not exit.
6059
6060         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
6061
6062         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
6063
6064         * jv-scan.c (main): Issue return from main, not exit.
6065
6066         * parse.y (check_abstract_method_definitions,
6067         java_check_abstract_method_definitions): Add static prototypes.
6068         (java_complete_expand_methods): Fix call to `finish_class'.
6069
6070         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
6071         and `prevpc'.
6072
6073 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6074
6075         * lang.c (language_string): Constify.
6076
6077 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6078
6079         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
6080         Remove hacks for stuff which comes from libiberty.
6081
6082         * Make-lang.in: Likewise.
6083
6084 Mon Aug 30 16:41:41 1999  Hans-Peter Nilsson  <hp@axis.se>
6085
6086         * Makefile.in (xref.o): Depend on xref.c explicitly.
6087
6088 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6089
6090         * java-tree.h (lang_printable_name): Constify a char*.
6091
6092         * lang.c (lang_printable_name): Likewise.
6093
6094 Fri Aug 27 23:31:57 1999  Jeffrey A Law  (law@cygnus.com)
6095
6096         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
6097         comments in C code.
6098
6099 1999-08-26  Tom Tromey  <tromey@cygnus.com>
6100
6101         * gjavah.c (print_cxx_classname): Print "::" before qualified
6102         name.
6103
6104 Thu Aug 26 09:10:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6105
6106         * parse.y (lookup_cl): Changed leading comment. Now does its best
6107         to set the column number.
6108         (qualify_ambiguous_name): Take WFL wrappers into account.
6109
6110 Wed Aug 25 15:37:15 1999  Gregg Townsend  <gmt@cs.arizona.edu>
6111
6112         * verify.c (verify_jvm_instructions): Don't check instruction
6113         validity beyond end of method.
6114
6115 1999-08-25  Tom Tromey  <tromey@cygnus.com>
6116
6117         * jvspec.c (lang_specific_driver): Correctly handle --help again.
6118
6119 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6120
6121         * gjavah.c (print_name, print_base_classname, utf8_cmp,
6122         cxx_keyword_subst, generate_access, name_is_method_p,
6123         get_field_name, print_field_name, super_class_name, print_include,
6124         decode_signature_piece, print_class_decls, usage, help,
6125         java_no_argument, version, add_namelet, print_namelet): Add static
6126         prototype.
6127         (print_base_classname, utf8_cmp, cxx_keyword_subst,
6128         name_is_method_p): Constify a char*.
6129         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
6130         Provide a final else clause in an if-else-if.
6131         (print_field_info): Add missing final arg in function call to
6132         `print_field_name'.
6133         (print_method_info, decompile_method, decode_signature_piece,
6134         print_c_decl, print_full_cxx_name, print_stub,
6135         print_mangled_classname, super_class_name, print_include,
6136         add_namelet, add_class_decl, print_class_decls, process_file,
6137         help): Constify a char*.
6138
6139         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
6140         push_int_const, find_constant_wide, find_constant_index,
6141         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
6142         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
6143         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
6144         emit_if, emit_goto, emit_jsr, call_cleanups,
6145         make_class_file_name): Add static prototypes.
6146         (generate_bytecode_return, generate_bytecode_insns): Pass a
6147         NULL_PTR, not a NULL_TREE.
6148
6149         * jv-scan.c: Include "jcf.h".
6150         (main): Declare using DEFUN macro.
6151
6152         * jvspec.c (find_spec_file, lang_specific_pre_link,
6153         lang_specific_driver): Add prototypes.
6154         (find_spec_file): Constify a char*.
6155
6156         * keyword.gperf (hash, java_keyword): Add prototypes.
6157
6158         * lang.c (lang_print_error): Add static prototype.
6159         (lang_init): Prefer memcpy over bcopy to avoid casts.
6160
6161         * lex.c (yylex): Add static prototype.
6162
6163         * parse-scan.y: Include "lex.c" earlier.
6164
6165         * parse.h: Remove redundant declaration for `yylex'.
6166
6167         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
6168         labeled_block_contains_loop_p): Add static prototypes.
6169         (not_accessible_p): Make static to match prototype.
6170
6171         * verify.c (start_pc_cmp): Don't needlessly cast away const.
6172
6173 Sun Aug 22 11:07:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6174
6175         * parse.y (check_method_redefinition): Changed leading comment.
6176         (check_abstract_method_definitions): New function.
6177         (java_check_abstract_method_definitions): New function.
6178         (java_check_regular_methods): Call it.
6179         (verify_constructor_super): Fixed indentation.
6180         (lookup_method_invoke): Likewise.
6181
6182 Thu Aug 19 10:26:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6183
6184         * parse.y (method_header): Return a null pointer if the current
6185         class node is null.
6186         (finish_method_declaration): Return if the current function decl
6187         is null.
6188         (source_start_java_method): Likewise.
6189         (java_method_add_stmt): Likewise.
6190
6191 Wed Aug 18 13:17:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6192
6193         * class.c (emit_register_class): Removed unnecessary call to
6194         start_sequence.
6195         * parse.y (labeled_block_contains_loop_p): Removed unused local
6196         variable.
6197
6198 Tue Aug 17 22:51:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6199
6200         * parse.y (java_refold): Added prototype.
6201
6202 Tue Aug 17 21:48:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6203
6204         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
6205         (java_stabilize_reference): Removed unnecessary `else'.
6206         (java_complete_lhs): Set flag to remember boolean. Call
6207         java_refold. Added comments.
6208         (java_decl_equiv): New function.
6209         (binop_compound_p): Likewise.
6210         (java_refold): Likewise.
6211         (patch_unaryop): Striped static field access assigned to decl and
6212         op. Changed promotion scheme for ++/-- operators.
6213         (search_loop): New function.
6214         (labeled_block_contains_loop_p): Likewise.
6215         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
6216         comment.
6217         (patch_bc_statement): Call search_loop. Fixed comment.
6218
6219 1999-08-14  Anthony Green  <green@cygnus.com>
6220
6221         * expr.c (java_lang_expand_expr): Mark static array data as
6222         referenced.
6223
6224 Tue Aug 10 00:28:31 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6225
6226         * jvgenmain.c (main): NUL-terminate name_obstack.
6227
6228 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6229
6230         * check-init.c (check_bool2_init, done_alternative): Add static
6231         prototypes.
6232
6233         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
6234         (add_method, build_utf8_ref, build_class_ref,
6235         append_gpp_mangled_type, layout_class_method): Constify a char*.
6236
6237         * decl.c (push_promoted_type, make_binding_level): Add static
6238         prototypes.
6239         (push_promoted_type, pushdecl): Constify a char*.
6240
6241         * except.c (find_handler_in_range, link_handler,
6242         check_start_handlers): Add static prototypes.
6243
6244         * expr.c (process_jvm_instruction): Constify a char*.
6245
6246         * gjavah.c (main): Constify a char*.
6247
6248         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
6249         Constify a char*.
6250
6251         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
6252         static prototypes.
6253         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
6254         munge, print_ents): Constify a char*.
6255
6256         * jcf-dump.c (disassemble_method): Constify a char*.
6257         (print_constant_pool, print_exception_table): Add static prototypes.
6258         (print_constant, print_exception_table, main, disassemble_method):
6259         Constify a char*.
6260
6261         * jcf-io.c (find_classfile, find_class): Likewise.
6262
6263         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
6264         (set_source_filename, predefined_filename_p): Add static prototypes.
6265         (set_source_filename, get_constant, get_class_constant,
6266         find_in_current_zip): Constify a char*.
6267
6268         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
6269         static prototypes.
6270         (add_entry, add_path, jcf_path_classpath_arg,
6271         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
6272
6273         * jcf-reader.c (get_attribute, jcf_parse_preamble,
6274         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
6275         jcf_parse_one_method, jcf_parse_methods,
6276         jcf_parse_final_attributes): Add static prototypes.
6277         (get_attribute): Constify a char*.
6278
6279         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
6280         jcf_dependency_add_target, jcf_path_classpath_arg,
6281         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
6282
6283         * jv-scan.c (main): Constify a char*.
6284         (gcc_obstack_init): Add prototype arguments.
6285
6286         * jvgenmain.c (gcc_obstack_init): Likewise.
6287         (main): Constify a char*.
6288
6289         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
6290         static prototypes.
6291         (put_decl_string, lang_print_error): Constify a char*.
6292         (lang_init): Remove redundant extern prototype.
6293
6294         * mangle.c (emit_unicode_mangled_name): Constify a char*.
6295
6296         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
6297         Add static prototypes.
6298         (get_type_from_signature): Constify a char*.
6299
6300         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
6301         Add static prototypes.
6302         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
6303         (verify_jvm_instructions): Constify a char*.
6304
6305         * xref.c (xref_flag_value): Likewise.
6306
6307         * xref.h (xref_flag_value): Likewise.
6308
6309         * zextract.c (makeword, makelong): Add static prototypes.
6310         (makeword, makelong): Constify a uch*.
6311
6312 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6313
6314         * lang.c (java_dummy_print): Constify a char*.
6315         (lang_print_error): Likewise.
6316         (lang_init): Remove redundant prototype for `print_error_function'.
6317         (lang_init_source): Likewise.
6318         (lang_identify): Constify a char*.
6319
6320 1999-08-09  Tom Tromey  <tromey@cygnus.com>
6321
6322         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
6323         (WORDS_TO_LONG): Likewise.
6324         (WORDS_TO_DOUBLE): Likewise.
6325
6326 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6327
6328         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
6329
6330         * expr.c (java_stack_pop, java_array_data_offset,
6331         build_java_throw_out_of_bounds_exception, case_identity,
6332         build_java_check_indexed_type): Add static prototypes.
6333         (linenumber_table, expand_invoke, expand_java_field_op,
6334         build_primtype_type_ref, expand_byte_code): Constify a char*.
6335
6336         * java-tree.h (build_primtype_type_ref, linenumber_table):
6337         Constify a char*.
6338         (java_lang_expand_expr): Add prototype.
6339
6340         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
6341         `java_lang_expand_expr'.
6342
6343         * lex.c (java_lex_error): Constify a char*.
6344         (java_get_unicode, java_read_char, java_allocate_new_line,
6345         java_unget_unicode, java_sneak_unicode): Prototype.
6346
6347         * parse-scan.y (current_class, package_name, method_declarator,
6348         report_class_declaration, yyerror): Constify a char*.
6349
6350         * parse.h (java_report_errors): Prototype.
6351         (yyerror): Constify a char*.
6352
6353         * parse.y (classitf_redefinition_error, check_modifiers,
6354         parse_jdk1_1_error, lookup_package_type,
6355         lookup_package_type_and_set_next, get_printable_method_name,
6356         purify_type_name): Constify a char*.
6357         (build_super_invocation, maybe_generate_finit,
6358         verify_constructor_super, parser_add_interface,
6359         add_superinterfaces, jdep_resolve_class, note_possible_classname,
6360         java_complete_expand_methods, java_expand_finals,
6361         cut_identifier_in_qualified, java_stabilize_reference,
6362         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
6363         merge_string_cste): Prototype.
6364         (single_type_import_declaration, yyerror,
6365         variable_redefinition_error, build_array_from_name,
6366         build_unresolved_array_type, check_class_interface_creation,
6367         resolve_class, complete_class_report_errors,
6368         note_possible_classname, read_import_dir,
6369         find_in_imports_on_demand, resolve_package, fix_constructors,
6370         check_deprecation, lookup_method_invoke,
6371         maybe_build_primttype_type_ref, array_constructor_check_entry):
6372         Constify a char*.
6373         (java_complete_expand_methods, java_expand_finals): Make static.
6374         (convert_narrow): Remove static prototype.
6375
6376 Tue Aug  3 20:21:20 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
6377
6378         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
6379
6380 1999-08-02  Richard Henderson  <rth@cygnus.com>
6381
6382         * decl.c: Include defaults.h instead of expr.h.
6383         * parse.y: Likewise.
6384
6385 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
6386
6387         * java/decl.c (start_java_method): Change all uses of
6388         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
6389         Ensure expr.h is included.
6390         * java/expr.c (pop_arguments): Ditto.
6391         * java/parse.y (expand_start_java_method): Ditto.
6392
6393 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6394
6395         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6396
6397 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
6398
6399         * decl.c: Include "function.h".
6400         * except.c: Likewise.
6401         * parse.y: Likewise.
6402         * Makefile.in: Update dependencies.
6403
6404 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6405
6406         * expr.c (build_java_soft_divmod): Provide a default case in switch.
6407         (java_lang_expand_expr): Mark parameters `target', `tmode' and
6408         `modifier' with ATTRIBUTE_UNUSED.
6409
6410         * gjavah.c (process_file): Add braces around ambiguous `else'.
6411
6412         * jcf-dump.c (print_access_flags, localvar_free): Change return
6413         type to void.
6414
6415         * parse.y (java_complete_expand_method): Initialize variable
6416         `exception_copy'.
6417         (resolve_qualified_expression_name): Likewise for `field_decl'.
6418         (patch_method_invocation): Likewise for `class_to_search'.
6419         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
6420         (patch_assignment): Likewise for `lhs_type'.
6421
6422         * verify.c (verify_jvm_instructions): Remove unused variable
6423         `caller'.
6424
6425 1999-07-25  Richard Henderson  <rth@cygnus.com>
6426
6427         * decl.c (va_list_type_node): New.
6428
6429 1999-07-25  Anthony Green  <green@cygnus.com>
6430
6431         * gjavah.c (print_stub): New function.
6432         (METHOD_IS_NATIVE): New macro.
6433         (print_mangled_classname): Make static.
6434         (HANDLE_END_FIELD): Don't emit fields during stub generation.
6435         (process_file): Perform stub generation.
6436         (HANDLE_METHOD): Don't emit class decls during stub
6437         generation.
6438         (HANDLE_END_METHOD): Take into account stub generation.
6439         (print_method_info): Handle stub generation.
6440         (print_stub): New function.
6441         (print_cxx_classname): Make signature consistant with others.
6442         (help): Describe -stubs option.
6443         (main): Create stub file.
6444         (version): Use version.c.
6445         (print_full_cxx_name): New function.
6446         (print_c_decl): Use print_full_cxx_name.
6447
6448 Thu Jul 22 12:41:12 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6449
6450         * check-init.c (check_init): Handle MAX_EXPR.
6451
6452 1999-07-15  Andrew Haley  <aph@cygnus.com>
6453
6454         * lang.c (flag_use_divide_subroutine): New variable.
6455         * typeck.c: (convert_ieee_real_to_integer): Bounds check
6456         fp-to-integer conversion.
6457         (convert): Call convert_ieee_real_to_integer when flag_fast_math
6458         is not set.
6459
6460         * expr.c (build_java_soft_divmod): New function.
6461         (build_java_binop): Call build_java_soft_divmod if
6462         flag_use_divide_subroutine is set.
6463         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
6464         soft_lrem_node: new builtin functions.
6465         (init_decl_processing) Initialize the new builtins.
6466         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
6467         soft_lrem_node: new builtin functions.
6468         (build_java_soft_divmod): New function.
6469         * parse.y: Call build_java_soft_divmod if
6470         flag_use_divide_subroutine is set.
6471         * parse.c: Rebuilt.
6472
6473         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
6474         a --specs= arg) even if not linking.
6475         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
6476         -fuse-divide-subroutine
6477
6478 Tue Jul 20 13:20:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6479
6480         * parse.y (resolve_and_layout): Check methods only once.
6481         (resolve_qualified_expression_name): Verify thrown exceptions
6482         compatibility.
6483         (check_thrown_exceptions): Reject exceptions thrown in
6484         initializer. Error message tuned.
6485
6486 1999-07-14  Andrew Haley  <aph@cygnus.com>
6487
6488         * expr.c (expand_expr): Do not return the last statement in a
6489         block as the block's value.
6490
6491 Sat Jul  3 22:26:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6492
6493         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
6494         CALL_EXPR, to avoid order of evaluation changes.
6495
6496 Fri Jul  2 17:44:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6497
6498         * parse.y (qualify_ambiguous_name): Do not use
6499         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
6500
6501 Thu Jul  1 23:31:16 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6502
6503         * check-init.c (check_init): Handle MAX_EXPR.
6504         * expr.c (force_evaluation_order): Force method call arguments to
6505         be evaluated in left-to-right order.
6506         * parse.y (qualify_ambiguous_name): Loop again to qualify
6507         NEW_ARRAY_EXPR properly.
6508
6509 Wed Jun 30 17:27:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6510
6511         * parse.y (patch_invoke): Resolve unresolved invoked method
6512         returned type.
6513         (qualify_ambiguous_name): STRING_CST to qualify expression for
6514         type name resolution.
6515
6516 1999-06-24  Andrew Haley  <aph@cygnus.com>
6517
6518         * class.c (finish_class): Whenever a deferred method is
6519         output, rescan the list of methods to see if a new candidate for
6520         output can be found.
6521
6522 1999-06-28  Tom Tromey  <tromey@cygnus.com>
6523
6524         * jvspec.c (lang_specific_driver): Recognize --help.
6525
6526 Fri Jun 25 13:35:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6527
6528         * parse.y (resolve_package): Fixed bogus return statement.
6529         (patch_method_invocation): Resolve method invocation beginning with
6530         a package name qualifier.
6531
6532 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6533
6534         * Make-lang.in (java.stage1): Depend on stage1-start.
6535         (java.stage2): Likewise for stage2-start.
6536         (java.stage3): Likewise for stage3-start.
6537         (java.stage4): Likewise for stage4-start.
6538
6539 Thu Jun 24 13:12:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6540
6541         * parse.y (java_complete_lhs): When doing cross referencing, don't
6542         try to keep file location on a WFL expanded as a CALL_EXPR.
6543
6544 Wed Jun 23 14:37:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6545
6546         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
6547         compiling to class file a void method with an empty method body.
6548         As a side effect, the bytecode backend will generate the
6549         appropriate `return' instruction.
6550
6551 Tue Jun 22 20:43:49 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6552
6553         * parse.y (lookup_package_type_and_set_next): New function prototype.
6554         (resolve_package): Search current and imported packages.
6555         (lookup_package_type_and_set_next): New function.
6556
6557 1999-06-22  Andrew Haley  <aph@cygnus.com>
6558
6559         * verify.c (verify_jvm_instructions): Check for pending blocks
6560         before invalid PC test and opcode switch, not after.
6561
6562 1999-06-21  Andrew Haley  <aph@cygnus.com>
6563
6564         * except.c (find_handler_in_range): The upper limit for exception
6565         ranges is exclusive, not inclusive: (start <= pc < end).
6566         (link_handler): find child pointer which points to outer by
6567         searching sibling list: previous code incorrectly assumed that
6568         outer->outer->first_child must point to outer.
6569         * verify.c (verify_jvm_instructions): FIXME added to code for
6570         `athrow'.
6571         (verify_jvm_instructions): Do not assume that the last block
6572         processed in a subroutine is a block which ends with a `ret'
6573         instruction.  With some control flows it is possible that the last
6574         block ends with an `athrow'.
6575
6576 Mon Jun 14 13:13:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6577
6578         * parse.y (qualify_ambiguous_name): Reorganized the post
6579         evaluation of non WFL leading expression nodes.
6580
6581 Fri Jun 11 21:37:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6582
6583         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
6584         CONVERT_EXPR.
6585
6586 Thu Jun 10 22:26:17 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6587
6588         * parse.y (qualify_ambiguous_name): Handle qualified expression
6589         beginning with a STRING_CST.
6590
6591 Thu Jun 10 20:27:25 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6592
6593         * parse.y (register_fields): Set DECL_INITIAL on both
6594         pre-initialized static and public fields.
6595         (resolve_field_access): Static field access expressions to always
6596         use pointer types.
6597         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
6598         qualification. CONVERT_EXPR to be resolved as an expression name.
6599         (java_complete_lhs): Identify and access qualified final
6600         initialized field in switch statement case expression.
6601         (fold_constant_for_init): Pre-initialized field decl constant to
6602         be folded.
6603
6604 Mon Jun  7 16:09:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6605
6606         * parse.y (note_possible_classname): Mark returned node with
6607         QUALIFIED_P only if the original class name contained a '/'.
6608
6609 Sat Jun  5 11:46:59 1999  Anthony Green  <green@cygnus.com>
6610
6611         * Make-lang.in (gcjh): More parallel build fixes.
6612
6613 1999-06-03  Mike Stump  <mrs@wrs.com>
6614
6615         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
6616
6617 Wed Jun  2 10:44:38 1999  Anthony Green  <green@cygnus.com>
6618
6619         * except.c (link_handler): Chain exception handlers in order.
6620
6621 Wed Jun  2 10:41:24 1999  Anthony Green  <green@cygnus.com>
6622
6623         * expr.c (expand_byte_code): Fill unreachable bytecode regions
6624         with nops and process as usual in order to always set correct EH
6625         ranges.  Emit detailed warnings about unreachable bytecodes.
6626
6627 Wed Jun  2 10:35:13 1999  Anthony Green  <green@cygnus.com>
6628
6629         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
6630         constant.
6631
6632 Fri May 28 18:22:45 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6633
6634         * parse.y (lookup_field_wrapper): Unified returned value to NULL
6635           or the searched field decl.
6636
6637 Fri May 28 11:34:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6638
6639         * parse.y (fold_constant_for_init): Convert numerical constant
6640         values to the type of the assigned field.
6641
6642 Thu May 27 19:57:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6643
6644         * expr.c (lookup_field): Relaxed the test on class loading error
6645         detection.
6646         * parse.y (fold_constant_for_init): Enabeled old code.
6647
6648 Wed May 26 18:06:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6649
6650         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
6651         decide the validity of the cast of a java.lang.Cloneable reference
6652         to an array.
6653         (patch_conditional_expr): Fixed first argument passed to
6654         binary_numeric_promotion.
6655
6656 Wed May 26 15:33:06 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6657
6658         * parse.y (qualify_ambiguous_name): Take into account that a
6659         CONVERT_EXPR might specify a type as a WFL.
6660
6661 Tue May 25 15:06:13 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6662
6663         * parse.y (patch_assignment): Save the rhs before using it as an
6664         argument to _Jv_CheckArrayStore.
6665
6666 Tue May 25 11:23:59 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6667
6668         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
6669
6670 Mon May 24 13:26:00 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6671
6672         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
6673         floating point litteral only when the exponent indicator has been
6674         parsed.
6675
6676 Sat May 22 13:54:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6677
6678         * parse.y (formal_parameter:): Construct argument tree list
6679         element even if a yet unsupported final parameter was encountered.
6680
6681 Tue May 18 00:28:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6682
6683         * parse.y (finish_method_declaration): Issue errors for native or
6684         abstract methods declared with a method body, as well as for non
6685         native or non abstract methods with no method body.
6686
6687 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6688
6689         * class.c (build_utf8_ref): Initialize variable `field'.
6690
6691         * decl.c (init_decl_processing): Initialize variable `field'.
6692
6693         * expr.c (build_known_method_ref): Mark parameters `method_type',
6694         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
6695         (process_jvm_instruction): Likewise for parameter `length'.
6696
6697         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
6698         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
6699         ATTRIBUTE_UNUSED.
6700
6701         * parse.y (maybe_generate_clinit): Remove unused variable
6702         `has_non_primitive_fields'.
6703         (find_in_imports_on_demand): Initialize variables `node_to_use'
6704         and `cl'.
6705         (patch_binop): Likewise for variable `prom_type'.
6706         (patch_unaryop): Likewise for variable `prom_type'.
6707
6708         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
6709
6710         * xref.c (xref_table): Add missing initializer.
6711
6712 1999-05-14  Tom Tromey  <tromey@cygnus.com>
6713
6714         * java-except.h (struct eh_range): Removed unused `next' member.
6715         * verify.c (verify_jvm_instructions): Call check_nested_ranges
6716         after adding all exception handlers.  Sort exception ranges in
6717         order of start PC.
6718         (struct pc_index): New structure.
6719         (start_pc_cmp): New function.
6720         * except.c (add_handler): Return `void'.  Don't call link_handler;
6721         instead construct an ordinary linked list and do range
6722         coalescing.
6723         (check_nested_ranges): New function.
6724         (link_handler): Changed interface to allow merging of eh_ranges.
6725         Split overlapping ranges.  Return `void'.
6726
6727 Mon May 17 19:20:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6728
6729         * parse.y (constructor_block_end:): New rule, tagged <node>.
6730         (constructor_body:): Use `constructor_block_end' instead of
6731         `block_end'.
6732
6733 Mon May 17 18:01:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6734
6735         * parse.y (statement_nsi:): Pop `for' statement block.
6736         (java_complete_lhs): Labeled blocks containing no statement are
6737         marked as completing normally.
6738
6739 Fri May 14 12:31:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6740
6741         * xref.c (xref_set_current_fp): New function, defined.
6742         * xref.h (xref_set_current_fp): New function, prototyped.
6743
6744 Fri May 14 11:57:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6745
6746         * check-init.c (check_init): Take into account that
6747         LABELED_BLOCK_STMT can be empty.
6748
6749 Thu May 13 18:30:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6750
6751         * parse.y (java_check_regular_methods): Warning check on not
6752         overriding methods with default access in other packages does not
6753         apply to `<clinit>'.
6754         (java_complete_lhs): If block body is an empty_stmt_node, replace
6755         it by NULL_TREE. This prevents gcc from generating an irrelevant
6756         warning.
6757
6758 Thu May 13 13:23:38 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6759
6760         * check-init.c (check_init): Removed code accepting to see things
6761         falling through default:, when doing xrefs.
6762         * java-tree.h (do_not_fold): New global variable, declared.
6763         * parse.y (do_not_fold): New global variable, defined.
6764         (java_complete_expand_method): Set `do_not_fold' to the value of
6765         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
6766         and reinstall them after them have been purged; do not check for
6767         initializations; do not issue missing return errors.
6768         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
6769         when doing xrefs.
6770         (patch_binop): Skip the fold part when doing xrefs.
6771         (build_string_concatenation): Skip the concatenation part when
6772         doing xrefs.
6773         (patch_synchronized_statement): Do not generate a try-finally when
6774         doing xrefs.
6775         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
6776         and keep the location where the throw was seen.
6777         * typeck.c (convert): When `do_not_fold' is set, do not attempt
6778         any treatment on the converted node an simply return a NOP_EXPR of
6779         the targeted type.
6780         * xref.c (xref_get_data): New function, defined.
6781         * xref.h (xref_get_data): New function, declared.
6782         (XREF_GET_DATA): Use xref_get_data.
6783
6784 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6785
6786         * gjavah.c (print_include): Cast the result of `strlen' to int
6787         when comparing against a signed value.
6788         (add_namelet): Likewise.
6789
6790 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6791
6792         * expr.c (expand_invoke): Mark parameter `nargs' with
6793         ATTRIBUTE_UNUSED.
6794         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
6795
6796         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
6797         ATTRIBUTE_UNUSED.
6798
6799         * jcf-reader.c (get_attribute): Cast a value to long
6800         when comparing against a signed expression.  Likewise.
6801
6802         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
6803         HOST_BITS_PER_CHAR.
6804
6805 1999-05-11  Andrew Haley  <aph@cygnus.com>
6806
6807         * parse.y (source_end_java_method): If the current method contains
6808         any exception handlers, force asynchronous_exceptions: this is
6809         necessary because signal handlers in libjava may throw exceptions.
6810         * decl.c (end_java_method): Ditto.
6811
6812 1999-05-11  Tom Tromey  <tromey@cygnus.com>
6813
6814         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
6815         flags.
6816         * jvspec.c (THREAD_NAME): Removed.
6817         (GC_NAME): Likewise.
6818         (MATHLIB): Likewise.
6819         (WITHLIBC): Likewise.
6820         (GCLIB): Likewise.
6821         (THREADLIB): Likewise.
6822         (MATH_LIBRARY): Likewise.
6823         (lang_specific_driver): Don't add `-l' options to command line.
6824         Instead, add a single --specs option.  Recognize `-L' options and
6825         use them to search for spec file.
6826         (find_spec_file): New function.
6827         (SPEC_FILE): New define.
6828
6829 Tue May 11 11:46:36 1999  Dave Brolley  <brolley@cygnus.com>
6830
6831         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
6832         cpplib-enabled build.
6833
6834 1999-05-05  Per Bothner  <bothner@cygnus.com>
6835
6836         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
6837         temporarily zero it while calling rest_of_decl_compilation.
6838
6839         * java-tree.h (string_ptr_type_node):  Add declaration.
6840         * decl.c:  Define and initialize string_ptr_type_node.
6841         * parse.y (patch_string_cst):  Use string_ptr_type_node.
6842
6843         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
6844         * parse.y (for_statement):  Now unconditionally exit_block.
6845         (finish_labeled_statement):  No longer exit_block if for-loop.
6846         (patch_loop_statement):  Check harder if the loop is already labeled.
6847
6848         * parse.y (patch_initialized_static_field):  Removed function.
6849         (maybe_generate_clinit):  Removed special handling for interfaces.
6850         (java_complete_expand_methods):  Do a preliminary java_complete_tree
6851         on <clinit> to determine if it can be removed.
6852         (java_complete_expand_method):  Remove special handling for <clinit>.
6853         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
6854         optimize if we get back empty_stmt_node.
6855         For MODIFY_EXPR, re-do checking of static initializers.
6856         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
6857         For VAR_DECL, pass correct context.
6858
6859         * verify.c (verify_jvm_instructions):  Better error messages.
6860
6861 1999-05-03  Tom Tromey  <tromey@cygnus.com>
6862
6863         * parse-scan.y (interface_declaration): Call
6864         report_class_declaration for interfaces.
6865
6866 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
6867
6868         * Makefile.in: Remove -v from bison command lines.
6869
6870 Fri Apr 30 17:54:40 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6871
6872         * check-init.c (check_init): Exclude a case of error when doing
6873         xrefs.
6874         * class.c (layout_class_method): Don't generate the error message
6875         twice when compiling from source.
6876         * lang-options.h: Added `-Wredundant-modifers' and
6877         `-Wunusupported-jdk11' flags and help text.
6878         * lang.c (lang_decode_option): Added support for
6879         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
6880         flag_static_local_jdk11 and flag_redundant set accordingly.
6881         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
6882         * parse.h (EXPR_WFL_ADD_COL): New macro.
6883         (DECL_END_SOURCE_LINE): Likewise.
6884         (DECL_INHERITED_SOURCE_LINE): Likewise.
6885         * parse.y (static_ref_err): New function, prototyped.
6886         (CCB_TK): Now tagged <operator>.
6887         (class_body:): Remember the location of the closing '}' of a class
6888         definition when doing xrefs.
6889         (block:): Likewise.
6890         (block_end:): Likewise.
6891         (create_class): Remember the location of the inherited class
6892         identifier when doing xrefs.
6893         (register_fields): Added test on first operand of `init' before
6894         testing it TREE_CODE.
6895         (method_header): Store the location of the class identifier in the
6896         class decl when doing xrefs.
6897         (finish_method_declaration): Don't combine first/last method line
6898         when doing xref.
6899         (java_check_regular_methods): Warning check on not overriding
6900         methods with default access on other packages move before check on
6901         static methods. Initialization of `aflags' also moved up.
6902         (resolve_expression_name): Call static_ref_err to report the error.
6903         (static_ref_err): New function, implemented.
6904         (resolve_field_access): Returned simplified static field access
6905         when doing xrefs.
6906         (resolve_qualified_expression_name): Check for illegal use of
6907         static fields in a non static context. Call static_ref_err to
6908         report error in various places.
6909         (java_complete_tree): Do not fold initialized static fields when
6910         doing xrefs.
6911         (java_complete_lhs): Likewise.
6912
6913 1999-04-29  Anthony Green  <green@cygnus.com>
6914
6915         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
6916         create internal labels.
6917         (lookup_label): Ditto.
6918
6919 Sat Apr 24 16:50:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6920
6921         * class.c (layout_class_method): Generate <clinit>'s rtl for
6922         interfaces.
6923         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
6924         for interfaces' <clinit>.
6925         * expr.c (lookup_field): Search for fields in interfaces.
6926         (expand_invoke): Fixed indentation.
6927         (expand_java_field_op): Likewise. Use IS_CLINIT.
6928         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
6929         (IS_CLINIT): New macro.
6930         * parse.y (type_declaration:): Call maybe_generate_clinit after an
6931         interface was parsed.
6932         (maybe_generate_clinit): Don't generate if the current class is an
6933         interface with only fields of primitive types.
6934         (reset_method_name): Use IS_CLINIT.
6935         (java_complete_expand_method): Expand <clinit> when it exists for
6936         interfaces. Use IS_CLINIT.
6937         (resolve_expression_name): Use DECL_CONTEXT instead of
6938         current_class to build static field references.
6939         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
6940         ARRAY_REF when doing xreferencing.
6941         (check_final_assignment): Fixed typo in leading comment. Use
6942         IS_CLINIT.
6943         (patch_array_ref): Don't fully expand array references when
6944         xreferencing.
6945         (patch_return): Use IS_CLINIT.
6946         (patch_throw_statement): Likewise.
6947
6948 1999-04-22  Tom Tromey  <tromey@cygnus.com>
6949
6950         * Make-lang.in (JAVA_SRCS): Added check-init.c.
6951
6952 Wed Apr 21 11:13:36 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6953
6954         * decl.c (predef_filenames, predef_filenames_size): New globals
6955         (init_decl_processing): predef_filenames and predef_filenames_size
6956         initialized.
6957         * java-tree.h (predef_filenames, predef_filenames_size): Declared
6958         extern.
6959         * jcf-parse.c (predefined_filename_p): New function.
6960         (yyparse): Check that files on the command line are specified only
6961         once and issue a warning otherwise.
6962         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
6963         * parse.y (source_end_java_method): Nullify NOP method bodies, to
6964         avoid a gcc warning with -W -Wall turned on.
6965         (java_expand_classes): Abort if errors were encountered.
6966         (java_complete_lhs): If the cross reference flag is set, wrap
6967         field DECL node around a WFL when resolving expression name.
6968
6969 Mon Apr 19 14:44:48 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6970
6971         * lang.c (lang_decode_option): Fixed returned value when parsing
6972         `-fxref=...' and `-Wall'.
6973         * parse.y (source_end_java_method): Do not generate code when
6974         flag_emit_xref is set.
6975         (resolve_expression_name): Do not build static field access when
6976         flag_emit_xref is set.
6977         (resolve_field_access): No special treatment on `length' when
6978         flag_emit_xref is set. Do not build qualified static field access
6979         when flag_emit_xref is set.
6980         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
6981         when flag_emit_xref is set.
6982         (patch_assignment): Do not generate array store runtime check when
6983         flag_emit_xref is set.
6984         * xref.c (xref_flag_value): Fixed function declaration
6985         indentation.
6986         (xset_set_data): New function.
6987         * xref.h (xref_set_data): Added prototype for new function.
6988         (typedef struct xref_flag_table): New field data.
6989         (XREF_GET_DATA): New macro.
6990
6991 1999-04-19  Tom Tromey  <tromey@cygnus.com>
6992
6993         * xref.h (enum): Removed trailing comma.
6994
6995         * parse.y (resolve_qualified_expression_name): Added missing
6996         `break'.
6997
6998 Thu Apr 15 13:08:03 1999  Anthony Green  <green@cygnus.com>
6999
7000         * gjavah.c: New prototypes for java_float_finite and
7001         java_double_finite.
7002
7003 Mon Apr 12 18:27:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7004
7005         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
7006         references.
7007
7008 Tue Apr  6 23:15:52 1999  Jeffrey A Law  (law@cygnus.com)
7009
7010         * Makefile.in (TREE_H): Add tree-check.h.
7011         (RTL_H): Add genrtl.h.
7012
7013 Tue Apr  6 15:15:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7014
7015         * parse.y (patch_assignment): Added ArrayStoreException runtime
7016         check.
7017
7018 1999-04-06  Per Bothner  <bothner@cygnus.com>
7019
7020         * expr.c (pop_type_0):  New function.
7021         (pop_type):  Use pop_type_0.
7022         * java-tree.h (pop_type_0):  New declaration.
7023         * verify.c (verify_jvm_instructions):  Check return instructions.
7024
7025         * parse.y (patch_binop):  Don't fold if non-constant and emiting
7026         class files.
7027
7028 Mon Apr  5 16:06:09 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7029
7030         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
7031
7032         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
7033         (main_jcf): Don't define.
7034         (process_file): Don't set `main_jcf'.
7035
7036         * java-tree.h (main_jcf): Don't declare.
7037
7038         * jcf-parse.c (main_jcf): Add static definition.
7039
7040         * lang.c (main_jcf): Don't define.
7041
7042 Mon Apr  5 15:43:51 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7043
7044         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
7045
7046         * decl.c (copy_lang_decl): Likewise for `bcopy'.
7047
7048         * jcf-depend.c: Include "config.h", not <config.h>.
7049
7050         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
7051         `bcopy' to PTR.
7052
7053         * jcf-path.c: Include "config.h", not <config.h>.
7054
7055         * lex.c: Don't include various system header files.
7056         (java_init_lex): Cast the argument of `bzero' to PTR
7057
7058         * parse-scan.y (java_push_parser_context): Likewise.
7059
7060         * parse.y (java_push_parser_context): Likewise.
7061         (patch_bc_statement): Match format specifier to variable argument.
7062
7063         * xref.c: Don't include <stdio.h>.
7064
7065 Mon Apr  5 11:24:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7066
7067         * parse.y (struct parser_ctxt *ctxp): Now global.
7068         (declare_local_variables): Use WFL compound value for the
7069         declaration source line value, when doing cross-referencing.
7070
7071 1999-03-31  Tom Tromey  <tromey@cygnus.com>
7072
7073         * gjavah.c (print_field_info): Allow constants of other types.
7074         (print_include): Generate include when new name is proper prefix
7075         of already printed name.
7076         (add_namelet): Likewise.
7077         (cxx_keyword_subst): New function.
7078         (print_method_info): Use it.
7079         (print_field_name): New function.
7080         (get_field_name): New function.
7081         (print_field_info): Use get_field_name and print_field_name.
7082
7083 Wed Mar 31 11:00:32 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7084
7085         * Makefile.in (keyword.h): Generate using gperf language 'C', not
7086         'KR-C', so gperf uses the `const' keyword on strings.
7087
7088         * keyword.gperf (java_keyword): Const-ify a char*.
7089
7090 Tue Mar 30 11:31:53 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7091
7092         * parse.y (patch_bc_statement): Fixed identation and a bogus
7093         `printf' format.
7094
7095 Tue Mar 30 11:29:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7096
7097         * parse.y (patch_assignment): Allow static variables in other
7098         classes to be assigned.
7099
7100 Sun Mar 28 22:12:10 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7101
7102         * class.c (maybe_add_interface): Remove unused variable
7103         `interface_binfo'.
7104         (make_class_data): Use = for assignment, not ==.  Likewise.
7105         (emit_register_classes): Remove unused variable `decl'.
7106
7107         * lex.c: Fix comment so as not to contain an embedded `/*'.
7108
7109         * verify.c (verify_jvm_instructions): Remove unused variable
7110         `self_type'.
7111
7112 Sat Mar 27 15:49:18 1999  Per Bothner  <bothner@cygnus.com>
7113
7114         * parse.y (complete_loop_body):  Rename to finish_loop_body.
7115         (complete_labeled_statement):  Rename to finish_labeled_statement.
7116         (complete_for_loop):  Rename to finish_for_loop.
7117         (complete_method_declaration):  Rename to finish_method_declaration.
7118
7119         * java-tree.h (continue_identifier_node):  New global node.
7120         * decl.c:  Define and initialize continue_identifier_node.
7121         * parse.y (generate_labeled_block):  Remove - no longer needed.
7122         (build_loop_body):  Use continue_identifier_node for continue block.
7123         (finish_labeled_statement):  Also do pop_labeled_block actions.
7124         (java_complete_lhs):  POP_LOOP even if error.
7125         (build_labeled_block):  Special handling for continue_identifier_node.
7126         (patch_loop_statement):  Re-organize.
7127         (patch_bc_statement):  Re-write.
7128
7129 Sat Mar 27 15:13:21 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7130
7131         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
7132         using a WFL compound value.
7133         * parse.y (xref.h): Include.
7134         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
7135         WFL compound value.
7136         (register_fields): Set WFL compound value to lineno if doing
7137         xrefs.
7138         (java_complete_expand_method): Call expand_xref if flag_emit_xref
7139         is set.
7140         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
7141         * xref.h (expand_xref): Prototype renamed from xref_generate.
7142
7143 Sat Mar 27 14:16:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7144
7145         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
7146         (GET_CURRENT_BLOCK): New macro.
7147         * parse.y (current_static_block): New global variable.
7148         (method_body:): Define action.
7149         (complete_method_declaration): Set current_function_decl to NULL
7150         when work on the current method is done.
7151         (declare_local_variables): Use GET_CURRENT_BLOCK.
7152         (java_method_add_stmt): Likewise.
7153         (java_complete_expand_method): Disable the use of `this' when
7154         expanding <clinit>.
7155         (enter_a_block): If no current method exist, use
7156         current_static_block to link static initializer blocks.
7157         (exit_block): Rewritten to use current_static_block when no current
7158         method decl exists.
7159         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
7160         (patch_return): Forbid the use of `return' in static initializers.
7161         (patch_throw_statement): Fixed indentation. Issue specific error
7162         for uncaught thrown checked exception in static initializer
7163         blocks. Removed FIXME.
7164
7165 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
7166
7167         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
7168         Link gcj from gcc.o.
7169
7170 Tue Mar 23 10:48:24 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7171
7172         * parse.y (find_applicable_accessible_methods_list): When dealing
7173         with interface: ensure that a given interface or java.lang.Object
7174         are searched only once.
7175
7176 Tue Mar 23 10:05:27 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7177
7178         * gjavah.c (print_c_decl): Remove unused argument `flags'.
7179
7180         * jcf-dump.c (print_access_flags): Add braces around if-else.
7181
7182         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
7183         COMBINE_INPUTS.
7184
7185         * lex.c (build_wfl_node): Add static prototype.
7186
7187         * lex.h (build_wfl_node): Remove static prototype.
7188
7189         * parse.y: Include lex.c early enough to declare everything needed.
7190         Ensure calls to `build_wfl_node' pass the proper arguments.
7191         (create_class): Remove unused variable `super_decl'.
7192         (get_printable_method_name): Initialize variable `name'.
7193
7194 Mon Mar 22 20:14:26 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7195
7196         * Changelog: Fixed 1999-03-22 typos.
7197         * lang.c (lang_decode_option): Fixed typo in error string in the
7198         XARG section.
7199
7200 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7201
7202         * Makefile.in (JAVA_OBJS): Added entry xref.o.
7203         (xref.o): New rule.
7204         * java-tree.h (flag_emit_xref): Declared extern.
7205         * lang.c (xref.h): Included.
7206         (flag_emit_xref): New global variable.
7207         (lang_decode_option): Added support for -fxref.
7208         * xref.c: Created.
7209         * xref.h: Likewise.
7210
7211 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
7212
7213         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
7214         linked with.
7215
7216 Sun Mar 21 08:30:30 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7217
7218         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
7219         $(srcdir)/../system.h and $(JAVA_TREE_H).
7220         (jcf-io.o): Depend on $(JAVA_TREE_H).
7221         (mangle.o): Likewise.
7222
7223         * check-init.c (check_cond_init): Add static prototype.
7224
7225         * class.c (build_java_method_type, hashUtf8String,
7226         make_field_value, get_dispatch_vector, get_dispatch_table,
7227         append_gpp_mangled_type, mangle_static_field): Likewise.
7228         (strLengthUtf8): Hide unused definition.
7229         (hashUtf8String): Const-ify.
7230         (make_field_value): Un-ANSI-fy.
7231
7232         * constants.c: Move inclusion of jcf.h above java-tree.h.
7233         (set_constant_entry, find_class_or_string_constant,
7234         find_name_and_type_constant, get_tag_node,
7235         build_constant_data_ref): Add static prototype.
7236
7237         * decl.c (push_jvm_slot, builtin_function,
7238         lookup_name_current_level): Likewise.
7239         (builtin_function): Const-ify.
7240
7241         * except.c (expand_start_java_handler, expand_end_java_handler):
7242         Add static prototype.
7243
7244         * expr.c (flush_quick_stack, push_value, pop_value,
7245         java_stack_swap, java_stack_dup, build_java_athrow,
7246         build_java_jsr, build_java_ret, expand_java_multianewarray,
7247         expand_java_arraystore, expand_java_arrayload,
7248         expand_java_array_length, build_java_monitor, expand_java_pushc,
7249         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
7250         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
7251         expand_compare, expand_test, expand_cond, expand_java_goto,
7252         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
7253         expand_java_field_op, java_push_constant_from_pool): Likewise.
7254
7255         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
7256         (build_java_arraynull_check): Mark parameters `node' and `type'
7257         with ATTRIBUTE_UNUSED.
7258         (note_label): Likewise for parameter `current_pc'.
7259         (expand_java_call, expand_java_ret): Hide unused definition.
7260
7261         * java-tree.h (make_class, build_constants_constructor,
7262         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
7263         init_outgoing_cpool, register_class, emit_register_classes,
7264         java_layout_seen_class_methods): Prototype.
7265         (unicode_mangling_length): Const-ify.
7266         (append_gpp_mangled_name, append_gpp_mangled_classtype,
7267         emit_unicode_mangled_name, format_int, format_uint,
7268         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
7269         jcf_print_utf8_replace, open_class): Prototype.
7270
7271         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
7272         <stdio.h>.  Include tree.h/java-tree.h.
7273         (utf8_equal_string usage, process_class): Add static prototype.
7274         (open_class): Don't prototype this here.
7275         (utf8_equal_string): Match arguments to format specifiers.
7276         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
7277         TABLE_SWITCH, disassemble_method): Likewise.
7278
7279         * jcf-io.c: Include tree.h/java-tree.h.
7280         (open_class, find_classfile, jcf_print_utf8,
7281         jcf_print_utf8_replace): Const-ify.
7282
7283         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
7284         parse_class_file): Add static prototype.
7285         (find_in_current_zip): Match definition to existing static
7286         prototype.
7287
7288         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
7289         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
7290         finish_jcf_block, define_jcf_label, get_jcf_label_here,
7291         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
7292         write_chunks, adjust_typed_op, generate_bytecode_conditional,
7293         generate_bytecode_return, perform_relocations, init_jcf_state,
7294         init_jcf_method, release_jcf_state, generate_classfile):
7295         Add static prototype.
7296         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
7297         (make_class_file_name): Const-ify.
7298
7299         * jcf.h (find_classfile): Const-ify.
7300
7301         * jv-scan.c (reset_report): Remove prototype.
7302
7303         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
7304         (error): Rewrite to allow varargs.
7305
7306         * lang.c (lang_f_options): Const-ify.
7307
7308         * lex.c (java_parse_escape_sequence): Add static prototype.
7309         (java_allocate_new_line): Match definition to existing static
7310         prototype.
7311
7312         * mangle.c Include tree.h/java-tree.h.
7313         (unicode_mangling_length, emit_unicode_mangled_name,
7314         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
7315
7316         * parse.h (jdep_code): Remove trailing comma in enumeration.
7317         (java_get_line_col): Move prototype outside of !JC1_LITE test.
7318         (reset_report): Add prototype.
7319
7320         * verify.c (push_pending_label, merge_types): Add static
7321         prototypes.
7322
7323         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
7324
7325 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7326
7327         * parse.y (find_applicable_accessible_methods_list): Extend the
7328         search to superinterfaces when relevant.
7329         (search_applicable_methods_list): New function.
7330
7331 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7332
7333         * class.c (unmangle_classname): Implemented stricter testing
7334         before setting the QUALIFIED_P flag on an identifier.
7335
7336 Tue Mar 16 15:15:41 1999  Per Bothner  <bothner@cygnus.com>
7337
7338         * parse.y (java_complete_lhs):  Call force_evaluation_order
7339         after patch_newarray.
7340         (patch_binop):  Don't call fold if there are side effects.
7341
7342 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7343
7344         * parse.y (java_stabilize_reference): Use save_expr instead of
7345         building a SAVE_EXPR node.
7346         (java_complete_lhs): Patch the resulting string of the `+='
7347         operator (if necessary) and complete the RHS after having built
7348         the cast.
7349
7350 Mon Mar 15 12:18:29 1999  Per Bothner  <bothner@cygnus.com>
7351
7352         * class.c (make_class):  Don't set CLASS_P here (because
7353         this function is also called by build_java_array_type).
7354         (push_class):  Set CLASS_P here instead.
7355         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
7356
7357         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
7358         context.  If the context is class, perfer "super" over "synchronized".
7359         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
7360
7361         * parse.y (create_class):  Don't call parser_check_super here;
7362         it is not robust.  Always wait until later.
7363
7364         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
7365         match what JDK 1.2 does), but don't set ACC_PUBLIC.
7366
7367 Sat Mar 13 18:16:34 1999  Per Bothner  <bothner@cygnus.com>
7368
7369         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
7370         * lex.h (UNGETC):  Change misleading macro.
7371
7372 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7373
7374         * parse.y (java_stabilize_reference): Return NODE when patching a
7375         COMPOUND_EXPR.
7376         (java_complete_lhs): Put parenthesis around truth values.
7377
7378 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7379
7380         * class.c (layout_class_method): Don't make rtl for interface
7381         methods.
7382         * parse.h (GET_TYPE_NAME): New macro.
7383         * parse.y (if_then_statement:): Fixed indentation.
7384         (if_then_else_statement:): Likewise.
7385         (for_statement:): Fixed spacing.
7386         (try_statement:): Fixed indentation.
7387         (create_interface): Don't force interfaces to be abstract.
7388         (method_header): Abstract methods are OK in interfaces.
7389         (declare_local_variables): Fixed typo in comment.
7390         (java_complete_expand_method): Fixed indentation.
7391         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
7392         non accessible fields.
7393         (java_stabilize_reference): New function.
7394         (java_complete_lhs): Fixed indentation. Use
7395         java_stabilize_reference in compound assignement. Insert the
7396         cast. If not processing `+' fix string constants before processing
7397         binop.
7398
7399 Fri Mar 12 19:42:55 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7400
7401         * constants.c (find_class_or_string_constant): Cast variable `j'
7402         to a `jword' when comparing against one.
7403
7404         * expr.c (java_lang_expand_expr): Remove unused variables
7405         `has_finally_p' and `op0'.
7406
7407         * gjavah.c (print_field_info): Cast a value to jint when comparing
7408         against one.  Likewise for a jlong.
7409         (add_namelet): Likewise cast a `sizeof' to an int when comparing
7410         against a signed quantity.
7411
7412         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
7413         (print_signature): Don't needlessly dereference variable `str'
7414
7415         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
7416         `max_locals' with ATTRIBUTE_UNUSED.
7417         (jcf_parse_class): Likewise for variable `index'.
7418
7419         * parse.h (reverse_jdep_list): Remove static prototype.
7420
7421         * parse.y (build_jump_to_finally): Remove prototype and definition.
7422         (reverse_jdep_list): Add static prototype.
7423
7424         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
7425         `assignment' and `expr_decl'.
7426
7427         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
7428
7429 1999-03-12  Andrew Haley  <aph@cygnus.com>
7430
7431         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
7432         we'll need a directory separator and a null character.
7433
7434 Wed Mar 10 23:20:11 1999  Per Bothner  <bothner@cygnus.com>
7435
7436         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
7437
7438   Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7439
7440         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
7441         interfaces.
7442
7443 Fri Mar  5 15:17:29 1999  Per Bothner  <bothner@cygnus.com>
7444
7445         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
7446
7447         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
7448
7449         * class.c (layout_class_method):  A static method in a base class
7450         is never overridden, so treat it like it doesn't exist.
7451         However, do complain about private non-static method overriding
7452         public static method.
7453
7454         * parse.y:  Don't set unused INITIALIZED_P flag.
7455         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
7456
7457         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
7458         (build_array_from_name):  Re-order &index[string] to &string[index].
7459
7460         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
7461         error_mark (it might catch more errors, but it is more likely to lose).
7462
7463 Sat Mar  6 11:17:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7464
7465         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
7466         (parse-scan.o): Depend on toplev.h.
7467
7468         * class.c (make_method_value): Add prototype.  Make it static.
7469         Remove unused second argument, caller changed.
7470
7471         * expr.c (java_lang_expand_expr): Remove unused variable
7472         `return_label'.
7473
7474         * java-tree.h: Don't prototype find_in_current_zip.
7475         Add prototypes for verify_constant_pool, start_java_method,
7476         end_java_method, give_name_to_locals, expand_byte_code,
7477         open_in_zip, set_constant_value, find_constant1, find_constant2,
7478         find_utf8_constant, find_string_constant, find_class_constant,
7479         find_fieldref_index, find_methodref_index, write_constant_pool,
7480         count_constant_pool_bytes and encode_newarray_type.
7481
7482         * jcf-dump.c: Remove unused variable `LONG_temp'.
7483
7484         * jcf-parse.c: Include parse.h.
7485         (jcf_parse_source): Remove unused parameter, all callers changed.
7486         (jcf_figure_file_type): Add static prototype.
7487         (find_in_current_zip): Likewise.  Also remove unused parameter,
7488         all callers changed.
7489         (read_class): Initialize variable `saved_pos'.
7490
7491         * jcf-reader.c (jcf_parse_preamble): Mark variables
7492         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
7493
7494         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
7495         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
7496         (java_parse_doc_section): Initialize variable `seen_star'.
7497         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
7498         (java_lex_error): Mark parameters `msg' and `forward' with
7499         ATTRIBUTE_UNUSED.
7500         (java_get_line_col): Mark parameters `filename' and `line' with
7501         ATTRIBUTE_UNUSED.
7502
7503         * parse-scan.y: Include toplev.h.
7504         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
7505
7506         * parse.h: use `struct JCF', not plain `JCF'.
7507         (java_parser_context_save_global, java_expand_classes
7508         java_parser_context_restore_global, java_parse): Add prototypes.
7509
7510         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
7511         `node'.
7512
7513 Wed Feb 24 16:13:59 1999  Per Bothner  <bothner@deneb.cygnus.com>
7514
7515         *  check-init.c (check_init):  COPYN takes word count, not bit count.
7516
7517 Fri Feb 26 14:06:21 1999  Per Bothner  <bothner@cygnus.com>
7518
7519         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
7520         explicit build_decl.  (Avoids crash in reload when optimizing.)
7521
7522 Thu Feb 25 21:05:04 1999  Per Bothner  <bothner@cygnus.com>
7523
7524         * decl.c (complete_start_java_method):  Handle synchronized method
7525         even when compiling from bytecode.
7526
7527 1999-02-26  Tom Tromey  <tromey@cygnus.com>
7528
7529         * gjavah.c (add_class_decl): Only generate `#include' if outer
7530         class is not the name of the class we are processing.  Correctly
7531         append `.h' in #include.
7532         (process_file): Clean up newlines around generated `#include's.
7533         (decode_signature_piece): Correctly handle inner classes.
7534         (struct include): New structure.
7535         (all_includes): New global.
7536         (print_include): New function.
7537         (add_class_decl): Use it.
7538         (process_file): Likewise.
7539         (add_class_decl): Generate include for java-array.h if array
7540         seen.
7541         (process_file): Don't generate java-array.h include.
7542
7543         * gjavah.c (add_namelet): Check for standard package names here.
7544         (add_class_decl): Don't check for standard package names here.
7545
7546 1999-02-25  Tom Tromey  <tromey@cygnus.com>
7547
7548         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
7549         When reading a zip file, only use strncmp if both strings are
7550         bigger than the buffer length.  Initialize `k' when looping
7551         through zip file.
7552
7553 1999-02-24  Tom Tromey  <tromey@cygnus.com>
7554
7555         * gjavah.c (struct namelet): New structure.
7556         (add_namelet): New function.
7557         (print_namelet): New function.
7558         (print_class_decls): Use add_namelet and print_namelet to generate
7559         namespaces and not classes.
7560         (method_printed): New global.
7561         (HANDLE_END_METHOD): Examine method_printed.
7562         (print_method_info): Set method_printed when required.  Print
7563         error if function to be ignored is marked virtual.  Handle $finit$
7564         method.
7565         (METHOD_IS_FINAL): New macro.
7566         (print_field_info): Use it.
7567         (HANDLE_METHOD): Clear method_printed.
7568         (method_pass): New global.
7569         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
7570         (process_file): Do two passes over both fields and methods.
7571         (HANDLE_METHOD): Examine method_pass.
7572         (root): New global.
7573         (add_class_decl): New function.
7574         (print_class_decls): Don't scan over entire constant pool.
7575
7576 1999-02-23  Tom Tromey  <tromey@cygnus.com>
7577
7578         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
7579         disable linking in that case.
7580
7581 1999-02-20  Tom Tromey  <tromey@cygnus.com>
7582
7583         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
7584         not 0x1f.
7585
7586 Sun Feb 21 14:56:11 1999  Per Bothner  <bothner@cygnus.com>
7587
7588         * decl.c (build_result_decl), java-tree.h:  New method.
7589         (complete_start_java_method):  Handle synchronized methods.
7590         Don't build DECL_RESULT here.  (Ordering dependency problem.)
7591         (start_java_method):  Call build_result_decl here instead  ...
7592         * parse.y (java_complete_expand_method):  ... and here.
7593         (expand_start_java_method): Don't call complete_start_java_method here.
7594         (java_complete_expand_method):  Call it here instead.
7595         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
7596         * java-tree.h:  ... here.
7597
7598         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
7599         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
7600         for ARRAY_REF - it doesn't work when array bounds are checked.
7601         (patch_array_ref):  Handle it here instead.
7602
7603         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
7604
7605 Fri Feb 19 15:35:01 1999  Per Bothner  <bothner@cygnus.com>
7606
7607         Force left-to-right evaluation of binary operations etc.
7608         * expr.c (force_evaluation_order), java-tree.h:  New function.
7609         * parse.y (java_complete_lhs):  Pass binary operations, procedure
7610         calls, and ARRAY_REFs to force_evaluation_order.
7611         (various):  Set TREE_SIDE_EFFECTS more carefully.
7612
7613         Tolerate random (non-UTF8) encoding in comments without complaining.
7614         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
7615         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
7616
7617         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
7618         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
7619
7620         * parse.y (java_complete_lhs):  Ignore an empty statement in a
7621         COMPOUND_EXPR.  Don't complain about empty statement after return.
7622
7623 Fri Feb 19 13:00:56 1999  Per Bothner  <bothner@cygnus.com>
7624
7625         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
7626         in TREE_LIST - just chain the POINTER_TYPEs together.
7627         (resolve_class):  If type already resolved, return decl.
7628         After resolving, update TREE_TYPE(class_type), and name (if array).
7629         * parse.h (do_resolve_class), parse.y:  Make non-static.
7630         * class.c (maybe_layout_super_class):  Take this_class argument.
7631         Do do_resolve_class if necessary.
7632         (layout_class, layout_class_methods): Adjust calls appropriately.
7633         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
7634         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
7635         * typeck.c (build_java_array_type):  Don't call layout_class.
7636
7637 Wed Feb 17 15:47:20 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7638
7639         * parse.y (check_pkg_class_access): Allow private class access
7640         within the same package.
7641         (strip_out_static_field_access_decl): New function.
7642         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
7643         operator argument before testing its nature.
7644
7645 Wed Feb  3 12:38:43 1999  Per Bothner  <bothner@cygnus.com>
7646
7647         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
7648         (TRY_EXPR):  Simplify - it no longer has a finally clause.
7649         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
7650         Simpler handling of TRY_EXPR, which no longer has a finally clause.
7651         * expr.c (java_lang_expand_expr):  Likewise.
7652         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
7653         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
7654         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
7655         (build_try_statement):  Remove finally parameter and handling.
7656         (build_try_finally_statement):  New function.
7657         (patch_try_statement):   No longer need to support finally clause.
7658         (try_statement):  Update grammar action rules.
7659         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
7660         Simpler handling of TRY_EXPR, which no longer has a finally clause.
7661
7662 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
7663
7664         * jcf-parse.c (get_constant): Add braces around computation of 'd'
7665         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
7666
7667 1999-02-17  Andrew Haley  <aph@cygnus.com>
7668
7669         * class.c (build_utf8_ref): Back out broken patch which was
7670         intended to to output signatures using '.' as a separator.
7671
7672         * class.c (make_class_data): Output signatures using '.' as a
7673         separator, rather than '/'.
7674         (mangled_classname): Likewise.
7675         (make_field_value): Likewise.
7676         (make_method_value): Likewise.
7677         * constants.c (alloc_class_constant): Likewise.
7678         * expr.c (build_invokeinterface): Likewise.
7679
7680 Thu Feb 11 21:25:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7681
7682         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
7683         of an ancient workaround.
7684
7685 Wed Feb 10 23:27:33 1999  Jeffrey A Law  (law@cygnus.com)
7686
7687         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
7688         here anymore.
7689
7690 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7691
7692         * lex.c (yylex): Encode \0 as UTF8.
7693
7694 1999-02-10  Tom Tromey  <tromey@cygnus.com>
7695
7696         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
7697         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
7698         (libgcj_zip): Renamed.
7699         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
7700         LIBJAVA_ZIP_FILE.
7701         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
7702
7703         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
7704         (GC_NAME): Renamed -lgc to -lgcjgc.
7705
7706 Tue Feb  9 19:31:09 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7707
7708         * lex.c (java_lang_cloneable): Initialize.
7709         * parse.y (java_lang_cloneable): New static variable.
7710         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
7711         doing one more qualification round.
7712         (valid_ref_assignconv_cast_p): Reject null source or
7713         destination. Allow an array to be cast into java.lang.Cloneable.
7714         (patch_cast): Swapped two first arguments to first call to
7715         valid_ref_assignconv_cast_p.
7716
7717 Mon Feb  8 11:50:50 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7718
7719         * parse.h: DECL_P renamed JDECL_P.
7720         * parse.y: DECL_P replaced by JDECL_P.
7721         (build_array_from_name): Always use pointer's type.
7722         (patch_bc_statement): Extra code to search continue target in a
7723         for loop. Fixed comments. Continue target is current loop when
7724         unlabeled.
7725
7726 1999-02-05  Andrew Haley  <aph@cygnus.com>
7727
7728         * class.c (make_class_data): The superclass of an interface should
7729         be null, not class Object.
7730
7731         * lex.c (java_lex): Sign extend hex literals.
7732
7733 1999-02-04  Andrew Haley  <aph@cygnus.com>
7734
7735         * class.c (build_utf8_ref): Output signatures using '.' as a
7736         separator, rather than '/'.
7737         (make_class_data): Likewise.
7738
7739 Wed Feb  3 22:50:17 1999  Marc Espie <Marc.Espie@liafa.jussieu.fr>
7740
7741         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
7742         mkstemp.o.  Get them from libiberty now.
7743
7744 Tue Feb  2 19:49:12 1999  Jeffrey A Law  (law@cygnus.com)
7745
7746         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
7747
7748 Tue Feb  2 20:04:50 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7749
7750         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
7751         from libiberty.h
7752
7753 Tue Feb  2 10:39:47 1999  Per Bothner  <bothner@cygnus.com>
7754
7755         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
7756         * jcf-write.c (generate_bytecode_return):  New function.
7757         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
7758
7759         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
7760         generate special [fd]const_[01] instructions.
7761
7762         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
7763
7764         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
7765         handling OPCODE_lookupswitch or OPCODE_tableswitch.
7766
7767 Mon Feb  1 20:44:47 1999  Per Bothner  <bothner@cygnus.com>
7768
7769         * parse.y (patch_method_invocation):  Handle calling static methods,
7770         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
7771
7772         * parse.y (java_complete_lhs):  Don't complain about unreachable
7773         exit condition in a do-while statement.
7774
7775 Fri Jan 29 18:19:02 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7776
7777         * lex.c (java_read_char): Fixed utf8 decoding.
7778         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
7779         range.
7780         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
7781         comments. Local variable `all_primitive' is gone. Broadened
7782         acceptance of `0' to floating point targets. `long' can now be
7783         widened to `double' or `float'.
7784         (valid_method_invocation_conversion_p): Added leading
7785         comment. Fixed tabulation.
7786         (build_string_concatenation): Optimize out left or right empty
7787         string constants.
7788
7789 Thu Jan 28 18:51:26 1999  Per Bothner  <bothner@cygnus.com>
7790
7791         * jcf-write.c (localvar_alloc):  Only emit entry for
7792         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
7793         (generate_bytecode_insns):  Only call put_linenumber if
7794         debug_info_level > DINFO_LEVEL_NONE.
7795         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
7796         is specified, add -g1 (for compatibility wih javac).
7797
7798 Thu Jan 28 09:17:51 1999  Hans-Peter Nilsson  <hp@axis.se>
7799
7800         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
7801         gjavah.o, check-init.o, jv-scan.o
7802
7803 Mon Feb  1 09:50:48 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7804
7805         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
7806
7807         * gjavah.c: Include config.h and system.h.
7808
7809         * javaop.h (inline): Don't define, its handled by system.h.
7810         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
7811         from `inline' to `static inline'.
7812
7813         * jcf.h (inline): Don't define, its handled by system.h.
7814
7815         * lex.c (inline): Likewise.
7816
7817 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
7818
7819         * lang-specs.h: Map -Qn to -fno-ident.
7820
7821 Fri Jan 29 16:51:56 1999  Richard Henderson  <rth@cygnus.com>
7822
7823         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
7824
7825 1999-01-29  Tom Tromey  <tromey@cygnus.com>
7826
7827         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
7828         then cast it to Object before calling `append' method.
7829
7830 Thu Jan 28 14:45:39 1999  Per Bothner  <bothner@cygnus.com>
7831
7832         * check-init.c (check_bool2_init, check_bool_init, check_init):
7833         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
7834         * jcf-write.c (generate_bytecode_insns):  Likewise.
7835
7836 Thu Jan 28 11:50:11 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7837
7838         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
7839         * parse.y (patch_cast): Allow a boolean to be cast into a
7840         boolean.
7841
7842 Wed Jan 27 10:19:29 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7843
7844         * parse.y: (class_declaration:): Fixed indentation.
7845         (class_member_declaration:): Extra `;' after field declaration now
7846         accepted.
7847         (interface_declaration:): Removed debug messages in error reports.
7848         (patch_binop): Nodes created and returned inherit the orignal
7849         node's COMPOUND_ASSIGN_P flag value.
7850         (patch_cast): Fix cast from char to floating point.
7851
7852 Mon Jan 25 17:39:19 1999  Andrew Haley  <aph@cygnus.com>
7853
7854         * except.c, java-except.h (expand_resume_after_catch): new
7855         function.
7856         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
7857         to branch back to main flow of control after a catch block.
7858
7859 Sat Jan 23 23:02:43 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7860
7861         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
7862         $(srcdir)/../system.h.
7863         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
7864         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
7865         (jcf-write.o): Likewise.
7866         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
7867         (mangle.o): Depend on $(srcdir)/../toplev.h.
7868         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
7869         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
7870
7871         * class.c: Include output.h and parse.h.
7872         (mangled_classname): Add the `const' keyword to a char*.
7873         (find_named_method): Hide unused function definition.
7874         (build_utf8_ref): Change type of variable `c' to unsigned char.
7875         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
7876         (build_class_ref): Add the `const' keyword to a char*.
7877         (layout_class_method): Remove unused variable `buf'.
7878
7879         * decl.c (find_local_variable): Remove unused variable `rtl'.
7880         (pushdecl): Likewise for variables `different_binding_level' and
7881         `oldglobal'.
7882         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
7883         (maybe_build_cleanup): Likewise for parameter `decl'.
7884
7885         * except.c (expand_start_java_handler): Mark parameter `range'
7886         with ATTRIBUTE_UNUSED.
7887
7888         * expr.c: Include except.h.
7889         (pop_type): Remove unused variable `i'.
7890         (pop_value): Likewise for variables `n_words' and `i'.
7891         (expand_java_arrayload): Likewise for variable `convert'.
7892         (java_lang_expand_expr): Likewise for variables `op0', `type',
7893         `mode', `unsignedp', `node' and `elements'.
7894         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
7895         `eh_ranges'.
7896         (process_jvm_instruction): Add a `const' qualifier to a char*.
7897
7898         * gjavah.c (output_directory): Add the `const' keyword to a char*.
7899         (temp_directory): Likewise.
7900         (print_c_decl): Likewise.
7901         (print_method_info): Likewise.
7902         (decode_signature_piece): Likewise.
7903         (print_mangled_classname): Likewise.
7904
7905         * java-except.h: Provide prototypes for maybe_start_try,
7906         maybe_end_try and add_handler.
7907
7908         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
7909         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
7910         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
7911         init_expr_processing, push_super_field, init_class_processing,
7912         can_widen_reference_to, class_depth, verify_jvm_instructions,
7913         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
7914         set_local_type, merge_type_state, push_type, load_type_state,
7915         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
7916         emit_unicode_mangled_name): Add prototypes.
7917
7918         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
7919         (print_signature_type): Use ISDIGIT, not isdigit.
7920         (print_signature): Remove unused variable `j'.
7921
7922         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
7923         int when comparing against one.
7924
7925         * jcf-parse.c: Include toplev.h.
7926
7927         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
7928         (localvar_free): Remove unused variable `i'.
7929         (generate_bytecode_conditional): Likewise for variable `kind'.
7930
7931         * jv-scan.c: Include config.h and system.h.  Remove redundant
7932         OS header and gansidecl.h includes.
7933         (warning): Add the `const' keyword to a char*.  Also add
7934         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
7935         __STDC__, when determining whether to use ANSI-isms.
7936         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
7937         (xmalloc): Don't redundantly prototype here.
7938         (main): Remove unused parameter `envp'.  Also fix the arguments
7939         passed to function `fatal' to match the format specifier.
7940
7941         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
7942
7943         * mangle.c: Include toplev.h.
7944         (emit_unicode_mangled_name): Declare parameter `len'.
7945
7946         * parse.y (parse_warning_context): Add the `const' keyword to a
7947         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
7948         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
7949         (issue_warning_error_from_context): Add the `const' keyword to
7950         a char*.
7951         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
7952         not `__STDC__' for whether to use ANSI-isms.
7953
7954         * typeck.c (incomplete_type_error): Mark parameters `value' and
7955         `type' with ATTRIBUTE_UNUSED.
7956         (parse_signature_type): Use ISDIGIT, not isdigit.
7957
7958         * verify.c (check_pending_block): Add the `const' keyword to a char*.
7959         (verify_jvm_instructions): Likewise.  Remove unused variables
7960         `field_name' and `default_val'.
7961
7962         * zextract.c: Include config.h and system.h.  Remove redundant
7963         OS header includes.
7964
7965         * zipfile.h: Prototype `read_zip_archive'.
7966
7967 Thu Jan 21 16:00:06 1999  Andrew Haley  <aph@cygnus.com>
7968
7969         * typeck.c (convert): Allow conversions to void type: some
7970         optimizations in gcc do this.
7971
7972 Thu Jan 21 15:21:49 1999  Andrew Haley  <aph@cygnus.com>
7973
7974         * typeck.c (convert_ieee_real_to_integer): New function.
7975         (convert): When not using fast-math and using hardware fp, convert
7976         an IEEE NaN to zero.
7977
7978 1999-01-18  Andrew Haley  <aph@cygnus.com>
7979
7980         * parse.y (patch_binop): Do a type conversion from signed to
7981         unsigned and then back to signed when a ">>>" is found.
7982
7983 Sun Jan 17 22:34:22 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7984
7985         * java-tree.h: (check_for_initialization): Added prototype.
7986         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
7987         * parse.y (do_resolve_class): Removed unused locals.
7988         (read_import_dir): Likewise.
7989         (resolve_qualified_expression_name): Array creation
7990         expressions are valid primary expressions.
7991         (qualify_ambiguous_name): Likewise.
7992         (patch_synchronized_statement): Removed unused local.
7993
7994 Sun Jan 17 21:55:42 1999  Jeffrey A Law  (law@cygnus.com)
7995
7996         * Makefile.in (zextract.o): Add dependencies.
7997
7998         * Makefile.in: Do not put ^Ls at the start of a line.
7999
8000 Fri Jan 15 20:16:20 1999  Per Bothner  <bothner@cygnus.com>
8001
8002         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
8003         sub-type the result of the call that gets the exception value.
8004
8005         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
8006         don't call finish_class.
8007
8008         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
8009         clear found before continuing.
8010
8011         * verify.c (verify_jvm_instructions):  On an array load, allow
8012         and handle top of stack to be TYPE_NULL.
8013
8014         * gjavah.c (generate_access):  Translate Java package private or
8015         protected access to C++ public, but with a comment.
8016
8017 1999-01-13  Andrew Haley  <aph@cygnus.com>
8018
8019         * expr.c (generate_name): Name prefix changed to avoid clashes
8020         with assembler temp labels.
8021
8022         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
8023         MODIFY_EXPR.  Without this, code for the assignement may not be
8024         generated at all and the synchronized statement will read an
8025         uninitialized variable.
8026
8027 Wed Jan 13 01:24:54 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8028
8029         * class.c (maybe_layout_super_class): Fixed returned value.
8030         * lex.c: Added 1999 to the copyright.
8031         (java_init_lex): Initialize java_lang_imported.
8032         * lex.h: Added 1999 to the copyright.
8033         * parse.h: Added 1999 to the copyright.
8034         (REGISTER_IMPORT): Fixed typo in trailing macro.
8035         (CURRENT_OSB): New macro.
8036         (struct parser_ctxt): New fields osb_depth, osb_limit.
8037         * parse.y (java_lang_id): New global variable.
8038         (type_import_on_demand_declaration): Don't import java.lang.* twice.
8039         (array_creation_expression:): Use CURRENT_OSB.
8040         (dims:): Uses a stack to keep track of array dimensions.
8041         (cast_expression:): Use CURRENT_OSB.
8042         (find_expr_with_wfl): Return NULL if node found doesn't meet the
8043         conditions.
8044         (register_fields): Fixed typos in comment.
8045         (check_method_redefinition): Fixed comment indentation.
8046         (java_check_regular_methods): Set saved found wfl to NULL after
8047         having reinstalled it in the previously found DECL_NAME.
8048
8049 Sun Jan 10 13:36:14 1999  Richard Henderson  <rth@cygnus.com>
8050
8051         * gjavah.c (java_float_finite): Use a union to do type punning.
8052         (java_double_finite): Likewise.
8053
8054 Sat Jan  9 11:25:00 1999  Per Bothner  <bothner@cygnus.com>
8055
8056         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
8057         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
8058         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
8059         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
8060         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
8061         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
8062
8063 Fri Jan  8 15:48:03 1999  Per Bothner  <bothner@cygnus.com>
8064
8065         * check-init.c (check_init):  If compiling to native, we don't
8066         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
8067
8068 1999-01-08  Tom Tromey  <tromey@cygnus.com>
8069
8070         * parse-scan.y (variable_declarator_id): Set or increment
8071         bracket_count.
8072         (bracket_count): New global.
8073         (formal_parameter): Handle case where bracket pairs trail variable
8074         declarator id.
8075
8076 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
8077
8078         * jcf-parse.c (yyparse): variable len changed from a char to an
8079         int to prevent overflow.
8080
8081 Wed Jan  6 17:19:46 1999  Per Bothner  <bothner@cygnus.com>
8082
8083         * java-tree.h:  Declare read_class.
8084         * jcf-parse.c (read_class):  New function.
8085         (load_class):  Now just call read_class.
8086
8087         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
8088         * jcf-parse.c (parse_source_file):  Declare save_error_count,
8089         which is needed by java_parse_abort_on_error macro,
8090         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
8091
8092         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
8093         constructor, if initializing a static field.
8094         (patch_new_array_init):  Set TREE_CONSTANT if it is.
8095         * expr.c (java_lang_expand_expr):  For a static array constructor
8096         of primitive elements, allocate the array itself statically.
8097         Disabled until we can set the vtable field statically.
8098
8099         * check-init.c:  New file.  Checks for definite assignment.
8100         * Makefile.in (JAVA_OBJS):  Add check-init.o.
8101         * parse.y (java_complete_expand_method): Call check_for_initialization.
8102         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
8103
8104 Wed Jan  6 14:53:10 1999  Graham <grahams@rcp.co.uk>
8105
8106         * parse.y : include system.h instead of including
8107         standard headers directly with the exception of <dirent.h>.
8108
8109 Wed Jan  6 16:20:06 1999  Per Bothner  <bothner@cygnus.com>
8110
8111         * lex.h:  Moved static function declarations to lex.c,
8112         to shut up some -Wall warnings.
8113         * lex.c:  Static function declarations moved here.
8114         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
8115
8116 Tue Jan  5 22:15:40 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8117
8118         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
8119
8120 Tue Dec 22 11:25:19 1998  Per Bothner  <bothner@cygnus.com>
8121
8122         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
8123         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
8124
8125         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
8126         (localvar_alloc):  Change return type to void,
8127         (emit_unop):  Remove unused variable size.
8128
8129         * jcf-write.c (struct jcf_block):  Add new union.
8130         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
8131         (call_cleanups):  New functions.
8132         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
8133         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
8134         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
8135         * lang.c (lang_init):  Call using_eh_for_cleanups.
8136         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
8137         completing operands to patch_synchronized_statement.
8138         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
8139         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
8140         WITH_CLEANUP_EXPR instead of TRY_EXPR.
8141
8142 Sun Dec 20 16:15:44 1998  John F. Carr  <jfc@mit.edu>
8143
8144         * Make-lang.in: Comment out control-Ls; they upset some makes.
8145
8146 1998-12-18  Tom Tromey  <tromey@cygnus.com>
8147
8148         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
8149         consistently.
8150
8151 1998-12-17  Tom Tromey  <tromey@cygnus.com>
8152
8153         * parse.y (DIR_SEPARATOR): New define.
8154         (check_class_interface_creation): Use it.
8155
8156         * parse-scan.y (report_main_declaration): Recognize
8157         `java.lang.String' in argument to main.
8158
8159 Wed Dec 16 16:18:59 1998  Per Bothner  <bothner@cygnus.com>
8160
8161         * parse.y (create_interface):  Remove bogus test.
8162
8163 Wed Dec 16 14:42:19 1998  Per Bothner  <bothner@cygnus.com>
8164
8165         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
8166         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
8167
8168 1998-12-16  Tom Tromey  <tromey@cygnus.com>
8169
8170         * parse-scan.y (qualified_name): Use correct sprintf format.
8171
8172 1998-12-15  Tom Tromey  <tromey@cygnus.com>
8173
8174         * gjavah.c (print_field_info): Changed how most negative number is
8175         printed.
8176
8177 Mon Dec 14 18:49:29 1998  Per Bothner  <bothner@cygnus.com>
8178
8179         * parse.y (fold_constant_for_init):  New function.
8180         (resolve_expression_name):  Don't replace static final
8181         constant-initialized fields by its value.
8182         (java_complete_lhs):  New.  Same as java_complete_tree, except does
8183         not replace static final constant-initialized fields by their values.
8184         (register_fields):  If there is an initializer, set DECL_INITIAL and
8185         MODIFY_EXPR_FROM_INITIALIZATION_P.
8186         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
8187         Only call patch_initialized_static_field if
8188         MODIFY_EXPR_FROM_INITIALIZATION_P.
8189         (patch_initialized_static_field):  If not valid constant, clear
8190         DECL_INITIAL.
8191
8192         * parse.y (lookup_field_wrapper):  Fix thinko.
8193
8194         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
8195         set and restore global lineno.
8196
8197 1998-12-14  Tom Tromey  <tromey@cygnus.com>
8198
8199         * gjavah.c (print_field_info): If value to print is the smallest
8200         value of its size, then print as hex to avoid later warnings from
8201         C++ compiler.
8202
8203 1998-12-14  Tom Tromey  <tromey@cygnus.com>
8204
8205         * gjavah.c (decompile_method): Decompile `return null'.
8206         (process_file): Generate `#pragma interface'.
8207         (method_declared): New global.
8208         (print_method_info): Set it.
8209         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
8210         (print_method_info): Handle abstract methods.
8211
8212 Sun Dec 13 17:31:40 1998  Per Bothner  <bothner@cygnus.com>
8213
8214         * parse.y (patch_method_invocation):  If class_decl is null
8215         (e.g. an array type), use original type.
8216
8217         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
8218         errors about uncaught exception from clone (of array, specifically).
8219
8220 1998-12-13  Tom Tromey  <tromey@cygnus.com>
8221
8222         * gjavah.c (decompile_method): Handle all types of `return'
8223         opcode.  Decompile `return this' and `return'.
8224         (method_access): New global.
8225         (print_method_info): Set it.
8226         (decompile_method): Don't decompile a synchronized method.
8227
8228 1998-12-13  Tom Tromey  <tromey@cygnus.com>
8229
8230         * jcf-reader.c (jcf_parse_one_method): Recognize
8231         HANDLE_END_METHOD.
8232         * gjavah.c (HANDLE_END_METHOD): New macro.
8233         (HANDLE_CODE_ATTRIBUTE): New macro.
8234         (decompile_method): New function.
8235         (print_method_info): Don't print `;\n' at end of function decl.
8236         Include java-opcodes.h.
8237         (decompiled): New global.
8238
8239 Sat Dec 12 20:13:19 1998  Per Bothner  <bothner@cygnus.com>
8240
8241         * class.c (build_class_ref):  Handle PRIMTYPE.class if
8242         flag_emit_class_files.
8243         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
8244         if flag_emit_class_files.
8245         * parse.y (java_complete_tree):  Pre-liminary support for
8246         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
8247
8248         * parse.y (patch_synchronized_statement):   Don't call monitorexit
8249         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
8250
8251         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
8252
8253         * zipfile.h (opendir_in_zip):  New declaration.
8254         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
8255         (opendir_in_zip):  New function, using code from open_in_zip.
8256         (open_in_zip):  Call opendir_in_zip.
8257         (find_class):  Remove no-longer-used do_class_file parameter,
8258         but add source_ok parameter.  Change logic so if we find a .java file,
8259         we don't look for .class in later classpath emtries.
8260         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
8261         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
8262         * gjavah.c: Update call to find_class.
8263         * jcf-dump.c:  Likewise.
8264
8265         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
8266         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
8267         nothing if body is empty_stmt_node.
8268         Various little fixes so SP gets correctly adjusted.
8269         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
8270         For CALL_EXPR, test if static first.
8271         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
8272         such as the ones we create for Object and Class.
8273         Set and restore current_function_decl.
8274         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
8275         (note_possible_classname):  New function.
8276         (read_import_entry):  Removed.  Merged with read_import_dir.
8277         (read_import_dir):  Don't call find_class - that only gives us
8278         the first classpath entry having the needed package.
8279         Use the struct buffer data structure from buffer.h.
8280         (read_import_dir, find_in_imports_on_demand):  The remembered
8281         class names now use '.' (not '/') as package separator.
8282
8283         * parse.y (java_complete_expand_methods):  Call write_classfile
8284         here, and not in java_expand_classes (which only gets first class).
8285
8286 Sat Dec 12 19:46:04 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8287
8288         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
8289         (register_fields):  If a static fields has an initializer, just
8290         chain it on ctxp->static_initialized, and handle later.
8291         (java_complete_expand_methods):  Force <clinit> first.
8292         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
8293         - it's already been completed.
8294         (patch_initialized_static_field):  New function.
8295         (java_complete_field):  Call it.
8296
8297 Sat Dec 12 19:21:11 1998  Per Bothner  <bothner@cygnus.com>
8298
8299         * expr.c (encode_newarray_type, build_new_array):  New functions.
8300         * java-tree.h:  Declare build_new_array.
8301         * jcf-write.c (patch_newarray):  Use build_new_array.
8302
8303         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
8304         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
8305
8306         * parse.y (patch_new_array_init):  Re-organize.
8307         Now is passed the actual array (pointer) type of the value.
8308         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
8309         (patch_array_constructor):  Removed - merged into patch_new_array_init.
8310         (java_complete_tree):  Update patch_new_array_init.
8311
8312         * jcf-write.c (find_constant_index):  New function.
8313         (generate_bytecode_insns):  Use find_constant_index.
8314         (generate_classfile):  Use find_constant_index for ConstantValue.
8315
8316 1998-12-11  Tom Tromey  <tromey@cygnus.com>
8317
8318         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
8319         * decl.c (init_decl_processing): Renamed dtable -> vtable.
8320         * class.c (make_class_data): Renamed dtable -> vtable, and
8321         dtable_method_count -> vtable_method_count.
8322
8323 Thu Dec 10 20:00:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8324
8325         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
8326         global variables, initialized.
8327         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
8328         Declared new global variables.
8329         * lex.c (java_lex): Return long_zero_node, float_zero_node,
8330         double_zero_node, integer_zero_node upon direct matching.
8331         * parse.y (purify_type_name): Added function prototype.
8332         (duplicate_declaration_error_p): Consider new_type as potentially
8333         being a incomplete type. Use purify_type_name on type string.
8334         (method_header): saved_type: unused variable removed. Don't figure
8335         return type if method name is invalid.
8336         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
8337         processed by patch_unaryop.
8338         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
8339         increment/decrement node into its original type after binary
8340         numeric promotion on its operands.
8341
8342 Thu Dec 10 11:02:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8343
8344         * parse.y (array_initializer:): Array init operand is NULL_TREE
8345         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
8346         now an error. Fixed indentation problems.
8347         (patch_string): Handle error_mark_node as an argument.
8348         (patch_new_array_init): Fixed indentation problems.
8349         (array_constructor_check_entry): Removed check on null wfl_value.
8350         Return an error if wfl_value's walk returns an error.
8351
8352 Wed Dec  9 15:37:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8353
8354         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
8355         * lex.c (java_lex): Remember column position before advancing one
8356         token. Retain location information on OCB_TK.
8357         * lex.h (typedef struct java_lc): Added new field.
8358         * parse.h (GET_SKIP_TYPE): New macro.
8359         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
8360         * parse.y (build_new_array_init, patch_new_array_init,
8361         patch_array_constructor, maybe_build_array_element_wfl,
8362         array_constructor_check_entry): New function prototypes.
8363         (switch_block:): Tagged <node>.
8364         (OCB_TK): Tagged <operator>.
8365         (array_initializer:): Installed actions.
8366         (variable_initializer): Build location information on element if
8367         necessary.
8368         (switch_statement:): Fixed indentation typo.
8369         (switch_block:): Redefined default action.
8370         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
8371         (patch_assignment): Removed duplicate code.
8372         (maybe_build_array_element_wfl, build_new_array_init,
8373         patch_new_array_init, patch_array_constructor,
8374         array_constructor_check_entry): New functions.
8375
8376 Mon Dec  7 15:13:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8377
8378         * parse.y (array_initializer): Tagged <node>.
8379         (variable_initializer:): Use default rule.
8380         (array_initializer:): Defined actions.
8381         (variable_initializers:): Likewise.
8382         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
8383         non-static field accesses.
8384         (patch_invoke): Fixed indentation typo.
8385         (java_complete_tree): Likewise.
8386         (build_labeled_block): Changed leading comment. Generate an error
8387         in case of duplicate loop labels.
8388         (patch_conditional_expr): Patch results of string concatenation
8389         operations.
8390
8391 Sun Dec  6 13:45:00 1998  Per Bothner  <bothner@cygnus.com>
8392
8393         * constants.c (find_methodref_index):  When the class is an interface,
8394         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
8395
8396         * decl.c (finit_identifier_node):  Use "$finit$", rather than
8397         "<finit>" (which Sun's verifier rejects).
8398         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
8399         (generate_field_initialization_code):  Removed.
8400         (fix_constructors)  Don't add call to $finit$ here (wrong order).
8401         (patch_method_invocation):  Add $finit$ call here.
8402
8403         * java-tree.h (CALL_USING_SUPER):  New macro.
8404         * parse.y (patch_invoke):  Remove im local variable.
8405         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
8406         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
8407         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
8408
8409         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
8410
8411         * parse.y (java_complete_tree):  Don't complain about unreachable
8412         statement if it is empty_stmt_node.
8413
8414         * jcf-write.c (find_constant_wide):  New function.
8415         (push_long_const):  Use find_constant_wide.
8416
8417         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
8418         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
8419         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
8420         Emit invokeinterface when calling an interface method.
8421         Emit invokespecial also when calling super or private methods.
8422
8423         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
8424
8425 Sun Dec  6 13:21:18 1998  Per Bothner  <bothner@cygnus.com>
8426
8427         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
8428
8429 Thu Dec  3 17:11:12 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8430
8431         * java-tree.h (java_layout_seen_class_methods): New function
8432         prototype.
8433         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
8434         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
8435         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
8436         * parse.y (method_declarator:): Defined action.
8437         (issue_warning_error_from_context): input_filename saved, set to
8438         the appropriate value and restored after java_error is called.
8439         (build_unresolved_array_type): Fixed comment.
8440         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
8441         (method_header): Deal with return type the same way type are
8442         handled for fields and method's parameters and local variables
8443         types are handled.
8444         (check_method_redefinition): Removed extra CR.
8445         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
8446         (java_layout_seen_class_methods): New function.
8447         (java_layout_classes): Call java_layout_seen_class_methods.
8448
8449 Thu Dec  3 15:56:50 1998  Per Bothner  <bothner@cygnus.com>
8450
8451         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
8452
8453 Thu Dec  3 15:08:30 1998  Per Bothner  <bothner@cygnus.com>
8454
8455         * jcf-dump.c (main):  Fix error message.
8456         * jcf-path.c (add_entry):  Style fix.
8457
8458 Wed Dec  2 15:52:25 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8459
8460         * class.c (layout_class_method): Call build_java_argument_signature
8461         on constructors too.
8462         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
8463         (patch_method_invocation): Define a primary when resolving an
8464         expression name. Augmented comment on code checking illegal `this'
8465         usage. Loosened it test by accepting NEW_CLASS_EXPR.
8466
8467 Tue Dec  1 13:53:24 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8468
8469         * class.c (layout_class_method): Don't report error on non-static
8470         overriding static if the method is private.
8471         * java-tree.h (finish_class): Prototype added.
8472         * lex.c (java_get_line_col): Handle col argument -2 value.
8473         * parse.h: All static method declarations moved to parse.y.
8474         * parse.y: Now contains all static method declarations previously
8475         found in parse.h.
8476         (find_expr_with_wfl, missing_return_error,
8477         unreachable_stmt_error): New functions.
8478         (java_get_real_method_name): Identify constructors bearing class
8479         names in source code compiled classes only.
8480         (java_complete_expand_methods): Call missing_return_error.
8481         (invocation_mode): Private methods invoked as static methods.
8482         (java_complete_tree): Call unreachable_stmt_error.
8483
8484 1998-12-01  Tom Tromey  <tromey@cygnus.com>
8485
8486         * Makefile.in (+target): Removed.
8487         (+xmake_file): Likewise.
8488         (+tmake_file): Likewise.
8489         (.NOEXPORT): Removed duplicate.
8490
8491 Fri Nov 27 13:20:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8492
8493         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
8494
8495         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
8496
8497         * jvgenmain.c: Remove the xmalloc prototype, we get it from
8498         libiberty.h.  Provide an xmalloc definition.
8499
8500         * jvspec.c: Remove the xmalloc prototype.
8501
8502         * parse-scan.y: Include config.h and system.h.  Don't include
8503         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
8504         Provide an xstrdup definition.
8505
8506 Thu Nov 26 22:03:58 1998  Alexandre Oliva  <oliva@dcc.unicamp.br>
8507
8508         * jcf-path.c (add_entry): Recognize ".jar" too.
8509         * lang-specs.h: Likewise.
8510
8511 Thu Nov 26 12:44:07 1998  Per Bothner  <bothner@cygnus.com>
8512
8513         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
8514         soft_monitorenter_node, soft_monitorexit_node, throw_node.
8515
8516         * jcf-write.c (generate_bytecode_insns):
8517         Handle pre/post-increment/decrement of long.
8518
8519         * jcf-write.c (generate_bytecode_insns):
8520         Handle missing exception handler (finally for synchronized).
8521
8522 Wed Nov 25 09:47:15 1998  Per Bothner  <bothner@cygnus.com>
8523
8524         * java-tree.h (end_params_node):  Declare global.
8525         * decl.c (end_params_node):  New global.
8526         (init_decl_processing, start_java_method):  Use end_params_node for
8527         end of list of parameter types.  Follows correct gcc conventions.
8528         * expr.c (pop_argument_types, pop_arguments):  Likewise.
8529         * lang.c (put_decl_node):  Likewise.
8530         * typeck.c (various places):  Likewise.
8531         * class.y (various places):  Likewise.
8532         * parse.y (various places):  Likewise.
8533
8534         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
8535         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
8536
8537         * class.c:  Add #include flags.h, remove no-longer needed declaration.
8538
8539         * class.c (layout_class_method):  Remove commented-out code, re-format.
8540         Don't add vtable entry (or index) for private methods.
8541         * expr.c (expand_invoke):  A private method is implicitly final.
8542         * class.c (make_class_data):  If inlining or optimizing,
8543         skip private methods.
8544
8545         * class.c (finish_class):  New function.  Calls existing methods,
8546         but alls emits deferred inline functions.
8547         * jcf-parse.c (parse_class_file):  Call finish_class.
8548         * parse.y (java_complete_expand_methods):  Likewise.
8549
8550         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
8551
8552         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
8553
8554 Wed Nov 25 00:50:58 1998  Marc Espie <espie@quatramaran.ens.fr>
8555
8556         * jcf-write.c (generate_bytecode_conditional): Fix typo.
8557
8558 Tue Nov 24 17:06:38 1998  Per Bothner  <bothner@cygnus.com>
8559
8560         * (generate_classfile): Always write class access flag with
8561         ACC_SUPER set.
8562
8563 Tue Nov 24 16:34:33 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8564
8565         * class.c (maybe_layout_super_class): New function.
8566         (layout_class): Reorganized. Loop on class methods dispatched into
8567         a new function. Call maybe_layout_super_class.
8568         (layout_class_methods, layout_class_method): New functions.
8569         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
8570         class.
8571         (expand_invoke): Likewise.
8572         * java-tree.h (all_class_list): New global variable declared.
8573         (layout_class_methods, layout_class_method): New function
8574         prototypes.
8575         (LAYOUT_SEEN_CLASS_METHODS): New macro.
8576         * jcf-parse.c (all_class_list): New global variable.
8577         (load_class): Extended what class_or_name can be. Use parser
8578         context mechanism to save globals before calling jcf_parse.
8579         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
8580         is set on the file name.
8581         (jcf_parse): Layout class methods when Object is loaded, otherwise
8582         record class in all_class_list for delayed method layout.
8583         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
8584         * lang.c (put_decl_node): Decode <init> into the decl context
8585         class name.
8586         * lex.c (java_allocate_new_line): Use xmalloc.
8587         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
8588         pointers, not TREE_LIST elements.
8589         (struct parser_ctxt): Fixed comment indentations, added comments
8590         and reordered some fields.
8591         (java_check_methods): Function prototype removed.
8592         * parse.y (java_push_parser_context): Use xmalloc.
8593         (java_parser_context_restore_global): Pop extra pushed ctxp only
8594         when there's nothing next.
8595         (maybe_create_class_interface_decl): Fixed comment, add new
8596         created class decl to all_class_list.
8597         (method_header): Use GET_REAL_TYPE on argument's types.
8598         (method_declarator): Use GET_REAL_TYPE, change type to the real
8599         type in TREE_LIST dependency node. Build argument list with the
8600         real type.
8601         (create_jdep_list): Use xmalloc. Removed allocation error message.
8602         (obtain_incomplete_type): Fixed leading comment. Broadened
8603         incoming argument meaning.
8604         (register_incomplete_type): Use xmalloc. Removed allocation error
8605         message.
8606         (safe_layout_class): Fixed leading comment.
8607         (jdep_resolve_class): Reversed if statement condition and switch
8608         if and else bodies.
8609         (resolve_and_layout): Fixed leading comment. Broadened incoming
8610         argument meaning.
8611         (complete_class_report_errors): New local variable name, for
8612         clarity. purify_type_name used for all error cases.
8613         (java_get_real_method_name): Stricter check on constructors.
8614         (java_check_regular_methods): Reverse methods list only if not
8615         already laid out. Layout artificial constructor.
8616         (java_check_methods): Deleted.
8617         (source_start_java_method): Obtain incomplete type for patchable
8618         method arguments.
8619         (java_layout_classes): Fixed leading comment. Use
8620         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
8621         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
8622         before returning. Fixed comments.
8623         (java_expand_classes): Check for errors up front.
8624         (patch_method_invocation): Class to search is resolved and laid
8625         out.
8626
8627 Tue Nov 24 12:57:13 1998  Per Bothner  <bothner@cygnus.com>
8628
8629         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
8630
8631         * javaop.h (int8):  Removed - not used.
8632         (jbyte):  Redefine portably with correct signedness.
8633
8634         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
8635
8636         * jcf-write.c (generate_bytecode_insns):  Fix typo
8637         OPCODE_getstatic to OPCODE_getfield.
8638
8639         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
8640         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
8641         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
8642
8643 Thu Nov 19 11:16:55 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8644
8645         * jcf-parse.c (jcf_parse_source): Function returned type is
8646         void. Added prototype.
8647         (jcf_parse): Function returned type is void.
8648         (yyparse): Remove call to fclose on the last parsed file.
8649
8650         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
8651
8652 Wed Nov 18 23:54:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8653
8654         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
8655         (layout_class): Cope with methods featuring WFL in decl names.
8656         * decl.c (unqualified_object_id_node): New global variable,
8657         initialized.
8658         (build_decl_no_layout): Removed.
8659         * expr.c (build_primtype_type_ref): Handle Double.
8660         (java_lang_expand_expr): Fixed indentations.
8661         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
8662         (flag_wall, flag_redundant, flag_not_overriding,
8663         flag_static_local_jdk1_1, unqualified_object_id_node): Global
8664         variable declarations.
8665         (build_decl_no_layout): Removed prototype.
8666         (java_get_real_method_name): Added prototype.
8667         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
8668         (java_parse_abort_on_error): Macro now just returns.
8669         * jcf-parse.c (jcf_parse_source): Check fclose returned
8670         value. Call emit_register_classes if java_report_errors returns
8671         zero.
8672         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
8673         flag_static_local_jdk1_1): New integer flags.
8674         (lang_decode_option): New flags set here.
8675         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
8676         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
8677         the flag_redundant variable.
8678         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
8679         when parsing java.lang.Object class.
8680         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
8681         NULL_TREE to build.
8682         (resolve_qualified_expression_name): Fixed indentation.
8683         (patch_array_ref): Changed prototype.
8684         (not_initialized_as_it_should_p): Prototype removed.
8685         (java_report_errors): Added function prototype.
8686         * parse.y (formal_parameter:): Changed error message for not yet
8687         supported final parameters.
8688         (class_type_list:): Set both PURPOSE and VALUE of created
8689         TREE_LIST to be class_type.
8690         (primary_no_new_array:): Handle class literals on primitive types.
8691         (parse_warning_context): Reinstalled correct force_error and
8692         do_warning flags setups.
8693         (java_report_errors): Changed prototype. Return java_error_count
8694         value.
8695         (variable_redefinition_error): Consider treating variable type as
8696         a fake pointer.
8697         (create_interface): Warn about redundant abstract modifier if
8698         flag_redundant is set. Changed error message.
8699         (lookup_field_wrapper): Save/restore globals before/after looking
8700         up field.
8701         (duplicate_declaration_error_p): Consider treating declaration
8702         type as a fake pointer.
8703         (register_fields): Extract real type from dependency node. Check
8704         for duplicate field declaration after type adjustment. Use
8705         DECL_INITIAL to store static final initialized values.
8706         (method_header): Extract real function type from dependency node.
8707         (check_abstract_method_header): Use GET_METHOD_NAME.
8708         (obtain_incomplete_type): Layout fake pointer type.
8709         (safe_layout_class): Don't try to check for methods before layout.
8710         (java_complete_class): Don't check for correct throws clause
8711         elements inheritance here.
8712         (resolve_and_layout): Broadened name parameter meaning.
8713         (reset_method_name): Use GET_METHOD_NAME.
8714         (java_get_real_method_name): New function.
8715         (java_check_regular_methods): Don't check methods in
8716         java.lang.Object.  Verify lineage of throws clause elements. Use
8717         flag_no_overriding in warning report.
8718         (check_throws_clauses): Don't check if class was from
8719         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
8720         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
8721         (declare_local_variables): Use flag_static_local_jdk1_1 to report
8722         warning on unsupported final local variables. Use build_decl
8723         instead of build_decl_no_layout. Get real local variable type from
8724         dependency node.
8725         (source_start_java_method): Get real parameter type from
8726         dependency node. Call build_decl instead of build_decl_no_layout.
8727         (java_layout_classes): Reverse tree and layout type and class as
8728         required. Mark class as loaded when done.
8729         (resolve_field_access): Fixed indentation. Restricted condition
8730         leading to static field access code generation. Set field_type
8731         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
8732         (resolve_qualified_expression_name): Initialize type_found to
8733         null. Handle static field resolved during qualification. Fixed
8734         layout on non primitive field decl types.
8735         (not_accessible_p): Fixed typo in comment.
8736         (patch_method_invocation): Resolve and layout class to search from
8737         type.
8738         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
8739         layout non primitive type, if necessary. Make method node only to
8740         report errors.
8741         (find_applicable_accessible_methods_list): Consider WFL'ed method
8742         decl names. Fixed indentation.
8743         (argument_types_convertible): Resolve and layout target type if
8744         necessary.
8745         (java_complete_tree): Fixed indentation problems. Rewrote
8746         CALL_EXPR thrown exceptions check. Re-installed further processing
8747         of the assignment in certain cases.
8748         (patch_assignment): Call maybe_build_primttype_type_ref to perform
8749         inlining on class literals.
8750         (valid_builtin_assignconv_identity_widening_p): Cope with constant
8751         0 literal.
8752         (valid_method_invocation_conversion_p): Likewise.
8753         (patch_string): Temporary disable forbidden use of `this' in
8754         explicit constructor invocations when doing string concatenation
8755         within their scope.
8756         (patch_unaryop): Added comment. Reinstalled code to disable
8757         further check on assignment operation with cast expression RHS.
8758         (patch_switch_statement): Fixed indentation.
8759         (build_try_statement): Call build_decl instead of
8760         build_decl_no_layout.
8761         (patch_synchronized_statement): Likewise.
8762         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
8763         IS_UNCHECKED_EXPRESSION_P.
8764         (check_thrown_exceptions_do): Changed leading comment. Resolve and
8765         layout argument exception type.
8766         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
8767         of IS_UNCHECKED_EXPRESSION_P.
8768
8769 Wed Nov 18 14:21:48 1998  Anthony Green  <green@cygnus.com>
8770
8771         * jcf-parse.c (yyparse): Open class file in binary mode.
8772
8773 Sun Nov 15 17:14:17 1998  Per Bothner  <bothner@cygnus.com>
8774
8775         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
8776
8777         * jcf-write.c (perform_relocations):  Move check out one loop.
8778
8779 Sun Nov 15 15:09:56 1998  Anthony Green  <green@hoser.cygnus.com>
8780
8781         * Make-lang.in: Fix reference to srcdir.
8782         * jv-scan.c: Add missing xmalloc prototype.
8783         * jvgenmain.c: Ditto.
8784
8785 Sun Nov 15 14:36:29 1998  Per Bothner  <bothner@cygnus.com>
8786
8787         * decl.c (error_mark_node), java-tree.h:  New global.
8788         * parse.y:  Use empty_stmt_node instead of size_zero_node.
8789         (build_if_else_statement):  If missing else, use empty_stmt_node.
8790
8791         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
8792         (java_complete_expand_method):  Complain if return is missing.
8793         (java_check_regular_methods):  Comment out incorrect error check.
8794         (not_accessible_p):  Fix incorrect handling of protected methods.
8795         (patch_method_invocation):  Pass correct context to not_accessible_p.
8796         (find_applicable_accessible_methods_list):  Likewise.
8797         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
8798         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
8799         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
8800         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
8801
8802         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
8803         (push_int_const):  Remove reundant NOTE_PUSH.
8804         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
8805         (- case SWITCH_EXPR):  Fix code generation bug.
8806         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
8807         (generate_classfile):  More robust for abstract methods.
8808
8809 Sun Nov 15 13:52:39 1998  Anthony Green  <green@cygnus.com>
8810
8811         * Makefile.in: jv-scan and jvgenmain all require libiberty.
8812         * Make-lang.in: Ditto.
8813
8814         * jv-scan.c: Remove xmalloc and xstrdup definitions.
8815         * jvgenmain: Ditto.
8816
8817 Sun Nov 15 14:10:56 1998  Per Bothner  <bothner@cygnus.com>
8818
8819         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
8820
8821         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
8822
8823 Sat Nov 14 17:19:18 1998  Per Bothner  <bothner@cygnus.com>
8824
8825         Allow uses of interface types to verify.  This is not really
8826         type-safe, but it matches what Sun does, and is OK as long as
8827         there are appropriate run-time checks.
8828         * verify.c (merge_types):  If merging two interface types,
8829         just set the result to java.lang.Object.
8830         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
8831
8832 1998-11-13  Tom Tromey  <tromey@cygnus.com>
8833
8834         * gjavah.c (main): Handle --output-class-directory argument.
8835         * jvspec.c (lang_specific_driver): Translate `-d' into
8836         -foutput-class-dir.
8837         * jcf.h (jcf_write_base_directory): Declare.
8838         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
8839         * lang-options.h: Mention -foutput-class-dir.
8840         * jcf-write.c (jcf_write_base_directory): New global.
8841         (make_class_file_name): Put generated .class file into `-d'
8842         directory, or into source directory if -d not given.  Function now
8843         static.
8844         (write_classfile): Free class file name.  Handle case where class
8845         file name is NULL.
8846         (DIR_SEPARATOR): New macro.
8847         Include <sys/stat.h>
8848
8849         * Makefile.in (prefix): New macro.
8850
8851 Thu Nov 12 14:15:07 1998  Per Bothner  <bothner@cygnus.com>
8852
8853         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
8854         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
8855         here (done in patch_invoke instead).
8856         (case_identity):  Moved here from parse.y.
8857
8858         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
8859         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
8860         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
8861         so they can be efficiently scanned without recursion.
8862         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
8863         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
8864         in BLOCK iteratively, rather than recursively.
8865
8866         * parse.y (do_unary_numeric_promotion):  New function.
8867         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
8868
8869         * parse.y (patch_newarray):  Various fixes.
8870
8871         Re-do handling of switch statements (for proper block scoping).
8872         * parse.y:  Add just a single block for the enture switch block,
8873         but don't create any "case blocks".
8874         (group_of_labels):  Rmeoved unneeded non-terminal.
8875         CASE_EXPR and DEFAULT_EXPR are added to current block.
8876         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
8877         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
8878         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
8879         * parse.y (wfl_operator, print_int_node): Make non-static.
8880         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
8881         as part of recursive scan of block.
8882         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
8883         (patch_switch_statement):  Most tests move dinto java_complete_tree.
8884
8885         * parse.y:  Make various production be non-typed (void).
8886         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
8887         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
8888         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
8889
8890         * jcf-write.c (struct jcf_handler):  New type.
8891         (struct jcf_switch_state):  New type.
8892         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
8893         (alloc_handler, emit_unop, emit_reloc):  New functions.
8894         (adjust_typed_op):  Add extra parameter ("max type" offset).
8895         (emit_switch_reloc, emit_case-reloc):  New function.
8896         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
8897         (generate_bytecode_insns):  Support REAL_CST, switch statements,
8898         exception handling, method calls, object/array creation, and more.
8899
8900         * class.c:  Remove some unused variables.
8901         * constants.c (find_string_constant):  New function.
8902         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
8903         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
8904         if flag_emit_class_files.
8905
8906 1998-11-12  Tom Tromey  <tromey@cygnus.com>
8907
8908         * jcf-io.c (find_class): Added explanatory comment.
8909
8910         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
8911         trailing slash to `.zip' entries.
8912
8913         * jvspec.c (lang_specific_driver): Correctly handle case where
8914         GC_NAME not defined.
8915
8916 1998-11-11  Tom Tromey  <tromey@cygnus.com>
8917
8918         * jvspec.c (GC_NAME): New define.
8919         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
8920         if required.
8921         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
8922
8923 Wed Nov 11 19:08:52 1998  Per Bothner  <bothner@cygnus.com>
8924
8925         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
8926
8927 1998-11-11  Tom Tromey  <tromey@cygnus.com>
8928
8929         * jcf-dump.c (main): Correctly recognize `--'-style long options.
8930
8931 Tue Nov 10 12:34:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8932
8933         * class.c (is_compiled_class): Call safe_layout_class for class
8934         compiled from source.
8935         * conver.h (convert_to_integer, convert_to_real,
8936         convert_to_pointer): Added prototypes.
8937         * decl.c (init_decl_processing): Non longer push the decls of
8938         `methodtable', `constants', `Class', `Field', `dispatchTable'
8939         `jexception' and `Method'.
8940         * expr.c (build_invokeinterface): New function.
8941         (expand_invoke): static variable CLASS_IDENT now in
8942         build_invokeinterface. Use build_invokeinterface.
8943         (expand_java_field_op): Moved code to inline
8944         java.lang.PRIMTYPE.TYPE into a function.
8945         (build_primtype_type_ref): New function.
8946         * java-tree.def (INSTANCEOF_EXPR): New tree code.
8947         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
8948         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
8949         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
8950         (DECL_LOCAL_STATIC_VALUE): New macro.
8951         (build_invokeinterface, build_primtype_type_ref): New function
8952         prototypes.
8953         (java_parse_abort_on_error): Macro rewritten.
8954         * jcf-parse.c (current_method): Add comment to declaration.
8955         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
8956         Function prototypes fixed.
8957         (jcf_parse_source): push/pop parser context. save/restore global.
8958         (parse_source_file): Fixed leading comment. Now take a
8959         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
8960         classes and pop the parser context anymore.
8961         (yyparse): Push parser context, save globals, parse the source
8962         file, restore globals and pop the parser context when processing a
8963         source file.
8964         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
8965         * lex.c (java_parse_doc_section): New function.
8966         (java_lex): Call java_parse_doc_section when appropriate. Build an
8967         operator around INSTANCEOF_TK.
8968         * lex.h (java_lineterminator, java_sprint_unicode,
8969         java_unicode_2_utf8, java_lex_error, java_store_unicode):
8970         Prototypes rewritten.
8971         (java_parse_escape_sequence, java_letter_or_digit_p,
8972         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
8973         java_read_unicode, java_store_unicode, java_read_char,
8974         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
8975         Added function prototypes.
8976         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
8977         define.
8978         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
8979         New macros
8980         (struct parser_ctxt): New fields: deprecated,
8981         current_parsed_class_un, gclass_list.
8982         (fix_method_argument_names, issue_warning_error_from_context,
8983         resolve_package, lookup_package_type): New function prototypes.
8984         (resolve_expression_name): Fixed function prototype.
8985         (find_applicable_accessible_methods_list): Fixed indentation, added
8986         extra argument in prototype.
8987         (check_final_assignment, build_null_of_type, check_deprecation,
8988         check_method_redefinition, reset_method_name,
8989         java_check_regular_methods, java_check_abstract_methods,
8990         maybe_build_primttype_type_ref): New function prototype.
8991         * parse.y (conver.h): Include.
8992         (INSTANCEOF_TK): Tagged <operator>.
8993         (single_type_import_declaration): Use REGISTER_IMPORT macro.
8994         (relational_expression:): Build binop for instanceof.
8995         (java_push_parser_context): Remember ctxp->gclass_list across
8996         contexts.
8997         (java_pop_parser_context): Simply return if no context
8998         exists. Remember gclass_list across contexts.
8999         (issue_warning_error_from_context): New function.
9000         (parse_error_context): Don't setup ctxp->elc here. Call
9001         issue_warning_error_from_context instead.
9002         (parse_warning_context): Likewise.
9003         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
9004         setup. Link new class/interface to ctxp->gclass_list.
9005         (add_superinterfaces): Register interface as incomplete if not
9006         loaded.
9007         (create_class): Remember class unqualified name in
9008         ctxp->current_parsed_class_un. Check class deprecation.
9009         (register_fields): Check field deprecation. Remember static final
9010         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
9011         processing INIT.
9012         (method_header): New local variable ORIG_ARG. Use unqualified
9013         current class name for check on constructor errors. Promote return
9014         type if of record type. Argument list fix moved in
9015         fix_method_argument_names, called here. Check method deprecation.
9016         (fix_method_argument_names): New function.
9017         (method_declarator): Promote record typed arguments.
9018         (safe_layout_class): Check class methods before layout.
9019         (java_complete_class): Compute field layout when patched.
9020         (do_resolve_class): Try to load class after having it renamed
9021         after the package name.
9022         (get_printable_method_name): Use DECL_CONTEXT.
9023         (reset_method_name): New function.
9024         (check_method_redefinition): Use reset_method_name.
9025         (java_check_regular_methods): New local variable
9026         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
9027         names for error report. Check for compile-time error when method
9028         found has default (package) access.
9029         (java_check_abstract_methods): Now takes an interface DECL node as
9030         an argument. Also reinstall real name on unchecked
9031         overriding/hiding methods for error report.
9032         (java_check_methods): Fixed leading comment. Get classes to verify
9033         from ctxp->gclass_list. Use CHECK_METHODS macro and set
9034         CLASS_METHOD_CHECKED_P on class verification.
9035         (lookup_java_method2): Get real method name if necessary.
9036         (find_in_imports): Don't check package class access here.
9037         (resolve_package, lookup_package_type): New functions.
9038         (java_layout_classes): Fixed leading comment. Take classes to be
9039         laid out from ctxp->gclass_list.
9040         (java_complete_expand_methods): Don't expand native and abstract
9041         methods.
9042         (java_expand_classes): New function.
9043         (resolve_expression_name): Use additional argument ORIG.  Retrieve
9044         values of static final field of primitive types.
9045         (resolve_field_access): Handles static final field of promotive
9046         type.
9047         (resolve_qualified_expression_name): Handle STRING_CST as
9048         primaries and package name resolution. Check deprecation on found
9049         decls. Set where_found and type_found on non static field resolved
9050         during qualification. Layout non primitive field decl types.
9051         (check_deprecation): New function.
9052         (maybe_access_field): Simplified.
9053         (patch_method_invocation_stmt): Local variable CLASS_TYPE
9054         removed. Reverse method's argument when primary is a type. Don't
9055         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
9056         instead. Include abstract class in the list of class searchable
9057         for constructors. Use DECL_CONTEXT of found method for access
9058         checks. Check method deprecation.
9059         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
9060         converting arguments. Handle INVOKE_INTERFACE.
9061         (lookup_method_invoke): Search constructor using existing
9062         infrastructure (don't rely on lookup_java_constructor anymore).
9063         (find_applicable_accessible_methods_list): Extra argument flag
9064         LC. Now include constructor in the search.
9065         (qualify_ambiguous_name): Conditional expression are primaries.
9066         (not_initialized_as_it_should_p): static final are always
9067         initialized.
9068         (java_complete_tree): Pass extra NULL argument to
9069         resolve_expression_name. Stricter test to carry on patching
9070         assignments. New case for INSTANCEOF_EXPR.
9071         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
9072         (check_final_assignment, maybe_build_primttype_type_ref): New
9073         functions.
9074         (patch_assignment): Detect resolved static finals and carry normal
9075         assignment error check on them. Inline PRIMTYPE.TYPE read access.
9076         (try_builtin_assignconv): Access constant 0 on all primitive
9077         types.
9078         (valid_builtin_assignconv_identity_widening_p): Accept identical
9079         types. Accept all promoted type on int type.
9080         (valid_ref_assignconv_cast_p): Accept a null pointer to be
9081         assigned to a reference.
9082         (valid_method_invocation_conversion_p): Accept to check null
9083         pointers.
9084         (build_binop): Merge declaration and initialization of local
9085         variable BINOP.
9086         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
9087         numeric types. Improved validity test for qualify operators on
9088         references.
9089         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
9090         and PREINCREMENT_EXPR. Also detect resolved static finals of a
9091         primitive type and issue the appropriate error message.
9092         (resolve_type_during_patch): Mark class loaded when resolved.
9093         (patch_cast): Allow null to be cased to reference types.
9094         (build_null_of_type): New function.
9095         (patch_array_ref): Handle array on references correctly.
9096         (patch_return): Removed unused local variable MODIFY. Force
9097         boolean to be returned as integers. Allows null to be returned by
9098         a function returning a reference.
9099         * typeck.c (convert_to_integer, convert_to_real,
9100         convert_to_pointer): Prototypes moved to convert.h
9101         (lookup_argument_method): Use method real name, if necessary.
9102
9103 1998-10-30  Tom Tromey  <tromey@cygnus.com>
9104
9105         * class.c (build_class_ref): Changed name of primitive classes to
9106         start with `_Jv_'.
9107
9108         * class.c (make_class_data): Renamed fields: nmethods to
9109         method_count, method_count to dtable_method_count.  Always set
9110         `state' field to 0.
9111         * decl.c (init_decl_processing): Likewise.
9112
9113 Wed Oct 28 08:03:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9114
9115         * class.c (layout_class): Don't mangle <finit>, produce
9116         __finit<class> instead. Don't verify artificial methods.
9117         * decl.c (finit_identifier_node): New declared global.
9118         (init_decl_processing): finit_identifier_node initialized.
9119         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
9120         * java-tree.h (finit_identifier_node): Declared as extern.
9121         (struct lang_decl): New field called_constructor.
9122         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
9123         (CLASS_HAS_FINIT_P): New macro.
9124         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
9125         explicit constructor invocation.
9126         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
9127         CALL_SUPER_CONSTRUCTOR_P): New macros.
9128         (write_classfile): Added prototype.
9129         * jcf-parse.c (jcf_parse_source): Parse and remember for
9130         generation if the file was seen on the command line.
9131         (parse_source_file): Don't write the class file here.
9132         (yyparse): Loop on files rewritten. Set current_jcf.
9133         (parse_zip_file_entries): Parse class file only if it was found.
9134         * lang.c (init_parse): Don't open command line provided filename
9135         here.
9136         (lang_parse): Don't set main_jcf anymore.
9137         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
9138         (JCONSTRUCTOR_CHECK): New macro.
9139         (JBSC_TYPE_P): New macro.
9140         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
9141         (COMPLETE_CHECK_OP_2): New macro.
9142         (struct parse_ctxt): New field explicit_constructor_p.
9143         (check_class_interface_creation): Fixed prototype indentation.
9144         (patch_method_invocation_stmt): Prototype reflects added argument.
9145         (patch_invoke): Likewise.
9146         (complete_method_declaration, build_super_invocation,
9147         verify_constructor_circularity,
9148         build_this_super_qualified_invocation, get_printable_method_name,
9149         patch_conditional_expr, maybe_generate_finit, fix_constructors,
9150         verify_constructor_super, create_artificial_method,
9151         start_artificial_method_body, end_artificial_method_body,
9152         generate_field_initialization_code): New function prototypes.
9153         * parse.y: Fixed leading comment
9154         (constructor_header:, constructor_body:, block_end:): Rules tagged
9155         <node>.
9156         (type_declaration:): Call maybe_generate_finit.
9157         (method_declaration:): Action for method_body: placed in new
9158         function complete_method_declaration, called here.
9159         (constructor_declaration:): Defined actions. Removed leading
9160         FIXME.
9161         (constructor_header:): New rule with action.
9162         (constructor_body:): Rule rewritten using block_begin: and
9163         block_end:. Defined actions.
9164         (constructor_declarator:, explicit_constructor_invocation:):
9165         Defined actions.
9166         (block:): Use new rules block_begin: block_end:.
9167         (block_begin:, block_end:): New rules and actions.
9168         (block_statements:): Fixed error message for explicit
9169         constructors.
9170         (method_invocation:): Call build_this_super_qualified_invocation
9171         if primary is `this' or `super' was seen.
9172         (conditional_expression:): Action defined.
9173         (extra_ctxp_pushed_p): New static global flag.
9174         (java_parser_context_save_global): Create parser context if
9175         necessary. Use extra_ctxp_pushed_p to remember it.
9176         (java_parser_context_restore_global): Pop extra parser context if
9177         one exists.
9178         (build_array_from_name): Array on primitive types are marked
9179         loaded.
9180         (register_fields): Restore new name in field initializer
9181         expression if type was altered. Non static fields initialized upon
9182         declaration marked initialized.
9183         (maybe_generate_finit): New function.
9184         (maybe_generate_clinit): Use create_artificial_method,
9185         start_artificial_method_body, end_artificial_method_body. Generate
9186         debug info for enclosed initialization statements.
9187         (method_header): Fixed leading comment. Check constructor
9188         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
9189         accordingly.
9190         (complete_method_declaration, constructor_circularity_msg,
9191         verify_constructor_circularity): New functions.
9192         (get_printable_method_name): New function.
9193         (check_method_redefinition): Don't rename <finit> methods. Fix
9194         declared constructor names. Error message for
9195         constructors modified.
9196         (java_check_regular_methods): Local variable seen_constructor
9197         renamed saw_constructor. Skip verification on constructors. Create
9198         default constructor with create_artificial_method.
9199         (java_check_methods): Removed unnecessary empty line.
9200         (create_artificial_method, start_artificial_method_body,
9201         end_artificial_method_body): New functions.
9202         (java_layout_classes): Changed leading comment. Reverse fields
9203         list if necessary. Always layout java.lang.Object if being
9204         defined.
9205         (java_complete_expand_methods): Verify constructor circularity.
9206         (java_complete_expand_method): Call fix_constructor on
9207         constructors.  Local variable no_ac_found removed. Restore
9208         bindings if method body expansion failed.
9209         (fix_constructors, verify_constructor_super,
9210         generate_field_initialization_code): New function.
9211         (java_expand_classes): Fixed leading comment. Write class file
9212         here.
9213         (resolve_expression_name): Check for illegal instance variable
9214         usage within the argument scope of an explicit constructor
9215         invocation.
9216         (resolve_qualified_expression_name): Pass extra from_super flag
9217         when invoking patch_method_invocation_stmt. New case for
9218         conditional expression when used as a primary. Check for error
9219         when acquiring super.
9220         (patch_method_invocation_stmt): Added extra argument super. New
9221         local variable is_static_flag. Set class_to_search according to
9222         the nature of the constructor invocation. Don't add `this'
9223         argument when expanding NEW_CLASS_EXPR. Check for illegal method
9224         invocation within the argument scope of explicit constructor
9225         invocation. Set is_static according to is_static_flag. Provide
9226         extra `super' argument to patch_invoke invocation.
9227         (patch_invoke): New argument from_super. Loop on arguments
9228         indentation fixed. Pass from_super to invocation_mode. New switch
9229         case INVOKE_SUPER. Fixed error message in switch default case.
9230         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
9231         value.
9232         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
9233         (lookup_method_invoke): Fixed prototypes in candidates list. Error
9234         message takes constructors into account.
9235         (find_applicable_accessible_methods_list): Fixed indentation.
9236         (qualify_ambiguous_name): Take explicit constructor invocation
9237         into account. Deal with a conditional expression as a primary to
9238         a method call.
9239         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
9240         case. Added extra argument to patch_method_invocation_stmt.
9241         Register calls made to explicit constructor `this'. Don't call
9242         save_expr in ARRAY_REF case when emitting class files. Check for
9243         illegal use of this when expanding explicit constructor invocation
9244         arguments.
9245         (complete_function_arguments): Set and reset parser context
9246         explicit_constructor_p field value when appropriate.
9247         (build_super_invocation, build_this_super_qualified_invocation):
9248         New functions.
9249         (patch_assignment): Fixed typo.
9250         (patch_unaryop): Check on final fields occurs only when a decl
9251         exits.
9252         (patch_return): Take constructors into account.
9253         (patch_conditional_expr): New function.
9254         * typeck.c (build_java_signature): Removed unnecessary empty line.
9255
9256 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
9257
9258         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
9259
9260 1998-10-28  Tom Tromey  <tromey@cygnus.com>
9261
9262         * decl.c (init_decl_processing): Renamed fields.
9263         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
9264         interface_len, msize fields.
9265
9266         * class.c (make_class_data): Removed subclass_head and
9267         subclass_next fields.
9268         * decl.c (init_decl_processing): Removed subclass_head and
9269         subclass_next fields.
9270
9271 Wed Oct 28 00:46:15 1998  Jeffrey A Law  (law@cygnus.com)
9272
9273         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
9274         * mangle.c (emit_unicode_mangled_name): Similarly.
9275
9276 Mon Oct 26 12:17:23 1998  Nick Clifton  <nickc@cygnus.com>
9277
9278         * jcf-parse.c (get_constant): Place braces around code to compute
9279         'd' when REAL_ARITHMETIC is not defined.
9280
9281 Sun Oct 25 14:58:05 1998  H.J. Lu  (hjl@gnu.org)
9282
9283         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
9284         dependency.
9285
9286 1998-10-23  Tom Tromey  <tromey@cygnus.com>
9287
9288         * lang-specs.h: `.zip' files are input to jc1.
9289
9290 Thu Oct 22 23:01:54 1998  Per Bothner  <bothner@cygnus.com>
9291
9292         * jvspecs.c:  Add (but don't enable) support for combining multiple
9293         .class and .java input filenames to a single jc1 invocation.
9294         Add support for -C flag (copile to .class files).
9295         Translate -classpath and -CLASSPATH arguments.
9296         * lang-specs.h:  Don't set %2 spec.
9297
9298 1998-10-22  Tom Tromey  <tromey@cygnus.com>
9299
9300         * jcf-path.c (add_entry): Don't add trailing separator if entry is
9301         a .zip file.
9302         (add_path): Don't add trailing separator to non-empty path
9303         elements.
9304
9305         * lang.c (lang_decode_option): Check for -fclasspath and
9306         -fCLASSPATH before examining other `-f' options.
9307
9308         * java-tree.h (finalize_identifier_node): Don't declare.
9309         * class.c (make_class_data): Don't push "final" field.
9310         * decl.c (init_decl_processing): Don't push "final" field.
9311         (finalize_identifier_node): Removed.
9312         (init_decl_processing): Don't set finalize_identifier_node.
9313
9314         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
9315
9316 Sun Oct 11 10:31:52 1998  Anthony Green  <green@cygnus.com>
9317
9318         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
9319         (JV_SCAN_SOURCES): New macro.
9320         (JCF_DUMP_SOURCES): Likewise.
9321         (jcf-dump$(exeext)): New target.
9322         (jv-scan$(exeext)): New target.
9323
9324 1998-10-22  Tom Tromey  <tromey@cygnus.com>
9325
9326         * Makefile.in (LEX): Removed.
9327         (LEXFLAGS): Likewise.
9328         (SET_BISON): New macro.
9329         (BISON): Removed.
9330         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
9331         spurious diffs in parse.c.
9332         ($(PARSE_SCAN_C)): Likewise.
9333         (PARSE_DIR): New macro.
9334         (PARSE_C): Use it.
9335         (PARSE_SCAN_C): Likewise.
9336         (PARSE_RELDIR): New macro.
9337
9338         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
9339
9340         * jcf-io.c (find_class): Use saw_java_source to determine when to
9341         look for `.java' file.
9342         * jcf-parse.c (saw_java_source): New global.
9343         (yyparse): Set it if `.java' file seen.
9344
9345         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
9346         (GCJH_SOURCES): Likewise.
9347         * Makefile.in (datadir): New macro.
9348         (libjava_zip): Likewise.
9349         (JAVA_OBJS): Added jcf-path.o.
9350         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
9351         (../gcjh$(exeext)): Likewise.
9352         (jcf-path.o): New target.
9353         * java-tree.h (fix_classpath): Removed decl.
9354         * jcf-parse.c (fix_classpath): Removed.
9355         (load_class): Don't call fix_classpath.
9356         * parse.y (read_import_dir): Don't call fix_classpath.
9357         * lex.h: Don't mention classpath.
9358         * lex.c (java_init_lex): Don't initialize classpath.
9359         * jcf-io.c (classpath): Removed global.
9360         (find_class): Use jcf_path iteration functions.  Correctly search
9361         class path for .java file.
9362         (open_in_zip): New argument `is_system'.
9363         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
9364         classpath-related options.
9365         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
9366         and -I.
9367         (lang_init): Call jcf_path_init.
9368         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
9369         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
9370         Correctly put braces around second string in each entry.
9371         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
9372         classpath-related options.
9373         (help): Updated for new options.
9374         * jcf.h: Declare functions from jcf-path.c.  Don't mention
9375         `classpath' global.
9376         * jcf-path.c: New file.
9377
9378         * jcf-depend.c: Include jcf.h.
9379
9380         * jcf-write.c (localvar_alloc): Returns `void'.
9381         (localvar_free): Removed unused variable.
9382
9383         * lang.c (OBJECT_SUFFIX): Define if not already defined.
9384         (init_parse): Use OBJECT_SUFFIX, not ".o".
9385
9386 Wed Oct 21 07:54:11 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9387
9388         * class.c (emit_register_classes): Renamed from
9389         emit_register_class.
9390         * java-tree.h (emit_register_classes): Prototype renamed from
9391         emit_register_class.
9392         * jcf-parse.c (yyparse): Call emit_register_classes once before
9393         returning.
9394         * parse.y (java_expand_classes): No longer register classes.
9395
9396 Tue Oct 20 09:15:38 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9397
9398         * class.c (is_compiled_class): New local variable
9399         seen_in_zip. Identify classes found in currently compiled source
9400         file(s).
9401         * decl.c (complete_start_java_method): Fixed typo.
9402         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
9403         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
9404         (CLASS_P): Moved around.
9405         (java_parse_abort_on_error): Macro moved from jcf-parse.c
9406         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
9407         java-parse.h
9408         (jcf_parse_source): Changed leading comment. Removed unnecessary
9409         fclose and CLASS_FROM_SOURCE_P marking.
9410         (parse_source_file): New local variables remember_for_generation
9411         and filename. Mark parsed file name identifier node. Removed block
9412         executed when parse_only was null. Set remember_for_generation.
9413         Use it as an argument to java_pop_parser_context.
9414         (yyparse): New local variables several_files, list, next node and
9415         current_file_list. Split ampersand separated file names into
9416         current_file_list. Iterate through the list and parse accordingly.
9417         * parse.h (java_pop_parser_context): New function prototype.
9418         * parse.y (ctxp_for_generation): New static global variable.
9419         (java_pop_parser_context): New argument generate. Link popped ctxp
9420         to ctxp_for_generation list accordingly.
9421         (java_complete_expand_methods): Fixed indentation.
9422         (java_expand_classes): New function.
9423
9424 Sat Oct 17 11:25:21 1998  Per Bothner  <bothner@cygnus.com>
9425
9426         * Makefile.in:  Link with libiberty.a instead of memmove.o.
9427
9428 Fri Oct 16 10:59:01 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9429
9430         * lex.c (setjmp.h): No longer included.
9431         * lex.h (setjmp.h): Included.
9432         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
9433         (duplicate_declaration_error_p): Renamed from
9434         duplicate_declaration_error.
9435         (build_array_from_name): New function prototype.
9436         * parse.y (setjmp.h): No longer included.
9437         (variable_declarator_id): Define action.
9438         (build_array_from_name): New function.
9439         (duplicate_declaration_error_p): Renamed from
9440         duplicate_declaration_error.  Fixed leading comment.
9441         (register_fields): Main `for' loop reorganized. Uses
9442         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
9443         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
9444         build_array_from_name.
9445         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
9446         types.
9447         (read_import_dir): Don't try to skip `.' and `..'.
9448         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
9449         build_array_from_name. Main `for' loop reorganized.
9450         (resolve_qualified_expression_name): When building access to a
9451         field, use the type where the field was found, not its own type.
9452         (maybe_access_field): Use field DECL_CONTEXT if the type where the
9453         field was found is null.
9454         (qualify_ambiguous_name): Sweep through all successive array
9455         dimensions.
9456
9457 Wed Oct 14 18:21:29 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9458
9459         * java-tree.h (pop_labeled_block, lang_printable_name,
9460         maybe_add_interface, set_super_info, get_access_flags_from_decl,
9461         interface_of_p, inherits_from_p, fix_classpath,
9462         complete_start_java_method, emit_handlers, init_outgoing_cpool,
9463         make_class_data, register_class, alloc_name_constant): New
9464         function prototypes.
9465         * lang.c (lang_decode_option): Set argc argument unused. Fixed
9466         indentation. Added cast to remove warning.
9467         (lang_printable_name): Set v argument unused.
9468         (lang_print_error): Added argument to lang_printable_name call.
9469         (java_dummy_print, print_lang_decl, print_lang_type,
9470         print_lang_identifier, lang_print_xnode): All argument marked
9471         unused.
9472         * lex.c (java_unget_unicode): Removed unnecessary argument.
9473         (java_allocate_new_line): Unused local variable is gone.
9474         (java_read_char): Added parenthesis in expressions to remove
9475         warnings.  Added final return statement.
9476         (java_read_unicode): Added parenthesis in expression to remove
9477         warning.
9478         (java_parse_end_comment): Fixed java_unget_unicode invocation.
9479         (java_parse_escape_sequence): Likewise.
9480         (java_lex): Unused local variables are gone. Fixed
9481         java_unget_unicode invocation.
9482         * lex.h (set_float_handler): Prototype added when JC1_LITE not
9483         defined.
9484         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
9485         lang_printable_name invocation in macro.
9486         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
9487         Likewise.
9488         (duplicate_declaration_error): Suppressed unused argument in
9489         prototype.
9490         (identical_subpath_p): Function declaration is gone.
9491         (patch_invoke): Suppressed unused argument in prototype.
9492         (patch_cast, build_labeled_block, check_thrown_exceptions):
9493         Likewise.
9494         * parse.y (setjmp.h): Included
9495         (toplev.h): Likewise.
9496         (field_declaration:): Suppressed unused local
9497         (label_decl:): Fixed build_labeled_block invocation.
9498         (java_pop_parser_context): Put extra parenthesis around assignment
9499         in if.
9500         (yyerror): Suppressed unused local variables.
9501         (variable_redefinition_error): Fixed lang_printable_name
9502         invocation.
9503         (create_interface): Suppressed unused local variables.
9504         (create_class): Likewise.
9505         (duplicate_declaration_error): Suppressed unused argument. Fixed
9506         lang_printable_name invocation.
9507         (register_fields): Suppressed unused local variable. Fixed
9508         duplicate_declaration_error invocation.
9509         (method_header): Suppressed unused local variable.
9510         (method_declarator, parser_check_super): Likewise.
9511         (java_complete_class): Suppressed unused local variable. Fixed
9512         fatal error message.
9513         (complete_class_report_errors): Added default: in switch.
9514         (java_check_regular_methods): Fixed lang_printable_name
9515         invocations.
9516         (check_throws_clauses): Likewise.
9517         (java_check_abstract_methods): Suppressed unused local
9518         variable. Fixed lang_printable_name invocation.
9519         (read_import_entry): Added supplemental return statement.
9520         (read_import_dir): Suppressed unused local variables.
9521         (check_pkg_class_access, declare_local_variables): Likewise.
9522         (source_start_java_method): Suppressed unused extern variable
9523         declarations
9524         (expand_start_java_method): Suppressed unused extern and local
9525         variable declarations.
9526         (java_complete_expand_methods): Likewise.
9527         (java_complete_expand_method): Suppressed unused local variables.
9528         (make_qualified_name): Likewise.
9529         (resolve_qualified_expression_name): Added default: in
9530         switch. Fixed lang_printable_name invocation.
9531         (class_instance_creation_expression): Added parenthesis around
9532         expressions.
9533         (patch_method_invocation_stmt): Fixed lang_printable_name and
9534         patch_invoke invocations.
9535         (check_for_static_method_reference): Fixed lang_printable_name
9536         invocation.
9537         (patch_invoke): Suppressed unused arguments and local variables.
9538         (lookup_method_invoke): Suppressed unused local variables.
9539         (qualify_ambiguous_name): Added default: in switch.
9540         (identical_subpath_p): Function removed.
9541         (patch_assignment): Suppressed unused local variables. Suppressed
9542         unnecessary if statement. Fixed lang_printable_name invocations.
9543         (try_builtin_assignconv): Fixed lang_printable_name invocations.
9544         (valid_ref_assignconv_cast_p): Parenthesis around
9545         expression. Suppressed unused local variables.
9546         (build_binop): Suppressed unused local variables. fixed
9547         lang_printable_name invocations.
9548         (string_constant_concatenation): Suppressed unused local
9549         variables.
9550         (patch_unaryop): Fixed lang_printable_name invocation.
9551         (patch_cast): Suppressed unnecessary argument. Fixed
9552         lang_printable_name invocation.
9553         (patch_array_ref): Fixed lang_printable_name invocation.
9554         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
9555         (build_labeled_block): Suppressed unused argument.
9556         (generate_labeled_block): Fixed build_labeled_block invocation.
9557         (build_loop_body): Suppressed unused local variables.
9558         (patch_loop_statement): Likewise.
9559         (patch_exit): Fixed lang_printable_name invocation.
9560         (patch_switch_statement): Likewise.
9561         (case_identity): First argument marked unused.
9562         (patch_try_statement): Fixed lang_printable_name invocations.
9563         (patch_synchronized_statement, patch_throw_statement): Likewise.
9564         (check_thrown_exceptions): Fixed check_thrown_exceptions and
9565         lang_printable_name invocations.
9566         (check_thrown_exceptions_do): Suppressed unused argument.
9567
9568 1998-10-14  Tom Tromey  <tromey@cygnus.com>
9569
9570         * jcf-write.c (write_classfile): Add output class file as target.
9571         * lang-options.h: Added -MD, -MMD, -M, and -MM.
9572         * jcf.h: Added declarations for dependency-tracking functions.
9573         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
9574         * lang.c (lang_decode_option): Recognize -MD and -MMD.
9575         (finish_parse): Call jcf_dependency_write.
9576         (dependency_tracking): New global.
9577         (DEPEND_SET_FILE): New define.
9578         (DEPEND_ENABLE): New define.
9579         (init_parse): Enable dependency tracking if required.
9580         Include "flags.h".
9581         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
9582         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
9583         (../gcjh$(exeext)): Likewise.
9584         (jcf-depend.o): New target.
9585         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
9586         (GCJH_SOURCES): Likewise.
9587         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
9588         dep_name argument.
9589         (find_classfile): Added dep_name argument.
9590         (find_class): Compute name of dependency.
9591         (open_in_zip): Call jcf_dependency_add_file.
9592         * gjavah.c (output_file): No longer global.
9593         (usage): Don't mention "gjavah".
9594         (help): Likewise.
9595         (java_no_argument): Likewise.
9596         (version): Likewise.
9597         (main): Recognize and handle -M family of options.
9598         (print_mangled_classname): Return is void.
9599         (process_file): Handle case where output is suppressed.
9600         (HANDLE_END_FIELD): Likewise.
9601         (HANDLE_METHOD): Likewise.
9602         * jcf-depend.c: New file.
9603
9604 Tue Oct 13 23:34:12 1998  Jeffrey A Law  (law@cygnus.com)
9605
9606         * java-tree.def: Add missing newline at EOF.
9607
9608 1998-10-13  Tom Tromey  <tromey@cygnus.com>
9609
9610         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
9611         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
9612         function.
9613         Include <config.h> and "system.h".
9614         (disassemble_method): Undefine RET to avoid clash with
9615         config/i386/i386.h.
9616
9617 Tue Oct 13 03:50:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9618
9619         * decl.c (runtime_exception_type_node, error_exception_type_node):
9620         New global variables.
9621         (init_decl_processing): Initialized.
9622         * expr.c (java_lang_expand_expr): Set caught exception type to
9623         null if catch handler argument doesn't exit.
9624         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
9625         tree codes.
9626         * java-tree.h (runtime_exception_type_node,
9627         error_exception_type_node): Global variables declared.
9628         (DECL_FUNCTION_THROWS): New macro.
9629         (DECL_FUNCTION_BODY): Modified comment.
9630         (DECL_SPECIFIC_COUNT): Likewise.
9631         (struct lang_decl): New field throws_list.
9632         (IS_UNCHECKED_EXPRESSION_P): New macro.
9633         * lex.c (java_lex): Generate location information for THROW_TK.
9634         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
9635         EXCEPTIONS_P): New macros.
9636         (enum jdep_code): New value JDEP_EXCEPTION.
9637         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
9638         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
9639         PATCH_METHOD_RETURN_ERROR): New macros.
9640         (patch_method_invocation_stmt): Added new argument to prototype.
9641         (patch_synchronized_statement, patch_throw_statement,
9642         check_thrown_exceptions, check_thrown_exceptions_do,
9643         purge_unchecked_exceptions, check_throws_clauses): New function
9644         prototypes.
9645         * parse.y Fixed typo in keyword section.
9646         (throw:): Rule tagged <node>.
9647         (THROW_TK): Keyword tagged <operator>.
9648         (method_header:): Last argument to call to method_header passed
9649         from throws: rule.
9650         (throws:, class_type_list:, throw_statement:,
9651         synchronized_statement:, synchronized:): Defined actions.
9652         (method_header): New local variable current. Register exceptions
9653         from throws clause.
9654         (java_complete_tree): Complete and verify exceptions from throws
9655         clause.
9656         (complete_class_report_errors): Error message on exceptions not
9657         found
9658         (java_check_regular_methods): Fixed typo. Shortcut on private
9659         overriding methods. Changed error message on method
9660         redefinition. Check for throws clause compatibility.
9661         (check_throws_clauses): New function.
9662         (java_check_abstract_methods): Use DECL_NAME for wfl or current
9663         method. Changed error message on method redefinition.
9664         (currently_caught_type_list): New static variable.
9665         (java_complete_expand_methods): Purge unchecked exceptions from
9666         throws clause list. Call PUSH_EXCEPTIONS before walk and
9667         POP_EXCEPTIONS after.
9668         (resolve_qualified_expression_name): Pass new argument as NULL to
9669         patch_method_invocation_stmt.
9670         (patch_method_invocation_stmt): New argument ref_decl. Invoke
9671         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
9672         argument list when appropriate. Use new argument if non null to
9673         store selected method decl.
9674         (patch_invoke): Convert if necessary args of builtin types before
9675         forming CALL_EXPR. Argument list no longer reversed here.
9676         (invocation_mode): Treat final methods as static methods.
9677         (java_complete_tree): New cases for THROW_EXPR: and
9678         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
9679         function call.
9680         (complete_function_arguments): No more RECORD_TYPE
9681         conversion. Function parameter nodes no longer saved.
9682         (valid_ref_assignconv_cast_p): Avoid handling null type.
9683         (patch_binop): Fixed null constant reference handling.
9684         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
9685         BUILD_THROW macros.
9686         (patch_try_statement): Fixed comments. Record caught types in
9687         list, push the list, expand try block and pop the list.
9688         (patch_synchronized_statement, patch_throw_statement,
9689         check_thrown_exceptions, check_thrown_exceptions_do,
9690         purge_unchecked_exceptions): New functions.
9691         * typeck.c (lookup_argument_method): Allow WFL in place of method
9692         DECL_NAME during method definition check
9693
9694 1998-10-09  Tom Tromey  <tromey@cygnus.com>
9695
9696         * gjavah.c (decode_signature_piece): New function.
9697         (print_c_decl): Use it.  Added `name_override' argument.
9698         (print_method_info): Use name_override argument to print_c_decl.
9699         (seen_fields): Removed.
9700         (print_field_info): Don't update seen_fields.
9701         (struct method_name): New structure.
9702         (method_name_list): New global.
9703         (print_method_info): Add new method to list of methods.
9704         (name_is_method_p): New function.
9705         (print_field_info): If field name has same name as method, then
9706         change field name.
9707         (process_file): Parse methods before fields.
9708         (field_pass): New global.
9709         (HANDLE_END_FIELD): Take field_pass into account.
9710
9711 Wed Oct  7 12:10:48 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9712
9713         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
9714         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9715
9716 Sat Oct  3 13:29:46 1998  Anthony Green  <green@cygnus.com>
9717
9718         * jvspec.c: Fix bug in jvgenmain_spec patch.
9719
9720 Fri Oct  2 17:22:52 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9721
9722         * Makefile.in (lang.o:): Install dependency on java-tree.def.
9723         * decl.c (soft_exceptioninfo_call_node): New global variable.
9724         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
9725         takes extra integer argument. soft_exceptioninfo_call_node
9726         initialized.
9727         * except.c (java_set_exception_lang_code): New function
9728         (method_init_exceptions): Called here.
9729         (prepare_eh_table_type): New function.
9730         (expand_end_java_handler): Called here.
9731         * expr.c (build_java_throw_out_of_bounds_exception): Now features
9732         one argument. Modified generation of call to
9733         soft_badarrayindex_node to use new argument.
9734         (build_java_arrayaccess): Pass faulty index value to
9735         build_java_throw_out_of_bounds_exception.
9736         (generate_name): New function.
9737         (java_lang_expand_expr): New local variables node, current,
9738         has_finally_p. Expand TRY_EXPR node.
9739         (process_jvm_instruction): Replace top of the stack with thrown
9740         object reference when entering exception handler.
9741         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
9742         specific tree codes.
9743         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
9744         global.
9745         (DECL_SPECIFIC_COUNT): New macro.
9746         (prepare_eh_table_type, java_set_exception_lang_code,
9747         generate_name): New function declarations.
9748         (match_java_method): Declaration deleted.
9749         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
9750         macros.
9751         * lex.c (TRY_TK, CATCH_TK): Generate location information.
9752         * parse.h (redefinition_error, refine_accessible_methods_list,
9753         can_cast_to_p): Function declaration removed.
9754         (classitf_redefinition_error, variable_redefinition_error,
9755         parse_jdk1_1_error, find_applicable_accessible_methods_list,
9756         find_most_specific_methods_list, argument_types_convertible,
9757         enter_a_block, valid_builtin_assignconv_identity_widening_p,
9758         valid_cast_to_p, valid_method_invocation_conversion_p,
9759         try_reference_assignconv, add_stmt_to_compound,
9760         build_jump_to_finally, build_tree_list, patch_try_statement,
9761         java_get_catch_block): New function declarations.
9762         * parse.y (string_buffer_type): Global variable deleted.
9763         (group_of_labels, catches, catch_clause, catch_clause_parameter,
9764         finally): Rules tagged <node>.
9765         (TRY_TK, CATCH_TK): Token tagged <operator>.
9766         (class_body_declaration:, class_member_declaration:,
9767         formal_parameter:, explicit_constructor_invocation:,
9768         interface_member_declaration:, constant_declaration:,
9769         primary_no_new_array:, class_instance_creation_expression:,
9770         array_creation_expression:): Issue error on unsuported JDK1.1
9771         features.
9772         (try_statement:, catches:, finally:): Define actions.
9773         (catch_clause_parameter): New rule.
9774         (catch_clause:): Use new rule catch_clause_parameter.
9775         (parse_jdk1_1_error): New function.
9776         (redefinition_error): Renamed classitf_redefinition_error.
9777         (variable_redefinition_error): New function.
9778         (check_class_interface_creation): Call
9779         classitf_redefinition_error.
9780         (java_complete_tree): Added error message on JDEP_TYPE: case.
9781         (complete_class_report_errors): Fixed indentation.
9782         (declare_local_variables): Call variable_redefinition_error.
9783         (source_end_java_method): Call java_set_exception_lang_code and
9784         emit_handlers where appropriate.
9785         (java_method_add_stmt): Call add_stmt_to_block.
9786         (add_stmt_to_block): New function.
9787         (lookup_method_invoke): Fixed outside comment. new local variable
9788         candicates.  Call find_applicable_accessible_methods_list and
9789         find_most_specific_methods_list when searching for a
9790         method. Modified error report to list possible candidates when
9791         applicable.
9792         (find_applicable_accessible_methods_list,
9793         find_most_specific_methods_list, argument_types_convertible): New
9794         function.
9795         (refine_accessible_methods_list): Function deleted.
9796         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
9797         expr (if applicable) before calling patch_array_ref.
9798         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
9799         (enter_block): Fixed comment.
9800         (enter_a_block): New function.
9801         (patch_assignment): Reorganized. Call try_reference_assignconv for
9802         references. Call valid_cast_to_p instead of can_cast_to_p.
9803         (try_reference_assignconv,
9804         valid_builtin_assignconv_identity_widening_p): New functions.
9805         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
9806         (valid_cast_to_p, valid_method_invocation_conversion_p): New
9807         functions.
9808         (build_string_concatenation): Don't resolve StringBuffer.
9809         (patch_cast): Fixed inverted arguments.
9810         (patch_array_ref): Code to save array expr deleted. Call
9811         valid_cast_to_p instead of can_cast_to_p.
9812         (generate_labeled_block): Call generate_name.
9813         (build_jump_to_finally, build_try_statement, java_get_catch_block,
9814         patch_try_statement): New functions.
9815         * typeck.c (match_java_method): Function deleted.
9816
9817 Fri Oct  2 13:48:36 1998  Anthony Green  <green@cygnus.com>
9818
9819         * jvspec.c: jvgenmain_spec uses different temporary file names.
9820
9821 Fri Oct  2 12:50:19 1998  Anthony Green  <green@cygnus.com>
9822
9823         * jvspec.c (lang_specific_driver): Fail if user specifies
9824         --main= when not linking.
9825
9826 Mon Sep 28 13:48:33 1998  Tom Tromey  <tromey@cygnus.com>
9827
9828         * class.c (make_class_data): Push value for `thread' field.
9829         * decl.c (init_decl_processing): Added `thread' field to class.
9830
9831         * class.c (add_field): Always make static fields externally
9832         visible.
9833
9834 Sat Sep 26 08:22:47 1998  Anthony Green  <green@cygnus.com>
9835
9836         * expr.c (build_java_athrow,
9837         build_java_throw_out_of_bounds_exception, expand_invoke,
9838         build_newarray, expand_java_multianewarray, build_java_monitor):
9839         Update comments to reflect _Jv_* function names.
9840
9841 Fri Sep 25 16:03:02 1998  Per Bothner  <bothner@cygnus.com>
9842
9843         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
9844         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
9845         * parse.y (expand_start_java_method):  Likewise.
9846
9847 Thu Sep 24 12:20:35 1998  Per Bothner  <bothner@cygnus.com>
9848
9849         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
9850
9851         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
9852         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
9853         * expr.c:  Remove no-longer-needed calls to promote_type.
9854         * decl.c (give_name_to_locals):  Liekwise.
9855         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
9856         * parse.y:  Add/remove promote_type calls as appropriate.
9857         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
9858         (parse_signature_string):  Likewise.
9859         (build_java_array_type):  Fix for now signature convenions.
9860
9861         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
9862
9863 Wed Sep 23 14:49:35 1998  Tom Tromey  <tromey@cygnus.com>
9864
9865         * class.c (init_class_processing): libjava function renamed to
9866         _Jv_RegisterClass.
9867
9868 Tue Sep 22 12:00:02 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9869
9870         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
9871         * java-tree.def: Fixed DEFTREECODE third argument.
9872         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
9873         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
9874         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
9875         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
9876         JAVA_THIS_EXPR): Now replaced by tree code definitions.
9877         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
9878         * lang.c (java_tree_code_type, java_tree_code_length,
9879         java_tree_code_name): New arrays.
9880         (lang_init): Append Java tree node definitions to Gcc ones.
9881         * lex.c (expression_obstack): Declared as extern when JC1_LITE
9882         defined.
9883         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
9884         wfl_to_string.
9885         (java_lex): Allow declaration of empty string constants. Retain
9886         location information on CASE_TK and DEFAULT_TK.
9887         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
9888         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
9889         Modified to be more robust.
9890         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
9891         (build_new_invocation, try_builtin_assignconv,
9892         patch_switch_statement, string_constant_concatenation,
9893         build_string_concatenation, patch_string_cst, patch_string,
9894         java_expand_switch): New function declarations.
9895         * parse.y: Rules related to switch and EH tagged <node>.
9896         (label_id): Set to NULL_TREE
9897         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
9898         tree nodes.
9899         (this_or_super:): Fixed indentation.
9900         (statement:, statement_nsi:, statement_without_trailing_substatement:,
9901         statement_expression:): Removed call to RULE on all sub-rules.
9902         (switch_expression:, switch_labels:): New rules.
9903         (switch_statement:, switch_block:, switch_block_statement_groups:,
9904         switch_block_statement_group:, switch_labels:, switch_label:):
9905         Defined actions.
9906         (throw_statement:, synchronized_statement:, try_statement:):
9907         Defined temporary actions.
9908         (class_instance_creation_expression:): Call
9909         build_new_invocation. Fixed indentation.
9910         (field_access): Fixed indentation.
9911         (method_invocation): Likewise.
9912         (make_qualified_primary): Use THIS_EXPR.
9913         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
9914         resolving from SUPER, set *type_found.
9915         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
9916         (java_complete_tree): Removed unused local variable `location'. Case
9917         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
9918         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
9919         on MODIFY_EXPR: and all binary operator tree code cases. Removed
9920         STRING_CST: case. default: checks for patchable strings.
9921         (complete_function_arguments): Transform string constant or
9922         crafted StringBuffer if necessary.
9923         (build_method_invocation): Fixed comments.
9924         (build_new_invocation): New function.
9925         (patch_assignment): Call try_builtin_assignconv to figure a valid
9926         assignment conversion between builtin types.
9927         (try_builtin_assignconv): New function.
9928         (build_binop): Use URSHIFT_EXPR directly to call build.
9929         (operator_string): Use UNARY_PLUS_EXPR.
9930         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
9931         operator.
9932         (do_merge_string_cste, merge_string_cste,
9933         string_constant_concatenation, build_string_concatenation,
9934         patch_string, patch_string_cst): New function.
9935         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
9936         (patch_unaryop): Likewise. New test of valid ++/-- operands.
9937         (build_newarray_node): Use NEW_ARRAY_EXPR.
9938         (build_this): Use THIS_EXPR.
9939         (build_return): Enable debug information on return statement.
9940         (build_if_else_statement): Likewise.
9941         (complete_labeled_statement): Fixed related comment.
9942         (build_loop_body): Fixed comment.
9943         (build_bc_statement): Enable debug information on break/continue
9944         statements.
9945         (patch_bc_statement): Fixed typos. Handle SWITCH statement
9946         context.
9947         (patch_switch_statement, case_identity, java_expand_switch): New
9948         functions.
9949
9950 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
9951
9952         * buffer.h (BUFFER_INIT):  New macro.
9953         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
9954         Pass (struct jcf_partial *state) to most functions.
9955         (jcf_block, jcf_relocation):  New types.
9956         Support labels, branches, conditionals, loops.
9957
9958 Mon Sep 21 15:08:48 1998  Tom Tromey  <tromey@cygnus.com>
9959
9960         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
9961
9962 Mon Sep 21 13:21:35 1998  Per Bothner  <bothner@cygnus.com>
9963
9964         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
9965         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
9966         not integer_type_node (INT_TYPE_SIZ bits).
9967
9968         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
9969
9970         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
9971         * jcf-dump.c (print_exception_table):  New function.
9972         (disassemble_method):  Better handling of wide instructions.
9973         Make more robust for bad input.
9974
9975 Wed Sep 30 20:53:51 1998  Jeffrey A Law  (law@cygnus.com)
9976
9977         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
9978         FreeBSD.
9979
9980 Thu Sep 17 19:45:01 1998  Jeffrey A Law  (law@cygnus.com)
9981
9982         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
9983
9984 Thu Sep 17 16:21:52 1998  Tom Tromey  <tromey@cygnus.com>
9985
9986         * Makefile.in ($(PARSE_H)): Removed target.
9987
9988 Thu Sep 17 01:57:07 1998  Jeffrey A Law  (law@cygnus.com)
9989
9990         * Makefile.in (JAVA_OBJS): Add memmove.o
9991         (memmove.o): New target & rules.
9992
9993 Tue Sep 15 23:21:55 1998  Tom Tromey  <tromey@cygnus.com>
9994
9995         * expr.c (expand_invoke): Don't generate a call to the class init
9996         code.
9997
9998 Mon Sep 14 10:14:47 1998  Jeffrey A Law  (law@cygnus.com)
9999
10000         * Makefile.in: Add many missing dependencies.
10001         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
10002         as appropriate.
10003         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
10004         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
10005
10006 Fri Sep 11 14:05:21 1998  Per Bothner  <bothner@cygnus.com>
10007
10008         * decl.c (complete_start_java_method):  If method is static (and
10009         not private) call _Jv_InitClass.
10010         * expr.c (expand_invoke):  Don't call build_class_init.
10011
10012         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
10013
10014 Thu Sep 10 10:33:31 1998  Jeffrey A Law  (law@cygnus.com)
10015
10016         * Make-lang.in (GCJ): Define before using.
10017
10018 Wed Sep  9 21:23:10 1998  Jeffrey A Law  (law@cygnus.com)
10019
10020         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
10021         losing due to namespace pollution in GNU getopt.h
10022
10023 Wed Sep  9 13:33:39 1998  Tom Tromey  <tromey@cygnus.com>
10024
10025         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
10026         (java.all.cross): Likewise.
10027         (java.rest.encap): Likewise.
10028
10029 Tue Sep  8 10:34:05 1998  Jeffrey A Law  (law@cygnus.com)
10030
10031         * gjavah.c (print_class_decls): Fix thinko in arglist
10032         * jcv-io.c (find_classfile): Similarly.
10033
10034 Mon Sep  7 13:59:49 1998  Jeffrey A Law  (law@cygnus.com)
10035
10036         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
10037
10038 Sat Sep  5 16:08:01 1998  Tom Tromey  <tromey@cygnus.com>
10039
10040         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
10041         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
10042         * Makefile.in (PARSE_C): New macro.
10043         (PARSE_H): Likewise.
10044         (PARSE_SCAN_C): Likewise.
10045         ($(PARSE_C)): Target renamed from parse.c.
10046         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
10047         (clean): Remove parse-scan.c as well.
10048         (parse.o): Depend on $(PARSE_C).
10049
10050 Sat Sep  5 08:48:40 1998  Anthony Green  <green@cygnus.com>
10051
10052         * README, license.terms: Removed.
10053
10054         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
10055         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
10056         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
10057         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
10058         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
10059         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
10060         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
10061         and Java trademark attribution.
10062
10063 Fri Sep  4 10:42:05 1998  Tom Tromey  <tromey@cygnus.com>
10064
10065         * Makefile.in: Use gcjh, not gjavah.
10066         * config-lang.in (stagestuff): Use gcjh, not gjavah.
10067         * Make-lang.in: Changed gjavah to gcjh everywhere.
10068
10069 Thu Sep  3 18:04:09 1998  Per Bothner  <bothner@cygnus.com>
10070
10071         * gjavah.c:  Support new -prepend -add -append flags.
10072         (print_method_info):  Method is not virtual if class is final.
10073
10074 Thu Sep  3 12:03:53 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10075
10076         * jv-scan.c: Fixed copyright assignment.
10077         * keyword.gperf: Likewise.
10078         * keyword.h: Likewise.
10079         * lex.c: Fixed copyright assignment.
10080         (java_lex): Push unicode back when parsing '<'.
10081         * lex.h: Fixed copyright assignment.
10082         * parse-scan.y: Likewise.
10083         * parse.h: Fixed copyright assignment.
10084         (build_debugable_stmt, complete_for_loop): New function prototypes.
10085         * parse.y: Fixed copyright assignment.
10086         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
10087         size_zero_node when completing a loop with no exit condition.
10088         (for_statement_nsi:): Define action.
10089         (for_init:, for_update:): Return size_zero_node when empty.
10090         (declare_local_variables): Call build_debugable_stmt.
10091         (build_debugable_stmt): New function.
10092         (build_loop_body): Build debugable statement around loop
10093         condition part.
10094         (complete_loop_body): Take into account the debugable statement
10095         around the EXIT_EXPR.
10096         (complete_loop_body): New function.
10097         (patch_exit_expr): Fixed condition inversion.
10098
10099 Wed Sep  2 11:53:58 1998  Tom Tromey  <tromey@cygnus.com>
10100
10101         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
10102         name of thread define.
10103         * jvspec.c (THREAD_NAME): New macro.
10104         (GCLIB): Likewise.
10105         (THREADLIB): Likewise.
10106         (lang_specific_driver): Recognize attempt to link with thread
10107         library or gc library.  Recognize -ljava on command line so it
10108         isn't linked against more than once.
10109
10110 Wed Sep  2 11:28:35 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10111
10112         * parse-scan.y (report_main_declaration): Name of the class
10113         containing `main' can be a qualified name.
10114
10115 Mon Aug 31 13:25:58 1998  Tom Tromey  <tromey@cygnus.com>
10116
10117         * config-lang.in: Changed gjavac to gjc everywhere.
10118         * Make-lang.in: Changed gjavac to gjc everywhere.
10119
10120 Thu Aug 27 02:28:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10121
10122         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
10123         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
10124         and install the files.
10125         * Makefile.in (JAVA_OBJS_LITE): New variable.
10126         (compiler:): Now include jv-scan as a dependency.
10127         (../jv-scan$(exeext), parse-scan.c): New targets.
10128         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
10129         * config-lang.in (compilers): Removed gcj, gjavah from the list.
10130         * jcf-parse.c (parse_source_file): Call java_layout_classes and
10131         check for errors even if parse_only.
10132         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
10133         defined.
10134         (yylex): New function. Uses java_lex body.
10135         (java_lex): Removed commented out statement. Remove local variable
10136         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
10137         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
10138         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
10139         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
10140         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
10141         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
10142         where appropriate.
10143         (java_lex_error): Empty if JC1_LITE is defined.
10144         (java_get_line_col): Return 0 if JC1_LITE is defined.
10145         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
10146         SET_MODIFIER_CTX): Moved into the section containing the macros
10147         conditionally defined by JC1_LITE.
10148         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
10149         argument if JC1_LITE is defined.
10150         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
10151         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
10152         is defined.
10153         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
10154         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
10155         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
10156         to different values according to JC1_LITE.
10157         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
10158         declared if JC1_LITE set.
10159         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
10160         defined if JC1_LITE not set.
10161         (struct parser_ctx): Reorganized and skip the jc1 front end part
10162         if JC1_LITE set.
10163         (java_layout_classes): New function definition.
10164         (java_push_parser_context, java_init_lex, yyparse, yylex,
10165         yyerror): Prototype always declared. All other static function
10166         prototypes declared only if JC1_LITE is not set.
10167         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
10168         declared in parse.h.
10169         (java_layout_classes): New function.
10170         (java_complete_expand_methods): No longer layout the class here.
10171         * parse-scan.y: New file.
10172         * jv-scan.c: New file.
10173
10174 Tue Aug 25 10:17:54 1998  Tom Tromey  <tromey@cygnus.com>
10175
10176         * gjavah.c (main): Handle -friend option.
10177         (friend_specs): New global.
10178         (generate_access): Handle friend_specs.
10179         (process_file): Likewise.
10180         (MAX_FRIENDS): New macro.
10181         (friend_count): New global.
10182         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
10183         Changed all callers.
10184
10185 Mon Aug 24 20:19:27 1998  Per Bothner  <bothner@cygnus.com>
10186
10187         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
10188         (main):  Handle processing all the entries of a named .zip archive.
10189         * jcf-io.c (jcf_trim_old_input):  New function.
10190         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
10191
10192 Mon Aug 24 07:35:13 1998  Per Bothner  <bothner@cygnus.com>
10193
10194         * lang.c (flag_assume_compiled):  Make default be on.
10195
10196 Fri Aug 21 17:29:04 1998  Per Bothner  <bothner@cygnus.com>
10197
10198         * jcf-dump.c:  Add bunches of flags to control output more.
10199         (process_class):  New function;  support printing more than one class.
10200         (main): Support new --print-main and --javap flags.
10201         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
10202         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
10203
10204 Thu Aug 20 14:24:47 1998  Per Bothner  <bothner@cygnus.com>
10205
10206         Change mangling of dispatch table to match C++ vtable (w/thunks).
10207         * class.c (build_dtable_decl), java-tree.h:  New function.
10208         (make_class_data):  Call it.
10209         * decl.c (init_decl_processing):  Likewise.
10210
10211 Wed Aug 19 17:57:07 1998  Warren Levy  <warrenl@cygnus.com>
10212
10213         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
10214         soft_anewarray; adjust args passed.
10215         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
10216         match _Jv_NewObjectArray.
10217
10218 Wed Aug 19 09:33:23 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10219
10220         * decl.c (push_labeled_block, pop_labeled_block): New functions.
10221         * expr.c (loopup_label): Call create_label_decl.
10222         (create_label_decl): New function.
10223         (java_lang_expand_expr): Call expand_start_bindings with argument
10224         set to zero.
10225         * java-tree.h Added space after PROTO in function declarations
10226         when necessary.
10227         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
10228         (create_label_decl, push_labeled_block): New function
10229         declarations.
10230         * lex.c (label_id): Initialize.
10231         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
10232         switch.
10233         * parse.h Added space after PROTO in function declarations when
10234         necessary.
10235         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
10236         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
10237         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
10238         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
10239         macros.
10240         (struct parser_ctxt): New fields current_loop,
10241         current_labeled_block.
10242         (build_if_else_statement, patch_if_else_statement,
10243         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
10244         generate_labeled_block, complete_labeled_statement,
10245         build_bc_statement, patch_bc_statement, patch_loop_statement,
10246         build_new_loop, build_loop_body, complete_loop_body): New function
10247         declarations.
10248         * parse.y (java_warning_count): New global variable.
10249         (label_id): New static variable.
10250         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
10251         (block:): Return size_zero_node when block is empty.
10252         (empty_statement:): Return size_zero_node.
10253         (statement:): Implement supplemental action when for_statement: is
10254         reduced.
10255         (label_decl:): New rule.
10256         (labeled_statement:): Rewritten using label_decl. Actions
10257         implemented.
10258         (labeled_statement_nsi:): Likewise.
10259         (if_then_statement): Actions implemented.
10260         (while_expression): New rule.
10261         (while_statement:): Rewritten using while_expression. Actions
10262         implemented.
10263         (while_statement_nsi:): Likewise.
10264         (do_statement_begin:): New rule.
10265         (do_statement:): Rewritten using do_statement_begin. Actions
10266         implemented.
10267         (for_statement:): Rewritten using for_begin. Actions implemented.
10268         (for_statement_nsi:): Likewise.
10269         (for_header:, for_begin:): New rules.
10270         (for_init:): Actions implemented.
10271         (statement_expression_list:, break_statement:,
10272         continue_statement:): Likewise.
10273         (yyerror): Count number of issued warning(s).
10274         (java_report_errors): Report error(s) and/or warning(s).
10275         (java_complete_class): Use build_java_argument_signature to
10276         recompute completed method signature.
10277         (java_check_regular_methods): New locals method_wfl and aflags.
10278         Use method_wfl instead of lookup_cl during error reports. Fixed
10279         indentation and modified some error messages. Use
10280         lang_printable_name in method instead of the DECL_NAME. New code
10281         to issue warnings on methods not overriding corresponding methods
10282         private to a different package.
10283         (java_method_add_stmt): Call add_stmt_to_compound.
10284         (add_stmt_to_compound): New function.
10285         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
10286         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
10287         (build_if_else_statement, patch_if_else_statement,
10288         build_labeled_block, generate_labeled_block,
10289         complete_labeled_statement, build_new_loop, build_loop_body,
10290         complete_loop_body, patch_loop_statement, build_bc_statement,
10291         patch_bc_statement, patch_exit_expr): New functions.
10292         * typeck.c (build_java_signature): Build argument signature before
10293         enclosing it in between parenthesis.
10294
10295 Mon Aug 17 17:44:24 1998  Warren Levy  <warrenl@cygnus.com>
10296
10297         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
10298         (JAVA_OBJS): Added reminder comment
10299
10300 Thu Aug 13 10:01:45 1998  Nick Clifton  <nickc@cygnus.com>
10301
10302         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
10303         be interpreted as a long long.
10304
10305 Thu Aug 13 14:34:07 1998  Warren Levy  <warrenl@cygnus.com>
10306
10307         * decl.c (init_decl_processing): Use _Jv_InitClass, not
10308         soft_initialise_class.  Use _Jv_NewMultiArray, not
10309         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
10310         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
10311         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
10312         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
10313
10314 Wed Aug 12 14:23:13 1998  Per Bothner  <bothner@cygnus.com>
10315
10316         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
10317         length_identifier_node):  New global tree node constants.
10318         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
10319         Replace uses by super_identifier_node etc.
10320         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
10321
10322         * parse.y (resolve_field_access):  Don't special-case ".length" if
10323         flag_emit_class_files.
10324         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
10325         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
10326         and ARRAY.length.
10327
10328 Tue Aug 11 11:31:55 1998  Per Bothner  <bothner@cygnus.com>
10329
10330         * decl.c (init_decl_processing): Remove unused method_type_node fields.
10331         * class.c (make_method_value):  Remove init for removed fields.
10332
10333         * class.c (layout_class):  Use build_java_argument_signature.
10334         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
10335
10336         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
10337         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
10338         (build_java_signature):  Don't use push_java_argument_signature.
10339
10340         * typeck.c (lookup_argument_method):  New function.
10341         * parse.y (java_check_regular_methods):  Use lookup_argument_method
10342         instead of lookup_java_method2 followed by lookup_java_method.
10343
10344         * parse.y (check_method_redefinition):  Minor optimization.
10345
10346         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
10347         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
10348
10349 Mon Aug 10 09:57:15 1998  Tom Tromey  <tromey@cygnus.com>
10350
10351         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
10352         c-pragma.o.
10353
10354         * gjavah.c (java_float_finite): Use K&R-style definition.
10355         (java_double_finite): Likewise.
10356         (generate_access): Now returns void.  Changed all callers.
10357         (last_access_generated): Removed.
10358         (process_file): Only make a single pass over the .class file.
10359
10360 Wed Jul 29 17:50:23 1998  Per Bothner  <bothner@cygnus.com>
10361
10362         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
10363         for compatibility for G++ (with -fvtable-thunks).
10364         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
10365
10366         * gjavah.c (process_file):  Use public inheritance for super-class.
10367
10368 Wed Jul 29 13:19:03 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10369
10370         * lex.c (java_init_lex): Initialize ctxp->package.
10371         * parse.h (struct parser_ctxt): package and package_len replaced
10372         by tree package, an identifier node. Field method_decl_list is
10373         gone. Fixed comments.
10374         (lookup_field_wrapper, merge_qualified_name, not_accessible,
10375         class_in_current_package): New function prototypes.
10376         * parse.y (array_type:): Set class loaded flag on primitive type
10377         arrays.
10378         (package_declaration:): Assign ctxp->package to the
10379         identifier node.
10380         (method_invocation:): Handle invocation of method qualified by
10381         `super'.
10382         (single_type_import_declaration:): Removed ambiguity check.
10383         (java_pop_parser_context): New local variable `next'. Reset and
10384         set IMPORT_CLASSFILE_NAME flags on current and previous import
10385         list.
10386         (java_accstring_lookup): Use new local macro COPY_RETURN.
10387         (lookup_field_wrapper): New function.
10388         (parser_qualified_classname): Use merge_qualified_name.
10389         (parser_check_super_interface): Broaden error message.
10390         (do_resolve_class): Check for qualified class name in the current
10391         compilation unit if appropriate.
10392         (process_imports): Check for already defined classes.
10393         (check_pkg_class_access): Got rid of call to
10394         get_access_flags_from_decl.
10395         (java_complete_expand_methods): Call safe_layout_class based on
10396         the current class size.
10397         (make_qualified_primary): Build a WFL qualification on primary if
10398         none exists.
10399         (merge_qualified_name): New function.
10400         (make_qualified_name): Use merge_qualified_name.
10401         (resolve_expression_name): Use safe_lookup_field.
10402         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
10403         (resolve_qualified_expression_name): Likewise. Check on resolved
10404         element accessibility.
10405         (not_accessible_p, class_in_current_package): New functions.
10406         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
10407         (patch_method_invocation_stmt): Merged common pieces. Check
10408         accessibility of invoked method.
10409         (check_for_static_method_reference): Add returned type in error
10410         message.
10411         (invocation_mode): Get rid of bogus check on PRIVATE methods.
10412         (refine_accessible_methods_list): Merged two conditions in test.
10413         (java_complete_class): Sanity check on stabilize_ref gone.
10414         * zextract.c (read_zip_archive): Cast lseek second argument to long.
10415
10416 Tue Jul 28 21:39:22 1998  Per Bothner  <bothner@cygnus.com>
10417
10418         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
10419
10420 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
10421
10422         * gjavah.c (F_NAN): Removed.
10423         (F_NAN_MASK): New macro.
10424         (F_POSITIVE_INFINITY): Removed.
10425         (F_NEGATIVE_INFINITY): Likewise.
10426         (java_float_finite): Rewrote.
10427         (D_NAN_MASK): Renamed.
10428         (java_double_finite): Rewrote.
10429         (D_POSITIVE_INFINITY): Removed.
10430         (D_NEGATIVE_INFINITY): Likewise.
10431
10432         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
10433         If verbose, print underlying representation of value in hex.
10434
10435 Fri Jul 24 14:14:32 1998  Per Bothner  <bothner@cygnus.com>
10436
10437         * buffer.h, buffer.c:  New files.
10438         * Makefile.in (JAVA_OBJS):  Add buffer.o.
10439
10440         Support locals variables and writing their debug entries to .class.
10441         * jcf-write.c:  Simplify some by user new buffer type.
10442         (vode_buffer_grow):  Removed.
10443         (struct localvar_info):  New type.
10444         (localsvars, localvartable):  New buffers.
10445         (localvar_alloc, localvar_free):  New functions.
10446         (generate_bytecode_insns):  Handle local variables.
10447         (generate_classfile):  Write LocalVariableTable attribute.
10448
10449 Fri Jul 24 13:46:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10450
10451         * jcf-io.c (open_in_zip): Check the zipfile magic number.
10452         * zipfile.h (ZIPMAGIC): New macro.
10453
10454 Fri Jul 24 10:43:25 1998  Tom Tromey  <tromey@cygnus.com>
10455
10456         * Makefile.in (gjavah.o): Updated dependencies.
10457         (jcf-dump.o): Likewise.
10458         (all.indirect): Use ../gjavah.
10459         (../gjavah$(exeext)): Likewise.
10460         (clean): Don't remove gjavah.
10461         (clean): Remove parse.c, not java/parse.c.
10462         * Make-lang.in (java): Added gjavah.
10463         (gjavah$(exeext)): New target.
10464         (GJAVAH_SOURCES): New macro.
10465         (java.all.build): Added gjavah.
10466         (java.all.cross): Likewise.
10467         (java.rest.encap): Likewise.
10468         * config-lang.in (compilers, stagestuff): Added gjavah.
10469
10470 Thu Jul 23 18:33:56 1998  Tom Tromey  <tromey@cygnus.com>
10471
10472         * gjavah.c (java_float_finite): New function.
10473         (java_double_finite): Likewise.
10474         (F_POSITIVE_INFINITY): New macro.
10475         (F_NEGATIVE_INFINITY): Likewise.
10476         (F_NAN): Likewise.
10477         (D_POSITIVE_INFINITY): Likewise.
10478         (D_NEGATIVE_INFINITY): Likewise.
10479         (D_NAN): Likewise.
10480         (print_field_info): Use java_float_finite and java_double_finite.
10481
10482 Thu Jul 23 15:28:24 1998  Per Bothner  <bothner@cygnus.com>
10483
10484         * parse.y (method_header):  Name "this" implicit argument.
10485
10486 Wed Jul 22 15:47:30 1998  Per Bothner  <bothner@cygnus.com>
10487
10488         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
10489         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
10490         (put_linenumber):  New function.
10491         (generate_bytecode_insns, generate_classfile):  Write line numbers.
10492
10493 Wed Jul 22 14:39:00 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10494
10495         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
10496         (lookup_name, build_known_method_ref, build_class_init,
10497         build_invokevirtual, invoke_build_dtable, match_java_method,
10498         build_field_ref, pushdecl_force_head, build_java_binop,
10499         binary_numeric_promotion, build_decl_no_layout,
10500         build_java_arrayaccess, build_newarray, build_anewarray,
10501         build_java_array_length_access, build_java_arraynull_check): New
10502         extern function prototypes.
10503         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
10504         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
10505         java-tree.h.
10506         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
10507         to NULL
10508         * jcf.h (jcf_out_of_synch): New extern function prototype.
10509         * parse.h: Static/global function implemented in parse.y
10510         prototyped and declarations moved at the end of the file.
10511         (DECL_P): Check that the argument isn't null.
10512         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
10513         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
10514         (QUAL_DECL_TYPE): New macro.
10515         (PARAMS): Macro definition removed.
10516         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
10517         (return_statement:): Call build_return.
10518         (field_access:): Call make_qualified_primary in sub rule.
10519         (method_invocation:): Build method invocation and call
10520         make_qualified_primary when processing primaries.
10521         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
10522         get_type_from_signature.
10523         (java_check_regular_method): Extra integer 0 argument when calling
10524         lookup_java_method2.
10525         (lookup_java_interface_method2): Extra method DECL argument when
10526         calling lookup_java_interface_method2.
10527         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
10528         COMPOUND_EXPR node.
10529         (java_complete_expand_method): Layout current class iff not
10530         already done. Don't process interface's methods.
10531         (java_complete_expand_method): Use super class only if it
10532         exists. Use current class otherwise.
10533         (make_qualified_primary): New function.
10534         (resolve_expression_name): Process qualified expression or
10535         expression from primary the same way.
10536         (resolve_expression_name): Two last arguments to
10537         resolve_field_access are now NULL_TREEs.
10538         (resolve_field_access): New variable is_static. Local field must
10539         be DECLs. is_static computed on field DECLs only. Append code in
10540         where_found to the field access if necessary. Use QUAL_DECL_TYPE
10541         to initialize field_type.
10542         (resolve_qualified_expression_name): New local variable,
10543         previous_call_static and is_static. Handle primaries with function
10544         calls, casts, array references and `this'. `super' now handled as
10545         `(super_class)this'. Use is_static to clarify boolean expressions.
10546         Added code to handle case where a proper handle is required to
10547         access a field. Use QUAL_DECL_TYPE where applicable.
10548         (maybe_access_field): New function.
10549         (patch_method_invocation_stmt): New arguments primary, where,
10550         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
10551         deleted. Use `where' as a type to search from if specified. Check
10552         for static method reference where forbidden. Append primary or
10553         current_this to the argument list if not calling constructor nor
10554         static methods.
10555         (check_for_static_method_reference): New function.
10556         (patch_invoke): Layout the class on which new is done if
10557         necessary.
10558         (lookup_method_invoke): Changed format to report errors on
10559         methods.
10560         (qualify_ambiguous_name): New local variable this_found. Now
10561         handle things from primaries. Method call are considered
10562         expression names.
10563         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
10564         changed into NULLs.
10565         (not_initialized_as_it_should_p): Comply with the new DECL_P.
10566         (java_complete_tree): New case fo RETURN_EXPR. Process function
10567         call arguments in separate function.
10568         (complete_function_arguments): New function.
10569         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
10570         anymore.
10571         (patch_assignment): Take the return function slot into account as
10572         a RHS. Distinguish assignment from a return.
10573         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
10574         when checking methods in interfaces.
10575         (resolve_type_during_patch): NULL argument to unresolve_type_p
10576         instead of NULL_TREE.
10577         (patch_newarray): Fixed typo in comment.
10578         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
10579         (build_return, patch_return): New functions.
10580         * typeck.c (lookup_java_constructor): Fixed typo in comment.
10581
10582 Tue Jul 21 12:10:04 1998  Per Bothner  <bothner@cygnus.com>
10583
10584         * constants.c (find_name_and_type_constant, find_fieldref_index,
10585         find_methodref_index):  New methods.
10586         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
10587         just return given method.  Also, rename to build_known_method_ref.
10588         (expand_invoke):  Rename call to build_invoke_non_interface.
10589         * java-tree.h, parse.h:  Update prototype.
10590         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
10591         (such as expand_expr_stmt) if flag_emit_class_files.
10592         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
10593         STACK_TARGET, IGNORE_TARGET):  New macros.
10594         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
10595         (generate_bytecode_insn):  New function to generate method's bytecode.
10596         (generate_classfile):  Node generate Code attribute for a method.
10597         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
10598         push_long_const, field_op, adjust_typed_op, maybe_wide):
10599         New functions used by generate_bytecode_insn.
10600
10601         * typeck.c (signature_include_return):  Remove variable.
10602         (push_java_argument_signature, build_java_argument_signature):  New.
10603         (build_java_signature):  Use push_java_argument_signature.
10604         * parse.y:  Use build_java_argument_signature instead of fiddling
10605         with signature_include_return.
10606
10607 Fri Jul 17 09:48:51 1998  Tom Tromey  <tromey@cygnus.com>
10608
10609         * gjavah.c (print_c_decl): Always generate JArray<>* for array
10610         types.
10611
10612         * Makefile.in (all.indirect): Added gjavah$(exeext).
10613         (gjavah$(exeext)): Added $(exeext).
10614         (clean): Likewise.
10615
10616 Thu Jul 16 15:29:20 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10617
10618         * class.c (layout_class): Call to java_layout_parsed_class replace
10619         by safe_layout_class.
10620         * expr.c (build_java_array_length_access): Removed static storage
10621         class in the function definition.
10622         (build_java_arraynull_check): Likewise.
10623         Also fixed typos in two comments.
10624         * lex.c (java_init_lex): Initialize static global kw_length.
10625         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
10626         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
10627         java_lex_error.
10628         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
10629         * parse.h (resolve_no_layout): New static function declaration.
10630         (get_identifier_in_static): Declaration removed.
10631         (java_layout_parsed_class): Function name declaration changed to
10632         safe_layout_class.
10633         (build_newarray_node, patch_newarray, resolve_type_during_patch,
10634         not_initialized_as_it_should_p, build_this): New static function
10635         declarations.
10636         (pushdecl_force_head, build_java_binop, int_fits_type_p,
10637         binary_numeric_promotion, stabilize_reference,
10638         build_decl_no_layout, build_java_arrayaccess): Extern function
10639         declarations moved into their own section.
10640         (build_newarray, build_anewarray, build_java_array_length_access,
10641         build_java_arraynull_check): New extern function declarations.
10642         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
10643         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
10644         fake tree codes.
10645         (CALL_CONSTRUCTOR_P): New macro.
10646         * parse.y (kw_length): New static global tree node.
10647         (return_statement): Tagged <node>.
10648         (RETURN_TK): Tagged <operator>.
10649         (variable_declarator_id:): Build variable declaration with an
10650         empty initialization value if a syntax error was found in the
10651         initialization part of the variable declaration.
10652         (statement_without_trailing_substatement:): return_statement: now
10653         uses the default rule.
10654         (return_statement:): Temporarily fixed to return NULL_TREE.
10655         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
10656         (class_instance_creation_expression:): Class creation rules now
10657         call build_method_invocation upon reduction.
10658         (array_creation_expression:): Rules call build_newarray_node upon
10659         reduction.
10660         (dim_exprs:): Build a list of dimension expressions.
10661         (dim_expr:): Store location of the OSB_TK in the dimension
10662         expression node.
10663         (method_invocation:): Added a new error rule.
10664         (build_unresolved_array_type): WFL argument may also be an array
10665         on a primitive type. Name of the argument changed to reflect this.
10666         (method_declarator): Insert argument type at the beginning of the
10667         argument type list and later reverse the list.
10668         (unresolved_type_p): Argument 'returned' may be optionally
10669         NULL_TREE.
10670         (java_layout_class_from_source): Function renamed
10671         safe_layout_class.
10672         (resolve_and_layout): Now call resolve_no_layout and
10673         safe_layout_class.
10674         (resolve_no_layout): New function.
10675         (purify_type_name): New function.
10676         (complete_class_report_errors): Call purify_type_name during error
10677         report on a type not found.
10678         (process_imports): error_found local variable doesn't need to be
10679         initialized to zero.
10680         (declare_local_variables): New local type_wfl. Fixed typo in error
10681         message. type_wfl assigned to unresolved type and used to register
10682         incomplete type. Build a WFL around the variable initialization
10683         statement so that debug info can be generated on it.
10684         (source_start_java_method): Reverse argument list after they've
10685         been processed.
10686         (current_this): New static global variable.
10687         (java_complete_expand_methods): Set current_this when appropriate.
10688         (resolve_expression_name): Build correct static and non static
10689         field access bearing a simple name.
10690         (resolve_field_access): Resolve the length field of arrays. Handle
10691         f.m() cases.
10692         (patch_method_invocation_stmt): Set the type of the method
10693         invocation to error_mark_node. This value is later overridden by a
10694         valid type, if any. Don't handle qualified constructor invocation
10695         as qualified method invocation. Call lookup_method_invoke with its
10696         new flag. It's no longer necessary to access the selected method
10697         as the value of a tree list. Handle constructor invocation.
10698         (patch_invoke): Reverse argument list when invoking non interface
10699         methods. Insert call to new as the first argument of the
10700         constructor.
10701         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
10702         defined within a final class. Return INVOKE_STATIC if the invoked
10703         method is a constructor.
10704         (lookup_method_invoke): New lc argument is a flag to indicate a
10705         constructor lookup. Now handle constructor lookup. Choose the most
10706         specific method in case several were matching the invocation
10707         requirements. Return a method decl instead of a tree list featuring
10708         one single method decl element.
10709         (refine_accessible_methods_list): New lc flag argument to
10710         indicate that a constructor is being looked up.
10711         (not_initialized_as_it_should_p): New function.
10712         (java_complete_tree): Now process fake tree codes
10713         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
10714         save_expr on resolved function call arguments. Case on
10715         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
10716         (patch_assignment): LHS can be a field access expression. When
10717         dealing with reference, lhs_type is the promoted type of the
10718         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
10719         applicable.
10720         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
10721         (patch_binop): Use not_initialized_as_it_should_p where
10722         applicable.
10723         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
10724         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
10725         where applicable.
10726         (resolve_type_during_patch): New function.
10727         (patch_cast): Call resolve_type_during_patch to resolve type and
10728         report error accordingly.
10729         (patch_array_ref): Use not_initialized_as_it_should_p where
10730         applicable. Array base expression is saved before being
10731         used. Promote the type of an array elements if it contains non
10732         builtin types.
10733         (build_newarray_node, patch_newarray, build_this): New functions.
10734
10735 Thu Jul 16 10:46:47 1998  Tom Tromey  <tromey@cygnus.com>
10736
10737         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
10738         increment it in `for' statement.
10739         (print_field_info): If number is inf or nan, don't print it.
10740         (print_method_info): If method name is `delete', just ignore it.
10741         (print_c_decl): Special-case jstringArray.
10742
10743         * gjavah.c (help): New function.
10744         (no_argument): New function.
10745         (usage): Changed text.
10746         (main): Rewrote argument handling.  Now handles -v, --help,
10747         --version.
10748         (version): New function.
10749         (found_error): New global.
10750         (main): Return found_error.
10751         (generate_access): Set found_error.
10752         (print_c_decl): Likewise.
10753
10754 Wed Jul 15 10:36:27 1998  Tom Tromey  <tromey@cygnus.com>
10755
10756         * gjavah.c (print_c_decl): Don't print "," when examining field.
10757         Skip type name when looking at "[L" types.
10758         (process_file): Now static.
10759         (generate_access): Now returns int.
10760         (last_access_generated): New global.
10761         (process_file): Clear last_access_generated; make multiple passes
10762         over the class.
10763         (print_field_info): Just return if generate_access returns true.
10764         (print_method_info): Likewise.  Also, allow <init> functions to
10765         pass through.
10766         (print_c_decl): Added is_init argument.  Print constructors
10767         properly.
10768         (print_cxx_classname): Use UTF8_GET to extract characters from
10769         string.
10770         (print_base_classname): New function.
10771         (print_class_decls): New function.
10772         (process_file): Use it.
10773         (utf8_cmp): New function.
10774
10775 Mon Jul 13 14:21:47 1998  Nick Clifton  <nickc@cygnus.com>
10776
10777         * lang-options.h: Format changed to match changes in gcc/toplev.c
10778         to implement a --help option.
10779
10780 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
10781
10782         * decl.c (init_decl_processing): Revert change to dtable_type.
10783
10784 Thu Jul  9 18:22:12 1998  Per Bothner  <bothner@cygnus.com>
10785
10786         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
10787
10788 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
10789
10790         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
10791
10792         * lang.c (lang_init): Default flag_exceptions to 1, without
10793         checking to see if it's 2 first.
10794
10795 Wed Jul  8 03:01:32 1998  Jeffrey A Law  (law@cygnus.com)
10796
10797         * constants.c: Include "system.h".
10798         * decl.c: Likewise.
10799         * lang.c (flag_new_exceptions): Get via extern now.
10800         (lang_init_options): New functions.  Turn on flag_new_exceptions.
10801
10802 Tue Jul  7 12:56:48 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10803
10804         * lex.c (java_lex): Return 0 when we see an invalid character in
10805         the input.
10806
10807         * lex.c (java_read_char): Specify extra argument when calling
10808         java_lex_error.
10809         (java_read_unicode, java_parse_end_comment,
10810         java_parse_escape_sequence): Likewise,
10811         (java_lex): Specify extra argument when calling
10812         java_lex_error. Test that IDs are beginning with a legal character
10813         for IDs. Handle invalid characters with an error message and a
10814         call to java_lex_error.
10815         (java_lex_error): Adjust column position by new argument
10816         `forward'. Issue an error even if in the middle of reporting an
10817         other error.
10818
10819 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
10820
10821         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
10822         we don't explicitly put a null pointer when we're copying it.
10823
10824 Tue Jul  7 09:38:38 1998  Tom Tromey  <tromey@cygnus.com>
10825
10826         * gjavah.c (print_cxx_classname): New function.
10827         (super_class_name): Likewise.
10828         (print_super_fields): Removed.
10829         (in_super): Removed.
10830         (print_field_info): Never generate #defines.
10831         (print_c_decl): Changed generated types to match JNI.  No longer
10832         print class name before method name.
10833         (print_method_info): Print "static" before static methods.
10834         Print "virtual" before non-final methods.
10835         (usage): Use exit(1), not exit(-1).
10836         (main): Likewise.
10837         (print_field_info): Use %.17g to print a double.
10838         (last_access): New globals.
10839         (process_file): Initialize last_access.
10840         (usage): Now static.
10841         (ACC_VISIBILITY): New define.
10842         (generate_access): New function.
10843         (print_field_info): Call it.
10844         (print_method_info): Likewise.  Also, generate information for all
10845         methods, not just native methods.  Return void.
10846         (print_c_decl): Return void.
10847         (print_field_info): Return void.
10848
10849 Thu Jul  2 16:53:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10850
10851         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
10852         processing the jc1 grammar file. Prefix bison functions and
10853         variables with java_.
10854         (parse.c): Dependencies on parse.h and lex.h
10855         * expr.c (build_java_arrayaccess): Function now global.
10856         * java-tree.h: Comment reorganized to carry on previous
10857         classification effort.
10858         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
10859         RESOLVE_TYPE_NAME_P): New flags on WFLs.
10860         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
10861         java_parse (new prefix java_ generated by bison).
10862         (java_layout_parsed_class, java_register_parsed_class): Function
10863         call removed.
10864         (yyparse): Removed unnecessary call to init_outgoing_cpool.
10865         * lex.c (static tree wfl_op): Variable deleted.
10866         (java_init_lex): Initialize kw_super and kw_this. Initialize more
10867         ctxp fields to NULL_TREE.
10868         (java_lex): No longer create WFL for operators. Filename caching
10869         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
10870         created as STRING_CST and later expanded. Removed extra argument
10871         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
10872         and SUPER.
10873         (build_wfl_node): Removed code in comments.
10874         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
10875         store token and location data in the current bison token.
10876         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
10877         static/extern function declaration at the beginning of the file.
10878         (struct qualification): Data structure definition deleted.
10879         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
10880         (qualify_ambiguous_name): Function declaration modified. Function
10881         now returns nothing.
10882         (build_array_ref, patch_array_ref, make_qualified_name,
10883         resolve_qualified_expression_name, maybe_generate_clinit,
10884         resolve_field_access): New static function declarations.
10885         (build_java_arrayaccess): New extern function declaration.
10886         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
10887         (CALL_EXPR_PRIMARY): Macro deleted.
10888         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
10889         (struct parser_ctxt): Field initialized_final
10890         removed. non_static_initialized, static_initialized: New fields.
10891         * parse.y (static tree kw_super, static tree kw_this): New global
10892         static.
10893         (%union): tree wfl field of operator member replaced by int
10894         location. WFLs are non longer created for operators.
10895         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
10896         (qualified_name:): Now calls make_qualified_name to build the
10897         identifier.
10898         (type_declaration:): Consider generating <clinit> when class
10899         parsing completed.
10900         (variable_declarator:): Directly build an assignment node when the
10901         variable is initialized when declared.
10902         (this_or_super:): Build a WFL and set current location when THIS
10903         or SUPER are parsed.
10904         (expression_statement:): Wrap statement around a WFL.
10905         (primary_no_new_array:): Fixed typo. Changed value returned by
10906         THIS_TK because of its new type (temporary).
10907         (dim_exprs:): Temporary fix because of OSB_TK's new type.
10908         (field_access:): Build qualified name with SUPER.
10909         (method_invocation:): Fixed returned value because of SUPER's new
10910         type.
10911         (array_access:): Use OSB_TK location information.
10912         (post_increment_expression:, post_decrement_expression:,
10913         unary_expression:, pre_increment_expression:,
10914         pre_decrement_expression:, unary_expression_not_plus_minus:,
10915         cast_expression:, multiplicative_expression:,
10916         additive_expression:, shift_expression:, relational_expression:,
10917         equality_expression:, and_expression:, exclusive_or_expression:,
10918         inclusive_or_expression:, conditional_and_expression:,
10919         conditional_or_expression:, assignment:): Use new location/token
10920         information available on operators.
10921         (create_class): Set super_decl_type to NULL_TREE when processing
10922         java.lang.Object.
10923         (register_fields): Field initialization is now a MODIFY_EXPR
10924         node. Chain initialization code to the matching lists (according
10925         the the field declaration modifiers).
10926         (maybe_generate_clinit): New function.
10927         (method_header): Don't set method's DECL_NAME to a WFL when adding
10928         methods to java.lang.Object.
10929         (resolve_and_layout): Now can return NULL_TREE if the type
10930         resolution fails. Otherwise, return the class DECL instead of its
10931         TYPE.
10932         (check_method_redefinition): Don't patch method DECL_NAME if it
10933         belongs to java.lang.Object.
10934         (process_imports): Simply assign error_found to the value returned
10935         by check_pkg_class_access.
10936         (declare_local_variables): Don't use their init statements (if
10937         any) when parsing error were previously found. Reuse MODIFY_EXPR
10938         build during parsing as an init statement.
10939         (java_method_add_stmt): Now return the current method body.
10940         (java_layout_parsed_class, java_register_parsed_class): Functions
10941         removed.
10942         (java_complete_expand_methods): Initialize the constant pool on a
10943         per class basis. Layout the classes before expanding their method
10944         bodies. Don't try expand artificial constructor code if error were
10945         found. Make the classes data and register them if no error were
10946         found.
10947         (java_complete_expand_method): Retrieve an artificial constructor
10948         argument list before entering its body. Assign the top block to
10949         the artificial constructor function body and set types of declared
10950         blocks and compound statements to void. Walk method body if not an
10951         artificial constructor.
10952         (make_qualified_name, cut_identifier_in_qualified): New functions.
10953         (resolve_expression_name): Fixed comments. Save/restore the
10954         current class CLASS_LOADED_P flag value. Build non qualified
10955         static field access and handle qualified expression names.
10956         (resolve_field_access, resolve_qualified_expression_name): New
10957         functions.
10958         (patch_method_invocation_stmt): Use the new expression resolution
10959         scheme, calling resolve_field_access when the function call is
10960         resolved as an expression.
10961         (qualify_ambiguous_name): Function rewritten to work on qualified
10962         expression produced by make_qualified_name.
10963         (java_complete_tree): Promote type when function's argument are
10964         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
10965         the assignment to discover further errors if RHS is a expression
10966         name that fails to evaluate. Declare LHS initialized even though
10967         the assignment failed. Don't use the location variable and removed
10968         extra argument in patch function calls. Now handle the ARRAY_REF
10969         case and build internal string representation when STRING_CSTs are
10970         walked.
10971         (build_method_invocation): Don't wrap function call around a WFL.
10972         (build_assignment): Likewise. Use the operator location
10973         information.
10974         (patch_assignment): Handle array access LHSs. Handle error
10975         provenance, resulting in a better error report.
10976         (build_binop): Use op_location from operator as binop location
10977         information.
10978         (build_unaryop, build_incdec, build_cast): Likewise.
10979         (patch_binop): Extract location information from the node. Fixed
10980         typo in error message.
10981         (patch_unary_op): Extract location information from the node.
10982         (build_array_ref, patch_array_ref): New functions.
10983
10984 Wed Jul  1 13:11:36 1998  Tom Tromey  <tromey@cygnus.com>
10985
10986         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
10987         match _Jv_IsInstanceOf.
10988         * decl.c (init_decl_processing): Use _Jv_NewArray, not
10989         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
10990
10991 Tue Jun 30 14:12:54 1998  Tom Tromey  <tromey@cygnus.com>
10992
10993         * decl.c (init_decl_processing): Functions are now named
10994         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
10995
10996 Mon Jun 29 14:47:10 1998  Per Bothner  <bothner@cygnus.com>
10997
10998         * java-tree.h (load_class):  Add prototype.
10999         * class.c (is_compiled_class):  Add missing arg to load_class.
11000         * expr.c (expand_java_NEW):  Call load_class.
11001         * parse.y (process_import):  Removed bogus use of void return value.
11002
11003 Thu Jun 25 11:50:48 1998  Per Bothner  <bothner@cygnus.com>
11004
11005         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
11006         Function name is "_Jv_Throw" instead of "soft_athrow".
11007         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
11008         Function name is "_Jv_AllocObject" instead of "soft_new".
11009         Takes an extra parameter (object size).
11010         * expr.c:  Update calls.
11011
11012 Wed Jun 24 13:59:02 1998  Per Bothner  <bothner@cygnus.com>
11013
11014         * lex.c (java_get_line_col):  Handle end-of-file.
11015         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
11016
11017 Wed Jun 24 09:22:34 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
11018
11019         * lang.c (lang_init): Make -fexceptions the default.
11020         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
11021         exception handling is not turned on.
11022
11023 Tue Jun 23 10:17:09 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
11024
11025         * lang.c (flag_new_exceptions): Make this this default.
11026         * decl.c (end_java_method): Call emit_handlers.
11027         * except.c (method_init_exceptions): Set language code and version.
11028         (expand_start_java_handler): Enable exception, and call
11029         expand_eh_region_start.
11030         (expand_end_java_handler): Enable exception, and set up catch blocks.
11031         (emit_handlers): New routine to generate the saved handlers.
11032         * java-except.h (emit_handlers): Add prototype.
11033
11034 Fri Jun 12 11:31:24 1998  Per Bothner  <bothner@cygnus.com>
11035
11036         We used to have three different representations of the constant pool:
11037         the CPool structure, the tree_constant_pool, and the constructures
11038         used to build the Class object (which may need class and string
11039         constants) in compiled code.  None were appropriate for compiling
11040         to .class files, so I did a major overhaul.
11041
11042         First, the tree_constant_pool array was removed.  Things were
11043         modified to the CPool structure in the JCF could be used.
11044         Second, a "capacity" field was added to the CPool, and functions
11045         written to search for a matching constant, adding one if not found.
11046         The code that generated the Class object was changed to use a CPool.
11047         The actual TREE_LISTs used to build the CONSTRUCTORs used for
11048         the static Class object are now only in build_constants_constructor.
11049         Finally, I wrote code which can generate a .class file (including its
11050         constant pool) from the RECORD_TYPE of a class.  This is a big step
11051         on the way to compiling Java source into .class files.
11052
11053         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
11054         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
11055
11056         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
11057         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
11058         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
11059         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
11060         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
11061         (lang_type):  Removed constant_pool field.
11062         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
11063         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
11064         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
11065         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
11066
11067         * constants.c (current_constant_pool_tags, current_constant_pool_data,
11068         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
11069         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
11070         (set_constant_entry, find_constant1, find_constant2,
11071         find_class_constant, count_constant_pool_bytes, write_constant_pool,
11072         find_utf8_constant, find_class_or_string_constant):  New functions.
11073
11074         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
11075         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
11076         (give_name_to_class, get_class_constant):  Likewise.
11077         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
11078         (get_name_and_type_constant, get_ref_constant):  Removed.
11079         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
11080         * parse.y:  Don't save/restore tree_constant_pool.
11081         * verify.c (verify_jvm_instructions):  Update for new approach.
11082         * expr.c (expand_invoke, expand_java_field_op): Likewise.
11083
11084         * lang-options.h:  Added -femit-class-file, -femit-class-files.
11085         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
11086         (lang_f_options):  Added "emit-class-file(s)".
11087
11088         * expr.c (build_java_arrayaccess):  Generate more efficient array
11089         bounds checking, by using unsigned compare.
11090
11091         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
11092
11093 Wed Jun 10 17:34:42 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11094
11095         * parse.h: New comment on the handling of unresolved type
11096         identifiers. JDEPs are now part of the jdep_code enum.
11097         (typedef struct jdep): Now use enum jdep_code or int, depending on
11098         availability. Both are narrowed down to an 8 bits bitfield.
11099         (CALL_EXPR_PRIMARY): Fixed comment.
11100
11101 Wed Jun 10 10:54:39 1998  Tom Tromey  <tromey@cygnus.com>
11102
11103         * Make-lang.in (java): Added gjavac and jvgenmain.
11104         (java.start.encap): Depend on gjavac.
11105         (java.rest.encap): Depend on jvgenmain.
11106
11107         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
11108         (JAVA_CROSS_NAME): Likewise.
11109         (java.all.build): Depend on jvgenmain and gjavac.
11110         (java.all.cross): Depend on jvgenmain and gjavac-cross.
11111         (jvgenmain$(exeext)): New target.
11112         (java.install-common): Wrote.
11113         * config-lang.in (compilers, stagestuff): Added gjavac and
11114         jvgenmain.
11115
11116 Wed Jun 10 12:19:04 1998  Dave Brolley  <brolley@cygnus.com>
11117
11118         * lang.c (lang_decode_option): New argc/argv interface.
11119
11120 Tue Jun  9 18:12:46 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11121
11122         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
11123         * decl.c (build_decl_no_layout): New function.
11124         * expr.c (java_lang_expand_expr): Layout declarations found in
11125         blocks before they're pushed.
11126         * jcf-parse.c (load_class): Save current line when parsing class
11127         file.
11128         (parse_source_file): Register class before expanding their
11129         methods.
11130         * lang.c (put_decl_node): Produce `null' when `void *' is
11131         processed.
11132         * lex.c (static tree wfl_op): New static global, for error report
11133         on casts.
11134         (java_init_lex): wfl_operator and wfl_op initialized
11135         here. Filename caching added for wfl_op. Return wfl_op when `(' is
11136         parsed.
11137         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
11138         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
11139         build_unresolved_array_type): New static function definitions.
11140         (build_decl_no_layout): New extern function declared.
11141         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
11142         faulty modifier exists.
11143         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
11144         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
11145         (UNARY_PLUS_EXPR): New fake operator.
11146         (struct parser_ctxt): New field osb_number.
11147         * parse.y (static tree wfl_operator): New static WFL for operator
11148         bound error messages.
11149         (DECR_TK, INCR_TK): Moved.
11150         (OP_TK): Tagged <operator>.
11151         (array_type:): Now call build_unresolved_array_type.
11152         (dim_expr:): Count the number of '[' seen.
11153         (post_increment_expression, post_decrement_expression,
11154         pre_increment_expression, pre_decrement_expression,
11155         unary_expression_not_plus_minus, unary_expression:): Actions are
11156         now building the corresponding unary expressions.
11157         (cast_expression:): Actions are now building cast expressions.
11158         (build_unresolved_array_type): New function.
11159         (create_interface): Reset the number of declared interfaces.
11160         (create_class): Likewise.
11161         (method_header): Methods declared within the scope of an interface
11162         are now implicitly set public and abstract.
11163         (java_complete_class): Variable's and parameter's type are patched
11164         with a promoted type.
11165         (declare_local_variables): Resolved non builtin types are promoted
11166         before being used to build a variable decl. Removed type patch
11167         posted on variable initialization statement.
11168         (source_start_java_method): Use build_decl_no_layout to build the
11169         decl of a parameter of incomplete type.
11170         (java_register_parsed_class): Process interfaces too. Call
11171         rest_of_decl_compilation on each processed class declarations.
11172         (java_complete_expand_methods): Don't attempt to expand things in
11173         interfaces.
11174         (java_complete_tree): Process CONVERT_EXPR, even though it always
11175         has a type. Propagate error_mark_node to node's type too. Promote
11176         method's call argument type and return error_mark_node if
11177         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
11178         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
11179         handle unary operator nodes.
11180         (build_assignment): Added comment.
11181         (print_int_node): New function.
11182         (patch_assignment): New second argument. New error handling. Use
11183         print_int_node. Handle references. Use can_cast_to_p to issue
11184         different error message according to the context and check upon
11185         the initialization of the RHS.
11186         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
11187         (operator_string): Handle more operators.
11188         (patch_binop): No longer use a function static
11189         wfl_operator. Improved error message on shift distance.
11190         (build_unaryop, build_incdec, build_cast, patch_unaryop,
11191         patch_cast): New functions.
11192
11193 Fri Jun  5 18:03:07 1998  Per Bothner  <bothner@cygnus.com>
11194
11195         * jvspec.c:  New file.
11196         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
11197
11198         * java-tree.h (identifier_subst):  Add declaration.
11199
11200 Thu Jun  4 13:44:23 1998  Tom Tromey  <tromey@cygnus.com>
11201
11202         * jvgenmain.c (main): Generate call to JvRunMain.
11203
11204         * class.c (make_class_data): Push value for "sync_info" field.
11205         * decl.c (init_decl_processing): Push "sync_info" field.
11206
11207 Wed Jun  3 20:39:14 1998  Per Bothner  <bothner@cygnus.com>
11208
11209         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
11210         Java (source) name, not signature.
11211         Set TYPE_ALIGN to (at least) that of element_type.
11212
11213 Tue Jun  2 15:19:19 1998  Per Bothner  <bothner@cygnus.com>
11214
11215         * class.c:  Moved classname-mangling-rekated code to ...
11216         * mangle.c:  ... this new file.
11217         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
11218         * Makefile.in:  Update for above changes.
11219
11220 Mon Jun  1 09:58:36 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11221
11222         * expr.c (truthvalue_conversion): Convert integer and floating
11223         point value to their truth value.
11224         * lex.c (java_lex): Handle the `null' literal.
11225         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
11226         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
11227         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
11228         New macros.
11229
11230         * parse.y: Reorganization/documentation on token declaration.
11231         (binop_lookup[]): New added new tree codes.
11232         (relational_expression): Build corresponding binary operators.
11233         (equality_expression, conditional_and_expression,
11234         conditional_or_expression): Likewise.
11235         (java_complete_class): Fix crash in debug message.
11236         (java_complete_tree): Check initialization of method call
11237         arguments. Further bogus node evaluation to detect more error
11238         during assignments. Handles more binary operators.
11239         (patch_assignment): Use DECL_P.
11240         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
11241         code.
11242         (operator_string): Handle more case. Compacted source.
11243         (patch_binop): Changed function comment. Checking for
11244         uninitialized first operand takes the compound assignment into
11245         account and uses DECL_P. Checking for uninitialized second operand
11246         delayed to routine's end. Use macros to issue type bound error
11247         messages and issue messages on both operands if their types are
11248         different. Force fixed type into node. Handle all binary
11249         operators.
11250
11251 Wed May 27 10:30:31 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11252
11253         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
11254         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
11255         build operator node and return tokens.
11256         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
11257         * parse.h (java_complete_tree): Changed returned type in prototype.
11258         (build_method_invocation, build_assignment, patch_assignment,
11259         patch_binop): New static function declarations.
11260         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
11261         BUILD_EXPR_WFL): New macros.
11262         * parse.y (enum tree_code binop_lookup[]): New static for token to
11263         TREE_CODE lookup.
11264         (%union): Parser union has new sub-structure `operator'.
11265         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
11266         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
11267         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
11268         ASSIGN_ANY_TK): Tokens tagged `operator'.
11269         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
11270         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
11271         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
11272         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
11273         (assignment_operator:): Rule tagged `operator'.
11274         (expression_statement:): Re-installed default rule.
11275         (method_invocation:): Sub rules call build_method_invocation.
11276         (postfix_expression:): Don't attempt to resolve name here. Just
11277         return an ID.
11278         (multiplicative_expression:): Sub-rules build corresponding binop
11279         expression node.
11280         (additive_expression:, shift_expression:, and_expression:,
11281         exclusive_or_expression:, inclusive_or_expression:): Likewise.
11282         (assignment:): Sub rule invoke build_assignment.
11283         (assignment_operator:): Default rules on sub rules.
11284         (force_error): Added documentation on this variable.
11285         (declare_local_variables): Build initialization calling
11286         build_assignment.
11287         (expand_start_java_method): Removed unused rtx declaration. Mark
11288         arguments as already initialized.
11289         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
11290         (java_complete_expand_methods): Don't process next method if
11291         completion of the previous one triggered errors.
11292         (java_complete_expand_method): Call source_end_java_method if no
11293         error were found during completion.
11294         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
11295         locals declaratilon. Handle names found within a class. Return
11296         error_mark_node when things aren't found.
11297         (patch_method_invocation_stmt): Return error_mark_node on failures.
11298         (patch_invoke): Removed unused local. Return the correct node.
11299         (java_complete_tree): Now returns a value. The BLOCK section binds
11300         local identifiers and the type of a BLOCK is now void. Assign the
11301         result of operand completion on COMPOUND_EXPR. Assign the
11302         encapsulated node of a WFL to the result of its completion, except
11303         when the node is an identifier. Now handle MODIFY_EXPR and several
11304         binary operators. Return error_mark_node on errors.
11305         (build_method_invocation, build_assignment, patch_assignment,
11306         build_binop, operator_string, patch_binop): New functions.
11307         * typeck.c (binary_numeric_promotion): New function.
11308
11309 Thu May 21 12:01:04 1998  Per Bothner  <bothner@cygnus.com>
11310
11311         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
11312         Replace most uses of ident_subst by identifier_subst.
11313
11314         * class.c (push_class_static_dummy_field):  Removed function.
11315         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
11316         instead of looking got "class" static field.  Create that decl here.
11317         (class_identifier_node):  Removed;  no longer needed.
11318         (init_class_processing):  Don't init class_identifier_node.
11319         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
11320         Do nreverse 0 times (instead of twice) for Object and Class.
11321         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
11322
11323 Wed May 20 16:35:04 1998  Per Bothner  <bothner@cygnus.com>
11324
11325         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
11326         while initializing linenumber_count and linenumber_table.
11327         Do it before init_function_start (which calls emit_line_note).
11328         * expr.c (expand_byte_code):  Don't need to clear lineno here.
11329
11330 Mon May 18 16:23:32 1998  Tom Tromey  <tromey@cygnus.com>
11331
11332         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
11333         then mangle number as _N_.
11334
11335         * class.c (mangle_class_field): New function.
11336         (build_class_ref): Set assembler name of class reference using
11337         mangle_class_field.
11338         (push_class_static_dummy_field): Likewise.
11339
11340 Sun May 17 12:52:35 1998  Michael Tiemann <tiemann@cygnus.com>
11341
11342         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
11343         of assigning to TREE_CODE.  The latter method exploits a feature
11344         of GCC that is not ANSI compliant.
11345
11346 Thu May 12 13:44:27 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11347
11348         * decl.c (pushdecl_force_head): New function.
11349         (pushlevel): Removed conditional printf.
11350         (complete_start_java_method): Don't enter local variable scope if
11351         function is compiled from source code.
11352         * expr.c: parse.h now included
11353         (java_lang_expand_expr): New function.
11354         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
11355         printf. Terminate buffer when doing directories.
11356         * jcf-parse.c (parse_source_file): Call lang_init_source before
11357         parsing and before code generation.
11358         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
11359         use printf if the macro is defined.
11360         * lang.c (lang_init): Install lang_expand_expr hook on
11361         java_lang_expand_expr.
11362         (java_dummy_print): New function.
11363         (lang_init_source): New function.
11364         * lex.c (java_lex): Remember location of an opening brace at the
11365         second nesting level.
11366         (java_is_eol): Unget character seen after a CR if it is EOF.
11367         * parse.h: Now includes lex.h
11368         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
11369         printf if the macro is defined.
11370         (expand_start_java_method, build_expr_block, enter_block,
11371         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
11372         New static function declarations.
11373         (pushdecl_force_head): New extern function declaration.
11374         (INCOMPLETE_TYPE_P): New macro.
11375         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
11376         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
11377         BLOCK_EXPR_ORIGIN): New macros.
11378         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
11379         DECL_SOURCE_LINE_LAST): New macros.
11380         (struct parser_ctxt): Removed field current_method_decl, redundant
11381         with the field current_function_decl. Added fields
11382         first_ccb_indent1 and pending_block.
11383         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
11384         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
11385         tagged <node>
11386         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
11387         (compilation_unit:): Cosmetic on sub rule.
11388         (type_declaration:): Cosmetic on sub rules. Added an error rule.
11389         (variable_initializer:): Installed default rule on expression:.
11390         (method_declaration:): method_header: starts a new
11391         method. method_body: installs the function body, absorbs blocks
11392         emitted for temporary variable scopings, pops function's body block
11393         and merges function's last statement lineno in DECL_SOURCE_LINE.
11394         (method_body:): Installed default rules.
11395         (block:): Call enter_block when an opening brace is seen.  Absorb
11396         scoping blocks and call exit_block when a closing brace is seen.
11397         (block_statement:): Cosmetic changes.
11398         (method_invocation:): Create WFL around CALL_EXPR node.
11399         (patch_stage): Added comment around definition.
11400         (method_header): Try to use first_ccb_indent1 as the first line of
11401         the method, so BP debug info are emitted at the first opening
11402         brace of the function. If the function has no body, use the
11403         location of the function's name. Override currently defined method
11404         name with the matching WFL so we can point redefinition errors
11405         using the location where the function's name was declared.
11406         (check_abstract_method_header): Interprets DECL_NAME as an
11407         identifier or as a WFL, accordingly.
11408         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
11409         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
11410         location and name information out of it and reinstall DECL_NAME to
11411         its original identifier node value.
11412         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
11413         function's source code).
11414         (read_import_dir): Test the value returned by find_class and issue
11415         a fatal accordingly.
11416         (declare_local_variables): Push a new block for the scope of the
11417         new variable(s) if code has been already generated at that nesting
11418         level. Pinpoint redefinition errors using the variable id
11419         WFLs. Generate initialization code if necessary. If the variable
11420         type is incomplete, register a patch on its decl.
11421         (source_start_java_method): Rewritten. Define a new block for the
11422         function's parameters. Build parameter decl out of function's
11423         arguments and register them for a patch if their types are
11424         incomplete.
11425         (expand_start_java_method): Includes the part of
11426         source_start_java_method that was pushing the parameter decls and
11427         completing the method start code.
11428         (source_end_java_method): Removed call the expand_end_bindings and
11429         poplevel (already taken care of). Reinstall function's arguments
11430         and get function's last line of code before calling
11431         expand_function_end.
11432         (java_method_add_stmt): New comment before the function's
11433         code. Complement the second operand of the current COMPOUND_EXPR
11434         if necessary.
11435         (java_complete_expand_methods): Don't generate debug info on line
11436         zero when expanding a generated constructor.
11437         (java_complete_expand_method): Set start and end line numbers for
11438         a artificially generated constructor to one and manually call
11439         enter_block and exit_block when defining it. For all methods:
11440         expand function's start calling the new expand_start_java_method
11441         and invoke java_complete_tree on the effective method's body, if
11442         any.
11443         (resolve_expression_name): Now use lookup_name_in_blocks to search
11444         local variable decls and print out an error when variables are
11445         undefined.
11446         (patch_method_invocation_stmt): Inserted comment before the
11447         function's code.
11448         (lookup_method_invoke): Chain method's arguments using chainon
11449         with the current arg list as a second argument. Inserted missing
11450         IDENTIFIER_POINTER when reporting an error on methods not found.
11451         (refine_accessible_methods_list): Don't retain constructors.
11452         (patch_arguments): Function removed.
11453         (java_complete_tree): Inserted comment before the function's
11454         code. New case for BLOCKs. Moved the WFL case a bit
11455         further. Complete function's arguments.
11456         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
11457         maybe_absorb_scoping_blocks): New functions.
11458
11459 Mon Apr 27 10:50:05 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11460
11461         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
11462         previously set.
11463         * jcf-parse.c (parse_source_file, java_error_count): New forward
11464         and extern declarations.
11465         (java_parse_abort_on_error): Macro moved.
11466         (jcf_parse_source): fatal called if fopen fails. Now calls
11467         parse_source_file.
11468         (parse_source_file): New parse_only parameter. Reflects the
11469         elimination of the second pass.
11470         (yyparse): parse_source_file called with argument set to 0.
11471         * jcf.h (JCF_ZERO): Sets java_source to zero.
11472         * lex.c (java_init_lex): pass argument is gone. Function modified
11473         to be called once during the analysis of a file.
11474         (java_unget_unicode): Fixed typo in fatal message.
11475         (java_get_line_col): Likewise.
11476         (java_lval): Likewise. String literals no longer built during
11477         second pass.
11478         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
11479         account.
11480         * parse.h (MODIFIER_WFL): New macro.
11481         (parse_check_super, parser_check_super_interface): Now return int.
11482         (parser_chain_incomplete_item, not_builtin_p,
11483         complete_method_decl): Declarations removed.
11484         (build_method_invocation_stmt, build_invoke): Renamed using the
11485         `patch' instead of `build'
11486         (register-incomplete_type, obtain_incomplete_type,
11487         java_complete_tree, java_complete_expand_method,
11488         unresolved_type_p, create_jdep_list): New function declarations.
11489         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
11490         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
11491         (jdep): New typedef on new struct _jdep.
11492         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
11493         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
11494         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
11495         JDEP_RESOLVED_P): New macros.
11496         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
11497         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
11498         JDEP_VARIABLE): New enum values and jdep kinds.
11499         (jdeplist): New typedef on struct _jdeplist.
11500         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
11501         macros.
11502         (CALL_EXPR_PRIMARY): New macro.
11503         (struct parser_ctxt): Fields java_pass, current_method_decl,
11504         method_decl_list deleted. New field jdeplist.
11505         (INCOMPLETE_P): Macro deleted.
11506         * parse.y (single_type_import_declaration:): Removed pass switch.
11507         (type_import_on_demand_declaration): Likewise.
11508         (field_declaration:): Removed pass switch on all sub rules.
11509         (class_declaration:): Call the complete_class_decl removed on
11510         class_body rules.
11511         (method_declaration:): Removed second pass switch. No longer chain
11512         methods decl when method_header reduced.
11513         (method_header:): Sub rules no longer depend on pass switch.
11514         (method_declarator:): Likewise.
11515         (method_body:): Likewise.
11516         (abstract_method_declaration:): Likewise.
11517         (block_statement:): Likewise.
11518         (local_variable_declaration:): Likewise.
11519         (argument_list:): Likewise.
11520         (method_invocation:): Likewise. Call to build_method_invocation_stmt
11521         removed. Partial CLASS_EXPR tree node built instead.
11522         (postfix_expression:): Removed pass switch on all sub rules.
11523         (java_pop_parser_context): Free classd_list content.
11524         (yyerror): Call obstrack_grow0 to finalize error message.
11525         (check_class_interface_creation): Comment modified to reflect new
11526         returned value meaning. Removed second pass switch. Return 1 if an
11527         error was found, 0 otherwise. Adjust pointer on filename if a
11528         leading path separator was found.
11529         (maybe_create_class_interface_decl): Removed first pass switch
11530         when linking the class decl to the class_list. Install a new
11531         jdep_list for the class.
11532         (add_superinterfaces): List of unresolved interfaces is
11533         gone. Unresolved interfaces are directly added to the current
11534         dependencies list.
11535         (create_interface): Second pass shortcut removed.
11536         ctpx->modifier_ctx access through MODIFIER_WFL.
11537         (create_class): Second pass shortcut removed. Call to
11538         register_incomplete_type replaces the call to
11539         parser_chain_incomplete_item.
11540         (complete_class_decl): Function removed.
11541         (duplicate_declaration_error): New way of retrieving redeclared
11542         item type.
11543         (register_fields): Call to lookup_modifier_cl replaced by
11544         MODIFIER_WFL. New way of handling unresolved type, using
11545         unresolved_type_p and obtain_incomplete_type.
11546         register_incomplete_type replaces call to parser_chain_incomplete_item.
11547         (patch_stage): New static global variable.
11548         (method_header): New way of handling unresolved type, using
11549         unresolved_type_p and obtain_incomplete_type. patch_stage used to
11550         indicates that the method decl needs to be patched.
11551         (check_abstract_method_header): Call to lookup_modifier_cl
11552         replaced by MODIFIER_WFL.
11553         (method_declarator): Incomplete argument type are registered
11554         calling register_incomplete_type. Patch on the declared method is
11555         issued in that case.
11556         (unresolved_type_p): New function.
11557         (parser_check_super_interface): New comment to reflect function's
11558         modified returned type (int). Function and has a new argument
11559         this_wfl. Call to parse_error_context uses this_wfl instead of
11560         relying on lookup_cl.
11561         (parser_check_super): Comment reflects function's new returned
11562         type (int). Function returns non zero value on error.
11563         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
11564         register_incomplete_type, jdep_resolve_class): New functions to
11565         handle incomplete types in declarations.
11566         (java_complete_class): Rewritten to work with the new incomplete
11567         type handling scheme.
11568         (complete_class_report_errors): Likewise.
11569         (complete_method_decl): Removed: it jobs is now handled by
11570         java_complete_class.
11571         (do_resolve_class): Class loaded in not already loaded and not
11572         found in Java source code.
11573         (java_check_regular_methods, java_check_abstract_methods): Don't
11574         call complete_method_decl anymore.
11575         (lookup_modifier_cl, not_builtin_p): Functions deleted.
11576         (read_import_dir): Got rid of the pass number dependency.
11577         (declare_local_variables): New handling of unresolved types (patch
11578         issued).
11579         (source_start_java_method): New parameter level. Function called
11580         with level set to 1 when argument types are potentially
11581         unresolved.  Called to complete the job with level set to 2 once
11582         types are complete.
11583         (source_end_java_method): Call to permanent_allocation
11584         removed. Waiting to be replaced by a more suitable obstack
11585         management.
11586         (java_complete_expand_methods, java_complete_expand_method,
11587         java_expand_finals): New functions.
11588         (build_method_invocation_stmt): Renamed
11589         patch_method_invocation_stmt. Extracts function call expression
11590         (wfl) and arguments (args) from CALL_EXPR tree operands.
11591         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
11592         call. Patch the function and argument operand of the CALL_EXPR
11593         tree argument.
11594         (patch_argument, java_complete_tree): New functions.
11595
11596 Mon Apr 20 18:26:57 1998  Per Bothner  <bothner@cygnus.com>
11597
11598         Recover from missing fields and methods (i.e. error instead of fatal).
11599         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
11600         * expr.c (expand_invoke):  Recover from missing method.
11601         (expand_java_field_op):  Recover from missing field.
11602         Inline references to java.lang.{Integer,Char,...}.TYPE.
11603         * typeck.c (get_type_from_signature), java-tree.h:  New function.
11604         * class.c (add_method):  Use get_type_from_signature.
11605         (build_class_ref):  Handle a class that was not found.
11606         * typeck.c (convert):  Handle conversion to pointers (for convenience).
11607         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
11608         instead of lookup_field to handle missing fields.
11609
11610         * jcf-parse.c (process_zip_dir):  Set java_source.
11611
11612 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
11613
11614         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
11615
11616 Tue Apr 14 15:59:54 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11617
11618         * jcf-parse.c (load_class): Don't change input_filename before
11619         calling jcf_parse_source (but still do it before calling
11620         jcf_parse).
11621         (jcf_parse_source): Assign input_filename after having saved the
11622         parser context.
11623         * lex.c (java_init_lex): Chain a WFL node to the import on demand
11624         list. ctxp->modifier_ctx zeroed according to its new
11625         definition. ctxp->filename initialized. Removed
11626         JAVA_MODIFIER_CTX_UNMARK.
11627         (java_unget_unicode): Update the character based column position.
11628         (java_allocate_new_line): ref_count not used anymore. Always free
11629         ctxp->p_line. Initialize c_line->char_col to 0.
11630         (java_get_unicode): Update the character based column position.
11631         (java_lex): Use ctxp->elc to store current position in source
11632         file, at the beginning of the parsed token. Set modifier_ctx entry
11633         corresponding to the parse modifier to a WFL node. Return a WFL
11634         node when an identifier is parsed.
11635         (java_lex_error): Now uses ctxp->elc to store current position in
11636         source.
11637         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
11638         * lex.h (build_wfl_node): New function definitions.
11639         (struct java_line): ref_count and next fields are gone. New field
11640         char_col.
11641         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
11642         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
11643         (JAVA_COLUMN_DELTA): New macro.
11644         (java_lc): New typedef on new struct _java_lc.
11645         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
11646         (parse_error_context, parse_warning_context): Changed prototypes.
11647         (java_get_line_col): Added as an available global function.
11648         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
11649         (IC_DECL): Replaced by macro IC_TYPE
11650         (DEPEND_WFL): New macro.
11651         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
11652         wrong modifier.
11653         (exit_java_complete_class): Removed a commented out statement.
11654         (struct parser_ctxt): Added comments on fields. modifier_ctx is
11655         now an array of tree nodes. Deleted fields line_list and
11656         e_line. New field elc, to replace e_line.
11657         * parse.y (array_type:): Build WFL node.
11658         (qualified_name:): Build a single WFL node out of two. Retain
11659         the location information of the first node in the resulting node.
11660         (package_declaration:): Use package name as a WFL node
11661         (single_type_import_declaration:): Use imported name as a WFL node.
11662         (type_import_on_demand_declaration:): Use root of the imported
11663         packages as a WFL node.
11664         (field_declaration:): Removed unused local variable cl.
11665         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
11666         (yyerror): New static elc. Removed static error_line, error_pos.
11667         New local code_from_source. Save ctxp->elc into elc at the first
11668         pass. Call java_get_line_col to get a string of the line where
11669         the error occured.
11670         (debug_line): Removed static function.
11671         (parse_error_context, parse_warning_context): Parameter cl is now
11672         a WFL node. Use its value to initialize ctxp->elc.
11673         (redefinition_error): Parameter cl is now a WFL node.
11674         (parse_add_interface): New parameter wfl. No longer call
11675         lookup_cl, use wfl instead.
11676         (check_class_interface_creation): Parameter cl is now a WFL node.
11677         (maybe_create_class_interface_decl): Likewise.
11678         (add_superinterfaces): New function.
11679         (create_interface): Removed local cl, node, super_decl,
11680         super_decl_type.  Function now uses id as a WFL node. Better
11681         warning/error report on obsolete or forbidden mix of
11682         modifiers. Now calls add_superinterfaces to register interfaces.
11683         (create_class): Removed local cl, node. Local variable id is used
11684         as a WFL node. Better error report on forbidden modifier
11685         mix. Uses add_superinterfaces to register interfaces.
11686         (find_field): Argument cl is now a WFL node. Now store the WFL
11687         node of a fields that needs to be checked for their
11688         initialization.
11689         (method_header): Local variable node non longer used. Local
11690         variable id replaces cl.
11691         (check_modifiers_consistency): Local variable cl is now a WFL
11692         node.
11693         (method_declarator): Local variable cl replaced by parameter id.
11694         (parser_qualified_name): Now uses parameter name as a WFL node.
11695         (parser_check_super_interface): New parameter wfl, for achieve
11696         greater accuracy during error reports.
11697         (parser_chain_incomplete_item): New parameter named location. Used,
11698         along the decl, to construct the incomplete item node.
11699         (java_complete_class): resolve_class now uses WFL node extracted
11700         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
11701         where appropriate.
11702         (complete_method_decl): Unresolved function's argument types are WFL.
11703         (resolve_class): Parameter cl is now a WFL node.
11704         (resolve_and_layout): Likewise.
11705         (do_resolve_class): Likewise. Try first to use cl and then do the
11706         lookup on the decl when calling check_pkg_class_access.
11707         (complete_class_report_errors): Use IC_TYPE in place of
11708         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
11709         instead of doing a lookup over the decl.
11710         (java_check_final): Use WFL info from field tree list.
11711         (lookup_cl): Rewritten and returns a statically defined WFL node.
11712         (lookup_modifier_cl): Now uses information from WFL nodes.
11713         (process_imports): Likewise.
11714         (read_import_dir): name and cl arguments replaced by a single WFL
11715         node. Function modified accordingly.
11716         (find_in_imports_on_demand): Now uses WFL node.
11717         (check_pkg_class_access): cl argument is now a WFL node.
11718         (declare_local_variables): Fixed to use WFL nodes.
11719         (resolve_expression_name): Likewise.
11720         (build_method_invocation_stmt): name_combo argument renamed
11721         wfl. Function modified to use WFL nodes.
11722         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
11723         (lookup_method_invoke): cl is now a WFL node. Added missing
11724         IDENTIFIER_POINTER to class type decl name.
11725
11726 Tue Apr 14 15:23:29 1998  Dave Brolley  <brolley@cygnus.com>
11727
11728         * lang.c (init_parse): Now returns char* containing the filename.
11729
11730 Fri Apr 10 11:36:04 1998  Per Bothner  <bothner@cygnus.com>
11731
11732         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
11733
11734         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
11735         * class.c (make_class_data):  If flag_assume_compiled, initial class
11736         state is CSTATE_PREPARED; make superclass and interfaces direct
11737         references, rather than constant pool indexes.
11738
11739 Thu Apr  9 16:10:56 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11740
11741         * parser.y: Include flags.h. Removed debug variable pl.
11742         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
11743         (block:): Likewise.
11744         (labeled_statement_nsi:): Generate debug info when reducing
11745         expression_statement:.
11746         (check_pkg_class_access): get_access_flags_from_decl invokation
11747         fixed for new CLASS_* flags location.
11748         (source_end_java_method): Save/restore parser context when
11749         entering/leaving this routine. Restore lineno to its right value
11750         before calling expand_end_bindings.
11751         (build_method_invocation_stmt): build_invoke called with the
11752         current line information.
11753         (build_invoke): New argument cl. Wrap the function call around a
11754         wfl node.
11755         (refine_accessible_methods_list): Changed comment, removed
11756         unnecessary code.
11757         * parse.h: Fixed typo in comments.
11758         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
11759         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
11760         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
11761         parser_ccb_indent.
11762         * lex.c (java_lex): Record the last closing curly bracket of a
11763         function.
11764         * jcf-parse.c (jcf_parse_source): Now calls
11765         java_check_methods. Clarified comment, fixed typo.
11766
11767 1998-04-09  Dave Brolley  <brolley@cygnus.com>
11768
11769         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
11770         (finish_parse): Expose for non USE_CPPLIB builds.
11771
11772 Wed Apr  8 13:06:23 1998  Jeffrey A Law  (law@cygnus.com)
11773
11774         * lang.c (lang_print_xnode): New function.
11775
11776 Fri Apr  3 13:22:41 1998  Per Bothner  <bothner@cygnus.com>
11777
11778         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
11779         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
11780         used to build a class's dispatch table.
11781         (make_class_data):  Generate dispatch table if flag_assume_compiled.
11782         Set dtable of class object to address of class_dtable_decl.
11783
11784         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
11785         be volatile and have side effects - generates better code.
11786
11787         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
11788         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
11789
11790         * expr.c (expand_invoke):  If class is final, method is
11791         effectively final, so can call it directly.
11792
11793         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
11794
11795         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
11796
11797 Thu Mar 19 16:59:16 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11798
11799         * parse.y (build_method_invocation_stmt): Removed extra argument
11800         to build_invoke.
11801
11802 Mon Mar 16 17:25:19 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11803
11804         * expr.c (dtable_indent): Now static global.
11805         (expand_invoke): Now call invoke_build_dtable and
11806         build_invokevirtual.
11807         (invoke_build_dtable, build_invokevirtual): New functions.
11808         * jcf-io.c (find_class): Defer issuing a warning by setting
11809         jcf->outofsynch to 1.
11810         * jcf-parse.c (jcf_out_of_synch): New function.
11811         (load_class): Test this_jcf.outofsynch flag and call
11812         jcf_out_of_synch accordingly.
11813         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
11814         comment indentation.
11815         * lex.c (java_get_unicode): Fixed code indentation.
11816         (java_lex): Create string literal. Fixed typo. Removed several
11817         premature obstack_free.
11818         * parse.h: New enums for name resolution and invocation mode.
11819         (struct qualification): New data structure.
11820         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
11821         (do_resolve_class, build_method_invocation_stmt,
11822         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
11823         debug_line, identical_subpath_p, invocation_mode,
11824         refine_accessible_methods_list, build_invoke,
11825         lookup_method_invoke): New functions declared.
11826         (build_invokevirtual, invoke_build_dtable, match_java_method,
11827         build_field_ref, jcf_out_of_synch): New references to external
11828         functions.
11829         (struct parse_ctxt): Removed artificial_constructor field.
11830         * parse.y: (array_type:): Type defined for this rule.
11831         (class_type:): Installed default rule for interface_type:.
11832         (array_type:): Now build Java array type.
11833         (qualified_name:): Now use obstack_grow0.
11834         (method_declaration:): Skip the artificial constructor added to
11835         the list, if any.
11836         (abstract_method_declaration:): Execute the code only during pass 1.
11837         (block:): Installed default rule in block_statements:.
11838         (block_statement:): Add the statement to the method during pass 2.
11839         (statement_expression): Installed default rule for
11840         method_invocation:.
11841         (argument_list:): Added code to build the argument list.
11842         (method_invocation:): Added call to create the method invocation
11843         node.
11844         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
11845         (debug_line): New function for debug.
11846         (complete_class_decl): No longer do something during pass 1.
11847         (method_header): Use BUILD_PTR_FROM_NAME.
11848         (parser_qualified_classname): Use obstack_grow0. Removed bogus
11849         obstack_free.
11850         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
11851         function's main comment.
11852         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
11853         classes.
11854         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
11855         (resolve_class): Now works with arrays.
11856         (do_resolve_class, resolve_and_layout): New functions.
11857         (java_check_regular_methods): Reverse method list before and after
11858         having processed it. No longer set ctxp->artificial_constructor.
11859         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
11860         accordingly. Fixed typo in issued error message. Now use
11861         obstack_grow0.
11862         (find_in_imports_on_demand): Now use obstack_grow0.
11863         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
11864         (source_end_java_method): Call expand_expr_stmt instead of
11865         expand_expr. Calls it before calling expand_function_end.
11866         (java_method_add_stmt): Do nothing if errors were found during
11867         parsing.
11868         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
11869         (build_method_invocation_stmt, build_invoke, invocation_mode,
11870         lookup_method_invoke, refine_accessible_methods_list,
11871         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
11872         New functions.
11873         * typeck.c (build_java_signature): Properly end method signature
11874         if return type skipped.
11875         (match_java_method): New function.
11876
11877 Mon Mar 16 10:40:47 1998  Per Bothner  <bothner@cygnus.com>
11878
11879         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
11880
11881 Wed Feb 25 08:55:49 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11882
11883         * expr.c (build_invoke_non_interface): New function.
11884         (methods_ident, ncode_ident): Now static globals.
11885         (expand_invoke): Use build_invoke_non_interface.
11886         * java-tree.h (struct lang_decl): New field function_decl_body.
11887         (DECL_FUNCTION_BODY): New macro.
11888         * jcf-parse.c (jcf_parse_source): Deeper check before setting
11889         CLASS_FROM_SOURCE_P.
11890         (parse_source_file): Fixed typos. Call java_layout_parsed_class
11891         before starting pass 2. Call to java_generate_parsed_class replaced
11892         by java_register_parsed_class.
11893         * lex.c: Fixed typo in header. Some line width related formating.
11894         * lex.h: Some line width related formating.
11895         * parse.h (source_end_java_method, resolve_expression_name,
11896         complete_class_decl, maybe_create_class_interface_decl,
11897         check_class_interface_creation): New static function declarations.
11898         (java_layout_parsed_class, java_method_add_stmt): New function
11899         declarations.
11900         (struct parser_ctxt): Field mark_class_generate removed. New
11901         fields class_list and artificial_constructor.
11902         * parse.y: Fixed typo in header.
11903         (class_declaration:): Call complete_class_decl when class body
11904         parsed.
11905         (method_declaration:): Call source_end_java_method in pass 2 when
11906         the method body is defined.
11907         (postfix_expression:): Do expression name resolution on sub-rule
11908         name during pass 2.
11909         (create_class, create_interface): Merged common pieces.
11910         (check_class_interface_creation, maybe_create_class_interface_decl):
11911         New functions.
11912         (complete_class_decl): New function.
11913         (register_fields): Fixed line width related typo.
11914         (method_header): Correctly skip first argument when fixing
11915         argument line. Changed the loop.
11916         (java_check_circular_reference): Now use ctxp->class_list.
11917         (java_complete_class): Removed start/stop marking.
11918         (java_check_regular_methods): Now takes a class decl as an
11919         argument.  Add default constructor if none were encountered.
11920         (java_check_methods): Now use ctxp->class_list. Changed call to
11921         java_check_regular_methods.
11922         (source_start_java_method): Set DECL_ARG_TYPE for each function
11923         arguments.
11924         (source_end_java_method, java_method_add_stmt): New functions.
11925         (java_generate_parsed_class): No longer exists.
11926         (java_layout_parsed_class, java_register_parsed_class): New functions.
11927         (resolve_expression_name): New function.
11928
11929 Thu Feb 12 11:54:28 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11930
11931         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
11932         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
11933         until pass initializations are done. Call read_import_dir with
11934         pass set to 0.
11935         * parse.h: (lookup_modifier_cl): New function declared.
11936         (INTERFACE_FIELD_MODIFIERS): New macro.
11937         (OBSOLETE_MODIFIER_WARNING): New macro.
11938         * parse.y: (register_fields): Class type and current field name in
11939         local variables. Check modifier(s) if adding field(s) to an interface.
11940         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
11941         and report errors using the faulty modifier line context.
11942         (lookup_modifier_cl): New function.
11943         (read_import_dir): Detect and report default import processing
11944         failure.
11945
11946 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
11947
11948         Add a pair of -fassume-compiled/-fno-assume-compiled options.
11949         * class.c (is_compiled_class): Return 1 after making sure it
11950         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
11951         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
11952         * java-tree.h (flag_assume_compiled): Add decl.
11953         * lang.c (lang_f_options): Add the flag.
11954         (flag_assume_compiled): Add decl, default to 0.
11955
11956 Wed Feb 11 11:27:59 1998  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11957
11958         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
11959         (is_compiled_class): Likewise.
11960         (layout_class): Likewise.
11961         (layout_class): Detect and lay out classes defined in source code.
11962         (interface_of_p, add_interface_do, may_add_interface): New
11963         function.
11964         (add_interface): Now use add_interface_do.
11965         (add_method_1): New function.
11966         (add_method): Now use add_method_1.
11967         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
11968         (complete_start_java_method): New function.
11969         (start_java_mehod): Now call complete_start_java_method.
11970         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
11971         (expand_invoke): Likewise and fixed typo.
11972         *gjava.c: (print_super_field): Use new argument to find_class
11973         DO_CLASS_FILE.
11974         (main): Likewise.
11975         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
11976         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
11977         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
11978         IDENTIFIER_NODE.
11979         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
11980         (add_method_1, push_class): New prototypes.
11981         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
11982         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
11983         directory where the class was found.
11984         (find_class): New argument DO_CLASS_FILE. Function find_class
11985         modified accordingly.
11986         *jcf-parse.c: (fix_class_path): New function.
11987         (load_class): Use new VERBOSE argument. load_class now finds and
11988         loads/parses .class/.java files. Save read_state of current_jcf
11989         if necessary.
11990         (java_parser_abort_on_error): New macro.
11991         (jcf_parse_source, parse_source_file): New function.
11992         (jcf_parse): Fixed typo.
11993         (yyparse): Call parse_source_file () only.
11994         (process_zip_dir): Fixed typo, fix zdir->filename_length when
11995         writing the real class name back in the zip directory entry.
11996         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
11997         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
11998         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
11999         (find_class): Prototype fixed.
12000         *lex.c: Added 1998 time stamp.
12001         Removed all static global variables, moved into the parser
12002         context data structure.. Now include unistd.h if SEEK_SET not
12003         defined.
12004         (java_init_lex): Rewritten.
12005         (java_sneak_unicode): Modified current unicode access in current line.
12006         (java_unget_unicode): Likewise.
12007         (java_allocate_new_line): New allocation management.
12008         (java_read_char): Modified access and storage of unget_utf8_value.
12009         New way of processing current unicode.
12010         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
12011         (java_get_unicode): Now use the parser context.
12012         (java_lineterminator): Likewise.
12013         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
12014         of the reentrant parser implementation. Function now use the
12015         parser context data structure and java_lval. Fixed production of
12016         the float and double constant "out of range" error message. Fixed
12017         obstack use. Return integer value when hitting a modifier. Now
12018         return type for TRUE, FALSE and other predefined types. Return
12019         identifier as a TREE_LIST list containing the current line context
12020         as the TREE_VALUE sub-node.
12021         (java_unicode_2_utf8): Fixed typo in declaration.
12022         (java_lex_error): Now use the parser context data structure.
12023         *lex.h: Added 1998 time stamp.
12024         (struct java_line): New fields ref_count and next.
12025         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
12026         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
12027         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
12028         *parse.h: Added 1998 time stamp.
12029         (java_parse_source_file): Renamed from parse_source_file.
12030         (YYERROR_NOW, YYNOT_TWICE): Fixed.
12031         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
12032         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
12033         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
12034         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
12035         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
12036         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
12037         (struct parser_ctxt): New data structure to keep the parser context.
12038         *parse.y: Added 1998 time stamp, got rid of static global variables.
12039         (java_error_count, ctxp): New global variables.
12040         (%union): New value field.
12041         (numeric_type, integral_type): Rules removed.
12042         (primitive_type): Rule defined to handle integral, float, double and
12043         boolean types.
12044         (qualified_name, package_declaration,
12045         single_type_import_declaration, type_import_on_demand_declaration,
12046         modifiers, class_declaration, super, interfaces,
12047         interface_type_list, class_body, field_declaration,
12048         field_declaration, variable_declarators, variable_declarator,
12049         variable_declarator_id, method_declaration, method_header,
12050         formal_parameter_list, formal_parameter, method_body, block,
12051         static, interface_declaration, extends_interfaces,
12052         abstract_method_declaration, local_variable_declarators): Rules now
12053         define actions.
12054         (force_error, do_warning): New global statics.
12055         (push_parser_context, parser_context_save_global,
12056         parser_context_restore_global, pop_parser_context): New functions.
12057         (yyerror): Now uses the global parser context. Fixed use of obstack.
12058         (parse_error, parse_error_context, parse_warning_context,
12059         java_accstring_lookup, redefinition_error, check_modifiers,
12060         parser_add_interface, create_interface, create_class, find_field,
12061         duplicate_declaration_error, register_fields, method_header,
12062         check_modifiers_consistency, check_abstract_method_header,
12063         method_declarator, parser_qualified_classname,
12064         parser_check_super_interface, parser_check_super,
12065         parser_chain_incomplete_item, java_check_circular_reference,
12066         layout_class_from_source, java_complete_class,
12067         complete_method_decl, resolve_class, complete_class_report_errors,
12068         java_check_final, check_method_redefinition,
12069         java_check_regular_methods, java_check_abstract_methods,
12070         java_check_methods, lookup_java_interface_method2,
12071         lookup_java_method2, lookup_cl, find_name_in_single_imports,
12072         process_imports, find_in_imports, read_import_entry,
12073         read_import_dir, find_in_imports_on_demand,
12074         check_pkg_class_access, not_builtin_p, declare_local_variables,
12075         source_start_java_method, java_generate_parsed_class): New
12076         functions.
12077         *typeck.c: (signature_include_return): New global variable.
12078         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
12079         to add the function returned type in the signature.
12080
12081 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
12082
12083         * jcf-io.c (open_in_zip): Use strncmp and LEN.
12084
12085 Thu Jan 29 16:12:13 1998  Dave Brolley  <brolley@cygnus.com>
12086
12087         * Make-lang.in (java.info): Added.
12088         (java.install-info): Added
12089
12090 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
12091
12092         * Makefile.in (clean): Also remove java/parse.c.
12093
12094 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
12095
12096         Add a pair of -fbounds-check/-fno-bounds-check options.
12097         * lang.c (lang_decode_option): Add code to grok arguments.
12098         (flag_bounds_check): Add decl.
12099         (lang_f_options): New array w/ the option in it.
12100         * java-tree.h (flag_bounds_check): Add decl.
12101         * lang-options.h: New file.
12102         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
12103         of a static macro value.
12104         (JAVA_ARRAY_EXCEPTION): Delete macro.
12105
12106 Fri Jan 23 14:19:47 1998  Per Bothner  <bothner@cygnus.com>
12107
12108         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
12109         * expr.c (build_anewarray):  Add missing promote_type.
12110
12111 Thu Jan 22 17:43:45 1998  Per Bothner  <bothner@cygnus.com>
12112
12113         Add array types with known length to optimize bounds checking.
12114         * typeck.c (build_java_array_type):  Take length parameter.
12115         (java_array_type_length, build_prim_array_type):  New functions.
12116         * java-tree.h:  Update for new functions.
12117         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
12118         * class.c:  Use build_prim_array_type.
12119         * expr.c (can_widen_reference_to):  Handle known-length array types.
12120         (verify_jvm_instructions):  Keep track of integer push instructions
12121         followed by newarray/anewarray, so we can build known-length arrays.
12122         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
12123         (java_array_data_offset):  New function.
12124         (build_java_array_length_access):  New function.  Optimize if constant.
12125         (build_java_arrayaccess):  Constant fold bounds check.
12126         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
12127         (build_newarray, build_anewarray):  New functions.
12128         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
12129         * verify.c (merge_types):  Handle known-lengh array types.
12130
12131 Mon Jan 19 13:09:25 1998  Per Bothner  <bothner@cygnus.com>
12132
12133         * expr.c (expand_byte_code):  Fix performace bug, which caused
12134         searching linenumber_table to be linear rather than constant.
12135
12136 Fri Dec 12 19:18:42 1997  Per Bothner  <bothner@cygnus.com>
12137
12138         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
12139
12140         * decl.c, java-tree.h (soft_fmod_node):  New global.
12141         * decl.c (init_decl_processing):  Define __builtin_fmod.
12142         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
12143         using __builtin_fmod.
12144
12145 Thu Dec  4 13:22:59 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12146
12147         * keyword.h: New file, output of keyword.gperf as processed by
12148         gperf.
12149         * lex.c (java_lex_init): Initialize java_error_flag.
12150         * parse.c (YYERROR_NOW): Uses java_error_flag.
12151         * parse.y: New static java_error_flag. Useless definition of
12152         buffer_error gone.
12153         * parse.y (java_error): Portable error recovery using
12154         java_error_flag (not yet completely tuned).
12155
12156 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
12157
12158         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
12159
12160 Wed Dec  3 18:37:42 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12161
12162         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
12163         (parse.c, lex.c, keyword.h): New rules for Java source code
12164         front-end.
12165         * parse.c: Renamed into jcf-parse.c.
12166         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
12167         * keyword.gperf: New file, Java keywords.
12168         * parse.y: New file, Java language grammar.
12169         * parse.h: New file, Java language grammar definitions.
12170         * lex.c: New file, Java language lexer.
12171         * lex.h: New file, Java language lexer definitions.
12172
12173 Wed Dec  3 17:00:17 1997  Per Bothner  <bothner@cygnus.com>
12174
12175         * decl.c (clinit_identifier_node), java-tree.h:  New global.
12176         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
12177         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
12178         * expr.c (expand_java_field_op):  Check for invalid assignment
12179         to final field.
12180
12181         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
12182
12183 Mon Oct 27 17:46:36 1997  Per Bothner  <bothner@cygnus.com>
12184
12185         * verify.c (verify_jvm_instructions):  When processing a handler,
12186         attempt to set the current_subr to the right value.
12187         (More complicated code combines Sep 17 and Oct 22 versions.)
12188
12189 Fri Oct 24 11:36:54 1997  Per Bothner  <bothner@cygnus.com>
12190
12191         * class.c (push_class):  Figure out (guess) name of source file.
12192         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
12193         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
12194         (parse_class_file):  Change return type from int to void.
12195         Call debug_start_source_file/debug_end_source_file.
12196
12197         * expr.c (build_java_binop):  Fix masking 2nd operand.
12198         * decl.c (init_decl_processing):  Set sizetype first.
12199
12200 Wed Oct 22 19:39:05 1997  Per Bothner  <bothner@cygnus.com>
12201
12202         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
12203         (Revert Sep 17 change.)
12204
12205 Tue Oct 21 15:09:02 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12206
12207         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
12208         .class extension in their name and fix thing so we don't process
12209         them parse_zip_file_entries().
12210         (parse_zip_file_entries): Cleaned unused local variables.
12211
12212 Mon Oct 20 14:52:42 1997  Per Bothner  <bothner@cygnus.com>
12213
12214         * expr.c (can_widen_reference_to):  Allows equal array element types.
12215         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
12216         * jcf-dump.c (RET):  Get (and print) index.
12217
12218         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
12219         Promote element type to POINTER_TYPE.
12220
12221 Mon Oct 20 13:40:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12222
12223         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
12224         find_in_current_zip, jcf_figure_file_type): Moved from
12225         jcf-reader.c to parse.c.
12226         * zextract.c: (read_zip_archive): takes file_comment_length possible
12227         field into account.
12228
12229 Mon Oct 20 11:45:06 1997  Per Bothner  <bothner@cygnus.com>
12230
12231         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
12232
12233         * verify.c (merge_types):  Handle array types even better ...
12234
12235 Fri Oct 17 15:56:37 1997  Per Bothner  <bothner@cygnus.com>
12236
12237         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
12238
12239         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
12240         * class.c (make_class_data):  Don't build fields_decl if no fields.
12241         When building fields_decl, skip if DECL_ARTIFICAL.
12242
12243         * expr.c (java_stack_swap):  Update stack_type_map.
12244         * verify.c (merge_types):  Handle array types better.
12245
12246 Wed Oct 15 18:09:45 1997  Per Bothner  <bothner@cygnus.com>
12247
12248         * class.c (add_field):  Don't promote short integral fields to
12249         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
12250         * expr.c (push_value):  Promote and convert short integral values.
12251
12252         * decl.c, java-tree.h (integer_two_node):  New constant node.
12253         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
12254
12255 Wed Oct 15 17:04:50 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12256
12257         * class.c (append_gpp_mangled_type): Use function argument
12258         unpromoted type to generate mangled name.
12259
12260 Mon Oct 13 16:52:55 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12261
12262         * constants.c (build_constant_data_ref): Now uses current_class
12263         instead of main_class.
12264         (build_constants_constructor): Now uses current_class instead of
12265         main_class.
12266         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
12267         of the global variable SeepZipFiles done here.
12268         * zextract.c (read_zip_archive): extra_field optional field taken
12269         into account while computing the position of the class file in the
12270         archive.
12271         * verify.c (verify_jvm_instructions): Use current_jcf to search
12272         the constant pool.
12273         * parse.c (load_class): First search for the class to load in the
12274         current zip file. Saves current_jcf (restored before returning
12275         from that function). Don't call JCF_FINISH in the class was found
12276         in the current ZIP file.
12277         (jcf_parse): If the class was found in the current ZIP file, save
12278         its tree_constant_pool (for later reuse).
12279         (parse_class_file): New function. Process each method defined in
12280         the current class and record the class as to be later registered.
12281         (yyparse): Rewritten. Figure the type of the current file and switch
12282         accordingly.
12283         * lang.c: New global variable current_jcf.
12284         (lang_init): Removed compiling_from_source test (done later, in
12285         yyparse). Removed call the jcf_parse ().
12286         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
12287         (typedef struct JCF): New fields seen_in_zip (to mark a class found
12288         in the current ZIP file) and zip_offset (offset to the class data in
12289         the current zip file).
12290         * jcf-reader.c: zipfile.h included.
12291         localToFile: New ZipFileCache static global variable
12292         (parse_zip_file_entries): New function. Browse the current ZIP
12293         file directory and process each class found.
12294         (process_zip_dir): New function. Register each class found in the
12295         ZIP file directory. The class aren't parsed but a valid JCF is
12296         link to each of them.
12297         (find_in_current_zip): New function. Search for a class in the
12298         current ZIP file directory. If found, prepare the class so that it
12299         can be loaded.
12300         (jcf_figure_file_type): New function. Examine the file structure
12301         to figure a class file, a ZIP file. If none of these categories are
12302         matched, a source file is assumed.
12303         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
12304         SeenZipFile: New global variable.
12305         (open_in_zip): Use zipmember's length to accelerate the search for
12306         a member. If zipmember was NULL and zip file successfully read,
12307         return 0.
12308         * java-tree.h: New global variable current_jcf declared.  Added
12309         declaration for current_constant_pool_tags, current_constant_pool_data,
12310         current_constant_pool_length, current_constant_pool_data_ref.
12311         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
12312         store the JCF of classes seen in a zip file) and tree *constant_pool
12313         (to save a loaded class constant pool). current_class declared here.
12314         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
12315         retrieve method_ref_constant.
12316         (PUSHC): java_push_constant_from_pool now uses current_jcf.
12317         (OBJECT): get_class_constant now uses current_jcf.
12318         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
12319         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
12320         (expand_invoke): Now uses current_class instead of main_class
12321         (build_class_init): Now uses current_class instead of main_class
12322         * class.c: New static global variable registered_class.
12323         (register_class): New function.
12324         (emit_register_class): Modified to use registered_class instead of
12325         main_class
12326         (is_compiled_class): Now take into account class seen in the archive.
12327
12328 Mon Oct  6 12:03:23 1997  Per Bothner  <bothner@cygnus.com>
12329
12330         * except.h:  Renamed to: java-except.h.
12331         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
12332         * except.c:  Add semi-working (commented out) implementation.
12333
12334         * expr.c (expand_iinc):  Add needed flush_quick_stack.
12335         * parse.c (set_source_filename):  New function.
12336         (give_name_to_class):  Set input_filename from package.classname.java.
12337
12338         * jcf-io.c (find_class):  Don't look first in ".".
12339
12340 Wed Oct  1 11:26:10 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12341
12342         * zextract.c (read_zip_archive): Now takes into account the
12343         extra_field field.
12344         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
12345
12346 Sat Sep 20 12:44:28 1997  Per Bothner  <bothner@cygnus.com>
12347
12348         * constants.c, java-tree.h (build_internal_class_name):  New function.
12349         (alloc_class_constant):  Re-implement using build_internal_class_name.
12350         * class.c (make_class_data):  Likewise.
12351         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
12352
12353 Wed Sep 17 13:15:23 1997  Per Bothner  <bothner@cygnus.com>
12354
12355         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
12356         to NULL before pushing an exception handler target.
12357
12358         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
12359         (java_stack_swap, java_stack_dup):  Re-write to be safe from
12360         clobbering registers.
12361         (build_class_init):  New function.
12362
12363 Wed Sep 17 11:02:41 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12364
12365         * typeck.c (build_java_array_type): Temporary use
12366         permanent_obstack to create the array 'length' field.
12367         * expr.c (lookup_label): Temporay use permanent_obstack to create
12368         label if not found.
12369         * class.c (push_super_field): Tempory use permanent_obstack.
12370
12371 Mon Sep 15 11:33:31 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12372
12373         * typeck.c (type_for_mode): Now handles double_type_node and
12374         float_type_node.
12375         * verify.c (verify_jvm_instructions): The instruction following
12376         the wide bytecode is checked. OPCODE_ret added to the list of
12377         wide.
12378
12379 Thu Sep 11 19:45:18 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12380
12381         * class.c (make_class): Temporary use permanent_obstack. Set the
12382         class CLASS_P field to 1.
12383         (push_class): Temporary use permanent_obstack.
12384         (set_super_info): Temporary use permanent_obstack.
12385         (add_method): Temporary use permanent_obstack, set
12386         METHOD_TRANSIENT().
12387         (add_field): Temporary use permanent_obstack. Sets
12388         FIELD_VOLATILE() and FIELD_TRANSIENT().
12389         (build_class_ref): Temporary use permanent_obstack if the class
12390         isn't compiled.
12391         (build_static_field_ref): Temporary use permanent_obstack when
12392         creating field's rtl.
12393         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
12394         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
12395         and fields. Function finalized, as far as flag handling.
12396         (push_class_static_dummy_field): Temporary use permanent_obstack.
12397         (emit_register_class): Force generation of class registration at
12398         -O3 or deeper.
12399         * decl.c (end_java_method): Call permanent_allocation() before
12400         returning.
12401         * expr.c (can_widen_reference_to): Added comment to interface
12402         handling, fixed typo.
12403         (lookup_field): Now uses CLASS_P() to correct FIXME
12404         (expand_invoke): Verification on public && !static &&
12405         !abstract moved into soft_lookupinterfacemethod (kaffe).
12406         Use Object class dtable if objectref is an array when expanding
12407         invokeinterface.
12408         (java_push_constant_from_pool): Temporary use permanent_obstack
12409         for CONSTANT_string
12410         * parse.c (get_ref_constant): Temporary use permanent_obstack to
12411         create constant references.
12412         (get_constant): Temporary use permanent_obstack to create constant.
12413         (load_class): Temporary use permanent_obstack to load class.
12414         (jcf_parse): Temporary use permanent_obstack to perform class
12415         layout.
12416         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
12417         (build_java_signature): Temporary use permanent_obstack.
12418         * verify.c: (verify_jvm_instruction): removed unnecessary verification
12419         on ACC_SUPER flag.
12420         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
12421         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
12422         (CLASS_P): Defined
12423
12424 Thu Sep 11 11:57:32 1997  Per Bothner  <bothner@cygnus.com>
12425
12426         * class.c (append_gpp_mangled_type):  Fix typo.
12427         (emit_register_class):  Use main_class to get class object, rather
12428         than looking for no-longer-existing static decl starting with _CL.
12429         * typeck.c (parse_signature_type):  Promote array element type
12430         if it is a RECORD_TYPE.
12431
12432 Wed Sep 10 16:09:23 1997  Per Bothner  <bothner@cygnus.com>
12433
12434         * class.c (push_class_static_dummy_field):  New function.
12435         (mangle_static_field):  New. Do G++-style mangling of static fields.
12436         (layout_class):  Mandle static fields here, not in add_field.
12437         (build_class_ref):  The class object is now a dummy static field.
12438         * decl.c (find_local_variable):  Look for best, instead of first match.
12439         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
12440         (build_java_athrow):  Don't check here if exception is Throwable.
12441         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
12442         (TYPE_USED):  Removed.  No longer used ...
12443         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
12444         * verify.c (push_pending_label):  New function.
12445         (push_pending_block):  Renamed to check_pending_block.
12446         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
12447         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
12448         re-checking possible handlers) after a store (less wasted work).
12449         Check for null handler (finally) before calling add_handler.
12450         Various changes to (finally?) correctly handle try/finally.
12451
12452 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
12453
12454         * class.c: Include stdio.h.
12455
12456 Thu Sep  4 21:30:55 1997  Per Bothner  <bothner@cygnus.com>
12457
12458         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
12459         to make sure class is initialized before static/special invoke.
12460
12461         * verify.c (verify_jvm_instructions):  On a store instruction,
12462         call find_local_variable to force pre-allocation of decl and rtx.
12463         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
12464
12465 Wed Sep  3 16:13:23 1997  Per Bothner  <bothner@cygnus.com>
12466
12467         * class.c (build_class_ref):   Strip off "promoted_" if need be.
12468         (make_field_value): Call build_java_signature when needed.
12469         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
12470         * expr.c (build_java_athrow):  Don't push_value of exception.
12471         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
12472         match specification of [fd]cmp[lg] for NaNs.
12473         (expand_byte_code):  Add support for exception handler ranges.
12474         * except.c:  Add skeleton for EH code-generation.
12475         * verify.c (merge_types):  Treat all promoted integral types as equal.
12476         * constants.c (build_constants_constructor):  To force creation of
12477         current_constant_pool_data_ref, call build_constant_data_ref.
12478
12479         * javaop.def (lload):  Fix typo.
12480         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
12481
12482 Tue Sep  2 17:37:25 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
12483
12484         * parse.c: Don't include function.h.
12485
12486 Wed Aug 27 18:33:04 1997  Per Bothner  <bothner@cygnus.com>
12487
12488         * except.[ch]:  New files.
12489         * Makefile.in (JAVA_OBJS):  Add except.o
12490         * expr.c:  Temporary warning about unimplemented exceptions.
12491         * verify.c:  Verify exception handlers.
12492
12493         * jcf-dump.c (disassemble_method):  Print exception table.
12494
12495 Wed Aug 27 13:26:58 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12496
12497         * expr.c (verify_jvm_instructions): Started a thorough
12498         verification of invoke* bytecodes.
12499         (expand_byte_code): flush quick stack if PC is the target of a
12500         branch.  and undef RET (conflicting with config/i386/i386.h).
12501         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
12502         used.
12503         (expand_invoke): Now handles invokeinterface and do more
12504         verification according to the bytecode.
12505         (lookup_field): Don't try to load the class if processing
12506         dtable_type.
12507         (can_widen_reference_to): Now handles interfaces.
12508         * decl.c (init_decl_processing): New global variable
12509         soft_lookupinterfacemethod_node, declared in java-tree.h.
12510         Call set_super_info on string_type_node.
12511         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
12512         defined.
12513         * class.c (set_super_info): Fills the CLASS_* flags according to
12514         access_flags.
12515         (get_access_flags_from_decl): Handles all class flags.
12516
12517 Tue Aug 26 18:54:34 1997  Per Bothner  <bothner@cygnus.com>
12518
12519         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
12520         * parse.c (yyparse):  Check for abstract method, and missing code.
12521         * expr.c (expand_byte_code):  Change interface.
12522         * lang.c (put_decl_node):  Print promoted types prettier.
12523         * verify.c (verify_jvm_instruction):  Change interface.
12524         Partial support for scanning exception table.
12525         For load instructions, handle promoted integral types.
12526
12527 Thu Aug 21 13:48:01 1997  Per Bothner  <bothner@cygnus.com>
12528
12529         * verify.c:  New file, with contents moved from expr.c.
12530         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
12531         * typeck.c (is_array_type_p):  Moved here from expr.c.
12532         * java-tree.h:  Add some now-needed function declarations.
12533         * Makefile.in (JAVA_OBJS): Added verify.o.
12534
12535 Wed Aug 20 14:34:34 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12536
12537         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
12538         METHOD_ABSTRACT flag.
12539
12540         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
12541         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
12542         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
12543
12544         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
12545         variables.
12546         (start_java_method): Hook for SYNCHRONIZED methods.
12547
12548         * expr.c (build_java_jsr, build_java_ret): New functions
12549         (JSR,PRE): New macros
12550         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
12551         (verify_jvm_instructions): tableswitch, lookupswitch,
12552         monitorenter, monitorexit, goto_w: verified.
12553         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
12554         (build_java_monitor): New function.
12555         (MONITOR_OPERATION): Modified to call build_java_monitor()
12556         (verify_jvm_instructions): Started a thorough verification of
12557         invoke* bytecodes.
12558
12559 Tue Aug 19 13:35:49 1997  Per Bothner  <bothner@cygnus.com>
12560
12561         Support verification of jsr/ret subroutines (used for try/finally).
12562         * decl.c (return_address_type_node):  New type node.
12563         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
12564         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
12565         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
12566         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
12567         TYPE_USED):  New macros for special types in type_map.
12568
12569         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
12570         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
12571         BCODE_JUMP_TARGET.
12572         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
12573
12574         * expr.c (can_widen_reference_to):  New function.
12575         (pop_type):  Use it.
12576         (merge_type_state):  Support handling start of subroutine.
12577         (push_pending_block):  Return char* error message, instead of calling
12578         fatal on an error.  Also handle subroutines.
12579         (verify_jvm_instructions):  Handle errors from push_poending_block.
12580         Support jsr and ret instructions.
12581
12582 Tue Aug 19 13:33:36 1997  Per Bothner  <bothner@cygnus.com>
12583
12584         * jcf-io.c (find_classfile):  Fix thinko.
12585         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
12586
12587 Tue Aug 12 20:14:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
12588
12589         * Makefile.in (BISON): Remove.
12590
12591 Thu Aug  7 23:08:24 1997  Per Bothner  <bothner@cygnus.com>
12592
12593         * Makefile.in:  Convert to autoconf.
12594         * config-lang.in (outputs):  Added java/Makefile.
12595
12596         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
12597         Rename cc1java to jc1.
12598
12599         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
12600         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
12601
12602         * class.c (class_depth):  Do load_class if needed.
12603
12604         Mostly better verification.
12605         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
12606         (init_decl_processing):  Change return type of soft_checkcast.
12607         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
12608         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
12609         lang_print_error):  New functions.
12610         (lang_init):  Set global hook print_error_function to lang_print_error.
12611         * expr.c:  In the type_map ptr_type_node is only used for null now.
12612         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
12613         (merge_types):  Dererence pointer to record types before comparing.
12614         (decode_newarray_type, merge_types):  On error just return NULL.
12615         (build_java_binop):  Add preliminary implementation (with warning)
12616         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
12617         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
12618         (expand_compare, expand_java_goto, expand_java_call):  Don't
12619         push_pending_block, since that only makes sense when verifying.
12620         (merge_type_state):  Different return codes.
12621         (push_pending_block):  A block may need to be verified more than once.
12622         (expand_byte_code):  Warn about unused code at code generation time.
12623         (verify_jvm_instruction):  Changed logic, since code may need to be
12624         re-verified if type-state has changed.  Also, better error handling.
12625         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
12626         Improve newarray, anewarray, ?aload, athrow,
12627         * java-tree.h (LABEL_CHANGED):  New macro.
12628
12629 Tue Aug  5 12:21:27 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12630
12631         * decl.c (soft_athrow_node): New global variable initialized.
12632         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
12633         * typeck.c (convert): Added support for REAL_TYPE.
12634         (convert_to_char): New function.
12635         (convert): Handle CHAR_TYPE.
12636         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
12637         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
12638         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
12639         promoted type.
12640         (verify_jvm_instructions): Added break a the end of bogus unop: label.
12641         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
12642         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
12643         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
12644         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
12645         to Use The Right Things.
12646         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
12647         compatible with INT. BOOLEAN is made equivalent to BYTE.
12648         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
12649         OPCODE_ifnonnull): Now supported.
12650         (build_java_athrow): New function.
12651
12652 Mon Aug  4 15:46:45 1997  Per Bothner  <bothner@cygnus.com>
12653
12654         Rename method name <init> to match G++ (and fix mangling).
12655         * class.c (layout_class):  Replace method name of <init> by class name.
12656         (make_method_value):  Do inverse renaming of constructor from <init>.
12657         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
12658         * typeck.c (lookup_java_constructor):  New function.
12659         * expr.c (expand_invoke):  If method_name is <init>, call
12660         lookup_java_constructor to find constructor.
12661
12662         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
12663
12664 Fri Aug  1 11:37:09 1997  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12665
12666         * parse.c (get_class_constant): Modified to handle array "classes"
12667         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
12668         wide type.
12669         (convert): Modified to handle real type.
12670         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
12671         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
12672         variables declared.
12673         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
12674         soft_multianewarray, soft_newarray_node, soft_throw_node): New
12675         global variables initialized.
12676         (find_local_variable): Handles the case of a pointer
12677         (end_java_method): Restore the use of one more scope
12678         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
12679         build_java_array_length_access, expand_java_arrayload,
12680         expand_java_arraystore, expand_java_array_length,
12681         expand_java_multianewarray, expand_java_anewarray,
12682         build_java_check_indexed_type, is_array_type_p,
12683         build_java_throw_out_of_bound_exception): New functions.
12684         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
12685         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
12686         OPCODE_<t>aload): Implemented code for verification.
12687         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
12688         ARRAY_NEW_MULTI): Macro defined.
12689         (CONVERT): Modified to invoke convert().
12690         (case OPCODE_aload2): Fixed index typo from 2 to 1.
12691
12692 Thu Jul 31 12:48:18 1997  Per Bothner  <bothner@cygnus.com>
12693
12694         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
12695         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
12696         (make_class_data):  Field name needs '/' as package prefix.
12697         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
12698
12699 Fri Jul 25 11:44:21 1997  Per Bothner  <bothner@cygnus.com>
12700
12701         Implement debug information for local variables.
12702         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
12703         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
12704         DECL_LOCAL_SLOT_CHAIN):  New macros.
12705         (struct lang_decl_var):  New type.
12706         * parse.c (give_name_to_locals):  Move to decl.c.
12707         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
12708         (start_java_method):  Re-write parameter handling.
12709         (pending_local_decls):  New global variable.
12710         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
12711         (find_local_variable):  Accept pc so we can skips decls not in range.
12712         (struct binding_level):  Add end_pc field.
12713         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
12714         (various):  Change so current pc gets passed to find_local_variable.
12715
12716         * decl.c (init_decl_processing):  Re-arrange fields in
12717         class_type_node and and method_type_node to match kaffe 0.9.1.
12718         * class.c (make_method_value, make_class_data):  Update
12719         initializations to match.
12720
12721 Wed Jul 16 17:17:50 1997  Per Bothner  <bothner@cygnus.com>
12722
12723         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
12724         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
12725         (push_super_field):  New function.
12726         (make_class_data):  Handle inheritance of class static initializer.
12727         (layout_class):  New name mangling.
12728         * constants.c (build_constant_data_ref):  Init type of data array
12729         to a one-element array.
12730         (build_constants_constructor):  Set DECL_SIZE from complete array type.
12731         * decl.c:  Rename class_type, object_type etc to class_type_node,
12732         object_type_node etc.  Make former inherit from latter.
12733         * expr.c (expand_invoke):  Add cast of function address.
12734         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
12735         * parse.c (yyparse):  Don't call layout_class here.
12736         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
12737
12738 Sat Jun 14 12:06:57 1997  Per Bothner  <bothner@cygnus.com>
12739
12740         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
12741         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
12742         (alloc_class_constant):  New.
12743         * expr.c (expand_invoke):  Make sure method's class is initialized.
12744         * class.c (interits_from_p, emit_register_class):  New functions.
12745         * parse.c (yyparse):  Call emit_register_class.
12746
12747 Mon Jun  9 18:08:06 1997  Per Bothner  <bothner@cygnus.com>
12748
12749         * constants.c:  New file, to handle constant pool.
12750         * Makefile.in (JAVA_OBJS):  Add constants.o.
12751         * decl.c (init_decl_processing):  Update, fix, finish various structs.
12752         (pushdecl_top_level):  New.
12753         * parse.c (layout_class):  Moved to class.c.
12754         * expr.c (java_push_constant_from_pool):  New function.
12755         * class.c (build_class_ref):  Make work fully
12756         (make_class_data):  Emit super-class, constant pool, interface vector.
12757
12758 Tue Jun  3 10:14:31 1997  Per Bothner  <bothner@cygnus.com>
12759
12760         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
12761         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
12762         * class.c (class_depth):  New function.
12763         (lookup_named_class):  Replaced by new function lookup_class.
12764         * decl.c (object_type_node, string_type_node):  New.
12765         Remove various types that we no longer need.
12766         * expr.c (verify_jvm_instructions):  New separate verifier pass.
12767         (push_type, pop_type):  New functions for verifier.
12768         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
12769         (expand_byte_code):  Simplify, since we assume already verified.
12770         (expand_invoke):  Now mostly works.
12771         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
12772         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
12773         * parse.c:  Wait to allocate class object until we know its name.
12774         (layout_class):  Calculate DECL_VINDEX for each virtual method.
12775         * typeck.c (get_array_type):  Rename to ...
12776         (build_java_array_type):  ... and provide working implementation.
12777         (build_java_signature):  New function - build Java signature of type.
12778         (set_java_signature):  New function - cache signature with type.
12779         (lookup_java_method):  New function.
12780
12781 Tue May  6 22:08:24 1997  Per Bothner  <bothner@deneb.cygnus.com>
12782
12783         * class.c (ident_subst):  Take extra SUFFIX parameter.
12784         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
12785         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
12786         (build_class_ref):  Actually implement.
12787         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
12788         * decl.c (builtin_function):  New.
12789         (init_decl_processing):  Update for current Kaffe.  Declare some
12790         builtin Kaffe functions.
12791         * expr.c (build_address_of):  New.
12792         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
12793         Renamed (from expand_java_new etc), and added working implementations.
12794         (build_field_ref):  Now also handle static fields.
12795         (expand_invoke):  Implement invokestatic, and start implement rest.
12796         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
12797         * javaop.def:  Rename invokevirt -> invokevirtual.
12798         * lang.c (use_handles):  Removed.
12799         * parse.c:  Add support for ConstantValue atribute.
12800         Handle nested loading of a class.  (JPOOL_UTF):  New.
12801
12802 Tue Mar 11 20:11:05 1997  Per Bothner  <bothner@deneb.cygnus.com>
12803
12804         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
12805
12806 Thu Feb 27 14:24:29 1997  Per Bothner  <bothner@deneb.cygnus.com>
12807
12808         * Make-lang.in (java.install-man):  New empty rule.
12809         * typeck.c (set_local_type):  New function.
12810         * expr.c (STORE_INTERNAL):  Call find_local_variable,
12811         not find_stack_slot.  Call set_local_type.
12812
12813 Wed Feb 12 16:11:05 1997  Per Bothner  <bothner@kalessin.cygnus.com>
12814
12815         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
12816         and building RECORD_TYPE CONSTRUCTORs.
12817         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
12818
12819         * lang.c (use_handles):  Change the default to 0.
12820         * decl.c:  Define and build class_type, field_type, utf8const_type.
12821         * class.c (make_class_data, make_field_value,
12822         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
12823         hashUtf8String, strLengthUtf8, mangled_classname:
12824         Functions to build reflective data structures.
12825         * parse.c (yyparse):  Call make_class_data.
12826
12827         * jcf-io.c (open_class, find_classfile):  New functions.
12828         * jcf-dump.c:  Support reading classfile from explicitly-named
12829         class file (without CLASSPATH searching).
12830
12831 Thu Oct 24 14:10:16 1996  Per Bothner  <bothner@deneb.cygnus.com>
12832
12833         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
12834         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
12835         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
12836         (get_constant):  Now trivial for CONSTANT_Utf8.
12837
12838         * jcf.h:  Make NEW_CPOOL the default.
12839         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
12840
12841 Thu Oct 24 13:52:45 1996  Per Bothner  <bothner@deneb.cygnus.com>
12842
12843         New directory.