1 2002-01-14 Matthias Klose <doko@debian.org>
3 * gcj.texi: Fix whitespace and formatting errors in the
4 synopsis of the man pages. Update copyright.
6 2002-01-14 Tom Tromey <tromey@redhat.com>
9 * Make-lang.in (java.install-man): Handle jv-convert man page.
10 (java.generated-manpages): Added jv-convert.1.
11 (java.uninstall): Remove jv-convert.1.
12 (java.maintainer-clean): Likewise.
13 ($(srcdir)/java/jv-convert.1): New target.
14 * gcj.texi (Top): Link to jv-convert node.
15 (Individual utilities): Likewise.
16 (Invoking jv-convert): New node.
18 2001-01-10 Jeff Sturm <jsturm@one-point.com>
19 Martin Kahlert <martin.kahlert@infineon.com>
21 * jcf-parse.c (get_constant): Don't swap lo/hi for big
22 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
24 2002-01-03 Graham Stott <grahams@redhat.com>
26 * class.c (compile_resource_file): Update copyright date.
27 Constify filename parameter.
28 (java-tree.h): Update copyright date.
29 (compile_resource_file): Constify filename parameter.
31 2002-01-03 Graham Stott <grahams@redhat.com>
33 * gcc/jcf-parse.c: Update copyright date.
34 (yyparse): Constify resource_filename.
36 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
38 * parse.y (src_parse_roots): Don't needlessly zero init.
40 2001-12-31 Tom Tromey <tromey@redhat.com>
42 * parse.y (dump_java_tree): New function.
43 (source_end_java_method): Call it.
44 (end_class_declaration): Likewise.
45 * lang.c (java_decode_option): Call dump_switch_p.
47 2001-12-28 Tom Tromey <tromey@redhat.com>
49 * gen-table.pl: Don't process characters after \uffff. Added
50 comment pointing to input file.
52 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
54 * gen-table.pl: Const-ify output. Document the location of a
55 suitable unicode input file.
57 * chartables.h: Regenerate.
59 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
61 * chartables.h: Const-ify.
62 * gjavah.c (options): Likewise.
63 * jcf-dump.c (options): Likewise.
64 * jv-scan.c (options): Likewise.
65 * lex.c (java_start_char_p, java_part_char_p): Likewise.
66 * parse.y (binop_lookup): Likewise.
68 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
70 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
71 the static arrays that are output.
72 * jvspec.c (jvgenmain_spec): Make static.
73 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
74 * keyword.h: Regenerate.
75 * lang.c (string_option, process_option_with_no, lang_f_options,
76 lang_W_options): Const-ify.
77 * lex.c (java_lex): Likewise.
79 2001-12-21 Richard Henderson <rth@redhat.com>
81 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
82 (get_boehm_type_descriptor): ... here. Arrange for the
83 TREE_TYPE to get set properly.
85 2001-12-21 Richard Henderson <rth@redhat.com>
87 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
88 only if the target requires collect2.
90 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
92 2001-12-20 Tom Tromey <tromey@redhat.com>
95 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
96 CAN_COMPLETE_NORMALLY for the node.
97 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
98 generate code for second branch if first branch can't complete
100 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
101 the loop head if the loop body can't complete normally.
103 2001-12-20 Tom Tromey <tromey@redhat.com>
106 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
107 case where `finally' clause can't complete normally.
109 2001-12-20 Tom Tromey <tromey@redhat.com>
112 * parse.y (analyze_clinit_body): Added this_class parameter.
113 Check for more cases where we must keep <clinit>.
114 (maybe_yank_clinit): Cleaned up flow control.
116 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
118 * decl.c (java_init_decl_processing): Don't initialize
119 finit_leg_identifier_node.
120 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
121 (finit_leg_identifier_node): Remove.
122 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
124 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
126 * mangle.c (mangle_member_name): Don't special-case for
128 * mangle_name.c (unicode_mangling_length): Likewise.
129 (append_unicode_mangled_name): Likewise.
130 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
133 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
135 * expr.c (build_java_array_length_access): Don't force null pointer
136 check unless flag_check_references is set.
138 2001-12-20 Tom Tromey <tromey@redhat.com>
140 Fix for PR java/3417:
141 * parse.y (patch_assignment): Added special processing for
143 (patch_return): Don't convert booleans to integers, and don't
146 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
148 * config-lang.in (diff_excludes): Remove.
150 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
152 * gcj.texi: Update link to GCC manual.
154 2001-12-17 Tom Tromey <tromey@redhat.com>
156 * parse.y (link_nested_class_to_enclosing): Removed useless
159 2001-12-16 Tom Tromey <tromey@redhat.com>
161 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
164 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
166 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
167 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
170 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
172 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
174 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
176 * decl.c (java_init_decl_processing): Build otable_type correctly.
177 otable_decl is an otable_type.
179 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
181 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
182 otable_type, otable_ptr_type, method_symbol_type,
183 method_symbols_array_type, method_symbols_array_ptr_type): New
184 field/global tree definitions.
185 (flag_indirect_dispatch): New flag.
186 * decl.c (java_init_decl_processing): Initialize new otable and
187 otable_syms type nodes and decls. Add new field "index" to
189 * class.c (build_method_symbols_entry): New function.
190 (make_method_value): Set "index" to to method's vtable index for
191 virtual methods when indirect-dispatch is not used.
192 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
193 and set vtable_method_count to -1. Set otable and otable_syms field
194 if indirect-dispatch is used and there was something to put in them.
195 (build_method_symbols_entry): New function.
196 (emit_offset_symbol_table): New function.
197 * expr.c (get_offset_table_index): New function.
198 (build_invokevirtual): Build array reference to otable at the index
199 returned by get_offset_table_index, and use the result as the vtable
201 (build_invokeinterface): Similar.
202 * jcf-parse.c (yyparse): If indirect-dispatch, call
203 emit_offset_symbol_table at the end of compilation, after all classes
205 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
206 * lang.c (flag_indirect_dispatch): Define.
207 (lang_f_options): Add indirect-dispatch flag.
209 2001-12-14 Matthias Klose <doko@debian.org>
211 * gcj.texi: Markup for man page generation. Document missing
212 options printed by <tool> --help.
213 Terminate description of gij's -ms option with a dot.
214 * Make-lang.in ($(srcdir)/java/*.1): New targets.
215 (java.generated-manpages java.install-man, java.uninstall,
216 java-maintainer-clean) Updated.
218 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
220 * class.c (get_dispatch_table): Fix java vtable layout
221 for TARGET_VTABLE_USES_DESCRIPTORS.
222 * decl.c (java_init_decl_processing): Initialize
223 alloc_no_finalizer_node, finalize_identifier_node.
224 * expr.c (class_has_finalize_method): New function.
225 (expand_java_NEW): Generate calls for finalizer-free allocation.
226 (build_invokevirtual): Fix java vtable layout for
227 TARGET_VTABLE_USES_DESCRIPTORS.
228 * java-tree.h (enum java_tree_index): New entries:
229 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
230 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
231 (class_has_finalize_method): declare.
232 (HAS_FINALIZER_P): New macro.
233 * parse.y (patch_invoke): Generate calls for finalizer-free
236 2001-12-12 Matthias Klose <doko@debian.org>
238 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
239 whitespace at end of line.
241 2001-12-11 Tom Tromey <tromey@redhat.com>
243 * lex.c (java_init_lex): Define wfl_to_string as
244 gnu.gcj.runtime.StringBuffer unless generating bytecode.
246 2001-12-11 Jeff Sturm <jsturm@one-point.com>
248 * class.c (make_method_value): Use null_pointer_node to
249 represent empty exception table.
251 2001-12-10 Tom Tromey <tromey@redhat.com>
253 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
255 Mon Dec 10 06:09:57 2001 Douglas B. Rupp <rupp@gnat.com>
257 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
259 2001-12-09 Per Bothner <per@bothner.com>
261 * check-init.c (current_switch_has_default): New static field.
262 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
263 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
264 DEFAULT_EXPR seen, simulate a default alternative that copies state.
266 2001-12-09 Tom Tromey <tromey@redhat.com>
268 * check-init.c (check_init): Don't allow pre- or post- increment
269 or decrement of final variable.
270 (final_assign_error): Minor error message rewording.
272 2001-12-08 Tom Tromey <tromey@redhat.com>
274 * java-tree.h: Fixed typo.
276 * gjavah.c (decompile_method): Don't decompile to `return this'
279 * gjavah.c (cxx_keywords): Re-sorted.
280 * lex.c (cxx_keywords): Re-sorted.
282 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
285 * gjavah.c (print_namelet): Clear subnamelets.
286 (HANDLE_METHOD): Set `method_printed' earlier.
288 2001-12-07 Tom Tromey <tromey@redhat.com>
290 * lang.c (lang_f_options): Added
291 optimize-static-class-initialization.
292 (java_decode_option): Removed special case.
294 2001-12-07 Per Bothner <per@bothner.com>
296 * check-init.c (check_init): Fix typo freeing memory twice.
298 2001-12-05 Per Bothner <per@bothner.com>
300 Restore support for static class initialization optimization.
301 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
302 * check-init.c (check_int): At end of BLOCK handle initialization
303 blocks, which used to be done in java_complete_expand_method but did
304 not handle the case where check_for_initialization might allocate
305 more than a word of bits.
306 * decl.c (lang_make_tree): The smic field is now a tree.
307 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
308 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
310 * parse.y (emit_test_initialization): Combine hash_lookup calls.
312 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
313 Change from a hash table to a list.
314 (struct_lang_decl): Change field 'smic' to match.
315 * class.c (add_method_1): Initialize
316 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
317 * parse.y (adjust_init_test_initialization): Removed - inlined into -
318 (java_expand_method_bodies): -here, since 'smic' is now a list.
319 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
321 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
323 * class.c (java_hash_compare_tree_node): Fix casts.
325 2001-12-04 Per Bothner <per@bothner.com>
327 * check-init.c: Handle definite unassignment to finals in addition
328 to definite assignment.
329 (loop_current_locals): New field.
330 (num_current_locals, int start_current_locals, num_current_words):
332 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
333 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
334 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
335 (get_variable_decl, check_final_reassigned): New functions.
336 (check_init, check_bool_init): Modify as needed for checking finals.
337 (check_for_initialization): Take extra parameter and return void.
338 Do extra start-up logic to check final fields for assignment.
339 * parse.y (check_static_final_variable_assignment_flag,
340 reset_static_final_variable_assignment_flag, check_final_assignment,
341 check_final_variable_local_assignment_flag,
342 reset_final_variable_indirect_assignment_flag,
343 reset_final_variable_global_assignment_flag): Remove functions.
344 (java_complete_expand_methods, outer_field_access_fix,
345 patch_assignment): Remove no-longer used logic.
346 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
347 * parse.y (register_fields, java_complete_tree): Update accordingly.
349 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
350 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
351 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
353 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
355 * java-tree.h (DECL FINAL): New bit-field.
356 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
357 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
358 (DECL_INIT_CALLS_THIS): New macro.
359 (struct lang_decl): New bit-field init_calls_this.
360 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
361 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
362 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
363 use it for both local variables and final fields.
364 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
366 (struct lang_type): Remove hfv bit-field.
367 (check_for_initialization): Change to return void.
369 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
370 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
371 * check-init.c (final_assign_error): New helper function.
372 (check_final_reassigned, check_init): Use it.
373 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
375 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
376 bit-fields to unsigned.
378 2001-12-03 Per Bothner <per@bothner.com>
380 * parse.y (patch_binop): Minor constant folding.
382 * parse.y (build_current_thisn): Shorter 'buffer'.
384 2001-12-03 Per Bothner <per@bothner.com>
386 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
387 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
388 * jcf-write.c (generate_bytecode_insns): Remove support for
389 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
390 * check-init.c (check_init): Likewise.
392 2001-12-03 Per Bothner <per@bothner.com>
394 * verify.c (subroutine_nesting): New function.
395 (verify_jvm_instructions): Use it to fix logic for checking that
396 we're done with the current subroutine.
398 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
399 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
401 2001-12-03 Per Bothner <per@bothner.com>
403 * jcf.h: Fix obvious typo in comment.
404 * typeck.c (build_null_signature): Add comment.
406 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
408 * expr.c: Remove leading capital from diagnostic messages, as
409 per GNU coding standards.
410 * jcf-io.c: Similarly.
411 * jcf-parse.c: Similarly.
412 * jv-scan.c: Similarly.
413 * jvspec.c: Similarly.
414 * mangle.c: Similarly.
416 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
417 Alexandre Petit-Bianco <apbianco@redhat.com>
419 * expr.c (build_java_arrayaccess): Call save_expr on array for
420 correct evaluation order, modified comment, fixed indentation.
421 * parse.y: (patch_assignment): Correctly extract the array base
422 from the tree generate by build_java_arrayaccess, added comments.
423 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
424 Fixes PR java/3096, PR java/3803, PR java/3965.
426 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
428 * expr.c (expand_byte_code): Remove trailing periods from messages.
429 * jcf-parse.c (load_class, jcf_parse): Similarly.
430 * jcf-write.c (generate_classfile): Similarly.
431 * lex.c (java_lex): Similarly.
433 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
435 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
437 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
439 * Make-lang.in (java.generated-manpages): New dummy target.
441 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
443 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
445 (lang_specific_pre_link): Use set_input to set input_filename.
447 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
448 (main): Fix definition.
449 Strip `main' from classname.
452 2001-11-18 Roger Sayle <roger@eyesopen.com>
454 * parse.h (java_expand_switch): Remove old prototype.
456 2001-11-18 Tom Tromey <tromey@redhat.com>
458 Fix for PR java/1401:
459 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
461 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
464 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
466 * lang.c (finish_parse): Rename to java_finish.
467 (LANG_HOOKS_FINISH, java_finish): New.
469 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
471 * decl.c (init_decl_processing): Rename java_init_decl_processing.
472 * java-tree.h: New prototype.
473 * lang.c (java_init): Update prototype. Combine with old init_parse.
475 2001-11-13 Tom Tromey <tromey@redhat.com>
477 * gjavah.c (method_signature): New global.
478 (HANDLE_METHOD): Set it.
479 (decompile_return_statement): New function.
480 (decompile_method): Use it.
481 (print_method_info): Removed `synth' argument.
483 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
485 * java-tree.h (java_set_yydebug): New.
486 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
487 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
488 (print_lang_decl, print_lang_type, print_lang_identifier,
489 print_lang_statistics, lang_print_xnode): Remove.
491 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
493 * jcf-parse.c (init_lex): Remove.
494 * lang.c (language_string, lang_identify): Remove.
495 (struct lang_hooks): Constify.
496 (LANG_HOOKS_NAME): Override.
497 (init_parse): Update.
499 2001-11-08 Andreas Franck <afranck@gmx.de>
501 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
502 program_transform_name the way suggested by autoconf.
503 (java.install-common): Also transform auxiliary program names with
504 program_transform_name.
506 2001-11-08 Tom Tromey <tromey@cygnus.com>
508 * parse.y (trap_overflow_corner_case): New rule.
509 (unary_expression): Use it.
510 * lex.c (java_init_lex): Don't set minus_seen.
511 (yylex): Don't use minus_seen. Communicate overflow to parser for
513 (error_if_numeric_overflow): New function.
514 * parse.h (minus_seen): Removed field.
515 (JAVA_RADIX10_FLAG): New define.
517 2001-11-07 Tom Tromey <tromey@redhat.com>
519 Patch for PR java/1414:
520 * parse.y (case_label_list): New global.
521 (goal): Register case_label_list with GC.
522 (java_complete_lhs): Save new case on case_label_list.
523 (patch_switch_statement): Check for duplicate case labels.
525 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
527 * parse.y (patch_assignment): Removed unused third argument.
528 (java_complete_lhs): Removed unused third argument to patch_assignment.
530 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
532 * lang.c: Include langhooks-def.h.
533 * Make-lang.in: Update.
535 2001-10-31 Zack Weinberg <zack@codesourcery.com>
537 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
539 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
541 * mangle.c (find_compression_record_match): Don't match compression
542 records for package name elements unless they occur at the start of
543 the name. Fix for PR java/4717.
545 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
547 * expr.c (expand_java_field_op): Don't special-case references to
548 java.lang.PRIMTYPE.TYPE.
549 (build_primtype_type_ref): Removed.
550 * java-tree.h (build_primtype_type_ref): Remove prototype.
551 * parse.y (maybe_build_primttype_type_ref): Removed.
552 (complete_function_arguments): Don't special-case references to
553 java.lang.PRIMTYPE.TYPE.
554 (patch_assignment): Likewise.
555 (array_constructor_check_entry): Likewise.
557 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
559 * mangle.c (static tree compression_table): Fixed leading comment.
560 * parse.h (struct parser_ctxt): Fixed field comment.
561 * parse.y (check_pkg_class_access): New prototype, fixed leading
562 comment, new parameter used to emit error only if passed as true.
563 (parse_check_super): Pass extra argument to check_pkg_class_access.
564 (do_resolve_class): Likewise.
565 (process_imports): Likewise.
566 (read_import_dir): Fixed indentation.
567 (find_in_imports_on_demand): New local class_type_name. Local
568 node_to_use deleted. while loop changed into for loop. Report
569 multiple definition only for accessible classes. Improved error
571 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
572 assigned to parameter list, fixed indentation. while loop changed
573 into for loop, restore TREE_CHAIN on local `tem' before the next
576 Tue Oct 23 14:02:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
578 * lang.c (lang_get_alias_set): Deleted.
580 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
582 * gjavah.c (jni_print_char): Fix thinko in last change.
584 * gjavah.c (jni_print_char, decode_signature_piece): Use
585 safe-ctype macros and/or fold extra calls into fewer ones.
586 * lex.c (java_read_unicode, java_lex): Likewise.
587 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
588 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
589 * mangle_name.c (append_unicode_mangled_name,
590 unicode_mangling_length): Likewise.
592 2001-10-17 Richard Henderson <rth@redhat.com>
594 * Make-lang.in (java/lang.o): Depend on langhooks.h.
596 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
598 * lang.c (langhooks.h): Included.
599 (LANG_HOOKS_INIT): Redefined.
600 (LANG_HOOKS_INIT_OPTIONS): Likewise.
601 (LANG_HOOKS_DECODE_OPTION): Likewise.
602 (struct lang_hooks lang_hooks): New initialization.
604 2001-10-11 Per Bothner <per@bothner.com>
606 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
607 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
608 The former is simpler, and jcf-write.c handles it better.
609 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
610 or WITH_CLEANUP_EXPR.
611 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
612 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
614 * parse.y (patch_if_else_statement): If the condition is constant,
615 optimize away the test.
617 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
619 * parse.y (patch_cast): Call patch_string on the first operand of
620 the incoming node, update it if necessary. Fixes PR java/4510.
622 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
624 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
625 when name qualifier matches a package name.
627 2001-10-08 Tom Tromey <tromey@redhat.com>
629 Fix for PR java/4489:
630 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
631 force a new label when computing `body_block'.
633 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
635 * jcf-io.c (format_uint): Const-ify.
636 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
637 * lex.c (java_get_line_col): Likewise.
638 * parse.y (build_incdec): Likewise.
640 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
642 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
643 a NULL enclosing context if appropriate. Fixes PR java/4466.
645 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
647 * parse.y (patch_assignment): Use lvalue's original TYPE when
648 building the final COMPOUND_EXPR.
649 (try_reference_assignconv): Fixed leading comment.
651 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
653 * parse.y (check_final_variable_indirect_assignment): For
654 COMPOUND_EXPR, return only if finals were found initialized
655 properly, if not, keep on checking.
656 (check_final_variable_global_assignment_flag): New local
657 error_found, set when appropriate and used to decide whether to
658 report uninitialized finals. Fixed typo in comment.
660 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
662 * decl.c (init_decl_processing): Fixed typo in predef_filenames
663 last three initializations. Fixes PR java/4360.
665 2001-09-21 Richard Henderson <rth@redhat.com>
667 * class.c (get_dispatch_table): Handle function descriptors.
668 (build_dtable_decl): Likewise.
669 * expr.c (build_invokevirtual): Likewise.
671 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
673 * parse.y (patch_method_invocation): Build class initialization
674 when static finals are used to qualify method invocation.
677 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
679 * parse.h: (WFL_STRIP_BRACKET): Re-written using
680 build_type_name_from_array_name.
681 (STRING_STRIP_BRACKETS): New macro.
682 * parse.y (build_type_name_from_array_name): New function.
683 (array_creation_expression:): Accumulate []s instead of [s.
684 (cast_expression:): Accumulate []s instead of [s after cast type
686 (build_array_from_name): Local string deleted, use
687 build_type_name_from_array_name.
688 (build_unresolved_array_type): Accumulate []s instead of [s after
690 (register_fields): Fixed comment.
691 (resolve_class): Local name, base deleted, new locals tname and
692 array_dims. Use build_type_name_from_array_name. Use array_dims to
694 (purify_type_name): Use STRING_STRIP_BRACKETS.
696 2001-09-18 Andreas Jaeger <aj@suse.de>
698 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
699 * jv-scan.c: Likewise.
701 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
703 * parse.y (patch_method_invocation): Inner class creation context
704 check not enforced within constructors. Fixes PR java/1873.
706 2001-09-16 Tom Tromey <tromey@redhat.com>
708 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
709 NOTE_PUSH for single-case push. Fixes PR java/4189.
711 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
713 * java-tree.h (TYPE_IMPORT_LIST): New macro.
714 (TYPE_IMPORT_DEMAND_LIST): Likewise.
715 (struct lang_type): New fields import_list and import_demand_list.
716 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
717 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
718 (do_resolve_class): New local saved_enclosing_type, initialized,
719 passed as parameter to find_in_imports and find_in_imports_on_demand.
720 (find_in_imports): Added paramater enclosing_type, use its
721 TYPE_IMPORT_LIST when applicable.
722 (find_in_imports_on_demand): Added parameter enclosing_type, use
723 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
724 declaration and initialization.
725 (fold_constant_for_init): Switch/restore current_class to the
728 2001-09-13 Mark Mitchell <mark@codesourcery.com>
730 * verify.c (verify_jvm_instructions): Fix typo.
732 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
734 * expr.c (expand_invoke): Const-ification.
735 * parse.y (patch_method_invocation): Likewise.
737 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
739 * gjavah.c (cxx_keywords): Const-ification.
740 * keyword.gperf (java_keyword): Likewise.
741 * lang.c (java_tree_code_name): Likewise.
742 * lex.c (cxx_keywords): Likewise.
743 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
745 2001-09-11 Richard Henderson <rth@redhat.com>
747 * parse.h (ctxp_for_generation): Mark extern.
749 2001-09-10 Richard Henderson <rth@redhat.com>
751 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
753 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
755 * typeck.c (java_array_type_length, build_prim_array_type):
756 Represent empty arrays by NULL index.
758 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
760 * java-tree.h (compile_resource_file): Grouped with other prototypes.
761 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
763 2001-09-06 Anthony Green <green@redhat.com>
765 * class.c (O_BINARY): Define if necessary.
766 (registerResource_libfunc): Declare.
767 (init_class_processing): Initilize registerResource_libfunc.
768 (compile_resource_file): New function.
769 * java-tree.h (resource_name): Declare.
770 (compile_resource_file): Declare.
771 * jcf-parse.c (yyparse): Handle compiling java resource files.
772 * lang.c (java_decode_option): Handle -fcompile-resource option.
773 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
775 * gcj.texi (Code Generation): Add documentation for -R flag.
777 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
779 * jcf-write.c (generate_classfile): Issue an error in case of
780 field/initial value mismatch.
781 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
782 being initialized and we're generating bytecode.
783 (java_complete_lhs): In MODIFY_EXPR section: added comments,
784 set DECL_INITIAL properly when appropriate.
788 2001-09-01 Per Bothner <per@bothner.com>
790 * parse.y (maybe_yank_clinit): A field without an initializer is not
791 relevant. All initializers except static final and constant require
792 <clinit>, regardless of flag_emit_class_files.
794 2001-08-31 Per Bothner <per@bothner.com>
796 * class.c (set_constant_value): When not emiting class files, then a
797 String ConstantValue is a utf8const_ptr_type.
799 2001-08-30 Per Bothner <per@bothner.com>
801 * jcf-write.c (generate_classfile): Check that field is primitive
802 or string before emitting ConstantValue attribute.
804 2001-08-30 Per Bothner <per@bothner.com>
806 * parse.y (resolve_qualified_expression_name): If creating a
807 COMPOUND_EXPR, set it's type correctly.
809 2001-08-30 Per Bothner <per@bothner.com>
811 * jcf-io.c (open_class): Set filename field.
813 * jcf-parse,c (parse_class_file): Set current_function_decl
814 for better error message when Code attribute is missing.
816 * lang.c (put_decl_node, lang_print_error): Re-arrange for
817 better diagnostics, especially for constructors.
819 2001-08-30 Per Bothner <per@bothner.com>
821 * jcf-write.c (generate_classfile): Don't write ConstantValue
822 attribute if field is not final, for compatibility with jdk.
824 * jcf-write.c (generate_classfile): Convert ConstantValue values
825 to correct type. Work-around for front-end bug.
826 * class.c (set_constant_value): Error if constant has wrong type.
828 2001-08-30 Per Bothner <per@bothner.com>
830 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
831 "Double" are printed at verbosity 1.
833 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
835 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
837 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
839 * parse.y (patch_assignment): Don't verify final re-assignment here.
840 (java_complete_lhs): Verify assignments to finals calling
841 patch_assignment. Verify re-assignments to finals before calling
844 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
846 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
849 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
851 * lex.c (java_lex): new local found_hex_digits. Set and then used
852 in test to reject invalid hexadecimal numbers.
853 * parse.y (java_complete_tree): Prevent unwanted cast with
854 initialized floating point finals.
855 (patch_binop): Emit a warning when detecting a division by zero,
856 mark result not constant, don't simplify non integer division.
858 2001-08-28 Per Bothner <per@bothner.com>
860 * jcf-write.c (generate_bytecode_insns): For increments and
861 decrements just recurse to push constant. Improvement on Mark's patch.
863 2001-08-28 Mark Mitchell <mark@codesourcery.com>
865 * jcf-write.c (generate_bytecode_insns): Generate an integer to
866 real conversion for increments and decrements of reals.
868 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
870 * parse.y (resolve_qualified_expression_name): Handle unresolved
871 qualified expressions, prevent numerical qualifiers, fixed typo.
874 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
876 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
877 don't report anything but deprecated class when marked so. Handle
879 (patch_method_invocation): Check deprecation on methods and types.
880 (patch_binop): code becomes an enum tree_code, added default: to
881 switch to handle that. Detect division by zero, try to fold and
882 return before using a subroutine.
884 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
886 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
887 file smaller than 4 bytes.
888 * parse.y (check_inner_circular_reference): New function.
889 (check_circular_reference): Likewise.
890 (array_initializer:): Accept {,}.
891 (java_check_circular_reference): Rewritten using
892 check_circular_reference and check_inner_circular_reference.
893 (java_complete_expand_method): Unconditionally save and restore
894 the unpurged exception list.
895 (build_dot_class_method_invocation): Unmangle signature parameter.
897 2001-08-21 Tom Tromey <tromey@redhat.com>
899 * decl.c (init_decl_processing): Add `throws' field to method
901 * class.c (make_method_value): Compute `throws' field for method.
903 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
905 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
906 circularity is detected.
907 (ctors_unchecked_throws_clause_p): Fixed leading comment.
909 2001-08-17 Richard Henderson <rth@redhat.com>
911 * class.c (emit_register_classes): Add align parameter to
912 call to assemble_integer.
914 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
916 * jcf-parse.c (load_class): New locals saved and class_loaded. If
917 loading a class_or_name fails, try considering an innerclass name
918 and load the enclosing context.
919 * parse.y (resolve_inner_class): New function.
920 (find_as_inner_class): Added leading comment.
921 (register_incomplete_type): Keep the current context as enclosing
922 context for JDEP_FIELD dependencies.
923 (do_resolve_class): Locals new_class_decl and super initialized to
924 NULL. Call resolve_inner_class, explore the enclosing context
925 superclass if necessary.
928 2001-08-16 Tom Tromey <tromey@redhat.com>
930 * jcf-dump.c (main): Updated for change to jcf_path_seal.
931 * gjavah.c (main): Updated for change to jcf_path_seal.
932 * lang.c (version_flag): New global.
933 (java_decode_option): Recognize `-version'.
934 (java_init): Update for change to jcf_path_seal.
935 * jcf.h (jcf_path_seal): Added `print' argument.
936 * jcf-path.c (jcf_path_seal): Added `print' argument.
938 2001-08-13 Zack Weinberg <zackw@panix.com>
940 * Make-lang.in (java/decl.o): Update dependencies.
941 * decl.c: Include libfuncs.h, don't include toplev.h.
943 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
945 * decl.c (init_decl_processing): exception_type_node,
946 class_not_found_type_node, and no_class_def_found_type_node
947 initialized. predef_filenames augmented accordingly.
948 instinit_identifier_node initialized.
949 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
950 * java-tree.h (enum java_tree_index): New entries
951 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
952 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
953 (exception_type_node): New macro.
954 (class_not_found_type_node): Likewise.
955 (no_class_def_found_type_node): Likewise.
956 (instinit_identifier_node): Likewise.
957 (PREDEF_FILENAMES_SIZE): Adjusted.
958 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
959 (struct lang_type): Fixed typo in bitfield name.
960 (DECL_INSTINIT_P): New macro.
961 (ID_INSTINIT_P): Likewise.
962 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
964 * parse.y (encapsulate_with_try_catch): New function.
965 (generate_instinit): Likewise.
966 (build_instinit_invocation): Likewise.
967 (ctors_unchecked_throws_clause_p): Likewise.
968 (add_instance_initializer): Deleted.
969 (build_instance_initializer): Likewise.
970 (in_instance_initializer): Likewise.
971 (check_method_redefinition): instinit$ not to be verified.
972 (java_complete_expand_methods): Generate instinit$, simplified code.
973 (build_dot_class_method): Eliminated unnecessary locals. Use
974 encapsulate_with_try_catch, removed unnecessary code.
975 (fix_constructors): New local iii. Use build_instinit_invocation.
976 (patch_method_invocation): Added comment.
977 (maybe_use_access_method): Don't consider instinit$.
978 (find_applicable_accessible_methods_list): Shorten the search for
980 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
981 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
982 (patch_throw_statement): Likewise. Fixed typo.
984 2001-08-12 David Edelsohn <edelsohn@gnu.org>
987 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
988 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
990 (lang_specific_pre_link): Use set_input to set input_filename.
992 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
993 (main): Fix definition.
994 Strip `main' from classname.
997 2001-08-11 Zack Weinberg <zackw@panix.com>
999 * lex.h: Don't include setjmp.h. Don't define
1000 SET_FLOAT_HANDLER or prototype set_float_handler.
1002 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1004 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
1005 `poplevel' in the right order.
1007 2001-08-09 Richard Henderson <rth@redhat.com>
1009 * Make-lang.in (class.o): Depend on TARGET_H.
1010 * class.c (emit_register_classes): Use target hooks instead of
1011 assemble_constructor and assemble_destructor.
1013 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
1015 * check-init.c (flags.h): Include
1016 (check_init): Don't report uninitialized static class
1017 initialization flags, don't free bit index when doing static class
1018 initialization optimization.
1019 (check_for_initialization): Return type changed to `unsigned int.'
1020 (attach_initialized_static_class): New function.
1021 * class.c (add_method_1): Create the initialized static class
1023 (finish_class): Always emit deferred inline methods.
1024 * decl.c (emit_init_test_initialization): Moved to expr.c
1025 (complete_start_java_method): Don't traverse
1026 DECL_FUNCTION_INIT_TEST_TABLE.
1027 (lang_mark_tree): Mark hash tables in function decls.
1028 * expr.c (emit_init_test_initialization): Moved from decl.c.
1029 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
1030 initialization flag, set DECL_CONTEXT and
1031 LOCAL_CLASS_INITIALIZATION_FLAG.
1032 (java_lang_expand_expr): Emit initialization code for static class
1033 initialized flags when entering block, if necessary.
1034 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
1035 * java-tree.h (flag_optimize_sci): New global variable declaration.
1036 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
1037 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
1038 (LOCAL_FINAL_P): Fixed typo in comment.
1039 (FINAL_VARIABLE_P): Likewise.
1040 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
1041 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
1042 (struct lang_decl): New fields `ict', `smic' and `cif.'
1043 (check_for_initialization): New returned value for global.
1044 (attach_initialized_static_class): New global function.
1045 (STATIC_CLASS_INIT_OPT_P): New macro.
1046 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
1047 * lang.c (java_decode_option): Handle
1048 `-fno-optimize-static-class-initialization'
1049 * parse.y (start_complete_expand_method): New function.
1050 (java_expand_method_bodies): Likewise.
1051 (attach_init_test_initialization_flags): Likewise.
1052 (adjust_init_test_initialization): Likewise.
1053 (emit_test_initialization): Likewise.
1054 (java_complete_expand_methods): Nullify abstract and native method
1056 (java_complete_expand_method): New locals `fbody', `block_body'
1057 and `exception_copy.' Reorganized: directly return on empty method
1058 bodies, call `start_complete_expand_method', remember definitely
1059 initialized static class in function, don't expand method bodies.
1060 (java_expand_classes): Call `java_expand_method_bodies' before
1061 `finish_class' when compiling to native.
1062 (resolve_expression_name): Use `orig' after building outer class
1064 (patch_invoke): Remember static method invokations.
1066 2001-08-06 Richard Henderson <rth@redhat.com>
1068 * class.c (emit_register_classes): Pass a symbol_ref and priority
1069 to assemble_constructor.
1071 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
1073 * java-tree.h (all_class_filename): New macro.
1074 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
1075 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
1076 newly created IDENTIFIER_NODE to `all_class_filename.'
1078 2001-08-01 Jeff Sturm <jsturm@one-point.com>
1080 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
1081 Use ggc_add_tree_root to register roots.
1083 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
1085 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
1086 second operand calling check_init.
1087 * decl.c (complete_start_java_method): Swaped second and third
1088 arguments while creating WITH_CLEANUP_EXPR node.
1089 * jcf-write.c (generate_bytecode_insns): Use second operand
1090 instead of third when handling WITH_CLEANUP_EXPR.
1091 * parse.y (java_complete_lhs): Expand second operand of
1092 WITH_CLEANUP_EXPR nodes.
1093 (patch_synchronized_statement): Swaped second and third arguments
1094 while creating WITH_CLEANUP_EXPR node.
1096 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
1098 * parse.y (create_interface): Avoid cyclic inheritance report when
1099 syntax error encountered during class definition.
1102 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1104 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1106 (lang_specific_pre_link): Use set_input to set input_filename.
1108 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1109 (main): Fix definition.
1110 Strip `main' from classname.
1113 2001-07-18 Tom Tromey <tromey@redhat.com>
1116 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
1117 * lex.c (java_new_lexer): Use ICONV_CONST.
1118 (java_read_char): Likewise.
1119 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
1120 (jv-scan$(exeext)): Likewise.
1122 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
1124 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
1125 * parse.y (check_class_interface_creation): Allow `private' if the
1126 enclosing is not an interface.
1127 (create_interface): Interface tagged public if the enclosing
1128 context is an interface.
1129 (create_class): Class tagged public if the enclosing context
1133 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
1135 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
1138 2001-07-14 Tim Josling <tej@melbpc.org.au>
1140 * check-init.c (check_init): Remove references to EXPON_EXPR.
1142 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
1144 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
1145 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
1148 2001-07-13 Tom Tromey <tromey@redhat.com>
1150 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
1153 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1155 * parse.y (patch_method_invocation): Don't override primary if one
1156 is already provided, but let this$<n> be built. Fixed comment.
1158 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1160 * parse.y (empty_statement:): Report empty statement error only
1161 when found at class declaration level.
1164 2001-07-12 Tom Tromey <tromey@redhat.com>
1166 * expr.c (expand_load_internal): New function.
1167 (LOAD_INTERNAL): Use it.
1169 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
1171 * parse.y (verify_constructor_super): Compare anonymous class ctor
1172 args with `valid_method_invocation_conversion_p.'
1175 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1177 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
1178 `-fsyntax-only.' Fixes PR java/3248
1180 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1182 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
1184 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1186 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
1187 current function is static. Fixes PR java/1970
1189 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1191 * parse.y (patch_method_invocation): Add enclosing context to ctor
1192 calls if necessary. Fixes PR java/2953
1194 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1196 * parse.y (resolve_package): Abort if qualified expression member
1198 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
1201 2001-07-07 Zack Weinberg <zackw@stanford.edu>
1203 * verify.c: Don't use // comments.
1205 2001-07-05 Tom Tromey <tromey@redhat.com>
1207 * lang.c (flag_assume_compiled): Removed.
1208 * java-tree.h (flag_assume_compiled): Removed.
1209 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
1210 -fhash-synchronization, -fuse-divide-subroutine,
1211 -fcheck-references, -femit-class-file, -femit-class-files,
1212 -fassume-compiled. Updated --encoding information. Changed
1213 -foutput-class-dir to `-d'.
1215 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
1217 * jcf-parse.c (parse_class_file): Add lineno parameter to
1218 debug_start_source_file call.
1220 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
1222 * gcj.texi: Use gpl.texi.
1223 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
1224 dependencies and use doc/include in search path.
1226 2001-07-03 Jeff Sturm <jsturm@one-point.com>
1228 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
1229 `this'. If so, don't build instance initializers.
1231 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
1233 * parse.y (resolve_expression_name): Improved error message for
1234 inner class cases. Fixes PR java/1958
1236 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
1238 * lang.c: #include diagnostic.h
1239 (lang_print_error): Add a `diagnostic_context *' parameter.
1240 (java_dummy_print): Likewise.
1241 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
1243 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1245 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
1246 * jcf.h (typedef struct JCF): New bitfield `finished.'
1247 (JCF_FINISH): Set `finished.'
1248 (JCF_ZERO): Reset `finished.'
1251 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1253 * parse.y (class_body_declaration:): Don't install empty instance
1257 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1259 * class.c (set_super_info): Call `set_class_decl_access_flags.'
1260 (set_class_decl_access_flags): New function.
1261 * java-tree.h (set_class_decl_access_flags): New prototype.
1262 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
1263 (parse_class_file): New local `decl_max_locals.' Take wide types
1264 into account to compute DECL_MAX_LOCALS.
1265 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
1268 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
1270 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
1272 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
1274 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
1275 * parse.y (do_resolve_class): Moved comments out to leading comment
1276 section. Removed local `start', New local `_ht' and
1277 `circularity_hash.' Record `enclosing' in hash table and search
1278 it to detect circularity. Use `enclosing' as an argument to
1279 `lookup_cl.' Free the hash table when done.
1281 2001-06-19 Tom Tromey <tromey@redhat.com>
1283 * lex.c (java_read_char): Disallow invalid and overlong
1284 sequences. Fixes PR java/2319.
1286 2001-06-05 Jeff Sturm <jsturm@one-point.com>
1288 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
1290 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
1292 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
1293 arguments accordingly.
1295 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
1297 * gcj.texi: Move contents to just after title page.
1299 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
1301 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
1303 (patch_incomplete_class_ref): Build the class ref, build the class
1304 init if necessary, complete the tree.
1307 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
1309 * parse.y (lookup_field_wrapper): Test `name' code.
1310 (resolve_qualified_expression_name): Test `qual_wfl' code.
1311 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
1312 handle `qual_wfl' by code.
1313 (maybe_build_primttype_type_ref): Test `wfl' code.
1315 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1317 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
1319 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
1320 the dvi file in the java directory.
1322 2001-05-25 Sam TH <sam@uchicago.edu>
1324 * gen-table.pl javaop.h jcf.h lex.h,
1325 parse.h: Fix header include guards.
1327 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
1329 * jv-scan.c (version): Update copyright year.
1331 2001-05-21 Per Bothner <per@bothner.com>
1333 * jcf-parse.c (read_class): If class is from .class or .zip file
1334 and it's already been read, don't push/pop parser context.
1336 2001-05-18 Per Bothner <per@bothner.com>
1338 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
1339 command line so the jvgenmain-generated main program comes first.
1341 2001-05-15 Tom Tromey <tromey@redhat.com>
1343 * class.c (build_utf8_ref): Don't generate identifier based on
1346 2001-05-12 Richard Henderson <rth@redhat.com>
1348 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
1349 * expr.c (java_lang_expand_expr): Expand it.
1350 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
1351 calling build_exception_object_ref.
1352 * parse.y (catch_clause_parameter): Likewise.
1353 (build_dot_class_method): Likewise.
1354 (try_reference_assignconv): Likewise.
1355 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
1356 * jcf-write.c (generate_bytecode_insns): Likewise.
1358 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
1360 * parse.y (build_unresolved_array_type): Set
1361 EXPR_WFL_QUALIFICATION on the newly created wfl.
1362 Fixes PR java/2538. Fixes PR java/2535.
1364 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
1366 * parse.y (fix_constructors): Removed unnecessary assignment to
1367 local. Moved assignment to `this$<n>', fixed comments and
1369 (build_wfl_wrap): Fixed indentation.
1370 Fixes PR java/2598, java/2579 and java/2658.
1372 2001-05-03 Mo DeJong <mdejong@redhat.com>
1374 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
1375 check for byte swap.
1377 2000-05-02 Jeff Sturm <jsturm@one-point.com>
1379 * expr.c (build_class_init): Move MODIFY_EXPR
1380 outside of COND_EXPR. Remove variable `call'.
1382 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1384 * decl.c: NULL_PTR -> NULL.
1385 * jcf-write.c: Likewise.
1387 2001-05-01 Tom Tromey <tromey@redhat.com>
1389 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
1390 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
1391 * gcj.texi: Updated copyright text. Include fdl.texi.
1392 (Top): Link to new node.
1394 2001-05-01 Per Bothner <per@bothner.com>
1396 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
1398 2001-05-01 Per Bothner <per@bothner.com>
1400 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
1401 import_list contains the name, not the TREE_PURPOSE.
1403 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1405 * jcf-io.c (read_zip_member): Cast to long in comparison with
1408 * jvspec.c (lang_specific_driver): Initialize variables.
1410 * mangle.c (find_compression_record_match): Likewise.
1412 * typeck.c (build_null_signature): Provide static prototype. Mark
1413 parameter with ATTRIBUTE_UNUSED.
1415 * verify.c (verify_jvm_instructions): Initialize variable.
1417 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1419 * parse.y (do_resolve_class): Check for cyclic inheritance during
1420 inner class resolution.
1422 2001-04-27 Per Bothner <per@bothner.com>
1424 * parse.y (java_expand_classes): Don't change ctxp_for_generation
1425 while iterating, since that could cause gc to lose stuff.
1427 2001-04-26 Per Bothner <per@bothner.com>
1429 Fix method search wrt scope of inner classes to match JLS2.
1430 * typeck.c (build_null_signature): New static function.
1431 (has_method): New function. Uses build_null_signature and lookup_do.
1432 * java-tree.h (has_method): New declaration.
1433 * parse.y (find_applicable_accessible_methods_list): Do not search
1434 context of inner classes here.
1435 (patch_method_invocation): Search scope, ie. current and outer clases,
1436 for method matching simple name, to find class.
1438 2001-04-26 Per Bothner <per@bothner.com>
1440 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
1441 Fix thinko: If a single case, use if_icmpeq, not ifeq.
1443 * constants.c (find_methodref_with_class_index): New function.
1444 (find_methodref_index): Use find_methodref_with_class_index.
1445 * java-tree.h (find_methodref_with_class_index): New declaration.
1446 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
1447 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
1448 If context changed from interface to class, don't use invokeinterface.
1450 2001-04-25 Per Bothner <per@bothner.com>
1452 * verify.c (verify_jvm_instructions): For field instructions,
1453 check that field index is valid. For invoke instructions, check that
1454 method index is valid.
1456 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
1458 * config-lang.in (target_libs): Copy from $libgcj_saved.
1460 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1462 * decl.c (init_decl_processing): Add new class "protectionDomain"
1464 * class.c (make_class_data): Set initial value for "protectionDomain".
1466 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1468 * jvspec.c (lang_specific_driver): Fix memory allocation
1469 deficit, by using concat in lieu of xmalloc/sprintf.
1471 2001-04-20 Per Bothner <per@bothner.com>
1473 Fixes to compile multiple .class files at once.
1474 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
1475 * java-tree.h (CLASS_PARSED_P): New macro.
1476 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
1477 * jcf-parse.c (jcf_parse_source): Inline into read_class.
1478 (read_class): Avoid some code duplication.
1479 Don't call JCF_FINISH for a .class file - might be needed later.
1480 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
1481 rather than CLASS_LOADED_P, since latter implies class laid out.
1482 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
1483 * parse.y: Don't need to set CLASS_LOADED_P for array types.
1485 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1487 * Make-lang.in (java/boehm.o): Depend on toplev.h.
1489 * boehm.c: Include toplev.h.
1491 2001-04-06 Tom Tromey <tromey@redhat.com>
1492 Alexandre Petit-Bianco <apbianco@redhat.com>
1494 Fix for PR gcj/1404 and PR gcj/2332:
1495 * parse.y (build_array_from_name): If we use the type_wfl then
1496 accumulate dimensions from the original type as well.
1497 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
1499 2001-04-06 Tom Tromey <tromey@redhat.com>
1501 * parse.y (analyze_clinit_body): Return true if the second operand
1502 of a METHOD_EXPR is nonzero.
1504 2001-04-06 Tom Tromey <tromey@redhat.com>
1506 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
1508 ($(srcdir)/java/parse.c): Likewise.
1510 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
1512 * gcj.texi: Use `which-gcj' instead of `which-g77.'
1513 (version-gcc): Initialized.
1514 (which-gcj): Likewise.
1516 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
1518 * java-tree.h (struct lang_decl): New macro
1519 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
1520 * parse.y (build_instance_initializer): New function.
1521 (add_instance_initializer): Use it.
1522 (java_fix_constructors): Set `current_class' before fix pass.
1523 (fix_constructors): Just return if already fixed. Move `super()'
1524 invokation ahead. Use `build_instance_initializer.'
1527 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
1529 * parse.y (resolve_qualified_expression_name): Pass field's
1530 DECL_CONTEXT to `not_accessible_p.'
1531 (not_accessible_p): Changed parameters order in `inherits_from_p'
1534 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
1536 * lang-options.h: Add flag_check_references.
1538 2001-04-04 Per Bothner <per@bothner.com>
1540 * java-tree.h (CONSTANT_VALUE_P): New macro.
1541 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
1542 * parse.y (maybe_build_class_init_for_field): New static function.
1543 (resolve_expression_name, resolve_field_access): Use
1544 maybe_build_class_init_for_field instead of build_class_init
1545 This does not do the init if the field is compile-time-constant.
1546 (resolve_field_access): Simplify.
1548 * parse.y (fold_constant_for_init): Merge test into switch.
1550 2001-04-03 Zack Weinberg <zackw@stanford.edu>
1552 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
1554 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
1556 2001-04-02 Zack Weinberg <zackw@stanford.edu>
1558 * expr.c (pop_type_0): Save the result of the first
1559 lang_printable_name call in a scratch buffer, so it
1560 won't be clobbered by the second call.
1562 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
1564 * parse-scan.y (array_type:): Rewritten.
1565 (type_declaration:): `empty_statement' replaces `SC_TK.'
1566 (class_member_declaration:): `empty statement' added.
1567 (method_body:): Simplified.
1568 (static_initializer:): Likewise.
1569 (primary_no_new_array:): Use `type_literals.'
1570 (type_literals:): New rule.
1571 (dims:): Set and update `bracket_count.'
1572 Fixes PR java/1074. Fixes PR java/2412.
1574 2001-03-28 Hans Boehm <boehm@acm.org>
1576 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
1577 (get_boehm_type_descriptor): Set type on returned value to be a
1578 pointer length integer.
1580 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1582 * expr.c (pop_type_0): Call `concat' rather than building the
1584 (pop_type): Add format specifier in call to `error'.
1586 * parse.y (patch_method_invocation): Avoid casting away
1589 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
1591 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
1593 2001-03-28 Richard Henderson <rth@redhat.com>
1595 IA-64 ABI Exception Handling:
1596 * Make-lang.in (except.o): Don't depend on eh-common.h.
1597 * check-init.c (check_init): Handle EXC_PTR_EXPR.
1598 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
1599 [soft_exceptioninfo_call_node]: Remove.
1600 [eh_personality_libfunc, lang_eh_runtime_type]: New.
1601 (end_java_method): No emit_handlers.
1602 * except.c (java_set_exception_lang_code): Remove.
1603 (method_init_exceptions): Don't call it.
1604 (prepare_eh_table_type): No CATCH_ALL_TYPE.
1605 (build_exception_object_ref): New.
1606 (expand_end_java_handler): Update for except.h name changes.
1607 (emit_handlers, expand_resume_after_catch): Remove.
1608 * expr.c (java_lang_expand_expr): Update for except.h name changes.
1609 (process_jvm_instruction): Use build_exception_object_ref.
1610 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
1611 (soft_exceptioninfo_call_node): Remove.
1612 (build_exception_object_ref): Declare.
1613 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
1614 soft_exceptioninfo_call_node. Move processing ...
1615 [EXC_PTR_EXPR]: ... here.
1616 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
1617 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
1618 (source_end_java_method): No java_set_exception_lang_code or
1620 (build_dot_class_method): Use build_exception_object_ref.
1621 (try_reference_assignconv): Check EXC_PTR_EXPR not
1622 soft_exceptioninfo_call_node.
1624 2001-03-28 Richard Henderson <rth@redhat.com>
1626 * java-tree.h (throw_node): Define as a single member of
1627 java_global_trees instead of a separate array.
1628 (JTI_THROW_NODE): New.
1629 * decl.c (throw_node): Don't declare.
1630 (init_decl_processing): Init a scalar throw_node.
1631 Don't register it for gc.
1632 * check-init.c (check_init): Reference scalar throw_node.
1633 * expr.c (build_java_athrow): Likewise.
1634 * jcf-write.c (generate_bytecode_insns): Likewise.
1635 * parse.h (BUILD_THROW): Likewise.
1637 2001-03-28 Richard Henderson <rth@redhat.com>
1639 * decl.c (end_java_method): Do not save and restore
1640 flag_non_call_exceptions.
1641 * parse.y (source_end_java_method): Likewise.
1642 * lang.c (flag_exceptions): Don't declare.
1643 (java_init_options): Set flag_non_call_exceptions. Set
1644 flag_exceptions here ...
1645 (java_init): ... not here.
1647 2001-03-27 Richard Henderson <rth@redhat.com>
1649 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
1650 exceptions_via_longjmp.
1652 * lang.c (flag_new_exceptions): Don't declare it.
1653 (java_init_options): Or set it.
1655 2001-03-27 Richard Henderson <rth@redhat.com>
1657 * decl.c (end_java_method): Rename asynchronous_exceptions to
1658 flag_non_call_exceptions.
1659 * parse.y (source_end_java_method): Likewise.
1661 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1663 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1665 2001-03-26 Mark Mitchell <mark@codesourcery.com>
1667 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
1669 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
1671 * parse.y (find_as_inner_class): Follow current package
1672 indications not to mistakingly load an unrelated class.
1674 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1676 * constants.c (PUTN): Use memcpy, not bcopy.
1678 * lex.c (java_read_char): Use memmove, not bcopy.
1680 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
1682 2001-03-23 Per Bothner <per@bothner.com>
1684 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
1685 macro for better error pin-pointing.
1686 * java-tree.h: Fix typo in comment.
1688 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
1689 Don't include jsr/goto in exception range.
1690 Check if start and end of exception range are the same (also TRY_EXPR).
1691 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
1692 However, do emit the following goto even if try_block is empty.
1693 Defer freeing exception_decl until after the finalizer, to make
1694 sure the local isn't reused in the finalizer. Fixes PR java/1208.
1696 * parse.y (java_complete_lhs): If the try-clause is empty, just
1697 return the finally-clause and vice versa.
1699 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
1701 * gcj.texi (Input Options): documented the check for attribute
1702 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
1703 * java-tree.h (flag_force_classes_archive_check): Declared extern.
1704 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
1705 (jcf_parse): Check for the right classes archive if necessary.
1706 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
1707 (jcf_parse_fields): Fixed indentation.
1708 * jcf-write.c (append_gcj_attribute): New function.
1709 (generate_classfile): Compute the attribute count, invoke
1710 `append_gcj_attribute'.
1711 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
1712 turned into bit fields. New bit field `right_zip.'
1713 (JCF_ZERO): Set `right_zip' to zero.
1714 * lang-options.h (-fforce-classes-archive-check): Added flag.
1715 * lang.c (flag_force_classes_archive_check): New flag.
1716 (lang_f_options): New entry `force-classes-archive-check.'
1719 2001-02-07 Andrew Haley <aph@redhat.com>
1721 * gcj.texi (Configure-time Options): Add -fcheck-references.
1722 * expr.c (build_java_indirect_ref): New function.
1723 (java_check_reference): New function.
1724 (build_java_array_length_access): Use build_java_indirect_ref to
1725 check for null references.
1726 (build_java_arrayaccess): Likewise.
1727 (build_get_class): Likewise.
1728 (build_field_ref): Likewise.
1729 (invoke_build_dtable): Likewise.
1730 (build_invokeinterface): Likewise.
1731 * lang.c (lang_f_options): Add flag_check_references.
1732 * jvspec.c (jvgenmain_spec): Add flag_check_references.
1733 * java-tree.h (flag_check_references): New variable.
1734 * lang.c (flag_check_references): Likewise.
1735 * parse.y (patch_invoke): Use java_check_reference.
1736 (patch_assignment): Allow for extra nesting in
1737 _Jv_CheckArrayStore.
1739 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
1741 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
1742 * lex.c (cxx_keywords): Likewise.
1744 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
1746 * parse.y (qualify_ambiguous_name): Broaden `length'
1747 recognition. Help MODIFY_EXPR be resolved as expression names.
1748 Fixes PR java/2066. Fixes PR java/2400.
1750 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
1752 * gjavah.c (process_file): Mark interface definitions with
1753 "__attribute__ ((java_interface))".
1755 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
1757 * class.c (layout_class): Fixed push_super_field's second
1758 argument. Fixes PR java/2333.
1759 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
1760 too early to lay innerclasses out.
1762 2001-03-20 Tom Tromey <tromey@redhat.com>
1763 Alexandre Petit-Bianco <apbianco@redhat.com>
1765 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
1766 inside an array reference. Insertion of the array store check
1767 rewritten. Fixes PR java/2299.
1769 2001-03-20 Tom Tromey <tromey@redhat.com>
1771 * lex.c (java_read_unicode): Only accept leading `u's.
1773 2001-03-20 Tom Tromey <tromey@redhat.com>
1775 * jcf-parse.c (read_class): Initialize `class'.
1777 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
1779 * jcf_parse.c (jcf_parse): Eliminate unused variable.
1781 2001-03-19 Mark Mitchell <mark@codesourcery.com>
1783 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
1784 (layout_class): Likewise.
1785 (layout_class_method): Likewise.
1786 (emit_register_classes): Likewise.
1787 * decl.c (builtin_function): Likewise.
1788 (give_name_to_locals): Likewise.
1790 2001-03-19 Per Bothner <per@bothner.com>
1792 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
1793 before trying to load an inner class.
1795 Fixes to process to command-line .class files in two passes.
1796 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
1797 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
1798 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
1799 * class.c (is_compiled_class): Fix for renamed flag.
1800 * parse.y (maybe_create_class_interface_decl): Likewise.
1801 * jcf-parse.c (yyparse): Also set if compiling .class files.
1802 * jcf-parse.c (read_class); Read current_class.
1803 (jcf_parse): Make static.
1804 (load_inner_classes): New function, with code moved from jcf_parse,
1805 because we need to inner classes after the command-line files are read.
1806 (yyparse): Set finput to NULL when it doesn't need to be closed.
1807 Reduce use of main_jcf (basically only for archive) and
1808 use finput instead of main_jcf->read_state.
1809 Inline jcf_figure_file_type into yyparse.
1810 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
1811 Defer load_inner_classes and parse_class_file to a second pass,
1812 after we've correctly mapped command-line .clas fiels to classes.
1813 (jcf_figure_file_type): Removed.
1814 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
1815 (JCF_ZERO): Also clear zipd field.
1816 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
1818 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
1820 * jcf-parse.c (yyparse): Change ch from char * to char.
1822 2001-03-19 Per Bothner <per@bothner.com>
1824 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
1825 Add constructed filelist-file at end, following -xjava. Thus any .o
1826 and library files are not affected by the -xjava. Also wrap
1827 explicit @FILE with -xjava and -xnone.
1829 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
1831 * class.c (build_static_field_ref): Call make_decl_rtl() after
1832 setting the DECL_EXTERNAL flag.
1834 2001-03-17 Per Bothner <per@bothner.com>
1836 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
1838 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
1839 when result is is needed (target is STACK_TARGET).
1841 * parse.h (JDEP_SOLV): Removed.
1842 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
1844 * parse.y (incomplete_class_list): Removed.
1845 (obtain_incomplete_type): Don't use or set incomplete_class_list.
1846 It doesn't work if resolve_class changes the name of an array type
1847 that is on the list and then someone else looks for the modified name.
1848 Also, seems liable to break when compiling multiple source files at
1849 once. So the simplest is to just remove incomplete_class_list -
1850 it is only a minor space win and it is not even clear it saves time.
1852 * parse.y (resolve_class): Remove unneeded promote_type.
1854 2001-03-15 Per Bothner <per@bothner.com>
1856 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
1857 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
1858 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
1859 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
1861 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
1862 * parse.y (java_expand_classes): Likewise.
1864 * parse.y (expand_start_java_method): Was only called once and had a
1865 misleading name, so inline in caller java_complete_expand_method.
1866 (enter_a_block): Likewise inline in enter_block and remove.
1868 Remove junk from when gcc/java was created (by copying from C/C++).
1869 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
1870 (struct binding_level): Remove fields keep, keep_if_subblocks,
1871 more_cleanups_ok, have_cleanups (which have never been used).
1872 (pushlevel, poplevel): Remove related useless code.
1874 * class.c (make_class_data): The class_dtable_decl (i.e. the
1875 vtable for Class) should be external, except when compiling Class.
1877 * jvspec.c (lang_specific_driver): Fix -C handling.
1878 Check -save-temps to see if temp @FILE should be deleted.
1879 Follow-up to/fix for February 16 patch.
1881 * verify.c (verify_jvm_instructions): Better error msgs for dup.
1882 (type_stack_dup): Remove no-longer neded error check.
1884 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
1886 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
1887 to 'for_pointer'. If this type is for a pointer (argument) mangling,
1888 don't surround the element with 'N..E' if the type name is
1891 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1893 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
1894 DECL_RTL_SET_P, etc.
1895 (make_method_value): Likewise.
1896 (get_dispatch_table): Likewise.
1898 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1900 2001-03-07 Tom Tromey <tromey@redhat.com>
1902 * config-lang.in (lang_requires): Define.
1904 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
1906 * typeck.c (convert): Check flag_unsafe_math_optimizations,
1909 2001-03-05 Per Bothner <per@bothner.com>
1911 Fix a problem where rest_of_decl_compilation applied to
1912 class_dtable_decl causes problems because it was done too early,
1913 before output file was opened.
1914 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
1915 * class.c (class_dtable_decl): Add macro - element of class_roots.
1916 (make_class_data): Define class_dtable_decl.
1917 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
1919 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1921 * java/class.c, java/decl.c, java/java-tree.h: Replace all
1922 uses of 'boolean' with 'bool'.
1924 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1926 * lang-specs.h: Add zero initializer for cpp_spec field to all
1929 2001-02-16 Per Bothner <per@bothner.com>
1931 Handle compiling multiple input files at once, and @FILE syntax.
1932 * gcj.texi: Updated documentation to match.
1933 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
1934 * jcf-parse.c (parse_source_file): Split into ...
1935 (parse_source_file_1): New function - and:
1936 (parse_source_file_2): New function.
1937 (yyparse): On -ffilelist-file, open and scan named file.
1938 On first pass over files, only do parse_source_file_1.
1939 A new second pass calls parse_source_file_2 for each file to compile.
1940 (init_jcf_parse): Call init_src_parse.
1941 * jvspec.c (INDIRECT_FILE_ARG): New flag.
1942 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
1943 as multiple input file combined in one compilation.
1944 * lang-options.h: Add -ffilelist-file
1945 * lang.c (flag_filelist_file): New flag variable.
1946 (lang_f_options): Handle -ffilelist-file.
1947 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
1948 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
1949 gclass_list - use global fields of src_parse_roots instead.
1950 * parse.y (src_parse_roots): New array.
1951 (incomplete_class_list, gclass_list): New macros.
1952 (push_parser_context, java_pop_parser_context,
1953 java_parser_context_resume): Don't fiddle with deleted fields.
1954 (various): Use incomplete_class gclass_list and global macros
1955 instead of parse_ctxt fields - the lists are global.
1956 (init_src_parse): New function.
1958 Fri Feb 23 15:28:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1960 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
1962 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
1964 * parse.y (check_inner_class_access): Moved declaration of local
1965 `enclosing_decl_type' to the right location.
1967 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
1969 * parse.y (parser_check_super_interface): Don't call
1970 check_pkg_class_access for an inner interface.
1971 (parser_check_super): Don't call check_pkg_class_access for inner
1973 (do_resolve_class): Simplify enclosing type loop. Don't call
1974 check_pkg_class_access if CL and DECL are not set.
1975 (find_in_imports_on_demand): Set DECL if class_type needed to be
1976 loaded. Don't call check_pkg_class_access for an inner class.
1977 (check_inner_class_access): Rewritten to implement member access
1978 rules as per spec 6.6.1.
1979 (check_pkg_class_access): Handle the empty package correctly.
1980 (in_same_package): New function. Determine if two classes are in the
1983 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
1985 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
1986 method into array types.
1987 * parse.y (patch_method_invocation): Bypass access check on clone call
1990 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
1992 * expr.c (build_instanceof): Check for arrays when trying fold to
1995 2001-02-15 Jim Meyering <meyering@lucent.com>
1997 * Make-lang.in (java.install-common): Depend on `installdirs'.
1998 (java.install-info): Likewise.
2000 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
2002 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
2004 2001-02-14 Tom Tromey <tromey@redhat.com>
2005 Alexandre Petit-Bianco <apbianco@cygnus.com>
2007 Fix for PR java/1261.
2008 * typeck.c (build_java_array_type): Add public `clone' method to
2010 * parse.y (resolve_qualified_expression_name): Use current_class
2011 when checking for inaccessibility.
2012 (patch_method_invocation): Fixed error message when accessibility
2013 denied. Added `from_super' argument.
2015 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
2017 * parse.y (resolve_class): Don't build a fake decl. Use the one
2019 * typeck.c (build_java_array_type): Build and assign decl to array
2022 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
2024 * parse.y (not_accessible_p): Changed leading comment. Added extra
2025 `where' argument. Use it to enforce protected access rules.
2026 (resolve_qualified_expression_name): Added extra argument to
2028 (patch_method_invocation): Use argument `primary' to provide
2029 not_accessible_p with an extra argument.
2030 (lookup_method_invoke): Added extra argument to not_accessible_p.
2031 (search_applicable_method_list): Likewise.
2033 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
2035 * parse.y (resolve_qualified_expression_name): Try to resolve as
2036 an inner class access only if `decl' is a TYPE_DECL.
2038 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
2040 * decl.c (classdollar_identifier_node): Initialize.
2041 * java-tree.h (enum java_tree_index): New entry
2042 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
2043 (classdollar_identifier_node): New macro.
2044 (ID_CLASSDOLLAR_P): Likewise.
2045 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
2046 (build_dot_class_method_invocation): Likewise.
2047 (find_applicable_accessible_methods_list): `class$' can't be
2050 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
2052 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
2054 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2056 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
2057 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
2060 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2062 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
2063 outside of the `__U' sequence too.
2064 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
2067 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2069 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
2071 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
2073 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
2074 (JVGENMAIN_OBJS): Likewise.
2075 * java-tree.h (append_gpp_mangled_name): New prototype.
2076 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
2077 Removed cast calling `gcc_add_root.'
2078 * jvgenmain.c (mangle_obstack): New global, initialized.
2080 (do_mangle_class): Constify local `ptr.'
2081 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
2082 append_gpp_mangle_name and update `count' if necessary.
2083 Use `mangle_obstack.'
2084 * mangle.c (append_unicode_mangled_name): Removed.
2085 (append_gpp_mangled_name): Likewise.
2086 (unicode_mangling_length): Likewise.
2087 (mangle_member_name): Return type set to `void.'
2088 (mangle_field_decl): Don't append `U' in escaped names.
2089 (mangle_method_decl): Likewise.
2090 (mangle_member_name): Just use `append_gpp_mangled_name.'
2091 * mangle_name.c: New file.
2093 2001-02-07 Per Bothner <per@bothner.com>
2095 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
2097 * check-init.c (check_init): Don't call done_alternative after
2098 processing loop code, as a LOOP_EXPR never terminates normally.
2100 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
2102 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
2104 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2106 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
2109 2001-02-06 Tom Tromey <tromey@redhat.com>
2111 * lex.c (java_new_lexer): Longer error message.
2113 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
2114 Alexandre Petit-Bianco <apbianco@cygnus.com>
2116 * typeck.c (build_prim_array_type): Added leading comment.
2117 (build_java_array_type): Moved locals out of
2118 block. Always create the `data' field, fixed alignment to match
2121 2001-02-04 Tom Tromey <tromey@redhat.com>
2123 * expr.c (java_lang_expand_expr): Don't bother recomputing
2124 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
2127 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2129 * parse.y (process_imports): Save the original name of the import
2130 for better error report.
2132 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
2134 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
2135 of macros used when compiling jvspec.c.
2136 * jvspec.c (lang_specific_driver): Link with the shared
2139 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2141 * check-init.c (check_init): Call internal_error instead of fatal.
2142 * expr.c (java_lang_expand_expr): Likewise.
2143 * jcf-parse.c (get_constant): Likewise.
2144 * mangle.c (java_mangle_decl): Likewise.
2145 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
2146 (operator_string): Likewise.
2147 * check-init.c (check_init): Call abort instead of fatal.
2148 * class.c (build_class_ref): Likewise.
2149 * constants.c (write_constant_pool): Likewise.
2150 * decl.c (start_java_method): Likewise.
2151 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
2152 (java_stack_dup, encode_newarray_type): Likewise.
2153 (build_java_array_length_access): Likewise.
2154 (build_java_check_indexed_type, expand_java_pushc): Likewise.
2155 (build_java_soft_divmod, build_invokeinterface): Likewise.
2156 * java-tree.h (INNER_CLASS_P): Likewise.
2157 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
2158 (give_name_to_class, get_class_constant): Likewise.
2159 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
2160 (find_constant_index, generate_bytecode_conditional): Likewise.
2161 (generate_bytecode_insns, perform_relocations): Likewise.
2162 * lex.c (java_unget_unicode, java_lex): Likewise.
2163 * mangle.c (mangle_type, mangle_record_type): Likewise.
2164 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
2165 (finish_mangling): Likewise.
2166 * parse.h (MARK_FINAL_PARMS): Likewise.
2167 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
2168 (obtain_incomplete_type, java_complete_class): Likewise.
2169 (java_check_regular_methods, java_complete_expand_method): Likewise.
2170 (cut_identifier_in_qualified, check_deprecation): Likewise.
2171 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
2172 (java_complete_lhs, lookup_name_in_blocks): Likewise.
2173 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
2174 * typeck.c (set_local_type, parse_signature_type): Likewise.
2175 (parse_signature_string, build_java_signature): Likewise;
2176 (set_java_signature): Likewise.
2177 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
2178 * class.c (add_method): Call fatal_error instead of fatal.
2179 (build_static_field_ref): Likewise.
2180 * expr.c (build_known_method_ref, expand_invoke): Likewise.
2181 * jcf-parse.c (get_constant, jcf_parse): Likewise.
2182 * lex.c (java_new_new_lexer): Likewise.
2183 * jv-scan.c (main): Likewise.
2184 (fatal_error): Renamed from fatal.
2185 * jcf-parse.c (yyparse): Call fatal_io_error instead of
2187 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
2188 (yyparse): Likewise.
2189 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
2190 * lex.c (java_get_line_col): Likewise.
2191 * jcf-parse.c (load_class): Make errors non-fatal.
2192 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
2194 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
2196 * jvgenmain.c (class_mangling_suffix): Remove unused string.
2197 (error): Remove unused function.
2198 (main): Don't use "__attribute__ alias" on generated class symbol.
2200 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
2202 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
2204 * parse.y (finish_method_declaration): Code accounting for WFLed
2205 method DECL_NAMEs deleted.
2206 (check_abstract_method_definitions): Likewise.
2207 (resolve_type_during_patch): Layout resolved type.
2208 * typeck.c (lookup_do): Removed unused local.
2210 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
2212 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
2213 * decl.c (init_decl_processing): Use integer_minus_one_node, not
2214 integer_negative_one_node.
2215 * expr.c (build_java_binop): Likewise.
2217 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
2219 * zextract.c (read_zip_archive): Read file_offset before writing
2220 zipd and consequently clobbering the header contents.
2222 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2224 * Make-lang.in: Remove all dependencies on defaults.h.
2225 * decl.c: Don't include defaults.h.
2227 * parse.y: Likewise.
2229 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
2231 * ChangeLog (2001-01-21): Fixed typo.
2232 * class.c (layout_class_method): Code accounting for WFLed
2233 method DECL_NAMEs deleted.
2234 * constant.c (find_methodref_index): Likewise.
2235 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
2236 * java-tree.h (DECL_FUNCTION_WFL): New macro.
2237 (struct lang_decl): New field `wfl'.
2238 (java_get_real_method_name): Prototype deleted.
2239 * mangle.c (mangle_method_decl): Code accounting for WFLed
2240 method DECL_NAMEs deleted.
2241 * parse.h (GET_METHOD_NAME): Macro deleted.
2242 * parse.y (reset_method_name): Deleted.
2243 (method_header): Set DECL_FUNCTION_WFL.
2244 (check_abstract_method_header): Code accounting for WFLed method
2246 (java_get_real_method_name): Deleted.
2247 (check_method_redefinition): Code accounting for WFLed method
2248 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
2249 (java_check_regular_methods): Likewise.
2250 (java_check_abstract_methods): Likewise.
2251 (java_expand_classes): Don't call `reset_method_name.'
2252 (search_applicable_method_list): Use DECL_NAMEs instead of
2254 * typeck.c (lookup_do): Code accounting for WFLed method
2257 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
2259 * lex.c (java_read_char): Check for EOF from getc first.
2261 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2263 * class.c (layout_class): Don't lay the superclass out if it's
2264 already being laid out.
2265 * jcf-parse.c (handle_innerclass_attribute): New function.
2266 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
2267 handle_innerclasses_attribute.
2268 (jcf_parse): Don't load an innerclasses if it's already being
2270 * jcf-write.c (append_innerclass_attribute_entry): Static
2271 `anonymous_name' and its initialization deleted. `ocii' and `ini'
2272 to be zero for anonymous classes.
2274 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2276 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
2278 * jcf-parse.c (set_source_filename): Use
2279 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
2281 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2283 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
2284 gets a unique asm name.
2286 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2288 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
2289 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
2291 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
2292 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
2293 * parse.y (lookup_package_type_and_set_next): Deleted.
2294 (resolve_package): Removed unnecessary code.
2295 (find_applicable_accessible_methods_list): `finit$' can't be
2297 * verify.c (pop_argument_types): Added missing prototype.
2299 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
2301 * config-lang.in: Disable java by default.
2303 2001-01-23 Tom Tromey <tromey@redhat.com>
2305 * gcj.texi (Copying): New node.
2306 Added copyright information.
2308 2001-01-21 Per Bothner <per@bothner.com>
2310 Various fixes to allow compiling a compressed .jar/.zip archive.
2311 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
2312 (struct ZipFile): Add fields name and next (from ZipFileCache).
2313 (struct ZipDirectory): New field zipf points to owning ZipFile.
2314 * jcf.h (struct ZipDirectory): Add forward declaration.
2315 (struct JCF): Declare zipd field to have type struct ZipDirectory.
2316 Remove seen_in_zip and zip_offset fields.
2317 (JCF_SEEN_IN_ZIP): New macro.
2318 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
2319 * jcf-io.c: Change all ZipFileCache to ZipFile.
2320 (read_zip_member): New function.
2321 (open_in_zip): Call read_zip_member.
2322 * jcf-parse.c (find_in_current_zip): Remove function.
2323 (read_class): Merge in find_in_current_zip functionality.
2324 Call read_zip_member if needed.
2325 (parse_zip_file_entries): Use read_zip_member.
2326 (process_zip_dir): Update for removed and added JCF fields.
2327 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
2329 2001-01-21 Per Bothner <per@bothner.com>
2331 Minor optimization of static ggc roots.
2332 * jcf-parse.c (parse_roots): New static field.
2333 (current_field, current_method, current_file_list): Replace by macros
2334 naming fields of parse_roots.
2335 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
2336 * class.c (class_roots): New static field.
2337 (registered_class, fields_ident, info_ident, class_list):
2338 New macros naming fields of parse_roots.
2339 (build_static_field_ref): Don't register roots here.
2340 (layout_class): Static field list replaced by macro class_list.
2341 (init_class_processing): Call ggc_add_tree_root for 4 roots.
2342 Initialize fields_ident and info_ident here.
2344 2001-01-21 Per Bothner <per@bothner.com>
2346 * jcf-parse.c (ggc_mark_jcf): New function.
2347 (init_jcf_parse): Register current_jcf as ggc root.
2349 2001-01-21 Per Bothner <per@bothner.com>
2351 * lang.c (put_decl_node): Print method's name.
2353 2001-01-21 Per Bothner <per@bothner.com>
2355 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
2356 (verify_jvm_instructions): Use it, for better error messages on loads.
2358 2001-01-21 Per Bothner <per@bothner.com>
2360 * verify.c (merge_type_state): Still may have to merge even if
2361 LABEL_VERIFIED (label).
2363 2001-01-21 Per Bothner <per@bothner.com>
2365 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
2366 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
2368 2001-01-19 Per Bothner <per@bothner.com>
2370 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
2371 if expeting an interface type. Refines Tom's change of 2000-09-12.
2373 2001-01-18 Per Bothner <per@bothner.com>
2375 * gcj.texi (Input Options): Mention .java files.
2377 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2379 * lang-options.h (-Wunsupported-jdk11): Removed.
2380 * lang.c (flag_not_overriding): Deleted.
2381 (flag_static_local_jdk1_1): Likewise.
2382 (lang_W_options): Removed "unsupported-jdk11" entry.
2383 * parse.y (java_check_methods): Removed dead code.
2385 2001-01-17 Tom Tromey <tromey@redhat.com>
2387 Changes suggested by Per Bothner:
2388 * gcj.texi (Input Options): Don't mention input files.
2389 (Code Generation): Updated --main information.
2390 (Invoking jcf-dump): Mention that --javap is incomplete.
2391 From Alexandre Petit-Bianco:
2392 (Warnings): Don't mention -Wunsupported-jdk11.
2394 (Compatibility): Mention JDK 1.2-ness of libraries.
2395 (Resources): Mention resources used when writing gcj.
2397 2001-01-17 Tom Tromey <tromey@redhat.com>
2399 * gcj.texi: New file.
2400 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
2401 (java.info): Depend on gcj.info.
2402 (java/gcj.dvi): New target.
2403 (java.dvi): Depend on gcj.dvi.
2404 (java.install-info): Wrote.
2406 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
2408 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
2409 having called make_decl_rtl.
2411 2001-01-14 Per Bothner <per@bothner.com>
2413 Various patches to emit better messages on verification errors.
2414 * expr.c (push_type_0): Return error indication on stack overflow,
2415 instead of callinfg fatal.
2416 (push_type): Now just call push_type_0 (nd fatal on overflow).
2417 (pop_type_0): Return detailed error message (in a char** argument).
2418 (pop_type): If pop_type_0 fails, print error message.
2419 (pop_argument_types): Moved to verify.c.
2420 * verify.c (pop_argument_types): Moved from expr.c.
2421 Return a (possible) error message, rather than void.
2422 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
2423 (verify_jvm_instruction): Use new macros, improving error messages.
2424 For case OPCODE_astore use object_ptr_type_node.
2425 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
2426 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
2428 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
2429 constant, return body without wrapper. (Improves constant folding.)
2430 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
2432 2001-01-13 Per Bothner <per@bothner.com>
2434 * expr.c (expand_java_field_op): Assigning to a final field outside
2435 an initializer does not violate JVM spec, so should be warning, not
2436 error. (Sun's verifier does not complain - though MicroSoft's does.)
2438 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
2440 * gjavah.c (version), jcf-dump.c (version): Update copyright year
2443 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
2445 * parse.y (resolve_expression_name): Permit instance variables from
2446 enclosing context in super constructor call.
2447 (resolve_qualified_expression_name): Permit enclosing class's qualified
2448 "this" in super constructor call.
2450 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2452 * class.c (build_utf8_ref): Remove last argument in call to
2453 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2454 (build_class_ref): Likewise.
2455 (build_static_field_ref): Likewise.
2456 (get_dispatch_table): Likewise.
2457 (layout_class_method): Likewise.
2458 (emit_register_classes): Likewise.
2459 * constants.c (build_constant_data_ref): Likewise.
2460 * decl.c (builtin_function): Likewise.
2461 (create_primitive_vtable): Likewise.
2462 * expr.c (build_known_method_def): Likewise.
2463 (build_jni_stub): Likewise.
2464 (java_lang_expand_expr): Likewise.
2466 2001-01-10 Tom Tromey <tromey@redhat.com>
2468 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
2470 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
2472 * java-tree.h (lang_printable_name_wls): New prototype.
2473 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
2474 rather than `current_class' to print type name. Don't prepend type
2475 names when printing constructor names.
2476 (lang_printable_name_wls): New function.
2477 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
2478 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
2479 * parse.y (patch_method_invocation): Message tuned for constructors.
2480 (not_accessible_p): Grant `private' access from within
2483 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2485 All files with updated copyright when applicable.
2486 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
2487 * class.c (mangle_class_field): Function removed.
2488 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
2489 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
2490 (build_class_ref): Call `java_mangle_class_field' instead of
2491 `mangle_class_field.'
2492 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
2493 (layout_class): Call `java_mangle_decl' instead of
2494 `mangle_static_field.'
2495 (cxx_keywords): Initialized static array moved to `lex.c.'
2496 (layout_class_method): Changed leading comment. Simplified to
2497 call `java_mangle_decl.' Local `ptr' moved in for loop body.
2498 * decl.c (lang_mark_tree): Mark field `package_list.'
2499 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
2500 (struct lang_type): New field `package_list.'
2501 (unicode_mangling_length): Prototype removed.
2502 (append_gpp_mangled_name, append_gpp_mangled_classtype,
2503 emit_unicode_mangled_name): Likewise.
2504 (cxx_keyword_p): New prototype.
2505 (java_mangle_decl, java_mangle_class_field,
2506 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
2507 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
2509 * jvgenmain.c (main_method_prefix): Global variable removed.
2510 (main_method_suffix): Likewise.
2511 (do_mangle_classname): New function.
2512 (main): Call it. Format changed to accommodate new mangling scheme.
2513 * lex.c: (utf8_cmp): Conditionally prototyped.
2514 (cxx_keywords): Moved from class.c, conditionally defined.
2515 (utf8_cmp, cxx_keyword_p): Likewise.
2516 * mangle.c (obstack.h, ggc.h): Included.
2517 (mangle_field_decl): New function.
2518 (mangle_method_decl, mangle_type, mangle_pointer_type,
2519 mangle_array_type, mangle_record_type,
2520 find_compression_pointer_match, find_compression_array_match,
2521 find_compression_record_match,
2522 find_compression_array_template_match, set_type_package_list,
2523 entry_match_pointer_p, emit_compression_string, init_mangling,
2524 finish_mangling, compression_table_add, mangle_member_name): Likewise.
2525 (mangle_obstack): New global.
2526 (MANGLE_RAW_STRING): New macro.
2527 (unicode_mangling_length): Turned static.
2528 (append_unicode_mangled_name): Renamed from
2529 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
2530 replaces `obstack', removed from the parameter list.
2531 (append_gpp_mangled_name): Turned static. `mangle_obstack'
2532 replaces parameter `obstack', removed from the parameter list. Call
2533 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
2534 (append_gpp_mangled_classtype): Removed.
2535 (compression_table, compression_next): New static variables.
2536 * parse.y (temporary_obstack): Extern declaration removed.
2538 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2540 * parse.y (patch_binop): Compute missing type in error situations.
2542 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
2544 * class.c (make_class_data): Push initial value for "arrayclass".
2545 * decl.c (init_decl_processing): Add new class field "arrayclass".
2547 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
2549 From patha@softlab.ericsson.se:
2550 * parse.y (switch_label): Use build, not build1, to construct
2553 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
2555 * lang.c (lang_decode_option): Change -MA to -MP.
2556 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
2557 Update to new prototype; do quote targets.
2558 (jcf_dependency_write): Update.
2560 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
2562 Shorten primitive array allocation path:
2563 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
2564 to create new primitive arrays.
2565 * expr.c (build_newarray): If generating native code, call
2566 soft_newarray_node with a reference to the primitive TYPE identifier
2567 instead of type_value.
2569 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
2571 Fix for PRs gcj/312 and gcj/253:
2572 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
2573 dest if they arn't already.
2574 * class.c (layout_class): Call maybe_layout_super_class on
2575 superinterfaces also, but only if compiling from bytecode.
2578 * parse.y (create_class): Set ACC_STATIC if class is declared in an
2581 2000-12-15 Tom Tromey <tromey@redhat.com>
2583 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
2586 2000-12-14 Andrew Haley <aph@redhat.com>
2588 * boehm.c (mark_reference_fields): Change test to correctly detect
2591 2000-12-15 Andreas Jaeger <aj@suse.de>
2593 * config-lang.in (lang_dirs): Added.
2595 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
2597 * parse.y (end_artificial_method_body): Fixed undefined behavior.
2598 Credits go to rth for finding it.
2600 2000-12-13 Mike Stump <mrs@wrs.com>
2602 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
2604 2000-11-07 Tom Tromey <tromey@cygnus.com>
2606 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
2607 * lex.c (java_ignorable_control_p): Removed.
2608 (java_letter_or_digit_p): Removed.
2609 (java_start_char_p): New function.
2610 (java_read_char): Return `int', not `unicode_t'. Changed
2612 (java_read_unicode): Likewise.
2613 (java_read_unicode_collapsing_terminators): Likewise.
2614 (java_get_unicode): Likewise.
2615 (java_new_lexer): Initialize hit_eof.
2616 (java_parse_end_comment): Take `int' argument.
2617 (java_parse_doc_section): Likewise.
2618 (java_parse_escape_sequence): Don't allow backlash-newline.
2620 * lex.h (JAVA_DIGIT_P): Removed.
2621 (_JAVA_LETTER_OR_DIGIT_P): Removed.
2622 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
2623 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
2624 (JAVA_PART_CHAR_P): New macro.
2626 (JAVA_CHAR_ERROR): Now -2.
2627 (java_lexer): New field `hit_eof'.
2628 * chartables.h: New file.
2629 * gen-table.pl: new file.
2631 2000-11-20 Tom Tromey <tromey@cygnus.com>
2632 Alexandre Petit-Bianco <apbianco@cygnus.com>
2634 * parse.y (java_complete_lhs): Only allow compound assignment of
2635 reference type if type is String.
2637 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
2639 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
2640 jcf-path.c: Likewise.
2642 2000-12-09 Anthony Green <green@redhat.com>
2644 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
2645 filestart and filename_length as int values.
2647 2000-12-07 Mo DeJong <mdejong@redhat.com>
2649 * jcf-io.c (find_class): Correct the logic that tests to see if a
2650 .java file is newer than its .class file. The compiler was
2651 incorrectly printing a warning when file mod times were equal.
2653 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
2655 * jvgenmain.c: Use ISPRINT not isascii.
2657 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
2659 * parse.y (end_artificial_method_body): Fixed typo.
2661 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
2663 * parse.y (patch_method_invocation): Pick the correct enclosing
2664 context when creating inner class instances.
2667 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
2669 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
2670 Update copyright year to 2000.
2672 2000-11-23 Anthony Green <green@redhat.com>
2674 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
2675 Move current_file_list out of yyparse and make it static.
2677 * expr.c: Declare quick_stack and tree_list_free_list as static
2678 (init_expr_processing): Register quick_stack and
2679 tree_list_free_list roots.
2681 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
2683 * parse.y (build_outer_field_access): New local `decl_ctx', use
2684 it. Check for field's context and current class immediate outer
2685 context inheritance.
2686 (outer_field_access_p): Consider fields inherited from the last
2688 (build_access_to_thisn): Stop at the last enclosing context if
2692 Thu Nov 23 02:19:14 2000 J"orn Rennecke <amylaar@redhat.com>
2694 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
2696 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
2698 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
2701 2000-11-20 Tom Tromey <tromey@cygnus.com>
2703 * jv-scan.c (help): Document --complexity.
2704 (options): Added --complexity.
2705 (flag_complexity): New global.
2706 (main): Call `report'.
2707 * parse-scan.y (complexity): New global.
2708 (if_then_statement, if_then_else_statement,
2709 if_then_else_statement_nsi, switch_block_statement_group,
2710 while_expression, do_statement, for_begin, continue_statement,
2711 throw_statement, catch_clause, finally, method_invocation,
2712 conditional_and_expression, conditional_or_expression,
2713 conditional_expression): Update complexity.
2714 (reset_report): Reset complexity.
2715 (report): New function.
2717 2000-11-20 Tom Tromey <tromey@cygnus.com>
2719 * lex.c (yylex): Added STRICT_TK case.
2720 * parse.y (STRICT_TK): Added.
2721 * parse-scan.y (STRICT_TK): Added.
2722 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
2723 `;'. Use 4, not 3, with -k option. Correctly rename resulting
2725 * keyword.h: Rebuilt.
2726 * keyword.gperf (strictfp): Added.
2728 2000-11-20 Tom Tromey <tromey@cygnus.com>
2730 * lex.c (yylex): Recognize floating point constants with leading
2733 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2735 * java-tree.h (cyclic_inheritance_report): Constify.
2736 * parse.y (cyclic_inheritance_report): Likewise.
2738 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
2740 * parse.y (goal): Remove call to ggc_add_string_root.
2742 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
2744 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
2745 Create string in scratch buffer, then pass to build_string.
2747 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
2749 * parse.y (issue_warning_error_from_context): Add
2752 2000-11-11 Anthony Green <green@redhat.com>
2754 * jcf-parse.c (process_zip_dir): Add finput parameter.
2755 (jcf_figure_file_type): Call process_zip_dir with appropriate
2758 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2760 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
2761 * jcf-parse.c (jcf_figure_file_type): Likewise.
2763 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
2765 * parse.y (create_new_parser_context): Use memset () instead of
2768 2000-11-08 Tom Tromey <tromey@cygnus.com>
2770 * gjavah.c (process_file): Only include gcj/cni.h when generating
2773 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
2775 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
2776 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
2777 instead of bzero ().
2779 2000-11-05 Tom Tromey <tromey@cygnus.com>
2781 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
2782 * lex.c (IS_ZERO): New define.
2783 (java_perform_atof): Error on floating point underflow.
2785 2000-11-04 Tom Tromey <tromey@cygnus.com>
2787 * lex.c (java_parse_escape_sequence): Only read two octal
2788 characters if the first one is greater than 3. Don't allow
2789 "octal" numbers to include the digits 8 or 9.
2791 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
2793 * Make-lang.in (java.distdir): Remove.
2795 2000-11-03 Tom Tromey <tromey@cygnus.com>
2797 * Make-lang.in (java.dvi): New target.
2798 Partial fix for PR other/567.
2800 * lang-options.h: Mention -Wout-of-date.
2801 * jcf-dump.c (flag_newer): New global.
2802 * gjavah.c (flag_newer): New global.
2803 * jcf-io.c (find_class): Only warn when flag_newer set.
2804 * lang.c (flag_newer): New global.
2805 (struct string_option): New declaration.
2806 (lang_W_options): New global.
2807 (process_option_with_no): New function.
2808 (lang_decode_option): Use it.
2810 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
2811 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
2814 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
2815 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
2816 * lex.c (java_read_unicode): Removed `term_context' argument.
2817 Recognize any number of `u' in `\u'.
2818 (java_read_unicode_collapsing_terminators): New function.
2819 (java_get_unicode): Use it.
2820 (java_lineterminator): Removed.
2821 (yylex): Produce error if character literal is newline or single
2822 quote. Return if eof found in middle of `//' comment. EOF in
2823 `//' comment is only an error if pedantic.
2824 (java_ignorable_control_p): New function.
2825 (java_parse_end_comment): Return if eof found in middle of
2828 * jv-scan.c (pedantic): New global.
2830 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
2832 * parse.y (outer_field_access_p): Inherited fields aren't
2833 consider outer fields.
2834 (maybe_build_thisn_access_method): Use
2835 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
2836 (resolve_expression_name): Trigger an error if a static field
2837 is being accessed as an outer field.
2839 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
2841 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
2844 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
2846 * Make-lang.in: Move all build rules here from Makefile.in,
2847 adapt to new context. Wrap all rules that change the current
2848 directory in parentheses. Expunge all references to $(P).
2849 When one command depends on another and they're run all at
2850 once, use && to separate them, not ;. Add OUTPUT_OPTION to
2851 all object-file generation rules. Delete obsolete variables.
2853 * Makefile.in: Delete.
2854 * config-lang.in: Delete outputs= line.
2856 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
2858 * parse.y (patch_method_invocation): NULLify this_arg when already
2860 (maybe_use_access_method): Handle call to methods unrelated to the
2861 current class. Fixed comment.
2864 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
2866 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
2869 2000-10-24 Tom Tromey <tromey@cygnus.com>
2871 * lex.c (java_new_lexer): Initialize new fields. Work around
2872 broken iconv() implementations.
2873 (java_read_char): Swap bytes if required. Use fallback decoder if
2875 (byteswap_init, need_byteswap): New globals.
2876 (java_destroy_lexer): Only close iconv handle if it is in use.
2877 * lex.h (java_lexer): New fields read_anything, byte_swap,
2879 Made out_buffer unsigned.
2881 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
2883 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
2884 where an enclosing context can be set on the jdep.
2885 (do_resolve_class): Fixed identation.
2887 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2889 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
2891 * jcf-reader.c (peek_attribute, skip_attribute): Only define
2894 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
2896 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
2898 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
2900 * jcf-write.c (OP1): Update `last_bc'.
2901 (struct jcf_block): Fixed indentation and typo in comments. New
2903 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
2904 follows `monitorenter'.
2905 * parse.y (patch_synchronized_statement): New local `tmp'. Call
2909 2000-10-16 Tom Tromey <tromey@cygnus.com>
2911 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
2912 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
2913 * lang-options.h: Added -MA, -MT, -MF..
2914 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
2915 (DEPEND_TARGET_SET): New macro.
2916 (DEPEND_FILE_ALREADY_SET): Likewise.
2917 (init_parse): Handle new flags.
2918 * jcf.h (jcf_dependency_print_dummies): Declare.
2919 * Make-lang.in (s-java): Added mkdeps.o.
2920 * Makefile.in (BACKEND): Added mkdeps.o.
2921 (../gcjh$(exeext)): Added mkdeps.o.
2922 (../jcf-dump$(exeext)): Added mkdeps.o.
2923 * jcf-depend.c: Include mkdeps.h.
2924 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
2925 add_entry): Removed.
2926 (jcf_dependency_reset): Rewrote.
2927 (dependencies): New global.
2928 (jcf_dependency_set_target): Rewrote.
2929 (jcf_dependency_add_target): Likewise.
2930 (jcf_dependency_add_file): Likewise.
2932 (print_ents): Removed.
2933 (jcf_dependency_write): Rewrote.
2934 (print_dummies): New global.
2935 (jcf_dependency_print_dummies): New function
2936 (jcf_dependency_write): Call deps_dummy_targets if required.
2938 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
2940 * gjavah.c (add_class_decl): Removed unused variables `tname',
2941 `tlen' and `name_index'.
2942 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
2943 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
2944 in `wfl_operator' with value.
2945 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
2946 (jcf_figure_file_type): Fixed identation.
2947 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
2948 * parse.y (analyze_clinit_body): New function.
2949 (static_initializer:): Reset `current_static_block'.
2950 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
2951 `wfl_operator' with new value.
2952 (lookup_cl): Use EXPR_WFL_FILENAME.
2953 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
2954 analyze_clinit_body.
2955 (build_outer_field_access): Access to this$<n> built from
2956 current_class, not its outer context.
2957 (build_access_to_thisn): Fixed leading comment. Tidied things up.
2958 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
2959 (patch_method_invocation): Use `is_static_flag' when already
2961 (patch_newarray): Removed assignment in ternary operator.
2963 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2965 * except.c (free_eh_ranges): Don't free `whole_range'.
2967 2000-10-15 Anthony Green <green@redhat.com>
2969 * decl.c (init_decl_processing): Call init_class_processing before
2972 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
2974 * check-init.c (check_init): Fixed leading comment. Use
2976 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
2977 (give_name_to_locals): Likewise.
2978 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
2979 fields in lang_decl_var.
2980 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
2981 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
2982 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
2983 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
2984 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
2985 (LOCAL_FINAL): Rewritten.
2986 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
2987 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
2988 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
2989 `init_final' fields.
2990 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
2991 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
2992 (TYPE_HAS_FINAL_VARIABLE): New macro.
2993 (struct lang_type): Added `afv' field.
2994 * parse.y (check_static_final_variable_assignment_flag): New function.
2995 (reset_static_final_variable_assignment_flag): Likewise.
2996 (check_final_variable_local_assignment_flag): Likewise.
2997 (reset_final_variable_local_assignment_flag): Likewise.
2998 (check_final_variable_indirect_assignment): Likewise.
2999 (check_final_variable_global_assignment_flag): Likewise.
3000 (add_inner_class_fields): Use LOCAL_FINAL_P.
3001 (register_fields): Handle local finals and final variables.
3002 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
3003 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3004 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
3006 (java_complete_expand_methods): Loop to set
3007 TYPE_HAS_FINAL_VARIABLE. Call
3008 `reset_final_variable_local_assignment_flag' and
3009 `check_final_variable_local_assignment_flag' accordingly before
3010 and after constructor expansion. Call
3011 `reset_static_final_variable_assignment_flag'
3012 before expanding <clinit> and after call
3013 `check_static_final_variable_assignment_flag' if the
3014 current_class isn't an interface. After all methods have been
3015 expanded, call `check_final_variable_global_assignment_flag' and
3016 `check_static_final_variable_assignment_flag' if the current class
3018 (maybe_yank_clinit): Fixed typo in comment.
3019 (build_outer_field_access_methods): Removed old sanity check. Use
3020 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3021 Don't create access methods for finals.
3022 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
3023 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
3024 existing DECL_INIT has been processed.
3025 (java_complete_lhs): Likewise.
3026 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
3027 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
3029 (patch_assignment): Use LOCAL_FINAL_P.
3030 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
3031 DECL_INITIAL is nullified.
3034 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3036 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
3038 * Makefile.in (parse.c, parse-scan.c): Likewise.
3040 2000-10-12 Mark Mitchell <mark@codesourcery.com>
3042 * class.c (temporary_obstack): Remove.
3043 (make_class): Don't mess with obstascks.
3044 (push_class): Likewise.
3045 (set_super_info): Likewise.
3046 (add_method_1): Likewise.
3047 (add_method): Likewise.
3048 (add_field): Likewise.
3049 (build_utf8_ref): Likewise.
3050 (build_class_ref): Likewise.
3051 (build_static_field_ref): Likewise.
3052 (finish_class): Likewise.
3053 (push_super_field): Likewise.
3054 (layout_class): Likewise.
3055 (layout_class_methods): Likewise.
3056 (init_class_processing): Likewise.
3057 * constants.c (get_tag_node): Likewise.
3058 (build_constant_data_ref): Likewise.
3059 * decl.c (ggc_p): Remove.
3060 (copy_lang_decl): Use ggc_alloc.
3061 (complete_start_java_method): Don't mess with obstacks.
3062 (start_java_method): Likewise.
3063 (end_java_method): Likewise.
3064 * except.c (link_handler): Use xmalloc.
3065 (free_eh_ranges): New function.
3066 (method_init_exceptions): Use it.
3067 (add_handler): Use xmalloc.
3068 (expand_start_java_handler): Don't mess with obstacks.
3069 (prepare_eh_table_type): Likewise.
3070 (expand_end_java_handler): Likewise.
3071 * expr.c (push_value): Likewise.
3072 (create_label_decl): Likewise.
3073 (build_jni_stub): Likewise.
3074 (java_lang_expand_expr): Likewise.
3075 (note_instructions): Use xrealloc.
3076 (java_push_constant_from_pool): Don't mess with obstacks.
3077 (process_jvm_instruction): Likewise.
3078 * java-tree.h (cyclic_inheritance_report): Remove duplicate
3080 * jcf-parse.c (get_constant): Don't mess with obstacks.
3081 (read_class): Likewise.
3082 (jcf_parse): Likewise.
3083 * lex.c (expression_obstack): Remove.
3084 (java_lex): Don't use obstack_free.
3085 * parse.h (exit_java_complete_class): Don't mess with obstacks.
3086 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
3087 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
3088 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
3089 * parse.y (gaol): Add more GC roots.
3090 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
3091 (lookup_field_wrapper): Likewise.
3092 (obtain_incomplete_type): Don't mess with obstacks.
3093 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
3095 (craft_constructor): Don't mess with obstacks.
3096 (safe_layout_class): Likewise.
3097 (java_complete_class): Likewise.
3098 (source_end_java_method): Likewise.
3099 (build_outer_field_access_methods): Likewise.
3100 (build_outer_method_access_method): Likewise.
3101 (maybe_build_thisn_access_method): Likewise.
3102 (build_dot_class_method_invocation): Likewise.
3103 (java_complete_tree): Likewise.
3104 (java_complete_lhs): Likewise.
3105 (do_merge_string_cste): Likewise.
3106 (patch_string_cst): Likewise.
3107 (array_constructor_check_entry): Likewise.
3108 * typeck.c (build_java_array_type): Likewise.
3109 (parse_signature_string): Likewise.
3110 (build_java_signature): Likewise.
3112 2000-10-12 Tom Tromey <tromey@cygnus.com>
3115 * gjavah.c (add_class_decl): Don't special-case inner classes.
3116 (add_namelet): Likewise.
3118 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
3120 * java-tree.h: Constify current_encoding.
3121 * lang.c: Constify current_encoding.
3123 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
3125 * jvgenmain.c (class_mangling_suffix): Omit `.'.
3126 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
3128 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
3130 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
3131 patch. Fixes gcj/340.
3133 2000-10-10 Tom Tromey <tromey@cygnus.com>
3135 * lex.c (java_new_lexer): Initialize out_first and out_last
3137 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
3139 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
3141 * parse.y (pop_current_osb): New function.
3142 (array_type:): Use `dims:', changed actions
3143 accordingly. Suggested by Anthony Green.
3144 (array_creation_expression:): Used pop_current_osb.
3145 (cast_expression:): Likewise.
3146 (search_applicable_method_list): Fixed indentation.
3148 2000-10-08 Anthony Green <green@redhat.com>
3150 * parse.y (array_type_literal): Remove production.
3151 (type_literals): Refer to array_type, not array_type_literal.
3153 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3155 Patch contributed by Corey Minyard.
3156 * decl.c (check_local_named_variable): New function.
3157 (tree check_local_unnamed_variable): Likewise.
3158 (find_local_variable): Splitted. Call check_local_{un}named_variable.
3160 2000-10-07 Anthony Green <green@redhat.com>
3162 * class.c (layout_class): Handle case where superclass can't be
3165 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
3167 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
3170 2000-10-05 Tom Tromey <tromey@cygnus.com>
3172 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
3173 * jvgenmain.c (class_mangling_prefix): Removed.
3174 (class_mangling_suffix): New global.
3176 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
3178 (print_method_info): Handle overrides for static and final
3180 (process_file): Generate declaration for class object field.
3181 * class.c (cxx_keywords): New array.
3182 (utf8_cmp): New function.
3183 (cxx_keyword_p): New function.
3184 (layout_class_method): Mangle C++ keywords by appending `$'.
3185 (mangle_field): New function.
3186 (mangle_class_field): Use mangle_field. Mangle class name as
3188 (mangle_static_field): Use mangle_field.
3190 Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3192 * decl.c (find_local_variable): Removed uncessary type check and
3193 fixed range check typo. From Corey Minyard.
3195 Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3197 * decl.c (give_name_to_locals): New local `code_offset'. Call
3198 `maybe_adjust_start_pc'.
3199 * expr.c (note_instructions): New function.
3200 (expand_byte_code): Don't collect insn starts here.
3201 (peek_opcode_at_pc): New function.
3202 (maybe_adjust_start_pc): Likewise.
3203 * java-tree.h (maybe_adjust_start_pc): Declare.
3204 (note_instructions): Likewise.
3205 * jcf-parse.c (parse_class_file): Call `note_instructions'.
3207 Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3209 * parse.y (field_access:): Fixed indentation.
3210 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
3212 2000-09-07 Tom Tromey <tromey@cygnus.com>
3215 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
3216 JPRIMITIVE_TYPE_P, for arithmetic operators.
3217 (patch_method_invocation): Indentation fix.
3218 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
3219 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
3220 (do_unary_numeric_promotion): Cleaned up code.
3221 (valid_cast_to_p): Handle boolean correctly.
3223 2000-09-27 Tom Tromey <tromey@cygnus.com>
3225 * lex.c (java_read_unicode): Reset bs_count when finished with
3228 2000-10-01 Mark Mitchell <mark@codesourcery.com>
3231 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
3232 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
3233 (typeck.o): Depend on ggc.h.
3234 * class.c (add_method_1): Use GC functions for allocation.
3235 (init_class_processing): Register roots.
3236 * decl.c (ggc_p): Set to 1.
3237 (pending_local_decls): Make it static.
3238 (push_jvm_slot): Use GC functions for allocation.
3239 (init_decl_processing): Register roots.
3240 (give_name_to_locals): Use GC functions for allocation.
3241 (lang_mark_tree): New function.
3242 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
3243 functions for allocation.
3244 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
3245 * lex.c (java_lex): Use build_string, rather than replicating it
3247 * parse.y (goal): Add more roots.
3248 (mark_parser_ctxt): New function.
3249 * typeck.c: Include ggc.h.
3251 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
3253 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
3254 contains something else than MODIFY_EXPR.
3256 2000-09-23 Mark Mitchell <mark@codesourcery.com>
3258 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
3259 * Makefile.in (parse.o): Depend on ggc.h.
3260 (class.o): Likewise.
3261 (constants.o): Likewise.
3264 (jcf-parse.o): Likewise.
3265 (jcf-write.o): Likewise.
3266 (mangle.o): Likewise.
3267 * class.c: Include ggc.h.
3268 (build_static_field_ref): Register GC roots.
3269 (layout_class): Likewise.
3270 (init_class_processing): Likewise.
3271 * constants.c: Include ggc.h.
3272 (current_constant_pool_data_ref): Remove.
3273 (tag_nodes): Move it to ...
3274 (get_tag_node): ... here. Register GC roots.
3275 * decl.c: Include ggc.h. Remove many global tree definitions.
3276 (throw_node): Define.
3277 (java_global_trees): Likewise.
3278 (predef_filenames): Make the size a constant.
3279 (init_decl_processing): Adjust accordingly.
3280 (init_decl_processing): Call init_jcf_parse. Register GC roots.
3281 * expr.c: Include ggc.h.
3282 (init_expr_processing): Register GC roots.
3283 (build_invokeinterface): Likewise.
3284 * java-tree.h: Replace extern tree declarations with macros.
3285 (java_global_trees): New variable.
3286 (java_tree_index): New enumeration.
3287 (init_jcf_parse): Declare.
3288 * jcf-parse.c: Include ggc.h.
3289 (current_class): Remove declaration.
3290 (main_class): Likewise.
3291 (all_class_list): Likewise.
3292 (predefined_filename_p): Adjust for constant size of
3294 (init_jcf_parse): New function.
3295 * jcf-write.c: Include ggc.h.
3296 (generate_classfile): Register GC roots.
3297 (append_synthetic_attribute): Likewise.
3298 (append_innerclass_attribute_entry): Likewise.
3299 * lang.c: Include ggc.h.
3300 (lang_print_error): Register GC roots.
3301 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
3303 * parse.y: Include ggc.h.
3304 (wfl_operator): Remove.
3305 (goal): Register GC roots.
3306 (java_pop_parser_context): Adjust for new field names.
3307 (java_parser_context_save_global): Likewse.
3308 (java_parser_context_restore_global): Likewise.
3309 (java_parser_context_suspend): Likewise.
3310 (java_parser_context_resume): Likewise.
3311 (verify_constructor_circularity): Register GC roots.
3312 (lookup_cl): Likewise.
3313 (java_reorder_fields): Likewise.
3314 (build_current_this): Likewise.
3315 (class_in_current_package): Likewise.
3316 (argument_types_convertible): Likewise.
3317 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
3319 2000-09-14 Tom Tromey <tromey@cygnus.com>
3321 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
3323 2000-09-13 Tom Tromey <tromey@cygnus.com>
3325 * jcf-parse.c: Include <locale.h>.
3326 * jv-scan.c: Include <locale.h>.
3328 2000-09-12 Tom Tromey <tromey@cygnus.com>
3330 * expr.c (pop_type_0): Return `Object' if trying to merge two
3332 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
3333 interface types; `Object' is always a valid supertype.
3335 2000-09-12 Tom Tromey <tromey@cygnus.com>
3338 * jv-scan.c (help): Document --encoding.
3339 (options): Added `encoding' entry.
3340 (OPT_ENCODING): New define.
3341 (main): Handle --encoding.
3342 Include <langinfo.h> if nl_langinfo exists.
3343 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
3345 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
3346 (parse_source_file): Correctly call java_init_lex. Added `finput'
3347 argument. Use nl_langinfo to determine default encoding.
3348 * java-tree.h (current_encoding): Declare.
3349 * parse.y (java_parser_context_restore_global): Don't restore
3351 (java_parser_context_save_global): Don't set `finput' field.
3352 (java_pop_parser_context): Don't restore `finput'. Free old lexer
3354 * lang.c (current_encoding): New global.
3355 (lang_decode_option): Recognize `-fencoding='.
3356 (finish_parse): Don't close finput.
3357 * parse.h (struct parser_ctxt): Removed `finput' and
3358 `unget_utf8_value' fields. Added `lexer' field.
3359 (java_init_lex): Fixed declaration.
3360 * lex.c (java_new_lexer): New function.
3361 (java_destroy_lexer): Likewise.
3362 (java_read_char): Added `lex' argument. Handle iconv case.
3363 (java_read_unicode): Added `lex' argument. Count backslashes in
3365 (java_init_lex): Added `finput' and `encoding' arguments. Set
3366 `lexer' field in ctxp.
3367 (BAD_UTF8_VALUE): Removed.
3368 (java_lex): Handle seeing UEOF in the middle of a string literal.
3369 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
3370 (java_lexer): New structure.
3373 (DEFAULT_ENCODING): New define.
3374 (java_destroy_lexer): Declare.
3376 2000-09-12 Tom Tromey <tromey@cygnus.com>
3379 * lex.c (java_init_lex): Initialize java_io_serializable.
3380 * parse.y (java_io_serializable): New global.
3381 (valid_ref_assignconv_cast_p): An array can be cast to
3384 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
3386 * decl.c, expr.c: Include defaults.h if not already included.
3387 Don't define the *_TYPE_SIZE macros.
3389 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
3391 * typeck.c (build_java_array_type): Correct first parameter
3392 in ADJUST_FIELD_ALIGN invocation.
3394 2000-09-06 Tom Tromey <tromey@cygnus.com>