gcc.c (process_command): Update copyright notice dates.
[gcc.git] / gcc / java / ChangeLog
1 2009-02-03 Jakub Jelinek <jakub@redhat.com>
2
3 * jcf-dump.c (version): Update copyright notice dates.
4
5 2009-01-16 Richard Guenther <rguenther@suse.de>
6
7 PR tree-optimization/38835
8 PR middle-end/36227
9 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
10
11 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
12
13 PR bootstrap/38262
14 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
15
16 2008-11-04 Andrew Haley <aph@redhat.com>
17
18 PR java/37068
19 * jcf-parse.c (java_emit_static_constructor): Don't call
20 cgraph_build_static_cdtor. Rewrite.
21
22 2008-10-24 Jakub Jelinek <jakub@redhat.com>
23
24 * Make-lang.in (check-java-subtargets): New target.
25
26 2008-10-16 David Edelsohn <edelsohn@gnu.org>
27
28 PR target/35483
29 * Make-lang.in (class.o): Depend on $(TM_P_H).
30 (expr.o): Same.
31 * class.c: Include tm_p.h.
32 * expr.c: Include tm_p.h.
33
34 2008-10-14 Andrew Haley <aph@redhat.com>
35
36 * constants.c (build_constant_data_ref): Make sure we only build
37 one copy of the decl for the constant pool.
38
39 2008-09-22 Andrew Haley <aph@redhat.com>
40
41 * expr.c (rules): Add new rule for
42 gnu.java.lang.VMCPStringBuilder.toString.
43 (rewrite_rule.new_classname): New field.
44 (maybe_rewrite_invocation): Use new_classname field instead of
45 DECL_CONTEXT (*method_p).
46 Allow rewrite_arglist to be NULL.
47
48 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
49
50 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
51 (java_get_callee_fndecl): Kill.
52
53 2008-09-17 Jan Hubicka <jh@suse.cz>
54
55 PR c++/18071
56 * class.c (add_method_1): Do not initialize DECL_INLINE.
57 (make_local_function_alias): Likewise.
58 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
59 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
60
61 2008-09-09 Richard Guenther <rguenther@suse.de>
62
63 * decl.c (build_result_decl): Remove no longer applicable
64 promotion.
65
66 2008-09-05 David Daney <ddaney@avtrex.com>
67
68 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
69
70 2008-08-21 David Daney <ddaney@avtrex.com>
71
72 * class.c (make_class_data): Don't add field_index when
73 flag_reduced_reflection set.
74
75 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
76
77 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
78
79 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
80
81 PR 28875
82 * lang.c (java_handle_option): Replace set_Wunused with
83 warn_unused.
84
85 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
86
87 * gcj.texi: Update copyright years. Do not list GPL as
88 Invariant Section.
89
90 2008-07-29 Jakub Jelinek <jakub@redhat.com>
91
92 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
93 from ctype's sizes.
94
95 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
96 alignment.
97
98 2008-07-29 Jan Hubicka <jh@suse.cz>
99
100 * lang.c (java_post_options): Remove handling of flag_no_inline.
101
102 2008-07-28 Richard Guenther <rguenther@suse.de>
103
104 Merge from gimple-tuples-branch.
105
106 2008-07-18 Richard Guenther <rguenther@suse.de>
107
108 * expr.c: Include tree-iterator.h.
109 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
110
111 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
112
113 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
114 * expr.c: Same.
115
116 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
117
118 * java-gimplify.c (java_gimplify_expr): Same.
119 (java_gimplify_modify_expr): Same.
120 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
121
122 2008-05-02 Diego Novillo <dnovillo@google.com>
123
124 * expr.c (build_java_throw_out_of_bounds_exception): Fix
125 mixed declarations and code.
126
127 2008-05-02 Doug Kwan <dougkwan@google.com>
128
129 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
130 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
131
132 2008-02-19 Diego Novillo <dnovillo@google.com>
133
134 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
135
136 * java-gimplify.c (java_gimplify_self_mod_expr): Change
137 gimple_seq arguments to gimple_seq *. Update all users.
138
139 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
140
141 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
142 sequences.
143 (java_gimplify_self_mod_expr): Same.
144 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
145 sequences.
146
147 2008-07-24 Jan Hubicka <jh@suse.cz>
148
149 * java/decl.c: Include cgraph.h
150 (end_java_method): Remove non-unit-at-a-time code.
151 (java_mark_decl_local): Likewise; sanity check that we don't touch
152 finalized nodes.
153
154 2008-07-15 Jan Hubicka <jh@suse.cz>
155
156 * lang.c (java_init_options): Enable unit-at-a-time by default.
157
158 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
159
160 * Make-lang.in (jvspec.o): Fix dependencies.
161
162 2008-07-06 Tom Tromey <tromey@redhat.com>
163
164 * Make-lang.in (java/parse.o-warn): Remove.
165 (java/jcf-io.o-warn): Remove.
166
167 2008-07-05 Tom Tromey <tromey@redhat.com>
168
169 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
170 (compare_path): Remove.
171 (java_or_class_file): Likewise.
172 (memoized_dirlist_entry): Likewise.
173 (memoized_dirlist_hash): Likewise.
174 (memoized_dirlist_lookup_eq): Likewise.
175 (memoized_dirlists): Likewise.
176 (caching_stat): Likewise.
177 (find_class): Use stat.
178 * jcf.h (JCF_USE_SCANDIR): Remove.
179
180 2008-06-30 Joshua Sumali <jsumali@redhat.com>
181
182 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
183 doc/rebuild-gcj-db.1
184 (java.uninstall): Likewise.
185 (java.maintainer-clean): Likewise.
186 (aot-compile.pod): New rule.
187 (rebuild-gcj-db.pod): New rule.
188 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
189 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
190
191 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
192
193 * Make-lang.in (java/jcf-io.o-warn): New.
194
195 2008-06-24 Tom Tromey <tromey@redhat.com>
196
197 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
198 * expr.c (add_type_assertion): Rename argument.
199 (build_java_arrayaccess): Don't name variable 'throw'.
200 (ARRAY_NEW_MULTI): Don't name variable 'class'.
201 * jcf-io.c (find_class): Don't name variable 'class'.
202 * mangle.c (compression_table_add): Don't name variable 'new'.
203 * constants.c (cpool_for_class): Rename argument.
204 (alloc_constant_fieldref): Likewise.
205 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
206 'class'.
207 (read_class): Likewise.
208 (parse_zip_file_entries): Likewise.
209 (process_zip_dir): Likewise.
210 * decl.c (java_mark_class_local): Rename argument.
211 * class.c (GEN_TABLE): Use type_name, not typename.
212 (gen_indirect_dispatch_tables): Likewise.
213 (add_field): Rename argument.
214 (is_compiled_class): Likewise.
215 (safe_layout_class): Likewise.
216 (emit_assertion_table): Likewise.
217 * typeck.c (has_method): Rename argument.
218
219 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
220
221 * class.c (ident_subst, mangled_classname, unmangle_classname,
222 gen_indirect_dispatch_tables, add_method_1,
223 build_fieldref_cache_entry, make_local_function_alias,
224 layout_class, java_treetreehash_find, java_treetreehash_new,
225 split_qualified_name): Fix for -Wc++-compat.
226 * constants.c (set_constant_entry, cpool_for_class): Likewise.
227 * decl.c (make_binding_level, java_dup_lang_specific_decl,
228 start_java_method): Likewise.
229 * except.c (prepare_eh_table_type): Likewise.
230 * expr.c (type_assertion_hash, note_instructions): Likewise.
231 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
232 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
233 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
234 Likewise.
235 * jcf-parse.c (reverse, java_read_sourcefilenames,
236 annotation_grow, rewrite_reflection_indexes, java_parse_file,
237 process_zip_dir): Likewise.
238 * jcf-path.c (add_entry, add_path, jcf_path_init,
239 jcf_path_extdirs_arg): Likewise.
240 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
241 * jvgenmain.c (do_mangle_classname): Likewise.
242 * lang.c (put_decl_string): Likewise.
243 * verify-impl.c (make_state_copy, make_state, add_new_state):
244 Likewise.
245
246 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
247
248 * gcj.texi: Expand TABs, remove whitespace from blank lines.
249
250 2008-06-14 Tom Tromey <tromey@redhat.com>
251
252 PR java/36247:
253 * class.c (build_class_ref): Initialize this_classdollar when
254 needed.
255
256 2008-05-23 Andrew Haley <aph@redhat.com>
257
258 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
259 pathname of source file.
260
261 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
262
263 * jcf-dump.c (print_constant): Use
264 HOST_LONG_LONG_FORMAT.
265
266 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
267
268 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
269 DECL_PURE_P.
270
271 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
272
273 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
274 (build_classdollar_field): Don't set TREE_INVARIANT.
275 (get_dispatch_table): Don't set TREE_INVARIANT.
276 (make_class_data): Don't set TREE_INVARIANT.
277 (build_symbol_entry): Don't set TREE_INVARIANT.
278 (emit_symbol_table): Don't set TREE_INVARIANT.
279 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
280 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
281 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
282 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
283
284 2008-04-03 Tom Tromey <tromey@redhat.com>
285
286 * Make-lang.in (java_OBJS): New variable.
287
288 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
289
290 * java-tree.h (insert_block): Kill.
291 * decl.c (insert_block): Kill.
292
293 2008-04-01 Joseph Myers <joseph@codesourcery.com>
294
295 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
296 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
297 gpl.texi.
298
299 2008-03-27 Tom Tromey <tromey@redhat.com>
300
301 * Make-lang.in: Revert automatic dependency patch.
302
303 2008-03-25 Tom Tromey <tromey@redhat.com>
304
305 * Make-lang.in: Removed most explicit .o targets.
306 (java/jvspec.o): Reduce to variable setting. Moved to java/.
307 ($(GCJ)$(exeext)): Update.
308 (JAVA_OBJS): New variable.
309 (JCFDUMP_OBJS): Reformat.
310 (java_OBJS): New variable.
311 (java/jvspec.o-warn): Update.
312 (java/parse.o-warn): Remove.
313 (JAVA_TREE_H): Remove.
314 (java/jcf-io.o): Reduce to variable setting.
315 (ALL_CPPFLAGS): Likewise.
316
317 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
318
319 * mangle.c (java_mangle_decl): Remove dead check.
320
321 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
322
323 * jcf-parse.c (java_parse_file): Assert binding levels are
324 left in order.
325 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
326 Delete.
327
328 2008-03-02 Jakub Jelinek <jakub@redhat.com>
329
330 * jcf-dump.c (version): Update copyright notice dates.
331
332 2008-02-29 Tom Tromey <tromey@redhat.com>
333
334 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
335 method.
336 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
337
338 2008-02-26 Tom Tromey <tromey@redhat.com>
339
340 * lang.c (java_post_options): Remove conditional.
341 * expr.c (expand_byte_code): Remove old location code.
342 * jcf-parse.c (set_source_filename): Remove old location code.
343 (give_name_to_class): Likewise.
344 (jcf_parse): Likewise.
345 (duplicate_class_warning): Likewise.
346 (parse_class_file): Likewise.
347 (java_parse_file): Likewise.
348 * decl.c (finish_method): Remove old location code.
349 * class.c (push_class): Remove old location code.
350
351 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
352
353 PR other/35107
354 * Make-lang.in (jc1): Add $(GMPLIBS).
355
356 2008-01-23 David Daney <ddaney@avtrex.com>
357
358 * class.c (hide) Rename to...
359 (java_hide_decl) ... this throughout, and make public.
360 * resource.c (Jr_count): Remove.
361 (compile_resource_data): Call java_mangle_resource_name to generate
362 decl name. Make resource decl public and hidden.
363 * mangle.c (java_mangle_resource_name): New function.
364 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
365 functions.
366
367 2008-01-04 Andrew Haley <aph@redhat.com>
368
369 PR java/17779
370 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
371 C90.
372
373 2008-01-03 Andrew Haley <aph@redhat.com>
374
375 PR java/17779
376 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
377 we're about to re-layout the type.
378
379 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
380
381 * lang.c (java_classify_record): Don't return
382 RECORD_IS_INTERFACE for now.
383
384 2007-12-18 Andrew Haley <aph@redhat.com>
385
386 PR java/27643
387 * jcf-parse.c (java_parse_file): Remove call to
388 java_mark_class_local.
389 (parse_class_file): Reinstate call to java_mark_class_local here.
390 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
391 already set, call java_mangle_decl() and make_decl_rtl() to
392 rewrite its name as a hidden alias.
393
394 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
395
396 PR debug/7081
397 * lang.c (java_classify_record): New.
398 (LANG_HOOKS_CLASSIFY_RECORD): Override.
399
400 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
401
402 PR 34081/C++
403 * decl.c (finish_method): Pass 'false' for the new
404 allocate_struct_function parameter.
405
406 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
407
408 * expr.c (build_jni_stub): Use the computed jni func type for
409 variable meth.
410
411 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
412
413 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
414
415 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
416
417 * expr.c (type_assertion_hash): Hash type uids rather than
418 tree pointers.
419
420 2007-11-17 David Daney <ddaney@avtrex.com>
421 Andrew Haley <aph@redhat.com>
422
423 * constants.c (build_constants_constructor): Use POINTER_SIZE
424 insead of BITS_PER_WORD in big-endian work around.
425
426 2007-11-07 Tom Tromey <tromey@redhat.com>
427
428 PR java/34019:
429 * gcj.texi (Input Options): Add missing noun.
430
431 2007-11-02 Tom Tromey <tromey@redhat.com>
432
433 PR java/33765:
434 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
435 * zipfile.h (ZIPEMPTYMAGIC): New define.
436
437 2007-11-01 Tom Tromey <tromey@redhat.com>
438
439 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
440 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
441 (java/jcf-io.o): Depend on zipfile.h.
442
443 2007-10-17 Richard Guenther <rguenther@suse.de>
444
445 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
446 dependencies.
447
448 2007-10-03 Andrew Haley <aph@redhat.com>
449
450 PR java/33639
451 * class.c (mangled_classname): Detect and replace illegal
452 characters in assembly language symbols.
453 (gen_indirect_dispatch_tables): Call mangled_classname() on
454 the type.
455
456 2007-09-27 Jakub Jelinek <jakub@redhat.com>
457
458 * lang.c (java_print_error_function): Add third argument.
459
460 2007-09-15 Tom Tromey <tromey@redhat.com>
461
462 * java-tree.h (struct lang_decl_func) <function_decl_body>:
463 Remove.
464 <init_final>: Likewise.
465 * lang.c (java_dump_tree): Update.
466 * java-tree.h (DECL_FUNCTION_BODY): Remove.
467
468 2007-09-11 Jan Hubicka <jh@suse.cz>
469
470 * decl.c (java_expand_body): Kill.
471 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
472
473 2007-09-06 Tom Tromey <tromey@redhat.com>
474
475 * jcf-parse.c (parse_class_file): Re-enter the current file.
476
477 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
478
479 * boehm.c (mark_reference_fields): Move misaligned pointer check
480 after JREFERENCE_TYPE_P test
481
482 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
483
484 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
485 if pointer is misaligned.
486
487 2007-09-06 Tom Tromey <tromey@redhat.com>
488
489 * lang.c (java_post_options): Update.
490 * jcf-parse.c (set_source_filename): Update.
491 (give_name_to_class): Update.
492 (jcf_parse): Update.
493 (duplicate_class_warning): Update.
494 (parse_class_file): Update.
495 (java_parse_file): Update.
496 * expr.c (expand_byte_code): Update.
497
498 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
499
500 * decl.c (finish_method): Use set_cfun.
501
502 2007-09-04 Andrew Haley <aph@redhat.com>
503
504 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
505 when using the ARM EABI.
506
507 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
508
509 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
510
511 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
512
513 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
514 CONST_CAST.
515 * jcf.h (JCF_FINISH): Likewise.
516
517 2007-08-28 Tom Tromey <tromey@redhat.com>
518
519 * Make-lang.in (java.tags): Don't tag '*.y' files.
520
521 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
522
523 * lang.c (java_decl_ok_for_sibcall): Likewise.
524
525 2007-08-21 Paul Brook <paul@codesourcery.com>
526 Nathan Sidwell <nathan@codesourcery.com>
527 Mark Mitchell <mark@codesourcery.com>
528 Joseph Myers <joseph@codesourcery.com>
529
530 * jcf-dump.c (version): Use pkgversion_string. Update copyright
531 date.
532
533 2007-08-20 Richard Guenther <rguenther@suse.de>
534
535 * lang.c (java_tree_inlining_walk_subtrees): Remove.
536 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
537
538 2007-08-17 Tom Tromey <tromey@redhat.com>
539
540 * typeck.c (find_method_in_interfaces): Update.
541 * jcf-parse.c (load_class): Update.
542 * java-gimplify.c (java_gimplify_component_ref): Removed.
543 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
544 arguments.
545 (java_gimplify_expr): Update.
546 * decl.c (java_init_decl_processing): Update.
547 * class.c (set_constant_value): Update.
548 (make_class_data): Update.
549 (finish_class): Update.
550 (build_static_field_ref): Update.
551 (is_compiled_class): Update.
552 (maybe_layout_super_class): Update.
553 (layout_class): Update.
554 (layout_class_method): Update.
555 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
556 (lang_decl_var) <am, final_iud, cif>: Removed fields.
557 (lang_decl_func) <init_calls_this>: Removed field.
558 (lang_type) <dot_class, verify_method>: Removed fields.
559 (FIELD_NESTED_ACCESS): Removed.
560 (FIELD_NESTED_ACCESS_P): Removed.
561 (DECL_FIELD_FINAL_IUD): Removed.
562 (DECL_LOCAL_FINAL_IUD): Removed
563 (LOCAL_FINAL_P): Removed.
564 (FINAL_VARIABLE_P): Removed.
565 (CLASS_FINAL_VARIABLE_P): Removed.
566 (DECL_BIT_INDEX): Removed.
567 (DECL_INIT_CALLS_THIS): Removed.
568 (FIELD_LOCAL_ALIAS): Removed.
569 (FIELD_LOCAL_ALIAS_USED): Removed.
570 (FIELD_THISN): Removed.
571 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
572 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
573 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
574 (TYPE_DOT_CLASS): Removed.
575 (TYPE_VERIFY_METHOD): Removed.
576 (ID_CLASSDOLLAR_P): Removed.
577 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
578 Removed.
579 (classdollar_identifier_node): Removed.
580 (TYPE_UNKNOWN): Removed.
581 (CLASS_FROM_SOURCE_P): Removed.
582 * expr.c (build_jni_stub): Update.
583 (force_evaluation_order): Update.
584 (build_java_empty_stmt): Update.
585 (build_class_init): Update.
586 (java_stack_swap): Update.
587 (build_jni_stub): Update.
588
589 2007-08-17 Tom Tromey <tromey@redhat.com>
590
591 * java-tree.h (LABEL_TYPE_STATE): Removed.
592 (load_type_state): Removed.
593 (LABEL_PC): Removed.
594 (LABEL_VERIFIED): Removed.
595 (type_states): Declare.
596 * expr.c (type_states): New global.
597 (load_type_state): Now static. Use type_states. Changed
598 argument.
599 (lookup_label): Don't set LABEL_PC.
600 (expand_byte_code): Don't use LABEL_VERIFIED.
601 (note_instructions): Initialize type_states.
602 * verify-glue.c (vfy_note_stack_depth): Rewrote.
603 (vfy_note_stack_type): Use type_states.
604 (vfy_note_local_type): Likewise.
605
606 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
607
608 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
609 * jcf.h (JCF_FINISH): Likewise.
610
611 2007-07-31 Nick Clifton <nickc@redhat.com>
612
613 * java-gimplify.c: Change copyright header to refer to version 3
614 of the GNU General Public License and to point readers at the
615 COPYING3 file and the FSF's license web page.
616 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
617 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
618 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
619 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
620 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
621 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
622 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
623
624 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
625
626 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
627
628 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
629
630 * lang.c (java_get_callee_fndecl): Constify.
631
632 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
633
634 * mangle.c (set_type_package_list): Constify.
635 * verify-glue.c (vfy_make_string): Delete.
636 * verify.h (vfy_make_string): Likewise.
637
638 2007-07-26 Tom Tromey <tromey@redhat.com>
639
640 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
641 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
642 EXIT_BLOCK_LABELED_BLOCK): Likewise.
643 * lang.c (java_tree_inlining_walk_subtrees): Update.
644 (java_dump_tree): Likewise.
645 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
646 Remove.
647 * decl.c (push_labeled_block, pop_labeled_block): Remove.
648 * java-gimplify.c (java_gimplify_labeled_block_expr,
649 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
650 (java_gimplify_expr): Update.
651
652 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
653
654 * class.c (java_treetreehash_hash, java_treetreehash_compare):
655 Constify.
656 * expr.c (type_assertion_eq): Likewise.
657 * jcf-io.c (compare_path): Likewise.
658 * jcf-parse.c (cmpstringp): Likewise.
659 * verify-impl.c (get_one_type, compute_argument_types,
660 compute_return_type): Likewise.
661
662 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
663
664 PR target/32462
665 PR libgcj/32465
666 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
667
668 2007-07-12 Richard Guenther <rguenther@suse.de>
669
670 * expr.c (expand_java_return): RETURN_EXPR has void type.
671 (build_jni_stub): Likewise. Use a comparison against zero
672 for null-pointer test in COND_EXPR.
673 (build_field_ref): Build POINTER_PLUS_EXPR with correct
674 type. Convert result instead.
675 (build_invokevirtual): Likewise.
676
677 2007-07-09 Geoffrey Keating <geoffk@apple.com>
678
679 PR 32617
680 * lang.c (java_init): Remove setting of force_align_functions_log.
681 * class.c (add_method_1): Set DECL_ALIGN of non-static method
682 to cope with ptrmemfunc_vbit_in_pfn.
683
684 2007-07-03 David Daney <ddaney@avtrex.com>
685
686 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
687 include path.
688 (doc/gcj.dvi): Same.
689 (doc/gcj.pdf): Same.
690 (java/index.html): Same.
691
692 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
693
694 * class.c (make_class_data): Build the index in sizetype.
695 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
696 adding to a pointer type.
697 (build_symbol_entry): Likewise.
698 * expr.c (build_java_arrayaccess): Likewise.
699 (build_field_ref): Likewise.
700 (build_known_method_ref): Likewise.
701 (build_invokevirtual): Likewise.
702 * except.c (build_exception_object_ref): Do a
703 NEGATIVE and then a POINTER_PLUS_EXPR instead
704 of a MINUS_EXPR.
705
706 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
707
708 * typeck.c (java_signed_type): Remove.
709 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
710 * java-tree.h (java_signed_type): Remove.
711
712 2007-05-18 Geoffrey Keating <geoffk@apple.com>
713
714 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
715 (print_constant): Likewise.
716
717 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
718
719 * expr.c (build_java_binop): Use unsigned_type_for instead of
720 java_unsigned_type.
721 * java-tree.h (java_unsigned_type): Remove.
722 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
723 * typeck.c (java_unsigned_type): Remove.
724
725 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
726
727 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
728 instead of checking GIMPLE_STMT_P in chain_next.
729
730 2007-04-06 Colin Walters <walters@redhat.com>
731
732 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
733 * jcf-io.c (open_class): Copy 'filename'.
734
735 2007-04-03 Andrew Haley <aph@redhat.com>
736
737 * jvgenmain.c (main): Change main to use class$, not class$$.
738 (do_mangle_classname): Likewise.
739 * class.c (hide): New function.
740 (add_field): Hide everything that shouldn't be visible outside a
741 DSO.
742 (build_static_class_ref): Likewise.
743 (build_classdollar_field): Likewise.
744 (make_class_data): Likewise.
745 (layout_class_method): Likewise.
746 * expr.c (special_method_p): New function.
747
748 * class.c (push_class): Don't bogusly guess the source filename.
749 * jcf-parse.c (give_name_to_class): Don't set input_location from
750 DECL_ARTIFICIAL decls.
751
752 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
753
754 * typeck.c (java_signed_or_unsigned_type): Removed.
755 (java_signed_type): use get_signed_or_unsigned_type instead of
756 java_signed_or_unsigned_type.
757 (java_unsigned_type): Ditto.
758 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
759 * java-tree.h (java_signed_or_unsigned_type): Removed.
760
761 2007-03-26 Tom Tromey <tromey@redhat.com>
762
763 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
764 (java.maintainer-clean): Likewise.
765 (java.install-man): Likewise.
766 (.INTERMEDIATE): Removed grmiregistry.pod.
767 (grmiregistry.pod): Removed.
768 * gcj.texi (Invoking gcjh): Removed.
769 (Invoking gjnih): Likewise.
770 (Invoking grmiregistry): Likewise.
771 (direntry): Updated.
772 (Top): Likewise.
773 (which-gcj): Removed.
774
775 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
776
777 * Make-lang.in: Add install-pdf target as copied from
778 automake v1.10 rules.
779
780 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
781
782 * gcj.texi: Standardize title page.
783
784 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
785
786 * class.c: Fix a comment typo.
787
788 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
789 Brooks Moses <brooks.moses@codesourcery.com>
790 Lee Millward <lee.millward@codesourcery.com>
791
792 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
793 of build3.
794 (BUILD_MONITOR_EXIT): Likewise.
795
796 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
797 (java_gimplify_modify_expr): Likewise.
798
799 * class.c (cache_this_class_ref): Use build_call_expr.
800 (build_static_field_ref): Likewise.
801 (emit_indirect_register_classes): Likewise.
802 (emit_register_classes): Likewise.
803
804 * resource.c (write_resource_constructor): Use build_call_expr.
805
806 * builtins.c (builtin_creator_function): Change interpretation of
807 the second parameter to be the whole CALL_EXPR instead of the arglist.
808 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
809 (min_builtin): Likewise.
810 (abs_builtin): Likewise.
811 (java_build_function_call_expr): Likewise.
812 (convert_real): Likewise.
813 (UNMARSHAL3): Likewise.
814 (UNMARSHAL4): Likewise.
815 (UNMARSHAL5): Likewise.
816 (build_arglist_for_builtin): Delete. Fix callers to use
817 build_call_expr instead.
818 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
819 accessors.
820 (compareAndSwapInt_builtin): Likewise.
821 (compareAndSwapLong_builtin): Likewise.
822 (compareAndSwapObject_builtin): Likewise.
823 (putVolatile_builtin): Likewise.
824 (getVolatile_builtin): Likewise.
825 (VMSupportsCS8_builtin): Likewise.
826 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
827 instead of arglist.
828
829 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
830 (build_java_throw_out_of_bounds_exception): Likewise.
831 (java_check_reference): Likewise.
832 (build_java_arraystore_check): Likewise.
833 (build_newarray): Likewise.
834 (build_anewarray): Likewise.
835 (expand_java_multinewarray): Use build_call_list instead of build3.
836 (build_java_monitor): Use build_call_nary instead of build3.
837 (java_create_object): Likewise.
838 (expand_java_NEW): Likewise.
839 (build_instanceof): Likewise.
840 (expand_java_CHECKCAST): Likewise.
841 (build_java_soft_divmod): Likewise.
842 (build_java_binop): Likewise.
843 (build_field_ref): Likewise.
844 (build_class_init): Likewise.
845 (rewrite_arglist_getcaller): Use build_call_expr.
846 (build_invokeinterface): Use build_call_nary instead of build3.
847 (expand_invoke): Use build_call_list instead of build3.
848 (build_jni_stub): Use build_call_nary, build_call_list, or
849 build_call_expr instead of build3.
850 (expand_java_field_op): Use build_call_expr instead of build3.
851 (force_evaluation_order): Use new CALL_EXPR accessors.
852
853 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
854
855 2007-02-15 David Daney <ddaney@avtrex.com>
856
857 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
858 (java.maintainer-clean):Add gc-analyze.1.
859 (.INTERMEDIATE): Add gc-analyze.pod.
860 (gc-analyze.pod): New rule.
861 (java.install-man): Install gc-analyze.1
862 * gcj.texi: Add new section for the gc-analyze program.
863
864 2007-02-07 Andrew Haley <aph@redhat.com>
865
866 * class.c (uncache_this_class_ref): New.
867 * expr.c (build_jni_stub): Initialize the class.
868 (expand_byte_code): Call uncache_this_class_ref after generating
869 code.
870
871 2007-02-06 Tom Tromey <tromey@redhat.com>
872
873 PR java/30714:
874 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
875
876 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
877
878 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
879
880 2007-02-02 Andrew Haley <aph@redhat.com>
881
882 * expr.c (expand_byte_code): Call cache_this_class_ref() and
883 cache_cpool_data_ref().
884 Set TYPE_CPOOL_DATA_REF.
885 (cache_cpool_data_ref): New function.
886 * constants.c (build_ref_from_constant_pool): Remove special-case
887 code for flag_indirect_classes.
888 (build_constant_data_ref): Move special-case code for
889 flag_indirect_classes here from build_ref_from_constant_pool.
890 * decl.c (finish_method): Move class initialization from here to
891 cache_this_class_ref.
892 * class.c (cache_this_class_ref): New function.
893 (build_class_ref): Use this_classdollar for the ouput class.
894
895 2007-02-02 David Daney <ddaney@avtrex.com>
896
897 * class.c (is_compiled_class): Move check to avoid reloading
898 current class.
899 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
900 already set.
901
902 2007-02-01 Andrew Haley <aph@redhat.com>
903
904 PR java/30641
905 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
906
907 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
908
909 * class.c, jcf-parse.c: Fix comment typos.
910
911 2007-01-30 Tom Tromey <tromey@redhat.com>
912
913 * gcj.texi (Strings): Fix documentation for JvNewString.
914
915 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
916
917 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
918 typos.
919
920 2007-01-30 Ben Elliston <bje@au.ibm.com>
921
922 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
923
924 2007-01-29 Tom Tromey <tromey@redhat.com>
925
926 PR java/30607:
927 * jvspec.c (lang_specific_driver): Handle separate -I argument.
928 * lang.opt (-I): Add 'Separate'.
929
930 2007-01-29 Andrew Haley <aph@redhat.com>
931
932 * class.c (add_method_1): Mark fndecl as external unless we are
933 compiling it into this object file.
934
935 2007-01-24 Andrew Haley <aph@redhat.com>
936
937 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
938 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
939
940 2007-01-22 Andrew Haley <aph@redhat.com>
941
942 * builtins.c (VMSupportsCS8_builtin): New function.
943
944 2007-01-23 Andrew Pinski <pinskia@gmail.com>
945
946 PR java/30454
947 * jcf-io.c (opendir_in_zip): Close the file
948 and free zipf before returning after an error.
949
950 2007-01-16 Tom Tromey <tromey@redhat.com>
951
952 * java-tree.def: Added copyright header.
953
954 2007-01-15 Tom Tromey <tromey@redhat.com>
955
956 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
957 case.
958 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
959 Removed case.
960 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
961 (EXPR_WFL_NODE): Likewise.
962 (EXPR_WFL_LINECOL): Likewise.
963 (EXPR_WFL_FILENAME): Likewise.
964 (EXPR_WFL_LINENO): Likewise.
965 (build_expr_wfl, expr_add_location): Don't declare.
966 (build_unknown_wfl): Removed.
967 (EXPR_WFL_FILENAME_NODE): Removed.
968 (EXPR_WFL_COLNO): Removed.
969 (EXPR_WFL_SET_LINECOL): Removed.
970 (DECL_FUNCTION_WFL): Removed.
971 (DECL_FIELD_FINAL_WFL): Removed.
972 (struct lang_decl_func) <wfl>: Removed field.
973 <called_constructor>: Likewise.
974 <inner_access>: Likewise.
975 (struct lang_decl_var) <wfl>: Removed field.
976 (DECL_CONSTRUCTOR_CALLS): Removed.
977 (DECL_FUNCTION_ACCESS_DECL): Likewise.
978 (DECL_FUNCTION_INNER_ACCESS): Likewise.
979 (DECL_SPECIFIC_COUNT): Likewise.
980 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
981 * expr.c (build_expr_wfl): Removed.
982 (expr_add_location): Likewise.
983
984 2007-01-12 Tom Tromey <tromey@redhat.com>
985
986 * jcf-dump.c (main): Updated call to find_class.
987 * lang.c (java_init): Removed dead code.
988 * jcf-parse.c (read_class): Don't use java_source field. Removed
989 dead code.
990 (parse_zip_file_entries): Don't use java_source field.
991 (process_zip_dir): Likewise.
992 (jcf_parse): Removed dead code.
993 (java_parse_file): Likewise.
994 (read_class): Updated call to find_class.
995 * jcf-io.c (find_class): Don't use java_source field. Removed
996 'source_ok' argument, .java logic.
997 * jcf.h (JCF) <java_source>: Removed field.
998 (JCF_ZERO): Updated. (find_class): Updated.
999 * decl.c: Removed dead code.
1000 * class.c: Removed dead code.
1001
1002 2007-01-11 Tom Tromey <tromey@redhat.com>
1003
1004 * typeck.c (convert): Don't use flag_emit_class_files.
1005 * lang.c (java_post_options): Don't use flag_emit_class_files.
1006 (java_handle_option): Don't use flag_extraneous_semicolon or
1007 flag_redundant.
1008 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1009 flag_emit_class_files.
1010 (load_class): Likewise.
1011 * java-tree.h (flag_emit_class_files): Don't declare.
1012 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1013 (flag_extraneous_semicolon): Don't declare.
1014 (flag_not_overriding): Likewise.
1015 (flag_static_local_jdk1_1): Likewise.
1016 (flag_redundant): Likewise.
1017 * expr.c (build_newarray): Don't use flag_emit_class_files.
1018 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1019 flag_emit_class_files.
1020 (build_class_ref): Likewise.
1021 * builtins.c (check_for_builtin): Don't use
1022 flag_emit_class_files.
1023
1024 2007-01-10 Tom Tromey <tromey@redhat.com>
1025
1026 * lang.c (java_can_use_bit_fields_p): Removed.
1027 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1028
1029 2007-01-09 Andrew Haley <aph@redhat.com>
1030
1031 * expr.c (build_java_arrayaccess): Rewrite to generate array
1032 access in canonical form.
1033 (expand_java_arraystore): Use build_fold_addr_expr() on address of
1034 array access.
1035
1036 2007-01-03 Andrew Haley <aph@redhat.com>
1037
1038 PR java/28754
1039 * expr.c (expand_java_field_op): If we're initializing a field's
1040 declaring interface we should not also initialize the class
1041 context in which it was referenced.
1042
1043 2007-01-02 Tom Tromey <tromey@redhat.com>
1044
1045 * java-tree.h (compiling_from_source, current_encoding,
1046 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1047 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1048 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1049 JTI_WFL_OPERATOR): Removed
1050 (finit_identifier_node, instinit_identifier_node,
1051 length_identifier_node, super_identifier_node,
1052 continue_identifier_node, access0_identifier_node, wfl_operator):
1053 Removed.
1054 (cyclic_inheritance_report,
1055 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1056 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1057 DECL_FIXED_CONSTRUCTOR_P): Removed.
1058 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1059 Removed.
1060 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1061 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1062 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1063 import_list, import_demand_list>: Removed.
1064 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1065 cxx_keyword_p): Removed.
1066 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1067 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1068 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1069 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1070 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1071 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1072 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1073 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1074 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1075 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1076 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1077 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1078 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1079 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1080 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1081 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1082 java_parse_abort_on_error, extract_field_decl): Removed.
1083 (finput): Declare.
1084 * lang.c: (compiling_from_source, current_encoding): Removed.
1085 (java_handle_option): Ignore -fencoding.
1086 * parse.h: Don't include lex.h.
1087 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1088 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1089 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1090 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1091 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1092 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1093 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1094 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1095 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1096 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1097 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1098 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1099 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1100 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1101 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1102 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1103 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1104 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1105 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1106 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1107 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1108 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1109 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1110 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1111 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1112 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1113 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1114 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1115 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1116 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1117 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1118 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1119 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1120 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1121 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1122 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1123 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1124 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1125 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1126 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1127 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1128 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1129 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1130 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1131 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1132 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1133 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1134 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1135 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1136 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1137 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1138 SET_CPC_STATIC_INITIALIZER_STMT,
1139 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1140 java_complete_class, java_check_circular_reference,
1141 java_fix_constructors, java_layout_classes, java_reorder_fields,
1142 java_method_add_stmt, java_get_line_col, reset_report,
1143 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1144 java_finish_classes, ctxp, ctxp_for_generation,
1145 ctxp_for_generation_last): Removed.
1146 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1147 * mangle.c (utf8_cmp): New function.
1148 (cxx_keywords): New global.
1149 (cxx_keyword_p): New function.
1150 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1151 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1152 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1153 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1154 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1155 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1156 * Make-lang.in (java.srcextra): Do nothing.
1157 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1158 (JAVA_OBJS): Don't mention deleted files.
1159 (java.mostlyclean): Likewise.
1160 (java.clean): Likewise.
1161 (JAVA_LEX_C): Removed.
1162 (buffer.o, check-init.o, parse.o): Remove unused targets.
1163 (typeck.o): Updated.
1164 * jcf-parse.c (read_class): Comment out unused code.
1165 (java_layout_seen_class_methods): New function.
1166 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1167 Removed.
1168 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
1169 (init_jcf_parse): Removed.
1170 * config-lang.in (gtfiles): Remove deleted files.
1171 * decl.c (java_init_decl_processing): Don't initialize
1172 finit_identifier_node, instinit_identifier_node,
1173 length_identifier_node, super_identifier_node,
1174 continue_identifier_node, access0_identifier_node. Don't call
1175 init_jcf_parse.
1176 * class.c (cyclic_inheritance_report): New global.
1177 (add_method_1): Don't use
1178 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1179 (maybe_layout_super_class): Comment out code.
1180 (safe_layout_class): New function.
1181 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1182 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1183 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1184 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1185 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1186 (java_gimplify_case_expr): Removed.
1187 (java_gimplify_default_expr): Likewise.
1188 (java_gimplify_new_array_init): Likewise.
1189 * parse.y: Removed.
1190 * keyword.gperf, keyword.h: Removed.
1191 * chartables.h: Removed.
1192 * check-init.c: Removed.
1193 * buffer.c, buffer.h: Removed.
1194 * convert.h: Removed.
1195 * gen-table.pl: Removed.
1196 * lex.c, lex.h: Removed.
1197
1198 2007-01-02 Andrew Haley <aph@redhat.com>
1199
1200 * expr.c (expand_java_arraystore): Make sure we perform a bounds
1201 check at runtime before we perform a type check.
1202
1203 2006-12-19 Andrew Haley <aph@redhat.com>
1204
1205 * decl.c: Bump minor BC ABI version.
1206
1207 2006-12-13 Gary Benson <gbenson@redhat.com>
1208
1209 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1210
1211 2006-12-12 Tom Tromey <tromey@redhat.com>
1212
1213 * lang-specs.h: Pass -M options to jc1.
1214 * jcf-depend.c (jcf_dependency_add_file): Don't emit
1215 dependencies.
1216
1217 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
1218
1219 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1220
1221 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
1222
1223 * lang-specs.h: Pass '%U'-based options as separate arguments.
1224
1225 2006-12-05 Tom Tromey <tromey@redhat.com>
1226
1227 PR java/29495:
1228 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1229 classes as well.
1230 * class.c (add_field): Handle ACC_SYNTHETIC.
1231 (add_method_1): Likewise. Handle bridge and varargs.
1232 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1233 annotation.
1234 (set_class_decl_access_flags): Handle synthetic and annotation.
1235 * java-tree.h (METHOD_BRIDGE): New macro.
1236 (METHOD_VARARGS): Likewise.
1237 (TYPE_SYNTHETIC): Likewise.
1238 (TYPE_ANNOTATION): Likewise.
1239 (lang_type): New fields 'synthetic' and 'annotation'.
1240 (lang_decl_func): New fields 'varargs' and 'bridge'.
1241
1242 2006-12-04 Andrew Haley <aph@redhat.com>
1243
1244 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
1245 there's no map.
1246
1247 2006-11-29 Gary Benson <gbenson@redhat.com>
1248
1249 * expr.c (rewrite_arglist_getcaller): Reorder.
1250
1251 2006-11-29 Andrew Haley <aph@redhat.com>
1252
1253 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
1254 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1255
1256 2006-11-23 Andrew Haley <aph@redhat.com>
1257
1258 * expr.c (rewrite_arglist_getcaller): New.
1259 (rewrite_arglist_getclass): Fix indentation.
1260 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
1261 gnu.classpath.VMStackWalker.getCallingClassLoader().
1262 * builtins.c (initialize_builtins): Remove duplicate def'n of
1263 __sync_synchronize.
1264 Add __builtin_return_address.
1265
1266 2006-11-22 Andrew Haley <aph@redhat.com>
1267
1268 * jcf-reader.c (get_attribute): Mark attr_type unused.
1269
1270 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1271
1272 2007-01-08 Richard Guenther <rguenther@suse.de>
1273
1274 * lex.c (do_java_lex): Use build_int_cst_wide_type.
1275 * jcf-parse.c (get_constant): Likewise.
1276
1277 2006-11-12 Jan Hubicka <jh@suse.cz>
1278
1279 * resource.c (compile_resource_data): Update for new varpool names.
1280 * java/class.c (build_utf8_ref): Likewise.
1281
1282 2006-11-12 David Daney <ddaney@avtrex.com>
1283
1284 PR java/29805
1285 * typeck.c (build_java_array_type): Increase buffer sizes.
1286
1287 2006-11-11 Richard Guenther <rguenther@suse.de>
1288
1289 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1290 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1291
1292 2006-11-06 Andrew Haley <aph@redhat.com>
1293
1294 * java-tree.h (CONSTANT_LazyFlag): New.
1295 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1296 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1297 reflection_data.
1298 (handle_constant): Return 0 for dummy cpool entries.
1299 Handle constants of kind Class.
1300 Handle constants of kind NameAndType.
1301 (handle_enclosingmethod_attribute): New.
1302 (handle_signature_attribute): New.
1303 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1304 (HANDLE_SIGNATURE_ATTRIBUTE): New.
1305 (handle_constant): Use unmangle_classname()rather than calling
1306 identifier_subst() directly.
1307
1308 2006-11-02 Andrew Haley <aph@redhat.com>
1309
1310 * java-tree.h (FIELD_ENUM): New.
1311 (lang_decl_var.field_enum): New.
1312 (lang_type.enum_class): New.
1313 (CLASS_ENUM): New.
1314 * class.c (set_class_decl_access_flags): Handle enum types.
1315 (add_field): Handle enum fields.
1316 (get_access_flags_from_decl): Likewise.
1317
1318 * class.c (make_class_data): Put reflection_data into rodata.
1319
1320 2006-11-01 Andrew Haley <aph@redhat.com>
1321
1322 * jcf-parse.c (field_offsets, bit_obstack): New variables.
1323 (jcf_parse): Write end marker to annotation_data.
1324 (java_parse_file): Create field_offsets bitmap. Destroy it.
1325 (annotation_grow, annotation_rewrite_byte)
1326 (annotation_rewrite_short, annotation_rewrite_int)
1327 (annotation_read_short, annotation_write_byte)
1328 (annotation_write_short, annotation_write_int)
1329 (handle_long_constant, handle_constant, handle_element_value)
1330 (handle_annotation, handle_annotations)
1331 (handle_annotation_attribute, rewrite_reflection_indexes)
1332 (handle_member_annotations, handle_parameter_annotations)
1333 (handle_default_annotation): New functions.
1334 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
1335 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
1336 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
1337 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
1338 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
1339 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
1340 (TYPE_REFLECTION_DATA): New.
1341 (TYPE_REFLECTION_DATASIZE): New.
1342 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
1343 an enum.
1344 * jcf-reader.c (get_attribute): Pass field/method index and
1345 attribute type to get_attribute().
1346 * constants.c (find_class_or_string_constant): Make nonstatic.
1347 (cpool_for_class): Likewise.
1348 (build_constants_constructor): Separate string and scalar types.
1349 * class.c (make_class_data): Generate field_indexes permutation.
1350 Pass it to rewrite_reflection_indexes().
1351 (make_class_data): Generate constructor for reflection_data field.
1352
1353 2006-10-20 Tom Tromey <tromey@redhat.com>
1354
1355 * gcj.texi (Top): Don't mention jv-scan.
1356 (Invoking gcj): Likewise.
1357 (Invoking gcjh): Likewise.
1358 (Invoking gjnih): Likewise.
1359 (Invoking gij): Likewise.
1360 (Invoking gcj-dbtool): Likewise.
1361 (Invoking jv-scan): Removed.
1362 * parse-scan.y: Removed.
1363 * jv-scan.c: Removed.
1364 * config-lang.in (stagestuff): Don't mention jv-scan.
1365 * Make-lang.in (java): Removed jv-scan.
1366 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1367 (JVSCAN_OBJS): Removed.
1368 (jv-scan$(exeext)): Likewise.
1369 (JAVA_MANFILES): Removed jv-scan.1.
1370 (java.uninstall): Don't mention jv-scan.
1371 (java.mostlyclean): Likewise.
1372 (java.maintainer-clean): Likewise.
1373 (.INTERMEDIATE): Likewise.
1374 (java/jv-scan.o): Removed.
1375 (jv-scan.pod): Likewise.
1376 (java.srcextra): Don't mention parse-scan.c.
1377 (java.mostlyclean): Likewise.
1378 (java/parse-scan.c): Removed.
1379 (java/parse-scan.o-warn): Removed.
1380 (java/parse-scan.o): Removed.
1381
1382 2006-10-20 Tom Tromey <tromey@redhat.com>
1383
1384 * lang.c (java_handle_option): Don't use
1385 jcf_write_base_directory.
1386 * jcf.h (jcf_write_base_directory): Removed.
1387 * parse.y (java_expand_classes): Don't call write_classfile.
1388 * config-lang.in (gtfiles): Removed jcf-write.c.
1389 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
1390 (java/jcf-write.o): Removed.
1391 * jcf-parse.c (parse_class_file): Don't call write_classfile.
1392 * java-tree.h (write_classfile): Removed declaration.
1393 * jcf-write.c: Removed.
1394
1395 2006-10-20 Tom Tromey <tromey@redhat.com>
1396
1397 * Make-lang.in (java): Removed gjnih, gcjh.
1398 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1399 (GCJH_OBJS): Removed.
1400 (GJNIH_OBJS): Likewise.
1401 (gjnih$(exeext)): Likewise.
1402 (gcjh$(exeext)): Likewise.
1403 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1404 (java.install-common): Don't special case gcjh.
1405 (java.uninstall): Don't mention gcjh, gjnih.
1406 (java.mostlyclean): Likewise.
1407 (java.maintainer-clean): Likewise.
1408 (.INTERMEDIATE): Likewise.
1409 (gcjh.pod): Removed.
1410 (gjnih.pod): Likewise.
1411 (GCJH_TARGET_INSTALL_NAME): Removed.
1412 (java/gjavah-jni.o): Removed.
1413 (java/gjavah.o): Likewise.
1414 * config-lang.in (stagestuff): Removed gjnih, gcjh.
1415 * gjavah.c: Removed.
1416
1417 2006-10-17 Tom Tromey <tromey@redhat.com>
1418
1419 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1420 "string" case.
1421
1422 2006-10-17 Tom Tromey <tromey@redhat.com>
1423
1424 * jvgenmain.c (main): Handle -findirect-dispatch.
1425 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1426 jvgenmain.
1427
1428 2006-10-06 Andrew Haley <aph@redhat.com>
1429
1430 * builtins.c (compareAndSwapInt_builtin): Check that we really do
1431 have a compare_and_swap builtin.
1432 (compareAndSwapLong_builtin): Likewise.
1433 (compareAndSwapObject_builtin): Likewise.
1434
1435 2006-10-04 Andrew Haley <aph@redhat.com>
1436
1437 * builtins.c (java_builtins): Add compareAndSwapInt,
1438 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1439 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1440 putObjectVolatile, getObjectVolatile, getIntVolatile,
1441 getLongVolatile, getLong.
1442 (UNMARSHAL3): New macro.
1443 (UNMARSHAL4): Likewise.
1444 (UNMARSHAL5): Likewise.
1445 (build_arglist_for_builtin): New function.
1446 (build_addr_sum, build_check_this): New functions.
1447 (putObject_builtin. compareAndSwapInt_builtin,
1448 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1449 putVolatile_builtin, getVolatile_builtin): New builtins.
1450
1451 2006-06-08 Andrew Haley <aph@redhat.com>
1452
1453 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1454 get_symbol_table_index().
1455 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1456 private method.
1457 (build_known_method_ref): New arg: special. Pass it to
1458 get_symbol_table_index.
1459 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1460 the method list.
1461 (build_invokevirtual): New arg: special. Pass it to
1462 get_symbol_table_index.
1463 (expand_invoke): New variable: special.
1464 Pass it to maybe_rewrite_invocation().
1465 Pass it to build_known_method_ref().
1466 * class.c (build_symbol_entry): Add new arg: special. Use it to
1467 build the symbol table conbstructor.
1468 (emit_symbol_table): Extract SPECIAL from the method list and pass
1469 it to build_symbol_entry().
1470 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1471 special accordingly.
1472
1473 2006-09-08 Andrew Haley <aph@redhat.com>
1474
1475 * class.c (layout_class_method): Use build_java_signature, not
1476 build_java_argument_signature. Use lookup_java_method, not
1477 lookup_argument_method.
1478
1479 2006-08-16 Jakub Jelinek <jakub@redhat.com>
1480 Bryce McKinlay <bryce@mckinlay.net.nz>
1481
1482 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1483
1484 2006-07-18 Tom Tromey <tromey@redhat.com>
1485
1486 * lang.opt: Added missing -W options.
1487
1488 2006-07-12 Tom Tromey <tromey@redhat.com>
1489
1490 PR java/28329:
1491 * lang-specs.h: Pass '%U'-based options as separate arguments.
1492 Use -faux-classpath.
1493 * lang.c (java_handle_option): Handle OPT_faux_classpath.
1494 * lang.opt (faux-classpath): New option.
1495
1496 2006-07-07 Tom Tromey <tromey@redhat.com>
1497
1498 * class.c (make_class_data): Set value for reflection_data field.
1499 * decl.c (java_init_decl_processing): Add reflection_data field.
1500
1501 2006-07-07 Tom Tromey <tromey@redhat.com>
1502
1503 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
1504 earlier.
1505 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1506
1507 2006-07-07 Andrew Haley <aph@redhat.com>
1508
1509 * jcf-parse.c (set_source_filename): Don't check for
1510 CLASS_FROM_CURRENTLY_COMPILED_P.
1511 Remove // comments.
1512
1513 2006-07-07 Andrew Haley <aph@redhat.com>
1514
1515 * java-tree.h (java_read_sourcefilenames): Declare.
1516 * lang.c (java_handle_option): Call java_read_sourcefilenames().
1517 * lang.opt (fsource-filename): New opt.
1518 * lang-specs.h: Add -fsource-filename.
1519 * jcf-parse.c (num_files, filenames): New variables.
1520 (reverse, cmpstringp, java_read_sourcefilenames,
1521 find_sourcefile): New.
1522 (set_source_filename): Call find_sourcefile to find the real name
1523 of a source file.
1524
1525 2006-06-27 Tom Tromey <tromey@redhat.com>
1526
1527 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1528 Signature, LocalVariableTypeTable, annotation attributes.
1529 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1530 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1531 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1532 (HANDLE_METHOD): Likewise.
1533 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1534 (print_annotation): New function.
1535 (print_element_value): Likewise.
1536 (indent): Likewise.
1537 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1538 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1539 (print_parameter_annotations): New function.
1540 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1541 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1542 Likewise.
1543 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1544 (print_annotations): New function.
1545
1546 2006-06-23 Tom Tromey <tromey@redhat.com>
1547
1548 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
1549 emitting class files, always use 1.5.
1550 * gcj.texi (Input Options): Document -fsource.
1551 (Code Generation): Document -ftarget.
1552
1553 2006-06-21 Tom Tromey <tromey@redhat.com>
1554
1555 PR java/28089:
1556 * expr.c (expand_java_field_op): Initialize field's declaring
1557 class.
1558
1559 2006-06-20 Tom Tromey <tromey@redhat.com>
1560
1561 * expr.c (push_value): Always flush quick stack.
1562
1563 2006-06-19 Tom Tromey <tromey@redhat.com>
1564
1565 * expr.c (push_value): Also flush quick stack if value is a
1566 component_ref.
1567
1568 2006-06-19 Tom Tromey <tromey@redhat.com>
1569
1570 * expr.c (push_value): Flush quick stack if value has side
1571 effects.
1572
1573 2006-06-13 Tom Tromey <tromey@redhat.com>
1574
1575 * class.c (is_compiled_class): Explicitly check for current
1576 class.
1577
1578 2006-06-09 Tom Tromey <tromey@redhat.com>
1579
1580 * gjavah.c (decompile_method): Don't decompile a static field
1581 accessor method.
1582
1583 2006-06-06 Tom Tromey <tromey@redhat.com>
1584
1585 * lang-specs.h <jc1>: Add .jar file to command line if
1586 -fsaw-java-file. Also, remove -ffilelist-file in this case.
1587
1588 2006-06-05 Tom Tromey <tromey@redhat.com>
1589
1590 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1591 synthetic, enum, annotation.
1592 * jcf.h (ACC_BRIDGE): New macro.
1593 (ACC_VARARGS): Likewise.
1594 (ACC_SYNTHETIC): Likewise.
1595 (ACC_ENUM): Likewise.
1596 (ACC_ANNOTATION): Likewise.
1597
1598 2006-06-04 Tom Tromey <tromey@redhat.com>
1599
1600 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1601 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1602 and -ftarget.
1603 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
1604 when needed. Handle classpath-setting.
1605 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1606 * lang-specs.h: Rewrote.
1607
1608 2006-06-04 Tom Tromey <tromey@redhat.com>
1609
1610 * jcf-io.c (find_class): Set source_ok to 0.
1611 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1612 (parse_class_file): Don't call java_mark_class_local.
1613 (java_parse_file): Skip .java files. Call java_mark_class_local
1614 before lowering any code.
1615 (parse_zip_file_entries): Don't call duplicate_class_warning
1616 here.
1617 (process_zip_dir): ... call it here.
1618 * class.c (add_field): Don't mark field external if it is being
1619 compiled into this object.
1620 (make_class_data): Handle situation where class_dtable_decl is
1621 created before Class is compiled.
1622 (is_compiled_class): Don't assume files in zip are compiled into
1623 this object.
1624 (layout_class_method): Don't mark method external if it is being
1625 compiled into this object.
1626
1627 2006-06-04 Tom Tromey <tromey@redhat.com>
1628
1629 * jcf-path.c (jcf_path_compute): New function.
1630 * jcf.h (jcf_path_compute): Declare.
1631
1632 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1633
1634 * decl.c: Include langhooks.h.
1635 (builtin_function): Remove.
1636 (java_init_decl_processing): Replace calls to builtin_function
1637 with add_builtin_function.
1638 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1639 (java/decl.o): Depend on langhooks.h.
1640 * java-tree.h (builtin_function): Remove.
1641
1642 2006-10-10 Brooks Moses <bmoses@stanford.edu>
1643
1644 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1645
1646 2006-09-12 Tom Tromey <tromey@redhat.com>
1647
1648 * expr.c (push_value): Always flush quick stack.
1649
1650 2006-09-12 Tom Tromey <tromey@redhat.com>
1651
1652 PR java/29013:
1653 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1654 the push of the called method's return result.
1655
1656 2006-09-12 Tom Tromey <tromey@redhat.com>
1657
1658 * jvspec.c (lang_specific_driver): Read spec file even if
1659 -fsyntax-only.
1660
1661 2006-09-12 Tom Tromey <tromey@redhat.com>
1662
1663 PR java/28754:
1664 * expr.c (expand_java_field_op): Initialize field's declaring
1665 interface if necessary.
1666
1667 2006-09-12 Tom Tromey <tromey@redhat.com>
1668
1669 PR java/28892:
1670 * expr.c (expand_java_field_op): No error for assignments not in
1671 class initializer or constructor.
1672
1673 2006-08-22 Andrew Haley <aph@redhat.com>
1674
1675 * decl.c (java_add_stmt): Give the statement list a type.
1676
1677 2006-08-16 Jakub Jelinek <jakub@redhat.com>
1678 Bryce McKinlay <bryce@mckinlay.net.nz>
1679
1680 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1681
1682 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
1683
1684 PR java/8923
1685 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1686 or '--' is used with a constant operand.
1687 (java_complete_lhs): When processing a '++' or '--' expression,
1688 don't call java_complete_tree but java_complete_lhs, so that a
1689 static final variable operand is never replaced by its value. This
1690 avoids an ICE later on.
1691 (patch_unaryop): Fixed typo in comment.
1692
1693 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1694
1695 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1696
1697 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
1698
1699 * builtins.c (check_for_builtin): If a builtin could result in a
1700 direct call being generated, don't use it if flag_indirect_dispatch
1701 is set.
1702
1703 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
1704
1705 * gcj.texi (Invocation): Corrections for Invocation API example.
1706
1707 2006-07-04 Andrew Haley <aph@redhat.com>
1708
1709 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1710 entry.
1711
1712 2006-06-21 Andrew Haley <aph@redhat.com>
1713
1714 * java-tree.h (update_aliases): Remove
1715 * expr.c (expand_iinc): Remove call to update_aliases().
1716 (STORE_INTERNAL): Likewise.
1717 * decl.c (update_aliases, initialize_local_variable)
1718 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1719
1720 2006-06-19 Andrew Haley <aph@redhat.com>
1721
1722 PR java/1305
1723 PR java/27908
1724 * expr.c (java_modify_addr_for_volatile): New function.
1725 (expand_java_field_op): Handle volatile fields.
1726 * java-gimplify.c (java_gimplify_component_ref): Call
1727 java_modify_addr_for_volatile to give the field_ref the correct
1728 volatile type.
1729 (java_gimplify_modify_expr): Likewise.
1730 * java-tree.h (java_modify_addr_for_volatile): New decl.
1731
1732 2006-06-17 Karl Berry <karl@gnu.org>
1733
1734 * gcj.texi (@dircategory): Use "Software development" instead
1735 of "Programming", following the Free Software Directory.
1736
1737 2006-06-16 Andrew Haley <aph@redhat.com>
1738
1739 * class.c (make_class_data): When using flag_indirect_classes,
1740 don't initialize the vtable of Class instances.
1741
1742 2006-06-09 Andrew Haley <aph@redhat.com>
1743
1744 PR java/1305
1745 PR java/27908
1746 * builtins.c (initialize_builtins): Add __sync_synchronize().
1747 * class.c (add_field): Mark volatile fields.
1748 * java-gimplify.c (java_gimplify_expr): Call new functions to
1749 handle self-modifying exprs and COMPONENT_REFs.
1750 (java_gimplify_component_ref): New.
1751 (java_gimplify_modify_expr): Add handling for volatiles.
1752
1753 2006-06-08 Tom Tromey <tromey@redhat.com>
1754
1755 * gcj.texi (libgcj Runtime Properties): Document
1756 gnu.gcj.user.realname.
1757
1758 2006-06-08 Andrew Haley <aph@redhat.com>
1759
1760 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1761 get_symbol_table_index().
1762 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1763 private method.
1764 (build_known_method_ref): New arg: special. Pass it to
1765 get_symbol_table_index.
1766 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1767 the method list.
1768 (build_invokevirtual): New arg: special. Pass it to
1769 get_symbol_table_index.
1770 (expand_invoke): New variable: special.
1771 Pass it to maybe_rewrite_invocation().
1772 Pass it to build_known_method_ref().
1773 * class.c (build_symbol_entry): Add new arg: special. Use it to
1774 build the symbol table conbstructor.
1775 (emit_symbol_table): Extract SPECIAL from the method list and pass
1776 it to build_symbol_entry().
1777 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1778 special accordingly.
1779
1780 2006-06-06 David Daney <ddaney@avtrex.com>
1781
1782 * gcj.texi (libgcj Runtime Properties): Document
1783 gnu.gcj.runtime.NameFinder.show_raw and
1784 gnu.gcj.runtime.NameFinder.remove_unknown.
1785
1786 2006-06-06 Tom Tromey <tromey@redhat.com>
1787
1788 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1789 synthetic, enum, annotation.
1790 * jcf.h (ACC_BRIDGE): New macro.
1791 (ACC_VARARGS): Likewise.
1792 (ACC_SYNTHETIC): Likewise.
1793 (ACC_ENUM): Likewise.
1794 (ACC_ANNOTATION): Likewise.
1795
1796 2006-06-06 Mike Stump <mrs@apple.com>
1797
1798 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1799 installing during build.
1800
1801 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
1802
1803 * gcj.texi (Extensions): Document the new gcj-dbtool-based
1804 classname-to-library resolution mechanism.
1805 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1806 mechanism deprecated.
1807 (libgcj Runtime Properties): Document
1808 gnu.gcj.runtime.VMClassLoader.library_control's new default.
1809
1810 2006-05-29 Jakub Jelinek <jakub@redhat.com>
1811
1812 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1813 bit wide type.
1814 (jword): Define to uint64 on 64-bit arches.
1815 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1816
1817 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1818
1819 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1820 typos.
1821
1822 2006-05-26 Tom Tromey <tromey@redhat.com>
1823
1824 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1825 * verify-glue.c (vfy_class_type): New function.
1826 * verify-impl.c (check_constant): Allow 'ldc class'.
1827 * verify.h (vfy_class_type): Declare.
1828
1829 2006-05-25 Andrew Haley <aph@redhat.com>
1830
1831 PR java/27756
1832 * decl.c (maybe_pushlevels): When variable ranges are non-nested
1833 update all lifetimes, not just the first one.
1834
1835 2006-05-24 Tom Tromey <tromey@redhat.com>
1836
1837 * java-tree.h: Fixed flag documentation.
1838
1839 2006-05-24 Tom Tromey <tromey@redhat.com>
1840
1841 PR libgcj/27729:
1842 * jcf.h (ACC_INVISIBLE): Changed value.
1843
1844 2006-05-24 Andrew Haley <aph@redhat.com>
1845
1846 PR java/27754
1847 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1848 COMPOUND_EXPR.
1849
1850 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1851
1852 * lang.opt (femit-class-file): Remove VarExists.
1853
1854 2006-05-16 Tom Tromey <tromey@redhat.com>
1855
1856 * verify-impl.c (verify_instructions_0) <op_return>: Special case
1857 for Object.<init>.
1858
1859 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1860
1861 PR driver/26885
1862 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1863 $(GCC_OBJS).
1864
1865 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1866
1867 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1868 (java/expr.o): Replace target.h with $(TARGET_H).
1869 (java/parse.o): Likewise.
1870
1871 2006-05-10 Andrew Haley <aph@redhat.com>
1872
1873 * class.c (emit_indirect_register_classes): Fix comment.
1874
1875 2006-05-04 Tom Tromey <tromey@redhat.com>
1876
1877 * java-tree.h (uses_jv_markobj_p): Declare.
1878 * class.c (uses_jv_markobj_p): Removed.
1879 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1880 (get_boehm_type_descriptor): Use it.
1881 (uses_jv_markobj_p): Moved from class.c. Return bool.
1882
1883 2006-05-04 Tom Tromey <tromey@redhat.com>
1884
1885 * java-tree.def (THIS_EXPR): Now a tcc_expression.
1886
1887 2006-05-04 Andrew Haley <aph@redhat.com>
1888
1889 * class.c (make_field_value): Always build_address_of fdecl if
1890 there is an initializer.
1891
1892 2006-05-03 Andrew Haley <aph@redhat.com>
1893
1894 PR libgcj/27352
1895 * expr.c (maybe_rewrite_invocation): New function.
1896 (rewrite_arglist_getclass): Likewise.
1897 (rules): New.
1898 (expand_invoke): Call maybe_rewrite_invocation.
1899 * parse.y (patch_invoke): Likewise.
1900 * java-tree.h: (maybe_rewrite_invocation): New function.
1901
1902 2006-04-21 Andrew Haley <aph@redhat.com>
1903
1904 * lang.c (java_init): Handle flag_indirect_classes.
1905 * jvgenmain.c: Use "class$$" instead of "class$".
1906 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1907 DECLs.
1908 (mangle_class_field): Special case "class$$" as well as "class$".
1909 * constants.c (build_ref_from_constant_pool): If
1910 flag_indirect_classes, generate a ref into the heap.
1911 * decl.c (constants_field_decl_node,
1912 constants_data_field_decl_node): New.
1913 * class.c (build_static_class_ref): New.
1914 (build_classdollar_field): Factor out from build_class_ref().
1915 (make_field_value): Handle static fields in heap.
1916 (make_class_data): Make sure we get a static ref to class.
1917 Make class initializer const if flag_indirect_classes.
1918 (register_class): Build a class_ref for initialization if
1919 flag_indirect_classes.
1920 (emit_indirect_register_classes): New.
1921
1922 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
1923
1924 * expr.c, gjavah.c: Fix comment typos.
1925
1926 2006-04-03 Andrew Haley <aph@redhat.com>
1927
1928 PR java/26858
1929 * expr.c (build_field_ref): Don't check the field offset if
1930 flag_syntax_only.
1931
1932 2006-03-30 Andrew Haley <aph@redhat.com>
1933
1934 PR java/26858
1935 * lang.c (java_attribute_table): New.
1936 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1937 * expr.c (build_field_ref): Add a null pointer check for all
1938 fields of offset > 4k. Don't do so for accesses via the this
1939 pointer, which we know can never be null.
1940 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1941 methods nonnull.
1942
1943 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
1944
1945 * Make-lang.in: Rename docdir to gcc_docdir.
1946
1947 2006-03-30 Tom Tromey <tromey@redhat.com>
1948
1949 PR java/26042:
1950 * parse.y (java_reorder_fields): Reset superclass field's size as
1951 well.
1952
1953 2006-03-28 Tom Tromey <tromey@redhat.com>
1954
1955 PR java/26390:
1956 * parse.y (find_most_specific_methods_list): Added 'class'
1957 argument.
1958 (lookup_method_invoke): Updated.
1959
1960 2006-03-15 Tom Tromey <tromey@redhat.com>
1961
1962 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1963 non-static method calls.
1964
1965 2006-03-15 David Daney <ddaney@avtrex.com>
1966
1967 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1968 declaration.
1969
1970 2006-03-15 David Daney <ddaney@avtrex.com>
1971
1972 * lang.opt (-freduced-reflection): New option.
1973 * lang.c (java_post_options): Generate an error if
1974 -freduced-reflection used with -fjni or -findirect-dispatch.
1975 * java-tree.h (flag_reduced_reflection): Declare new variable.
1976 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1977 if bitmap overflows and flag_reduced_reflection set.
1978 * class.c (uses_jv_markobj_p): New function.
1979 (make_class_data): Moved generation of vtable to before
1980 reflection data, generate less reflection data if
1981 flag_reduced_reflection set.
1982 * gcj.texi: Document -freduced-reflection.
1983
1984 2006-03-15 Tom Tromey <tromey@redhat.com>
1985
1986 PR java/26638:
1987 * class.c (get_interface_method_index): Don't put <clinit> into
1988 interface table.
1989
1990 2006-03-15 Tom Tromey <tromey@redhat.com>
1991
1992 * parse.y (analyze_clinit_body): Ignore empty statements.
1993
1994 2006-03-08 David Daney <ddaney@avtrex.com>
1995
1996 * gcj.texi: Document -static-libgcj option.
1997
1998 2006-02-20 Andrew Haley <aph@redhat.com>
1999
2000 * jcf-parse.c (parse_class_file): Set input_location from
2001 current_class.
2002
2003 2006-02-15 Andrew Haley <aph@redhat.com>
2004
2005 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2006 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2007 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2008
2009 2006-02-09 Andrew Haley <aph@redhat.com>
2010
2011 PR java/26192
2012 * expr.c (expand_invoke): Allow methods in arrays to be resolved
2013 in their superclass.
2014
2015 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2016 array types.
2017
2018 2006-02-08 Tom Tromey <tromey@redhat.com>
2019
2020 PR java/22578:
2021 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2022 * builtins.c (convert_real): New function.
2023 (java_builtins): Handle Float.intBitsToFloat,
2024 Float.floatToRawIntBits, Double.longBitsToDouble,
2025 Double.doubleToRawLongBits.
2026
2027 2006-02-07 Andrew Haley <aph@redhat.com>
2028
2029 * expr.c (expand_invoke): (BC mode.) If we find a method in a
2030 class other than the one in which we expected to find it, ignore
2031 the result.
2032
2033 PR java/25535
2034 * constants.c (build_constants_constructor): move initializer into
2035 first halfword on a 64-bit big-endian machine.
2036
2037 2006-02-04 Tom Tromey <tromey@redhat.com>
2038
2039 PR java/25676:
2040 * builtins.c (max_builtin): Skip floating point 'max'.
2041 (min_builtin): Skip floating point 'min'.
2042 (check_for_builtin): Never return NULL_TREE.
2043
2044 2006-02-04 Tom Tromey <tromey@redhat.com>
2045
2046 PR java/26097:
2047 * expr.c (push_type): Avoid side effect in gcc_assert.
2048
2049 2006-02-04 Roger Sayle <roger@eyesopen.com>
2050
2051 * decl.c (java_init_decl_processing): Create char_type_node as a
2052 regular INTEGER_TYPE node.
2053 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2054 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2055 test for char_type_node and promoted_char_type_node as special
2056 instances of INTEGER_TYPE tree codes.
2057 (promote_type,build_java_signature): Likewise.
2058 * jcf-write.c (adjust_typed_op): Likewise.
2059 * mangle.c (mangle_type): Likewise.
2060 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2061 * parse.h (JINTEGRAL_TYPE_P): Likewise.
2062
2063 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
2064
2065 * expr.c (java_stack_swap): Revert gcc_assert patch.
2066
2067 2006-02-03 Ben Elliston <bje@au.ibm.com>
2068
2069 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2070 * typeck.c: Likewise.
2071 * verify-impl.c: Likewise.
2072 * class.c: Likewise.
2073 * decl.c: Likewise.
2074 * jcf-parse.c: Likewise.
2075 * constants.c: Likewise.
2076 * check-init.c: Likewise.
2077 * jcf-write.c: Likewise.
2078 * verify-glue.c: Likewise.
2079 * mangle.c: Likewise.
2080 * expr.c: Likewise.
2081 * lang.c: Likewise.
2082 * boehm.c: Likewise.
2083
2084 2006-02-01 Jan Hubicka <jh@suse.cz>
2085
2086 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2087 * lang.c (java_init_options): Set no_unit_at_a_time_default.
2088
2089 2006-01-30 Andrew Haley <aph@redhat.com>
2090
2091 PR java/21428
2092 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2093
2094 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
2095
2096 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2097 Update copyright notice dates.
2098
2099 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2100
2101 * jvspec.c (lang_specific_spec_functions): Remove.
2102
2103 2006-01-06 Tom Tromey <tromey@redhat.com>
2104
2105 * gcj.texi (Arrays): Added more documentation for
2106 JvNewObjectArray.
2107 (Primitive types): Correct information about primitive classes.
2108 (Reference types): New node.
2109 (Index): New node.
2110
2111 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
2112
2113 * jcf-parse.c (set_source_filename): Set the decl source location
2114 even when returning early.
2115
2116 2005-12-15 Tom Tromey <tromey@redhat.com>
2117 Andrew Haley <aph@redhat.com>
2118
2119 PR java/25429
2120 * parse.y (resolve_expression_name): Don't generate accessor
2121 methods for constant fields.
2122
2123 2005-12-13 Andrew Haley <aph@redhat.com>
2124
2125 PR java/25366
2126 PR java/25368
2127 * class.c (maybe_layout_super_class): Update current_class before
2128 calling do_resolve_class.
2129
2130 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
2131
2132 PR java/25330
2133 * jcf-write.c (write_classfile): Use PID in temporary class
2134 file. Save/restore errno when reporting error.
2135
2136 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
2137
2138 PR java/9861
2139 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2140 to bare_function_type and including the return type
2141 * builtins.c (initialize_builtins) : Change builtin mangled name
2142 constants to conform to new mangling scheme
2143
2144 2005-12-08 Andrew Haley <aph@redhat.com>
2145
2146 PR libgcj/25265
2147 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2148 (soft_abstractmethod_node): New.
2149 * expr.c (build_field_ref): Add in-line check for missing field.
2150 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2151
2152 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2153
2154 * Make-lang.in (java.all.build, java.install-normal): Remove.
2155
2156 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2157
2158 * Make-lang.in: Remove all dependencies on s-gtype, except for
2159 gt-java-parse.h.
2160
2161 2005-12-07 Richard Sandiford <richard@codesourcery.com>
2162
2163 * class.c (build_utf8_ref, emit_register_classes): Use
2164 switch_to_section and get_section.
2165
2166 2005-12-06 Tom Tromey <tromey@redhat.com>
2167
2168 PR java/25283:
2169 * parse.y (patch_new_array_init): Revert previous patch.
2170 (lookup_method_invoke): Use size-less array type when creating an
2171 anonymous constructor.
2172
2173 2005-12-05 Tom Tromey <tromey@redhat.com>
2174
2175 * parse.y (patch_new_array_init): Don't set length on array.
2176
2177 2005-12-02 Richard Guenther <rguenther@suse.de>
2178
2179 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2180 buildN instead of build.
2181 * class.c (finish_class): Likewise.
2182 * expr.c (java_create_object): Likewise.
2183
2184 2005-11-28 Tom Tromey <tromey@redhat.com>
2185
2186 PR java/18278:
2187 * expr.c (build_jni_stub): Unwrap the return value.
2188 * java-tree.h (soft_unwrapjni_node): New define.
2189 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2190 * decl.c (java_init_decl_processing): Initialize
2191 soft_unwrapjni_node.
2192
2193 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
2194
2195 * gcj.texi (gij options): Add -Xss documentation.
2196
2197 2005-11-08 Wil Mahan <wmahan@gmail.com>
2198
2199 PR java/23617
2200 * zextract.c (read_zip_archive): Fix out of memory error when
2201 reading jar files with zip-style comments.
2202
2203 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
2204
2205 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2206 formats.
2207 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2208
2209 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
2210 Wil Mahan <wmahan@gmail.com>
2211
2212 PR java/23620
2213 * class.c (make_class): Create empty binfo here.
2214 (set_super_info): Only create binfo if we have superclasses.
2215
2216 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
2217
2218 PR java/24127
2219 * parse.y (method_header): Make the result of the rule a NULL_TREE
2220 when a parsing error occurs.
2221
2222 2005-09-29 Tom Tromey <tromey@redhat.com>
2223
2224 PR java/24120:
2225 * jcf-io.c (memoized_dirlist_hash): New function.
2226 (caching_stat): Use it.
2227
2228 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
2229
2230 PR java/21418
2231 * class.c (inherits_from_p): Try to lay out super class
2232 if it is not already laid out.
2233 (maybe_layout_super_class): Handle the case where SUPER_CLASS
2234 is a NULL_TREE.
2235
2236 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
2237
2238 * builtins.c (max_builtin, min_builtin, abs_builtin,
2239 java_build_function_call_expr): Use fold_buildN.
2240 * class.c (layout_class_method): Likewise.
2241 * expr.c (java_truthvalue_conversion, build_java_jsr,
2242 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2243 build_java_binop, build_field_ref, expand_compare,
2244 build_known_method_ref, build_invokevirtual,
2245 process_jvm_instruction): Likewise.
2246 * parse.y (patch_binop, patch_exit_expr): Likewise.
2247 * typeck.c (convert_ieee_real_to_integer): Likewise.
2248 (convert): Don't call fold after convert_ieee_real_to_integer.
2249
2250 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
2251
2252 PR java/23891
2253 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
2254 the newly created type. Set import lists here, not in create_class.
2255 (jdep_resolve_class): Set current_class.
2256 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
2257 the current package context, not ctxp->package.
2258 (cicp_cache): Removed.
2259 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2260 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2261 * java-tree.h (TYPE_PACKAGE): New macro.
2262 (struct lang_type): New member 'package'.
2263
2264 2005-09-09 Andrew Haley <aph@redhat.com>
2265
2266 PR libgcj/23182
2267 * expr.c (pop_type_0): If the expected type is object or ptr
2268 (i.e. void*), return the type of the object we just popped from
2269 the stack.
2270
2271 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
2272
2273 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2274 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2275
2276 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
2277
2278 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2279 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2280 typos. Follow spelling conventions.
2281
2282 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
2283
2284 PR java/23431
2285 * typeck.c (lookup_do): Look up interfaces for the original class,
2286 not the base class.
2287 * parse.y (java_check_regular_methods): Fix diagnostic message for
2288 more restrictive overriding of a method from an interface.
2289
2290 2005-08-16 Tom Tromey <tromey@redhat.com>
2291
2292 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2293 class' initial state.
2294
2295 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
2296
2297 PR java/22113
2298 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2299 `literal_token' for large numeric input tokens.
2300
2301 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
2302
2303 PR java/19870
2304 * parse.y (nested_field_access_p): Rename to nested_member_access_p
2305 and expand to handle method accesses across nested classes.
2306 (build_outer_method_access_method): Rename to
2307 build_nested_method_access_method. Minor adjustments to comments.
2308 (resolve_expression_name): Use the newly-renamed
2309 nested_member_access_p method.
2310 (resolve_qualified_expression_name): Likewise.
2311 (patch_method_invocation): Also consider static methods for access
2312 method generation. Minor adjustments to comments.
2313 (maybe_use_access_method): Use the more general
2314 nested_memeber_access_p to determine access across nested class
2315 boundaries. Allow THIS_ARG to be NULL (for static methods).
2316
2317 2005-08-15 Tom Tromey <tromey@redhat.com>
2318
2319 PR java/23300.
2320 * expr.c (build_field_ref): Don't generate otable reference when
2321 DECL_FIELD_OFFSET is 0.
2322 * class.c (maybe_layout_super_class): Pass outer class to
2323 do_resolve_class.
2324
2325 2005-08-15 Tom Tromey <tromey@redhat.com>
2326
2327 * java-tree.h (LABEL_IN_SUBR): Removed.
2328 (LABEL_IN_SUBR): Likewise.
2329 (LABEL_IS_SUBR_START): Likewise.
2330 (LABEL_SUBR_START): Likewise.
2331 (LABEL_SUBR_CONTEXT): Likewise.
2332 (LABEL_CHANGED): Likewise.
2333 (LABEL_RETURN_LABEL): Likewise.
2334 (LABEL_RETURN_TYPE_STATE): Likewise.
2335 (LABEL_RETURN_LABELS): Likewise.
2336 (RETURN_MAP_ADJUSTED): Likewise.
2337 (LABEL_PENDING_CHAIN): Likewise.
2338
2339 2005-08-15 Tom Tromey <tromey@redhat.com>
2340
2341 * Make-lang.in (JAVA_OBJS): Removed verify.o
2342 (java/verify.o): Removed.
2343 * verify.c: Removed.
2344 * lang.c (flag_new_verifier): Removed.
2345 (java_post_options): Updated.
2346 * java-tree.h (flag_new_verifier): Removed.
2347 (verify_jvm_instructions): Removed.
2348 * expr.c (pop_type_0): Assume flag_new_verifier is true.
2349 (build_java_check_indexed_type): Likewise.
2350 (expand_java_arraystore): Likewise.
2351 (expand_java_arrayload): Likewise.
2352 (pop_arguments): Likewise.
2353 (expand_byte_code): Likewise.
2354 (process_jvm_instruction): Likewise.
2355
2356 2005-08-10 Andrew Haley <aph@redhat.com>
2357
2358 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
2359 type mismatches to make legal GIMPLE.
2360
2361 2005-08-10 Robin Green <greenrd@greenrd.org>
2362
2363 PR java/23230:
2364 * parse.y (maybe_use_access_method): Generalize check from
2365 java.lang.Object to any superclass of current_class
2366
2367 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
2368
2369 * class.c (build_class_ref): Wrap the primary class type in a
2370 NOP_EXPR.
2371 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
2372 primary class type from the NOP_EXPR in which it was placed.
2373
2374 2005-07-28 Diego Novillo <dnovillo@redhat.com>
2375
2376 * expr.c (expand_load_internal): Fix missing parens in
2377 predicate.
2378
2379 2005-07-28 Andrew Haley <aph@redhat.com>
2380
2381 * expr.c (expand_load_internal): Convert to destination type.
2382
2383 2005-07-22 Manfred Hollstein <mh@suse.com>
2384
2385 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
2386 (check_constant): Likewise.
2387 (check_wide_constant): Likewise.
2388
2389 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
2390
2391 Make CONSTRUCTOR use VEC to store initializers.
2392 * check-init.c (check_init): Update to cope with VEC in
2393 CONSTRUCTOR_ELTS.
2394 * class.c (make_field_value, make_method_value, get_dispatch_table,
2395 make_class_data, emit_symbol_table, emit_catch_table,
2396 emit_assertion_table): Use build_constructor_from_list instead of
2397 build_constructor.
2398 * constants.c (build_constants_constructor): Likewise.
2399 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2400 VEC in CONSTRUCTOR_ELTS.
2401 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2402 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2403 of a TREE_LIST.
2404 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2405 CONSTRUCTOR_ELTS.
2406 * parse.y (build_new_array_init): Use build_constructor_from_list
2407 instead of build_constructor.
2408 (patch_new_array_init): Update to cope with VEC in
2409 CONSTRUCTOR_ELTS.
2410 (array_constructor_check_entry): Likewise.
2411
2412 2005-07-12 Tom Tromey <tromey@redhat.com>
2413
2414 * jvspec.c (lang_specific_driver): Put filelist_filename first on
2415 command line.
2416
2417 2005-07-12 Tom Tromey <tromey@redhat.com>
2418
2419 PR java/19674:
2420 * parse-scan.y (interface_member_declaration): Added
2421 empty_statement.
2422
2423 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
2424
2425 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2426 (LABEL_PENDING_CHAIN): Ditto.
2427 (LABEL_PC): Ditto.
2428 (DECL_BIT_INDEX): Ditto.
2429
2430 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
2431
2432 PR java/18119
2433 * parse.y (inner_class_accessible): New function. Logic moved from
2434 check_inner_class_access.
2435 (check_inner_class_access): Use inner_class_accessible.
2436 (resolve_inner_class): Simplify arguments. Create circularity hash
2437 here. Keep looking for classes if we found one that was inaccessible.
2438 Return the inaccessible class only if there is no other match.
2439 (do_resolve_class): Update for new resolve_inner_class arguments.
2440 Don't create circularity_hash here.
2441
2442 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
2443
2444 PR java/21045
2445 * parse.y (add_exception_to_throws): New function.
2446 (purge_unchecked_exceptions): Removed.
2447 (get_constructor_super): Renamed from verify_constructor_super. Now
2448 returns the super constructor after verification.
2449 (java_complete_expand_method): Don't use purge_unchecked_exceptions
2450 or save/restore the exception list.
2451 (check_thrown_exceptions): Add uncaught exceptions in anonymous
2452 class initializers and constructors to the throws clause of the method.
2453
2454 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
2455
2456 PR java/19674
2457 * parse.y (interface_member_declaration): Allow empty statements in
2458 interface declarations.
2459
2460 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
2461
2462 * Makefile.in (parse.o): Adjust dependencies.
2463 * parse.y: Include tree-dump.h.
2464
2465 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2466
2467 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
2468 flag for quoting.
2469
2470 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
2471
2472 * parse.y (issue_warning_error_from_context): Call
2473 pp_output_formatted_text to be able to get the buffer.
2474
2475 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
2476
2477 * parse.y (issue_warning_error_from_context): Update for the
2478 renaming of pp_format_text to pp_format.
2479
2480 2005-06-28 Paul Brook <paul@codesourcery.com>
2481
2482 * decl.c (java_init_decl_processing): Call
2483 default_init_unwind_resume_libfunc.
2484
2485 2005-06-27 Tom Tromey <tromey@redhat.com>
2486
2487 PR java/21540, PR java/13788:
2488 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
2489 fold_constant_for_init.
2490 (patch_binop): Added 'folding' argument. Updated all callers.
2491 (patch_unaryop) <NOP_EXPR>: New case.
2492 (fold_constant_for_init) <NOP_EXPR>: Likewise.
2493 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
2494
2495 2005-06-25 Jan Hubicka <jh@suse.cz>
2496
2497 * builtins.c (define_builtin): Accept new flags parameter.
2498 (initialize_builtins): Mark the builtins const and nothrow accordingly.
2499
2500 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
2501
2502 * all files: Update FSF address in copyright headers.
2503
2504 2005-06-24 Tom Tromey <tromey@redhat.com>
2505
2506 * verify-impl.c (verify_instructions_0): Correctly handle
2507 situation where PC falls off end.
2508
2509 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
2510
2511 PR java/20697
2512 * parse.y (find_most_specific_methods_list): Remove special case for
2513 inner classes.
2514
2515 2005-06-15 Tom Tromey <tromey@redhat.com>
2516
2517 PR libgcj/21906:
2518 * class.c (make_method_value): Use soft_abstractmethod_node for
2519 abstract method.
2520 * java-tree.h (soft_abstractmethod_node): New define.
2521 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
2522 * decl.c (java_init_decl_processing): Initialize
2523 soft_abstractmethod_node.
2524
2525 2005-06-13 Geoffrey Keating <geoffk@apple.com>
2526
2527 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2528
2529 2005-06-13 Per Bothner <per@bothner.com>
2530
2531 * expr.c (int highest_label_pc_this_method,
2532 start_label_pc_this_method): New globals.
2533 (lookup_label): Add start_label_pc_this_method to pc for label, and
2534 update highest_label_pc_this_method. This prevents conflicts between
2535 labels from different methods.
2536 * java-tree.h: Declare new globals.
2537 * jcf-parse.c (parse_class_file): If needed bump
2538 start_label_pc_this_method and reset highest_label_pc_this_method.
2539
2540 2005-06-13 Tom Tromey <tromey@redhat.com>
2541
2542 PR java/21844:
2543 * parse.y (nested_field_access_p): Handle case where outer field
2544 is inherited by enclosing class.
2545
2546 2005-06-12 Per Bothner <per@bothner.com>
2547
2548 * class.c (inherits_from_p): Do load_class if needed.
2549
2550 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2551
2552 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2553 * java-tree.h (parse_error_context): Move...
2554 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2555 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2556 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2557
2558 2005-06-08 Roger Sayle <roger@eyesopen.com>
2559
2560 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2561
2562 2005-06-06 Jakub Jelinek <jakub@redhat.com>
2563
2564 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2565 msgid for argument name.
2566 * gjavah.c (error): Likewise.
2567 * java-tree.h (parse_error_context): Likewise.
2568 * parse.y (parse_error_context, parse_warning_context,
2569 issue_warning_error_from_context): Likewise.
2570
2571 2005-06-01 Tom Tromey <tromey@redhat.com>
2572
2573 PR java/21722:
2574 * class.c (build_static_field_ref): Don't fold constant fields if
2575 current class is from a .class file and we're using indirect
2576 dispatch.
2577
2578 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2579
2580 * java/verify-glue.c: Don't include errors.h and include toplev.h.
2581 * java/Make-lang.in: Updates dependencies.
2582
2583 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
2584
2585 PR java/19870.
2586 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2587 NESTED_FIELD_ACCESS_IDENTIFIER_P.
2588 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2589 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2590 * jcf-write.c (generate_classfile): Use
2591 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2592 OUTER_FIELD_ACCESS_IDENTIFIER_P.
2593 * parse.y (build_outer_field_access): Rename to
2594 build_nested_field_access. Support static fields and outer-to-inner
2595 class accesses.
2596 (outer_field_access_p): Rename to nested_field_access_p. Support
2597 static fields and generalise to outer-to-inner class and sibling
2598 inner class accesses.
2599 (outer_field_expanded_access_p): Rename to
2600 nested_field_expanded_access_p and support static fields.
2601 (outer_field_access_fix): Rename to nested_field_access_fix and
2602 support static fields.
2603 (build_outer_field_access_expr): Rename to
2604 build_nested_field_access_expr and support static fields.
2605 (build_outer_field_access_methods): Rename to
2606 build_nested_field_access_methods and support static fields. For
2607 static fields, generate accessors without class instance parameters.
2608 (build_outer_field_access_method): Rename to
2609 build_nested_field_access_method and support static fields.
2610 (build_outer_method_access_method): Use
2611 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2612 OUTER_FIELD_ACCESS_IDENTIFIER_P.
2613 (resolve_expression_name): Consider static field accesses across
2614 nested classes.
2615 (resolve_qualified_expression_name): Likewise.
2616 (java_complete_lhs): Use nested_field_access_fix instead of
2617 outer_field_access_fix.
2618 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2619 Use nested_field_expanded_access_p instead of
2620 outer_field_expanded_access_p. Use nested_field_access_fix instead
2621 of outer_field_access_fix.
2622 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2623 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2624
2625 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
2626
2627 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
2628 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2629 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2630 MINOR_BINARYCOMPAT_ABI_VERSION): New.
2631 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2632 (parse_version): Calculate version ID using new method. Use bit-flags
2633 for flag_indirect_dispatch and flag_bootstrap_classes.
2634
2635 2005-05-25 Richard Henderson <rth@redhat.com>
2636
2637 PR libgcj/21692
2638 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2639 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2640 DECL_CONTEXT; avoid pushdecl_top_level.
2641 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2642 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2643 (layout_class_method): Likewise.
2644 * decl.c (java_mark_cni_decl_local): New.
2645 (java_mark_class_local): Use it.
2646 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2647 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2648 (struct lang_decl_func): Add local_cni;
2649 (struct lang_decl_var): Add class_field, vtable.
2650 (java_mangle_decl): Declare.
2651 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2652 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2653 (mangle_obstack_1): New.
2654 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
2655 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
2656 lhd_set_decl_assembler_name for things that don't need mangling.
2657 (mangle_class_field): Rename from java_mangle_class_field, make
2658 static, don't call init_mangling or finish_mangling.
2659 (mangle_vtable): Similarly.
2660 (mangle_local_cni_method_decl): New.
2661 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
2662 gcc_assert, and MANGLE_RAW_STRING.
2663 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2664
2665 2005-05-25 DJ Delorie <dj@redhat.com>
2666
2667 * class.c (set_constant_value): Move warning control from if() to
2668 warning(OPT_*).
2669
2670 2005-05-24 Richard Henderson <rth@redhat.com>
2671
2672 * builtins.c (define_builtin): Don't call make_decl_rtl.
2673 * constants.c (build_constant_data_ref): Likewise.
2674 * class.c (build_utf8_ref): Likewise.
2675 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2676 (get_dispatch_table, layout_class_method): Likewise.
2677 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2678 by hand.
2679 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2680 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2681 to determine if we need a non-zero address.
2682 * decl.c (builtin_function): Don't call make_decl_rtl.
2683 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2684 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2685 * resource.c (compile_resource_data): Likewise.
2686 * parse.y (resolve_field_access): Re-word comment to avoid
2687 building DECL_RTL.
2688
2689 2005-05-24 Richard Henderson <rth@redhat.com>
2690
2691 * class.c (registered_class): Take it out of class_roots; turn into
2692 a vec of trees.
2693 (register_class): Make static. Don't duplicate decl node. Use
2694 VEC_safe_push.
2695 (emit_register_classes): Use VEC_iterate. Use output_constant
2696 instead of assemble_integer. Don't call mark_decl_referenced
2697 directly.
2698 * java-tree.h (register_class): Remove decl.
2699
2700 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
2701
2702 PR java/17845
2703
2704 * parse.y (register_package, package_list): Remove.
2705 (package_declaration): Do not call register_package.
2706 (do_resolve_class): Do not use package_list.
2707
2708 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
2709
2710 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2711 unused variable.
2712
2713 2005-05-15 Tom Tromey <tromey@redhat.com>
2714
2715 PR java/21519:
2716 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2717 NOTE_PUSH.
2718
2719 2005-05-12 Aaron Luchko <aluchko@redhat.com>
2720
2721 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2722
2723 2005-05-11 Tom Tromey <tromey@redhat.com>
2724
2725 * gcj.texi (Code Generation): Document -fbootstrap-classes.
2726 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2727 (parse_version): Use it.
2728 * lang.opt (-fbootstrap-classes): New option.
2729
2730 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
2731
2732 PR java/21436
2733 * class.c (maybe_layout_super_class): Look for imports in this_class.
2734 * parse.h (ctxp_for_generation_last): New.
2735 (do_resolve_class): Add a parameter.
2736 * parse.y (ctxp_for_generation_last): New.
2737 (java_pop_parser_context): Add at end of list.
2738 (find_in_imports, find_in_imports_on_demand): Look in ctxp
2739 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2740 the given type are NULL.
2741 (do_resolve_class): Look into the imports of the new second parameter.
2742 Adjust recursive calls.
2743 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2744 calls to do_resolve_class.
2745 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2746 (java_complete_class): Do not do that here.
2747
2748 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
2749
2750 PR java/20309
2751 * Make-lang.in (java): Add gjnih.
2752 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2753 (GJNIH_OBJS): New variable.
2754 (gjnih$(exeext)): New target.
2755 (JAVA_MANFILES): Add gjnih.1.
2756 (java.uninstall): Add gjnih.1.
2757 (java.mostlyclean): Add gjnih.
2758 (java.maintainer-clean): Add gjnih.1.
2759 (java/gjavah-jni.o): New target.
2760 (.INTERMEDIATE): Add gjnih.pod.
2761 (gjnih.pod): New target.
2762 * config-lang.in (stagestuff): Add gjnih.
2763 * gcj.texi (Top): Add gjnih node.
2764 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2765 -bootclasspath options.
2766 (Invoking gjnih): New node.
2767 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2768 (TOOLNAME): New macro.
2769 (error): Replace hard-coded gcjh with TOOLNAME.
2770 (process_file): Likewise.
2771 (usage): Likewise.
2772 (version): Likewise.
2773 (help): Likewise. Add help output for -force, -old, -trace and -J
2774 options.
2775 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2776 (options): Add force, old, trace and J fields.
2777 (main): Handle -force, -old, -trace and -J options.
2778
2779 2005-05-03 Tom Tromey <tromey@redhat.com>
2780
2781 PR java/21245:
2782 * gjavah.c (main): Unlink output file on error.
2783
2784 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2785
2786 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2787 copyright.
2788
2789 2005-04-29 Tom Tromey <tromey@redhat.com>
2790
2791 * expr.c (build_jni_stub): Updated for change to build_block.
2792
2793 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
2794
2795 * expr.c (force_evaluation_order): Declare 'saved' earlier.
2796
2797 2005-04-28 Andrew Haley <aph@redhat.com>
2798
2799 PR java/19285
2800 * java-tree.h (soft_resolvepoolentry_node): New.
2801 (alloc_constant_fieldref): Declare.
2802 * expr.c (expand_java_field_op): Don't call class_init for
2803 accesses to static fields with indirect dispatch.
2804 * builtins.c (initialize_builtins): Add "__builtin_expect".
2805 * decl.c (soft_resolvepoolentry_node): New variable.
2806 (java_init_decl_processing): Create a decl for
2807 "_Jv_ResolvePoolEntry".
2808 * class.c (build_fieldref_cache_entry): New function.
2809 (build_static_field_ref): Rewrite for indirect dispatch.
2810 * constants.c (find_name_and_type_constant_tree): New function.
2811 (alloc_constant_fieldref): Likewise.
2812 (build_constants_constructor): Handle CONSTANT_Fieldref and
2813 CONSTANT_NameAndType.
2814
2815 PR java/21115
2816 * expr.c (force_evaluation_order): Convert outgoing args smaller
2817 than integer.
2818
2819 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
2820
2821 * gcj.texi (libgcj Runtime Properties): Remove obsolete
2822 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
2823 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2824
2825 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2826
2827 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2828 to `unlock_stream' with `unlock_std_streams'.
2829
2830 2005-04-25 Jakub Jelinek <jakub@redhat.com>
2831
2832 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2833 instead of just expr.h.
2834
2835 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2836
2837 * gjavah.c (main): Unlock the stdio streams.
2838 * jcf-dump.c (main): Likewise.
2839 * jv-scan.c (main): Likewise.
2840 * jvgenmain.c (main): Likewise.
2841
2842 2005-04-23 DJ Delorie <dj@redhat.com>
2843
2844 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2845 parse.y: Adjust warning() callers.
2846
2847 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
2848
2849 * gcj.texi (Object fields): Change "Integer" to "Int" in example
2850 contructor.
2851
2852 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
2853
2854 * gcj.texi: Fix typos and bogus example.
2855
2856 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
2857
2858 * except.c: Fix a comment typo.
2859
2860 2005-04-19 Julian Brown <julian@codesourcery.com>
2861
2862 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2863 indirect dispatch with PIC.
2864
2865 2005-04-18 Andrew Haley <aph@redhat.com>
2866
2867 * java-except.h (struct eh_range.handler): Remove unused field.
2868 (handle_nested_ranges): Remove function declaration.
2869 (sanity_check_exception_range): Add function declaration.
2870 * verify.c (verify_jvm_instructions): Remove call to
2871 handle_nested_ranges.
2872 * verify-glue.c (verify_jvm_instructions_new): Call
2873 sanity_check_exception_range.
2874 * except.c (link_handler, eh_range_freelist, link_handler,
2875 handle_nested_ranges): Remove.
2876 (add_handler): Rewrite.
2877 (sanity_check_exception_range): New function.
2878 (print_ranges): New function.
2879
2880 2005-04-13 Julian Brown <julian@codesourcery.com>
2881
2882 * decl.c (finish_method): Give methods once-only linkage.
2883
2884 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
2885
2886 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2887
2888 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2889
2890 * java-tree.h: Don't use PARAMS().
2891
2892 2005-04-07 Per Bothner <per@bothner.com>
2893
2894 * class.c (push_class): By default, suppress debug output.
2895 (finish_class): Enable debug output for classes we're emitting.
2896
2897 2005-04-07 Andrew Haley <aph@redhat.com>
2898
2899 * gcj.texi: Correct gcj-dbtool instructions.
2900
2901 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
2902
2903 * gcj.texi: Fix a typo.
2904 * lang.c: Fix a comment typo.
2905
2906 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
2907
2908 * gcj.texi (Invoking gij): Add descriptions of new -X options.
2909 Mention recognized-and-ignored compatibility options.
2910 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2911 JvFree.
2912 (About CNI): Add Memory allocation section.
2913
2914 2005-04-01 Tom Tromey <tromey@redhat.com>
2915
2916 * decl.c (java_init_decl_processing): Fix types of
2917 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2918 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2919 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2920
2921 2005-03-31 Jan Hubicka <jh@suse.cz>
2922
2923 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2924 * class.c: Include cgraph.h
2925 (make_local_functoin_alias): Mark aslias as needed.
2926 * resource.c: Include cgraph.h
2927 (compile_resource_data): Go via cgraph interface.
2928
2929 2005-03-30 Ian Lance Taylor <ian@airs.com>
2930
2931 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2932
2933 2005-03-30 Tom Tromey <tromey@redhat.com>
2934
2935 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2936 inner_class_info_index==0 or outer_class_info_index==0.
2937
2938 2005-03-29 Tom Tromey <tromey@redhat.com>
2939
2940 * gcj.texi (libgcj Runtime Properties): Document
2941 gnu.gcj.runtime.endorsed.dirs.
2942
2943 2005-03-24 Anthony Green <green@redhat.com>
2944
2945 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2946 'gcj-dbtool -p'.
2947
2948 2005-03-23 Tom Tromey <tromey@redhat.com>
2949
2950 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2951 (parse_version): Use it.
2952
2953 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2954
2955 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2956
2957 2005-03-18 Andrew Haley <aph@redhat.com>
2958
2959 PR java/20522
2960 * decl.c (update_aliases): Don't update variables that are about
2961 to die.
2962 (maybe_poplevels): Add comment.
2963
2964 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
2965
2966 PR java/20502
2967 * jcf-parse.c (duplicate_class_warning): New function.
2968 (java_parse_file): Call duplicate_class_warning if
2969 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2970 (parse_zip_file_entries): Likewise. Also set
2971 CLASS_FROM_CURRENTLY_COMPILED_P.
2972
2973 2005-03-16 Andrew Haley <aph@redhat.com>
2974
2975 * expr.c (expand_java_arrayload): Don't generate a
2976 NullPointerException based on the type of the node.
2977 (build_java_array_length_access): Likewise.
2978
2979 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2980
2981 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2982
2983 2005-03-11 Tom Tromey <tromey@redhat.com>
2984
2985 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2986 (libgcj Runtime Properties): Document the default .db.
2987
2988 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
2989
2990 PR java/20312
2991 * parse.y (checks_throws_clauses): Check exceptions list even when
2992 the base class does not come from a source file being compiled.
2993 (java_complete_lhs): Remove unused variable 'wfl'.
2994
2995 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
2996
2997 PR java/20338
2998 * decl.c (finish_method): Emit _Jv_InitClass for private static
2999 methods inside inner classes as well.
3000
3001 2005-03-08 Julian Brown <julian@codesourcery.com>
3002 * Revert patch from 2005-03-08 for causing bootstrap failure on
3003 ppc-darwin.
3004
3005 2005-03-08 Julian Brown <julian@codesourcery.com>
3006
3007 * decl.c (finish_method): Give methods once-only linkage.
3008
3009 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3010
3011 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3012
3013 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
3014
3015 * verify-glue.c (vfy_is_assignable_from): Perform static check using
3016 can_widen_reference_to if the C++ ABI is in use.
3017 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3018 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3019 type_isresolved, init_state, set_pc, state_get_pc,
3020 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3021 (verify_fail): Report the current PC from the verifier context.
3022 (free_state): Remove #if 0 block to enable this function.
3023 (free_verifier_context): Call free_state on state_list iterator
3024 values before freeing them.
3025 * expr.c (pop_type_0): Pop correct type for error message when stack
3026 contains a multi-word type.
3027
3028 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3029
3030 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3031 for known NULL array length access.
3032
3033 2005-03-07 Tom Tromey <tromey@redhat.com>
3034
3035 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3036
3037 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
3038
3039 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3040 typeck.c: Update copyright.
3041
3042 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
3043
3044 Remove xref code.
3045 * xref.c, xref.h: Remove file.
3046 * Make-lang.in (java/xref.o): Remove.
3047 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3048 * lang.c (flag_emit_xref): Remove definition.
3049 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3050 * typeck.c (convert): Remove use of do_not_fold.
3051 * parse.y (do_not_fold): Remove definition.
3052 (parser grammar): Remove xref code.
3053 (maybe_create_class_interface_decl, create_class): Likewise.
3054 (register_fields, method_header, finish_method_declaration): Likewise.
3055 (declare_local_variables, source_end_java_method): Likewise.
3056 (java_complete_expand_classes): Do not set do_not_fold.
3057 (java_complete_expand_method): Remove xref code.
3058 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3059 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3060 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3061 (patch_synchronized_statement, patch_throw_statement): Likewise.
3062 (maybe_build_class_init_for_field): Likewise.
3063
3064 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
3065
3066 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3067 instead of IS_NON_TYPE_CODE_CLASS.
3068
3069 2005-03-04 Andrew Haley <aph@redhat.com>
3070
3071 PR java/18362
3072 * class.c (set_method_index): Don't set method_index if it is
3073 NULL_TREE.
3074 (layout_class_method): Don't complain about "non-static method foo
3075 overrides static method" in the case of indirect dispatch.
3076
3077 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3078
3079 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3080 warning.
3081 * Make-lang.in: Don't elide warnings in jcf-io.c.
3082
3083 2005-03-01 Per Bothner <per@bothner.com>
3084
3085 PR java/8608
3086 * check-init.c (wfl): Remove static.
3087 (final_assign_error, check_init): Replace calls to parse_error_context
3088 by plain error.
3089 (check_init): Save, set, and restore input_location for each exp.
3090
3091 2005-03-01 Per Bothner <per@bothner.com>
3092
3093 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3094 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3095 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3096
3097 2005-03-01 Per Bothner <per@bothner.com>
3098
3099 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3100
3101 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
3102
3103 PR libgcj/16923
3104 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3105 JvVMOption.
3106
3107 2005-02-22 Tom Tromey <tromey@redhat.com>
3108
3109 PR java/20056:
3110 * verify-impl.c (EITHER): New define.
3111 (types_compatible): Handle it.
3112 (check_field_constant): Use it.
3113
3114 2005-02-18 Tom Tromey <tromey@redhat.com>
3115
3116 PR java/20056:
3117 * verify-impl.c (types_equal): Fixed test.
3118
3119 PR java/20056:
3120 * verify-glue.c (vfy_class_has_field): New function.
3121 * verify.h (vfy_class_has_field): Declare.
3122 * verify-impl.c (check_field_constant): Added 'putfield'
3123 argument.
3124 (verify_instructions_0): Updated.
3125 (types_equal): New function.
3126
3127 2005-02-14 Tom Tromey <tromey@redhat.com>
3128
3129 PR java/19921:
3130 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3131 stack effect of multianewarray.
3132
3133 2005-02-14 Andrew Haley <aph@redhat.com>
3134
3135 PR java/19907
3136 * expr.c (expand_byte_code): Call promote_arguments().
3137 (promote_arguments): New function.
3138 * decl.c (check_local_unnamed_variable): Remove special case for
3139 new verifier.
3140 (find_local_variable): Promote all boolean types to int
3141 when searching for local variable decls.
3142
3143 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
3144
3145 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3146 parse-scan.y: Update copyright.
3147
3148 2005-02-11 Per Bothner <per@bothner.com>
3149
3150 PR java/15543
3151 * parse-scan.y (input_location): Remove variable.
3152 (main_input_filename): New - replaces input_filename, which isn't
3153 settable if USE_MAPPED_LOCATION.
3154 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3155 so we don't reference input_location or wfl_operator in that case.
3156 * jv-scan.c (expand_location): Remove - no longer used.
3157 (main): Set main_input_filename rather than input_filename.
3158
3159 2005-02-09 Richard Henderson <rth@redhat.com>
3160
3161 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3162 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3163
3164 2005-02-08 Marcin Dalecki <martin@dalecki.de>
3165
3166 * expr.c (add_type_assertion): Use the proper enumeration type,
3167 since this is what htab_find_slot() is expecting.
3168
3169 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
3170
3171 * gcj.texi: Update copyright dates.
3172
3173 2005-02-02 Tom Tromey <tromey@redhat.com>
3174
3175 * gcj.texi (libgcj Runtime Properties): Default library_control
3176 to 'cache'.
3177
3178 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
3179
3180 PR java/15543
3181 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3182 (modifiers) when square brackets are present in a declaration for
3183 a final paramter.
3184 * jv-scan.c (main): Set input_filename and input_line.
3185
3186 2005-02-01 Tom Tromey <tromey@redhat.com>
3187
3188 PR java/19742:
3189 * gjavah.c (get_field_name): Don't override name for JNI header.
3190
3191 2005-02-01 Roger Sayle <roger@eyesopen.com>
3192
3193 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3194 of unsigned types using iushr and lushr JVM bytecodes.
3195
3196 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3197
3198 PR java/19738
3199 * gjavah.c (jni_print_float): Do not emit floating-point
3200 initialiser for a static final field.
3201 (jni_print_double): Likewise.
3202
3203 2005-02-01 Mark Mitchell <mark@codesourcery.com>
3204
3205 Revert:
3206 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3207 * gjavah.c (print_field_info): Mark static data members of
3208 floating-point type with "__extension__".
3209
3210 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3211
3212 * gjavah.c (print_field_info): Mark static data members of
3213 floating-point type with "__extension__".
3214
3215 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3216
3217 PR java/9157
3218 * parse.y (build_string_concatenation): Remove redundant if.
3219 (patch_conditional_expr): Attempt to patch_string() the condition
3220 of a ?: as well, in addition to its other operands.
3221
3222 2005-01-25 Tom Tromey <tromey@redhat.com>
3223
3224 * Make-lang.in (java/java-tree-inline.o): Removed.
3225
3226 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
3227
3228 PR java/19070
3229 * parse.y (patch_binop): Allow comparisons against NULL only
3230 if the other operand is of a reference type.
3231
3232 2005-01-24 Tom Tromey <tromey@redhat.com>
3233
3234 * java-tree.h (gcj_abi_version): Declare.
3235 * class.c (make_class_data): Push gcj_abi_version into "next"
3236 field. Renamed field.
3237 * decl.c (gcj_abi_version): New global.
3238 (parse_version): New function.
3239 (java_init_decl_processing): Call it. Renamed 'next' field.
3240 Include version.h.
3241 (GCJ_BINARYCOMPAT_ADDITION): New define.
3242
3243 2005-01-24 Roger Sayle <roger@eyesopen.com>
3244
3245 PR java/19295
3246 * jcf-write.c (generate_bytecode_insns): Conversions between
3247 integer types of the same precision shouldn't generate widening
3248 or narrowing conversion bytecodes.
3249
3250 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
3251
3252 * java-except.h, java-tree.h: Remove unused prototypes.
3253
3254 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
3255
3256 PR java/18091:
3257 * jcf-write.c (perform_relocations): Don't call memcpy if source
3258 and destination are the same.
3259
3260 2005-01-17 Tom Tromey <tromey@redhat.com>
3261
3262 * verify-impl.c (get_short): Sign extend.
3263 (get_int): Likewise.
3264
3265 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
3266
3267 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3268 with TYPE_SIZE.
3269
3270 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
3271
3272 * verify.c: Revert to the version before the BC-ABI merge.
3273
3274 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
3275
3276 PR java/19277
3277 * check-init.c (check_init): Take care of references that do not
3278 have an explicit final variable declaration (e.g. array length
3279 access) for pre/post in/de-crement operators.
3280
3281 2005-01-08 Mark Wielaard <mark@klomp.org>
3282
3283 * parse.y (process_imports): Allocate (and free) original_name only
3284 when not already defined.
3285 * jcf-parse.c (read_class): Free results of find_class() and
3286 lrealpath().
3287 (java_parse_file): Keep pointer to head of file_list and free when
3288 done. Free result of lrealpath().
3289
3290 2005-01-05 Tom Tromey <tromey@redhat.com>
3291
3292 * gcj.texi (Standard Properties): java.ext.dirs is now used.
3293
3294 2004-12-20 Andrew Haley <aph@redhat.com>
3295
3296 * typeck.c: Use fold_convert for ints and booleans.
3297
3298 2004-12-17 Andrew Haley <aph@redhat.com>
3299
3300 PR java/18931
3301 * typeck.c (convert): Use a CONVERT_EXPR when converting to
3302 BOOLEAN_TYPE or CHAR_TYPE.
3303 (convert_to_boolean, convert_to_char) : Remove.
3304 * convert.h (convert_to_boolean, convert_to_char) : Remove.
3305 * expr.c (expand_load_internal): Do type conversion if type is not
3306 as required.
3307
3308 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
3309
3310 PR target/18459
3311 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
3312 Update comment.
3313
3314 2004-12-07 Andrew Haley <aph@redhat.com>
3315
3316 PR java/18811:
3317 * jcf-parse.c (load_class): Remove sanity test for missing inner
3318 class file.
3319
3320 2004-12-06 Tom Tromey <tromey@redhat.com>
3321
3322 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
3323 (java.uninstall): Likewise.
3324 (java.maintainer-clean): Likewise.
3325 (.INTERMEDIATE): Likewise.
3326 (java.install-man): Likewise.
3327 (gcj-dbtool.pod): New target.
3328 * gcj.texi (Code Generation): Document -findirect-dispatch.
3329 (libgcj Runtime Properties): Document
3330 gnu.gcj.precompiled.db.path.
3331 (Top): Link to "Invoking gcj-dbtool".
3332
3333 2004-12-06 Tom Tromey <tromey@redhat.com>
3334
3335 PR java/14853:
3336 * java-tree.h (extract_field_decl): Declare.
3337 * parse.y (extract_field_decl): Renamed from
3338 strip_out_static_field_access_decl. No longer static.
3339 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
3340
3341 2004-12-03 Tom Tromey <tromey@redhat.com>
3342
3343 * lang.c (flag_new_verifier): Define.
3344 (java_post_options): Set flag_new_verifier if indirect dispatch
3345 is being used.
3346 * lang.opt (fnew-verifier): Removed.
3347
3348 2004-12-03 Tom Tromey <tromey@redhat.com>
3349
3350 PR bootstrap/14614:
3351 * Make-lang.in (java.install-common): Only install transformed
3352 gcjh if gcj-cross exists.
3353
3354 2004-12-03 Andrew Haley <aph@redhat.com>
3355
3356 PR java/18812
3357 * except.c (link_handler): Patch 'outer' field of siblings of the
3358 range we're demoting.
3359
3360 2004-12-03 Andrew Haley <aph@redhat.com>
3361
3362 PR java/18697
3363 * class.c (layout_class_method): Don't fail to override a method
3364 simply because it has DECL_ARTIFICIAL set.
3365
3366 2004-12-02 Tom Tromey <tromey@redhat.com>
3367
3368 PR java/16675:
3369 * parse.y (craft_constructor): Special case null_pointer_node.
3370
3371 2004-12-02 Tom Tromey <tromey@redhat.com>
3372
3373 PR java/18741:
3374 * java-gimplify.c (java_gimplify_expr): Don't call
3375 SET_EXPR_LOCATION unless wrapped tree is an expression.
3376
3377 2004-11-27 Per Bothner <per@bothner.com>
3378
3379 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
3380 Fix fencepost error in 'i', which got executed one too many times.
3381 Also, fold memcpy into explicit loop, as originally intended.
3382 Also, free temporary 'buf' which otherwise leaks.
3383
3384 2004-11-27 Per Bothner <per@bothner.com>
3385
3386 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
3387 local static variables if not USE_MAPPED_LOCATION.
3388
3389 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
3390
3391 * class.c, decl.c, expr.c: Fix comment typos.
3392
3393 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
3394
3395 PR java/18305
3396 * decl.c (end_java_method): Call
3397 attach_init_test_initialization_flags on all the init_decls.
3398 * parse.y (attach_init_test_initialization_flags): Move to ...
3399 * expr.c (attach_init_test_initialization_flags): here and
3400 support BIND_EXPR also.
3401 * java-tree.h (attach_init_test_initialization_flags): Prototype.
3402 * jcf-parse.c (parse_class_file): Don't disable class init
3403 optimization.
3404
3405 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
3406
3407 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3408 in diagnostics.
3409
3410 2004-11-24 Richard Henderson <rth@redhat.com>
3411
3412 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3413 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3414
3415 2004-11-24 Tom Tromey <tromey@redhat.com>
3416
3417 * verify.c (defer_merging): Don't use C++-style comment.
3418 * verify.h (java_opcode): Added java_opcode_end.
3419 * class.c (build_class_ref): Remove C++ comment and old FIXME.
3420
3421 * verify-impl.c (vfy_push_type): Removed bogus "return".
3422 (initialize_stack): Use vfy_alloc and vfy_free.
3423 (verify_instructions_0): Likewise.
3424
3425 * Merged gcj-abi-2-dev-branch to trunk.
3426
3427 2004-11-24 Andrew Haley <aph@redhat.com>
3428
3429 * jcf-parse.c (parse_class_file): Set file_start_location.
3430
3431 2004-11-10 Tom Tromey <tromey@redhat.com>
3432
3433 * class.c (make_field_value): Don't call build_static_field_ref.
3434 (build_static_field_ref): Don't emit direct references when using
3435 indirect dispatch.
3436
3437 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
3438 -verbose:class into man page synopsis.
3439
3440 2004-11-09 Tom Tromey <tromey@redhat.com>
3441
3442 * expr.c (build_java_arraystore_check): Still generate check if
3443 element type is itself an array.
3444
3445 2004-11-08 Tom Tromey <tromey@redhat.com>
3446
3447 * java-tree.h (soft_check_assignment_node): Removed.
3448 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3449 * decl.c (java_init_decl_processing): Don't initialize
3450 soft_check_assignment_node.
3451
3452 2004-11-05 Tom Tromey <tromey@redhat.com>
3453
3454 * class.c (layout_class_methods): Don't add Miranda methods when
3455 using indirect dispatch.
3456
3457 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
3458
3459 * class.c (make_class_data): Call emit_assertion_table to set the
3460 'assertion_table' field.
3461 (build_signature_for_libgcj): Move here from expr.c.
3462 (add_assertion_table_entry): New function. Callback for assertion
3463 hashtable traversal.
3464 (emit_assertion_table): New. Take class argument, and generate
3465 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3466 * decl.c (init_decl_processing): Define assertion_entry_type record.
3467 Push 'assertion_table' class field instead of 'verify'.
3468 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
3469 (type_assertion_hash): Include 'assertion_code' in hash.
3470 (add_type_assertion): Rewritten. Take class and assertion_code
3471 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
3472 (can_widen_reference_to): Use new add_type_assertion() arguments.
3473 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
3474 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
3475 (verify_identifier_node): Removed.
3476 (assertion_entry_type, assertion_table_type): New.
3477 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
3478 assertion code definitions.
3479 (struct type_assertion): Add assertion_code. Rename 'source_type' and
3480 'target_type' to 'op1' and 'op2'.
3481 (add_type_assertion): Declare.
3482 (lang_printable_name_wls): Remove unused definition.
3483 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
3484 to emit runtime assertion.
3485 (vfy_note_stack_type): Clean up non-C90 declarations.
3486 (vfy_note_local_type): Likewise.
3487 * verify.h (vfy_is_assignable_from): Declare.
3488 * verify-impl.c (is_assignable_from_slow): Remove unused function.
3489 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
3490 instead of is_assignable_from_slow().
3491 (types_compatible): Reinstate ref_compatible() call.
3492
3493 2004-11-04 Tom Tromey <tromey@redhat.com>
3494
3495 * class.c (build_static_field_ref): Reverted previous patch.
3496
3497 * class.c (build_static_field_ref): Don't emit direct references
3498 when using indirect dispatch.
3499
3500 2004-11-03 Tom Tromey <tromey@redhat.com>
3501
3502 * expr.c (expand_java_arrayload): Set lhs_type_node.
3503 (expand_java_arraystore): Set rhs_type_node.
3504
3505 2004-11-02 Tom Tromey <tromey@redhat.com>
3506
3507 * jcf-parse.c (compute_class_name): Use filename length from zip
3508 directory, not strlen.
3509
3510 * expr.c (expand_invoke): Mark new interface methods as abstract.
3511
3512 2004-11-01 Tom Tromey <tromey@redhat.com>
3513
3514 * verify-impl.c (push_jump): Removed check for uninitialized
3515 objects.
3516 (push_exception_jump): Likewise.
3517 (handle_ret_insn): Likewise.
3518 (handle_jsr_insn): Likewise.
3519 (state_check_no_uninitialized_objects): Removed.
3520
3521 * decl.c (check_local_unnamed_variable): Recognize
3522 promoted-to-int parameters when using the new verifier.
3523 * expr.c (expand_java_arraystore): Explicitly request array type
3524 when using new verifier.
3525 (expand_java_arrayload): Likewise.
3526 (invoke_build_dtable): Don't pass object_type_node as
3527 expression argument to build_java_indirect_ref.
3528 (build_java_check_indexed_type): Do nothing.
3529 (build_java_arraystore_check): Handle case where array doesn't
3530 have array type.
3531 (build_java_array_length_access): Likewise.
3532 (expand_invoke): Handle case where interface overrides a method
3533 from Object.
3534 (pop_type_0): Always succeed for reference types.
3535 (process_jvm_instruction): Don't pop a value in a dead
3536 exception handler.
3537 (pop_arguments): Convert arguments to correct types.
3538
3539 2004-10-29 Andrew Haley <aph@redhat.com>
3540
3541 * jcf-parse.c (give_name_to_class): Remove line that was
3542 incorrectly merged.
3543
3544 2004-10-29 Andrew Haley <aph@redhat.com>
3545
3546 * jcf-parse.c (set_source_filename): Add code to build new sfname.
3547
3548 2004-10-20 Andrew Haley <aph@redhat.com>
3549
3550 * decl.c (end_java_method): Don't expand if flag_syntax_only.
3551
3552 2004-10-26 Tom Tromey <tromey@redhat.com>
3553
3554 * verify.h (vfy_notify_verified): Removed.
3555 * verify-glue.c (vfy_notify_verified): Removed.
3556
3557 2004-10-26 Tom Tromey <tromey@redhat.com>
3558
3559 * verify-impl.c (debug_print_state): Declare `i' before code.
3560 (merge_types): Modify `t' when it is null_type.
3561
3562 2004-10-26 Tom Tromey <tromey@redhat.com>
3563
3564 * verify-impl.c (type_print): Renamed from print. Now static and
3565 takes an argument.
3566 (debug_print_state): Use type_print.
3567
3568 2004-10-25 Tom Tromey <tromey@redhat.com>
3569
3570 * expr.c (build_invokeinterface): Compute correct offset for
3571 index into interface methods.
3572
3573 2004-10-20 Tom Tromey <tromey@redhat.com>
3574
3575 * java-tree.h (verify_jvm_instructions_new): Declare.
3576
3577 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3578 command line.
3579
3580 * verify-impl.c (verify_instructions): Correctly handle wide
3581 types on the stack.
3582 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3583 (vfy_get_component_type): Strip pointer types.
3584 (vfy_find_class): Use get_type_from_signature. Strip pointer
3585 types.
3586 Include java-except.h.
3587
3588 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
3589
3590 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3591 vfy_push_type_t, set_variable, add_new_state, merge_into,
3592 handle_jsr_insn, branch_prepass, check_class_constant,
3593 check_wide_constant, get_one_type, compute_static_types,
3594 verify_instructions_0): Clean up C99 declarations after statements.
3595
3596 2004-10-20 Tom Tromey <tromey@redhat.com>
3597
3598 * verify-impl.c (merge_refs): Compare reference against iterator,
3599 not ref2.
3600
3601 * verify-glue.c (vfy_tag): Mask off resolved flag.
3602
3603 2004-10-19 Tom Tromey <tromey@redhat.com>
3604
3605 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3606 (init_state_with_stack): Initialize `this_type' in state.
3607 (verify_method): Use debug_print.
3608 * verify-glue.c (vfy_is_primitive): Removed debugging print.
3609 (vfy_note_stack_depth): Reverted last patch.
3610 (vfy_note_stack_type): Note pointer to Object, not Object.
3611 (vfy_note_local_type): Likewise.
3612
3613 * verify.h (vfy_note_instruction_seen): Declare.
3614 * verify-glue.c (verify_jvm_instructions_new): Set
3615 BCODE_EXCEPTION_TARGET on target instruction.
3616 (vfy_note_instruction_seen): New function.
3617 * verify-impl.c (FLAG_INSN_SEEN): New define.
3618 (verify_instructions_0): Set flag on instruction. Save state for
3619 PC=0 later.
3620 (verify_instructions): Call vfy_note_instruction_seen.
3621
3622 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3623 (verify_jvm_instructions_new): Call method_init_exceptions,
3624 add_handler, and handle_nested_ranges.
3625 * verify-impl.c (verify_method): Return 1 on success.
3626 (verify_instructions_0): Save the state at PC=0.
3627
3628 * verify-impl.c (init_type_from_class): Set is_resolved and
3629 ref_next on new ref_intersection.
3630 (init_type_from_string): Likewise.
3631
3632 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
3633
3634 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3635 if flag_new_verifier is set.
3636 * java-tree.h (flag_new_verifier): Declare.
3637 * lang.opt (fnew-verifier): New option.
3638 * verify-impl.c: Work around namespace pollution by undef'ing
3639 'current_class'.
3640 (struct verifier_context): Make 'bytecode' const.
3641 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3642 (types_compatible): For the BC-ABI, always consider reference types
3643 compatible.
3644 (check_class_constant): Use vfr->current_class.
3645 (check_constant): Likewise.
3646 (check_wide_constant): Likewise.
3647 (check_field_constant): Check for 'L' at start of type name.
3648 (get_one_type): Return pointer instead of type. Set type result in
3649 caller via passed type pointer.
3650 (compute_argument_types): Update to use new get_one_type arguments.
3651 (compute_return_type): Likewise.
3652 (make_verifier_context): New. Allocate and initialize 'vfr'.
3653 (free_verifier_context): New. Free 'vfr' and its contents.
3654 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3655 and free_verifier_context.
3656
3657 2004-10-15 Tom Tromey <tromey@redhat.com>
3658
3659 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3660 * verify.h (vfy_fail): Fixed formatting.
3661
3662 * verify-impl.c (vfr): Fixed comment formatting.
3663 (collapse_type): New function.
3664 (verify_instructions): Notify compiler about type map.
3665 * verify.h (vfy_note_stack_depth): Updated.
3666 (vfy_note_stack_type): Likewise.
3667 (vfy_note_local_type): Likewise.
3668 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3669 Declare.
3670 * verify-glue.c (vfy_note_stack_depth): Correctly size type
3671 state. Added `method' argument.
3672 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
3673 argument.
3674 (vfy_note_local_type): New function.
3675 (vfy_unsuitable_type): Likewise.
3676 (vfy_return_address_type): Likewise.
3677 (vfy_null_type): Likewise.
3678
3679 * verify.h (VFY_IN_GCC): Removed.
3680 (VFY_WANT_TYPEMAP): Removed.
3681 * verify-impl.c (verify_instructions_0): Removed useless "\".
3682 (struct state) <next>: Uncomment.
3683
3684 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
3685
3686 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3687 C-style.
3688
3689 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
3690
3691 * Make-lang.in (verify.o): Re-enabled this target.
3692 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3693 (vfy_get_interface): Likewise.
3694 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3695 * verify.h (verify_jvm_instructions_new): Declare.
3696 * verify-impl.c (free_state): Temporarily comment out unused
3697 function.
3698
3699 2004-10-06 Tom Tromey <tromey@redhat.com>
3700
3701 * java-tree.h (JV_STATE_READ): New enum value.
3702
3703 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
3704
3705 * verify.h: New file.
3706
3707 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
3708
3709 * verify-impl.c, verify-glue.c, verify.h: New files.
3710 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3711
3712 2004-09-24 Andrew Haley <aph@redhat.com>
3713
3714 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3715 for a slot if it's of pointer type.
3716
3717 2004-09-14 Tom Tromey <tromey@redhat.com>
3718
3719 * class.c (make_class_data): Correctly initialize "state" field.
3720 Initialize "engine" field.
3721 * decl.c (java_init_decl_processing): Add "engine" field.
3722
3723 2004-09-10 Andrew Haley <aph@redhat.com>
3724
3725 PR java/12760
3726 * expr.c (build_invokeinterface): Use fast method for interface
3727 dispatch.
3728 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3729 JTI_ITABLE_PTR_TYPE.
3730 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
3731 (emit_symbol_table): Add new arg, element_size.
3732 * decl.c (java_init_decl_processing): Initialize Class.itable.
3733 * class.c (GEN_TABLE): New macro.
3734 (gen_indirect_dispatch_tables): Use it. Add itable.
3735 (make_class_data): Add new arg for emit_symbol_table().
3736 Emit itable.
3737 (add_miranda_methods): Make sure search_class has been parsed.
3738 (emit_symbol_table): Add new arg, element_size.
3739
3740 2004-09-06 Andrew Haley <aph@redhat.com>
3741
3742 * verify.c (merge_types): Return Object for all merges of
3743 interfaces.
3744 * expr.c (add_type_assertion): Don't generate assertions when
3745 source type is array of Object.
3746
3747 2004-09-03 Andrew Haley <aph@redhat.com>
3748
3749 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3750
3751 * lang.c (java_post_options): Force flag_verify_invocations if
3752 we're not using indirect dispatch.
3753
3754 * expr.c (pop_type_0): Move test for interfaces before call to
3755 can_widen_reference_to().
3756 (build_signature_for_libgcj): Remove generation of canonical array
3757 type.
3758 (add_type_assertion): Canonicalize both arrays.
3759 Don't assert that type X can be assigned to Object.
3760 Don't assert that type X an be assigned to type X.
3761 Don't assert that Object can be assigned to type X.
3762 (can_widen_reference_to): Warn whenever we generate an assertion.
3763 (process_jvm_instruction): Use throwable_type_node for the type of
3764 an exception class.
3765
3766 2004-09-01 Andrew Haley <aph@redhat.com>
3767
3768 * decl.c (java_init_decl_processing): Change
3769 verify_identifier_node to "__verify".
3770 * expr.c (add_type_assertion): Use verify_identifier_node for name.
3771 * java-tree.h (verify_identifier_node): Change to "__verify".
3772
3773 * expr.c (build_signature_for_libgcj): New function.
3774 (add_type_assertion): Use it to construct signatures for
3775 source_type and target_type.
3776
3777 2004-08-27 Andrew Haley <aph@redhat.com>
3778
3779 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3780 (verify_identifier_node): New.
3781 (TYPE_VERIFY_METHOD): New.
3782 (struct type_assertion): New type.
3783 * expr.c (type_assertion_eq): New function.
3784 (type_assertion_hash): New function.
3785 (add_type_assertion): New function.
3786 (can_widen_reference_to): Call add_type_assertion().
3787 * decl.c (java_init_decl_processing): Add verify_identifier_node.
3788 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3789 (finish_class): Output TYPE_VERIFY_METHOD (type).
3790
3791 * decl.c (end_java_method): Nullify unused fields.
3792
3793 2004-08-17 Andrew Haley <aph@redhat.com>
3794
3795 * verify.c (defer_merging): Quieten.
3796 * jcf-parse.c (load_class): Only try to open a class file if it's
3797 java.lang.Object or if it's part of the current compilation.
3798 Check that the class we just tried to load is the class we just
3799 loaded. Quieten.
3800 (java_parse_file): Set flag_verify_invocations off if we're
3801 compiling from .class.
3802 (parse_zip_file_entries): Abort if we try to read a dummy class.
3803 * expr.c (can_widen_reference_to): Quieten.
3804 (build_invokevirtual): Abort if we try to invokevirtual an
3805 interface.
3806 (expand_invoke): Don't build a non-interface call to an interface.
3807 (build_instanceof): Don't do premature optimization if
3808 flag_verify_invocations is not set.
3809 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3810 from superclass.
3811 (build_static_field_ref): Add correct type conversion for
3812 field_address.
3813 (add_miranda_methods): Disable generation of Miranda methods for
3814 dummy classes.
3815 (layout_class_method): Don't complain about non-static method
3816 overrides static method with dummy classes.
3817
3818 2004-08-13 Tom Tromey <tromey@redhat.com>
3819
3820 * class.c (build_static_field_ref): Re-enable atable lookups for
3821 static fields.
3822
3823 * parse.y (strip_out_static_field_access_decl): Indentation fix.
3824
3825 2004-08-11 Tom Tromey <tromey@redhat.com>
3826
3827 * gcj.texi (libgcj Runtime Properties): Document new properties.
3828
3829 2004-08-06 Andrew Haley <aph@redhat.com>
3830
3831 * jcf-parse.c (load_class): Check that we really have loaded the
3832 class we're looking for.
3833
3834 2004-07-19 Andrew Haley <aph@redhat.com>
3835
3836 * verify.c (verify_jvm_instructions): Comment change only.
3837
3838 * typeck.c (build_java_array_type): Add size field to array name.
3839
3840 * java-tree.h (LOCAL_SLOT_P): New.
3841 (update_aliases): Add PC argument.
3842 (pushdecl_function_level): New function.
3843
3844 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3845 MODIFY_EXPR, and SAVE_EXPR.
3846 (java_gimplify_modify_expr): New function.
3847
3848 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3849 (expand_iinc): Pass PC to update_aliases().
3850 (STORE_INTERNAL): Likewise.
3851 (process_jvm_instruction): Likewise.
3852
3853 * decl.c (base_decl_map): New variable.
3854 (uniq): New variable.
3855 (update_aliases): Rewrite with more thorough checking.
3856 (debug_variable_p): New function.
3857 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
3858 (check_local_named_variable): Delete whole function.
3859 (initialize_local_variable): New function.
3860 (check_local_unnamed_variable): Add checks and comments.
3861 (find_local_variable): Rewrite.
3862 (java_replace_reference): New function.
3863 (function_binding_level): New variable.
3864 (pushdecl_function_level): New function.
3865 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3866 (maybe_pushlevels): Call pushdecl() on each of the new decls.
3867 (start_java_method): Reset uniq. Create base_decl_map. Set
3868 function_binding_level.
3869 (end_java_method): Null unused fields to save memory.
3870
3871 2004-06-29 Andrew Haley <aph@redhat.com>
3872
3873 * except.c (expand_start_java_handler): Push a new binding level.
3874 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
3875 register_exception_range() to register where we'll do it.
3876 (expand_end_java_handler): Remove old bogus code. Replace with
3877 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3878 the top of the expression we're curently building.
3879 (maybe_end_try): Delete.
3880 * decl.c (binding_level.exception_range): New field.
3881 (clear_binding_level): Add field exception_range. Reformat.
3882 (poplevel): Call expand_end_java_handler().
3883 (poplevel): Call java_add_stmt only if functionbody is false.
3884 (maybe_poplevels): Don't call maybe_end_try() from here.
3885 (end_java_method): Clear no longer used trees in function decl.
3886 (register_exception_range): New function.
3887 * java-tree.h (register_exception_range, struct eh_range): Declare.
3888
3889 2004-06-22 Andrew Haley <aph@redhat.com>
3890
3891 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3892 the otable.
3893 * check-init.c (get_variable_decl): Teach check-init about
3894 FIELD_DECLs addressed via the otable.
3895 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3896 CLASS_PARSED_P.
3897
3898 2004-05-28 Andrew Haley <aph@redhat.com>
3899
3900 * jcf-parse.c (load_class): Don't try to read a class that we've
3901 already read.
3902
3903 * expr.c (build_invokeinterface): Use the old-fashioned way of
3904 doing indirect dispatch: look up interfaces by name.
3905 * java-tree.h (enum java_tree_index): Add
3906 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3907 * decl.c (java_init_decl_processing): Add
3908 soft_lookupinterfacemethodbyname_node.
3909
3910 * gjavah.c (print_method_info): Final methods have vtable entries,
3911 so gjavah needs to output them.
3912 * class.c (layout_class_method): Generate vtable entries for final
3913 methods.
3914 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3915 dispatch, even if a method is final.
3916
3917 2004-05-25 Andrew Haley <aph@redhat.com>
3918
3919 * class.c (build_symbol_entry): Convert the names of constructors
3920 to init_identifier_node when generating an entry for the indirect
3921 dispatch table.
3922
3923 * expr.c (build_known_method_ref): Generate indirect calls for
3924 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3925
3926 2004-05-24 Andrew Haley <aph@redhat.com>
3927
3928 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3929 atable element is of the right type.
3930
3931 * class.c (build_static_field_ref): Cast pointer to correct type
3932 for field.
3933
3934 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
3935
3936 * Merged with HEAD as of 20040514. Diff against
3937 gcj-abi-2-merge-20040514.
3938
3939 2004-04-16 Andrew Haley <aph@redhat.com>
3940
3941 * verify.c (check_pending_block): Disable subroutine checks.
3942 (defer_merging): New function.
3943 (merge_types): If types are dummy, use defer_merging to combine them.
3944 (verify_jvm_instructions): If invocation is invokeinterface and
3945 target is dummy, assume target really is an interface.
3946
3947 * parse.y (patch_invoke): Break out call to java_create_object.
3948
3949 * lang.c (flag_verify_invocations): New.
3950
3951 * jcf-parse.c (load_class): If we've already failed to load a
3952 class, don't try again.
3953 (load_class): If we can't find a .class file, don't fail, but emit
3954 a warning.
3955 (parse_class_file): Don't act on dummy methods.
3956
3957 * java-tree.h (flag_verify_invocations): New.
3958 (TYPE_DUMMY): New.
3959 (lang_type.dummy_class): New field.
3960 (java_create_object): New function.
3961 (METHOD_DUMMY): New.
3962
3963 * expr.c (build_field_ref): Widen field offset.
3964 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3965 that each of its elements is compatible with the one we're
3966 popping.
3967 (pop_type_0): Issue a warning to say that we need to generate a
3968 runtime check.
3969 (java_create_object): New function.
3970 (build_field_ref): Only generate hard refs if we're not using
3971 indirect dispatch.
3972 (expand_java_field_op): If we're using !verify_invocations and we
3973 see a missing field, generate a decl for it.
3974
3975 (expand_invoke): If a class doesn't have the method we seek and
3976 we're using !flag_verify_invocations, generate a decl for the
3977 method now.
3978
3979 (build_known_method_ref): Always use indirect dispatch via the
3980 atable for static methods.
3981
3982 (expand_java_NEW): Break out object creation into new function,
3983 java_create_object.
3984
3985 (can_widen_reference_to): Issue a warning to say that we need to
3986 generate a runtime check.
3987
3988 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3989 (make_method_value): Also use index for interfaces.
3990 (make_class_data): Skip dummy field for inherited data.
3991 Don't build method array for dummy methods.
3992 Set size_in_byte to -1 when using inirect dispatch
3993 Don't build a hard class ref if we don't have a hard ref to our
3994 superclass, or if we're using inirect dispatch.
3995 Null out dispatch tables.
3996
3997 (layout_class_method): Don't complain about non-static method
3998 overrides static method is method is artificial.
3999
4000 (build_static_field_ref): Disable atable references to static
4001 fields for the time being.
4002
4003 (layout_class_methods): Check for CLASS_INTERFACE as
4004 well as CLASS_ABSTRACT.
4005
4006 2004-11-24 Steven Bosscher <stevenb@suse.de>
4007
4008 * class.c (make_class_data): Don't check flag_inline_functions.
4009 * lang.c (flag_really_inline): Remove unused flag.
4010 (java_handle_option): Don't set it here. Remove special handling
4011 of flag_inline_functions for Java.
4012 (java_init): Don't set flag_inline_trees here. Already done...
4013 (java_post_options): ...here. Don't clear flag_inline_functions.
4014
4015 2004-11-24 Steven Bosscher <stevenb@suse.de>
4016
4017 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4018 (java_gimplify_exit_block_expr): New function.
4019 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4020 LABELED_BLOCK_EXPR.
4021 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4022 (EXIT_BLOCK_EXPR): Likewise.
4023 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4024 (LABELED_BLOCK_BODY): Likewise.
4025 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4026 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4027 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
4028 TREE_OPERAND.
4029 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4030 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4031 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
4032 second operand of EXIT_BLOCK_EXPR.
4033 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4034 TREE_OPERAND.
4035 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4036
4037 2004-11-23 Ben Elliston <bje@au.ibm.com>
4038
4039 * xref.h (xref_flag_value): Remove.
4040 (xref_set_data, xref_get_data): Likewise.
4041 (xref_set_current_fp): Likewise.
4042 (XREF_NONE): Likewise.
4043 (XREF_GET_DATA): Likewise.
4044 * xref.c (xref_flag_value): Remove.
4045 (xref_set_data, xref_get_data): Likewise.
4046 (xref_set_current_fp): Likewise.
4047
4048 2004-11-23 Ben Elliston <bje@au.ibm.com>
4049
4050 * gjavah.c (output_directory): Make static.
4051 (temp_directory): Likewise.
4052
4053 2004-11-15 Tom Tromey <tromey@redhat.com>
4054
4055 * decl.c (instn_ptr_type_node): Removed.
4056 (lineNumbers_ptr_type_node): Removed.
4057 (jint_type): Removed.
4058 (jint_ptr_type): Removed.
4059
4060 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
4061
4062 PR java/15576
4063 * check-init.c (check_init): Ignore DECL_EXPR.
4064 * expr.c (always_initialize_class_p): Reenable.
4065 (build_class_init): Use a variable to store the decl. Also use
4066 boolean_false_node instead of integer_zero_node.
4067 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4068 to the block.
4069
4070 2004-11-08 Tom Tromey <tromey@redhat.com>
4071
4072 PR java/16843:
4073 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4074 generating a JNI header.
4075 (print_field_info): Handle JNI headers.
4076 (jni_print_float): Likewise.
4077 (jni_print_double): Likewise.
4078
4079 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
4080
4081 * decl.c (end_java_method): Remove duplicated code.
4082
4083 2004-11-06 Zack Weinberg <zack@codesourcery.com>
4084 Gerald Pfeifer <gerald@pfeifer.com>
4085
4086 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4087 as well.
4088
4089 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
4090
4091 PR java/17265
4092 * class.c: Reinstate 2004-08-18 patch.
4093 (make_local_function_alias): Don't create an alias for extern (native)
4094 functions.
4095
4096 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
4097
4098 PR java/17265
4099 * class.c (make_local_function_alias): Revert 2004-08-18 change.
4100 (make_method_value): Likewise.
4101
4102 2004-10-21 Andrew Haley <aph@redhat.com>
4103
4104 PR java/18091:
4105 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4106
4107 2004-10-20 Andrew Haley <aph@redhat.com>
4108
4109 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4110 Remove duplicated code block.
4111
4112 2004-10-18 Steven Bosscher <stevenb@suse.de>
4113
4114 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4115 New rules to work around old Bison warnings.
4116
4117 2004-10-17 Steven Bosscher <stevenb@suse.de>
4118
4119 * class.c (ident_subst): Always alloca buffer.
4120 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4121 opcode after including javaop.def.
4122 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4123 conditional expression that exits, to avoid warnings.
4124 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4125 a user of an extension.
4126 * win32-host.c: Move check down to have non-empty file when
4127 WIN32 is not defined.
4128
4129 * Make-lang.in (java-warn): Add STRICT_WARN.
4130 (java/jcf-io.o-warn): Don't have Werror for this file.
4131 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4132
4133 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
4134
4135 * expr.c (expr_add_location): Move declaration to before all
4136 statements.
4137 * parse.y (java_expand_classes): Ditto.
4138 * lex.c (java_peek_unicode): Ditto.
4139
4140 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4141
4142 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4143 if possible, else convert `foo' to 'foo'.
4144 * class.c: Likewise.
4145 * decl.c: Likewise.
4146 * expr.c: Likewise.
4147 * jcf-io.c: Likewise.
4148 * jcf-parse.c: Likewise.
4149 * lang.c: Likewise.
4150 * lex.c: Likewise.
4151 * parse.h: Likewise.
4152
4153 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4154
4155 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4156 rename parameter 'msg' to 'msgid' in function declaration.
4157 (issue_warning_error_from_context): Likewise.
4158 (yyerror): Rename parameter 'msg' to 'msgid'.
4159 (all over): Use new quoting style for diagnostics.
4160
4161 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
4162
4163 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4164 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4165 Update copyright.
4166
4167 2004-10-14 Matt Austern <austern@apple.com>
4168
4169 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4170 pointer_set_t* now.
4171
4172 2004-10-13 Tom Tromey <tromey@redhat.com>
4173
4174 PR java/15578:
4175 * lang.opt (--extdirs): Document.
4176 * jvspec.c (lang_specific_driver): Recognize -encoding and
4177 -extdirs.
4178
4179 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
4180
4181 * parse.y (issue_warning_error_from_context): Use va_list *
4182 instead of va_list parameter.
4183 (parse_error_context): Update call.
4184 (parse_warning_context): Likewise.
4185
4186 2004-10-05 Zack Weinberg <zack@codesourcery.com>
4187
4188 * parse.y, parse-scan.y: Add list of diagnostic messages to
4189 insulate translation template from version of yacc/bison used
4190 to compile the grammar.
4191
4192 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
4193
4194 Prepare for %q, %< and %> in diagnostic message strings.
4195 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4196 Name second parameter 'msgid'.
4197 * parse.y: Additionally include pretty-print.h and diagnostic.h.
4198 (issue_warning_error_from_context): Use pretty-printer functions
4199 instead of vsprintf for constructing formatted messages. Rename
4200 parameter 'msg' to 'msgid'.
4201 (parse_error_context): Rename parameter 'msg' to 'msgid'.
4202 (parse_warning_context): Likewise.
4203
4204 2004-10-05 Andrew Haley <aph@redhat.com>
4205
4206 PR java/17779
4207 * jcf-parse.c (parse_zip_file_entries): If a class has a
4208 superclass and a TYPE_SIZE of zero, lay it out.
4209
4210 2004-09-30 Andrew Haley <aph@redhat.com>
4211
4212 PR java/17733
4213 * jcf-parse.c (compute_class_name): Rewrite.
4214
4215 2004-10-01 Jan Hubicka <jh@suse.cz>
4216
4217 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4218
4219 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4220
4221 * lex.c: Fix a comment typo.
4222
4223 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4224
4225 * java-tree.h: Fix a comment typo.
4226
4227 2004-09-30 Per Bothner <per@bothner.com>
4228
4229 Simplify lexer. Implement --enable-mapped-location support.
4230 * jcf-parse.c (parse_class_file): Use linemap_line_start.
4231 (parse_source_file_1): Pass filename as extra parameter, so we can call
4232 linemap_add and set input_location here, rather than in both callers.
4233 (read_class): Pass copied filename to parse_source_file_1.
4234 Don't initialize wfl_operator - only needed for source compilation.
4235 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
4236 * lex.h: Remove a bunch of debugging macros.
4237 * lex.h (struct_java_line, struct java_error): Remove types.
4238 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
4239 (struct java_lc_s): Remove prev_col field.
4240 (struct java_lexer): New fields next_unicode, next_columns, and
4241 avail_unicode. New position field, and maybe token_start field.
4242 Don't need hit_eof field - use next_unicode == -1 instead.
4243 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
4244 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
4245 * parse.h: Various changes for USE_MAPPED_LOCATION.
4246 (EXPR_WFL_EMIT_LINE_NOTE): XXX
4247 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
4248 (struct parser_ctxt): New file_start_location field.
4249 Remove p_line, c_line fields since we no longer save lines.
4250 Remove elc, lineno, and current_jcf fields - no longer used.
4251 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
4252 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
4253 source_location and is probably not needed anymore anyway.
4254 Use new expr_add_Location function.
4255 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
4256 (java_pop_parser_context): Minor cleanup.
4257 (java_parser_context_save_global, java_parser_context_restore_global,
4258 java_pop_parser_context): Save/restore input_location as a unit.
4259 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
4260 a source_location instead of a wfl context node.
4261 (check_class_interface_creation): input_filename is not addressable.
4262 (create_artificial_method): Calling java_parser_context_save_global
4263 and java_parser_context_restore_global is overkill. Instead,
4264 temporarily set input_location from class decl.
4265 (java_layout_seen_class_methods): Set input_location from method decl.
4266 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4267 (finish_loop_body): Likewise.
4268 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
4269 (java_sprint_unicode): Take a character, not index in line.
4270 (java_sneak_uncode): Replaced by java_peek_unicode.
4271 (java_unget_unicode): No longer used.
4272 (java_allocate_new_line. java_store_unicode): Removed, since we
4273 no longer remember "lines".
4274 (java_new_lexer): Update for new data structures.
4275 (java_read_char): Move unget_value checking to java_read_unicode.
4276 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4277 efficient functions that are used directly when lexing.
4278 (java_read_unicode_collapsing_terminators): No longer needed.
4279 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4280 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4281 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
4282 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
4283 combine switch branches, and test for common token kinds earlier.
4284 (java_lex_error): Rewrite.
4285 * jv-scan.c (expand_location): New function, copied from tree.c.
4286 (main): Set ctxp->filename instead of setting input_filename directly.
4287
4288 2004-09-30 Per Bothner <per@bothner.com>
4289
4290 More cleanup for --enable-mapped-location.
4291 * class.c (push_class): If USE_MAPPED_LOCATION don't set
4292 input_location here. Instead do it in give_name_to_class.
4293 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4294 * expr.c (expand_byte_code): Call linemap_line_start.
4295 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
4296 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
4297 (expr_add_location): New function, if USE_MAPPED_LOCATION.
4298 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
4299 to USE_MAPPED_LOCATION case.
4300
4301 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
4302 * jcf-parse.c (java_parse_file): Don't set input_filename.
4303 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4304 Create a list of TRANSLATION_UNIT_DECL.
4305 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
4306 reason is so we can set a DECL_SOURCE_LOCATION for each file.
4307 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
4308 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
4309 (file_start_location): New static.
4310 (set_source_filename): Avoid extra access to input_filename macro.
4311 Concatenate new name with class's package prefix.
4312 (set_source_filename, give_name_to_class): Update.
4313 (give_name_to_class): Set class's "line 0" input_location here.
4314 (parse_class_file): Set input_location as a unit.
4315
4316 * jcf-parse.c (load_class): Sanity test if missing inner class file.
4317
4318 2004-09-29 Per Bothner <per@bothner.com>
4319
4320 * java-tree.h: Redefine some macros and add some declaration
4321 to handle the USE_MAPPED_LOCATION case.
4322 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
4323 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
4324 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
4325 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
4326
4327 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
4328 * decl.c (finish_method, java_add_stmt): Likewise.
4329 * java-gimplify.c (java-gimplify.c): Likewise.
4330 * jcf-write.c (generate_bytecode_insns): Likewise.
4331 * lang.c (java_post_options): Likewise - call linemap_add.
4332
4333 2004-09-29 Andrew Haley <aph@redhat.com>
4334
4335 PR java/17007
4336 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
4337 result of TRUNC_MOD_EXPR.
4338 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
4339 * decl.c (java_init_decl_processing): Mark
4340 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
4341
4342 2004-09-28 Tom Tromey <tromey@redhat.com>
4343
4344 PR java/15710:
4345 * class.c (add_miranda_methods): Load superinterface if not
4346 already loaded.
4347
4348 2004-09-28 Andrew Haley <aph@redhat.com>
4349
4350 PR java/17586
4351 * jcf-parse.c (load_class): Don't try to read a class that we've
4352 already read.
4353
4354 2004-09-28 Andrew Haley <aph@redhat.com>
4355
4356 * jcf-parse.c (load_class): Back out previous broken patch.
4357
4358 2004-09-28 Andrew Haley <aph@redhat.com>
4359
4360 PR java/17586
4361 * jcf-parse.c (load_class): Don't try to read a class that we've
4362 already read.
4363 Check that we really did read the right class.
4364
4365 2004-09-25 Tom Tromey <tromey@redhat.com>
4366
4367 PR java/17500:
4368 * parse.y (create_artificial_method): Use add_method_1.
4369
4370 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
4371
4372 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
4373 comment typos.
4374 * gcj.texi: Fix typos.
4375
4376 2004-09-24 Tom Tromey <tromey@redhat.com>
4377
4378 PR java/15656:
4379 * parse.y (class_instance_creation_expression): Set `$$' to NULL
4380 in error parts of rule.
4381 (unary_expression): Don't call error_if_numeric_overflow when $1
4382 is NULL.
4383
4384 2004-09-24 Tom Tromey <tromey@redhat.com>
4385
4386 PR java/16789:
4387 * parse.y (resolve_qualified_expression_name): Set
4388 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
4389 * expr.c (force_evaluation_order): Check for empty argument list
4390 after stripping COMPOUND_EXPR.
4391
4392 2004-09-23 Andrew Haley <aph@redhat.com>
4393
4394 PR java/16927:
4395 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4396 COND_EXPRs.
4397
4398 2004-09-23 Tom Tromey <tromey@redhat.com>
4399
4400 PR java/17329:
4401 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4402 where operand is null.
4403
4404 2004-09-23 Tom Tromey <tromey@redhat.com>
4405
4406 PR java/17380:
4407 * parse.y (not_accessible_p): Allow access to protected members
4408 even when class is not static.
4409
4410 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
4411
4412 * Make-lang.in: Revert the gcc-none.o change.
4413
4414 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
4415
4416 * parse.y (patch_anonymous_class): VEC_space returns true if there
4417 is space.
4418
4419 2004-09-21 Matt Austern <austern@apple.com>
4420
4421 Fix bootstrap.
4422 * gjavah.c (free_method_name_list): Fix function definition so
4423 it's a proper C prototype.
4424
4425 2004-09-21 Tom Tromey <tromey@redhat.com>
4426
4427 PR java/17575:
4428 * gjavah.c (free_method_name_list): New method.
4429 (main): Call it.
4430
4431 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
4432 Zack Weinberg <zack@codesourcery.com>
4433
4434 * java-tree.def: Use tree_code_class enumeration constants
4435 instead of code letters.
4436 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4437 new tree-class enumeration constants.
4438
4439 2004-09-13 Tom Tromey <tromey@redhat.com>
4440
4441 PR java/17216:
4442 * class.c (layout_class_method): Put synthetic methods into the
4443 vtable.
4444
4445 2004-09-11 Andrew Pinski <apinski@apple.com>
4446
4447 * Make-lang.in (java/ggc-none.c): Change dependency
4448 for ggc.h into $(GGC_H).
4449
4450 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
4451
4452 * Make-lang.in (java/win32-host.o): Add dependency on
4453 coretypes.h.
4454 * win32-host.c: Add includes for coretypes.h, jcf.h
4455
4456 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
4457
4458 * Make-lang.in (GCJH_OBJS): Change dependency from
4459 ggc-none.o to java/ggc-none.o
4460 (JCFDUMP_OBJS): Likewise.
4461 (java/ggc-none.o): New target.
4462
4463 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4464
4465 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
4466 * class.c (build_utf8_ref, build_static_field_ref,
4467 make_field_value, make_method_value, get_dispatch_table,
4468 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4469 * constants.c (get_tag_node, build_ref_from_constant_pool,
4470 build_constants_constructor): Likewise.
4471 * decl.c (java_init_decl_processing): Likewise.
4472 * expr.c (build_java_array_length_access, build_newarray,
4473 expand_java_multianewarray, expand_java_pushc, expand_iinc,
4474 build_java_binop, build_field_ref, expand_java_add_case,
4475 expand_java_call, build_known_method_ref, build_invokevirtual,
4476 build_invokeinterface, build_jni_stub): Likewise.
4477 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4478 * jcf-parse.c (get_constant): Likewise.
4479 * lex.c (do_java_lex): Likewise.
4480 * parse.y (patch_binop, patch_unaryop, patch_cast,
4481 build_newarray_node, patch_newarray): Likewise.
4482 * resource.c (compile_resource_data): Likewise.
4483 * typeck.c (build_prim_array_type): Likewise.
4484
4485 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4486
4487 * decl.c (java_init_decl_processing): Adjust
4488 initialize_sizetypes call.
4489
4490 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
4491
4492 * jv-scan.c (fancy_abort): Add.
4493
4494 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
4495
4496 * expr.c (build_java_arrayaccess): Use convert to change
4497 len's type.
4498
4499 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
4500
4501 * class.c (make_local_function_alias): Allocate extra space for 'L'
4502 in name buffer. Reported by Thomas Neumann.
4503
4504 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4505
4506 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
4507 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
4508 * lex.c (do_java_lex): Adjust.
4509 (error_if_numeric_overflow): Likewise.
4510
4511 2004-08-18 Andrew Pinski <apinski@apple.com>
4512
4513 * class.c (make_local_function_alias): Only make a new decl if we
4514 support alias attribute on all decls.
4515
4516 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
4517
4518 * class.c (make_local_function_alias): New function. Create local
4519 alias for public method DECL.
4520 (make_method_value): Use make_local_function_alias.
4521 * parse.y (craft_constructor): Don't special-case anonymous classes.
4522 Always set ctor_name to init_identifier_node.
4523 (lookup_method_invoke): Call layout_class_method when creating
4524 anonymous class constructor.
4525
4526 2004-08-18 Richard Henderson <rth@redhat.com>
4527
4528 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4529 default case. Treat '<' similarly. Update for
4530 is_gimple_formal_tmp_var name change.
4531
4532 2004-08-17 Andrew Haley <aph@redhat.com>
4533
4534 * lang.c (lang_printable_name): Obey verbose flag.
4535 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4536 lang_printable_name().
4537 (verify_constructor_circularity, get_printable_method_name,
4538 check_abstract_method_definitions, java_check_regular_methods,
4539 java_check_abstract_methods, check_inner_class_access,
4540 fix_constructors, patch_method_invocation, patch_return):
4541 Likewise.
4542 * expr.c (pop_type_0): Likewise.
4543
4544 * java-tree.h (lang_printable_name_wls): Delete.
4545
4546 2004-08-16 Tom Tromey <tromey@redhat.com>
4547
4548 PR java/8473:
4549 * parse.y (primary): Changed for initialized and uninitialized
4550 array creations.
4551 (array_access): Handle array_creation_initialized.
4552 (array_creation_expression): Split into
4553 array_creation_initialized and array_creation_uninitialized.
4554
4555 2004-08-16 Andrew Haley <aph@redhat.com>
4556
4557 * jcf-write.c (find_constant_index): Canonicalize NaNs when
4558 generating bytecode.
4559
4560 2004-08-16 Elliot Lee <sopwith@redhat.com>
4561
4562 PR java/9677
4563 * jcf-parse.c (java_parse_file): Handle filenames with embedded
4564 spaces, and quoted filelists.
4565
4566 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4567
4568 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4569 * class.c (build_utf8_ref, build_static_field_ref,
4570 make_field_value, make_method_value, get_dispatch_table,
4571 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4572 * constants.c (get_tag_node, build_ref_from_constant_pool,
4573 build_constants_constructor): Likewise.
4574 * decl.c (java_init_decl_processing): Likewise.
4575 * expr.c (build_java_array_length_access, build_newarray,
4576 expand_java_multianewarray, expand_java_pushc, expand_iinc,
4577 build_java_binop, build_field_ref, expand_java_add_case,
4578 expand_java_call, build_known_method_ref, build_invokevirtual,
4579 build_invokeinterface, build_jni_stub): Likewise.
4580 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4581 * jcf-parse.c (get_constant): Likewise.
4582 * lex.c (do_java_lex): Likewise.
4583 * parse.y (patch_binop, patch_unaryop, patch_cast,
4584 build_null_of_type, patch_newarray): Likewise.
4585 * resource.c (compile_resource_data): Likewise.
4586 * typeck.c (build_prim_array_type): Likewise.
4587
4588 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
4589
4590 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4591 Don't create BLOCK here or call java_gimplify_block.
4592
4593 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
4594
4595 * java-tree.h (flag_deprecated): Removed.
4596 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4597 * parse.y (check_deprecation): Check warn_deprecated instead of
4598 flag_deprecated.
4599
4600 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
4601
4602 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4603 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4604 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4605 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4606 flag_force_classes_archive_check, flag_optimize_sci,
4607 flag_indirect_dispatch): Remove explicit declarations.
4608 * lang.opt: Add implicit declare/define/assign. Remove obsolete
4609 final comment.
4610
4611 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
4612
4613 PR bootstrap/14893
4614 * Make-lang.in (java.install-man): Install from either build
4615 tree or source tree, whichever has the file first.
4616
4617 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4618
4619 * jcf-parse.c (get_constant): Adjust force_fit_type call.
4620 * lex.h (SET_LVAL_NODE_TYPE): Remove.
4621 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4622 (do_java_lex): Likewise. Adjust force_fit_type call.
4623
4624 2004-08-04 Roger Sayle <roger@eyesopen.com>
4625 Andrew Haley <aph@redhat.com>
4626
4627 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4628 checking trees as they're being built.
4629 (convert): Call convert_ieee_real_to_integer if we're
4630 converting a constant, even if we're writing a class file.
4631
4632 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
4633
4634 PR java/16701
4635 * parse.y (fold_constant_for_init): Call resolve_field_access with
4636 correct current_class context.
4637
4638 2004-08-01 Roger Sayle <roger@eyesopen.com>
4639
4640 * decl.c (update_aliases, initialize_local_variable): Replace calls
4641 to build with calls to buildN.
4642 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4643 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4644 * parse.h (BUILD_THROW): Likewise.
4645 * parse.y (switch_expression, synchronized_statement,
4646 catch_clause_parameter, array_creation_expression,
4647 conditional_expression, make_qualified_name,
4648 resolve_qualified_expression_name, patch_method_invocation,
4649 patch_invoke, build_method_invocation, build_new_invocation,
4650 build_assignment, patch_assignment, build_binop, patch_binop,
4651 build_string_concatenation, build_incdec, patch_unaryop,
4652 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4653 patch_return, build_if_else_statement, build_labeled_block,
4654 build_new_loop, build_loop_body, build_bc_statement,
4655 build_assertion, encapsulate_with_try_catch, build_try_statement,
4656 build_try_finally_statement, patch_synchronized_statement,
4657 emit_test_initialization): Likewise, replace build with buildN.
4658
4659 2004-07-28 Eric Christopher <echristo@redhat.com>
4660
4661 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4662 (java_unsafe_for_reeval): Ditto.
4663
4664 2004-07-26 <hp@bitrange.com>
4665
4666 * parse.y (build_super_invocation): Adjust declaration order to
4667 avoid declaration after statement.
4668
4669 2004-07-25 Bernardo Innocenti <bernie@develer.com>
4670
4671 * decl.c: Rename all identifiers named `class' to `cl'.
4672
4673 2004-07-25 Richard Henderson <rth@redhat.com>
4674
4675 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4676
4677 2004-07-23 Mike Stump <mrs@apple.com>
4678
4679 * boehm.c (set_bit): Improve type safety wrt unsignedness.
4680 * gjavah.c (throwable_p, decode_signature_piece,
4681 print_full_cxx_name, print_include, add_namelet, add_class_decl,
4682 process_file): Likewise.
4683 * jcf-dump.c (main): Likewise.
4684 * jcf-io.c (read_zip_member): Likewise.
4685 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4686 give_name_to_class, get_class_constant): Likewise.
4687 * jcf-write.c (find_constant_wide, push_long_const,
4688 generate_classfile): Likewise.
4689 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4690 * parse.y (read_import_dir): Likewise.
4691 * typeck.c (parse_signature_type): Likewise.
4692 * verify.c (verify_jvm_instructions): Likewise.
4693 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4694
4695 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4696
4697 * Make-lang.in: Replace rmic and rmiregistry references with
4698 grmic and grmiregistry.
4699 * gcj.texi: Likewise.
4700
4701 2004-07-20 Andrew Haley <aph@redhat.com>
4702
4703 PR java/16431.
4704 * verify.c (verify_jvm_instructions): Comment change only.
4705
4706 * typeck.c (build_java_array_type): Add size field to array name.
4707
4708 * java-tree.h (LOCAL_SLOT_P): New.
4709 (update_aliases): Add PC argument.
4710 (pushdecl_function_level): New function.
4711
4712 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4713 MODIFY_EXPR, and SAVE_EXPR.
4714 (java_gimplify_modify_expr): New function.
4715
4716 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4717 (expand_iinc): Pass PC to update_aliases().
4718 (STORE_INTERNAL): Likewise.
4719 (process_jvm_instruction): Likewise.
4720
4721 * decl.c (base_decl_map): New variable.
4722 (uniq): New variable.
4723 (update_aliases): Rewrite with more thorough checking.
4724 (debug_variable_p): New function.
4725 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4726 (check_local_named_variable): Delete whole function.
4727 (initialize_local_variable): New function.
4728 (check_local_unnamed_variable): Add checks and comments.
4729 (find_local_variable): Rewrite.
4730 (java_replace_reference): New function.
4731 (function_binding_level): New variable.
4732 (pushdecl_function_level): New function.
4733 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4734 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4735 (start_java_method): Reset uniq. Create base_decl_map. Set
4736 function_binding_level.
4737 (end_java_method): Null unused fields to save memory.
4738
4739 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4740
4741 * class.c (add_interface_do): Remove.
4742 (set_super_info, interface_of_p, maybe_add_interface,
4743 add_interface, make_class_data, layout_class,
4744 add_miranda_methods): Adjust BINFO accessors and addition.
4745 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4746 accessors.
4747 * jcf-write.c (generate_classfile): Likewise.
4748 * parse.y (patch_anonymous_class, check_inner_circular_reference,
4749 check_circular_reference, java_complete_class,
4750 check_abstract_method_definitions,
4751 java_check_abstract_method_definitions,
4752 check_interface_throws_clauses, java_check_abstract_methods,
4753 lookup_java_interface_method2,
4754 find_applicable_accessible_methods_list): Adjust BINFO accessors
4755 and addition.
4756 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4757
4758 2004-07-18 Roger Sayle <roger@eyesopen.com>
4759
4760 * builtins.c (max_builtin, min_builtin,
4761 java_build_function_call_expr): Replace calls to build with buildN.
4762 * class.c (build_class_ref, build_static_field_ref,
4763 get_dispatch_table, make_class_data, layout_class_method): Likewise.
4764 * constants.c (build_ref_from_constant_pool): Likewise.
4765 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4766 add_stmt_to_compound): Likewise.
4767 * except.c (build_exception_object_ref, expand_end_java_handler):
4768 Likewise.
4769 * java-gimplify.c (java_gimplify_case_expr,
4770 java_gimplify_default_expr, java_gimplify_block,
4771 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4772 * jcf-write.c (generate_bytecode_insns): Likewise.
4773 * typeck.c (convert_ieee_real_to_integer): Likewise.
4774
4775 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4776
4777 * java-tree.h (builtin_function): Declare.
4778
4779 2004-07-16 Steven Bosscher <stevenb@suse.de>
4780
4781 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4782 abuse restore_line_number_status.
4783
4784 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
4785
4786 g++/15861
4787 * jcf-parse.c (java_emit_static_constructor): Specify default
4788 priority.
4789
4790 2004-07-13 Per Bothner <per@bothner.com>
4791
4792 * java-tree.h (all_class_filename): Remove useless macro.
4793 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
4794 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
4795 * parse.y (java_parser_context_restore_global): Replace
4796 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4797 * jcf-parse.c (read_class, java_parse_file): Likewise.
4798
4799 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
4800
4801 PR java/16474
4802 gjavah.c (print_field_info): Emit constant only if field is static.
4803
4804 2004-07-11 Roger Sayle <roger@eyesopen.com>
4805
4806 * expr.c (java_truthvalue_conversion, flush_quick_stack,
4807 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4808 build_java_ret, build_java_throw_out_of_bounds_exception,
4809 build_java_array_length_access, java_check_reference,
4810 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4811 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4812 expand_java_arrayload, build_java_monitor, expand_java_return,
4813 expand_load_internal, expand_java_NEW, build_get_class,
4814 build_instanceof, expand_java_CHECKCAST, expand_iinc,
4815 build_java_soft_divmod, build_java_binop, build_field_ref,
4816 expand_compare, expand_java_goto, expand_java_switch,
4817 expand_java_add_case, build_class_init, build_known_method_ref,
4818 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4819 expand_invoke, build_jni_stub, expand_java_field_op,
4820 java_expand_expr, expand_byte_code, STORE_INTERNAL,
4821 force_evaluation_order, emit_init_test_initialization): Convert
4822 calls to "build" into calls to the prefered "buildN" functions.
4823
4824 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4825
4826 * java-tree.h (set_block): Remove.
4827 * lang.c (java_clear_binding_stack): New.
4828 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4829 * decl.c (struct binding_level): Remove this_block.
4830 (clear_binding_level): Likewise.
4831 (poplevel): Don't handle this_block.
4832 (set_block): Remove.
4833
4834 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
4835
4836 * class.c (common_enclosing_context_p): Remove statement with no
4837 side-effects.
4838
4839 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4840
4841 PR java/8618
4842 * parse.y (create_anonymous_class): Remove 'location' argument. Use
4843 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4844 (craft_constructor): Inherit access flags for implicit constructor
4845 from the enclosing class.
4846 (create_class): Fix comment typo.
4847 (resolve_qualified_expression_name): Pass type of qualifier to
4848 not_accessible_p, not the type in which target field was found.
4849 (not_accessible_p): Handle inner classes. Expand protected
4850 qualifier-subtype check to enclosing instances, but don't apply this
4851 check to static members. Allow protected access to inner classes
4852 of a subtype. Allow private access within common enclosing context.
4853 (build_super_invocation): Get WFL line number info from current
4854 class decl.
4855 (build_incomplete_class_ref): Update for new create_anonymous_class
4856 signature.
4857 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4858 common_enclosing_instance_p.
4859 * class.c (common_enclosing_context_p): New. Determine if types
4860 share a common enclosing context, even across static contexts.
4861 (common_enclosing_instance_p): Renamed from
4862 common_enclosing_context_p. Determines if types share a common
4863 non-static enclosing instance.
4864 * java-tree.h (common_enclosing_instance_p): Declare.
4865 * jcf-write.c (get_method_access_flags): New. Surpress private flag
4866 for inner class constructors.
4867 (generate_classfile): Use get_method_access_flags.
4868
4869 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4870
4871 * class.c (interface_of_p): Check for null TYPE_BINFO.
4872
4873 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
4874
4875 * class.c (make_class): Do not create binfo here.
4876 (set_super_info): Create it here.
4877 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4878
4879 2004-07-08 Richard Henderson <rth@redhat.com>
4880
4881 * expr.c (case_identity, get_primitive_array_vtable,
4882 java_expand_expr, emit_init_test_initialization): Remove.
4883 * java-tree.h (java_expand_expr): Remove.
4884 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4885
4886 2004-07-07 Per Bothner <per@bothner.com>
4887
4888 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
4889 get internal error due to mismatched types.
4890
4891 * gcj.texi (Invoking gij): Document new -verbose:class flag.
4892
4893 * gcj.texi (Linking): New node. Document -lgij usage.
4894
4895 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4896
4897 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4898 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4899 * java/class.c (set_super_info, class_depth, interface_of_p,
4900 maybe_add_interface, add_interface, make_class_data,
4901 layout_class, add_miranda_methods): Adjust BINFO macros.
4902 * expr.c (can_widen_reference_to, lookup_field): Likewise.
4903 * jcf-write.c (generate_classfile): Likewise.
4904 * parse.y (patch_anonymous_class,
4905 check_inner_circular_reference, check_circular_reference,
4906 java_complete_class, check_abstract_method_definitions,
4907 java_check_abstract_method_definitions,
4908 check_interface_throws_clauses, java_check_abstract_methods,
4909 lookup_java_interface_method2,
4910 find_applicable_accessible_methods_list): Likewise.
4911 * typeck.c (find_method_in_interface): Likewise.
4912 * verify.c (merge_types): Likewise.
4913
4914 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4915
4916 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4917 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4918
4919 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4920
4921 * class.c (make_class): Use make_tree_binfo.
4922 (set_super_info, add_interface_do): Likewise.
4923 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4924
4925 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4926
4927 * verify.c: Correct array element access formatting thinko.
4928
4929 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4930
4931 * verify.c: Insert a short blurb at the start referring to the JVMS.
4932 (merge_type_state): Remove redundant nested if statement.
4933 (verify_jvm_instructions): Ensure current_subr is initialised to
4934 NULL_TREE.
4935 Minor formatting fixes all over the place.
4936
4937 2004-07-02 Richard Henderson <rth@redhat.com>
4938
4939 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4940
4941 2004-07-01 Richard Henderson <rth@redhat.com>
4942
4943 * class.c (registerClass_libfunc): Remove.
4944 (init_class_processing): Don't set it.
4945 (emit_register_classes): Take list_p parameter. Fill it in
4946 with _Jv_RegisterClass calls.
4947 * decl.c (java_init_decl_processing): Don't call
4948 init_resource_processing.
4949 * jcf-parse.c (java_emit_static_constructor): New.
4950 (java_parse_file): Call it.
4951 * resource.c (registerResource_libfunc): Remove.
4952 (init_resource_processing): Remove.
4953 (write_resource_constructor): Take list_p parameter. Fill it in
4954 with _Jv_RegisterResource calls.
4955 * java-tree.h: Update prototypes.
4956
4957 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
4958
4959 PR java/1262
4960 * class.c (layout_class_method): Do not override package-private
4961 method if its in a different package.
4962 (split_qualified_name): Move here from parse.y. Rename from
4963 breakdown_qualified. Add comment.
4964 (in_same_package): Move here from parse.y. Add comment.
4965 * java-tree.h (break_down_qualified, in_same_package): Declare.
4966 (in_same_package): Likewise.
4967 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4968 Callers updated.
4969
4970 2004-06-29 Andrew Haley <aph@redhat.com>
4971
4972 * except.c (expand_start_java_handler): Push a new binding level.
4973 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4974 register_exception_range() to register where we'll do it.
4975 (expand_end_java_handler): Remove old bogus code. Replace with
4976 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4977 the top of the expression we're curently building.
4978 (maybe_end_try): Delete.
4979 * decl.c (binding_level.exception_range): New field.
4980 (clear_binding_level): Add field exception_range. Reformat.
4981 (poplevel): Call expand_end_java_handler().
4982 (poplevel): Call java_add_stmt only if functionbody is false.
4983 (maybe_poplevels): Don't call maybe_end_try() from here.
4984 (end_java_method): Clear no longer used trees in function decl.
4985 (register_exception_range): New function.
4986 * java-tree.h (register_exception_range, struct eh_range): Declare.
4987
4988 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
4989
4990 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4991
4992 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
4993
4994 Formatting fixes.
4995 * expr.c (class_has_finalize_method): Fix method name indentation.
4996 (expand_java_call): Remove K&R style parameter declaration.
4997 (expand_invoke): Fix statement indentation.
4998 (expand_java_field_op): Likewise.
4999 * parse-scan.y: Fix typo.
5000 (reset_report): Fix method name indentation.
5001 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5002 line. Fix typos.
5003 * verify.c (verify_jvm_instructions): Document parameters, insert
5004 page break.
5005 * lang.c (lang_init_source): Fix method name indentation.
5006 * class.c (common_enclosing_context_p): Likewise.
5007 (emit_symbol_table): Fix parameter list indentation.
5008 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5009 parameter declaration.
5010 * constants.c: Fix copyright notice indentation.
5011 * typeck.c (find_method_in_superclasses): Fix parameter list
5012 indentation.
5013 (find_method_in_interfaces): Likewise.
5014 * zextract.c (makelong): Fix method name indentation.
5015
5016 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5017
5018 PR java/15715.
5019 * parse.y (create_interface): Set correct access modifiers for
5020 interfaces.
5021 * jcf-write.c (get_classfile_modifiers): New function.
5022 (generate_classfile): Use get_classfile_modifiers, not
5023 get_access_flags.
5024
5025 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5026
5027 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5028 dependency to current parser context, not NULL_TREE, for top-level
5029 classes.
5030 (jdep_resolve_class): Enable member access check for all inner
5031 class dependencies.
5032
5033 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5034
5035 * parse.y (qualify_and_find): Pass type decl, not identifier, to
5036 load_class.
5037
5038 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5039
5040 PR java/15734
5041 * expr.c (expand_java_field_op): Ensure that target class for static
5042 field access has been loaded.
5043
5044 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5045 Ranjit Mathew <rmathew@hotmail.com>
5046
5047 PR java/1207, java/16178
5048 * jcf-parse.c (load_class): Return immediately if passed a type decl
5049 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5050 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5051 before calling load_class.
5052 (qualify_and_find): Likewise.
5053 (find_in_imports_on_demand): Likewise.
5054 (find_applicable_accessible_methods_list): Likewise.
5055
5056 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
5057
5058 * parse.y (java_layout_seen_class_methods): Don't call load_class
5059 on class defined by source parser.
5060
5061 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
5062
5063 * parse.y (set_nested_class_simple_name_value): Removed.
5064 (java_complete_expand_class): Remove calls to
5065 set_nested_class_simple_name_value.
5066
5067 2004-06-22 Andrew Haley <aph@redhat.com>
5068 Ranjit Mathew <rmathew@hotmail.com>
5069
5070 Fixes PR java/16113.
5071 * decl.c (force_poplevels): Remove call to expand_end_bindings.
5072
5073 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
5074
5075 * parse.y (create_class): Correct diagnostic message about
5076 java.lang.Object extending anything else.
5077
5078 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5079
5080 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5081 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5082 * constants.c (build_ref_from_constant_pool): Likewise.
5083 * expr.c (build_java_array_length_access): Likewise.
5084 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5085 (invoke_build_dtable, build_invokevirtual): Likewise.
5086 (build_invokeinterface, java_expand_expr): Likewise.
5087 (emit_init_test_initialization): Likewise.
5088 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5089 * parse.y (make_qualifed_name, build_array_ref): Likewise.
5090
5091 2004-06-21 Andrew Haley <aph@redhat.com>
5092
5093 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5094 block.
5095
5096 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5097
5098 * jcf.h (struct JCF): Change java_source, right_zip and finished
5099 to unsigned int.
5100 * lex.h (struct java_lexer): Change hit_eof, read_anything,
5101 byte_swap and use_fallback to unsigned int.
5102 * parse.h (struct _jdep): Change flag0 to unsigned int.
5103
5104 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
5105
5106 Fixes PR java/13948
5107 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5108 before trying to lay out its methods.
5109 * jcf-parse.c (read_class): Track parsed files using canonical paths
5110 obtained via lrealpath from libiberty.
5111 (java_parse_file): Likewise.
5112 (parse_source_file_1): Rename formal parameter to reflect its
5113 modified purpose. Minor formatting fix.
5114
5115 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5116
5117 * class.c (emit_register_classes): Make the function uninlinable,
5118 do not set current_function_cannot_inline.
5119 * resource.c (write_resource_constructor): Do not reset
5120 flag_inline_functions around rest_of_compilation.
5121
5122 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
5123
5124 PR java/15769
5125 * expr.c (java_truthvalue_conversion): Handle
5126 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5127 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5128 i.e. return the expression.
5129
5130 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
5131
5132 * gjavah.c: Include version.h
5133
5134 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
5135
5136 * jcf-write.c (generate_bytecode_conditional): Correct handling
5137 of unordered conditionals. Add comment.
5138
5139 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
5140 Per Bothner <per@bothner.com>
5141
5142 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5143 local variable was initialised upon declaration.
5144 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5145 variable was final and initialised upon declaration.
5146 * check-init.c (check_final_reassigned): Give error only if a blank
5147 final is not definitely unassigned or if an initialised final is
5148 reassigned.
5149 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5150 assignment expressions. Remove case MODIFY_EXPR, label do_default.
5151 (check_init): Perform initialised-variable-removing-optimisation
5152 only on non-final local variables.
5153
5154 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5155
5156 * jcf-write.c (generate_bytecode_conditional): Handle binops
5157 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5158 and LTGT_EXPR.
5159 (generate_bytecode_insns): Likewise.
5160
5161 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5162
5163 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5164 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5165
5166 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5167
5168 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5169 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5170
5171 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5172
5173 * decl.c (struct binding_level): Add GTY marker. Compile
5174 binding_depth unconditionally.
5175 (current_binding_level, free_binding_level, global_binding_level):
5176 Likewise.
5177 (clear_binding_level): Unconditionally set binding_depth.
5178 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5179
5180 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5181
5182 * lex.c (java_new_lexer): Set 'encoding'.
5183 (java_read_char): Improve error message for unrecognized characters.
5184 * lex.h (struct java_lexer): New field 'encoding'.
5185
5186 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5187
5188 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5189
5190 2004-05-21 Mark Wielaard <mark@klomp.org>
5191
5192 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5193 extern.
5194
5195 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
5196
5197 * typeck.c: Remove non-printable character 160.
5198
5199 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
5200
5201 * check-init.c: Correct minor typos.
5202
5203 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5204
5205 * Make-lang.in, expr.c, java-gimplify.c: Rename
5206 tree-simple.[ch] to tree-gimple.[ch].
5207
5208 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
5209
5210 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5211
5212 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5213
5214 Merge from tree-ssa-20020619-branch. See
5215 ChangeLog.tree-ssa for details.
5216
5217 * Make-lang.in, builtins.c, check-init.c, class.c,
5218 constants.c, decl.c, except.c, expr.c, java-except.h,
5219 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5220 lang.c, lang.opt, parse.y, resource.c: Merged.
5221 * java-gimplify.c: New file.
5222
5223 2004-05-10 Andrew Haley <aph@redhat.com>
5224
5225 * parse.y (create_class): Set TYPE_VFIELD.
5226 * decl.c (java_init_decl_processing): Likewise.
5227
5228 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5229 * class.c (make_method_value): Replace DECL_VINDEX with call to
5230 get_method_index().
5231 (get_dispatch_vector): Likewise.
5232 (layout_class_method): Likewise.
5233 Replace set of DECL_VINDEX with call to set_method_index().
5234 (set_method_index): New function.
5235 (get_method_index): New function.
5236 * java-tree.h (set_method_index): New function decl.
5237 (get_method_index): New function decl.
5238
5239 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
5240
5241 * parse.y (check_pkg_class_access): Add new argument
5242 and use it when cl is NULL to call lookup_cl on it.
5243 (parser_check_super_interface): Do not call lookup_cl.
5244 Pass this_decl to check_pkg_class_access and NULL
5245 instead of lookup_cl.
5246 (parser_check_super): Update for change in
5247 check_pkg_class_access.
5248 (do_resolve_class): Likewise.
5249 (process_imports): Likewise.
5250 (find_in_imports_on_demand): Likewise.
5251 (resolve_qualified_expression_name): Likewise.
5252
5253 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
5254
5255 Fixes PR java/9685, PR java/15073
5256 * parse.y (accessibility_string): New method.
5257 (not_accessible_field_error): Use accessibility_string()
5258 instead of java_accstring_lookup().
5259 (resolve_qualified_expression_name): Check with
5260 check_pkg_class_access() before allowing access using
5261 qualified names.
5262 Fix comment typo.
5263 Use check_pkg_class_access() instead of not_accessible_p()
5264 for unqualified types.
5265 (not_accessible_p): Use DECL_CONTEXT (member) instead of
5266 REFERENCE for package-private access checking.
5267 (patch_method_invocation): Use accessibility_string() instead
5268 of java_accstring_lookup().
5269
5270 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
5271
5272 Fixes PR java/15133
5273 * gjavah.c (struct method_name): Add member is_native.
5274 (overloaded_jni_method_exists_p): Match candidate method only if
5275 it is native.
5276 (print_method_info): Initialise is_native flag from the method's
5277 access flags.
5278
5279 2004-04-30 Roger Sayle <roger@eyesopen.com>
5280
5281 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5282 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5283
5284 2004-04-22 Roger Sayle <roger@eyesopen.com>
5285
5286 * resource.c (write_resource_constructor): Guard call to possibly
5287 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5288
5289 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
5290
5291 * class.c (make_class_data): Add new field aux_info.
5292 * decl.c (java_init_decl_processing): Push type and decl for
5293 `aux_info'.
5294
5295 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
5296
5297 * expr.c (expand_java_NEW): Don't use size argument for
5298 _Jv_AllocObject calls.
5299 * parse.y (patch_invoke): Likewise.
5300
5301 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
5302
5303 * expr.c (build_invokeinterface): Remove unused variables to
5304 fix warnings.
5305
5306 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
5307
5308 * class.c (get_interface_method_index): New function. Return dispatch
5309 index for interface method.
5310 (make_method_value): For interface methods, set index field to
5311 iface dispatch index, not DECL_VINDEX.
5312 * expr.c (build_invokeinterface): Use get_interface_method_index.
5313
5314 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5315
5316 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
5317
5318 2004-03-31 Andrew Haley <aph@redhat.com>
5319
5320 PR java/14104
5321 * jcf-io.c (opendir_in_zip): Tidy up error handling.
5322
5323 2004-03-30 Zack Weinberg <zack@codesourcery.com>
5324
5325 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
5326 form of GTY markers.
5327
5328 2004-03-25 Marcus Meissner <meissner@suse.de>
5329
5330 PR java/14689:
5331 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
5332
5333 2004-03-23 Tom Tromey <tromey@redhat.com>
5334
5335 PR java/14315:
5336 * jcf-write.c (make_class_file_name): Don't report if mkdir
5337 failed with EEXIST.
5338
5339 2004-03-23 Tom Tromey <tromey@redhat.com>
5340
5341 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
5342
5343 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
5344
5345 * class.c, gjavah.c, lang.c: Fix comment typos.
5346 * gcj.texi: Fix typos.
5347
5348 2004-03-19 Per Bothner <per@bothner.com>
5349
5350 * gcj.texi (Code Generation): Document new flags and assert defaults.
5351
5352 * class.c (assume_compiled_node_struct): Rename type to
5353 class_flag_node_struct, as it is now also used for enable_assertions.
5354 Rename assume_compiled_node typedef. Rename excludep field to value.
5355 (find_assume_compiled_node): Rename function to find_class_flag_node.
5356 Minor optimization - avoid needless strlen.
5357 (add_assume_compiled): Some tweaking and optimization.
5358 Rename and generalize to add_class_flag takem an extra parameter.
5359 (add_assume_compled): New just calls add_class_flag.
5360 (add_enable_assert, enable_assertions): New functions.
5361 (enable_assert_tree): New static.
5362 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
5363 * lang.opt (fenable-assertions, fenable-assertions=,
5364 fdisable-assertions, fdisable-assertions=): New options.
5365 * lang.c (java_handle_option): Handle new options.
5366 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
5367 class in an interface - create helper class nested in outer interface.
5368 (build_assertion): Short-circuit if enable_assertions is false.
5369
5370 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5371
5372 * java-tree.h: Changes throughout to add checking to macros
5373 and numerous whitespace changes.
5374 (VAR_OR_FIELD_CHECK): New macro.
5375 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
5376 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
5377
5378 2004-03-16 Per Bothner <per@bothner.com>
5379
5380 * jcf-jump.c (options): New --print-constants option.
5381 * gcj.texi (Invoking jcf-dump): Document --print-constants.
5382
5383 * jcf-dump.c (flag_print_constant_pool): Default to off.
5384 (print_constant_terse_with_index): New helper function.
5385 (various places): Check flag_print_constant_pool where missing.
5386 (main): If verbose set flag_print_constant_pool.
5387 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
5388
5389 2004-03-15 Andrew Haley <aph@redhat.com>
5390
5391 PR java/14581
5392 * parse.y (java_complete_lhs): Check that final variable has an
5393 initializer.
5394
5395 2004-03-12 Andrew Haley <aph@redhat.com>
5396
5397 PR java/14551
5398 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5399 conversion.
5400
5401 2004-02-29 Roger Sayle <roger@eyesopen.com>
5402
5403 * jcf-parse.c (java_parse_file): Handle the case that input_filename
5404 is NULL.
5405
5406 2004-02-27 Per Bothner <per@bothner.com>
5407
5408 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
5409 suggestion: Use build_incomplete_class_ref.
5410 This fixes PR java/13508, java/11714.
5411
5412 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
5413
5414 * java/parse.h: Update copyright.
5415
5416 2004-02-26 Andrew Haley <aph@redhat.com>
5417
5418 PR java/14231:
5419 * parse.y (check_interface_throws_clauses): Check for
5420 !METHOD_INVISIBLE (iface_method).
5421 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5422 well as CLASS_ABSTRACT.
5423
5424 2004-02-25 Per Bothner <per@bothner.com>
5425
5426 * parse.y (build_assertion): If we're in an inner class, create the
5427 class$ helper routine in the outer class.
5428
5429 2004-02-19 Richard Henderson <rth@redhat.com>
5430
5431 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5432
5433 2004-02-16 Geoffrey Keating <geoffk@apple.com>
5434
5435 * Make-lang.in (java.install-man): Add extra dependencies.
5436
5437 2004-02-13 Geoffrey Keating <geoffk@apple.com>
5438
5439 * Make-lang.in: Install man pages under the same names
5440 (possibly transformed) as the program they document.
5441
5442 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
5443
5444 * gjavah.c: Include "intl.h".
5445 (error): New function.
5446 (main): Call gcc_init_libintl.
5447 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5448 print_stub_or_jni, process_file, main): Use error rather than
5449 fprintf.
5450 (print_method_info, usage, help, version, main): Mark strings for
5451 translation with _. Avoid splitting up sentences. Send
5452 information messages to stdout.
5453 * jcf-dump.c: Include "intl.h".
5454 (main): Call gcc_init_libintl.
5455 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5456 Mark error, usage and version messages for translation with _.
5457 Avoid splitting up sentences.
5458 * jv-scan.c: Include "intl.h".
5459 (fatal_error, warning): Change parameter s to msgid. Translate
5460 messages.
5461 (main): Call gcc_init_libintl.
5462 (usage, help, version): Mark error, usage and version messages for
5463 translation with _. Avoid splitting up sentences.
5464 * jvgenmain.c: Include "intl.h".
5465 (main): Call gcc_init_libintl.
5466 (usage, main): Mark error messages for translation with _.
5467 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
5468 JVGENMAIN_OBJS): Add intl.o.
5469 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
5470 java/jvgenmain.o): Update dependencies.
5471
5472 2004-02-08 Per Bothner <per@bothner.com>
5473
5474 * parse.y (resolve_qualified_expression_name): In case of inaccessible
5475 class don't use not_accessible_field_error, which can get confused.
5476
5477 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
5478
5479 Make-lang.in (po-generated): Delete.
5480
5481 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
5482
5483 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
5484 Depend on target.h.
5485 * decl.c: Include target.h.
5486 (start_java_method): Replace PROMOTE_PROTOTYPES with
5487 targetm.calls.promote_prototypes.
5488 * expr.c: Include target.h.
5489 (pop_arguments): Replace PROMOTE_PROTOTYPES with
5490 targetm.calls.promote_prototypes.
5491 * parse.y: Include target.h.
5492 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
5493 with targetm.calls.promote_prototypes.
5494
5495 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
5496
5497 * typeck.c: Update copyright.
5498
5499 2004-02-02 Tom Tromey <tromey@redhat.com>
5500
5501 * decl.c (java_init_decl_processing): Remove duplicate
5502 gnu/gcj/RawData.
5503
5504 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
5505
5506 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
5507
5508 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
5509
5510 * expr.c (build_field_ref): Move variable
5511 definition up.
5512
5513 2004-01-28 Andrew Haley <aph@redhat.com>
5514
5515 * expr.c (build_field_ref): Widen field offset.
5516
5517 2004-01-27 Andrew Haley <aph@redhat.com>
5518
5519 java/13273
5520 * parse.y (check_interface_throws_clauses): Make sure class_decl
5521 has been loaded.
5522
5523 2004-01-22 Jeff Sturm <jsturm@one-point.com>
5524
5525 PR java/13733
5526 * parse.y (patch_assignment): Don't modify lhs_type for
5527 reference assignments.
5528
5529 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5530
5531 * Make-lang.in: Replace $(docdir) with doc.
5532 (java.info, java.srcinfo, java.man, java.srcman): New rules.
5533 (java.install-man): Revamp rule.
5534
5535 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5536
5537 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5538 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
5539 instead of deferred backquote.
5540
5541 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
5542
5543 * typeck.c (find_method_in_interfaces): Move variable
5544 definition up.
5545
5546 2004-01-16 Andrew Haley <aph@redhat.com>
5547
5548 PR java/13273:
5549 * typeck.c (shallow_find_method): New.
5550 (find_method_in_superclasses): New.
5551 (find_method_in_interfaces): New.
5552 (lookup_do): Rewrite.
5553 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5554
5555 * jcf-parse.c (read_class): Save and restore output_class.
5556 * decl.c (java_expand_body): Set output_class from fndecl.
5557
5558 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
5559
5560 * class.c (gen_indirect_dispatch_tables): Fix string length
5561 calculations.
5562
5563 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
5564
5565 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5566 (java.srcextra): Copy above back to source directory if requested.
5567 (po-generated): Delete reference to $(parsedir).
5568 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5569 Use implicit rule.
5570
5571 2004-01-14 Jan Hubicka <jh@suse.cz>
5572
5573 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5574 estimation.
5575
5576 2004-01-09 Mark Mitchell <mark@codesourcery.com>
5577
5578 * java-tree.h (java_expand_expr): Change prototype.
5579 * expr.c (java_expand_expr): Add alt_rtl parameter.
5580
5581 2004-01-09 Andrew Haley <aph@redhat.com>
5582
5583 PR java/12755:
5584 * parse.y (java_fix_constructors): Set output_class.
5585 (java_reorder_fields): Likewise.
5586 (java_layout_classes): Likewise.
5587 (java_expand_classes): Generate indirect dispatch tables.
5588 (java_expand_classes): Set output_class.
5589 (java_finish_classes): Likewise.
5590 * lang.c (java_init): Turn on always_initialize_class_p if we're
5591 using indirect dis[atch.
5592 (java_decl_ok_for_sibcall): Use output_class, not current_class.
5593 (java_get_callee_fndecl): Use class local atable.
5594 * jcf-parse.c
5595 (always_initialize_class_p): Decl moved to java-tree.h.
5596 (HANDLE_CLASS_INFO): Set output_class.
5597 (read_class): Likewise.
5598 (parse_class_file): Call gen_indirect_dispatch_tables.
5599 (parse_zip_file_entries): Set output_class.
5600 (java_parse_file): Set output_class. Don't emit symbol tables.
5601 * java-tree.h (output_class): New.
5602 Remove global declarations for otable, atable, and ctable.
5603 (always_initialize_class_p): moved here from decl.c.
5604 (DECL_OWNER): New.
5605 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5606 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5607 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5608 (struct lang_type): Add otable_methods, otable_decl,
5609 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5610 ctable_decl, catch_classes, type_to_runtime_map.
5611 * expr.c (build_field_ref): Make otable, atable, and ctable class
5612 local rather than global.
5613 (build_known_method_ref): Likewise.
5614 (build_invokeinterface): Likewise.
5615 (java_expand_expr): Pass runtime type (rather than actual type) to
5616 expand_start_catch.
5617 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5618 this class. Look up each class in that map to delete duplicates.
5619 (expand_end_java_handler): Pass runtime type (rather than actual
5620 type) to expand_start_catch.
5621 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5622 (do_nothing): New.
5623 (java_init_decl_processing): Rearrange things. Remove global
5624 declarations of otable, atable, and ctable.
5625 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5626 (java_expand_body): Set output_class.
5627 * constants.c (build_constant_data_ref): Use output_class, not
5628 current_class.
5629 (alloc_name_constant): Likewise.
5630 * class.c (gen_indirect_dispatch_tables): New.
5631 (build_class_ref): Generate hard reference to superclass, even if
5632 using indirect dispatch.
5633 (build_static_field_ref): Use class local atable.
5634 (make_class_data): Generate hard reference to superclass, even if
5635 using indirect dispatch.
5636 Generate symbolic references to interfaces when using indirect
5637 dispatch.
5638 (make_class_data): Emit otable, atable, and ctable.
5639 Make otable, atable, and ctable class local rather than global.
5640 (emit_catch_table): Make otable, atable, and ctable class local
5641 rather than global.
5642
5643 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
5644
5645 * parse.y (catch_clause_parameter): Fix typo.
5646
5647 PR java/13404
5648 * parse.y: (catch_clause_parameter): Return early if $3, aka
5649 formal_parameter, is null.
5650
5651 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
5652
5653 * class.c: Remove uses of "register" specifier in
5654 declarations of arguments and local variables.
5655 * decl.c: Likewise.
5656 * expr.c: Likewise.
5657 * gjavah.c: Likewise.
5658 * jcf-dump.c: Likewise.
5659 * jcf-io.c: Likewise.
5660 * jcf-parse.c: Likewise.
5661 * jcf-write.c: Likewise.
5662 * keyword.h: Likewise.
5663 * parse.y: Likewise.
5664 * typeck.c: Likewise.
5665 * verify.c: Likewise.
5666
5667 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
5668
5669 * Make-lang.in (GCJ_CROSS_NAME): Delete.
5670 (java.install_common, java.install-man): Adjust for above.
5671 (java.uninstall): Likewise.
5672
5673 2003-12-03 Michael Koch <konqueror@gmx.de>
5674
5675 * class.c (make_class_data):
5676 Push field value to 'hack_signers' instead of 'signers'.
5677 * decl.c (java_init_decl_processing):
5678 Push field 'hack_signers' instead of 'signers'.
5679
5680 2003-12-03 Zack Weinberg <zack@codesourcery.com>
5681
5682 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5683 including iconv.h.
5684
5685 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
5686
5687 PR java/12374:
5688 * parse.y (qualify_ambiguous_name): Remove lots of broken
5689 field access processing - there's no need to do that here,
5690 because we have resolve_field_access. Remove
5691 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5692 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5693 used.
5694
5695 2003-12-01 Jeff Sturm <jsturm@one-point.com>
5696
5697 Fix PR java/13237
5698 * parse.y (java_complete_lhs): Save location prior to patching
5699 CALL_EXPR.
5700
5701 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
5702
5703 PR java/12548
5704 * resource.c (write_resource_constructor): Append
5705 "_resource" to constructor identifier name.
5706
5707 2003-11-25 Jeff Sturm <jsturm@one-point.com>
5708
5709 Fix PR java/13183.
5710 * constants.c (cpool_for_class): New function.
5711 (outgoing_cpool): Remove global variable.
5712 (alloc_name_constant): Use cpool_for_class.
5713 (build_constants_constructor): Likewise.
5714 * decl.c (java_expand_body): Set current_class.
5715 * java-tree.h (outgoing_cpool) Remove declaration.
5716 (init_outgoing_cpool): Likewise.
5717 * jcf-parse.c (init_outgoing_cpool): Remove function.
5718 (parse_class_file): Don't call init_outgoing_cpool.
5719 * parse.y (java_complete_expand_methods): Don't call
5720 init_outgoing_cpool. Don't save outgoing_cpool.
5721 (java_expand_classes): Don't restore outgoing_cpool.
5722 (java_finish_classes): Likewise.
5723
5724 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
5725
5726 * Make-lang.in: (java.install-common) Add
5727 symlink for $(target_noncanonical)-gcjh for
5728 native builds.
5729
5730 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5731
5732 * Make-lang.in (java.extraclean): Delete.
5733
5734 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5735
5736 * Make-lang.in (check-java): Add.
5737
5738 2003-11-19 Jeff Sturm <jsturm@one-point.com>
5739
5740 Fix PR java/13024.
5741 * except.c (prepare_eh_table_type): Allocate variable-sized
5742 buffer `buf' with alloca.
5743
5744 2003-11-17 Jeff Sturm <jsturm@one-point.com>
5745
5746 Fix PR java/12857.
5747
5748 decl.c (java_init_decl_processing): Don't initialize
5749 class_not_found_type_node, no_class_def_found_type_node.
5750
5751 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5752 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5753 (class_not_found_type_node, no_class_def_found_type_node):
5754 Don't define.
5755
5756 parse.y (build_dot_class_method_invocation): Add this_class
5757 argument. Qualify method invocations to a different class.
5758 (create_new_parser_context): Initialize saved_data_ctx to 0.
5759 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5760 (build_dot_class_method): Don't load classes. Register
5761 incomplete types.
5762 (build_incomplete_class_ref): Special cases for interfaces
5763 and inner classes. Move build_dot_class_method call to here...
5764 (patch_incomplete_class_ref): ...from here. Pass current_class
5765 to build_dot_class_method_invocation.
5766 (build_assertion): Pass class_type to
5767 build_dot_class_method_invocation.
5768 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5769
5770 2003-11-17 Jeff Sturm <jsturm@one-point.com>
5771
5772 Fix PR java/12739.
5773 * java-tree.h (BLOCK_EMPTY_P): Define.
5774 * parse.y (java_complete_lhs): Check for empty blocks
5775 in TRY_FINALLY_EXPR case.
5776
5777 2003-11-17 Andrew Haley <aph@redhat.com>
5778
5779 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5780 (struct lang_decl_var:freed): New variable.
5781 * decl.c (poplevel): Mark local vars that have gone out of scope.
5782 (push_jvm_slot): Don't use the RTL of a var that has gone out of
5783 scope.
5784
5785 2003-11-16 Jason Merrill <jason@redhat.com>
5786
5787 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5788 and TAGS files that include them for each front end.
5789
5790 2003-11-15 Tom Tromey <tromey@redhat.com>
5791
5792 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5793
5794 2003-11-12 Jason Merrill <jason@redhat.com>
5795
5796 PR optimization/12547
5797 * lang.c (java_tree_inlining_walk_subtrees): Just walk
5798 BLOCK_EXPR_BODY directly.
5799
5800 2003-11-12 Andrew Haley <aph@redhat.com>
5801
5802 PR java/11045
5803 * parse.y (fold_constant_for_init): Check that we really do have a
5804 constant.
5805
5806 PR java/11533
5807 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5808 init_test_decls being inlined.
5809
5810 PR java/12890:
5811 * parse.y (do_resolve_class): Check return value from
5812 breakdown_qualified().
5813
5814 2003-11-11 Tom Tromey <tromey@redhat.com>
5815
5816 PR java/12915:
5817 * parse.y (merge_string_cste): Handle case where we have a
5818 pointer that happens to be zero, not null_pointer_node.
5819
5820 2003-11-10 Tom Tromey <tromey@redhat.com>
5821
5822 * jcf-parse.c (classify_zip_file): Correctly compare
5823 filename_length against length of manifest file's name.
5824
5825 2003-11-08 Tom Tromey <tromey@redhat.com>
5826
5827 PR java/12894:
5828 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5829
5830 2003-11-06 Andrew Haley <aph@redhat.com>
5831
5832 * expr.c (java_stack_swap): Make sure destination stack slots are
5833 of the correct type.
5834
5835 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
5836
5837 * Make-lang.in (dvi): Move targets to $(docobjdir).
5838 (gcj.dvi): Simplify rule and adjust target.
5839 (gcj.info): Simplify rule.
5840 (gcj.pod): New intermediate rule.
5841 (gcjh.pod): Likewise.
5842 (jv-scan.pod): Likewise.
5843 (jcf-dump.pod): Likewise.
5844 (gij.pod): Likewise.
5845 (jv-convert.pod): Likewise.
5846 (rmic.pod): Likewise.
5847 (rmiregistry.pod): Likewise.
5848 (gcj.1): Delete.
5849 (gcjh.1): Delete.
5850 (jv-scan.1): Delete.
5851 (jcf-dump.1): Delete.
5852 (gij.1): Delete.
5853 (jv-convert.1): Delete.
5854 (rmic.1): Delete.
5855 (rmiregistry.1): Delete.
5856
5857 2003-11-02 Jeff Sturm <jsturm@one-point.com>
5858
5859 Fixes PR java/12866.
5860 * parse.y (resolve_qualified_expression_name): Move test
5861 for outer field access methods from here...
5862 (check_thrown_exceptions) ...to here.
5863
5864 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
5865
5866 * .cvsignore: Delete.
5867
5868 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
5869
5870 * verify.c (verify_jvm_instructions): Don't warn about legal
5871 eh binding regions generated for example by jdk 1.4.1.
5872
5873 2003-10-24 David S. Miller <davem@redhat.com>
5874
5875 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5876
5877 2003-10-22 Andrew Haley <aph@redhat.com>
5878
5879 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5880 (java_get_callee_fndecl): New.
5881
5882 * jcf-parse.c (java_parse_file): Call emit_catch_table().
5883
5884 * java-tree.h (ctable_decl): New.
5885 (catch_classes): New.
5886 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5887
5888 * decl.c (java_init_decl_processing): Add catch_class_type.
5889 Add ctable_decl.
5890 Add catch_classes field.
5891
5892 * class.c (build_indirect_class_ref): Break out from
5893 build_class_ref.
5894 (make_field_value): Check flag_indirect_dispatch.
5895 (make_class_data): Ditto.
5896 Tidy uses of PUSH_FIELD_VALUE.
5897 Add field catch_classes.
5898 (make_catch_class_record): New.
5899
5900 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5901
5902 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5903
5904 * jcf-write.c: Follow spelling conventions.
5905 * parse.y: Likewise.
5906
5907 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5908
5909 * ChangeLog: Fix typos.
5910 * expr.c: Fix comment typos.
5911 * jcf-write.c: Likewise.
5912 * lang.c: Likewise.
5913 * lex.c: Likewise.
5914 * mangle.c: Likewise.
5915 * parse-scan.y: Likewise.
5916 * parse.y: Likewise.
5917
5918 2003-10-22 Tom Tromey <tromey@redhat.com>
5919
5920 * expr.c (expand_byte_code): Only warn about dead bytecode when
5921 extra_warnings is set.
5922
5923 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
5924
5925 Fix for PR java/12586.
5926 * mangle.c (find_compression_record_match): Don't iterate through
5927 package namespace elements unless they all match compression_table
5928 entries.
5929
5930 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
5931
5932 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5933 (generate-manpages): Likewise.
5934 (java.maintainer-clean): Likewise.
5935 (gcj.info): Likewise.
5936 (gcj.1): Likewise.
5937 (gcjh.1): Likewise.
5938 (jv-scan.1): Likewise.
5939 (jcf-dump.1): Likewise.
5940 (gij.1): Likewise.
5941 (jv-convert.1): Likewise.
5942 (rmic.1): Likewise.
5943 (rmiregistry.1): Likewise.
5944 (java.install-man): Likewise.
5945 (parse-scan.o): Move and define complete compile line.
5946 (parse.o): Likewise.
5947 (jcf-tree-inline.o): Move.
5948
5949 2003-10-20 Mark Mitchell <mark@codesourcery.com>
5950
5951 * Make-lang.in (info): Update dependencies.
5952 (java.install-info): Remove.
5953 ($(srcdir)/java/gcj.info): Replace with ...
5954 ($(docobjdir)/gcj.info): ... this.
5955
5956 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
5957
5958 * Make-lang.in: Replace uses of $(target_alias) with
5959 $(target_noncanonical).
5960
5961 2003-10-09 Tom Tromey <tromey@redhat.com>
5962
5963 * decl.c (java_init_decl_processing): Declare signers field.
5964 * class.c (make_class_data): Set signers field.
5965
5966 2003-10-09 Jason Merrill <jason@redhat.com>
5967
5968 * parse.y (patch_assignment): Use make_node to create a BLOCK.
5969 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5970 POINTER_TYPE.
5971
5972 2003-10-06 Mark Mitchell <mark@codesourcery.com>
5973
5974 * Make-lang.in (java.info): Replace with ...
5975 (info): ... this.
5976 (java.dvi): Replace with ...
5977 (dvi): ... this.
5978 (java.generated-manpages): Replace with ...
5979
5980 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
5981
5982 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5983
5984 2003-10-01 Andrew Haley <aph@redhat.com>
5985
5986 * jcf-parse.c (java_parse_file): Write otable and atable.
5987 * java-tree.h (atable_methods): New.
5988 (atable_decl): New.
5989 (atable_syms_decl): New.
5990 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5991 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5992 (symbol_*type): Rename method_symbol* to symbol*type.
5993 (emit_offset_symbol_table): Delete.
5994 (emit_symbol_table): New.
5995 (get_symbol_table_index): New.
5996 (atable_type): New.
5997 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5998 (build_known_method_ref): Likewise.
5999 (get_symbol_table_index): Rename from get_offset_table_index.
6000 Parameterize to allow re-use by differing types of symbol table.
6001 (build_invokevirtual): Pass table to get_offset_table_index.
6002 * decl.c (java_init_decl_processing): Push types and decls for
6003 atable and atable_syyms.
6004 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6005 (make_class_data): Add new fields atable and atable_syms.
6006 (emit_symbol_table): Rename from emit_offset_symbol_table.
6007 Parameterize to allow re-use by different types of symbol table.
6008 (build_symbol_entry): Renamed from build_method_symbols_entry.
6009
6010 2003-09-30 Roger Sayle <roger@eyesopen.com>
6011
6012 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6013 semantics for SAVE_EXPR, by caching the result in a temporary.
6014
6015 2003-09-28 Richard Henderson <rth@redhat.com>
6016
6017 * check-init.c (check_init): Save and restore input_location
6018 instead of file and line separately.
6019 * decl.c (java_expand_body): Likewise.
6020 * jcf-write.c (generate_bytecode_insns): Likewise.
6021 * parse.y (safe_layout_class): Likewise.
6022 * jcf-parse.c (read_class, parse_class_file): Likewise.
6023 (java_parse_file): Use %H for warning locator.
6024
6025 2003-09-28 Roger Sayle <roger@eyesopen.com>
6026
6027 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6028 with void-type branches instead of using a COMPOUND_EXPR.
6029
6030 2003-09-28 Jeff Sturm <jsturm@one-point.com>
6031
6032 * decl.c (java_optimize_inline, dump_function): Remove.
6033 * java-tree.h (java_optimize_inline): Remove declaration.
6034 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6035 * parse.y (source_end_java_method, java_expand_classes):
6036 Likewise. Remove dead code.
6037
6038 2003-09-27 Roger Sayle <roger@eyesopen.com>
6039
6040 * lang.c (java_init_options): Set flag_evaluation_order.
6041 * expr.c (force_evaluation_order): Don't attempt to force
6042 evaluation order of binary operations using save_expr.
6043 * parse.y (java_complete_lhs): No longer need to call
6044 force_evaluation_order when constructing binary operators.
6045
6046 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6047 Bryce McKinlay <bryce@mckinlay.net.nz>
6048
6049 PR java/1333:
6050 * parse.y (not_accessible_field_error): New function.
6051 (resolve_expression_name): Check field access permissions.
6052 (resolve_qualified_expression_name): Use
6053 not_accessible_field_error.
6054 (resolve_qualified_expression_name): Likewise.
6055
6056 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6057
6058 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6059
6060 2003-09-23 Roger Sayle <roger@eyesopen.com>
6061
6062 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6063 with equal operands without side-effects.
6064
6065 2003-09-22 Jeff Sturm <jsturm@one-point.com>
6066
6067 * decl.c (java_init_decl_processing): Don't emit otable decls
6068 if flag_indirect_dispatch is not set.
6069
6070 2003-09-21 Richard Henderson <rth@redhat.com>
6071
6072 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6073 resource.c: Revert.
6074
6075 2003-09-21 Richard Henderson <rth@redhat.com>
6076
6077 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6078 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6079
6080 2003-09-20 Richard Henderson <rth@redhat.com>
6081
6082 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6083
6084 2003-09-18 Roger Sayle <roger@eyesopen.com>
6085
6086 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6087 * check-init.c (check_init): Likewise.
6088
6089 2003-09-18 Roger Sayle <roger@eyesopen.com>
6090
6091 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6092
6093 2003-09-16 Andrew Haley <aph@redhat.com>
6094
6095 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6096
6097 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
6098
6099 Fixes PR java/9577
6100 * mangle.c (find_compression_record_match): Skip
6101 over a "6JArray" (the array template mangled string)
6102 IDENTIFIER_NODE.
6103 (mangle_array_type): Correct minor typo.
6104 (atms): Move definition to the beginning.
6105
6106 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
6107
6108 * class.c (add_miranda_methods): Ensure super-interfaces are laid
6109 out. Fix for PR java/12254.
6110
6111 2003-09-11 Richard Henderson <rth@redhat.com>
6112
6113 * parse.y (source_end_java_method): Update for new
6114 cgraph_finalize_function argument.
6115
6116 2003-09-09 Richard Henderson <rth@redhat.com>
6117
6118 * parse.y (source_end_java_method): Update call to
6119 cgraph_finalize_function.
6120
6121 2003-09-03 Jeff Sturm <jsturm@one-point.com>
6122
6123 * decl.c (java_expand_body): New function.
6124 * expr.c (build_class_init): Set DECL_IGNORED_P.
6125 * java-tree.h (start_complete_expand_method,
6126 java_expand_body): Declare.
6127 * jcf-parse.c (cgraph.h): Include.
6128 (java_parse_file): Handle flag_unit_at_a_time.
6129 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6130 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6131 (java_estimate_num_insns): Use walk_tree_without_duplicates.
6132 (java_start_inlining): New function.
6133 * parse.h (java_finish_classes): Declare.
6134 * parse.y: Include cgraph.h.
6135 (block): Don't special-case empty block production.
6136 (craft_constructor): Set DECL_INLINE.
6137 (source_end_java_method): Handle flag_unit_at_a_time.
6138 Replace inline code with call to java_expand_body.
6139 (start_complete_expand_method): Remove static modifier.
6140 (java_expand_method_bodies): Patch function tree for
6141 class initialization and/or synchronization as needed.
6142 Don't begin RTL expansion yet.
6143 (java_expand_classes): Check flag_unit_at_a_time before
6144 calling finish_class.
6145 (java_finish_classes): New function.
6146 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6147 (patch_assignment): Set DECL_CONTEXT on temporary variable.
6148 (emit_test_initialization): Set DECL_IGNORED_P.
6149
6150 2003-09-03 Roger Sayle <roger@eyesopen.com>
6151
6152 * builtins.c (enum builtin_type): Delete unused enumeration.
6153 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6154
6155 2003-08-28 Tom Tromey <tromey@redhat.com>
6156
6157 * gcj.texi (Extensions): Document gcjlib URLs.
6158
6159 2003-08-20 Tom Tromey <tromey@redhat.com>
6160
6161 * gcj.texi (Extensions): Added xref.
6162 (libgcj Runtime Properties): Document
6163 gnu.gcj.runtime.VMClassLoader.library_control.
6164
6165 2003-08-20 Andrew Haley <aph@redhat.com>
6166
6167 * except.c (prepare_eh_table_type): Use new encoding for exception
6168 handlers when using -fno-assume-compiled.
6169
6170 2003-08-13 Tom Tromey <tromey@redhat.com>
6171
6172 * gcj.texi (Invoking gij): Document -X and -?.
6173
6174 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
6175
6176 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6177 GCJH_OBJS, JCFDUMP_OBJS
6178 * win32-host.c: Removed the unnecessary and broken dependency
6179 on jcf.h
6180
6181 2003-08-11 Tom Tromey <tromey@redhat.com>
6182
6183 * parse.y (java_check_regular_methods): Typo fixes. Call
6184 check_interface_throws_clauses. Use
6185 check_concrete_throws_clauses.
6186 (check_interface_throws_clauses): New function.
6187 (check_concrete_throws_clauses): New function.
6188 (hack_is_accessible_p): New function.
6189 (find_most_specific_methods_list): Added FIXME.
6190 * typeck.c (lookup_do): Use `flags' argument to decide what to
6191 do. Reimplemented.
6192 (lookup_argument_method_generic): New function.
6193 (lookup_argument_method2): Removed.
6194 * jcf.h (ACC_INVISIBLE): New define.
6195 * jcf-write.c (generate_classfile): Skip invisible methods.
6196 * class.c (add_miranda_methods): New function.
6197 (layout_class_methods): Use it.
6198 (get_access_flags_from_decl): Use ACC_INVISIBLE.
6199 * java-tree.h (METHOD_INVISIBLE): New define.
6200 (lang_decl_func) [invisible]: New field.
6201 (lookup_argument_method_generic): Declare.
6202 (SEARCH_INTERFACE): New define.
6203 (SEARCH_SUPER): Likewise.
6204 (SEARCH_ONLY_INTERFACE): Likewise.
6205 (SEARCH_VISIBLE): Likewise.
6206 (lookup_argument_method2): Removed declaration.
6207
6208 2003-08-05 Tom Tromey <tromey@redhat.com>
6209
6210 Fix for PR java/11600:
6211 * parse.y (java_complete_lhs): See whether we're calling a method
6212 on an array.
6213 (check_thrown_exceptions): Added `is_array_call' argument;
6214 fixed `clone' checking; updated all callers.
6215
6216 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
6217
6218 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6219
6220 2003-08-03 Tom Tromey <tromey@redhat.com>
6221
6222 * java-tree.h (METHOD_TRANSIENT): Removed.
6223 * decl.c (pushdecl): Removed some dead code.
6224 * class.c (get_access_flags_from_decl): Can't have transient
6225 method.
6226 (add_method_1): Can't have a transient method.
6227
6228 2003-07-28 Andreas Jaeger <aj@suse.de>
6229
6230 * jvspec.c: Convert to ISO C90 prototypes.
6231
6232 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
6233
6234 * decl.c (force_poplevels): Fix warning call.
6235
6236 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6237
6238 * expr.c (expand_java_field_op): Don't use xxx_with_decl
6239 (expand_java_field_op): Likewise.
6240 * class.c (layout_class_method): Likewise
6241 (emit_register_classes): Likewise.
6242 * decl.c (pushdecl): Likewise.
6243 (poplevel): Likewise.
6244 (force_poplevels): Likewise.
6245 (give_name_to_locals): Likewise.
6246 * check-init.c (check_for_initialization): Likewise.
6247
6248 2003-07-24 Jason Merrill <jason@redhat.com>
6249
6250 * java-tree.h: Move boolean_type_node et al to the back end.
6251
6252 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6253
6254 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6255 casts.
6256
6257 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
6258
6259 * lang.opt: Don't show -MD_ and -MDD_.
6260
6261 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
6262
6263 * lang-options.h: Remove.
6264 * lang.opt: Add help text.
6265
6266 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
6267
6268 * expr.c: Remove the last argument to expand_assignment().
6269
6270 2003-07-09 Jan Hubicka <jh@suse.cz>
6271
6272 * java-tree.h (DECL_NUM_STMTS): Rename to...
6273 (DECL_ESTIMATED_INSNS): ... this.
6274 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6275 New static functions.
6276 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6277 * parser.y (add_stmt_to_compound): Do not account statements.
6278
6279 2003-07-08 Mark Wielaard <mark@klomp.org>
6280
6281 * gcj.texi: CNI now expands to Compiled Native Interface.
6282
6283 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6284
6285 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6286
6287 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
6288
6289 * expr.c (expand_byte_code): Adjist emit_line_note call.
6290
6291 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
6292
6293 * lang.c (java_handle_option): Don't handle filenames.
6294
6295 2003-07-02 Zack Weinberg <zack@codesourcery.com>
6296
6297 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6298 DIR_SEPARATOR.
6299 Use FILENAME_CMP.
6300 * jcf-write.c: Don't default-define DIR_SEPARATOR.
6301 * jcf.h: Delete COMPARE_FILENAMES definition.
6302
6303 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
6304
6305 * lang.c (java_init_options): Update prototype.
6306
6307 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
6308
6309 * decl.c (poplevel): Adjust define_label call.
6310
6311 2003-06-27 Zack Weinberg <zack@codesourcery.com>
6312
6313 * gjavah.c (flag_jni): Make non-static.
6314 * parse-scan.y (ctxp): Make non-static.
6315
6316 * class.c (build_method_symbols_entry)
6317 * expr.c (get_offset_table_index)
6318 * jcf-parse.c (jcf_parse):
6319 Mark the definition static, matching the forward declaration.
6320
6321 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
6322
6323 * lang.c (java_handle_option): Don't check for missing arguments.
6324
6325 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
6326
6327 * class.c (push_class): Use a location_t to save place.
6328 (emit_register_classes): Set input_location. Adjust
6329 expand_function_end call.
6330 * resource.c (write_resource_constructor): Likewise.
6331 * decl.c (end_java_method): Adjust expand_function_end call.
6332 * parse.y (source_end_java_method): Likewise.
6333
6334 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
6335
6336 * lang.c (java_handle_option): Likewise.
6337
6338 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
6339
6340 * lang.c (java_handle_option): Special-casing of optional
6341 joined arguments no longer needed.
6342 * lang.opt: Update switches that take optional argument.
6343
6344 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
6345
6346 * lang.opt: Declare Java.
6347 * lang.c (java_init_options): Update.
6348
6349 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
6350
6351 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
6352
6353 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
6354
6355 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
6356 * lang.c (java_handle_option): -MD and -MMD have an underscore.
6357 * lang.opt: -MD and -MMD have an underscore.
6358
6359 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
6360
6361 * class.c (emit_register_classes): Adjust init_function_start
6362 call.
6363 * decl.c (complete_start_java_method): Likewise.
6364 * resource.c (write_resource_constructor): Likewise.
6365
6366 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
6367
6368 * Make-lang.in: Update to use options.c and options.h.
6369 * lang.c: Include options.h not j-options.h.
6370 (java_handle_option): Abort on unrecognized option.
6371 (java_init_options): Request Java switches.
6372
6373 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
6374
6375 * Make-lang.in: Handle mostlyclean.
6376
6377 2003-06-11 Tom Tromey <tromey@redhat.com>
6378
6379 * lang.c (java_handle_option): Update dependency_tracking for
6380 OPT_MF case.
6381
6382 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
6383 empty argument.
6384
6385 2003-06-10 Andrew Haley <aph@redhat.com>
6386
6387 * resource.c (write_resource_constructor): Use expand_expr to
6388 generate the address of the label attached to a resource.
6389 * Make-lang.in (java/resource.o): Add expr.h
6390
6391 2003-06-10 Andrew Haley <aph@redhat.com>
6392
6393 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6394 (java_decl_ok_for_sibcall): New.
6395
6396 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
6397
6398 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6399 (java/j-options.c, java/j-options.h): New.
6400 * java-tree.h (resource_name, compile_resource_file,
6401 compile_resource_data): Constify.
6402 * jcf-write.c (jcf_write_base_directory): Similarly.
6403 * jcf.h (jcf_write_base_directory): Similarly.
6404 * lang.c: Include j-options.h.
6405 (cl_options_count, cl_options, string_option, java_decode_option,
6406 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6407 process_option_with_no): Remove.
6408 (resource_name): Constify.
6409 (LANG_HOOKS_HANDLE_OPTION): Override.
6410 (java_handle_option): New.
6411 (java_init): Don't call jcf_path_init.
6412 (java_init_options): Call jcf_path_init.
6413 * lang.opt: New.
6414 * resource.c (compile_resource_data, compile_resource_file): Constify.
6415
6416 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
6417
6418 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6419 (struct lang_decl_func): Add last_line field.
6420 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6421 DECL_SOURCE_LINE_LAST): Remove.
6422 * parse.y (missing_return_error, finish_method_declaration,
6423 lookup_cl, start_artificial_method_body, source_end_java_method,
6424 start_complete_expand_method): Adjust.
6425
6426 2003-06-08 Tom Tromey <tromey@redhat.com>
6427
6428 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6429 fno-assume-compiled.
6430
6431 2003-06-08 Roger Sayle <roger@eyesopen.com>
6432
6433 * builtins.c (define_builtin_type, builtin_types): Delete.
6434 (define_builtin): Rewritten to take just the built-in code,
6435 the function's name, type and fallback library function name.
6436 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6437 (initialize_builtins): Overhaul to define the GCC builtins
6438 used by gcj manually, providing the Java run-time's
6439 implementations as the fallback library function.
6440
6441 2003-06-08 Anthony Green <green@redhat.com>
6442
6443 * parse.y (patch_cast): Fix conversions from floating-point to
6444 integral types.
6445
6446 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
6447
6448 * Make-lang.in: Update.
6449 * lang.c: Include opts.h. Define cl_options_count and cl_options.
6450
6451 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
6452
6453 * lang.c (java_init_options): Update.
6454
6455 2003-06-05 Jan Hubicka <jh@suse.cz>
6456
6457 * Make-lang.in: Add support for stageprofile and stagefeedback
6458
6459 2003-05-31 Roger Sayle <roger@eyesopen.com>
6460
6461 * lang.c (java_init_options): Prescribe wrap-around two's
6462 complement arithmetic overflow by setting flag_wrapv.
6463
6464 2003-05-29 Roger Sayle <roger@eyesopen.com>
6465
6466 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
6467 (builtin_record): Add an additional builtin_code field to
6468 record which GCC built-in corresponds to the Java function.
6469 (java_builtins): Add new entries for atan, atan2, exp, log,
6470 pow and tan.
6471 (max_builtin, min_builtin, abs_builtin): Perform constant
6472 folding on the resulting tree.
6473 (java_build_function_call_expr): Likewise, perform constant
6474 folding on the resulting tree.
6475 (initialize_builtins): The NULL creators are now allowed in
6476 the java_builtins table, which is now terminated by an entry
6477 with builtin_code == END_BUILTINS.
6478 (check_for_builtin): Likewise. If the matching creator is
6479 NULL, construct the call using java_build_function_call_expr
6480 directly with the decl for the corresponding builtin_code.
6481
6482 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
6483
6484 * win32-host.c: Normalize copyright boilerplate.
6485
6486 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6487
6488 * parse.y (print_int_node): Use string concatentation on
6489 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
6490 function calls into one.
6491
6492 2003-05-13 Zack Weinberg <zack@codesourcery.com>
6493
6494 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
6495 fatal_io_error with calls to fatal_error; add ": %m" to the end of
6496 all the affected error messages.
6497
6498 2003-05-13 Richard Henderson <rth@redhat.com>
6499
6500 * class.c (layout_class_method): Set DECL_EXTERNAL.
6501 * decl.c (java_mark_decl_local, java_mark_class_local): New.
6502 * java-tree.h (java_mark_class_local): Declare.
6503 * jcf-parse.c (parse_class_file): Use it.
6504 * parse.y (java_expand_classes): Likewise.
6505
6506 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
6507
6508 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
6509 * lex.h: #include input.h.
6510 * jv-scan.c (input_filename): Remove.
6511
6512 2003-05-02 Tom Tromey <tromey@redhat.com>
6513
6514 PR java/10491:
6515 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6516 (handle_inner_classes): New function.
6517
6518 2003-05-01 Tom Tromey <tromey@redhat.com>
6519
6520 PR java/10459:
6521 * parse.y (finish_for_loop): Do nothing if update expression is a
6522 EXPR_WFL_NODE wrapping nothing.
6523 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6524
6525 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
6526
6527 * lex.h (input_lineno): Remove declaration.
6528 * parse-scan.y: #include input.h.
6529 (input_filename): Remove declaration.
6530 (input_location): Add definition.
6531 (input_line): Remove definition.
6532
6533 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
6534
6535 * lex.h (lineno): Rename to ...
6536 (input_line): ... here
6537 * parse-scan.y (lineno): Rename to ...
6538 (input_line): ... here.
6539 (reset_report): Rename lineno to input_line.
6540 * check-init.c (check_init): Likewise.
6541 * class.c (push_class): Likewise.
6542 * decl.c (complete_start_java_method, end_java_method): Likewise.
6543 * expr.c (expand_byte_code): Likewise.
6544 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6545 * jcf-write.c (generate_bytecode_insns): Likewise.
6546 * lex.c (java_init_lex, java_allocate_new_line,
6547 do_java_lex): Likewise.
6548 * parse.h (YYNOT_TWICE): Likewise.
6549 * parse.y (empty_statement, expression_statement,
6550 java_pop_parser_context, java_parser_context_save_global,
6551 yyerror, register_fields, method_header, safe_layout_class,
6552 find_in_imports_on_demand, create_artificial_method,
6553 source_end_java_method, start_complete_expand_method,
6554 build_thisn_assign, java_complete_lhs,
6555 maybe_absorb_scoping_block): Likewise.
6556
6557 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
6558
6559 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6560 '/' when computing java source filename
6561
6562 2003-04-13 Tom Tromey <tromey@redhat.com>
6563
6564 * gjavah.c (print_c_decl): Indentation fix.
6565
6566 2003-04-12 Zack Weinberg <zack@codesourcery.com>
6567
6568 * class.c (make_field_value, make_method_value, get_dispatch_table)
6569 (make_class_data, emit_offset_symbol_table)
6570 * constants.c (build_constants_constructor)
6571 * java-tree.h (START_RECORD_CONSTRUCTOR)
6572 * parse.y (maybe_build_array_element_wfl):
6573 Use build_constructor.
6574
6575 2003-04-10 Eric Blake <ebb9@email.byu.edu>
6576
6577 PR java/10253:
6578 * parse.y (string_convert_int_cst): Always use at least one digit
6579 in string conversion. Remove ASCII dependence.
6580 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6581
6582 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
6583
6584 * Make-lang.in: added win32-host.c
6585 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6586 resolves to open() on non-Win32 platforms and
6587 Win32-specific jcf_open_exact_case() on Win32
6588 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6589 when trying .java and .class files
6590 * win32-host.c: added to repository. Defines
6591 Win32-specific jcf_open_exact_case()
6592
6593 2003-04-10 Andrew Haley <aph@redhat.com>
6594
6595 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6596 (maybe_free_localvar): Renamed from localvar_free.
6597 Add new arg, really.
6598 (generate_bytecode_insns): Set new variable, jsrs.
6599 Only free local vars if no jsr insns have been emittted.
6600 Call maybe_free_localvar, not localvar_free.
6601
6602 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
6603
6604 * gcj.texi: Remove @ at start of file.
6605
6606 2003-03-25 Tom Tromey <tromey@redhat.com>
6607
6608 * parse.y (create_interface): Call CHECK_DEPRECATED.
6609
6610 2003-03-23 Zack Weinberg <zack@codesourcery.com>
6611
6612 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6613
6614 2003-03-21 Zack Weinberg <zack@codesourcery.com>
6615
6616 * javaop.h (jfloat, jdouble): Make them structures mirroring
6617 the bit fields of IEEE float and double respectively.
6618 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6619 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6620 (union Word, union DWord): Delete.
6621 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6622
6623 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6624 D_NAN_MASK): Delete.
6625 (jni_print_float, jni_print_double): New. Generate
6626 hexadecimal floating constants.
6627 (print_field_info): Use jni_print_float/double.
6628
6629 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
6630 finite floating point numbers for output; special case
6631 non-finite floats.
6632
6633 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
6634
6635 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6636 Replace 0 and 1 with true and false in return statements.
6637
6638 2003-03-19 Tom Tromey <tromey@redhat.com>
6639
6640 * lex.c (do_java_lex): Renamed from java_lex.
6641 (java_lex): New function.
6642 Include timevar.h.
6643
6644 2003-03-13 Tom Tromey <tromey@redhat.com>
6645
6646 * parse.y (resolve_inner_class): Error if qualifier is a primitive
6647 type.
6648
6649 2003-03-04 Andrew Haley <aph@redhat.com>
6650
6651 * gjavah.c (is_first_data_member): New global variable.
6652 (print_c_decl): If it's the first data member, align it as the
6653 superclass.
6654 (process_file): Set is_first_data_member.
6655
6656 2003-03-11 Tom Tromey <tromey@redhat.com>
6657
6658 * parse.y (resolve_field_access): Initialize class if field is
6659 found in another static field.
6660 * expr.c (build_class_init): Don't optimize out initialization of
6661 implemented interface.
6662
6663 2003-03-11 Andrew Haley <aph@redhat.com>
6664
6665 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6666 warning.
6667
6668 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
6669
6670 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6671 and DIR_SEPARATOR_2 for a target.
6672 Correct minor typos.
6673
6674 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6675 and DIR_SEPARATOR_2 for a target into account.
6676
6677 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
6678
6679 * lang.c (java_init): Update prototype, move code to java_post_options.
6680 (java_post_options): Similarly.
6681
6682 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
6683
6684 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6685 compare file name components depending on the case-sensitivity
6686 or otherwise of the host file system.
6687
6688 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6689 "strcmp" to compare file name components.
6690 Use IS_DIR_SEPARATOR instead of comparing directly against
6691 DIR_SEPARATOR.
6692 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6693 comparing directly against DIR_SEPARATOR.
6694
6695 2003-03-04 Tom Tromey <tromey@redhat.com>
6696
6697 * Make-lang.in (java.tags): New target.
6698
6699 2003-03-01 Roger Sayle <roger@eyesopen.com>
6700
6701 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6702 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6703
6704 2003-03-01 Tom Tromey <tromey@redhat.com>
6705
6706 * parse.y (jdep_resolve_class): Only check deprecation if we found
6707 a decl.
6708
6709 2003-02-28 Tom Tromey <tromey@redhat.com>
6710
6711 PR java/9695:
6712 * class.c (maybe_layout_super_class): Always pass a WFL to
6713 do_resolve_class.
6714 * parse.y (do_resolve_class): Updated comment to explain
6715 parameters.
6716
6717 2003-02-26 Tom Tromey <tromey@redhat.com>
6718
6719 * jcf-write.c (generate_classfile): Check whether class is
6720 deprecated before writing attribute count.
6721
6722 2003-02-25 Roger Sayle <roger@eyesopen.com>
6723
6724 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6725 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6726
6727 2003-02-23 Tom Tromey <tromey@redhat.com>
6728
6729 * lang-options.h: Added -Wdeprecated.
6730 * gcj.texi (Warnings): Document -Wdeprecated.
6731 * java-tree.h (flag_deprecated): Declare.
6732 * lang.c (lang_W_options): Added deprecated.
6733 (flag_deprecated): New global.
6734 * chartables.h: Rebuilt.
6735 * gen-table.pl (process_one): Look at whitespace.
6736 (print_tables): Define LETTER_SPACE, LETTER_MASK.
6737 * parse.h (CLEAR_DEPRECATED): New macro.
6738 (CHECK_DEPRECATED_NO_RESET): New macro.
6739 * jcf-parse.c (handle_deprecated): New function.
6740 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6741 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6742 * parse.y (resolve_type_during_patch): Check deprecation.
6743 (jdep_resolve_class): Likewise.
6744 (process_imports): Likewise.
6745 (resolve_expression_name): Likewise.
6746 (check_deprecation): Strip arrays from decl. Check
6747 flag_deprecated.
6748 (patch_method_invocation): Also check the particular constructor
6749 for deprecation.
6750 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6751 * jcf-write.c (append_deprecated_attribute): New function.
6752 (generate_classfile): Generate deprecated attribute when
6753 appropriate.
6754 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
6755 (java_lex) [case '*']: Simplify logic.
6756 (java_start_char_p): Use LETTER_MASK.
6757 (java_part_char_p): Likewise.
6758 (java_space_char_p): New function.
6759
6760 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
6761
6762 Change base class access representation.
6763 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6764 (add_interface_do): Likewise.
6765
6766 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
6767
6768 * decl.c (java_init_decl_processing): Change
6769 soft_lookupjnimethod_node to reflect the change in
6770 signature of _Jv_LookupJNIMethod in libjava/jni.cc
6771 * expr.c (build_jni_stub): Calculate and pass the size
6772 on the stack of the arguments to a JNI function. Use
6773 new target macro MODIFY_JNI_METHOD_CALL to allow a
6774 target to modify the call to a JNI method.
6775
6776 2003-02-08 Roger Sayle <roger@eyesopen.com>
6777
6778 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6779 instead of basename to avoid compiler warnings on Tru64.
6780
6781 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
6782
6783 * gcj.texi: Update to GFDL 1.2.
6784
6785 2003-01-31 Andrew Haley <aph@redhat.com>
6786
6787 * parse.y (java_expand_classes): Scan the whole class list looking
6788 for access methods that haven't yet been expanded.
6789
6790 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6791
6792 Fix for java/4269:
6793
6794 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6795 to fix bootstrap on sparc-unknown-netbsdelf1.5.
6796 * jcf-parse.c: Likewise.
6797
6798 2003-01-31 Mark Wielaard <mark@klomp.org>
6799
6800 * gjavah.c (throwable_p): Allocate 1 more byte for string.
6801
6802 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
6803
6804 * class.c (make_class): Use BINFO_ELTS.
6805 (set_super_info): Likewse.
6806 (add_interface_do): Likewise.
6807
6808 2003-01-30 Tom Tromey <tromey@redhat.com>
6809
6810 * jcf-parse.c (read_class): Update identifier's class value if it
6811 changed during parsing.
6812
6813 2003-01-30 Loren James Rittle <ljrittle@acm.org>
6814
6815 * Make-lang.in (po-generated): Find the targets in $(parsedir).
6816 Propagate change to all other rules as required.
6817 (java/parse-scan.o): Add explicit dependency on
6818 $(parsedir)/java/parse-scan.c .
6819
6820 2003-01-29 Tom Tromey <tromey@redhat.com>
6821
6822 * parse.y (patch_assignment): Only transform the rhs of an
6823 assignment when compiling to native.
6824
6825 2003-01-28 Tom Tromey <tromey@redhat.com>
6826
6827 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6828
6829 2003-01-28 Tom Tromey <tromey@redhat.com>
6830
6831 * lex.c (java_lex): Don't include UEOF as part of token.
6832 (java_read_unicode): Error if \u sequence prematurely terminated.
6833
6834 2003-01-27 Tom Tromey <tromey@redhat.com>
6835
6836 * parse.y (java_check_regular_methods): Check for construct after
6837 checking types in throws clause.
6838
6839 2003-01-24 Tom Tromey <tromey@redhat.com>
6840
6841 * class.c (build_static_field_ref): Only a String or numeric field
6842 can fold to a constant.
6843
6844 2003-01-23 Tom Tromey <tromey@redhat.com>
6845
6846 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6847 file name in resource buffer.
6848
6849 2003-01-23 Tom Tromey <tromey@redhat.com>
6850
6851 * expr.c (build_known_method_ref): Use method's context to find
6852 method table index.
6853
6854 2003-01-23 Tom Tromey <tromey@redhat.com>
6855
6856 * constants.c (set_constant_entry): Allocated cleared memory.
6857
6858 2003-01-22 Tom Tromey <tromey@redhat.com>
6859
6860 * java-tree.h: Don't use PARAMS.
6861 * resource.c: Add prototypes for all functions.
6862 (write_resource_constructor): Use `const char *' to avoid
6863 warning.
6864
6865 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
6866
6867 * jcf-parse.c (process_zip_dir): Remove unused variable.
6868
6869 2003-01-22 Tom Tromey <tromey@redhat.com>
6870
6871 * expr.c (build_invokeinterface): Abort if method's context is not
6872 an interface.
6873
6874 2003-01-22 Tom Tromey <tromey@redhat.com>
6875
6876 * gcj.texi (Input and output files): Mention non-class entries.
6877 * decl.c (java_init_decl_processing): Call
6878 init_resource_processing.
6879 * java-tree.h (compile_resource_data, write_resource_constructor,
6880 compile_resource_file, init_resource_processing): Declare.
6881 * config-lang.in (gtfiles): Added resource.c.
6882 * Make-lang.in (gt-java-resource.h): New target.
6883 (JAVA_OBJS): Added resource.o.
6884 (java/resource.o): New target.
6885 * resource.c: New file.
6886 * class.c (compile_resource_file): Moved to resource.c.
6887 (registerResource_libfunc): Likewise.
6888 (utf8_decl_list): Mark with GTY; now static.
6889 * jcf-parse.c (classify_zip_file): New function.
6890 (parse_zip_file_entries): Use it; compile .properties files.
6891 (process_zip_dir): Use classify_zip_file and compute_class_name.
6892 Don't write class name into zip directory.
6893 (java_parse_file): Call write_resource_constructor.
6894 (compute_class_name): New function.
6895 * jcf-io.c (read_zip_member): Reindented.
6896
6897 2003-01-21 Tom Tromey <tromey@redhat.com>
6898
6899 * class.c (supers_all_compiled): New function.
6900 (make_class_data): Use it.
6901
6902 2003-01-21 Tom Tromey <tromey@redhat.com>
6903
6904 * parse.y (method_header): Native method can't be strictfp.
6905 No method can be transient or volatile.
6906
6907 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6908
6909 Make-lang.in (jvspec.o-warn): Add -Wno-error.
6910
6911 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
6912
6913 * check-init.c: Fix comment typos.
6914 * class.c: Likewise.
6915 * constants.c: Likewise.
6916 * decl.c: Likewise.
6917 * except.c: Likewise.
6918 * expr.c: Likewise.
6919 * java-except.h: Likewise.
6920 * java-tree.h: Likewise.
6921 * javaop.h: Likewise.
6922 * jcf-dump.c: Likewise.
6923 * jcf-io.c: Likewise.
6924 * jcf-parse.c: Likewise.
6925 * jcf-write.c: Likewise.
6926 * lang.c: Likewise.
6927 * mangle.c: Likewise.
6928 * typeck.c: Likewise.
6929 * verify.c: Likewise.
6930
6931 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6932
6933 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6934 * jcf-write.c: Include "tm_p.h".
6935
6936 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6937
6938 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6939
6940 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6941
6942 * builtins.c (java_build_function_call_expr): Renamed from
6943 build_function_call_expr. All callers changed.
6944
6945 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6946 * jcf-parse.c: Include tm_p.h.
6947
6948 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6949 warning.
6950
6951 2003-01-14 Tom Tromey <tromey@redhat.com>
6952
6953 * class.c (make_class_data): Check that super is compiled before
6954 building class reference to it.
6955
6956 2003-01-14 Andrew Haley <aph@redhat.com>
6957
6958 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6959 varargs function -- correct.
6960
6961 2003-01-14 Andrew Haley <aph@redhat.com>
6962
6963 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6964
6965 2003-01-14 Andrew Haley <aph@redhat.com>
6966
6967 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6968 varargs function -- correct.
6969
6970 * parse.y (patch_assignment): Copy the rhs of an assignment into a
6971 temporary if the RHS is a reference.
6972
6973 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6974
6975 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6976 * keyword.h: Regenerated.
6977
6978 * All Files: Convert to ISO C style function definitions.
6979
6980 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6981
6982 * parse.y (check_pkg_class_access): ANSIfy definition.
6983
6984 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6985
6986 * decl.c, parse-scan.y, parse.y: Don't cast return value of
6987 xmalloc et al.
6988
6989 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6990
6991 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6992
6993 Merge from pch-branch:
6994
6995 2002-12-02 Geoffrey Keating <geoffk@apple.com>
6996
6997 * Make-lang.in (java/gjavah.o): Update dependencies.
6998 * gjavah.c: Include ggc.h.
6999
7000 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
7001
7002 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7003 (JCFDUMP_OBJS): Add ggc-none.o.
7004 (java/jcf-dump.o): Depend on GGC_H.
7005 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7006 CPool substructures.
7007 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7008 * jcf-dump.c: Include ggc.h.
7009
7010 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7011
7012 * jcf.h (union cpool_entry): New.
7013 (struct CPool): Use gengtype to mark. Change field 'data' to be
7014 an array of unions.
7015 (struct JCF): Use gengtype to mark.
7016 (CPOOL_UINT): Update for new cpool_entry type.
7017 (CPOOL_USHORT1): Likewise.
7018 (CPOOL_USHORT2): Likewise.
7019 (CPOOL_FINISH): Use GC to free cpool subfields.
7020 * parse.h (struct parser_ctxt): Mark field current_jcf.
7021 * lex.c (java_init_lex): Use GC to allocate struct JCF.
7022 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7023 (main_jcf): Use gengtype to mark.
7024 (ggc_mark_jcf): Delete.
7025 (get_constant): Update for new cpool_entry type.
7026 (give_name_to_class): Likewise.
7027 (get_class_constant): Likewise.
7028 (init_outgoing_cpool): Use GGC to allocate struct CPool.
7029 (java_parse_file): Use GGC to allocate struct JCF.
7030 (init_jcf_parse): Don't call ggc_add_root.
7031 * jcf-reader.c (jcf_parse_constant_pool): Update for new
7032 cpool_entry type.
7033 * java-tree.h (current_jcf): Use gengtype to mark.
7034 (CPOOL_UTF): Update for new cpool_entry type.
7035 (outgoing_cpool): Use gengtype to mark.
7036 (struct lang_type): GC struct JCF and struct CPool.
7037 * config-lang.in (gtfiles): Add jcf.h.
7038 * constants.c (find_tree_constant): New.
7039 (set_constant_entry): Allocate cpool subfields using GGC. Update
7040 for new cpool_entry type.
7041 (find_constant1): Update for new cpool_entry type.
7042 (find_constant2): Likewise.
7043 (find_utf8_constant): Use find_tree_constant.
7044 (find_class_or_string_constant): Remove unnecessary cast to jword.
7045 Update for new cpool_entry type.
7046 (count_constant_pool_bytes): Update for new cpool_entry type.
7047 (write_constant_pool): Likewise.
7048 (alloc_name_constant): Use find_tree_constant.
7049 (build_constants_constructor): Update for new cpool_entry type.
7050
7051 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7052
7053 * parse.y (mark_parser_ctxt): Delete.
7054 (goal): Don't use ggc_add_root.
7055 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7056 (java_pop_parser_context): Let GC free parser_ctxt.
7057 (java_parser_context_resume): Likewise.
7058 * parse.h (struct parser_ctxt): Use gengtype to mark.
7059 (ctxp): Likewise.
7060 (ctxp_for_generation): Likewise.
7061 * lex.h (struct java_lc_s): Mark for gengtype.
7062 (java_lexer): Rearrange for gengtype.
7063 * config-lang.in (gtfiles): Add lex.h, parse.h.
7064
7065 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7066
7067 * All Files: Remove PARAMS macro.
7068
7069 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7070 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7071 `__STDC__' macros.
7072
7073 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7074 VA_CLOSE.
7075
7076 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
7077
7078 * Make-lang.in (java.install-common, java.uninstall,
7079 java.install-info, java.install-man): Prepend $(DESTDIR)
7080 to destination paths in all (un)installation commands.
7081 (java.install-common): Rewrite $(LN) command to support
7082 DESTDIR with "ln" as well as with "ln -s".
7083
7084 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
7085
7086 * java-tree.h: Protect against multiple inclusion.
7087
7088 2003-01-07 Tom Tromey <tromey@redhat.com>
7089
7090 * class.c (add_assume_compiled): Don't adjust parent if we're
7091 already at the root of tree.
7092
7093 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7094
7095 * lang.c (dump_compound_expr): Prototype.
7096
7097 2003-01-03 Tom Tromey <tromey@redhat.com>
7098
7099 Fix for PR java/8712:
7100 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7101 when simply checking against `null'.
7102
7103 2003-01-03 Tom Tromey <tromey@redhat.com>
7104
7105 * gcj.texi (Standard Properties): Document http.proxyHost and
7106 http.proxyPort.
7107
7108 * gcj.texi (GNU Classpath Properties): Document new properties.
7109
7110 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7111
7112 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7113 java/lang-options.h, java/mangle.c, java/mangle_name.c,
7114 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7115
7116 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7117
7118 * Make-lang.in, boehm.c, buffer.c,
7119 buffer.h, builtins.c, class.c,
7120 config-lang.in, constants.c,
7121 convert.h, decl.c, except.c,
7122 expr.c, java-except.h,
7123 java-tree.h, javaop.def,
7124 jcf-parse.c, jcf-write.c,
7125 jv-scan.c, jvgenmain.c,
7126 jvspec.c, keyword.gperf,
7127 keyword.h, lang-options.h,
7128 lang-specs.h, lang.c, lex.c,
7129 lex.h, mangle.c, mangle_name.c,
7130 parse-scan.y, parse.h, parse.y,
7131 typeck.c, verify.c, xref.c,
7132 xref.h: Replace "GNU CC" with
7133 "GCC" in the copyright header.
7134
7135 * check-init.c, gjavah.c, javaop.h,
7136 jcf-depend.c, jcf-dump.c, jcf-io.c,
7137 jcf-path.c, jcf-reader.c, jcf.h,
7138 zextract.c, zipfile.h: These files are
7139 "part of GCC". Also say "GCC" not "GNU CC".
7140
7141 2002-12-30 DJ Delorie <dj@redhat.com>
7142
7143 * Make-lang.in: Protect against texi2pod/pod2man failing.
7144
7145 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
7146
7147 * gcj.texi: Use @copying.
7148
7149 2002-12-27 Mark Mitchell <mark@codesourcery.com>
7150
7151 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7152 print_cxx_classname.
7153 (print_cxx_classname): Add add_scope parameter.
7154 (print_class_decls): Do not emit a semicolon after the extern
7155 "Java" block.
7156 (process_file): Adjust calls to print_cxx_classname.
7157
7158 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7159
7160 * gcj.texi: Include Cover Texts in man page.
7161
7162 2002-12-23 Jeff Sturm <jsturm@one-point.com>
7163
7164 * class.c (build_static_field_ref): Check FIELD_FINAL.
7165
7166 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7167 instead of current_constant_pool_data_ref.
7168 * java-tree.h (current_constant_pool_data_ref): Undefine.
7169 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7170 * jcf-parse.c (init_outgoing_cpool): Don't initialize
7171 current_constant_pool_data_ref.
7172
7173 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7174 not build_internal_class_name.
7175
7176 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7177 Use it when class ref isn't certain to be compiled.
7178
7179 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7180
7181 * gcj.texi: Include gcc-common.texi.
7182 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7183 $(srcdir)/doc/include/gcc-common.texi.
7184
7185 2002-12-22 Anthony Green <green@redhat.com>
7186
7187 * gcj.texi (Limitations): Add note about org.xml.sax and
7188 org.w3c.dom.
7189
7190 2002-12-20 Tom Tromey <tromey@redhat.com>
7191
7192 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7193 where minimum case value is Integer.MIN_VALUE.
7194 Fixes PR java/8955.
7195
7196 2002-12-18 Andrew Haley <aph@redhat.com>
7197
7198 * parse.y (patch_invoke): Force evaluation order when `check' is
7199 set. For PR libgcj/8945.
7200
7201 2002-12-16 Mark Mitchell <mark@codesourcery.com>
7202
7203 * gcj.texi: Change version number to 3.4.
7204
7205 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
7206 Andrew Haley <aph@redhat.com>
7207
7208 * parse.y (source_end_java_method): Remove custom encoding of line
7209 numbers for a function decl before passing it to the back end.
7210
7211 2002-12-03 Andrew Haley <aph@redhat.com>
7212
7213 * class.c (make_class_data): New field, "chain".
7214 * decl.c (java_init_decl_processing): Likewise.
7215
7216 2002-12-02 Tom Tromey <tromey@redhat.com>
7217
7218 For PR java/8740:
7219 * parse.y (do_resolve_class): Handle qualified name via
7220 recursion.
7221
7222 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7223
7224 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7225 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7226 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7227 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7228 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7229 Include coretypes.h and tm.h.
7230 * Make-lang.in: Update dependencies.
7231
7232 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7233
7234 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7235
7236 2002-11-25 Diego Novillo <dnovillo@redhat.com>
7237
7238 * jcf-reader.c: Don't expand JCF_readu4 inside the
7239 expansion of JCF_SKIP.
7240
7241 2002-11-25 Diego Novillo <dnovillo@redhat.com>
7242
7243 * jcf-reader.c: Don't expand JCF_readu4 inside the
7244 expansion of JCF_SKIP.
7245
7246 2002-11-22 Tom Tromey <tromey@redhat.com>
7247
7248 * parse.y (patch_binop): Cast right hand side of shift expression
7249 to `int'. Fixes PR java/8676.
7250
7251 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
7252 Andrew Haley <aph@redhat.com>
7253
7254 * gcc/java/jcf-write.c (write_classfile): Remove target
7255 class file, if it exists, before renaming the temporary
7256 class file to it.
7257
7258 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7259
7260 * jvspec.c (lang_specific_spec_functions): New.
7261
7262 2002-11-18 Tom Tromey <tromey@redhat.com>
7263
7264 Fix for PR java/7912:
7265 * expr.c (can_widen_reference_to): Allow cast of array to
7266 Cloneable or Serializable.
7267 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7268 (java_io_serializable_identifier_node): Likewise.
7269 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7270 (valid_ref_assignconv_cast_p): Use new identifier nodes.
7271 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7272 java_io_serializable.
7273 * decl.c (java_init_decl_processing): Initialize
7274 java_lang_cloneable_identifier_node and
7275 java_io_serializable_identifier_node.
7276 (java_lang_cloneable_identifier_node): New global.
7277 (java_io_serializable_identifier_node): Likewise.
7278
7279 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
7280
7281 * buffer.c: Remove unnecessary casts.
7282 * check-init.c: Likewise.
7283 * class.c: Likewise.
7284 * constants.c: Likewise.
7285 * decl.c: Likewise.
7286 * except.c: Likewise.
7287 * gjavah.c: Likewise.
7288 * jcf-io.c: Likewise.
7289 * jcf-parse.c: Likewise.
7290 * jcf-path.c: Likewise.
7291 * jvspec.c: Likewise.
7292 * lang.c: Likewise.
7293 * lex.c: Likewise.
7294 * verify.c: Likewise.
7295
7296 2002-11-06 Tom Tromey <tromey@redhat.com>
7297
7298 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7299 a JNI header.
7300
7301 2002-11-05 Tom Tromey <tromey@redhat.com>
7302
7303 Fix for PR java/6388.
7304 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7305 * java-tree.h (enum java_tree_index): New values
7306 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7307 (decimal_int_max, decimal_long_max): New defines.
7308 * lex.c (yylex): Rewrote range checking. Sign extend literals.
7309 (error_if_numeric_overflow): Rewrote range checking.
7310 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
7311 decimal_long_max.
7312
7313 2002-11-02 Tom Tromey <tromey@redhat.com>
7314
7315 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
7316
7317 * class.c (make_method_value): Put class name, not signature, into
7318 `throws' field. For PR java/8415.
7319
7320 2002-10-24 Tom Tromey <tromey@redhat.com>
7321
7322 * gcj.texi (Invoking gij): Document --showversion.
7323 (Standard Properties): java.library.path now set.
7324
7325 2002-10-23 Tom Tromey <tromey@redhat.com>
7326
7327 * gjavah.c (decode_signature_piece): In JNI mode, print
7328 `jobjectArray' when array depth is nonzero.
7329 Fixes PR java/8296.
7330
7331 2002-10-15 Andrew Haley <aph@redhat.com>
7332
7333 * parse.y (patch_invoke): Call force_evaluation_order on a static
7334 arg list.
7335 (resolve_qualified_expression_name): Call force_evaluation_order
7336 on a arg list that is part of a Qualified Expression Name.
7337
7338 * lang.c (dump_compound_expr): New.
7339 (java_dump_tree): New.
7340
7341 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
7342
7343 * gcj.texi: Added item describing the GCJ runtime property
7344 "gnu.gcj.progname".
7345
7346 2002-10-15 Richard Henderson <rth@redhat.com>
7347
7348 * jcf-parse.c (get_constant): Fix type warning.
7349
7350 2002-10-15 Andrew Haley <aph@redhat.com>
7351
7352 * java-tree.h (java_inlining_merge_static_initializers): Declare.
7353 (java_inlining_map_static_initializers): Declare.
7354
7355 2002-10-14 Andrew Haley <aph@redhat.com>
7356
7357 * tree-inline.c (remap_block): All local class initialization
7358 flags go in the outermost scope.
7359 (expand_call_inline): Call java_inlining_map_static_initializers.
7360 (expand_call_inline): Call java_inlining_merge_static_initializers.
7361 * java/lang.c (merge_init_test_initialization): New.
7362 (java_inlining_merge_static_initializers): New.
7363 (inline_init_test_initialization): New.
7364 (java_inlining_map_static_initializers): New.
7365
7366 2002-10-11 Mark Wielaard <mark@klomp.org>
7367
7368 * gcj.texi (Compatibility): Add Limitations and Extensions section.
7369
7370 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7371
7372 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
7373
7374 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7375
7376 * parse.y (merge_string_cste): Add parentheses around & within |.
7377
7378 2002-10-08 Tom Tromey <tromey@redhat.com>
7379
7380 * parse.y (variable_declarator_id): Simplify error path for
7381 array declarator error. For PR java/8003.
7382
7383 2002-10-08 Zack Weinberg <zack@codesourcery.com>
7384
7385 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
7386 bug_report_url.
7387
7388 2002-10-08 Andrew Haley <aph@redhat.com>
7389
7390 * parse.y (attach_init_test_initialization_flags): Check for
7391 error_mark_node.
7392
7393 2002-10-07 Anthony Green <green@redhat.com>
7394
7395 * parse.y (merge_string_cste): Fix bug in string concatenation.
7396
7397 2002-10-03 Michael Koch <konqueror@gmx.de>
7398
7399 * gcj.texi (Standard properties):
7400 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7401
7402 2002-10-02 Roger Sayle <roger@eyesopen.com>
7403
7404 PR optimization/6627
7405 * lang.c (java_init): If storing the vbit in function
7406 pointers, ensure that force_align_functions_log is atleast
7407 one to aid compatability with g++ vtables.
7408
7409 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
7410
7411 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7412 foul of type-based aliasing.
7413
7414 2002-09-30 Anthony Green <green@redhat.com>
7415
7416 * gcj.texi (Invoking jv-scan): Fix texinfo.
7417
7418 2002-09-28 Anthony Green <green@redhat.com>
7419
7420 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7421 (Code Generation): Add -fno-assert documentation.
7422 * jv-scan.c (flag_assert): New global.
7423 (options): Add assert option.
7424 (help): Add --no-assert documentation.
7425 * parse-scan.y (flag_assert): New global.
7426 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7427 (flag_assert): New global.
7428 * java-tree.h (flag_assert): New global.
7429 * lex.c (java_lex): Obey flag_assert.
7430 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7431 calling cc1.
7432
7433 2002-09-26 Andrew Haley <aph@redhat.com>
7434
7435 * expr.c (build_java_array_length_access): Check for null pointer.
7436 * expr.c (expand_java_arrayload): Likewise.
7437
7438 2002-09-21 Richard Henderson <rth@redhat.com>
7439
7440 * jcf-parse.c (get_constant): Decode from IEEE no matter
7441 what the target format.
7442
7443 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
7444
7445 * ChangeLog: Follow spelling conventions.
7446 * class.c: Likewise.
7447 * decl.c: Likewise.
7448 * expr.c: Likewise.
7449 * gjavah.c: Likewise.
7450 * java-tree.h: Likewise.
7451 * jcf-dump.c: Likewise.
7452 * jcf-parse.c: Likewise.
7453 * jvspec.c: Likewise.
7454 * lang.c: Likewise.
7455 * mangle.c: Likewise.
7456 * parse.y: Likewise.
7457
7458 2002-09-17 Tom Tromey <tromey@redhat.com>
7459
7460 * lex.c (java_read_unicode_collapsing_terminators): Handle case
7461 where \r appears at EOF. Fixes PR java/7950.
7462
7463 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7464
7465 * jvspec.c (lang_specific_driver): Remove unused variable.
7466
7467 2002-09-16 Geoffrey Keating <geoffk@apple.com>
7468
7469 * java-tree.h (union lang_tree_node): Add chain_next option.
7470
7471 2002-09-16 Richard Henderson <rth@redhat.com>
7472
7473 * jcf-parse.c (get_constant): Runtime check for IEEE format;
7474 use new real.h interface.
7475 * jcf-write.c (find_constant_index): Use new real.h interface.
7476 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
7477
7478 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
7479
7480 * lang.c: Follow spelling conventions.
7481
7482 2002-09-11 Per Bothner <per@bothner.com>
7483
7484 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
7485 constant to the type of the field.
7486 (java_complete_tree): Remove now-redundant code.
7487
7488 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
7489
7490 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
7491
7492 For PR java/5794:
7493 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
7494 return label if a ret instruction for the jsr has been reached.
7495
7496 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
7497
7498 * parse.y (DIR_SEPARATOR): Don't define.
7499 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
7500
7501 2002-08-28 Andrew Haley <aph@redhat.com>
7502
7503 * verify.c (verify_jvm_instructions): Allow exception handler
7504 inside code that is being protected, but generate a warning.
7505 * except.c (link_handler): Initialize `expanded' in new eh_range.
7506 (binding_depth, is_class_level, current_pc): Declare extern.
7507
7508 2002-09-01 Mark Wielaard <mark@klomp.org>
7509
7510 * gcj.texi: Add chapter about system properties.
7511 Fixed some typos.
7512
7513 2002-08-26 Tom Tromey <tromey@redhat.com>
7514
7515 * parse.y (try_builtin_assignconv): Allow narrowing primitive
7516 conversion if RHS_TYPE is byte, short, or char.
7517
7518 2002-08-22 Tom Tromey <tromey@redhat.com>
7519
7520 * gcj.texi (Invoking gij): Document -cp and -classpath.
7521
7522 2002-08-21 Tom Tromey <tromey@redhat.com>
7523
7524 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7525 $(prefix)/share. For PR libgcj/7633.
7526
7527 For PR java/6005 and PR java/7611:
7528 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7529 (java_can_use_bit_fields_p): New function.
7530
7531 2002-08-16 Tom Tromey <tromey@redhat.com>
7532
7533 * gcj.texi (Class Initialization): Mention class initialization of
7534 arrays.
7535
7536 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
7537
7538 * Make-lang.in (java-tree-inline.o): New.
7539 (JAVA_OBJS): Add java-tree-inline.o.
7540 * parse.y (source_end_java_method): Call java_optimize_inline.
7541 (java_expand_method_bodies): Save method's tree in
7542 DECL_SAVED_TREE.
7543 (add_stmt_to_compound): Keep track of the number of statments.
7544 * lang.c (java_init): Enable flag_inline_trees.
7545 (java_post_options): If flag_inline_functions is on, enable
7546 flag_inline_trees instread.
7547 (decl_constant_value): New.
7548 (java_tree_inlining_walk_subtrees): New.
7549 * java-tree.h (DECL_NUM_STMTS): New macro.
7550 (java_optimize_inline): Declare.
7551 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7552 Handle a LABEL_EXPR.
7553 * decl.c (build_result_decl): If we already have a DECL_RESULT
7554 don't make another.
7555 (dump_function): New.
7556 (java_optimize_inline): New.
7557 (dump_function): New.
7558
7559 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
7560
7561 For PR java/7483:
7562 * parse.y (build_assertion): Invert return from
7563 desiredAssertionStatus.
7564
7565 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7566
7567 * jcf-write.c (get_access_flags): Return correct access flags for
7568 private and protected inner classes.
7569
7570 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7571
7572 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7573
7574 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
7575
7576 * mangle_name.c: Don't include obstack.h twice.
7577 * xref.c: Don't include obstack.h.
7578
7579 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
7580
7581 * class.c: (permanent_obstack): Delete declaration.
7582 * constants.c: (permanent_obstack): Delete declaration.
7583 * except.c: (permanent_obstack): Delete declaration.
7584 * expr.c: (permanent_obstack): Delete declaration.
7585 * jcf-parse.c: (permanent_obstack): Delete declaration.
7586 (saveable_obstack): Delete declaration.
7587 * parse.h: (permanent_obstack): Delete declaration.
7588 * typeck.c: (permanent_obstack): Delete declaration.
7589
7590 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
7591
7592 * gcj.texi (version-gcc): Increase to 3.3.
7593
7594 2002-07-22 Tom Tromey <tromey@redhat.com>
7595
7596 * lex.c (java_lex): Check for `e' or `E' after 0.
7597
7598 2002-07-21 Richard Henderson <rth@redhat.com>
7599
7600 * lang.c (java_unsafe_for_reeval): New.
7601 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7602
7603 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
7604
7605 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7606 (jcf_path_init): Use GET_ENVIRONMENT.
7607
7608 2002-07-10 Roger Sayle <roger@eyesopen.com>
7609 Zack Weinberg <zack@codesourcery.com>
7610
7611 * builtins.c (initialize_builtins): Remove defines that
7612 handled C/C++ specific junk hereby removed from builtins.def.
7613
7614 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
7615
7616 * lang.c (java_post_options): Update prototype.
7617
7618 2002-07-05 Roger Sayle <roger@eyesopen.com>
7619
7620 * builtins.c (initialize_builtins): Ignore the additional
7621 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
7622 the builtins.def file.
7623
7624 2002-07-01 Tom Tromey <tromey@redhat.com>
7625
7626 For PR libgcj/7073:
7627 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7628 specially.
7629
7630 2002-07-01 Roger Sayle <roger@eyesopen.com>
7631
7632 * java/decl.c (builtin_function): Accept additional parameter.
7633 (java_init_decl_processing): Pass an additional NULL_TREE
7634 argument to builtin_function.
7635
7636 2002-06-29 T.J. Mather <tjmather@maxmind.com>
7637
7638 * gcj.texi: Fixed gcj invocation example so that it compiles.
7639
7640 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7641
7642 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7643 * parse.y (mark_parser_ctxt): Likewise.
7644 (check_modifiers, declare_local_variables): Avoid incorrect
7645 hardcoded constant 10.
7646
7647 * lex.c (java_read_char): Avoid "comparison is always true"
7648 warning.
7649
7650 2002-06-25 Andreas Schwab <schwab@suse.de>
7651
7652 * expr.c (JSR): Avoid undefined operation on PC.
7653
7654 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7655
7656 * decl.c (clear_binding_level): Const-ify.
7657
7658 2002-06-13 Akim Demaille <akim@epita.fr>
7659
7660 * parse.y (class_declaration, interface_declaration): Make sure
7661 all their rules have an action, in order to avoid meaningless `$$
7662 = $1' and their type clashes.
7663
7664 2002-06-11 Tom Tromey <tromey@redhat.com>
7665
7666 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7667 * parse-scan.y (statement_without_trailing_substatement): Added
7668 assert_statement.
7669 (assert_statement): New rule.
7670 * java-tree.h (struct lang_type) [assertions]: New field.
7671 (TYPE_USES_ASSERTIONS): New macro.
7672 (CLASS_USES_ASSERTIONS): Likewise.
7673 (FIELD_SYNTHETIC): New define.
7674 * lex.c (java_lval;): Added ASSERT_TK.
7675 * parse.y (ASSERT_TK): Added.
7676 (statement_without_trailing_substatement): Added assert_statement.
7677 (assert_statement): New rule.
7678 (build_assertion): New function.
7679 (maybe_generate_pre_expand_clinit): Create and initialize
7680 $assertionsDisabled.
7681 (lookup_package_type): Removed decl.
7682 * keyword.h: Rebuilt.
7683 * keyword.gperf (assert): New token.
7684
7685 2002-06-10 Akim Demaille <akim@epita.fr>
7686
7687 * parse.y (interface_type_list, class_member_declaration)
7688 (unary_expression_not_plus_minus): Remove duplicate %type.
7689 Whitespace changes.
7690
7691 2002-06-09 Tom Tromey <tromey@redhat.com>
7692
7693 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7694
7695 * parse.y (method_header): Give error message in all cases.
7696 Fixes PR java/6865.
7697
7698 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7699
7700 Don't use RTL inlining. Fix for PR java/6820.
7701 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7702 (flag_really_inline): New.
7703 (java_decode_option): Set flag_really_inline if -finline-functions
7704 is seen.
7705 (java_post_options): New function. Turn off inlining unless
7706 flag_really_inline is set.
7707
7708 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7709
7710 * gjavah.c (throwable_p): Accept argument as either a classname or
7711 signature fragment. Create null-terminated classname string for super
7712 when calling itself recursively.
7713 (decode_signature_piece): Skip first character from class name
7714 signature when calling throwable_p.
7715
7716 2002-06-08 H.J. Lu (hjl@gnu.org)
7717
7718 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7719
7720 2002-06-04 Tom Tromey <tromey@redhat.com>
7721
7722 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7723
7724 2002-06-04 Michael Koch <konqueror@gmx.de>
7725
7726 * gcj.texi (Input Options): Fixed typo.
7727
7728 2002-06-04 Zack Weinberg <zack@codesourcery.com>
7729
7730 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7731 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7732 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7733 and all now-pointless local variables. Rename other local
7734 variables to reflect their not being handles.
7735
7736 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7737 #if JCF_USE_STDIO blocks.
7738
7739 * parse.y: Add missing semicolon at end of rule.
7740
7741 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7742
7743 * check-init.c (attach_initialized_static_class): Delete, unused.
7744 * parse.y: Use htab_t instead of struct hashtable, update
7745 all uses.
7746 * java-tree.h: Include hashtab.h instead of hash.h.
7747 (struct lang_decl_func): Use htab_t, set up for gengtype.
7748 (struct init_test_hash_entry): Delete.
7749 (struct treetreehash_entry): New.
7750 (java_treetreehash_find): New
7751 (java_treetreehash_new): New prototype.
7752 (java_treetreehash_create): New prototype.
7753 (java_mark_tree): Delete prototype.
7754 (java_hash_hash_tree_node): Delete prototype.
7755 (java_hash_compare_tree_node): Delete prototype.
7756 (attach_initialized_static_class): Delete prototype.
7757 * expr.c (build_class_init): Update to use java_treetreehash
7758 functions.
7759 (java_expand_expr): Update to use htab_t.
7760 (emit_init_test_initialization): Likewise.
7761 * decl.c (java_mark_tree): Delete.
7762 * class.c (init_test_hash_newfunc): Delete.
7763 (java_hash_hash_tree_node): Delete.
7764 (java_hash_compare_tree_node): Delete.
7765 (add_method_1): Update to use java_treetreehash functions.
7766 (JAVA_TREEHASHHASH_H): New macro.
7767 (java_treetreehash_hash): New function.
7768 (java_treetreehash_compare): New function.
7769 (java_treetreehash_find): New function.
7770 (java_treetreehash_new): New function.
7771 (java_treetreehash_create): New function.
7772 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7773
7774 * Make-lang.in (java/parse.o): Depend on debug.h.
7775 * java-tree.h (struct lang_identifier): Use gengtype.
7776 (union lang_tree_node): New.
7777 (struct lang_decl_func): Use gengtype.
7778 (struct lang_decl_var): Likewise.
7779 (struct lang_decl): Likewise.
7780 * parse.y: Include debug.h.
7781 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7782
7783 * lang.c (struct language_function): New dummy structure.
7784
7785 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7786 descriminator for DECL_LANG_SPECIFIC.
7787 (struct lang_decl_func): Rename from struct lang_decl.
7788 (enum lang_decl_desc): New.
7789 (struct lang_decl): Make it a union. Update all the accessor macros.
7790 (struct lang_type): Use gengtype.
7791 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7792 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7793 are now the same size.
7794 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7795 use discriminator to mark DECL_LANG_SPECIFIC.
7796
7797 * Make-lang.in (gt-java-builtins.h): New rule.
7798 (java/builtins.o): Add dependency on gt-<filename>.h.
7799 * builtins.c: Use gengtype for roots.
7800 (union string_or_tree): Use gengtype.
7801 (struct builtin_record): Use gengtype.
7802 * config-lang.in (gtfiles): Add builtins.c.
7803
7804 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7805 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7806 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7807 gt-java-parse.h, gtype-java.h): Add rules to generate.
7808 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7809 (class.o): Add dependency on gt-*.h.
7810 (constants.o): Likewise.
7811 (decl.o): Likewise.
7812 (expr.o): Likewise.
7813 (jcf-parse.o): Likewise.
7814 (jcf-write.o): Likewise.
7815 (lang.o): Likewise.
7816 * config-lang.in (gtfiles): New.
7817 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7818 * constants.c: Replace uses of ggc_add_* with GTY markers.
7819 Include gt-*.h.
7820 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7821 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7822 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7823 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7824 Include gt-*.h.
7825 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7826 Include gt-*.h.
7827 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7828 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
7829 gt-*.h.
7830 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7831 Include gtype-java.h.
7832
7833 2002-06-02 Tom Tromey <tromey@redhat.com>
7834
7835 Fix for PR java/5913:
7836 * parse.y (patch_binop): Call patch_string on op1.
7837
7838 2002-06-02 Tom Tromey <tromey@redhat.com>
7839
7840 Fix for PR java/1343, PR java/6336:
7841 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7842 formatting. Changed return type.
7843 (anonymous_class_counter): Moved to top of file.
7844 (maybe_make_nested_class_name): Append number to class name for
7845 function-local classes.
7846
7847 2002-05-28 Zack Weinberg <zack@codesourcery.com>
7848
7849 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7850 * Make-lang.in: Update dependency lists.
7851
7852 2002-05-18 Mark Mitchell <mark@codesourcery.com>
7853
7854 * gjavah.c (throwable_p): Do not free the name of the class after
7855 passing it to find_class.
7856 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7857 * jcf-io.c (dirent.h): Include it.
7858 (fnmatch.h): Likewise.
7859 (compare_path): New function.
7860 (java_or_class_file): Likewise.
7861 (memoized_dirlist_entry): New type.
7862 (memoized_dirlist_lookup_eq): New function.
7863 (memoized_dirlists): New variable.
7864 (caching_stat): New function.
7865 (memoized_class_lookup_eq): New function.
7866 (memoized_class_lookups): Likewise.
7867 (find_class): Use memoized_class_lookups and caching_stat.
7868 * jcf.h (JCF_USE_SCANDIR): Define.
7869 * parse.y (java_expand_classes): Write the class files in reverse
7870 order.
7871
7872 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7873
7874 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7875
7876 2002-05-13 Mark Mitchell <mark@codesourcery.com>
7877
7878 * jcf-write.c (write_classfile): Unlink the temporary file if it
7879 cannot be renamed. Use concat to build up the name of the
7880 temporary file.
7881
7882 2002-05-08 Mark Mitchell <mark@codesourcery.com>
7883
7884 * jcf-write.c (write_classfile): Write the file to a
7885 temporary file and then rename it.
7886
7887 2002-05-07 Tom Tromey <tromey@redhat.com>
7888
7889 * gjavah.c (throwable_p): Use xstrdup, not strdup.
7890
7891 Fix for PR java/1200:
7892 * gjavah.c (throwable_p): New function.
7893 (decode_signature_piece): Use it. A `WeakReference' isn't the
7894 same as a `jweak'.
7895 Include hashtab.h.
7896 (gcjh_streq): New function.
7897
7898 2002-05-07 Andreas Jaeger <aj@suse.de>
7899
7900 * parse.y (finish_for_loop): Fix if statement.
7901
7902 2002-05-06 Tom Tromey <tromey@redhat.com>
7903
7904 Fix for PR java/5941:
7905 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7906 loop update expression.
7907 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7908 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7909
7910 2002-05-04 Mark Wielaard <mark@klomp.org>
7911
7912 For PR java/6519:
7913 * parse.y (build_string_concatenation): Return just op1 only when op2
7914 is null and op1 is a STRING_CST, otherwise always construct a
7915 StringBuffer.
7916
7917 2002-04-27 Tom Tromey <tromey@redhat.com>
7918
7919 For PR java/6382:
7920 * parse.y (string_convert_int_cst): New function.
7921 (merge_string_cste): Use it.
7922
7923 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
7924
7925 * java-tree.h (java_parse_file): Update.
7926 (java_set_yydebug): Remove.
7927 * jcf-parse.c (yydebug): Remove.
7928 (java_set_yydebug): Die.
7929 (java_parse_file): Update.
7930 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7931
7932 2002-04-24 Tom Tromey <tromey@redhat.com>
7933
7934 For PR java/6425:
7935 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7936 EXPR_WFL_QUALIFICATION of qual_wfl.
7937
7938 2002-04-23 Per Bothner <per@bothner.com>
7939
7940 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
7941 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
7942 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
7943
7944 2002-04-23 Tom Tromey <tromey@redhat.com>
7945
7946 For PR java/6314:
7947 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
7948 recognize `-fcompile-resource='.
7949 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
7950 a bit.
7951
7952 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
7953
7954 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7955 paths. Fixes PR java/2791.
7956
7957 2002-04-19 Andrew Haley <aph@redhat.com>
7958
7959 * jcf-write.c (push_long_const): lo, hi: New variables.
7960 Use rshift_double to extract the high part of a 64-bit long.
7961 Use WORD_TO_INT to extract the low part.
7962
7963 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7964 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
7965 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7966
7967 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7968
7969 * typeck.c (incomplete_type_error): Remove.
7970
7971 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7972
7973 * class.c (make_class_data): Set DECL_ALIGN on static class data,
7974 for hash synchronization.
7975 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7976 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7977 class_type_node.
7978
7979 2002-04-16 Mark Wielaard <mark@klomp.org>
7980
7981 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7982 negative zero.
7983
7984 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7985
7986 Fix for PR java/6294:
7987 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7988 interfaces.
7989
7990 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7991
7992 Fix for PR java/6085:
7993 * parse.y (patch_method_invocation): Always use build_access_to_thisn
7994 to get enclosing "this" argument for inner-class constructor
7995 invocation. Pass correct arguments to build_access_to_thisn.
7996
7997 2002-04-10 Andreas Jaeger <aj@suse.de>
7998
7999 * gcj.texi (Input Options): Fix extdirs patch.
8000
8001 2002-04-10 Anthony Green <green@redhat.com>
8002
8003 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8004
8005 2002-04-09 Anthony Green <green@redhat.com>
8006
8007 * gcj.texi (Input Options): Add --extdirs documentation.
8008 * jcf-dump.c (OPT_extdirs): New macro.
8009 (options): Add extdirs option.
8010 (help): Describe --extdirs.
8011 (main): Handle OPT_extdirs.
8012 * gjavah.c (OPT_extdirs): New macro.
8013 (options): Add extdirs option.
8014 (help): Describe --extdirs.
8015 (main): Handle OPT_extdirs.
8016 * jcf-path.c (jcf_path_init): Add extdirs support.
8017 (jcf_path_extdirs_arg): New function.
8018 (extensions): New variable to hold extensions path entries.
8019 * jvspec.c: Remove -fextdirs= when compiling main().
8020 * lang.c (java_decode_option): Handle -fextdirs=.
8021 * jcf.h (jcf_path_extdirs_arg): Declare new function.
8022 * Make-lang.in: Compile jcf-path with version info for use in
8023 identifying the appropriate libgcj.jar.
8024
8025 2002-04-08 Tom Tromey <tromey@redhat.com>
8026
8027 For PR libgcj/5303:
8028 * .cvsignore: Added rmic.1 and rmiregistry.1.
8029 * gcj.texi (Top): Link to new nodes.
8030 (Invoking rmic): New node.
8031 (Invoking rmiregistry): Likewise.
8032 * Make-lang.in (java.generated-manpages): Added rmic.1 and
8033 rmiregistry.1.
8034 (java.maintainer-clean): Likewise.
8035 ($(srcdir)/java/rmic.1): New target.
8036 ($(srcdir)/java/rmiregistry.1): Likewise.
8037 (java.install-man): Handle rmic.1 and rmiregistry.1.
8038
8039 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8040
8041 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8042 Add note about handling uncaught exceptions. Add an exception handler
8043 to example.
8044
8045 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8046
8047 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8048 after using it to patch CALL_EXPR.
8049
8050 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8051
8052 * gcj.texi (Invocation): Document CNI invocation API.
8053
8054 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8055
8056 * expr.c (truthvalue_conversion): Rename. Update.
8057 (expand_compare): Update.
8058 * java-tree.h (java_truthvalue_conversion): New.
8059 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8060
8061 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8062
8063 * java-tree.h (java_mark_addressable): New.
8064 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8065 * typeck.c (mark_addressable): Rename, update.
8066
8067 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8068
8069 * expr.c (build_java_binop): Update.
8070 * java-tree.h (java_signed_type, java_unsigned_type,
8071 java_signed_or_unsigned_type): Update.
8072 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8073 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8074 * parse.y (patch_binop): Update.
8075 * typeck.c (signed_or_unsigned_type, unsigned_type,
8076 signed_type): Update.
8077
8078 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8079
8080 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8081 (java_dummy_print): Remove.
8082 (lang_print_error): Rename. Exit early if inhibiting output.
8083 (inhibit_error_printing_function): New.
8084 (java_init): Don't set hook.
8085 (lang_init_source): Use new boolean.
8086
8087 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8088
8089 * parse.y (do_resolve_class): Fix infinite recursion.
8090
8091 2002-03-29 Tom Tromey <tromey@redhat.com>
8092
8093 * parse.y (check_inner_circular_reference): Ignore incomplete
8094 types.
8095
8096 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8097
8098 * Make-lang.in (builtins.o): Update.
8099 * boehm.c (get_boehm_type_descriptor): Update.
8100 * builtins.c: Include langhooks.h.
8101 * decl.c (java_init_decl_processing): Update.
8102 * java-tree.h (java_type_for_mode, java_type_for_size): New.
8103 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8104 Redefine.
8105 * typeck.c (type_for_mode, type_for_size): Update.
8106
8107 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8108
8109 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8110
8111 2002-03-28 Tom Tromey <tromey@redhat.com>
8112
8113 * except.c (expand_end_java_handler): If the handler type is NULL,
8114 use java.lang.Throwable. Fixes PR java/5986.
8115
8116 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8117
8118 Fix for PR java/4715:
8119 * jcf-parse.c (parse_source_file_3): New function.
8120 (read_class): Call it.
8121 (java_parse_file): Likewise.
8122
8123 2002-03-28 Jan Hubicka <jh@suse.cz>
8124
8125 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8126
8127 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8128
8129 * parse.y (resolve_package): Initialize "decl".
8130 (lookup_package_type): Remove unused function.
8131
8132 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8133
8134 Fix for PR java/5993:
8135 * parse.y (resolve_package): Return the decl if resolution was
8136 successful. Don't special case "java.lang" and "java.lang.reflect"
8137 packages. Set type_name to the merged identifier.
8138 (resolved_qualified_expression_name): Print error using "name" if
8139 resolve_package returns NULL_TREE.
8140
8141 2002-03-27 Tom Tromey <tromey@redhat.com>
8142
8143 * expr.c (expand_invoke): Don't generate null pointer check if
8144 we're calling <init>.
8145
8146 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8147
8148 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8149 fix prototype.
8150 * java-tree.h (java_lang_expand_expr): Similarly.
8151 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8152 (java_init): Don't set hook.
8153
8154 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8155
8156 Fix for PR java/5850:
8157 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8158 context if field was not found in the current scope.
8159 * expr.c (lookup_field): Don't look in enclosing contexts.
8160
8161 2002-03-26 Tom Tromey <tromey@redhat.com>
8162
8163 Fix for PR java/5942:
8164 * parse.y (init_src_parse): Added sanity check.
8165 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8166 elements, not 11.
8167
8168 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8169
8170 * decl.c (lang_mark_tree): Rename java_mark_tree.
8171 * java-tree.h (java_mark_tree): New.
8172 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8173
8174 2002-03-25 Zack Weinberg <zack@codesourcery.com>
8175
8176 * lex.c: Change java_perform_atof to take normal parameters
8177 instead of a pointer to a parameter block. Call it directly
8178 from java_lex.
8179
8180 2002-03-22 Mark Wielaard <mark@klomp.org>
8181
8182 Fix for PR java/5368:
8183 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8184 when printing error message.
8185
8186 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8187
8188 * decl.c (maybe_build_cleanup): Remove.
8189
8190 2002-03-22 Tom Tromey <tromey@redhat.com>
8191
8192 Andrew Haley <aph@cambridge.redhat.com>
8193
8194 * expr.c (build_field_ref): Don't build a check if the field is a
8195 member of `this'.
8196
8197 2002-03-21 Eric Blake <ebb9@email.byu.edu>
8198
8199 Fix for PR java/6026:
8200 * lex.c (java_lex): Fix parsing of consecutive floats.
8201
8202 2002-03-21 Tom Tromey <tromey@redhat.com>
8203
8204 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8205 class.
8206
8207 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8208
8209 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8210 insert_block, getdecls, kept_level_p, global_bindings_p): New.
8211
8212 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8213
8214 * gcj.texi: @code{gcj} becomes @command{gcj}.
8215 @code{gcc} becomes @command{gcc}.
8216 GcjRaw changed to gnu.gcc.RawData.
8217
8218 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8219
8220 * decl.c (start_java_method): Use new hook.
8221 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8222 (java_init): Remove old hook.
8223
8224 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
8225
8226 * builtins.c (define_builtin): Do nothing if `type' is null.
8227 Fixes PR java/5876.
8228
8229 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8230
8231 * parse.y (parser_check_super_interface): Fix error message
8232 grammar/order.
8233
8234 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8235
8236 * jcf-parse.c (get_constant): Delete unused variables.
8237
8238 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8239
8240 * java-tree.h (java_parse_file): New.
8241 * jcf-parse.c (yyparse): Rename java_parse_file.
8242 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8243
8244 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8245
8246 * parse.y (craft_constructor): Return the constructor decl.
8247 (java_expand_classes): Update comments.
8248 (lookup_method_invoke): Call fix_constructors immediately for
8249 anonymous class. Fixes PR java/5935.
8250
8251 2002-03-15 Anthony Green <green@redhat.com>
8252
8253 * jcf-parse.c (yyparse): Don't emit class registration
8254 constructor when compiling resource files.
8255
8256 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8257
8258 * lang.c (java_tree_code_type, java_tree_code_length,
8259 tree_code_name): Delete.
8260 (tree_code_type, tree_code_length, tree_code_name): Define.
8261 (java_init): Don't try to copy into the various tree_code
8262 arrays.
8263
8264 2002-03-12 Tom Tromey <tromey@redhat.com>
8265
8266 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8267 UTF-8, not UCS-2. Fixes PR java/5923.
8268
8269 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8270 a call_expr wrapped in a convert. Fixes PR java/5848.
8271
8272 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8273
8274 * jcf-write.c (write_classfile): Improve error strings.
8275
8276 2002-03-11 Eric Blake <ebb9@email.byu.edu>
8277
8278 * lex.c: Adjust comments to GNU standards.
8279
8280 2002-03-11 Eric Blake <ebb9@email.byu.edu>
8281
8282 Fix for PR java/5902:
8283 * lex.c (java_lex): Fix parsing of literals.
8284
8285 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8286
8287 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8288 to prevent it getting evaluated twice in the store checking case.
8289 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8290 examining OBJECT.
8291
8292 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8293
8294 * decl.c (java_init_decl_processing): Make sure class_type_node
8295 alignment is not less than 64 bits if hash synchronization is enabled.
8296
8297 2002-03-08 Per Bothner <per@bothner.com>
8298
8299 * parse.y (java_complete_lhs): Check if patch_assignment
8300 returned an error-mark.
8301
8302 * parse.y (try_builtin_assignconv): Don't special-case zero.
8303
8304 2002-03-08 Per Bothner <per@bothner.com>
8305
8306 Fix for PR java/5812.
8307 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
8308 here instead of in JSR macro. Likewise with load_type_state call.
8309 Do the latter on if the return_pc has been verified (the jsr returns).
8310 (JSR): Now just call build_java_jsr.
8311
8312 2002-03-07 Jeff Sturm <jsturm@one-point.com>
8313
8314 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
8315 (java.install-common): Link native driver to
8316 JAVA_TARGET_INSTALL_NAME.
8317
8318 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
8319
8320 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
8321 * builtins.c(sin_builtin): Likewise
8322 * builtins.c(sqrt_builtin): Likewise
8323
8324 2002-03-03 Zack Weinberg <zack@codesourcery.com>
8325
8326 * java/expr.c, java/jcf-parse.c, java/lex.c:
8327 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
8328 REAL_ARITHMETIC blocks unconditional. Delete some further
8329 #ifdef blocks predicated on REAL_ARITHMETIC.
8330
8331 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8332
8333 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
8334 explicit sizeof/sizeof.
8335 * decl.c (java_init_decl_processing): Likewise.
8336 * jcf-parse.c (init_jcf_parse): Likewise.
8337 * parse.y (init_src_parse): Likewise.
8338
8339 2002-03-02 Per Bothner <per@bothner.com>
8340
8341 Make --CLASSPATH by a synonym for --classpath and -classpath.
8342 Implement --bootclasspath.
8343 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
8344 (classpath_l): Remove.
8345 (jcf_path_CLASSPATH_arg): Remove.
8346 (jcf_path_bootclasspath_arg): New function.
8347 (jcf_path_seal): Simplify accordingly.
8348
8349 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
8350 (jcf_path_CLASSPATH): Remove declaration.
8351 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
8352 (lang_specific_driver): Translate -bootclasspath.
8353 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
8354 * lang.c (decode_lang_options): Do jcf_path_init first.
8355 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
8356 * gjavah.c: Also handle --bootclasspath.
8357 Handle --CLASSPATH as a synonum for --classpath.
8358 * jcf-dump.c: Likewise.
8359
8360 "." is not part of system path, but is the default for --classpath.
8361 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
8362 (jcf_path_seal): Add "." if no CLASSPATH specified.
8363
8364 * gcj.texi: Document changes.
8365
8366 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8367
8368 * expr.c (build_java_arraystore_check): Fix formatting.
8369
8370 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8371
8372 Fix for PR java/5758, java/5632:
8373 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
8374 inner-class separator too.
8375 * parse.y (do_resolve_class): New local `decl_result.'
8376 Progressively build a name for what can have been loaded.
8377
8378 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8379
8380 * expr.c (java_array_data_offset): Removed function.
8381 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
8382 (build_java_array_length_access): Obtain "length" value using a
8383 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
8384 (build_java_arrayaccess): Correct comment. Access "data" using a
8385 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
8386 (build_java_arraystore_check): New function.
8387 (expand_java_arraystore): Use build_java_arraystore_check.
8388 * parse.y (patch_assignment): Simplify code to insert a store check
8389 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
8390 * check-init.c (check_init): Update to reflect that an array length
8391 access is now a COMPONENT_REF.
8392 * gcj.texi (Code Generation): Improve documentation of
8393 -fno-bounds-check. Add documentation for -fno-store-check.
8394 * java-tree.h (flag_store_check): Declare.
8395 (build_java_arraystore_check): Declare.
8396 * lang.c (flag_store_check): Initialize to 1.
8397 (lang_f_options): Add store-check option.
8398 * jvspec.c: Don't pass store-check option to jvgenmain.
8399 * lang-options.h: Add help string for -fno-store-check.
8400
8401 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
8402
8403 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8404 * java-tree.h (java_dup_lang_specific_decl): New.
8405 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8406
8407 2002-02-27 Zack Weinberg <zack@codesourcery.com>
8408
8409 * builtins.c, decl.c: Delete traditional-mode-related code
8410 copied from the C front end but not used, or used only to
8411 permit the compiler to link.
8412
8413 2002-02-22 Tom Tromey <tromey@redhat.com>
8414
8415 Fix for PR java/2369:
8416 * jvspec.c (verify_class_name): New function.
8417 (lang_specific_driver): Call it.
8418 (JAVA_START_CHAR_P): New macro.
8419 (JAVA_PART_CHAR_P): Likewise.
8420
8421 2002-02-22 Per Bothner <per@bothner.com>
8422
8423 * class.c: Change vtable to be more compatible with g++ v3 abi.
8424 (get_dispatch_table): Prepend offset-to-top (always 0) and
8425 type_info pointer (currently unimplemented hence NULL) to vtable.
8426 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8427 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
8428 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8429 (build_dtable_decl): Add declarations for new fields.
8430
8431 2002-02-20 Per Bothner <per@bothner.com>
8432
8433 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8434 to finit$ (otherwise generate_bytecode_insns drops it). However, we
8435 don't need to set it on the COMPOUND_EXPR - the caller does that.
8436
8437 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8438
8439 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8440 `--CLASSPATH' becomes `--classpath.'
8441 * gjavah.c: Likewise.
8442 * jcf-dump.c: Likewise.
8443 * lang-options.h: Likewise.
8444 * lang.c: Likewise.
8445 * jcf-path.c: Updated comment.
8446 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8447 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8448 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8449 (jcf_path_CLASSPATH_arg): Ditto.
8450 (classpath_u): Updated leading comment.
8451
8452 2002-02-20 Per Bothner <per@bothner.com>
8453
8454 * builtins.c (check_for_builtin): New function.
8455 (build_call_or_builtin): Remove.
8456 * java-tree.h: Update accordingly.
8457 * expr.c (expand_invoke): Use build + check_for_builtin instead
8458 of build_call_or_builtin.
8459 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
8460 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8461 flag (which had caused jcf-write to incorrectly emit invokevirtual).
8462
8463 2002-02-17 Tom Tromey <tromey@redhat.com>
8464
8465 * java-tree.h (TYPE_STRICTFP): New macro.
8466 (struct lang_type) [strictfp]: New field.
8467 (CLASS_STRICTFP): New macro.
8468 (METHOD_STRICTFP): New macro.
8469 (struct lang_decl) [strictfp]: New field.
8470 * parse.y (method_header): Disallow strictfp constructor or
8471 abstract method.
8472 (STRICT_TK): Move before MODIFIER_TK.
8473 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
8474 (METHOD_MODIFIERS): Likewise.
8475 (INTERFACE_MODIFIERS): Likewise.
8476 * jcf-write.c (get_access_flags): Likewise.
8477 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
8478 (add_method_1): Likewise.
8479 (get_access_flags_from_decl): Likewise.
8480 * jcf-dump.c (print_access_flags): Print in standard order. Also,
8481 recognize strictfp flag.
8482 * jcf.h (ACC_STRICT): New define.
8483
8484 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
8485
8486 * class.c(build_utf8_ref): Move declaration of decl_size
8487
8488 2002-02-07 Tom Tromey <tromey@redhat.com>
8489
8490 * gcj.texi (Input Options): --CLASSPATH does not suppress system
8491 path.
8492
8493 2002-02-04 Anthony Green <green@redhat.com>
8494
8495 * class.c (build_utf8_ref): Put UTF-8 constants into merged
8496 sections if available.
8497
8498 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8499
8500 * parse.y (java_expand_classes): Fix typo in static field loop.
8501
8502 2002-02-02 Richard Henderson <rth@redhat.com>
8503
8504 * class.c (add_field): Mark static fields external.
8505 (build_class_ref): Remove redundant set.
8506 * parse.y (java_expand_classes): Mark static fields of classes
8507 to be compiled as local.
8508 * jcf-parse.c (parse_class_file): Likewise.
8509
8510 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8511
8512 * gcj.texi (About CNI): New node.
8513
8514 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
8515
8516 PR java/5080
8517 * jcf-parse.c : Check for HAVE_LOCALE_H before using
8518 setlocale() with LC_CTYPE as a parameter.
8519 * jv-scan.c: Same.
8520
8521 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
8522
8523 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8524 Follow GNU Coding Standards for --version.
8525
8526 2002-01-28 Tom Tromey <tromey@redhat.com>
8527
8528 * expr.c (build_jni_stub): Ensure storage for `meth' is
8529 generated.
8530 * parse.y (java_complete_expand_methods): Set
8531 current_function_decl before building JNI stub.
8532
8533 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
8534
8535 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8536 BUILT_IN_SQRTF.
8537
8538 2002-01-22 Tom Tromey <tromey@redhat.com>
8539
8540 * decl.c (java_init_decl_processing): Use add_predefined_file.
8541 Predefine RawData.java.
8542 (predef_filenames): Removed.
8543 (java_init_decl_processing): Don't register predef_filenames.
8544 * jcf-parse.c (add_predefined_file): New function.
8545 (predefined_filename_p): Rewrote.
8546 (predefined_filename_p): No longer static.
8547 * decl.c (java_init_decl_processing): Call initialize_builtins.
8548 * Make-lang.in (JAVA_OBJS): Added builtins.o.
8549 (java/builtins.o): New target.
8550 * builtins.c: New file.
8551 * parse.y (patch_invoke): Use build_call_or_builtin.
8552 * java-tree.h (build_call_or_builtin): Declare.
8553 (initialize_builtins): Declare.
8554 (java_set_exception_lang_code): Removed unused declaration.
8555 (PREDEF_FILENAMES_SIZE): Removed.
8556 (java_tree_index): Added JTI_PREDEF_FILENAMES.
8557 (predef_filenames): New define.
8558 (add_predefined_file): Declare.
8559 (predefined_filename_p): Declare.
8560 * expr.c (expand_invoke): Use build_call_or_builtin.
8561
8562 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8563
8564 * parse.y (patch_switch_statement): Fix format specifier.
8565
8566 2002-01-16 Tom Tromey <tromey@redhat.com>
8567
8568 More for PR java/5365:
8569 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8570 default.
8571 (process_file): Generate include for
8572 java.lang.UnsupportedOperationExceptions.
8573
8574 2002-01-15 Andreas Jaeger <aj@suse.de>
8575
8576 * .cvsignore: Add man pages.
8577
8578 2002-01-15 Tom Tromey <tromey@redhat.com>
8579
8580 Fix for PR java/5365:
8581 * gjavah.c (process_file): Turn class name into a file name.
8582
8583 2002-01-14 Matthias Klose <doko@debian.org>
8584
8585 * gcj.texi: Fix whitespace and formatting errors in the
8586 synopsis of the man pages. Update copyright.
8587
8588 2002-01-14 Tom Tromey <tromey@redhat.com>
8589
8590 For PR libgcj/5303:
8591 * Make-lang.in (java.install-man): Handle jv-convert man page.
8592 (java.generated-manpages): Added jv-convert.1.
8593 (java.uninstall): Remove jv-convert.1.
8594 (java.maintainer-clean): Likewise.
8595 ($(srcdir)/java/jv-convert.1): New target.
8596 * gcj.texi (Top): Link to jv-convert node.
8597 (Individual utilities): Likewise.
8598 (Invoking jv-convert): New node.
8599
8600 2001-01-10 Jeff Sturm <jsturm@one-point.com>
8601 Martin Kahlert <martin.kahlert@infineon.com>
8602
8603 * jcf-parse.c (get_constant): Don't swap lo/hi for big
8604 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8605
8606 2002-01-03 Graham Stott <grahams@redhat.com>
8607
8608 * class.c (compile_resource_file): Update copyright date.
8609 Constify filename parameter.
8610 (java-tree.h): Update copyright date.
8611 (compile_resource_file): Constify filename parameter.
8612
8613 2002-01-03 Graham Stott <grahams@redhat.com>
8614
8615 * gcc/jcf-parse.c: Update copyright date.
8616 (yyparse): Constify resource_filename.
8617
8618 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8619
8620 * parse.y (src_parse_roots): Don't needlessly zero init.
8621
8622 2001-12-31 Tom Tromey <tromey@redhat.com>
8623
8624 * parse.y (dump_java_tree): New function.
8625 (source_end_java_method): Call it.
8626 (end_class_declaration): Likewise.
8627 * lang.c (java_decode_option): Call dump_switch_p.
8628
8629 2001-12-28 Tom Tromey <tromey@redhat.com>
8630
8631 * gen-table.pl: Don't process characters after \uffff. Added
8632 comment pointing to input file.
8633
8634 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8635
8636 * gen-table.pl: Const-ify output. Document the location of a
8637 suitable unicode input file.
8638
8639 * chartables.h: Regenerate.
8640
8641 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8642
8643 * chartables.h: Const-ify.
8644 * gjavah.c (options): Likewise.
8645 * jcf-dump.c (options): Likewise.
8646 * jv-scan.c (options): Likewise.
8647 * lex.c (java_start_char_p, java_part_char_p): Likewise.
8648 * parse.y (binop_lookup): Likewise.
8649
8650 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8651
8652 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8653 the static arrays that are output.
8654 * jvspec.c (jvgenmain_spec): Make static.
8655 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8656 * keyword.h: Regenerate.
8657 * lang.c (string_option, process_option_with_no, lang_f_options,
8658 lang_W_options): Const-ify.
8659 * lex.c (java_lex): Likewise.
8660
8661 2001-12-21 Richard Henderson <rth@redhat.com>
8662
8663 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8664 (get_boehm_type_descriptor): ... here. Arrange for the
8665 TREE_TYPE to get set properly.
8666
8667 2001-12-21 Richard Henderson <rth@redhat.com>
8668
8669 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8670 only if the target requires collect2.
8671
8672 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8673
8674 2001-12-20 Tom Tromey <tromey@redhat.com>
8675
8676 For PR java/4509:
8677 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8678 CAN_COMPLETE_NORMALLY for the node.
8679 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8680 generate code for second branch if first branch can't complete
8681 normally.
8682 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8683 the loop head if the loop body can't complete normally.
8684
8685 2001-12-20 Tom Tromey <tromey@redhat.com>
8686
8687 For PR java/4766:
8688 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8689 case where `finally' clause can't complete normally.
8690
8691 2001-12-20 Tom Tromey <tromey@redhat.com>
8692
8693 Fixes PR java/5057:
8694 * parse.y (analyze_clinit_body): Added this_class parameter.
8695 Check for more cases where we must keep <clinit>.
8696 (maybe_yank_clinit): Cleaned up flow control.
8697
8698 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8699
8700 * decl.c (java_init_decl_processing): Don't initialize
8701 finit_leg_identifier_node.
8702 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8703 (finit_leg_identifier_node): Remove.
8704 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8705
8706 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8707
8708 * mangle.c (mangle_member_name): Don't special-case for
8709 NO_DOLLAR_IN_LABEL.
8710 * mangle_name.c (unicode_mangling_length): Likewise.
8711 (append_unicode_mangled_name): Likewise.
8712 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8713 code.
8714
8715 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8716
8717 * expr.c (build_java_array_length_access): Don't force null pointer
8718 check unless flag_check_references is set.
8719
8720 2001-12-20 Tom Tromey <tromey@redhat.com>
8721
8722 Fix for PR java/3417:
8723 * parse.y (patch_assignment): Added special processing for
8724 `return'.
8725 (patch_return): Don't convert booleans to integers, and don't
8726 special-case `null'.
8727
8728 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8729
8730 * config-lang.in (diff_excludes): Remove.
8731
8732 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
8733
8734 * gcj.texi: Update link to GCC manual.
8735
8736 2001-12-17 Tom Tromey <tromey@redhat.com>
8737
8738 * parse.y (link_nested_class_to_enclosing): Removed useless
8739 statement.
8740
8741 2001-12-16 Tom Tromey <tromey@redhat.com>
8742
8743 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8744 Fixes PR java/5088.
8745
8746 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
8747
8748 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8749 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8750 spelling errors.
8751
8752 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8753
8754 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8755
8756 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8757
8758 * decl.c (java_init_decl_processing): Build otable_type correctly.
8759 otable_decl is an otable_type.
8760
8761 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8762
8763 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8764 otable_type, otable_ptr_type, method_symbol_type,
8765 method_symbols_array_type, method_symbols_array_ptr_type): New
8766 field/global tree definitions.
8767 (flag_indirect_dispatch): New flag.
8768 * decl.c (java_init_decl_processing): Initialize new otable and
8769 otable_syms type nodes and decls. Add new field "index" to
8770 method_type_node.
8771 * class.c (build_method_symbols_entry): New function.
8772 (make_method_value): Set "index" to to method's vtable index for
8773 virtual methods when indirect-dispatch is not used.
8774 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8775 and set vtable_method_count to -1. Set otable and otable_syms field
8776 if indirect-dispatch is used and there was something to put in them.
8777 (build_method_symbols_entry): New function.
8778 (emit_offset_symbol_table): New function.
8779 * expr.c (get_offset_table_index): New function.
8780 (build_invokevirtual): Build array reference to otable at the index
8781 returned by get_offset_table_index, and use the result as the vtable
8782 offset.
8783 (build_invokeinterface): Similar.
8784 * jcf-parse.c (yyparse): If indirect-dispatch, call
8785 emit_offset_symbol_table at the end of compilation, after all classes
8786 have been generated.
8787 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8788 * lang.c (flag_indirect_dispatch): Define.
8789 (lang_f_options): Add indirect-dispatch flag.
8790
8791 2001-12-14 Matthias Klose <doko@debian.org>
8792
8793 * gcj.texi: Markup for man page generation. Document missing
8794 options printed by <tool> --help.
8795 Terminate description of gij's -ms option with a dot.
8796 * Make-lang.in ($(srcdir)/java/*.1): New targets.
8797 (java.generated-manpages java.install-man, java.uninstall,
8798 java-maintainer-clean) Updated.
8799
8800 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
8801
8802 * class.c (get_dispatch_table): Fix java vtable layout
8803 for TARGET_VTABLE_USES_DESCRIPTORS.
8804 * decl.c (java_init_decl_processing): Initialize
8805 alloc_no_finalizer_node, finalize_identifier_node.
8806 * expr.c (class_has_finalize_method): New function.
8807 (expand_java_NEW): Generate calls for finalizer-free allocation.
8808 (build_invokevirtual): Fix java vtable layout for
8809 TARGET_VTABLE_USES_DESCRIPTORS.
8810 * java-tree.h (enum java_tree_index): New entries:
8811 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8812 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8813 (class_has_finalize_method): declare.
8814 (HAS_FINALIZER_P): New macro.
8815 * parse.y (patch_invoke): Generate calls for finalizer-free
8816 allocation.
8817
8818 2001-12-12 Matthias Klose <doko@debian.org>
8819
8820 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8821 whitespace at end of line.
8822
8823 2001-12-11 Tom Tromey <tromey@redhat.com>
8824
8825 * lex.c (java_init_lex): Define wfl_to_string as
8826 gnu.gcj.runtime.StringBuffer unless generating bytecode.
8827
8828 2001-12-11 Jeff Sturm <jsturm@one-point.com>
8829
8830 * class.c (make_method_value): Use null_pointer_node to
8831 represent empty exception table.
8832
8833 2001-12-10 Tom Tromey <tromey@redhat.com>
8834
8835 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8836
8837 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
8838
8839 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8840
8841 2001-12-09 Per Bothner <per@bothner.com>
8842
8843 * check-init.c (current_switch_has_default): New static field.
8844 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
8845 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
8846 DEFAULT_EXPR seen, simulate a default alternative that copies state.
8847
8848 2001-12-09 Tom Tromey <tromey@redhat.com>
8849
8850 * check-init.c (check_init): Don't allow pre- or post- increment
8851 or decrement of final variable.
8852 (final_assign_error): Minor error message rewording.
8853
8854 2001-12-08 Tom Tromey <tromey@redhat.com>
8855
8856 * java-tree.h: Fixed typo.
8857
8858 * gjavah.c (decompile_method): Don't decompile to `return this'
8859 for static methods.
8860
8861 * gjavah.c (cxx_keywords): Re-sorted.
8862 * lex.c (cxx_keywords): Re-sorted.
8863
8864 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8865 else.
8866
8867 * gjavah.c (print_namelet): Clear subnamelets.
8868 (HANDLE_METHOD): Set `method_printed' earlier.
8869
8870 2001-12-07 Tom Tromey <tromey@redhat.com>
8871
8872 * lang.c (lang_f_options): Added
8873 optimize-static-class-initialization.
8874 (java_decode_option): Removed special case.
8875
8876 2001-12-07 Per Bothner <per@bothner.com>
8877
8878 * check-init.c (check_init): Fix typo freeing memory twice.
8879
8880 2001-12-05 Per Bothner <per@bothner.com>
8881
8882 Restore support for static class initialization optimization.
8883 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8884 * check-init.c (check_int): At end of BLOCK handle initialization
8885 blocks, which used to be done in java_complete_expand_method but did
8886 not handle the case where check_for_initialization might allocate
8887 more than a word of bits.
8888 * decl.c (lang_make_tree): The smic field is now a tree.
8889 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
8890 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
8891
8892 * parse.y (emit_test_initialization): Combine hash_lookup calls.
8893
8894 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8895 Change from a hash table to a list.
8896 (struct_lang_decl): Change field 'smic' to match.
8897 * class.c (add_method_1): Initialize
8898 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8899 * parse.y (adjust_init_test_initialization): Removed - inlined into -
8900 (java_expand_method_bodies): -here, since 'smic' is now a list.
8901 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
8902
8903 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
8904
8905 * class.c (java_hash_compare_tree_node): Fix casts.
8906
8907 2001-12-04 Per Bothner <per@bothner.com>
8908
8909 * check-init.c: Handle definite unassignment to finals in addition
8910 to definite assignment.
8911 (loop_current_locals): New field.
8912 (num_current_locals, int start_current_locals, num_current_words):
8913 Make static.
8914 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
8915 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8916 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
8917 (get_variable_decl, check_final_reassigned): New functions.
8918 (check_init, check_bool_init): Modify as needed for checking finals.
8919 (check_for_initialization): Take extra parameter and return void.
8920 Do extra start-up logic to check final fields for assignment.
8921 * parse.y (check_static_final_variable_assignment_flag,
8922 reset_static_final_variable_assignment_flag, check_final_assignment,
8923 check_final_variable_local_assignment_flag,
8924 reset_final_variable_indirect_assignment_flag,
8925 reset_final_variable_global_assignment_flag): Remove functions.
8926 (java_complete_expand_methods, outer_field_access_fix,
8927 patch_assignment): Remove no-longer used logic.
8928 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
8929 * parse.y (register_fields, java_complete_tree): Update accordingly.
8930
8931 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
8932 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
8933 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
8934
8935 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
8936
8937 * java-tree.h (DECL FINAL): New bit-field.
8938 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
8939 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
8940 (DECL_INIT_CALLS_THIS): New macro.
8941 (struct lang_decl): New bit-field init_calls_this.
8942 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8943 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8944 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
8945 use it for both local variables and final fields.
8946 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
8947 and local_final.
8948 (struct lang_type): Remove hfv bit-field.
8949 (check_for_initialization): Change to return void.
8950
8951 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
8952 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
8953 * check-init.c (final_assign_error): New helper function.
8954 (check_final_reassigned, check_init): Use it.
8955 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8956
8957 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
8958 bit-fields to unsigned.
8959
8960 2001-12-03 Per Bothner <per@bothner.com>
8961
8962 * parse.y (patch_binop): Minor constant folding.
8963
8964 * parse.y (build_current_thisn): Shorter 'buffer'.
8965
8966 2001-12-03 Per Bothner <per@bothner.com>
8967
8968 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
8969 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8970 * jcf-write.c (generate_bytecode_insns): Remove support for
8971 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8972 * check-init.c (check_init): Likewise.
8973
8974 2001-12-03 Per Bothner <per@bothner.com>
8975
8976 * verify.c (subroutine_nesting): New function.
8977 (verify_jvm_instructions): Use it to fix logic for checking that
8978 we're done with the current subroutine.
8979
8980 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8981 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8982
8983 2001-12-03 Per Bothner <per@bothner.com>
8984
8985 * jcf.h: Fix obvious typo in comment.
8986 * typeck.c (build_null_signature): Add comment.
8987
8988 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
8989
8990 * expr.c: Remove leading capital from diagnostic messages, as
8991 per GNU coding standards.
8992 * jcf-io.c: Similarly.
8993 * jcf-parse.c: Similarly.
8994 * jv-scan.c: Similarly.
8995 * jvspec.c: Similarly.
8996 * mangle.c: Similarly.
8997
8998 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
8999 Alexandre Petit-Bianco <apbianco@redhat.com>
9000
9001 * expr.c (build_java_arrayaccess): Call save_expr on array for
9002 correct evaluation order, modified comment, fixed indentation.
9003 * parse.y: (patch_assignment): Correctly extract the array base
9004 from the tree generate by build_java_arrayaccess, added comments.
9005 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9006 Fixes PR java/3096, PR java/3803, PR java/3965.
9007
9008 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9009
9010 * expr.c (expand_byte_code): Remove trailing periods from messages.
9011 * jcf-parse.c (load_class, jcf_parse): Similarly.
9012 * jcf-write.c (generate_classfile): Similarly.
9013 * lex.c (java_lex): Similarly.
9014
9015 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9016
9017 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9018
9019 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9020
9021 * Make-lang.in (java.generated-manpages): New dummy target.
9022
9023 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9024
9025 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9026 ASM_FINAL_SPEC.
9027 (lang_specific_pre_link): Use set_input to set input_filename.
9028 Append `main' here.
9029 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9030 (main): Fix definition.
9031 Strip `main' from classname.
9032 Fixes PR java/227.
9033
9034 2001-11-18 Roger Sayle <roger@eyesopen.com>
9035
9036 * parse.h (java_expand_switch): Remove old prototype.
9037
9038 2001-11-18 Tom Tromey <tromey@redhat.com>
9039
9040 Fix for PR java/1401:
9041 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9042 arg0 is null.
9043 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9044 correctly.
9045
9046 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9047
9048 * lang.c (finish_parse): Rename to java_finish.
9049 (LANG_HOOKS_FINISH, java_finish): New.
9050
9051 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9052
9053 * decl.c (init_decl_processing): Rename java_init_decl_processing.
9054 * java-tree.h: New prototype.
9055 * lang.c (java_init): Update prototype. Combine with old init_parse.
9056
9057 2001-11-13 Tom Tromey <tromey@redhat.com>
9058
9059 * gjavah.c (method_signature): New global.
9060 (HANDLE_METHOD): Set it.
9061 (decompile_return_statement): New function.
9062 (decompile_method): Use it.
9063 (print_method_info): Removed `synth' argument.
9064
9065 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9066
9067 * java-tree.h (java_set_yydebug): New.
9068 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9069 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9070 (print_lang_decl, print_lang_type, print_lang_identifier,
9071 print_lang_statistics, lang_print_xnode): Remove.
9072
9073 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9074
9075 * jcf-parse.c (init_lex): Remove.
9076 * lang.c (language_string, lang_identify): Remove.
9077 (struct lang_hooks): Constify.
9078 (LANG_HOOKS_NAME): Override.
9079 (init_parse): Update.
9080
9081 2001-11-08 Andreas Franck <afranck@gmx.de>
9082
9083 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9084 program_transform_name the way suggested by autoconf.
9085 (java.install-common): Also transform auxiliary program names with
9086 program_transform_name.
9087
9088 2001-11-08 Tom Tromey <tromey@cygnus.com>
9089
9090 * parse.y (trap_overflow_corner_case): New rule.
9091 (unary_expression): Use it.
9092 * lex.c (java_init_lex): Don't set minus_seen.
9093 (yylex): Don't use minus_seen. Communicate overflow to parser for
9094 it to handle.
9095 (error_if_numeric_overflow): New function.
9096 * parse.h (minus_seen): Removed field.
9097 (JAVA_RADIX10_FLAG): New define.
9098
9099 2001-11-07 Tom Tromey <tromey@redhat.com>
9100
9101 Patch for PR java/1414:
9102 * parse.y (case_label_list): New global.
9103 (goal): Register case_label_list with GC.
9104 (java_complete_lhs): Save new case on case_label_list.
9105 (patch_switch_statement): Check for duplicate case labels.
9106
9107 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9108
9109 * parse.y (patch_assignment): Removed unused third argument.
9110 (java_complete_lhs): Removed unused third argument to patch_assignment.
9111
9112 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9113
9114 * lang.c: Include langhooks-def.h.
9115 * Make-lang.in: Update.
9116
9117 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9118
9119 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9120
9121 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9122
9123 * mangle.c (find_compression_record_match): Don't match compression
9124 records for package name elements unless they occur at the start of
9125 the name. Fix for PR java/4717.
9126
9127 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9128
9129 * expr.c (expand_java_field_op): Don't special-case references to
9130 java.lang.PRIMTYPE.TYPE.
9131 (build_primtype_type_ref): Removed.
9132 * java-tree.h (build_primtype_type_ref): Remove prototype.
9133 * parse.y (maybe_build_primttype_type_ref): Removed.
9134 (complete_function_arguments): Don't special-case references to
9135 java.lang.PRIMTYPE.TYPE.
9136 (patch_assignment): Likewise.
9137 (array_constructor_check_entry): Likewise.
9138
9139 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9140
9141 * mangle.c (static tree compression_table): Fixed leading comment.
9142 * parse.h (struct parser_ctxt): Fixed field comment.
9143 * parse.y (check_pkg_class_access): New prototype, fixed leading
9144 comment, new parameter used to emit error only if passed as true.
9145 (parse_check_super): Pass extra argument to check_pkg_class_access.
9146 (do_resolve_class): Likewise.
9147 (process_imports): Likewise.
9148 (read_import_dir): Fixed indentation.
9149 (find_in_imports_on_demand): New local class_type_name. Local
9150 node_to_use deleted. while loop changed into for loop. Report
9151 multiple definition only for accessible classes. Improved error
9152 message.
9153 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9154 assigned to parameter list, fixed indentation. while loop changed
9155 into for loop, restore TREE_CHAIN on local `tem' before the next
9156 iteration.
9157
9158 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9159
9160 * lang.c (lang_get_alias_set): Deleted.
9161
9162 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9163
9164 * gjavah.c (jni_print_char): Fix thinko in last change.
9165
9166 * gjavah.c (jni_print_char, decode_signature_piece): Use
9167 safe-ctype macros and/or fold extra calls into fewer ones.
9168 * lex.c (java_read_unicode, java_lex): Likewise.
9169 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9170 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9171 * mangle_name.c (append_unicode_mangled_name,
9172 unicode_mangling_length): Likewise.
9173
9174 2001-10-17 Richard Henderson <rth@redhat.com>
9175
9176 * Make-lang.in (java/lang.o): Depend on langhooks.h.
9177
9178 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
9179
9180 * lang.c (langhooks.h): Included.
9181 (LANG_HOOKS_INIT): Redefined.
9182 (LANG_HOOKS_INIT_OPTIONS): Likewise.
9183 (LANG_HOOKS_DECODE_OPTION): Likewise.
9184 (struct lang_hooks lang_hooks): New initialization.
9185
9186 2001-10-11 Per Bothner <per@bothner.com>
9187
9188 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
9189 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9190 The former is simpler, and jcf-write.c handles it better.
9191 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
9192 or WITH_CLEANUP_EXPR.
9193 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
9194 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9195
9196 * parse.y (patch_if_else_statement): If the condition is constant,
9197 optimize away the test.
9198
9199 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9200
9201 * parse.y (patch_cast): Call patch_string on the first operand of
9202 the incoming node, update it if necessary. Fixes PR java/4510.
9203
9204 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9205
9206 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9207 when name qualifier matches a package name.
9208
9209 2001-10-08 Tom Tromey <tromey@redhat.com>
9210
9211 Fix for PR java/4489:
9212 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9213 force a new label when computing `body_block'.
9214
9215 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9216
9217 * jcf-io.c (format_uint): Const-ify.
9218 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9219 * lex.c (java_get_line_col): Likewise.
9220 * parse.y (build_incdec): Likewise.
9221
9222 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9223
9224 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9225 a NULL enclosing context if appropriate. Fixes PR java/4466.
9226
9227 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9228
9229 * parse.y (patch_assignment): Use lvalue's original TYPE when
9230 building the final COMPOUND_EXPR.
9231 (try_reference_assignconv): Fixed leading comment.
9232
9233 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
9234
9235 * parse.y (check_final_variable_indirect_assignment): For
9236 COMPOUND_EXPR, return only if finals were found initialized
9237 properly, if not, keep on checking.
9238 (check_final_variable_global_assignment_flag): New local
9239 error_found, set when appropriate and used to decide whether to
9240 report uninitialized finals. Fixed typo in comment.
9241
9242 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9243
9244 * decl.c (init_decl_processing): Fixed typo in predef_filenames
9245 last three initializations. Fixes PR java/4360.
9246
9247 2001-09-21 Richard Henderson <rth@redhat.com>
9248
9249 * class.c (get_dispatch_table): Handle function descriptors.
9250 (build_dtable_decl): Likewise.
9251 * expr.c (build_invokevirtual): Likewise.
9252
9253 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9254
9255 * parse.y (patch_method_invocation): Build class initialization
9256 when static finals are used to qualify method invocation.
9257 Fixes PR java/4366.
9258
9259 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
9260
9261 * parse.h: (WFL_STRIP_BRACKET): Re-written using
9262 build_type_name_from_array_name.
9263 (STRING_STRIP_BRACKETS): New macro.
9264 * parse.y (build_type_name_from_array_name): New function.
9265 (array_creation_expression:): Accumulate []s instead of [s.
9266 (cast_expression:): Accumulate []s instead of [s after cast type
9267 name.
9268 (build_array_from_name): Local string deleted, use
9269 build_type_name_from_array_name.
9270 (build_unresolved_array_type): Accumulate []s instead of [s after
9271 type name.
9272 (register_fields): Fixed comment.
9273 (resolve_class): Local name, base deleted, new locals tname and
9274 array_dims. Use build_type_name_from_array_name. Use array_dims to
9275 build array type.
9276 (purify_type_name): Use STRING_STRIP_BRACKETS.
9277
9278 2001-09-18 Andreas Jaeger <aj@suse.de>
9279
9280 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9281 * jv-scan.c: Likewise.
9282
9283 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9284
9285 * parse.y (patch_method_invocation): Inner class creation context
9286 check not enforced within constructors. Fixes PR java/1873.
9287
9288 2001-09-16 Tom Tromey <tromey@redhat.com>
9289
9290 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9291 NOTE_PUSH for single-case push. Fixes PR java/4189.
9292
9293 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9294
9295 * java-tree.h (TYPE_IMPORT_LIST): New macro.
9296 (TYPE_IMPORT_DEMAND_LIST): Likewise.
9297 (struct lang_type): New fields import_list and import_demand_list.
9298 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9299 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9300 (do_resolve_class): New local saved_enclosing_type, initialized,
9301 passed as parameter to find_in_imports and find_in_imports_on_demand.
9302 (find_in_imports): Added paramater enclosing_type, use its
9303 TYPE_IMPORT_LIST when applicable.
9304 (find_in_imports_on_demand): Added parameter enclosing_type, use
9305 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9306 declaration and initialization.
9307 (fold_constant_for_init): Switch/restore current_class to the
9308 appropriate context.
9309
9310 2001-09-13 Mark Mitchell <mark@codesourcery.com>
9311
9312 * verify.c (verify_jvm_instructions): Fix typo.
9313
9314 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9315
9316 * expr.c (expand_invoke): Const-ification.
9317 * parse.y (patch_method_invocation): Likewise.
9318
9319 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9320
9321 * gjavah.c (cxx_keywords): Const-ification.
9322 * keyword.gperf (java_keyword): Likewise.
9323 * lang.c (java_tree_code_name): Likewise.
9324 * lex.c (cxx_keywords): Likewise.
9325 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
9326
9327 2001-09-11 Richard Henderson <rth@redhat.com>
9328
9329 * parse.h (ctxp_for_generation): Mark extern.
9330
9331 2001-09-10 Richard Henderson <rth@redhat.com>
9332
9333 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
9334
9335 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9336
9337 * typeck.c (java_array_type_length, build_prim_array_type):
9338 Represent empty arrays by NULL index.
9339
9340 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
9341
9342 * java-tree.h (compile_resource_file): Grouped with other prototypes.
9343 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
9344
9345 2001-09-06 Anthony Green <green@redhat.com>
9346
9347 * class.c (O_BINARY): Define if necessary.
9348 (registerResource_libfunc): Declare.
9349 (init_class_processing): Initilize registerResource_libfunc.
9350 (compile_resource_file): New function.
9351 * java-tree.h (resource_name): Declare.
9352 (compile_resource_file): Declare.
9353 * jcf-parse.c (yyparse): Handle compiling java resource files.
9354 * lang.c (java_decode_option): Handle -fcompile-resource option.
9355 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
9356 resource files.
9357 * gcj.texi (Code Generation): Add documentation for -R flag.
9358
9359 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9360
9361 * jcf-write.c (generate_classfile): Issue an error in case of
9362 field/initial value mismatch.
9363 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
9364 being initialized and we're generating bytecode.
9365 (java_complete_lhs): In MODIFY_EXPR section: added comments,
9366 set DECL_INITIAL properly when appropriate.
9367 Fixes PR java/4230
9368 Fixes PR java/4204
9369
9370 2001-09-01 Per Bothner <per@bothner.com>
9371
9372 * parse.y (maybe_yank_clinit): A field without an initializer is not
9373 relevant. All initializers except static final and constant require
9374 <clinit>, regardless of flag_emit_class_files.
9375
9376 2001-08-31 Per Bothner <per@bothner.com>
9377
9378 * class.c (set_constant_value): When not emitting class files, then a
9379 String ConstantValue is a utf8const_ptr_type.
9380
9381 2001-08-30 Per Bothner <per@bothner.com>
9382
9383 * jcf-write.c (generate_classfile): Check that field is primitive
9384 or string before emitting ConstantValue attribute.
9385
9386 2001-08-30 Per Bothner <per@bothner.com>
9387
9388 * parse.y (resolve_qualified_expression_name): If creating a
9389 COMPOUND_EXPR, set it's type correctly.
9390
9391 2001-08-30 Per Bothner <per@bothner.com>
9392
9393 * jcf-io.c (open_class): Set filename field.
9394
9395 * jcf-parse,c (parse_class_file): Set current_function_decl
9396 for better error message when Code attribute is missing.
9397
9398 * lang.c (put_decl_node, lang_print_error): Re-arrange for
9399 better diagnostics, especially for constructors.
9400
9401 2001-08-30 Per Bothner <per@bothner.com>
9402
9403 * jcf-write.c (generate_classfile): Don't write ConstantValue
9404 attribute if field is not final, for compatibility with jdk.
9405
9406 * jcf-write.c (generate_classfile): Convert ConstantValue values
9407 to correct type. Work-around for front-end bug.
9408 * class.c (set_constant_value): Error if constant has wrong type.
9409
9410 2001-08-30 Per Bothner <per@bothner.com>
9411
9412 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
9413 "Double" are printed at verbosity 1.
9414
9415 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
9416
9417 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
9418
9419 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
9420
9421 * parse.y (patch_assignment): Don't verify final re-assignment here.
9422 (java_complete_lhs): Verify assignments to finals calling
9423 patch_assignment. Verify re-assignments to finals before calling
9424 patch_assignment.
9425
9426 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
9427
9428 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9429 Fixes PR java/1413
9430
9431 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9432
9433 * lex.c (java_lex): new local found_hex_digits. Set and then used
9434 in test to reject invalid hexadecimal numbers.
9435 * parse.y (java_complete_tree): Prevent unwanted cast with
9436 initialized floating point finals.
9437 (patch_binop): Emit a warning when detecting a division by zero,
9438 mark result not constant, don't simplify non integer division.
9439
9440 2001-08-28 Per Bothner <per@bothner.com>
9441
9442 * jcf-write.c (generate_bytecode_insns): For increments and
9443 decrements just recurse to push constant. Improvement on Mark's patch.
9444
9445 2001-08-28 Mark Mitchell <mark@codesourcery.com>
9446
9447 * jcf-write.c (generate_bytecode_insns): Generate an integer to
9448 real conversion for increments and decrements of reals.
9449
9450 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9451
9452 * parse.y (resolve_qualified_expression_name): Handle unresolved
9453 qualified expressions, prevent numerical qualifiers, fixed typo.
9454 Fixes PR java/4141
9455
9456 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9457
9458 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9459 don't report anything but deprecated class when marked so. Handle
9460 VAR_DECL.
9461 (patch_method_invocation): Check deprecation on methods and types.
9462 (patch_binop): code becomes an enum tree_code, added default: to
9463 switch to handle that. Detect division by zero, try to fold and
9464 return before using a subroutine.
9465
9466 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
9467
9468 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
9469 file smaller than 4 bytes.
9470 * parse.y (check_inner_circular_reference): New function.
9471 (check_circular_reference): Likewise.
9472 (array_initializer:): Accept {,}.
9473 (java_check_circular_reference): Rewritten using
9474 check_circular_reference and check_inner_circular_reference.
9475 (java_complete_expand_method): Unconditionally save and restore
9476 the unpurged exception list.
9477 (build_dot_class_method_invocation): Unmangle signature parameter.
9478
9479 2001-08-21 Tom Tromey <tromey@redhat.com>
9480
9481 * decl.c (init_decl_processing): Add `throws' field to method
9482 descriptor.
9483 * class.c (make_method_value): Compute `throws' field for method.
9484
9485 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9486
9487 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
9488 circularity is detected.
9489 (ctors_unchecked_throws_clause_p): Fixed leading comment.
9490
9491 2001-08-17 Richard Henderson <rth@redhat.com>
9492
9493 * class.c (emit_register_classes): Add align parameter to
9494 call to assemble_integer.
9495
9496 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
9497
9498 * jcf-parse.c (load_class): New locals saved and class_loaded. If
9499 loading a class_or_name fails, try considering an innerclass name
9500 and load the enclosing context.
9501 * parse.y (resolve_inner_class): New function.
9502 (find_as_inner_class): Added leading comment.
9503 (register_incomplete_type): Keep the current context as enclosing
9504 context for JDEP_FIELD dependencies.
9505 (do_resolve_class): Locals new_class_decl and super initialized to
9506 NULL. Call resolve_inner_class, explore the enclosing context
9507 superclass if necessary.
9508 Fixes PR java/4007
9509
9510 2001-08-16 Tom Tromey <tromey@redhat.com>
9511
9512 * jcf-dump.c (main): Updated for change to jcf_path_seal.
9513 * gjavah.c (main): Updated for change to jcf_path_seal.
9514 * lang.c (version_flag): New global.
9515 (java_decode_option): Recognize `-version'.
9516 (java_init): Update for change to jcf_path_seal.
9517 * jcf.h (jcf_path_seal): Added `print' argument.
9518 * jcf-path.c (jcf_path_seal): Added `print' argument.
9519
9520 2001-08-13 Zack Weinberg <zackw@panix.com>
9521
9522 * Make-lang.in (java/decl.o): Update dependencies.
9523 * decl.c: Include libfuncs.h, don't include toplev.h.
9524
9525 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9526
9527 * decl.c (init_decl_processing): exception_type_node,
9528 class_not_found_type_node, and no_class_def_found_type_node
9529 initialized. predef_filenames augmented accordingly.
9530 instinit_identifier_node initialized.
9531 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9532 * java-tree.h (enum java_tree_index): New entries
9533 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9534 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9535 (exception_type_node): New macro.
9536 (class_not_found_type_node): Likewise.
9537 (no_class_def_found_type_node): Likewise.
9538 (instinit_identifier_node): Likewise.
9539 (PREDEF_FILENAMES_SIZE): Adjusted.
9540 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9541 (struct lang_type): Fixed typo in bitfield name.
9542 (DECL_INSTINIT_P): New macro.
9543 (ID_INSTINIT_P): Likewise.
9544 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9545 attribute.
9546 * parse.y (encapsulate_with_try_catch): New function.
9547 (generate_instinit): Likewise.
9548 (build_instinit_invocation): Likewise.
9549 (ctors_unchecked_throws_clause_p): Likewise.
9550 (add_instance_initializer): Deleted.
9551 (build_instance_initializer): Likewise.
9552 (in_instance_initializer): Likewise.
9553 (check_method_redefinition): instinit$ not to be verified.
9554 (java_complete_expand_methods): Generate instinit$, simplified code.
9555 (build_dot_class_method): Eliminated unnecessary locals. Use
9556 encapsulate_with_try_catch, removed unnecessary code.
9557 (fix_constructors): New local iii. Use build_instinit_invocation.
9558 (patch_method_invocation): Added comment.
9559 (maybe_use_access_method): Don't consider instinit$.
9560 (find_applicable_accessible_methods_list): Shorten the search for
9561 instinit$ too.
9562 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9563 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9564 (patch_throw_statement): Likewise. Fixed typo.
9565
9566 2001-08-12 David Edelsohn <edelsohn@gnu.org>
9567
9568 Revert:
9569 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9570 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9571 ASM_FINAL_SPEC.
9572 (lang_specific_pre_link): Use set_input to set input_filename.
9573 Append `main' here.
9574 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9575 (main): Fix definition.
9576 Strip `main' from classname.
9577 Fixes PR java/227.
9578
9579 2001-08-11 Zack Weinberg <zackw@panix.com>
9580
9581 * lex.h: Don't include setjmp.h. Don't define
9582 SET_FLOAT_HANDLER or prototype set_float_handler.
9583
9584 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9585
9586 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9587 `poplevel' in the right order.
9588
9589 2001-08-09 Richard Henderson <rth@redhat.com>
9590
9591 * Make-lang.in (class.o): Depend on TARGET_H.
9592 * class.c (emit_register_classes): Use target hooks instead of
9593 assemble_constructor and assemble_destructor.
9594
9595 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
9596
9597 * check-init.c (flags.h): Include
9598 (check_init): Don't report uninitialized static class
9599 initialization flags, don't free bit index when doing static class
9600 initialization optimization.
9601 (check_for_initialization): Return type changed to `unsigned int.'
9602 (attach_initialized_static_class): New function.
9603 * class.c (add_method_1): Create the initialized static class
9604 table if necessary.
9605 (finish_class): Always emit deferred inline methods.
9606 * decl.c (emit_init_test_initialization): Moved to expr.c
9607 (complete_start_java_method): Don't traverse
9608 DECL_FUNCTION_INIT_TEST_TABLE.
9609 (lang_mark_tree): Mark hash tables in function decls.
9610 * expr.c (emit_init_test_initialization): Moved from decl.c.
9611 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9612 initialization flag, set DECL_CONTEXT and
9613 LOCAL_CLASS_INITIALIZATION_FLAG.
9614 (java_lang_expand_expr): Emit initialization code for static class
9615 initialized flags when entering block, if necessary.
9616 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9617 * java-tree.h (flag_optimize_sci): New global variable declaration.
9618 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9619 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9620 (LOCAL_FINAL_P): Fixed typo in comment.
9621 (FINAL_VARIABLE_P): Likewise.
9622 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9623 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9624 (struct lang_decl): New fields `ict', `smic' and `cif.'
9625 (check_for_initialization): New returned value for global.
9626 (attach_initialized_static_class): New global function.
9627 (STATIC_CLASS_INIT_OPT_P): New macro.
9628 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9629 * lang.c (java_decode_option): Handle
9630 `-fno-optimize-static-class-initialization'
9631 * parse.y (start_complete_expand_method): New function.
9632 (java_expand_method_bodies): Likewise.
9633 (attach_init_test_initialization_flags): Likewise.
9634 (adjust_init_test_initialization): Likewise.
9635 (emit_test_initialization): Likewise.
9636 (java_complete_expand_methods): Nullify abstract and native method
9637 bodies.
9638 (java_complete_expand_method): New locals `fbody', `block_body'
9639 and `exception_copy.' Reorganized: directly return on empty method
9640 bodies, call `start_complete_expand_method', remember definitely
9641 initialized static class in function, don't expand method bodies.
9642 (java_expand_classes): Call `java_expand_method_bodies' before
9643 `finish_class' when compiling to native.
9644 (resolve_expression_name): Use `orig' after building outer class
9645 field access.
9646 (patch_invoke): Remember static method invocations.
9647
9648 2001-08-06 Richard Henderson <rth@redhat.com>
9649
9650 * class.c (emit_register_classes): Pass a symbol_ref and priority
9651 to assemble_constructor.
9652
9653 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
9654
9655 * java-tree.h (all_class_filename): New macro.
9656 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9657 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9658 newly created IDENTIFIER_NODE to `all_class_filename.'
9659
9660 2001-08-01 Jeff Sturm <jsturm@one-point.com>
9661
9662 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9663 Use ggc_add_tree_root to register roots.
9664
9665 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9666
9667 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9668 second operand calling check_init.
9669 * decl.c (complete_start_java_method): Swaped second and third
9670 arguments while creating WITH_CLEANUP_EXPR node.
9671 * jcf-write.c (generate_bytecode_insns): Use second operand
9672 instead of third when handling WITH_CLEANUP_EXPR.
9673 * parse.y (java_complete_lhs): Expand second operand of
9674 WITH_CLEANUP_EXPR nodes.
9675 (patch_synchronized_statement): Swaped second and third arguments
9676 while creating WITH_CLEANUP_EXPR node.
9677
9678 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9679
9680 * parse.y (create_interface): Avoid cyclic inheritance report when
9681 syntax error encountered during class definition.
9682 Fixes PR java/2956
9683
9684 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9685
9686 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9687 ASM_FINAL_SPEC.
9688 (lang_specific_pre_link): Use set_input to set input_filename.
9689 Append `main' here.
9690 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9691 (main): Fix definition.
9692 Strip `main' from classname.
9693 Fixes PR java/227.
9694
9695 2001-07-18 Tom Tromey <tromey@redhat.com>
9696
9697 For PR java/2812:
9698 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9699 * lex.c (java_new_lexer): Use ICONV_CONST.
9700 (java_read_char): Likewise.
9701 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9702 (jv-scan$(exeext)): Likewise.
9703
9704 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9705
9706 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9707 * parse.y (check_class_interface_creation): Allow `private' if the
9708 enclosing is not an interface.
9709 (create_interface): Interface tagged public if the enclosing
9710 context is an interface.
9711 (create_class): Class tagged public if the enclosing context
9712 is an interface.
9713 Fixes PR java/2959
9714
9715 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9716
9717 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9718 Fixes PR java/2665
9719
9720 2001-07-14 Tim Josling <tej@melbpc.org.au>
9721
9722 * check-init.c (check_init): Remove references to EXPON_EXPR.
9723
9724 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9725
9726 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9727 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9728 Fixes PR java/3602
9729
9730 2001-07-13 Tom Tromey <tromey@redhat.com>
9731
9732 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9733 invocation.
9734
9735 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9736
9737 * parse.y (patch_method_invocation): Don't override primary if one
9738 is already provided, but let this$<n> be built. Fixed comment.
9739
9740 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9741
9742 * parse.y (empty_statement:): Report empty statement error only
9743 when found at class declaration level.
9744 Fixes PR java/3635
9745
9746 2001-07-12 Tom Tromey <tromey@redhat.com>
9747
9748 * expr.c (expand_load_internal): New function.
9749 (LOAD_INTERNAL): Use it.
9750
9751 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
9752
9753 * parse.y (verify_constructor_super): Compare anonymous class ctor
9754 args with `valid_method_invocation_conversion_p.'
9755 Fixes PR java/3285
9756
9757 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9758
9759 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9760 `-fsyntax-only.' Fixes PR java/3248
9761
9762 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9763
9764 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9765
9766 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9767
9768 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9769 current function is static. Fixes PR java/1970
9770
9771 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9772
9773 * parse.y (patch_method_invocation): Add enclosing context to ctor
9774 calls if necessary. Fixes PR java/2953
9775
9776 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9777
9778 * parse.y (resolve_package): Abort if qualified expression member
9779 isn't right.
9780 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9781 Fixes PR java/1391
9782
9783 2001-07-07 Zack Weinberg <zackw@stanford.edu>
9784
9785 * verify.c: Don't use // comments.
9786
9787 2001-07-05 Tom Tromey <tromey@redhat.com>
9788
9789 * lang.c (flag_assume_compiled): Removed.
9790 * java-tree.h (flag_assume_compiled): Removed.
9791 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9792 -fhash-synchronization, -fuse-divide-subroutine,
9793 -fcheck-references, -femit-class-file, -femit-class-files,
9794 -fassume-compiled. Updated --encoding information. Changed
9795 -foutput-class-dir to `-d'.
9796
9797 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
9798
9799 * jcf-parse.c (parse_class_file): Add lineno parameter to
9800 debug_start_source_file call.
9801
9802 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
9803
9804 * gcj.texi: Use gpl.texi.
9805 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9806 dependencies and use doc/include in search path.
9807
9808 2001-07-03 Jeff Sturm <jsturm@one-point.com>
9809
9810 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9811 `this'. If so, don't build instance initializers.
9812
9813 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9814
9815 * parse.y (resolve_expression_name): Improved error message for
9816 inner class cases. Fixes PR java/1958
9817
9818 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
9819
9820 * lang.c: #include diagnostic.h
9821 (lang_print_error): Add a `diagnostic_context *' parameter.
9822 (java_dummy_print): Likewise.
9823 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9824
9825 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9826
9827 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9828 * jcf.h (typedef struct JCF): New bitfield `finished.'
9829 (JCF_FINISH): Set `finished.'
9830 (JCF_ZERO): Reset `finished.'
9831 Fixes PR java/2633
9832
9833 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9834
9835 * parse.y (class_body_declaration:): Don't install empty instance
9836 initializers.
9837 Fixes PR java/1314
9838
9839 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9840
9841 * class.c (set_super_info): Call `set_class_decl_access_flags.'
9842 (set_class_decl_access_flags): New function.
9843 * java-tree.h (set_class_decl_access_flags): New prototype.
9844 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9845 (parse_class_file): New local `decl_max_locals.' Take wide types
9846 into account to compute DECL_MAX_LOCALS.
9847 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9848 imports on demand.
9849
9850 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
9851
9852 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9853
9854 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9855
9856 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9857 * parse.y (do_resolve_class): Moved comments out to leading comment
9858 section. Removed local `start', New local `_ht' and
9859 `circularity_hash.' Record `enclosing' in hash table and search
9860 it to detect circularity. Use `enclosing' as an argument to
9861 `lookup_cl.' Free the hash table when done.
9862
9863 2001-06-19 Tom Tromey <tromey@redhat.com>
9864
9865 * lex.c (java_read_char): Disallow invalid and overlong
9866 sequences. Fixes PR java/2319.
9867
9868 2001-06-05 Jeff Sturm <jsturm@one-point.com>
9869
9870 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9871
9872 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9873
9874 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9875 arguments accordingly.
9876
9877 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
9878
9879 * gcj.texi: Move contents to just after title page.
9880
9881 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
9882
9883 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9884 builtin type.
9885 (patch_incomplete_class_ref): Build the class ref, build the class
9886 init if necessary, complete the tree.
9887 Fixes PR java/2605
9888
9889 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9890
9891 * parse.y (lookup_field_wrapper): Test `name' code.
9892 (resolve_qualified_expression_name): Test `qual_wfl' code.
9893 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9894 handle `qual_wfl' by code.
9895 (maybe_build_primttype_type_ref): Test `wfl' code.
9896
9897 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9898
9899 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9900 fdl.texi.
9901 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
9902 the dvi file in the java directory.
9903
9904 2001-05-25 Sam TH <sam@uchicago.edu>
9905
9906 * gen-table.pl javaop.h jcf.h lex.h,
9907 parse.h: Fix header include guards.
9908
9909 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
9910
9911 * jv-scan.c (version): Update copyright year.
9912
9913 2001-05-21 Per Bothner <per@bothner.com>
9914
9915 * jcf-parse.c (read_class): If class is from .class or .zip file
9916 and it's already been read, don't push/pop parser context.
9917
9918 2001-05-18 Per Bothner <per@bothner.com>
9919
9920 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9921 command line so the jvgenmain-generated main program comes first.
9922
9923 2001-05-15 Tom Tromey <tromey@redhat.com>
9924
9925 * class.c (build_utf8_ref): Don't generate identifier based on
9926 utf8const contents.
9927
9928 2001-05-12 Richard Henderson <rth@redhat.com>
9929
9930 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9931 * expr.c (java_lang_expand_expr): Expand it.
9932 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9933 calling build_exception_object_ref.
9934 * parse.y (catch_clause_parameter): Likewise.
9935 (build_dot_class_method): Likewise.
9936 (try_reference_assignconv): Likewise.
9937 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9938 * jcf-write.c (generate_bytecode_insns): Likewise.
9939
9940 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9941
9942 * parse.y (build_unresolved_array_type): Set
9943 EXPR_WFL_QUALIFICATION on the newly created wfl.
9944 Fixes PR java/2538. Fixes PR java/2535.
9945
9946 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9947
9948 * parse.y (fix_constructors): Removed unnecessary assignment to
9949 local. Moved assignment to `this$<n>', fixed comments and
9950 indentation.
9951 (build_wfl_wrap): Fixed indentation.
9952 Fixes PR java/2598, java/2579 and java/2658.
9953
9954 2001-05-03 Mo DeJong <mdejong@redhat.com>
9955
9956 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9957 check for byte swap.
9958
9959 2000-05-02 Jeff Sturm <jsturm@one-point.com>
9960
9961 * expr.c (build_class_init): Move MODIFY_EXPR
9962 outside of COND_EXPR. Remove variable `call'.
9963
9964 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9965
9966 * decl.c: NULL_PTR -> NULL.
9967 * jcf-write.c: Likewise.
9968
9969 2001-05-01 Tom Tromey <tromey@redhat.com>
9970
9971 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9972 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9973 * gcj.texi: Updated copyright text. Include fdl.texi.
9974 (Top): Link to new node.
9975
9976 2001-05-01 Per Bothner <per@bothner.com>
9977
9978 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
9979
9980 2001-05-01 Per Bothner <per@bothner.com>
9981
9982 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
9983 import_list contains the name, not the TREE_PURPOSE.
9984
9985 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9986
9987 * jcf-io.c (read_zip_member): Cast to long in comparison with
9988 signed value.
9989
9990 * jvspec.c (lang_specific_driver): Initialize variables.
9991
9992 * mangle.c (find_compression_record_match): Likewise.
9993
9994 * typeck.c (build_null_signature): Provide static prototype. Mark
9995 parameter with ATTRIBUTE_UNUSED.
9996
9997 * verify.c (verify_jvm_instructions): Initialize variable.
9998
9999 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10000
10001 * parse.y (do_resolve_class): Check for cyclic inheritance during
10002 inner class resolution.
10003
10004 2001-04-27 Per Bothner <per@bothner.com>
10005
10006 * parse.y (java_expand_classes): Don't change ctxp_for_generation
10007 while iterating, since that could cause gc to lose stuff.
10008
10009 2001-04-26 Per Bothner <per@bothner.com>
10010
10011 Fix method search wrt scope of inner classes to match JLS2.
10012 * typeck.c (build_null_signature): New static function.
10013 (has_method): New function. Uses build_null_signature and lookup_do.
10014 * java-tree.h (has_method): New declaration.
10015 * parse.y (find_applicable_accessible_methods_list): Do not search
10016 context of inner classes here.
10017 (patch_method_invocation): Search scope, ie. current and outer clases,
10018 for method matching simple name, to find class.
10019
10020 2001-04-26 Per Bothner <per@bothner.com>
10021
10022 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10023 Fix thinko: If a single case, use if_icmpeq, not ifeq.
10024
10025 * constants.c (find_methodref_with_class_index): New function.
10026 (find_methodref_index): Use find_methodref_with_class_index.
10027 * java-tree.h (find_methodref_with_class_index): New declaration.
10028 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
10029 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10030 If context changed from interface to class, don't use invokeinterface.
10031
10032 2001-04-25 Per Bothner <per@bothner.com>
10033
10034 * verify.c (verify_jvm_instructions): For field instructions,
10035 check that field index is valid. For invoke instructions, check that
10036 method index is valid.
10037
10038 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
10039
10040 * config-lang.in (target_libs): Copy from $libgcj_saved.
10041
10042 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10043
10044 * decl.c (init_decl_processing): Add new class "protectionDomain"
10045 field.
10046 * class.c (make_class_data): Set initial value for "protectionDomain".
10047
10048 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10049
10050 * jvspec.c (lang_specific_driver): Fix memory allocation
10051 deficit, by using concat in lieu of xmalloc/sprintf.
10052
10053 2001-04-20 Per Bothner <per@bothner.com>
10054
10055 Fixes to compile multiple .class files at once.
10056 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
10057 * java-tree.h (CLASS_PARSED_P): New macro.
10058 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10059 * jcf-parse.c (jcf_parse_source): Inline into read_class.
10060 (read_class): Avoid some code duplication.
10061 Don't call JCF_FINISH for a .class file - might be needed later.
10062 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
10063 rather than CLASS_LOADED_P, since latter implies class laid out.
10064 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
10065 * parse.y: Don't need to set CLASS_LOADED_P for array types.
10066
10067 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10068
10069 * Make-lang.in (java/boehm.o): Depend on toplev.h.
10070
10071 * boehm.c: Include toplev.h.
10072
10073 2001-04-06 Tom Tromey <tromey@redhat.com>
10074 Alexandre Petit-Bianco <apbianco@redhat.com>
10075
10076 Fix for PR gcj/1404 and PR gcj/2332:
10077 * parse.y (build_array_from_name): If we use the type_wfl then
10078 accumulate dimensions from the original type as well.
10079 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10080
10081 2001-04-06 Tom Tromey <tromey@redhat.com>
10082
10083 * parse.y (analyze_clinit_body): Return true if the second operand
10084 of a METHOD_EXPR is nonzero.
10085
10086 2001-04-06 Tom Tromey <tromey@redhat.com>
10087
10088 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10089 directory.
10090 ($(srcdir)/java/parse.c): Likewise.
10091
10092 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10093
10094 * gcj.texi: Use `which-gcj' instead of `which-g77.'
10095 (version-gcc): Initialized.
10096 (which-gcj): Likewise.
10097
10098 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10099
10100 * java-tree.h (struct lang_decl): New macro
10101 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10102 * parse.y (build_instance_initializer): New function.
10103 (add_instance_initializer): Use it.
10104 (java_fix_constructors): Set `current_class' before fix pass.
10105 (fix_constructors): Just return if already fixed. Move `super()'
10106 invocation ahead. Use `build_instance_initializer.'
10107 Fixes PR java/1315.
10108
10109 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10110
10111 * parse.y (resolve_qualified_expression_name): Pass field's
10112 DECL_CONTEXT to `not_accessible_p.'
10113 (not_accessible_p): Changed parameters order in `inherits_from_p'
10114 invocation.
10115
10116 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
10117
10118 * lang-options.h: Add flag_check_references.
10119
10120 2001-04-04 Per Bothner <per@bothner.com>
10121
10122 * java-tree.h (CONSTANT_VALUE_P): New macro.
10123 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
10124 * parse.y (maybe_build_class_init_for_field): New static function.
10125 (resolve_expression_name, resolve_field_access): Use
10126 maybe_build_class_init_for_field instead of build_class_init
10127 This does not do the init if the field is compile-time-constant.
10128 (resolve_field_access): Simplify.
10129
10130 * parse.y (fold_constant_for_init): Merge test into switch.
10131
10132 2001-04-03 Zack Weinberg <zackw@stanford.edu>
10133
10134 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10135 on gansidecl.h.
10136 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10137
10138 2001-04-02 Zack Weinberg <zackw@stanford.edu>
10139
10140 * expr.c (pop_type_0): Save the result of the first
10141 lang_printable_name call in a scratch buffer, so it
10142 won't be clobbered by the second call.
10143
10144 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10145
10146 * parse-scan.y (array_type:): Rewritten.
10147 (type_declaration:): `empty_statement' replaces `SC_TK.'
10148 (class_member_declaration:): `empty statement' added.
10149 (method_body:): Simplified.
10150 (static_initializer:): Likewise.
10151 (primary_no_new_array:): Use `type_literals.'
10152 (type_literals:): New rule.
10153 (dims:): Set and update `bracket_count.'
10154 Fixes PR java/1074. Fixes PR java/2412.
10155
10156 2001-03-28 Hans Boehm <boehm@acm.org>
10157
10158 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10159 (get_boehm_type_descriptor): Set type on returned value to be a
10160 pointer length integer.
10161
10162 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10163
10164 * expr.c (pop_type_0): Call `concat' rather than building the
10165 string manually.
10166 (pop_type): Add format specifier in call to `error'.
10167
10168 * parse.y (patch_method_invocation): Avoid casting away
10169 const-ness.
10170
10171 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
10172
10173 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10174
10175 2001-03-28 Richard Henderson <rth@redhat.com>
10176
10177 IA-64 ABI Exception Handling:
10178 * Make-lang.in (except.o): Don't depend on eh-common.h.
10179 * check-init.c (check_init): Handle EXC_PTR_EXPR.
10180 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10181 [soft_exceptioninfo_call_node]: Remove.
10182 [eh_personality_libfunc, lang_eh_runtime_type]: New.
10183 (end_java_method): No emit_handlers.
10184 * except.c (java_set_exception_lang_code): Remove.
10185 (method_init_exceptions): Don't call it.
10186 (prepare_eh_table_type): No CATCH_ALL_TYPE.
10187 (build_exception_object_ref): New.
10188 (expand_end_java_handler): Update for except.h name changes.
10189 (emit_handlers, expand_resume_after_catch): Remove.
10190 * expr.c (java_lang_expand_expr): Update for except.h name changes.
10191 (process_jvm_instruction): Use build_exception_object_ref.
10192 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10193 (soft_exceptioninfo_call_node): Remove.
10194 (build_exception_object_ref): Declare.
10195 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10196 soft_exceptioninfo_call_node. Move processing ...
10197 [EXC_PTR_EXPR]: ... here.
10198 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10199 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10200 (source_end_java_method): No java_set_exception_lang_code or
10201 emit_handlers.
10202 (build_dot_class_method): Use build_exception_object_ref.
10203 (try_reference_assignconv): Check EXC_PTR_EXPR not
10204 soft_exceptioninfo_call_node.
10205
10206 2001-03-28 Richard Henderson <rth@redhat.com>
10207
10208 * java-tree.h (throw_node): Define as a single member of
10209 java_global_trees instead of a separate array.
10210 (JTI_THROW_NODE): New.
10211 * decl.c (throw_node): Don't declare.
10212 (init_decl_processing): Init a scalar throw_node.
10213 Don't register it for gc.
10214 * check-init.c (check_init): Reference scalar throw_node.
10215 * expr.c (build_java_athrow): Likewise.
10216 * jcf-write.c (generate_bytecode_insns): Likewise.
10217 * parse.h (BUILD_THROW): Likewise.
10218
10219 2001-03-28 Richard Henderson <rth@redhat.com>
10220
10221 * decl.c (end_java_method): Do not save and restore
10222 flag_non_call_exceptions.
10223 * parse.y (source_end_java_method): Likewise.
10224 * lang.c (flag_exceptions): Don't declare.
10225 (java_init_options): Set flag_non_call_exceptions. Set
10226 flag_exceptions here ...
10227 (java_init): ... not here.
10228
10229 2001-03-27 Richard Henderson <rth@redhat.com>
10230
10231 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10232 exceptions_via_longjmp.
10233
10234 * lang.c (flag_new_exceptions): Don't declare it.
10235 (java_init_options): Or set it.
10236
10237 2001-03-27 Richard Henderson <rth@redhat.com>
10238
10239 * decl.c (end_java_method): Rename asynchronous_exceptions to
10240 flag_non_call_exceptions.
10241 * parse.y (source_end_java_method): Likewise.
10242
10243 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10244
10245 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10246
10247 2001-03-26 Mark Mitchell <mark@codesourcery.com>
10248
10249 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
10250
10251 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10252
10253 * parse.y (find_as_inner_class): Follow current package
10254 indications not to mistakingly load an unrelated class.
10255
10256 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10257
10258 * constants.c (PUTN): Use memcpy, not bcopy.
10259
10260 * lex.c (java_read_char): Use memmove, not bcopy.
10261
10262 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10263
10264 2001-03-23 Per Bothner <per@bothner.com>
10265
10266 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
10267 macro for better error pin-pointing.
10268 * java-tree.h: Fix typo in comment.
10269
10270 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
10271 Don't include jsr/goto in exception range.
10272 Check if start and end of exception range are the same (also TRY_EXPR).
10273 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10274 However, do emit the following goto even if try_block is empty.
10275 Defer freeing exception_decl until after the finalizer, to make
10276 sure the local isn't reused in the finalizer. Fixes PR java/1208.
10277
10278 * parse.y (java_complete_lhs): If the try-clause is empty, just
10279 return the finally-clause and vice versa.
10280
10281 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10282
10283 * gcj.texi (Input Options): documented the check for attribute
10284 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10285 * java-tree.h (flag_force_classes_archive_check): Declared extern.
10286 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10287 (jcf_parse): Check for the right classes archive if necessary.
10288 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10289 (jcf_parse_fields): Fixed indentation.
10290 * jcf-write.c (append_gcj_attribute): New function.
10291 (generate_classfile): Compute the attribute count, invoke
10292 `append_gcj_attribute'.
10293 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
10294 turned into bit-fields. New bit-field `right_zip.'
10295 (JCF_ZERO): Set `right_zip' to zero.
10296 * lang-options.h (-fforce-classes-archive-check): Added flag.
10297 * lang.c (flag_force_classes_archive_check): New flag.
10298 (lang_f_options): New entry `force-classes-archive-check.'
10299 Fixes PR java/1213.
10300
10301 2001-02-07 Andrew Haley <aph@redhat.com>
10302
10303 * gcj.texi (Configure-time Options): Add -fcheck-references.
10304 * expr.c (build_java_indirect_ref): New function.
10305 (java_check_reference): New function.
10306 (build_java_array_length_access): Use build_java_indirect_ref to
10307 check for null references.
10308 (build_java_arrayaccess): Likewise.
10309 (build_get_class): Likewise.
10310 (build_field_ref): Likewise.
10311 (invoke_build_dtable): Likewise.
10312 (build_invokeinterface): Likewise.
10313 * lang.c (lang_f_options): Add flag_check_references.
10314 * jvspec.c (jvgenmain_spec): Add flag_check_references.
10315 * java-tree.h (flag_check_references): New variable.
10316 * lang.c (flag_check_references): Likewise.
10317 * parse.y (patch_invoke): Use java_check_reference.
10318 (patch_assignment): Allow for extra nesting in
10319 _Jv_CheckArrayStore.
10320
10321 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
10322
10323 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
10324 * lex.c (cxx_keywords): Likewise.
10325
10326 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
10327
10328 * parse.y (qualify_ambiguous_name): Broaden `length'
10329 recognition. Help MODIFY_EXPR be resolved as expression names.
10330 Fixes PR java/2066. Fixes PR java/2400.
10331
10332 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
10333
10334 * gjavah.c (process_file): Mark interface definitions with
10335 "__attribute__ ((java_interface))".
10336
10337 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
10338
10339 * class.c (layout_class): Fixed push_super_field's second
10340 argument. Fixes PR java/2333.
10341 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
10342 too early to lay innerclasses out.
10343
10344 2001-03-20 Tom Tromey <tromey@redhat.com>
10345 Alexandre Petit-Bianco <apbianco@redhat.com>
10346
10347 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
10348 inside an array reference. Insertion of the array store check
10349 rewritten. Fixes PR java/2299.
10350
10351 2001-03-20 Tom Tromey <tromey@redhat.com>
10352
10353 * lex.c (java_read_unicode): Only accept leading `u's.
10354
10355 2001-03-20 Tom Tromey <tromey@redhat.com>
10356
10357 * jcf-parse.c (read_class): Initialize `class'.
10358
10359 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10360
10361 * jcf_parse.c (jcf_parse): Eliminate unused variable.
10362
10363 2001-03-19 Mark Mitchell <mark@codesourcery.com>
10364
10365 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
10366 (layout_class): Likewise.
10367 (layout_class_method): Likewise.
10368 (emit_register_classes): Likewise.
10369 * decl.c (builtin_function): Likewise.
10370 (give_name_to_locals): Likewise.
10371
10372 2001-03-19 Per Bothner <per@bothner.com>
10373
10374 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
10375 before trying to load an inner class.
10376
10377 Fixes to process to command-line .class files in two passes.
10378 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
10379 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
10380 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
10381 * class.c (is_compiled_class): Fix for renamed flag.
10382 * parse.y (maybe_create_class_interface_decl): Likewise.
10383 * jcf-parse.c (yyparse): Also set if compiling .class files.
10384 * jcf-parse.c (read_class); Read current_class.
10385 (jcf_parse): Make static.
10386 (load_inner_classes): New function, with code moved from jcf_parse,
10387 because we need to inner classes after the command-line files are read.
10388 (yyparse): Set finput to NULL when it doesn't need to be closed.
10389 Reduce use of main_jcf (basically only for archive) and
10390 use finput instead of main_jcf->read_state.
10391 Inline jcf_figure_file_type into yyparse.
10392 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10393 Defer load_inner_classes and parse_class_file to a second pass,
10394 after we've correctly mapped command-line .clas fiels to classes.
10395 (jcf_figure_file_type): Removed.
10396 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
10397 (JCF_ZERO): Also clear zipd field.
10398 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
10399
10400 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10401
10402 * jcf-parse.c (yyparse): Change ch from char * to char.
10403
10404 2001-03-19 Per Bothner <per@bothner.com>
10405
10406 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
10407 Add constructed filelist-file at end, following -xjava. Thus any .o
10408 and library files are not affected by the -xjava. Also wrap
10409 explicit @FILE with -xjava and -xnone.
10410
10411 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
10412
10413 * class.c (build_static_field_ref): Call make_decl_rtl() after
10414 setting the DECL_EXTERNAL flag.
10415
10416 2001-03-17 Per Bothner <per@bothner.com>
10417
10418 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
10419
10420 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
10421 when result is is needed (target is STACK_TARGET).
10422
10423 * parse.h (JDEP_SOLV): Removed.
10424 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
10425
10426 * parse.y (incomplete_class_list): Removed.
10427 (obtain_incomplete_type): Don't use or set incomplete_class_list.
10428 It doesn't work if resolve_class changes the name of an array type
10429 that is on the list and then someone else looks for the modified name.
10430 Also, seems liable to break when compiling multiple source files at
10431 once. So the simplest is to just remove incomplete_class_list -
10432 it is only a minor space win and it is not even clear it saves time.
10433
10434 * parse.y (resolve_class): Remove unneeded promote_type.
10435
10436 2001-03-15 Per Bothner <per@bothner.com>
10437
10438 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
10439 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
10440 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10441 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
10442
10443 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
10444 * parse.y (java_expand_classes): Likewise.
10445
10446 * parse.y (expand_start_java_method): Was only called once and had a
10447 misleading name, so inline in caller java_complete_expand_method.
10448 (enter_a_block): Likewise inline in enter_block and remove.
10449
10450 Remove junk from when gcc/java was created (by copying from C/C++).
10451 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
10452 (struct binding_level): Remove fields keep, keep_if_subblocks,
10453 more_cleanups_ok, have_cleanups (which have never been used).
10454 (pushlevel, poplevel): Remove related useless code.
10455
10456 * class.c (make_class_data): The class_dtable_decl (i.e. the
10457 vtable for Class) should be external, except when compiling Class.
10458
10459 * jvspec.c (lang_specific_driver): Fix -C handling.
10460 Check -save-temps to see if temp @FILE should be deleted.
10461 Follow-up to/fix for February 16 patch.
10462
10463 * verify.c (verify_jvm_instructions): Better error msgs for dup.
10464 (type_stack_dup): Remove no-longer neded error check.
10465
10466 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
10467
10468 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
10469 to 'for_pointer'. If this type is for a pointer (argument) mangling,
10470 don't surround the element with 'N..E' if the type name is
10471 unqualified.
10472
10473 2001-03-14 Mark Mitchell <mark@codesourcery.com>
10474
10475 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
10476 DECL_RTL_SET_P, etc.
10477 (make_method_value): Likewise.
10478 (get_dispatch_table): Likewise.
10479
10480 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10481
10482 2001-03-07 Tom Tromey <tromey@redhat.com>
10483
10484 * config-lang.in (lang_requires): Define.
10485
10486 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
10487
10488 * typeck.c (convert): Check flag_unsafe_math_optimizations,
10489 not flag_fast_math.
10490
10491 2001-03-05 Per Bothner <per@bothner.com>
10492
10493 Fix a problem where rest_of_decl_compilation applied to
10494 class_dtable_decl causes problems because it was done too early,
10495 before output file was opened.
10496 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
10497 * class.c (class_dtable_decl): Add macro - element of class_roots.
10498 (make_class_data): Define class_dtable_decl.
10499 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
10500
10501 2001-03-01 Zack Weinberg <zackw@stanford.edu>
10502
10503 * java/class.c, java/decl.c, java/java-tree.h: Replace all
10504 uses of 'boolean' with 'bool'.
10505
10506 2001-03-01 Zack Weinberg <zackw@stanford.edu>
10507
10508 * lang-specs.h: Add zero initializer for cpp_spec field to all
10509 array elements.
10510
10511 2001-02-16 Per Bothner <per@bothner.com>
10512
10513 Handle compiling multiple input files at once, and @FILE syntax.
10514 * gcj.texi: Updated documentation to match.
10515 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
10516 * jcf-parse.c (parse_source_file): Split into ...
10517 (parse_source_file_1): New function - and:
10518 (parse_source_file_2): New function.
10519 (yyparse): On -ffilelist-file, open and scan named file.
10520 On first pass over files, only do parse_source_file_1.
10521 A new second pass calls parse_source_file_2 for each file to compile.
10522 (init_jcf_parse): Call init_src_parse.
10523 * jvspec.c (INDIRECT_FILE_ARG): New flag.
10524 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
10525 as multiple input file combined in one compilation.
10526 * lang-options.h: Add -ffilelist-file
10527 * lang.c (flag_filelist_file): New flag variable.
10528 (lang_f_options): Handle -ffilelist-file.
10529 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10530 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
10531 gclass_list - use global fields of src_parse_roots instead.
10532 * parse.y (src_parse_roots): New array.
10533 (incomplete_class_list, gclass_list): New macros.
10534 (push_parser_context, java_pop_parser_context,
10535 java_parser_context_resume): Don't fiddle with deleted fields.
10536 (various): Use incomplete_class gclass_list and global macros
10537 instead of parse_ctxt fields - the lists are global.
10538 (init_src_parse): New function.
10539
10540 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10541
10542 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10543
10544 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10545
10546 * parse.y (check_inner_class_access): Moved declaration of local
10547 `enclosing_decl_type' to the right location.
10548
10549 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
10550
10551 * parse.y (parser_check_super_interface): Don't call
10552 check_pkg_class_access for an inner interface.
10553 (parser_check_super): Don't call check_pkg_class_access for inner
10554 class.
10555 (do_resolve_class): Simplify enclosing type loop. Don't call
10556 check_pkg_class_access if CL and DECL are not set.
10557 (find_in_imports_on_demand): Set DECL if class_type needed to be
10558 loaded. Don't call check_pkg_class_access for an inner class.
10559 (check_inner_class_access): Rewritten to implement member access
10560 rules as per spec 6.6.1.
10561 (check_pkg_class_access): Handle the empty package correctly.
10562 (in_same_package): New function. Determine if two classes are in the
10563 same package.
10564
10565 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
10566
10567 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10568 method into array types.
10569 * parse.y (patch_method_invocation): Bypass access check on clone call
10570 to array instance.
10571
10572 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10573
10574 * expr.c (build_instanceof): Check for arrays when trying fold to
10575 false.
10576
10577 2001-02-15 Jim Meyering <meyering@lucent.com>
10578
10579 * Make-lang.in (java.install-common): Depend on `installdirs'.
10580 (java.install-info): Likewise.
10581
10582 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
10583
10584 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10585
10586 2001-02-14 Tom Tromey <tromey@redhat.com>
10587 Alexandre Petit-Bianco <apbianco@cygnus.com>
10588
10589 Fix for PR java/1261.
10590 * typeck.c (build_java_array_type): Add public `clone' method to
10591 arrays.
10592 * parse.y (resolve_qualified_expression_name): Use current_class
10593 when checking for inaccessibility.
10594 (patch_method_invocation): Fixed error message when accessibility
10595 denied. Added `from_super' argument.
10596
10597 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
10598
10599 * parse.y (resolve_class): Don't build a fake decl. Use the one
10600 already built.
10601 * typeck.c (build_java_array_type): Build and assign decl to array
10602 type.
10603
10604 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
10605
10606 * parse.y (not_accessible_p): Changed leading comment. Added extra
10607 `where' argument. Use it to enforce protected access rules.
10608 (resolve_qualified_expression_name): Added extra argument to
10609 not_accessible_p.
10610 (patch_method_invocation): Use argument `primary' to provide
10611 not_accessible_p with an extra argument.
10612 (lookup_method_invoke): Added extra argument to not_accessible_p.
10613 (search_applicable_method_list): Likewise.
10614
10615 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10616
10617 * parse.y (resolve_qualified_expression_name): Try to resolve as
10618 an inner class access only if `decl' is a TYPE_DECL.
10619
10620 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10621
10622 * decl.c (classdollar_identifier_node): Initialize.
10623 * java-tree.h (enum java_tree_index): New entry
10624 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10625 (classdollar_identifier_node): New macro.
10626 (ID_CLASSDOLLAR_P): Likewise.
10627 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10628 (build_dot_class_method_invocation): Likewise.
10629 (find_applicable_accessible_methods_list): `class$' can't be
10630 inherited.
10631
10632 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
10633
10634 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10635
10636 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10637
10638 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10639 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10640 gone.
10641
10642 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10643
10644 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10645 outside of the `__U' sequence too.
10646 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10647 sequence too.
10648
10649 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10650
10651 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10652
10653 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
10654
10655 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10656 (JVGENMAIN_OBJS): Likewise.
10657 * java-tree.h (append_gpp_mangled_name): New prototype.
10658 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10659 Removed cast calling `gcc_add_root.'
10660 * jvgenmain.c (mangle_obstack): New global, initialized.
10661 (main): Use it.
10662 (do_mangle_class): Constify local `ptr.'
10663 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10664 append_gpp_mangle_name and update `count' if necessary.
10665 Use `mangle_obstack.'
10666 * mangle.c (append_unicode_mangled_name): Removed.
10667 (append_gpp_mangled_name): Likewise.
10668 (unicode_mangling_length): Likewise.
10669 (mangle_member_name): Return type set to `void.'
10670 (mangle_field_decl): Don't append `U' in escaped names.
10671 (mangle_method_decl): Likewise.
10672 (mangle_member_name): Just use `append_gpp_mangled_name.'
10673 * mangle_name.c: New file.
10674
10675 2001-02-07 Per Bothner <per@bothner.com>
10676
10677 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
10678
10679 * check-init.c (check_init): Don't call done_alternative after
10680 processing loop code, as a LOOP_EXPR never terminates normally.
10681
10682 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
10683
10684 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10685
10686 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10687
10688 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10689 DECLs.
10690
10691 2001-02-06 Tom Tromey <tromey@redhat.com>
10692
10693 * lex.c (java_new_lexer): Longer error message.
10694
10695 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
10696 Alexandre Petit-Bianco <apbianco@cygnus.com>
10697
10698 * typeck.c (build_prim_array_type): Added leading comment.
10699 (build_java_array_type): Moved locals out of
10700 block. Always create the `data' field, fixed alignment to match
10701 C++.
10702
10703 2001-02-04 Tom Tromey <tromey@redhat.com>
10704
10705 * expr.c (java_lang_expand_expr): Don't bother recomputing
10706 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
10707 Fixes PR java/1866.
10708
10709 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10710
10711 * parse.y (process_imports): Save the original name of the import
10712 for better error report.
10713
10714 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
10715
10716 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10717 of macros used when compiling jvspec.c.
10718 * jvspec.c (lang_specific_driver): Link with the shared
10719 libgcc by default.
10720
10721 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10722
10723 * check-init.c (check_init): Call internal_error instead of fatal.
10724 * expr.c (java_lang_expand_expr): Likewise.
10725 * jcf-parse.c (get_constant): Likewise.
10726 * mangle.c (java_mangle_decl): Likewise.
10727 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10728 (operator_string): Likewise.
10729 * check-init.c (check_init): Call abort instead of fatal.
10730 * class.c (build_class_ref): Likewise.
10731 * constants.c (write_constant_pool): Likewise.
10732 * decl.c (start_java_method): Likewise.
10733 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10734 (java_stack_dup, encode_newarray_type): Likewise.
10735 (build_java_array_length_access): Likewise.
10736 (build_java_check_indexed_type, expand_java_pushc): Likewise.
10737 (build_java_soft_divmod, build_invokeinterface): Likewise.
10738 * java-tree.h (INNER_CLASS_P): Likewise.
10739 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10740 (give_name_to_class, get_class_constant): Likewise.
10741 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10742 (find_constant_index, generate_bytecode_conditional): Likewise.
10743 (generate_bytecode_insns, perform_relocations): Likewise.
10744 * lex.c (java_unget_unicode, java_lex): Likewise.
10745 * mangle.c (mangle_type, mangle_record_type): Likewise.
10746 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10747 (finish_mangling): Likewise.
10748 * parse.h (MARK_FINAL_PARMS): Likewise.
10749 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10750 (obtain_incomplete_type, java_complete_class): Likewise.
10751 (java_check_regular_methods, java_complete_expand_method): Likewise.
10752 (cut_identifier_in_qualified, check_deprecation): Likewise.
10753 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10754 (java_complete_lhs, lookup_name_in_blocks): Likewise.
10755 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10756 * typeck.c (set_local_type, parse_signature_type): Likewise.
10757 (parse_signature_string, build_java_signature): Likewise;
10758 (set_java_signature): Likewise.
10759 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10760 * class.c (add_method): Call fatal_error instead of fatal.
10761 (build_static_field_ref): Likewise.
10762 * expr.c (build_known_method_ref, expand_invoke): Likewise.
10763 * jcf-parse.c (get_constant, jcf_parse): Likewise.
10764 * lex.c (java_new_new_lexer): Likewise.
10765 * jv-scan.c (main): Likewise.
10766 (fatal_error): Renamed from fatal.
10767 * jcf-parse.c (yyparse): Call fatal_io_error instead of
10768 pfatal_with_name.
10769 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10770 (yyparse): Likewise.
10771 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10772 * lex.c (java_get_line_col): Likewise.
10773 * jcf-parse.c (load_class): Make errors non-fatal.
10774 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10775
10776 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
10777
10778 * jvgenmain.c (class_mangling_suffix): Remove unused string.
10779 (error): Remove unused function.
10780 (main): Don't use "__attribute__ alias" on generated class symbol.
10781
10782 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10783
10784 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10785 argument.
10786 * parse.y (finish_method_declaration): Code accounting for WFLed
10787 method DECL_NAMEs deleted.
10788 (check_abstract_method_definitions): Likewise.
10789 (resolve_type_during_patch): Layout resolved type.
10790 * typeck.c (lookup_do): Removed unused local.
10791
10792 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
10793
10794 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10795 * decl.c (init_decl_processing): Use integer_minus_one_node, not
10796 integer_negative_one_node.
10797 * expr.c (build_java_binop): Likewise.
10798
10799 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
10800
10801 * zextract.c (read_zip_archive): Read file_offset before writing
10802 zipd and consequently clobbering the header contents.
10803
10804 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10805
10806 * Make-lang.in: Remove all dependencies on defaults.h.
10807 * decl.c: Don't include defaults.h.
10808 * expr.c: Likewise.
10809 * parse.y: Likewise.
10810
10811 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10812
10813 * ChangeLog (2001-01-21): Fixed typo.
10814 * class.c (layout_class_method): Code accounting for WFLed
10815 method DECL_NAMEs deleted.
10816 * constant.c (find_methodref_index): Likewise.
10817 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10818 * java-tree.h (DECL_FUNCTION_WFL): New macro.
10819 (struct lang_decl): New field `wfl'.
10820 (java_get_real_method_name): Prototype deleted.
10821 * mangle.c (mangle_method_decl): Code accounting for WFLed
10822 method DECL_NAMEs deleted.
10823 * parse.h (GET_METHOD_NAME): Macro deleted.
10824 * parse.y (reset_method_name): Deleted.
10825 (method_header): Set DECL_FUNCTION_WFL.
10826 (check_abstract_method_header): Code accounting for WFLed method
10827 DECL_NAMEs deleted.
10828 (java_get_real_method_name): Deleted.
10829 (check_method_redefinition): Code accounting for WFLed method
10830 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10831 (java_check_regular_methods): Likewise.
10832 (java_check_abstract_methods): Likewise.
10833 (java_expand_classes): Don't call `reset_method_name.'
10834 (search_applicable_method_list): Use DECL_NAMEs instead of
10835 GET_METHOD_NAME.
10836 * typeck.c (lookup_do): Code accounting for WFLed method
10837 DECL_NAMEs deleted.
10838
10839 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
10840
10841 * lex.c (java_read_char): Check for EOF from getc first.
10842
10843 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10844
10845 * class.c (layout_class): Don't lay the superclass out if it's
10846 already being laid out.
10847 * jcf-parse.c (handle_innerclass_attribute): New function.
10848 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10849 handle_innerclasses_attribute.
10850 (jcf_parse): Don't load an innerclasses if it's already being
10851 laid out.
10852 * jcf-write.c (append_innerclass_attribute_entry): Static
10853 `anonymous_name' and its initialization deleted. `ocii' and `ini'
10854 to be zero for anonymous classes.
10855
10856 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10857
10858 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10859 necessary.
10860 * jcf-parse.c (set_source_filename): Use
10861 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10862
10863 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10864
10865 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10866 gets a unique asm name.
10867
10868 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10869
10870 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10871 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10872 if necessary.
10873 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10874 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10875 * parse.y (lookup_package_type_and_set_next): Deleted.
10876 (resolve_package): Removed unnecessary code.
10877 (find_applicable_accessible_methods_list): `finit$' can't be
10878 inherited.
10879 * verify.c (pop_argument_types): Added missing prototype.
10880
10881 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
10882
10883 * config-lang.in: Disable java by default.
10884
10885 2001-01-23 Tom Tromey <tromey@redhat.com>
10886
10887 * gcj.texi (Copying): New node.
10888 Added copyright information.
10889
10890 2001-01-21 Per Bothner <per@bothner.com>
10891
10892 Various fixes to allow compiling a compressed .jar/.zip archive.
10893 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
10894 (struct ZipFile): Add fields name and next (from ZipFileCache).
10895 (struct ZipDirectory): New field zipf points to owning ZipFile.
10896 * jcf.h (struct ZipDirectory): Add forward declaration.
10897 (struct JCF): Declare zipd field to have type struct ZipDirectory.
10898 Remove seen_in_zip and zip_offset fields.
10899 (JCF_SEEN_IN_ZIP): New macro.
10900 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
10901 * jcf-io.c: Change all ZipFileCache to ZipFile.
10902 (read_zip_member): New function.
10903 (open_in_zip): Call read_zip_member.
10904 * jcf-parse.c (find_in_current_zip): Remove function.
10905 (read_class): Merge in find_in_current_zip functionality.
10906 Call read_zip_member if needed.
10907 (parse_zip_file_entries): Use read_zip_member.
10908 (process_zip_dir): Update for removed and added JCF fields.
10909 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
10910
10911 2001-01-21 Per Bothner <per@bothner.com>
10912
10913 Minor optimization of static ggc roots.
10914 * jcf-parse.c (parse_roots): New static field.
10915 (current_field, current_method, current_file_list): Replace by macros
10916 naming fields of parse_roots.
10917 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
10918 * class.c (class_roots): New static field.
10919 (registered_class, fields_ident, info_ident, class_list):
10920 New macros naming fields of parse_roots.
10921 (build_static_field_ref): Don't register roots here.
10922 (layout_class): Static field list replaced by macro class_list.
10923 (init_class_processing): Call ggc_add_tree_root for 4 roots.
10924 Initialize fields_ident and info_ident here.
10925
10926 2001-01-21 Per Bothner <per@bothner.com>
10927
10928 * jcf-parse.c (ggc_mark_jcf): New function.
10929 (init_jcf_parse): Register current_jcf as ggc root.
10930
10931 2001-01-21 Per Bothner <per@bothner.com>
10932
10933 * lang.c (put_decl_node): Print method's name.
10934
10935 2001-01-21 Per Bothner <per@bothner.com>
10936
10937 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
10938 (verify_jvm_instructions): Use it, for better error messages on loads.
10939
10940 2001-01-21 Per Bothner <per@bothner.com>
10941
10942 * verify.c (merge_type_state): Still may have to merge even if
10943 LABEL_VERIFIED (label).
10944
10945 2001-01-21 Per Bothner <per@bothner.com>
10946
10947 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
10948 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10949
10950 2001-01-19 Per Bothner <per@bothner.com>
10951
10952 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
10953 if expeting an interface type. Refines Tom's change of 2000-09-12.
10954
10955 2001-01-18 Per Bothner <per@bothner.com>
10956
10957 * gcj.texi (Input Options): Mention .java files.
10958
10959 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10960
10961 * lang-options.h (-Wunsupported-jdk11): Removed.
10962 * lang.c (flag_not_overriding): Deleted.
10963 (flag_static_local_jdk1_1): Likewise.
10964 (lang_W_options): Removed "unsupported-jdk11" entry.
10965 * parse.y (java_check_methods): Removed dead code.
10966
10967 2001-01-17 Tom Tromey <tromey@redhat.com>
10968
10969 Changes suggested by Per Bothner:
10970 * gcj.texi (Input Options): Don't mention input files.
10971 (Code Generation): Updated --main information.
10972 (Invoking jcf-dump): Mention that --javap is incomplete.
10973 From Alexandre Petit-Bianco:
10974 (Warnings): Don't mention -Wunsupported-jdk11.
10975 My stuff:
10976 (Compatibility): Mention JDK 1.2-ness of libraries.
10977 (Resources): Mention resources used when writing gcj.
10978
10979 2001-01-17 Tom Tromey <tromey@redhat.com>
10980
10981 * gcj.texi: New file.
10982 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10983 (java.info): Depend on gcj.info.
10984 (java/gcj.dvi): New target.
10985 (java.dvi): Depend on gcj.dvi.
10986 (java.install-info): Wrote.
10987
10988 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
10989
10990 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10991 having called make_decl_rtl.
10992
10993 2001-01-14 Per Bothner <per@bothner.com>
10994
10995 Various patches to emit better messages on verification errors.
10996 * expr.c (push_type_0): Return error indication on stack overflow,
10997 instead of callinfg fatal.
10998 (push_type): Now just call push_type_0 (nd fatal on overflow).
10999 (pop_type_0): Return detailed error message (in a char** argument).
11000 (pop_type): If pop_type_0 fails, print error message.
11001 (pop_argument_types): Moved to verify.c.
11002 * verify.c (pop_argument_types): Moved from expr.c.
11003 Return a (possible) error message, rather than void.
11004 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
11005 (verify_jvm_instruction): Use new macros, improving error messages.
11006 For case OPCODE_astore use object_ptr_type_node.
11007 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
11008 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
11009
11010 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11011 constant, return body without wrapper. (Improves constant folding.)
11012 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
11013
11014 2001-01-13 Per Bothner <per@bothner.com>
11015
11016 * expr.c (expand_java_field_op): Assigning to a final field outside
11017 an initializer does not violate JVM spec, so should be warning, not
11018 error. (Sun's verifier does not complain - though MicroSoft's does.)
11019
11020 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
11021
11022 * gjavah.c (version), jcf-dump.c (version): Update copyright year
11023 to 2001.
11024
11025 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
11026
11027 * parse.y (resolve_expression_name): Permit instance variables from
11028 enclosing context in super constructor call.
11029 (resolve_qualified_expression_name): Permit enclosing class's qualified
11030 "this" in super constructor call.
11031
11032 2001-01-10 Mark Mitchell <mark@codesourcery.com>
11033
11034 * class.c (build_utf8_ref): Remove last argument in call to
11035 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11036 (build_class_ref): Likewise.
11037 (build_static_field_ref): Likewise.
11038 (get_dispatch_table): Likewise.
11039 (layout_class_method): Likewise.
11040 (emit_register_classes): Likewise.
11041 * constants.c (build_constant_data_ref): Likewise.
11042 * decl.c (builtin_function): Likewise.
11043 (create_primitive_vtable): Likewise.
11044 * expr.c (build_known_method_def): Likewise.
11045 (build_jni_stub): Likewise.
11046 (java_lang_expand_expr): Likewise.
11047
11048 2001-01-10 Tom Tromey <tromey@redhat.com>
11049
11050 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11051
11052 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11053
11054 * java-tree.h (lang_printable_name_wls): New prototype.
11055 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11056 rather than `current_class' to print type name. Don't prepend type
11057 names when printing constructor names.
11058 (lang_printable_name_wls): New function.
11059 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11060 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11061 * parse.y (patch_method_invocation): Message tuned for constructors.
11062 (not_accessible_p): Grant `private' access from within
11063 enclosing contexts.
11064
11065 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11066
11067 All files with updated copyright when applicable.
11068 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11069 * class.c (mangle_class_field): Function removed.
11070 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11071 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11072 (build_class_ref): Call `java_mangle_class_field' instead of
11073 `mangle_class_field.'
11074 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11075 (layout_class): Call `java_mangle_decl' instead of
11076 `mangle_static_field.'
11077 (cxx_keywords): Initialized static array moved to `lex.c.'
11078 (layout_class_method): Changed leading comment. Simplified to
11079 call `java_mangle_decl.' Local `ptr' moved in for loop body.
11080 * decl.c (lang_mark_tree): Mark field `package_list.'
11081 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11082 (struct lang_type): New field `package_list.'
11083 (unicode_mangling_length): Prototype removed.
11084 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11085 emit_unicode_mangled_name): Likewise.
11086 (cxx_keyword_p): New prototype.
11087 (java_mangle_decl, java_mangle_class_field,
11088 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11089 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11090 `build_expr_wfl.'
11091 * jvgenmain.c (main_method_prefix): Global variable removed.
11092 (main_method_suffix): Likewise.
11093 (do_mangle_classname): New function.
11094 (main): Call it. Format changed to accommodate new mangling scheme.
11095 * lex.c: (utf8_cmp): Conditionally prototyped.
11096 (cxx_keywords): Moved from class.c, conditionally defined.
11097 (utf8_cmp, cxx_keyword_p): Likewise.
11098 * mangle.c (obstack.h, ggc.h): Included.
11099 (mangle_field_decl): New function.
11100 (mangle_method_decl, mangle_type, mangle_pointer_type,
11101 mangle_array_type, mangle_record_type,
11102 find_compression_pointer_match, find_compression_array_match,
11103 find_compression_record_match,
11104 find_compression_array_template_match, set_type_package_list,
11105 entry_match_pointer_p, emit_compression_string, init_mangling,
11106 finish_mangling, compression_table_add, mangle_member_name): Likewise.
11107 (mangle_obstack): New global.
11108 (MANGLE_RAW_STRING): New macro.
11109 (unicode_mangling_length): Turned static.
11110 (append_unicode_mangled_name): Renamed from
11111 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
11112 replaces `obstack', removed from the parameter list.
11113 (append_gpp_mangled_name): Turned static. `mangle_obstack'
11114 replaces parameter `obstack', removed from the parameter list. Call
11115 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11116 (append_gpp_mangled_classtype): Removed.
11117 (compression_table, compression_next): New static variables.
11118 * parse.y (temporary_obstack): Extern declaration removed.
11119
11120 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11121
11122 * parse.y (patch_binop): Compute missing type in error situations.
11123
11124 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11125
11126 * class.c (make_class_data): Push initial value for "arrayclass".
11127 * decl.c (init_decl_processing): Add new class field "arrayclass".
11128
11129 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11130
11131 From patha@softlab.ericsson.se:
11132 * parse.y (switch_label): Use build, not build1, to construct
11133 DEFAULT_EXPR.
11134
11135 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
11136
11137 * lang.c (lang_decode_option): Change -MA to -MP.
11138 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11139 Update to new prototype; do quote targets.
11140 (jcf_dependency_write): Update.
11141
11142 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
11143
11144 Shorten primitive array allocation path:
11145 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11146 to create new primitive arrays.
11147 * expr.c (build_newarray): If generating native code, call
11148 soft_newarray_node with a reference to the primitive TYPE identifier
11149 instead of type_value.
11150
11151 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
11152
11153 Fix for PRs gcj/312 and gcj/253:
11154 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11155 dest if they arn't already.
11156 * class.c (layout_class): Call maybe_layout_super_class on
11157 superinterfaces also, but only if compiling from bytecode.
11158
11159 Fix for PR gcj/373:
11160 * parse.y (create_class): Set ACC_STATIC if class is declared in an
11161 interface.
11162
11163 2000-12-15 Tom Tromey <tromey@redhat.com>
11164
11165 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11166 set.
11167
11168 2000-12-14 Andrew Haley <aph@redhat.com>
11169
11170 * boehm.c (mark_reference_fields): Change test to correctly detect
11171 bitmap overflow.
11172
11173 2000-12-15 Andreas Jaeger <aj@suse.de>
11174
11175 * config-lang.in (lang_dirs): Added.
11176
11177 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
11178
11179 * parse.y (end_artificial_method_body): Fixed undefined behavior.
11180 Credits go to rth for finding it.
11181
11182 2000-12-13 Mike Stump <mrs@wrs.com>
11183
11184 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11185
11186 2000-11-07 Tom Tromey <tromey@cygnus.com>
11187
11188 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11189 * lex.c (java_ignorable_control_p): Removed.
11190 (java_letter_or_digit_p): Removed.
11191 (java_start_char_p): New function.
11192 (java_read_char): Return `int', not `unicode_t'. Changed
11193 callers.
11194 (java_read_unicode): Likewise.
11195 (java_read_unicode_collapsing_terminators): Likewise.
11196 (java_get_unicode): Likewise.
11197 (java_new_lexer): Initialize hit_eof.
11198 (java_parse_end_comment): Take `int' argument.
11199 (java_parse_doc_section): Likewise.
11200 (java_parse_escape_sequence): Don't allow backlash-newline.
11201 Return `int'.
11202 * lex.h (JAVA_DIGIT_P): Removed.
11203 (_JAVA_LETTER_OR_DIGIT_P): Removed.
11204 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11205 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11206 (JAVA_PART_CHAR_P): New macro.
11207 (UEOF): Now -1.
11208 (JAVA_CHAR_ERROR): Now -2.
11209 (java_lexer): New field `hit_eof'.
11210 * chartables.h: New file.
11211 * gen-table.pl: new file.
11212
11213 2000-11-20 Tom Tromey <tromey@cygnus.com>
11214 Alexandre Petit-Bianco <apbianco@cygnus.com>
11215
11216 * parse.y (java_complete_lhs): Only allow compound assignment of
11217 reference type if type is String.
11218
11219 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11220
11221 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11222 jcf-path.c: Likewise.
11223
11224 2000-12-09 Anthony Green <green@redhat.com>
11225
11226 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11227 filestart and filename_length as int values.
11228
11229 2000-12-07 Mo DeJong <mdejong@redhat.com>
11230
11231 * jcf-io.c (find_class): Correct the logic that tests to see if a
11232 .java file is newer than its .class file. The compiler was
11233 incorrectly printing a warning when file mod times were equal.
11234
11235 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
11236
11237 * jvgenmain.c: Use ISPRINT not isascii.
11238
11239 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11240
11241 * parse.y (end_artificial_method_body): Fixed typo.
11242
11243 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
11244
11245 * parse.y (patch_method_invocation): Pick the correct enclosing
11246 context when creating inner class instances.
11247 Fixes gcj/332.
11248
11249 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
11250
11251 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
11252 Update copyright year to 2000.
11253
11254 2000-11-23 Anthony Green <green@redhat.com>
11255
11256 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11257 Move current_file_list out of yyparse and make it static.
11258
11259 * expr.c: Declare quick_stack and tree_list_free_list as static
11260 (init_expr_processing): Register quick_stack and
11261 tree_list_free_list roots.
11262
11263 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11264
11265 * parse.y (build_outer_field_access): New local `decl_ctx', use
11266 it. Check for field's context and current class immediate outer
11267 context inheritance.
11268 (outer_field_access_p): Consider fields inherited from the last
11269 enclosing context.
11270 (build_access_to_thisn): Stop at the last enclosing context if
11271 necessary.
11272 Fixes gcj/367.
11273
11274 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
11275
11276 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11277
11278 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
11279
11280 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11281 scratch buffer.
11282
11283 2000-11-20 Tom Tromey <tromey@cygnus.com>
11284
11285 * jv-scan.c (help): Document --complexity.
11286 (options): Added --complexity.
11287 (flag_complexity): New global.
11288 (main): Call `report'.
11289 * parse-scan.y (complexity): New global.
11290 (if_then_statement, if_then_else_statement,
11291 if_then_else_statement_nsi, switch_block_statement_group,
11292 while_expression, do_statement, for_begin, continue_statement,
11293 throw_statement, catch_clause, finally, method_invocation,
11294 conditional_and_expression, conditional_or_expression,
11295 conditional_expression): Update complexity.
11296 (reset_report): Reset complexity.
11297 (report): New function.
11298
11299 2000-11-20 Tom Tromey <tromey@cygnus.com>
11300
11301 * lex.c (yylex): Added STRICT_TK case.
11302 * parse.y (STRICT_TK): Added.
11303 * parse-scan.y (STRICT_TK): Added.
11304 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11305 `;'. Use 4, not 3, with -k option. Correctly rename resulting
11306 file.
11307 * keyword.h: Rebuilt.
11308 * keyword.gperf (strictfp): Added.
11309
11310 2000-11-20 Tom Tromey <tromey@cygnus.com>
11311
11312 * lex.c (yylex): Recognize floating point constants with leading
11313 0.
11314
11315 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11316
11317 * java-tree.h (cyclic_inheritance_report): Constify.
11318 * parse.y (cyclic_inheritance_report): Likewise.
11319
11320 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
11321
11322 * parse.y (goal): Remove call to ggc_add_string_root.
11323
11324 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
11325
11326 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
11327 Create string in scratch buffer, then pass to build_string.
11328
11329 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
11330
11331 * parse.y (issue_warning_error_from_context): Add
11332 ATTRIBUTE_PRINTF.
11333
11334 2000-11-11 Anthony Green <green@redhat.com>
11335
11336 * jcf-parse.c (process_zip_dir): Add finput parameter.
11337 (jcf_figure_file_type): Call process_zip_dir with appropriate
11338 argument.
11339
11340 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11341
11342 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
11343 * jcf-parse.c (jcf_figure_file_type): Likewise.
11344
11345 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
11346
11347 * parse.y (create_new_parser_context): Use memset () instead of
11348 bzero ().
11349
11350 2000-11-08 Tom Tromey <tromey@cygnus.com>
11351
11352 * gjavah.c (process_file): Only include gcj/cni.h when generating
11353 CNI stubs.
11354
11355 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
11356
11357 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
11358 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
11359 instead of bzero ().
11360
11361 2000-11-05 Tom Tromey <tromey@cygnus.com>
11362
11363 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
11364 * lex.c (IS_ZERO): New define.
11365 (java_perform_atof): Error on floating point underflow.
11366
11367 2000-11-04 Tom Tromey <tromey@cygnus.com>
11368
11369 * lex.c (java_parse_escape_sequence): Only read two octal
11370 characters if the first one is greater than 3. Don't allow
11371 "octal" numbers to include the digits 8 or 9.
11372
11373 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
11374
11375 * Make-lang.in (java.distdir): Remove.
11376
11377 2000-11-03 Tom Tromey <tromey@cygnus.com>
11378
11379 * Make-lang.in (java.dvi): New target.
11380 Partial fix for PR other/567.
11381
11382 * lang-options.h: Mention -Wout-of-date.
11383 * jcf-dump.c (flag_newer): New global.
11384 * gjavah.c (flag_newer): New global.
11385 * jcf-io.c (find_class): Only warn when flag_newer set.
11386 * lang.c (flag_newer): New global.
11387 (struct string_option): New declaration.
11388 (lang_W_options): New global.
11389 (process_option_with_no): New function.
11390 (lang_decode_option): Use it.
11391
11392 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11393 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11394 `$'.
11395
11396 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11397 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11398 * lex.c (java_read_unicode): Removed `term_context' argument.
11399 Recognize any number of `u' in `\u'.
11400 (java_read_unicode_collapsing_terminators): New function.
11401 (java_get_unicode): Use it.
11402 (java_lineterminator): Removed.
11403 (yylex): Produce error if character literal is newline or single
11404 quote. Return if eof found in middle of `//' comment. EOF in
11405 `//' comment is only an error if pedantic.
11406 (java_ignorable_control_p): New function.
11407 (java_parse_end_comment): Return if eof found in middle of
11408 comment.
11409 Include flags.h.
11410 * jv-scan.c (pedantic): New global.
11411
11412 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11413
11414 * parse.y (outer_field_access_p): Inherited fields aren't
11415 consider outer fields.
11416 (maybe_build_thisn_access_method): Use
11417 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11418 (resolve_expression_name): Trigger an error if a static field
11419 is being accessed as an outer field.
11420
11421 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11422
11423 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11424 Fixes gcj/365.
11425
11426 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
11427
11428 * Make-lang.in: Move all build rules here from Makefile.in,
11429 adapt to new context. Wrap all rules that change the current
11430 directory in parentheses. Expunge all references to $(P).
11431 When one command depends on another and they're run all at
11432 once, use && to separate them, not ;. Add OUTPUT_OPTION to
11433 all object-file generation rules. Delete obsolete variables.
11434
11435 * Makefile.in: Delete.
11436 * config-lang.in: Delete outputs= line.
11437
11438 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11439
11440 * parse.y (patch_method_invocation): NULLify this_arg when already
11441 inserted.
11442 (maybe_use_access_method): Handle call to methods unrelated to the
11443 current class. Fixed comment.
11444 Fixes gcj/361.
11445
11446 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11447
11448 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11449 scope.
11450
11451 2000-10-24 Tom Tromey <tromey@cygnus.com>
11452
11453 * lex.c (java_new_lexer): Initialize new fields. Work around
11454 broken iconv() implementations.
11455 (java_read_char): Swap bytes if required. Use fallback decoder if
11456 required.
11457 (byteswap_init, need_byteswap): New globals.
11458 (java_destroy_lexer): Only close iconv handle if it is in use.
11459 * lex.h (java_lexer): New fields read_anything, byte_swap,
11460 use_fallback.
11461 Made out_buffer unsigned.
11462
11463 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11464
11465 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11466 where an enclosing context can be set on the jdep.
11467 (do_resolve_class): Fixed identation.
11468
11469 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11470
11471 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
11472
11473 * jcf-reader.c (peek_attribute, skip_attribute): Only define
11474 when requested.
11475
11476 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
11477
11478 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
11479
11480 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11481
11482 * jcf-write.c (OP1): Update `last_bc'.
11483 (struct jcf_block): Fixed indentation and typo in comments. New
11484 field `last_bc'.
11485 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
11486 follows `monitorenter'.
11487 * parse.y (patch_synchronized_statement): New local `tmp'. Call
11488 `patch_string'.
11489 Fixes gcj/232.
11490
11491 2000-10-16 Tom Tromey <tromey@cygnus.com>
11492
11493 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
11494 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
11495 * lang-options.h: Added -MA, -MT, -MF..
11496 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
11497 (DEPEND_TARGET_SET): New macro.
11498 (DEPEND_FILE_ALREADY_SET): Likewise.
11499 (init_parse): Handle new flags.
11500 * jcf.h (jcf_dependency_print_dummies): Declare.
11501 * Make-lang.in (s-java): Added mkdeps.o.
11502 * Makefile.in (BACKEND): Added mkdeps.o.
11503 (../gcjh$(exeext)): Added mkdeps.o.
11504 (../jcf-dump$(exeext)): Added mkdeps.o.
11505 * jcf-depend.c: Include mkdeps.h.
11506 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
11507 add_entry): Removed.
11508 (jcf_dependency_reset): Rewrote.
11509 (dependencies): New global.
11510 (jcf_dependency_set_target): Rewrote.
11511 (jcf_dependency_add_target): Likewise.
11512 (jcf_dependency_add_file): Likewise.
11513 (munge): Removed.
11514 (print_ents): Removed.
11515 (jcf_dependency_write): Rewrote.
11516 (print_dummies): New global.
11517 (jcf_dependency_print_dummies): New function
11518 (jcf_dependency_write): Call deps_dummy_targets if required.
11519
11520 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11521
11522 * gjavah.c (add_class_decl): Removed unused variables `tname',
11523 `tlen' and `name_index'.
11524 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11525 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11526 in `wfl_operator' with value.
11527 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11528 (jcf_figure_file_type): Fixed identation.
11529 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11530 * parse.y (analyze_clinit_body): New function.
11531 (static_initializer:): Reset `current_static_block'.
11532 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11533 `wfl_operator' with new value.
11534 (lookup_cl): Use EXPR_WFL_FILENAME.
11535 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11536 analyze_clinit_body.
11537 (build_outer_field_access): Access to this$<n> built from
11538 current_class, not its outer context.
11539 (build_access_to_thisn): Fixed leading comment. Tidied things up.
11540 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
11541 (patch_method_invocation): Use `is_static_flag' when already
11542 initialized.
11543 (patch_newarray): Removed assignment in ternary operator.
11544
11545 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11546
11547 * except.c (free_eh_ranges): Don't free `whole_range'.
11548
11549 2000-10-15 Anthony Green <green@redhat.com>
11550
11551 * decl.c (init_decl_processing): Call init_class_processing before
11552 anything else.
11553
11554 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11555
11556 * check-init.c (check_init): Fixed leading comment. Use
11557 LOCAL_FINAL_P.
11558 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11559 (give_name_to_locals): Likewise.
11560 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11561 fields in lang_decl_var.
11562 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11563 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11564 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11565 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11566 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11567 (LOCAL_FINAL): Rewritten.
11568 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11569 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11570 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11571 `init_final' fields.
11572 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11573 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11574 (TYPE_HAS_FINAL_VARIABLE): New macro.
11575 (struct lang_type): Added `afv' field.
11576 * parse.y (check_static_final_variable_assignment_flag): New function.
11577 (reset_static_final_variable_assignment_flag): Likewise.
11578 (check_final_variable_local_assignment_flag): Likewise.
11579 (reset_final_variable_local_assignment_flag): Likewise.
11580 (check_final_variable_indirect_assignment): Likewise.
11581 (check_final_variable_global_assignment_flag): Likewise.
11582 (add_inner_class_fields): Use LOCAL_FINAL_P.
11583 (register_fields): Handle local finals and final variables.
11584 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11585 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11586 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11587 on local finals.
11588 (java_complete_expand_methods): Loop to set
11589 TYPE_HAS_FINAL_VARIABLE. Call
11590 `reset_final_variable_local_assignment_flag' and
11591 `check_final_variable_local_assignment_flag' accordingly before
11592 and after constructor expansion. Call
11593 `reset_static_final_variable_assignment_flag'
11594 before expanding <clinit> and after call
11595 `check_static_final_variable_assignment_flag' if the
11596 current_class isn't an interface. After all methods have been
11597 expanded, call `check_final_variable_global_assignment_flag' and
11598 `check_static_final_variable_assignment_flag' if the current class
11599 is an interface.
11600 (maybe_yank_clinit): Fixed typo in comment.
11601 (build_outer_field_access_methods): Removed old sanity check. Use
11602 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11603 Don't create access methods for finals.
11604 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11605 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11606 existing DECL_INIT has been processed.
11607 (java_complete_lhs): Likewise.
11608 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11609 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11610 logic.
11611 (patch_assignment): Use LOCAL_FINAL_P.
11612 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11613 DECL_INITIAL is nullified.
11614 Fixes gcj/163.
11615
11616 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11617
11618 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11619
11620 * Makefile.in (parse.c, parse-scan.c): Likewise.
11621
11622 2000-10-12 Mark Mitchell <mark@codesourcery.com>
11623
11624 * class.c (temporary_obstack): Remove.
11625 (make_class): Don't mess with obstascks.
11626 (push_class): Likewise.
11627 (set_super_info): Likewise.
11628 (add_method_1): Likewise.
11629 (add_method): Likewise.
11630 (add_field): Likewise.
11631 (build_utf8_ref): Likewise.
11632 (build_class_ref): Likewise.
11633 (build_static_field_ref): Likewise.
11634 (finish_class): Likewise.
11635 (push_super_field): Likewise.
11636 (layout_class): Likewise.
11637 (layout_class_methods): Likewise.
11638 (init_class_processing): Likewise.
11639 * constants.c (get_tag_node): Likewise.
11640 (build_constant_data_ref): Likewise.
11641 * decl.c (ggc_p): Remove.
11642 (copy_lang_decl): Use ggc_alloc.
11643 (complete_start_java_method): Don't mess with obstacks.
11644 (start_java_method): Likewise.
11645 (end_java_method): Likewise.
11646 * except.c (link_handler): Use xmalloc.
11647 (free_eh_ranges): New function.
11648 (method_init_exceptions): Use it.
11649 (add_handler): Use xmalloc.
11650 (expand_start_java_handler): Don't mess with obstacks.
11651 (prepare_eh_table_type): Likewise.
11652 (expand_end_java_handler): Likewise.
11653 * expr.c (push_value): Likewise.
11654 (create_label_decl): Likewise.
11655 (build_jni_stub): Likewise.
11656 (java_lang_expand_expr): Likewise.
11657 (note_instructions): Use xrealloc.
11658 (java_push_constant_from_pool): Don't mess with obstacks.
11659 (process_jvm_instruction): Likewise.
11660 * java-tree.h (cyclic_inheritance_report): Remove duplicate
11661 declaration.
11662 * jcf-parse.c (get_constant): Don't mess with obstacks.
11663 (read_class): Likewise.
11664 (jcf_parse): Likewise.
11665 * lex.c (expression_obstack): Remove.
11666 (java_lex): Don't use obstack_free.
11667 * parse.h (exit_java_complete_class): Don't mess with obstacks.
11668 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11669 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11670 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11671 * parse.y (gaol): Add more GC roots.
11672 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11673 (lookup_field_wrapper): Likewise.
11674 (obtain_incomplete_type): Don't mess with obstacks.
11675 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11676 macros.
11677 (craft_constructor): Don't mess with obstacks.
11678 (safe_layout_class): Likewise.
11679 (java_complete_class): Likewise.
11680 (source_end_java_method): Likewise.
11681 (build_outer_field_access_methods): Likewise.
11682 (build_outer_method_access_method): Likewise.
11683 (maybe_build_thisn_access_method): Likewise.
11684 (build_dot_class_method_invocation): Likewise.
11685 (java_complete_tree): Likewise.
11686 (java_complete_lhs): Likewise.
11687 (do_merge_string_cste): Likewise.
11688 (patch_string_cst): Likewise.
11689 (array_constructor_check_entry): Likewise.
11690 * typeck.c (build_java_array_type): Likewise.
11691 (parse_signature_string): Likewise.
11692 (build_java_signature): Likewise.
11693
11694 2000-10-12 Tom Tromey <tromey@cygnus.com>
11695
11696 Fix for PR gcj/356:
11697 * gjavah.c (add_class_decl): Don't special-case inner classes.
11698 (add_namelet): Likewise.
11699
11700 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
11701
11702 * java-tree.h: Constify current_encoding.
11703 * lang.c: Constify current_encoding.
11704
11705 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
11706
11707 * jvgenmain.c (class_mangling_suffix): Omit `.'.
11708 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11709
11710 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11711
11712 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11713 patch. Fixes gcj/340.
11714
11715 2000-10-10 Tom Tromey <tromey@cygnus.com>
11716
11717 * lex.c (java_new_lexer): Initialize out_first and out_last
11718 fields.
11719 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11720
11721 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11722
11723 * parse.y (pop_current_osb): New function.
11724 (array_type:): Use `dims:', changed actions
11725 accordingly. Suggested by Anthony Green.
11726 (array_creation_expression:): Used pop_current_osb.
11727 (cast_expression:): Likewise.
11728 (search_applicable_method_list): Fixed indentation.
11729
11730 2000-10-08 Anthony Green <green@redhat.com>
11731
11732 * parse.y (array_type_literal): Remove production.
11733 (type_literals): Refer to array_type, not array_type_literal.
11734
11735 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11736
11737 Patch contributed by Corey Minyard.
11738 * decl.c (check_local_named_variable): New function.
11739 (tree check_local_unnamed_variable): Likewise.
11740 (find_local_variable): Splitted. Call check_local_{un}named_variable.
11741
11742 2000-10-07 Anthony Green <green@redhat.com>
11743
11744 * class.c (layout_class): Handle case where superclass can't be
11745 layed out yet.
11746
11747 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
11748
11749 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11750 gperf.
11751
11752 2000-10-05 Tom Tromey <tromey@cygnus.com>
11753
11754 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11755 * jvgenmain.c (class_mangling_prefix): Removed.
11756 (class_mangling_suffix): New global.
11757 (main): Use it.
11758 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11759 `$'.
11760 (print_method_info): Handle overrides for static and final
11761 methods.
11762 (process_file): Generate declaration for class object field.
11763 * class.c (cxx_keywords): New array.
11764 (utf8_cmp): New function.
11765 (cxx_keyword_p): New function.
11766 (layout_class_method): Mangle C++ keywords by appending `$'.
11767 (mangle_field): New function.
11768 (mangle_class_field): Use mangle_field. Mangle class name as
11769 `class$'.
11770 (mangle_static_field): Use mangle_field.
11771
11772 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
11773
11774 * decl.c (find_local_variable): Removed uncessary type check and
11775 fixed range check typo. From Corey Minyard.
11776
11777 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11778
11779 * decl.c (give_name_to_locals): New local `code_offset'. Call
11780 `maybe_adjust_start_pc'.
11781 * expr.c (note_instructions): New function.
11782 (expand_byte_code): Don't collect insn starts here.
11783 (peek_opcode_at_pc): New function.
11784 (maybe_adjust_start_pc): Likewise.
11785 * java-tree.h (maybe_adjust_start_pc): Declare.
11786 (note_instructions): Likewise.
11787 * jcf-parse.c (parse_class_file): Call `note_instructions'.
11788
11789 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11790
11791 * parse.y (field_access:): Fixed indentation.
11792 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11793
11794 2000-09-07 Tom Tromey <tromey@cygnus.com>
11795
11796 Fix for PR gcj/307:
11797 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11798 JPRIMITIVE_TYPE_P, for arithmetic operators.
11799 (patch_method_invocation): Indentation fix.
11800 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
11801 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11802 (do_unary_numeric_promotion): Cleaned up code.
11803 (valid_cast_to_p): Handle boolean correctly.
11804
11805 2000-09-27 Tom Tromey <tromey@cygnus.com>
11806
11807 * lex.c (java_read_unicode): Reset bs_count when finished with
11808 `\u' sequence.
11809
11810 2000-10-01 Mark Mitchell <mark@codesourcery.com>
11811
11812 Convert to GC.
11813 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11814 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11815 (typeck.o): Depend on ggc.h.
11816 * class.c (add_method_1): Use GC functions for allocation.
11817 (init_class_processing): Register roots.
11818 * decl.c (ggc_p): Set to 1.
11819 (pending_local_decls): Make it static.
11820 (push_jvm_slot): Use GC functions for allocation.
11821 (init_decl_processing): Register roots.
11822 (give_name_to_locals): Use GC functions for allocation.
11823 (lang_mark_tree): New function.
11824 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11825 functions for allocation.
11826 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11827 * lex.c (java_lex): Use build_string, rather than replicating it
11828 inline.
11829 * parse.y (goal): Add more roots.
11830 (mark_parser_ctxt): New function.
11831 * typeck.c: Include ggc.h.
11832
11833 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11834
11835 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11836 contains something else than MODIFY_EXPR.
11837
11838 2000-09-23 Mark Mitchell <mark@codesourcery.com>
11839
11840 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11841 * Makefile.in (parse.o): Depend on ggc.h.
11842 (class.o): Likewise.
11843 (constants.o): Likewise.
11844 (decl.o): Likewise.
11845 (expr.o): Likewise.
11846 (jcf-parse.o): Likewise.
11847 (jcf-write.o): Likewise.
11848 (mangle.o): Likewise.
11849 * class.c: Include ggc.h.
11850 (build_static_field_ref): Register GC roots.
11851 (layout_class): Likewise.
11852 (init_class_processing): Likewise.
11853 * constants.c: Include ggc.h.
11854 (current_constant_pool_data_ref): Remove.
11855 (tag_nodes): Move it to ...
11856 (get_tag_node): ... here. Register GC roots.
11857 * decl.c: Include ggc.h. Remove many global tree definitions.
11858 (throw_node): Define.
11859 (java_global_trees): Likewise.
11860 (predef_filenames): Make the size a constant.
11861 (init_decl_processing): Adjust accordingly.
11862 (init_decl_processing): Call init_jcf_parse. Register GC roots.
11863 * expr.c: Include ggc.h.
11864 (init_expr_processing): Register GC roots.
11865 (build_invokeinterface): Likewise.
11866 * java-tree.h: Replace extern tree declarations with macros.
11867 (java_global_trees): New variable.
11868 (java_tree_index): New enumeration.
11869 (init_jcf_parse): Declare.
11870 * jcf-parse.c: Include ggc.h.
11871 (current_class): Remove declaration.
11872 (main_class): Likewise.
11873 (all_class_list): Likewise.
11874 (predefined_filename_p): Adjust for constant size of
11875 predef_filenames.
11876 (init_jcf_parse): New function.
11877 * jcf-write.c: Include ggc.h.
11878 (generate_classfile): Register GC roots.
11879 (append_synthetic_attribute): Likewise.
11880 (append_innerclass_attribute_entry): Likewise.
11881 * lang.c: Include ggc.h.
11882 (lang_print_error): Register GC roots.
11883 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11884 with macros.
11885 * parse.y: Include ggc.h.
11886 (wfl_operator): Remove.
11887 (goal): Register GC roots.
11888 (java_pop_parser_context): Adjust for new field names.
11889 (java_parser_context_save_global): Likewse.
11890 (java_parser_context_restore_global): Likewise.
11891 (java_parser_context_suspend): Likewise.
11892 (java_parser_context_resume): Likewise.
11893 (verify_constructor_circularity): Register GC roots.
11894 (lookup_cl): Likewise.
11895 (java_reorder_fields): Likewise.
11896 (build_current_this): Likewise.
11897 (class_in_current_package): Likewise.
11898 (argument_types_convertible): Likewise.
11899 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11900
11901 2000-09-14 Tom Tromey <tromey@cygnus.com>
11902
11903 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11904
11905 2000-09-13 Tom Tromey <tromey@cygnus.com>
11906
11907 * jcf-parse.c: Include <locale.h>.
11908 * jv-scan.c: Include <locale.h>.
11909
11910 2000-09-12 Tom Tromey <tromey@cygnus.com>
11911
11912 * expr.c (pop_type_0): Return `Object' if trying to merge two
11913 interface types.
11914 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11915 interface types; `Object' is always a valid supertype.
11916
11917 2000-09-12 Tom Tromey <tromey@cygnus.com>
11918
11919 Fix for PR gcj/33:
11920 * jv-scan.c (help): Document --encoding.
11921 (options): Added `encoding' entry.
11922 (OPT_ENCODING): New define.
11923 (main): Handle --encoding.
11924 Include <langinfo.h> if nl_langinfo exists.
11925 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11926 --encoding.
11927 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11928 (parse_source_file): Correctly call java_init_lex. Added `finput'
11929 argument. Use nl_langinfo to determine default encoding.
11930 * java-tree.h (current_encoding): Declare.
11931 * parse.y (java_parser_context_restore_global): Don't restore
11932 `finput'.
11933 (java_parser_context_save_global): Don't set `finput' field.
11934 (java_pop_parser_context): Don't restore `finput'. Free old lexer
11935 if required.
11936 * lang.c (current_encoding): New global.
11937 (lang_decode_option): Recognize `-fencoding='.
11938 (finish_parse): Don't close finput.
11939 * parse.h (struct parser_ctxt): Removed `finput' and
11940 `unget_utf8_value' fields. Added `lexer' field.
11941 (java_init_lex): Fixed declaration.
11942 * lex.c (java_new_lexer): New function.
11943 (java_destroy_lexer): Likewise.
11944 (java_read_char): Added `lex' argument. Handle iconv case.
11945 (java_read_unicode): Added `lex' argument. Count backslashes in
11946 lexer structure.
11947 (java_init_lex): Added `finput' and `encoding' arguments. Set
11948 `lexer' field in ctxp.
11949 (BAD_UTF8_VALUE): Removed.
11950 (java_lex): Handle seeing UEOF in the middle of a string literal.
11951 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11952 (java_lexer): New structure.
11953 (UNGETC): Removed.
11954 (GETC): Removed.
11955 (DEFAULT_ENCODING): New define.
11956 (java_destroy_lexer): Declare.
11957
11958 2000-09-12 Tom Tromey <tromey@cygnus.com>
11959
11960 Fix for PR gcj/343:
11961 * lex.c (java_init_lex): Initialize java_io_serializable.
11962 * parse.y (java_io_serializable): New global.
11963 (valid_ref_assignconv_cast_p): An array can be cast to
11964 serializable.
11965
11966 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
11967
11968 * decl.c, expr.c: Include defaults.h if not already included.
11969 Don't define the *_TYPE_SIZE macros.
11970
11971 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
11972
11973 * typeck.c (build_java_array_type): Correct first parameter
11974 in ADJUST_FIELD_ALIGN invocation.
11975
11976 2000-09-06 Tom Tromey <tromey@cygnus.com>
11977
11978 * lang-specs.h: Also recognize `-femit-class-files'.
11979
11980 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11981
11982 * verify.c (merge_types): Load the types to merge if necessary.
11983
11984 2000-09-02 Anthony Green <green@redhat.com>
11985
11986 * jcf-io.c: Include zlib.h.
11987 (open_in_zip): Read compressed class file archives.
11988 * zipfile.h (ZipDirectory): Add uncompressed_size and
11989 compression_method fields.
11990 * zextract.c (read_zip_archive): Collect file compression info.
11991
11992 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
11993
11994 * parse.y (do_resolve_class): Also explore superclasses of
11995 intermediate enclosing contexts when searching for inner classes.
11996
11997 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11998
11999 * parse.y (variable_declarator_id:): Better error message.
12000 (expression_statement:): Use YYNOT_TWICE.
12001 (cast_expression:): Likewise.
12002 (assignment:): Likewise.
12003
12004 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12005
12006 * parse.y (do_merge_string_cste): New locals. Create new
12007 STRING_CSTs each time, use memcpy. Fixes gcj/311.
12008
12009 2000-08-07 Hans Boehm <boehm@acm.org>
12010
12011 * boehm.c (mark_reference_fields): Set marking bits for all words in
12012 a multiple-word record.
12013 (get_boehm_type_descriptor): Use the procedure marking descriptor for
12014 java.lang.Class.
12015
12016 2000-08-31 Mike Stump <mrs@wrs.com>
12017
12018 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12019 jcf-dump$(exeext)): Make parallel safe.
12020
12021 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12022
12023 * jcf-parse.c (set_source_filename): Constify a char *.
12024 * jcf-write.c (append_innerclasses_attribute,
12025 make_class_file_name): Constify a char *. Don't recycle a
12026 variable for an unrelated purpose.
12027 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12028 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12029
12030 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12031
12032 * expr.c (can_widen_reference_to): Fixed indentation.
12033 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12034 * parse.y: `finit$' replaces `$finit$' in comments.
12035 (try_builtin_assignconv): Fixed leading comment.
12036
12037 2000-08-25 Greg McGary <greg@mcgary.org>
12038
12039 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12040
12041 2000-08-24 Greg McGary <greg@mcgary.org>
12042
12043 * lang.c (lang_decode_option): Use ARRAY_SIZE.
12044 * parse.y (BINOP_LOOKUP): Likewise.
12045
12046 2000-08-22 Andrew Haley <aph@cygnus.com>
12047
12048 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12049 sign extending. Fixes gcj/321.
12050 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12051 combining to make a jlong. Fixes gcj/321.
12052
12053 2000-08-21 Nix <nix@esperi.demon.co.uk>
12054
12055 * lang-specs.h: Do not process -o or run the assembler if
12056 -fsyntax-only.
12057
12058 2000-08-16 Andrew Haley <aph@cygnus.com>
12059
12060 * typeck.c (build_java_array_type): Rewrite code to do array
12061 alignment. Take into account back-end macros when aligning array
12062 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12063 user to set alignment. Fixes gcj/252 and 160.
12064
12065 2000-08-09 Tom Tromey <tromey@cygnus.com>
12066
12067 * parse.y (check_abstract_method_definitions): Now return `int'.
12068 Check implemented interfaces. Fixes PR gcj/305.
12069
12070 * parse.y (patch_switch_statement): Disallow `long' in switch
12071 expressions. Fixes PR gcj/310.
12072
12073 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12074
12075 * decl.c (finit_leg_identifier_node): New global.
12076 (init_decl_processing): Use `finit$' to initialize
12077 finit_identifier_node. Use `$finit$' to initialize
12078 finit_leg_identifier_node.
12079 * expr.c (expand_java_field_op): Use ID_FINIT_P.
12080 * java-tree.h (finit_identifier_node): Changed attached comment.
12081 (finit_leg_identifier_node): New declaration.
12082 (ID_FINIT_P): Take finit_identifier_node and
12083 finit_leg_identifier_node into account. This is a backward
12084 compatibility hack.
12085
12086 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12087
12088 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12089 Jan 6 2000 patch.
12090 (generate_bytecode_insns): Check `nargs' before emitting it.
12091 * verify.c (merge_type_state): Fixed typo.
12092 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12093 generate_bytecode_{conditional,insns}.
12094
12095 2000-08-13 Anthony Green <green@redhat.com>
12096
12097 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12098 for -pg builds).
12099
12100 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12101
12102 * class.c (maybe_layout_super_class): Fixed indentation.
12103 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12104 (java_check_methods): New function declaration.
12105 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12106 instead of `str_ptr'.
12107 * jcf-write.c (generate_bytecode_insns): Emit number the of args
12108 of a `invokeinterface' at the right time.
12109 * parse.h (WFL_STRIP_BRACKET): New macro.
12110 (SET_TYPE_FOR_RESOLUTION): Use it.
12111 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12112 (check_class_interface_creation): Don't check for cross package
12113 innerclass name clashes.
12114 (method_header): Behave properly if MDECL is `error_mark_node'.
12115 (method_declarator): Return `error_mark_node' if bogus current
12116 class.
12117 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12118 (resolve_and_layout): New local `decl_type', set and used. Call
12119 java_check_methods.
12120 (java_check_methods): New method.
12121 (java_layout_classes): Use it.
12122 (resolve_qualified_expression_name): No EH check necessary in
12123 access$<n>.
12124 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12125 `case' statement.
12126 (patch_assignment): Set DECL_INITIAL on integral final local.
12127
12128 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12129
12130 * java-tree.h (flag_extraneous_semicolon): New extern.
12131 * lang-options.h: (-Wextraneous-semicolon): New option.
12132 * lang.c (flag_redundant): Fixed typo in leading comment.
12133 (flag_extraneous_semicolon): New global.
12134 (lang_decode_option): Set `flag_extraneous_semicolon' when
12135 -Wall. Decode `-Wextraneous-semicolon'.
12136 * parse.y (type_declaration:): Removed `SC_TK' hack, added
12137 `empty_statement' rule.
12138 (class_body_declaration): Likewise.
12139 (method_body:): Accept `;' as a method body.
12140 (static_initializer:): Removed `SC_TK' hack.
12141 (constructor_block_end:): Likewise.
12142 (empty_statement:): Report deprecated empty declaration. Fixes
12143 gcj/295
12144
12145 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12146
12147 * parse.y (build_dot_class_method_invocation): Changed parameter
12148 name to `type'. Build signature from `type' and convert it to a
12149 STRING_CST if it's an array.
12150 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12151 to use `ref_type' directly.
12152
12153 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
12154
12155 * lang-options.h: Added a comma after the last element to avoid
12156 syntax errors when other languages define additional options.
12157
12158 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
12159
12160 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12161 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12162 (jc1): Link with $(BACKEND).
12163 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12164
12165 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
12166
12167 * jvspec.c: Adjust type of second argument to
12168 lang_specific_driver, and update code as necessary.
12169
12170 * class.c (build_dtable_decl): Initialize dummy.
12171
12172 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12173
12174 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12175 method bodies not to rule out discarding `<clinit>'; don't use
12176 <clinit> to initialize static fields with constant initializers.
12177
12178 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12179
12180 * gjavah.c (print_method_info): Added `synth' parameter. Skip
12181 synthetic methods.
12182 (method_synthetic): New global.
12183 (HANDLE_METHOD): Recognize synthetic method and tell
12184 `print_method_info' about it.
12185 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12186 processing a synthetic method.
12187 * jcf-reader.c (skip_attribute): New function.
12188 ( skip_attribute): Likewise.
12189
12190 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12191
12192 * parse.y (build_outer_field_access): Fixed comments.
12193 (fix_constructors): Emit the initialization of this$<n> before
12194 calling $finit$.
12195 (resolve_qualified_expression_name): Build an access to `decl' if
12196 necessary.
12197
12198 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12199
12200 * parse-scan.y (curent_class): Non longer const.
12201 (inner_qualifier, inner_qualifier_length): Deleted.
12202 (current_class_length): New global.
12203 (bracket_count): Fixed typo in leading comment.
12204 (anonymous_count): New global.
12205 (class_instance_creation_expression:): Handle anonymous classes.
12206 (anonymous_class_creation:): New rule.
12207 (push_class_context): Rewritten.
12208 (pop_class_context): Likewise.
12209 (INNER_QUALIFIER): Macro deleted.
12210 (report_class_declaration): call `push_class_context' when
12211 entering the function. `fprintf' format modified not to use
12212 INNER_QUALIFIER.
12213 (report_class_declaration): Assign `package_name' and
12214 `current_class' to NULL separately.
12215
12216 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12217
12218 * expr.c (build_invokeinterface): Call layout_class_methods on
12219 target interface.
12220
12221 2000-07-27 Tom Tromey <tromey@cygnus.com>
12222 Anthony Green <green@cygnus.com>
12223 Alexandre Petit-Bianco <apbianco@cygnus.com>
12224
12225 * class.c (make_class_data): Create vtable for abstract classes.
12226 (get_dispatch_table): Changed to cope with abstract classes.
12227
12228 2000-07-27 Tom Tromey <tromey@cygnus.com>
12229
12230 * parse.y (patch_method_invocation): Don't reverse the argument
12231 list when dealing with anonymous class constructors. Fixed typo in
12232 comment.
12233
12234 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12235
12236 * parse.y (build_alias_initializer_parameter_list): Reverse
12237 crafted list when building aliases for anonymous class
12238 constructors.
12239
12240 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12241
12242 * parse.y (jdep_resolve_class): Don't bother checking potential
12243 innerclass access if `decl' is NULL.
12244 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
12245 WFL.
12246
12247 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12248
12249 * parse.c: Remove (again.)
12250
12251 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12252
12253 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
12254 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12255 outside the `if' statement, alias to innerclass removed, `decl'
12256 used to mark the class complete.
12257
12258 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12259
12260 * parse.y (simple_name:): Fixed typo in error message.
12261
12262 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12263
12264 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12265 or its first operand can be error marks.
12266
12267 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12268
12269 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12270 * parse.y (method_header): Likewise.
12271
12272 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12273
12274 * parse.y (process_imports): Consider that one might be trying to
12275 import an innerclass. Fixes gcj/254
12276
12277 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12278
12279 * parse.y (find_as_inner_class): Handle the case where the
12280 enclosing context of an innerclass has been loaded as bytecode.
12281
12282 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12283
12284 * parse.y (simple_name:): Reject `$' in type names.
12285 (resolve_type_during_patch): Use `type' as a second
12286 argument to resolve_no_layout. Fixes gcj/257.
12287
12288 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
12289
12290 * parse.y (find_most_specific_methods_list): Select the only
12291 non-abstract method even if max has been set.
12292 Fixes gcj/285, gcj/298.
12293
12294 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
12295
12296 * lang-specs.h: Added %(jc1) to java compiler options.
12297
12298 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
12299
12300 * .cvsignore: New file.
12301
12302 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12303
12304 * parse.y (not_accessible_p): Access granted to innerclasses
12305 (indirectly) extending the reference type. Fixes gcj/249.
12306
12307 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12308
12309 * parse.y (patch_method_invocation): Fixed comment.
12310 (maybe_use_access_method): Build this$<n>s to the context of the
12311 target method, or a type that extends it. Fixes gcj/242.
12312
12313 2000-07-13 Mark Mitchell <mark@codesourcery.com>
12314
12315 * parse.c: Remove.
12316
12317 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12318
12319 * parse.y (fold_constant_for_init): Avoid bullish conversion.
12320
12321 2000-07-13 Tom Tromey <tromey@cygnus.com>
12322
12323 * lang-specs.h: Added %{I*}.
12324
12325 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
12326
12327 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
12328
12329 2000-07-12 Mark Mitchell <mark@codesourcery.com>
12330
12331 * parse-scan.c: Remove.
12332
12333 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12334
12335 * class.c (set_super_info): Handled protected inner classes.
12336 (common_enclosing_context_p): Bail early if arguments aren't both
12337 inner classes.
12338 (get_access_flags_from_decl): Handle private and protected inner
12339 classes.
12340 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
12341 (CLASS_PROTECTED): Likewise.
12342 (struct lang_type): New bitfield `poic'.
12343 * parse.y (jdep_resolve_class): Call check_inner_class_access on
12344 inner classes only.
12345 (check_inner_class_access): Renamed arguments, added
12346 comments. Handles protected inner classes (fixes gcj/225)
12347 (not_accessible_p): Fixed comments. Avoid handling inner classes.
12348
12349 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12350
12351 * parse.y (resolve_qualified_expression_name): Verify qualified
12352 access to `this'. Fixes gcj/239.
12353
12354 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12355
12356 * jcf-write.c (generate_classfile): Don't install ConstantValue
12357 for null pointers.
12358
12359 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12360
12361 * parse.y (resolve_qualified_expression_name): Handle inner class
12362 access. Fixes gcj/256.
12363
12364 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12365
12366 * jcf-write.c (generate_classfile): Properly install the
12367 ConstantValue attribute and the initial value constant pool index
12368 on string constants.
12369 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
12370 class files.
12371
12372 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12373
12374 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
12375 construct.
12376 * parse.y (find_as_inner_class): Fixed typo.
12377 (do_resolve_class): Explore enclosing contexts when searching for
12378 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
12379 (check_inner_class_access): Check `decl' which can be null in case
12380 of previous errors.
12381
12382 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12383
12384 * java-tree.h (java_debug_context): Declared `extern'.
12385 (safe_layout_class): Likewise.
12386 * parse.y (resolve_field_access): Field must be `static' in order
12387 to be replaced by its initial value. Added comments.
12388 (find_applicable_accessible_methods_list): Fixed typo.
12389 (find_most_specific_methods_list): Methods found in innerclasses
12390 take over methods founds in the enclosing contexts.
12391 (java_complete_tree): Loosen restrictions on the type of DECLs
12392 that can be replaced by their initialization values.
12393 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
12394
12395 2000-07-05 Tom Tromey <tromey@cygnus.com>
12396
12397 * Make-lang.in (PARSE_DIR): New macro.
12398 (PARSE_RELDIR): Likewise.
12399 (PARSE_C): Likewise.
12400 (PARSE_SCAN_C): Likewise.
12401 ($(PARSE_C)): New target.
12402 ($(PARSE_SCAN_C)): Likewise.
12403 (SET_BISON): New macro.
12404 (BISONFLAGS): Likewise.
12405 (JAVABISONFLAGS): Likewise.
12406
12407 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
12408
12409 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12410 argument on the first pass for CNI as well as JNI.
12411 (print_method_info): Set up method name on the first pass only.
12412
12413 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12414
12415 * parse.y (parser_qualified_classname): Removed parameter
12416 `is_static'.
12417 (create_interface): Removed first passed parameter to
12418 parser_qualified_classname.
12419 (create_class): Likewise. Don't install alias on static
12420 innerclasses. Fixes gcj/275.
12421
12422 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12423
12424 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12425 debugable statement with empty_stmt_node. Fixes gcj/272
12426
12427 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12428
12429 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12430 gcj/271.
12431
12432 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12433
12434 * jcf-write.c (push_long_const): Appropriately cast short negative
12435 constant to jword.
12436
12437 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12438
12439 * parse.y (verify_constructor_super): Use loop variable
12440 `m_arg_type' initialized with `mdecl_arg_type'.
12441
12442 2000-06-29 Tom Tromey <tromey@cygnus.com>
12443
12444 * parse.y (resolve_field_access): Handle case where `type_found'
12445 is NULL.
12446
12447 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12448
12449 * expr.c (lookup_field): The same field can be found through two
12450 different interface. Don't declare it ambiguous in that case.
12451
12452 2000-06-27 Tom Tromey <tromey@cygnus.com>
12453
12454 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
12455 follows \r, then unget it at a lower level.
12456
12457 2000-06-26 Tom Tromey <tromey@cygnus.com>
12458
12459 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12460 java_complete_tree.
12461
12462 2000-06-25 Tom Tromey <tromey@cygnus.com>
12463
12464 * parse.y (for_statement): Wrap expression in a WFL if it is a
12465 constant. For PR gcj/268.
12466
12467 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12468
12469 * parse.y (do_resolve_class): Minor optimiztion in the package
12470 list search. Removed unnecessary test and return statement.
12471 (valid_ref_assignconv_cast_p): Order of arguments to
12472 enclosing_context_p fixed.
12473
12474 2000-06-24 Tom Tromey <tromey@cygnus.com>
12475
12476 * expr.c (lookup_field): Print error and return error_mark_node if
12477 field reference is ambiguous.
12478
12479 * parse.y (check_abstract_method_definitions): Also check if
12480 `other_method' is abstract.
12481
12482 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12483
12484 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
12485 classes.
12486 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
12487 (struct lang_type): New field `pic'.
12488 (CLASS_PRIVATE): New macro.
12489 * parse.y (check_inner_class_access): New function.
12490 (jdep_resolve_class): Call it.
12491
12492 2000-06-23 Tom Tromey <tromey@cygnus.com>
12493
12494 * parse.y (patch_incomplete_class_ref): Initialize the returned
12495 class. For PR gcj/260.
12496
12497 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12498
12499 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
12500
12501 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12502
12503 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12504 Java specific checks.
12505 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
12506 screened by DECL_P.
12507 * java-tree.def (CASE_EXPR): Marked 'e'.
12508 (DEFAULT_EXPR): Likewise.
12509 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
12510 screened by DECL_P.
12511 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12512 Java specific checks.
12513 (generate_bytecode_insns): Test try_block for BLOCK before using
12514 BLOCK_EXPR_BODY.
12515 * parse.y (build_wfl_wrap): Added `location' argument. Set
12516 EXPR_WFL_LINECOL accordingly.
12517 (dim_expr:): Wrap constants with WFLs.
12518 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
12519 (resolve_package): Check for `stmt' not being a BLOCK before
12520 building a debuggable statement with it.
12521 (make_qualified_primary): Added extra parameter to build_wfl_wrap
12522 invocation.
12523 (resolve_field_access): Make sure `decl' is a DECL before treating
12524 it as such.
12525 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12526 IDENTIFIER_NODE before treating it as such.
12527 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12528 treating it as such.
12529 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12530 to be applied only on non array types.
12531
12532 2000-06-16 Per Bothner <per@bothner.com>
12533
12534 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
12535 define in terms of DECL_RESULT, as that fails when --enable-checking.
12536
12537 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12538
12539 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
12540 types the same in comparison.
12541 (CHECK_OP): Add static prototype.
12542
12543 2000-06-13 Jakub Jelinek <jakub@redhat.com>
12544
12545 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12546 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12547 * parse.c: Rebuilt.
12548
12549 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12550
12551 * decl.c (create_primitive_vtable): Prototype.
12552
12553 * jcf-write.c (generate_bytecode_insns): Initialize variable
12554 `saved_context'.
12555
12556 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12557
12558 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
12559
12560 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12561 to track searched classes, and do not search the same class more than
12562 once. Call find_applicable_accessible_methods_list on immediate
12563 superclass, instead of search_applicable_method_list on all ancestors.
12564 Fix for PR gcj/238.
12565
12566 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
12567
12568 * parse.y (register_fields): Permit static fields in inner classes
12569 if they are final. Fix for PR gcj/255.
12570
12571 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12572
12573 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12574 * parse.y (find_in_imports): Returned type changed to void,
12575 leading comment fixed.
12576 (register_package): New function.
12577 (qualify_and_find): Likewise.
12578 (package_declaration:): Use `register_package'.
12579 (single_type_import_declaration:): Removed local variable
12580 `node'. Added missing `;' for consistency.
12581 (type_import_on_demand_declaration:): Use `chainon' to link new
12582 entries.
12583 (lookup_field_wrapper): Lookup local variables defined in outer
12584 contexts first.
12585 (java_complete_class): Don't reverse the list of imported on demand.
12586 (do_resolve_class): Reorganized. Removed local variable
12587 `original_name'. Call `qualify_and_find' with the current package
12588 name, invoke `find_in_imports_on_demand' right after. Call
12589 `qualify_and_find' with the packages we've seen so far. Fixed
12590 operations numbering in comments.
12591 (java_expand_class): Don't reverse `package_list'.
12592 (find_most_specific_methods_list): New local variables `abstract'
12593 and `candidates'. Use them to pick the right method.
12594
12595 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
12596
12597 * parse.y (check_modifiers_consistency): Don't subtract out
12598 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12599
12600 2000-06-04 Philipp Thomas <pthomas@suse.de>
12601
12602 * Makefile.in (INTLLIBS): New.
12603 (LIBS): Add above.
12604 (DEPLIBS): Ditto.
12605
12606 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12607
12608 * class.c (get_dispatch_table): Build the vtable dummy entry list
12609 element with a null purpose. Fixed leading comment.
12610 (build_dtable_decl): Build an accurate dtable type when appropriate
12611 and use it.
12612
12613 2000-06-02 Richard Henderson <rth@cygnus.com>
12614
12615 * lang.c (lang_get_alias_set): New.
12616
12617 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12618
12619 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12620 before using it as the accessed field.
12621
12622 2000-05-31 Tom Tromey <tromey@cygnus.com>
12623
12624 * java-tree.h (boolean_array_vtable, byte_array_vtable,
12625 char_array_vtable, short_array_vtable, int_array_vtable,
12626 long_array_vtable, float_array_vtable, double_array_vtable):
12627 Declare.
12628 * expr.c (get_primitive_array_vtable): New function.
12629 (create_primitive_vtable): New function.
12630 (java_lang_expand_expr): Enable code to statically generate
12631 arrays.
12632 * decl.c (init_decl_processing): Create primitive vtables.
12633 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12634 short_array_vtable, int_array_vtable, long_array_vtable,
12635 float_array_vtable, double_array_vtable): Define.
12636
12637 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
12638
12639 * java/parse.y (find_applicable_accessible_methods_list):
12640 Don't add an uninitialized value to the list.
12641
12642 2000-05-25 Tom Tromey <tromey@cygnus.com>
12643
12644 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12645 when trying to see if field's class should be initialized. Always
12646 initialize field's declaring class, not qualified class.
12647 For PR gcj/162.
12648
12649 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12650 `wfl_operator', to maybe_build_primttype_type_ref.
12651 Fixes PR gcj/235.
12652
12653 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
12654
12655 * parse.y (patch_method_invocation): Don't try to lookup methods
12656 in primitive types.
12657
12658 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12659
12660 * parse.y (resolve_field_access): Call the appropriate <clinit>
12661 before accessing the length of a static array. Craft a decl for
12662 the field while its time. Fixes PR gcj/129.
12663
12664 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12665
12666 * parse.y (resolve_package): Correctly set `*next' (was off by
12667 one.)
12668 (resolve_qualified_expression_name): Fixed comment.
12669
12670 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12671
12672 * jcf-parse.c (jcf_parse_source): Reset current_class and
12673 current_function_decl to NULL before parsing a new file.
12674
12675 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12676
12677 * parse.y (block_end:): If the collected block doesn't feature a
12678 statement, insert an empty statement.
12679
12680 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12681
12682 * parse.y (maybe_yank_clinit): New function.
12683 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12684 end of the list of methods belonging to a class.
12685 (java_complete_expand_method): Check whether <clinit> is really
12686 necessary and expand it accordingly.
12687
12688 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12689
12690 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12691 processed by the method's switch statement.
12692
12693 2000-05-19 Tom Tromey <tromey@cygnus.com>
12694
12695 * java-tree.h: Added init state enum.
12696 * decl.c (emit_init_test_initialization): Initialize class
12697 initialization check variable by looking at class' state.
12698
12699 2000-05-19 Tom Tromey <tromey@cygnus.com>
12700
12701 * java-tree.h (build_instanceof): Declare.
12702 (build_get_class): Declare.
12703 * parse.y (patch_binop): Use build_instanceof.
12704 * expr.c (build_instanceof): New function. If class is final,
12705 don't make a function call.
12706 (expand_java_INSTANCEOF): Use it.
12707 (build_get_class): New function.
12708
12709 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
12710
12711 * jcf-write.c (generate_classfile): Scan the source_file for
12712 slashes with the right pointer variable.
12713
12714 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
12715
12716 * lang.c (lang_decode_option): Update -Wunused flags by calling
12717 set_Wunused.
12718 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12719
12720 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
12721
12722 * check_init.c (check_init): Constify local char *.
12723 * class.c (push_class): Constify local char *.
12724 * java_tree.h: Update prototypes.
12725 * jcf-io.c (open_class): Constify filename parameter and
12726 return value.
12727 (find_class): Remove redundant string copy. Cast return from
12728 open_class.
12729 * jcf-parse.c (read_class, parse_class_file, yyparse):
12730 Constify local char *.
12731 * jcf-write.c (generate_bytecode_insns, generate_classfile):
12732 Constify local char *.
12733 * jcf.h (JCF): Constify filename and classname.
12734 (JCF_FINISH): Cast args to FREE to char * when appropriate.
12735 * lang.c (init_parse): Constify parameter and return value.
12736 * lex.c (java_get_line_col): Constify filename parameter.
12737 * parse.h: Constify parser_ctxt.filename. Update prototypes.
12738 * parse.y (java_parser_context_suspend,
12739 issue_warning_error_from_context, safe_layout_class): Constify
12740 local char *.
12741 * parse.c: Regenerate.
12742
12743 2000-05-08 Tom Tromey <tromey@cygnus.com>
12744
12745 * expr.c (build_jni_stub): Cache the result of
12746 _Jv_LookupJNIMethod.
12747
12748 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12749
12750 * decl.c (predef_filenames_size): Now 7.
12751 (predef_filenames): New seventh entry.
12752
12753 2000-05-04 Tom Tromey <tromey@cygnus.com>
12754
12755 * boehm.c (mark_reference_fields): Don't mark RawData fields.
12756 Keep track of when we've seen a reference field after a
12757 non-reference field.
12758 (get_boehm_type_descriptor): Handle case where we see
12759 non-reference fields but no trailing reference field.
12760 * decl.c (rawdata_ptr_type_node): Define.
12761 (init_decl_processing): Initialize rawdata_ptr_type_node.
12762 * java-tree.h (rawdata_ptr_type_node): Declare.
12763
12764 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12765
12766 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12767 specifiers in calls to fprintf.
12768
12769 2000-05-03 Andrew Haley <aph@cygnus.com>
12770
12771 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12772
12773 * javaop.h (WORD_TO_INT): New function.
12774 (IMMEDIATE_s4): Use WORD_TO_INT.
12775 * jcf.h (JPOOL_INT): Ditto.
12776
12777 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12778 separator.
12779
12780 2000-04-19 Tom Tromey <tromey@cygnus.com>
12781
12782 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12783 on native function.
12784 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12785 JNI methods.
12786 * expr.c (build_jni_stub): New function.
12787 * lang-specs.h: -fjni and -femit-class-file are incompatible.
12788 * parse.c: Rebuilt.
12789 * parse.y (java_complete_expand_methods): Expand a native method
12790 and call build_jni_stub if -fjni given.
12791 * lang-options.h: Document -fjni.
12792 * lang.c (flag_jni): New global.
12793 (lang_f_options): Added `jni' entry.
12794 * java-tree.h (soft_lookupjnimethod_node,
12795 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12796 Declare.
12797 (flag_jni): Declare.
12798 (build_jni_stub): Declare.
12799 (struct lang_decl): Added `native' flag.
12800 (METHOD_NATIVE): Redefined to use `native' field of lang specific
12801 structure.
12802 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12803 soft_jnipopsystemframe_node): New globals.
12804 (init_decl_processing): Set them. _Jv_InitClass only takes one
12805 argument.
12806
12807 * java-tree.def: Put into `C' mode.
12808
12809 2000-04-27 Tom Tromey <tromey@cygnus.com>
12810
12811 Fix for PR gcj/2:
12812 * expr.c (expand_invoke): Generate check to see if object pointer
12813 is null in nonvirtual invocation case.
12814 * java-tree.h (soft_nullpointer_node): Declare.
12815 * decl.c (soft_nullpointer_node): New global.
12816 (init_decl_processing): Initialize soft_nullpointer_node.
12817 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12818 or `private' methods.
12819 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12820
12821 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12822
12823 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12824 from <clinit>
12825
12826 2000-04-26 Tom Tromey <tromey@cygnus.com>
12827
12828 * zextract.c (find_zip_file_start): New function.
12829 (read_zip_archive): Use it.
12830
12831 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12832
12833 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12834
12835 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12836
12837 * class.c (common_enclosing_context_p): New function.
12838 * java-tree.h (common_enclosing_context_p): Added prototype.
12839 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12840 classes sharing an outer context with the current instance.
12841 * parse.y (build_access_to_thisn): Fixed leading comment.
12842 (verify_constructor_super): New local `supper_inner'. Skip
12843 enclosing context argument in the case of inner class constructors.
12844 (patch_method_invocation): Insert proper context as second
12845 parameter to pure inner class constructor super invocations.
12846
12847 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12848
12849 * parse.y (end_class_declaration): Reset the interface number
12850 counter.
12851
12852 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12853
12854 * parse.y (source_start_java_method): Deleted unnecessary code.
12855 (patch_method_invocation): Fixed comment.
12856
12857 2000-04-24 Robert Lipe <robertlipe@usa.net>
12858
12859 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12860
12861 2000-04-23 Tom Tromey <tromey@cygnus.com>
12862
12863 * boehm.c (mark_reference_fields): Use int_byte_position.
12864
12865 2000-04-22 Tom Tromey <tromey@cygnus.com>
12866
12867 * boehm.c (mark_reference_fields): Only call byte_position on
12868 non-static fields.
12869
12870 2000-04-22 Tom Tromey <tromey@cygnus.com>
12871
12872 * boehm.c (mark_reference_fields): Added `last_view_index'
12873 argument. Use DECL_FIELD_OFFSET to determine field's offset.
12874
12875 2000-04-20 Mo DeJong <mdejong@cygnus.com>
12876
12877 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12878 * parse.y (check_class_interface_creation): Fixed comments. Select
12879 permitted modifiers for (inner) interfaces. Changed error message
12880 to report rejected modifiers used with local classes.
12881
12882 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12883
12884 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12885 of directly inherited type considered in scope.
12886 * parse.y (do_resolve_class): Search inherited classes for inner
12887 classes.
12888
12889 2000-04-20 Tom Tromey <tromey@cygnus.com>
12890
12891 * parse.y (not_accessible_p): Use member's class, not current
12892 class, when doing inheritance check for protected reference.
12893 Fixes PR gcj/124.
12894
12895 2000-04-20 Jason Schroeder <shrode@subnature.com>
12896
12897 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12898
12899 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12900
12901 * parse.y (lookup_field_wrapper): Search for final local aliases.
12902 (resolve_expression_name): Let lookup_field_wrapper search for
12903 final local aliases. Force the value of `name' if one is found.
12904 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12905 an expression name. Fixed comments.
12906
12907 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12908
12909 * parse.y (yyerror): `msg' can be null, don't use it in that case.
12910
12911 2000-04-19 Tom Tromey <tromey@cygnus.com>
12912
12913 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12914
12915 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12916
12917 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12918
12919 2000-04-18 Tom Tromey <tromey@cygnus.com>
12920
12921 PR gcj/211:
12922 * gjavah.c (utf8_cmp): Changed return value.
12923 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
12924 result.
12925 (cxx_keywords): New global.
12926 (get_field_name): Handle new result of cxx_keyword_subst.
12927 (print_method_info): Likewise.
12928
12929 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
12930
12931 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12932 with a newline, for CNI.
12933 (print_stub_or_jni): Print a space or newline before method name for
12934 CNI as well as JNI.
12935 (print_cxx_classname): Don't write leading "::" in CNI stub method.
12936 (process_file): Include gcj/cni.h if generating CNI stubs.
12937
12938 2000-04-16 Tom Tromey <tromey@cygnus.com>
12939
12940 * gjavah.c (decompile_method): Use print_field_name.
12941 Fixes PR gcj/205.
12942
12943 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12944
12945 * parse.y (java_expand_classes): Reverse the package list once.
12946 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12947 reduction.
12948 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12949 the `==' and `!=' operators.
12950
12951 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12952
12953 * jcf-write.c (generate_bytecode_insns): At invocation time,
12954 always relate an interface method to the type of its selector.
12955
12956 2000-04-05 Tom Tromey <tromey@cygnus.com>
12957
12958 Fix for PR gcj/2:
12959 * expr.c (expand_invoke): Generate check to see if object pointer
12960 is null in nonvirtual invocation case.
12961 * java-tree.h (soft_nullpointer_node): Declare.
12962 * decl.c (soft_nullpointer_node): New global.
12963 (init_decl_processing): Initialize soft_nullpointer_node.
12964 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12965 or `private' methods.
12966 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12967
12968 2000-04-05 Tom Tromey <tromey@cygnus.com>
12969
12970 Fix for PR gcj/140:
12971 * parse.y (check_final_assignment): Recognize assignments to the
12972 `length' field of an array when generating class files.
12973
12974 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12975
12976 * class.c (decl_hash): Prototype removed.
12977 (decl_compare): Likewise.
12978
12979 2000-04-05 Tom Tromey <tromey@cygnus.com>
12980
12981 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12982 * parse.y (check_modifiers_consistency): Check for final/volatile
12983 clash. Fixes PR gcj/164.
12984
12985 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12986
12987 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12988 made global.
12989 (java_hash_compare_tree_node): Renamed from `decl_compare, made
12990 global.
12991 (add_method_1): Use `java_hash_hash_tree_node' and
12992 `java_hash_compare_tree_node'.
12993 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12994 (java_hash_compare_tree_node): Likewise.
12995 * parse.y (find_applicable_accessible_methods_list): Create,
12996 delete and use a hash table to remember already searched interfaces.
12997
12998 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
12999
13000 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13001 with latest entry.
13002
13003 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13004
13005 * boehm.c (mark_reference_fields, set_bit): Prototype.
13006 (set_bit): Un-ANSI-fy definition.
13007
13008 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13009 Prototype.
13010
13011 * decl.c (emit_init_test_initialization): Likewise.
13012
13013 * gjavah.c (jni_print_char): Likewise.
13014
13015 * parse.y (create_new_parser_context): Likewise.
13016
13017 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
13018
13019 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13020 patch missing hunk. Fixed indentation.
13021
13022 2000-03-30 Tom Tromey <tromey@cygnus.com>
13023
13024 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13025 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13026
13027 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13028
13029 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13030 when negative *before* using it as an array index.
13031 * ChangeLog: Fixed typo.
13032
13033 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13034
13035 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13036 to 0 when it reaches -1.
13037
13038 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13039
13040 * jcf-parse.c (get_constant): Properly cast `num' during the
13041 invocation of `add_double'.
13042 * jcf-write.c (push_long_const): Properly cast `lo' before
13043 comparing it to short bounds.
13044 * parse-scan.y (interface_declaration:): Rule re-arrange so that
13045 `interface_body:' is reduced after the current interface is
13046 pushed.
13047
13048 2000-03-26 Tom Tromey <tromey@cygnus.com>
13049
13050 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13051 Java-specific `-f' option.
13052
13053 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13054
13055 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13056 Adjust order of making types.
13057 Make bitsize_*_node values.
13058
13059 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13060
13061 * class.c (make_field_value): Use byte_position.
13062 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13063 (java_array_data_offset): Likewise.
13064 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13065 bzero call.
13066
13067 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13068
13069 * parse.y (check_abstract_method_definitions): New local
13070 `end_type_reached'. Make sure we also consider `end_type'.
13071 (java_check_abstract_method_definitions): Make sure we eventually
13072 consider `java.lang.Object'.
13073 (maybe_use_access_method): Don't use access method if not in the
13074 context of a pure inner class or if the method's context is right.
13075 (find_applicable_accessible_methods_list): New static flag
13076 `object_done'. Don't search abstract classes as interfaces. Fixed
13077 indentation. Fixed the `java.lang.Object' only search. Search
13078 class interface(s) first, then fully search enclosing contexts.
13079 (find_most_specific_methods_list): Pick the closest candidate when
13080 they're all abstract.
13081
13082 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13083
13084 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13085 properly initialize `finished_label'. Don't emit gotos for empty
13086 try statements.
13087
13088 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13089
13090 * except.c (emit_handlers): Clear catch_clauses_last.
13091
13092 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13093
13094 * parse.y (check_method_types_complete): New function.
13095 (create_class): Reset anonymous class counter only when seeing an
13096 non inner classe.
13097 (java_complete_class): JDEP_METHOD: Don't recompute signature
13098 if incomplete.
13099
13100 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13101
13102 * class.c (build_static_ref): Fixed indentation in comment.
13103 * java-tree.def (TRY_EXPR): Fixed typo in name.
13104 (CLASS_LITERAL): Likewise.
13105 * java-tree.h: (TYPE_DOT_CLASS): New macro.
13106 (struct lang_type): New field `dot_class'.
13107 * jcf-write.c (generate_bytecode_insns): Fixed error message.
13108 (generate_classfile): Method `class$' is synthetic.
13109 * parse.y (build_do_class_method): New function.
13110 (build_dot_class_method_invocation): Likewise.
13111 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13112 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13113 (qualify_ambiguous_name): Likewise.
13114 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13115 (build_try_statement): Fixed leading comment.
13116
13117 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13118
13119 * class.c (make_field_value): Properly handle sizes.
13120 (get_dispatch_vector): Use tree_low_cst and host_integerp.
13121 (layout_class_method): Count using trees.
13122 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13123 * expr.c (java_array_data_offset): Use int_bit_position.
13124 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13125 (build_invokevirtual): Use tree_low_cst and do computations with trees.
13126
13127 2000-03-16 Tom Tromey <tromey@cygnus.com>
13128
13129 * lang.c (flag_hash_synchronization): New global.
13130 (lang_f_options): Added `hash-synchronization'.
13131 * lang-options.h: Mention -fhash-synchronization.
13132 * java-tree.h (flag_hash_synchronization): Declare.
13133 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13134 hash table synchronization is disabled.
13135 * decl.c (init_decl_processing): Only push `sync_info' value when
13136 hash table synchronization is disabled.
13137 * class.c (make_class_data): Only push `sync_info' field when hash
13138 table synchronization is disabled. Removed dead code.
13139
13140 2000-03-16 Tom Tromey <tromey@cygnus.com>
13141
13142 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13143
13144 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13145
13146 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13147 classes.
13148 * parse.y (patch_method_invocation): Handle anonymous classes
13149 creation in static context.
13150
13151 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13152
13153 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13154 * parse.y (resolve_qualified_expression_name): Use it.
13155 (patch_method_invocation): Likewise.
13156
13157 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13158
13159 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13160 depending on the type of dependency which dictates what the
13161 current class is.
13162 (unresolved_type_p): Resolved types limited to the current class.
13163
13164 2000-03-15 Tom Tromey <tromey@cygnus.com>
13165
13166 * decl.c (init_decl_processing): Set type of `sync_info' to be
13167 pointer to Object.
13168
13169 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13170 Correctly compute bit number for current slot. Zero `high' and
13171 `low' in DS_LENGTH case. Don't skip inherited fields. Use
13172 mark_reference_fields.
13173 (mark_reference_fields): New function.
13174
13175 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13176
13177 * parse.y (register_incomplete_type): Fixed initialization of
13178 JDEP_ENCLOSING.
13179
13180 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13181
13182 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13183 static globals.
13184 (push_class_context, pop_class_context): New function.
13185 (class_body:): Call pop_class_context.
13186 (interface_body:): Likewise.
13187 (INNER_QUALIFIER): New macro.
13188 (report_class_declaration): Changed output format and use
13189 INNER_QUALIFIER. Call push_class_context.
13190
13191 2000-02-14 Andrew Haley <aph@cygnus.com>
13192
13193 * check-init.c (check_init): Add new cases for unary and binary
13194 tree nodes.
13195
13196 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13197
13198 * parse.y (resolve_package): Set `next' once a type name has been
13199 progressively discovered.
13200 (resolve_qualified_expression_name): Propagate resolution only if
13201 there are remaining qualifiers. Take into account `q' might have
13202 been cleared after re-qualification.
13203 * parse.y (patch_method_invocation): New local `resolved'.
13204 Section dealing with qualified expression rewritten to use
13205 resolve_field_access.
13206
13207 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13208
13209 * parse.h (PUSH_CPC): Fixed indentation.
13210 (DEBUG_CPC): New macro.
13211 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13212 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13213 * parse.y (class_body_declaration:): Use
13214 SET_CPC_INSTANCE_INITIALIZER_STMT.
13215 (method_declaration:): Check for null current_function_decl.
13216 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13217 (java_parser_context_pop_initialized_field): Better handling of
13218 empty lists.
13219 (maybe_make_nested_class_name): Mark nested class name as
13220 qualified when necessary.
13221 (end_class_declaration): Don't call java_parse_context_resume when
13222 one or more error occurred.
13223 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13224 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13225 SET_CPC_INITIALIZER_STMT.
13226 (method_header): Check for inner classes declaring static methods.
13227 (resolve_qualified_expression_name): Handle situation where `this'
13228 is implied.
13229
13230 2000-03-13 Hans Boehm <boehm@acm.org>
13231
13232 * typeck.c (build_prim_array_type): Correctly set the high word too.
13233
13234 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13235
13236 * parse.y (java_complete_expand_methods): Leave <clinit> out of
13237 ordinary methods.
13238 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13239 list of methods for interfaces.
13240
13241 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13242
13243 * parse.y (qualify_ambiguous_name): Properly handle expressions
13244 using `null'.
13245
13246 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13247
13248 * parse.y (check_final_assignment): Extended to process
13249 COMPOUND_EXPR.
13250 (patch_assignment): Have check_final_assignment called only once.
13251
13252 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13253
13254 * java-tree.h (IS_INIT_CHECKED): New flag.
13255 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13256 * parse.y (patch_string): Call force_evaluation_order on the
13257 completed string concatenation tree.
13258 * expr.c (force_evaluation_order): Call force_evaluation_order on
13259 function's arguments too.
13260
13261 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13262
13263 * decl.c (emit_init_test_initialization): Mark KEY as unused.
13264 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13265 (build_anewarray): Likewise.
13266 * parse.y (patch_newarray): Likewise.
13267 * parse.c: Regenerated.
13268
13269 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
13270
13271 * decl.c (init_decl_processing): Added new class fields `depth',
13272 `ancestors', and `idt' to class_type_node. Use
13273 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13274 * class.c (make_class_data): Push initial values for new fields.
13275 * java-tree.h: Updated prototype for `build_invokeinterface'.
13276 * expr.c (build_invokeinterface): Changed parameters to accept
13277 `method' tree. Calculate index of `method' in its declaring
13278 interface. Build call to _Jv_LookupInterfaceMethodIdx.
13279 (expand_invoke): Call `build_invokeinterface' with new parameters.
13280 * parse.y (patch_invoke): Call `build_invokeinterface' with new
13281 parameters.
13282
13283 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
13284
13285 * typeck.c (lookup_do): Search superinterfaces first
13286 when looking up an interface method. From Godmar Back
13287 <gback@cs.utah.edu>
13288
13289 2000-03-06 Tom Tromey <tromey@cygnus.com>
13290
13291 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13292
13293 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13294
13295 * java-tree.h (lookup_argument_method2): Declared.
13296 (safe_layout_class): Prototype moved from parse.h.
13297 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13298 * parse.y (java_check_regular_methods): Local `super_class' gone.
13299 Call lookup_argument_method2 instead of lookup_argument_method.
13300 Perform modifier match for methods found declared in implemented
13301 interfaces. Fixed indentation problem. Overriding/hiding error
13302 report to take place only for methods found in classes.
13303 * typeck.c (lookup_argument_method): Changed leading
13304 comment. Re-written by calling lookup_do.
13305 (lookup_argument_method2): New function.
13306 (lookup_java_method): Re-written by calling lookup_do.
13307 (lookup_do): New function.
13308
13309 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13310
13311 * check-init.c (check_init): Removed dead code. Handle (blank)
13312 final variables.
13313 * parse.y (declare_local_variables): New local `final_p', set it
13314 and use it to initialize LOCAL_FINAL.
13315 (check_final_assignment): Only check FIELD_DECLs.
13316
13317 2000-02-17 Tom Tromey <tromey@cygnus.com>
13318
13319 * Makefile.in (JAVA_OBJS): Added boehm.o.
13320 (boehm.o): New target.
13321 * Make-lang.in (JAVA_SRCS): Added boehm.c.
13322 * java-tree.h (flag_use_boehm_gc): Declare.
13323 (get_boehm_type_descriptor): Declare.
13324 * lang.c (lang_f_options): Added `use-boehm-gc'.
13325 (flag_use_boehm_gc): New global.
13326 * lang-options.h: Added -fuse-boehm-gc.
13327 * boehm.c: New file.
13328 * class.c (get_dispatch_table): If class uses a Boehm type
13329 descriptor, put it in the vtable.
13330 (make_class_data): Removed dead code.
13331
13332 2000-03-03 Per Bothner <per@bothner.com>
13333
13334 * decl.c (init_decl_processing): Initialize sizetype properly.
13335
13336 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13337
13338 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
13339 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
13340 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13341 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
13342 (jcf_parse): New local `current'. Load innerclasses seen in outer
13343 context being processed.
13344 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13345 * jcf-write.c (append_innerclasses_attribute): New function.
13346 (append_innerclasses_attribute_entry): Likewise.
13347 (get_access_flags): Handle static classes. Set anonymous and local
13348 classes to be private.
13349 (generate_classfile): Attribute count adjusted. Call
13350 append_innerclasses_attribute.
13351 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
13352 PURE_INNER_CLASS_TYPE_P.
13353 * parse.y (parser_qualified_classname): New parameter `is_static',
13354 produce non qualified name accordingly.
13355 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
13356 (create_interface): Added argument to parser_qualified_classname.
13357 (create_class): Added argument to parser_qualified_classname. Setup
13358 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
13359 (add_inner_class_fields): Fixed indentation.
13360 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
13361 (method_declarator): Fixed typo in comment.
13362 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
13363 (build_current_thisn): Likewise.
13364 (patch_method_invocation): Likewise.
13365
13366 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
13367
13368 * decl.c (current_function_decl): Move to toplev.c.
13369
13370 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13371
13372 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
13373 (DECL_BIT_INDEX): Use underlying representation.
13374 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
13375
13376 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13377
13378 * expr.c (build_java_ret): Pass proper type to size_binop.
13379
13380 2000-02-25 Anthony Green <green@cygnus.com>
13381
13382 * expr.c (build_class_init): Mark the decl to be ignored by
13383 check_init.
13384 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
13385 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
13386 * class.c (init_test_hash_newfunc): New function.
13387 (decl_hash): New function.
13388 (decl_compare): New function.
13389 * decl.c (emit_init_test_initialization): New function.
13390 (complete_start_java_method): Traverse the init test hashtable,
13391 calling emit_init_test_initialization.
13392 (always_initialize_class_p): Define.
13393 * expr.c (build_class_init): Use initialization tests when
13394 emitting class initialization code.
13395 (always_initialize_class_p): Declare.
13396 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13397 1.
13398 * java-tree.h: Include hash.h.
13399 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13400 (struct lang_decl): Add init_test_table field.
13401 (init_test_hash_entry): Define.
13402
13403 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13404
13405 * gjavah.c (main): Avoid using `argi' to report unimplemented
13406 options.
13407
13408 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13409
13410 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13411 initialize locals to avoid warnings. Local `exception_type' moved
13412 into if statement.
13413
13414 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13415
13416 * parse.y (resolve_expression_name): Use `orig' as a second
13417 argument to resolve_field_access.
13418 (resolve_field_access): Removed unnecessary code when dealing with
13419 static fields.
13420
13421 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13422
13423 * class.c (push_super_field): Don't push the field twice.
13424 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13425 * parse.h (java_reorder_fields): Prototyped.
13426 * parse.y (java_reorder_fields): New function.
13427 (java_layout_class): Simplified not to worry about re-ordering.
13428
13429 2000-02-23 Tom Tromey <tromey@cygnus.com>
13430
13431 * gjavah.c (print_name): In JNI case, correctly quote string.
13432 (print_method_info): Don't handle overrides in JNI mode.
13433
13434 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13435
13436 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13437 value type set to `boolean_type_node'.
13438
13439 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
13440
13441 * jcf-dump.c (main): Test for correct condition after
13442 output file creation.
13443
13444 2000-02-19 Anthony Green <green@cygnus.com>
13445
13446 * jcf-depend.c (add_entry): Fix test for first list entry.
13447
13448 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13449
13450 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13451 * constants.c (build_constants_constructor): Likewise.
13452
13453 2000-02-19 Anthony Green <green@cygnus.com>
13454
13455 * jcf-depend.c (add_entry): Add entries to the end of the list.
13456
13457 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
13458
13459 * decl.c (INT_TYPE_SIZE): Define if necessary.
13460 (expand_java_return): Handle the case of a native integer smaller
13461 than a JVM integer.
13462
13463 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
13464
13465 * gjavah.c (help): Use GCCBUGURL.
13466 * jv-scan.c (help): Likewise.
13467 * jcf-dump.c (help): Likewise.
13468
13469 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13470
13471 * jcf-write.c (generate_bytecode_insns): Don't generate empty
13472 `finally' clauses.
13473
13474 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13475
13476 * jcf-parse.c (load_class): Call `fatal' if no file containing
13477 the target class are found.
13478
13479 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
13480
13481 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
13482 lex.c, lex.h, and PARSE_H to...
13483 (parse.o, parse-scan.o): ...here, respectively.
13484
13485 * lex.c: Split out code that may trigger SIGFPE from yylex()
13486 to its own function.
13487 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
13488
13489 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13490
13491 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
13492
13493 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13494
13495 * parse.y (outer_field_access_p): Stop in time when outer contexts
13496 are exhausted.
13497 (resolve_qualified_expression_name): Properly qualify *everything*
13498 after a package.type to be resoled as expression names.
13499 (find_applicable_accessible_methods_list): Save/restore `class' to
13500 isolate it from a possible outer context search.
13501
13502 2000-02-15 Tom Tromey <tromey@cygnus.com>
13503
13504 * gjavah.c (jni_print_char): New function.
13505 (print_full_cxx_name): Use it.
13506 (decode_signature_piece): Likewise.
13507 (print_cxx_classname): Likewise.
13508
13509 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13510
13511 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
13512 version.o.
13513 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
13514
13515 * gjavah.c: Include version.h.
13516
13517 * jcf-dump.c: Likewise.
13518
13519 * jv-scan.c: Likewise.
13520
13521 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13522
13523 * parse.y (outer_field_access_fix): First parameter now a tree
13524 node. Check for assignment to final. First argument to
13525 build_outer_field_access_fix modified to accommodate prototype.
13526 (build_outer_field_access): Don't check for assignment to final
13527 here.
13528 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13529 possibly returned by outer_field_access_fix. Changed
13530 outer_field_access_fix's first argument.
13531 (check_final_assignment): $finit$'s context is OK.
13532 (patch_unaryop): Use node instead of its line/column value when
13533 calling outer_field_access_fix.
13534
13535 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13536
13537 * parse.y (interface_declaration:): No longer tagged
13538 <node>. Re-installed default action.
13539 (class_member_declaration:): Handle inner interfaces.
13540 (interface_member_declaration): Handle inner interfaces and
13541 classes.
13542 (create_interface): Push error if one seen. Suspend parsing
13543 context when processing an inner interface.
13544 (register_fields): Inner class static field limitations not to
13545 apply to inner interfaces.
13546
13547 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13548
13549 * jcf-parse.c (load_class): Update `java_error_count' when a
13550 class' file can't be found.
13551 (parse.y): Avoid (byte)code generation when errors seen.
13552
13553 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13554
13555 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
13556 decodes a valid node.
13557 (patch_binop): Handle TRUNC_DIV_EXPR.
13558
13559 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13560
13561 * parse.y (resolve_package): New local `acc'. Try to progressively
13562 build and guess a package and type name.
13563
13564 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13565
13566 * parse.y (find_applicable_accessible_methods_list): Load and
13567 layout the search class if necessary.
13568 (java_complete_tree): Keep to original type of the folded initial
13569 value.
13570
13571 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13572
13573 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13574 Generate error message if circularity is detected. New static
13575 local `list'.
13576 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
13577 * jcf-write.c (generate_bytecode_insns): Very simply handle
13578 SAVE_EXPR.
13579 * parse.y (java_check_circular_reference): Use
13580 `cyclic_inheritance_report' during report, if necessary.
13581 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13582 walking NEW_ARRAY_INIT twice.
13583
13584 2000-02-09 Tom Tromey <tromey@cygnus.com>
13585
13586 * parse.y (check_class_interface_creation): Allow inner classes to
13587 be `private' or `protected', check modifiers' consistency. Prevent
13588 block local classes from bearing any modifiers.
13589
13590 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13591
13592 * except.c (check_start_handlers): Re-add prototype lost in last
13593 patch.
13594 (maybe_start_try): Remove excess argument to `check_start_handlers'.
13595
13596 2000-02-09 Andrew Haley <aph@cygnus.com>
13597
13598 * decl.c (clear_binding_level): Remove excess initializer.
13599 (maybe_poplevels): Remove unused variable.
13600 (force_poplevels): Ditto.
13601 (struct binding_level): Add comment.
13602
13603 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13604
13605 * jcf-write.c (generate_classfile): Don't consider
13606 pre-initialization with reference value (use <clinit> instead.)
13607 * parse.y (java_fix_constructors): No generated constructor for
13608 interfaces.
13609 (build_outer_field_access): Removed debug message.
13610 (outer_field_expanded_access_p): Adapted to bytecode generation.
13611 (build_outer_field_access_method): Use fix_method_argument_names.
13612 (build_outer_method_access_method): Fixed indentation. Added
13613 comment. Handle access method generation for static and also void
13614 methods.
13615 (build_access_to_thisn): Inserted debug message.
13616 (maybe_build_thisn_access_method): Use fix_method_argument_names.
13617 (resolve_qualified_expression_name): Fixed comment.
13618 (not_accessible_p): Adapted to bytecode generation. Added comment.
13619 (patch_method_invocation): Added comment.
13620 (maybe_use_access_method): Fixed leading comment. Handle static
13621 methods.
13622 (java_complete_lhs): Don't shortcut handling of initialized upon
13623 declaration String type static fields when generating bytecode.
13624 (patch_unaryop): Handle outer field access when generating
13625 bytecode.
13626
13627 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
13628
13629 * java-tree.h (FIELD_THISN): New macro.
13630 * jcf-write.c (append_synthetic_attribute): New function.
13631 (generate_classfile): Set "Synthetic" attribute on this$<n>,
13632 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13633 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13634 this$<n> fields.
13635 (build_outer_field_access): Turned on access functions usage and
13636 generation when compiling to bytecode.
13637 (maybe_use_access_method): Likewise.
13638
13639 2000-01-25 Andrew Haley <aph@cygnus.com>
13640
13641 * java-except.h (struct eh_range): Add `expanded' field.
13642 (maybe_start_try): Add end_pc arg.
13643 (maybe_end_try): Ditto.
13644 * java-tree.h (force_poplevels): new function.
13645 * expr.c (expand_byte_code): Don't call maybe_start_try or
13646 maybe_end_try.
13647 * except.c (add_handler): Reset expanded.
13648 (expand_start_java_handler): Set expanded.
13649 (check_start_handlers): Don't expand a start handler that's
13650 already been expanded.
13651 (maybe_start_try): Add end_pc arg. Only expand a handler which
13652 ends after end_pc.
13653 (expand_end_java_handler): call force_poplevels.
13654 (force_poplevels): new function.
13655 * decl.c (binding_level): Add start_pc of binding level.
13656 (maybe_pushlevels): Call maybe_start_try when pushing binding
13657 levels.
13658 (maybe_poplevels): Call maybe_end_try when popping binding levels.
13659 (LARGEST_PC): Define.
13660 (clear_binding_level): Use LARGEST_PC.
13661
13662 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13663 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13664 (binding_depth, is_class_level, current_pc): new variables.
13665 (struct binding_level): ditto.
13666 (indent): new function.
13667 (push_jvm_slot): add debugging info.
13668 (maybe_pushlevels): ditto.
13669 (maybe_poplevels): ditto.
13670 (pushlevel): ditto.
13671 (poplevel): ditto.
13672 (start_java_method): ditto.
13673 (give_name_to_locals): comment only.
13674 * except.c (binding_depth, is_class_level, current_pc):
13675 new variables.
13676 (expand_start_java_handler): add debugging info.
13677 (expand_end_java_handler): ditto.
13678
13679 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13680
13681 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13682 (print_name_for_stub_or_jni, process_file): Constify a char*.
13683
13684 2000-02-03 Tom Tromey <tromey@cygnus.com>
13685
13686 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13687
13688 2000-01-31 Scott Bambrough <scottb@netwinder.org>
13689
13690 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13691 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13692 defined to be 1.
13693
13694 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13695
13696 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13697 * java-tree.h (TYPE_II_STMT_LIST): New macro.
13698 (struct lang_type): New field `ii_block'.
13699 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13700 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13701 * parse.h (struct parser_ctxt): New field `instance_initializers'.
13702 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13703 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13704 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13705 macros.
13706 * parse.y (add_instance_initializer): New function.
13707 (in_instance_initializer): New static global.
13708 (class_body_declaration:): Link instance initializer block.
13709 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13710 (array_creation_expression:): Remove unused local.
13711 (java_parser_context_push_initialized_field): Fixed leading
13712 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13713 CPC_INSTANCE_INITIALIZER_LIST.
13714 (java_parser_context_pop_initialized_field): Likewise.
13715 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13716 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13717 CPC_INITIALIZER_STMT.
13718 (fix_constructors): New local `class_type'. Use it. Call
13719 add_instance_initializer.
13720 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13721 (patch_return): Forbid return in instance initializers.
13722 (patch_throw_statement): Enforce exception handling in the context
13723 of instance initializers.
13724
13725 2000-02-03 Tom Tromey <tromey@cygnus.com>
13726
13727 * Make-lang.in (java.mostlyclean): Remove executables in
13728 `mostlyclean'.
13729
13730 2000-01-31 Scott Bambrough <scottb@netwinder.org>
13731
13732 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13733 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13734 (java_float_finite): Convert to use union Word from javaop.h.
13735 (java_double_finite): Convert to use union DWord from javaop.h.
13736
13737 2000-02-02 Tom Tromey <tromey@cygnus.com>
13738
13739 * gjavah.c (options): Added `jni' entry.
13740 (help): Document -jni.
13741 (flag_jni): New global.
13742 (process_file): Handle JNI output. Don't print text from
13743 -prepend, -add, etc, when generating stubs. Only remove `.class'
13744 suffix if it actually exists.
13745 (main): Create a `.c' file when run with `--jni --stubs'. Create
13746 correct output file name with `--jni'.
13747 (print_include): Mangle header name differently in JNI case.
13748 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13749 method list.
13750 (print_method_info): Handle JNI case. Put signature info into
13751 method name. Handle case when STREAM is NULL.
13752 (print_name_for_stub_or_jni): New function.
13753 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
13754 (print_cxx_classname): Handle JNI.
13755 (print_full_cxx_name): Likewise.
13756 (decode_signature_piece): Likewise.
13757 (overloaded_jni_method_exists_p): New function.
13758 (struct method_name): Added `signature' and `sig_length' fields.
13759 (HANDLE_END_FIELD): Do nothing in JNI mode.
13760
13761 2000-02-02 Tom Tromey <tromey@cygnus.com>
13762
13763 * jv-scan.c: Include version.c, <getopt.h>.
13764 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13765 (options): New array.
13766 (usage): New function.
13767 (version): New function.
13768 (main): Use getopt_long to parse command line.
13769 * jcf-dump.c: Include version.c, <getopt.h>.
13770 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13771 OPT_JAVAP): New macros.
13772 (options): New array.
13773 (usage): Return `void'. Changed message.
13774 (help): New function.
13775 (version): New function.
13776 (main): Use getopt_long_only to parse command line.
13777 * gjavah.c: Include <getopt.h>.
13778 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13779 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13780 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13781 (options): New array.
13782 (java_no_argument): Removed.
13783 (help): Updated with missing options.
13784 (main): Use getopt_long_only to parse command line.
13785 (usage): Changed message.
13786
13787 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13788
13789 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13790 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13791 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13792 * parse.y (array_creation_expression:): Handle anonymous arrays.
13793 (build_array_from_name): Don't set `ret_name' if null.
13794 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13795 (qualify_ambiguous_name): Likewise.
13796 (java_complete_expand_class): Likewise.
13797
13798 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13799
13800 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13801 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13802 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13803 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13804 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13805 AIPL_FUNCTION_COMPLETED_INVOCATION.
13806 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13807 AIPL_FUNCTION_INVOCATION_READY.
13808 (AIPL_FUNCTION_DECLARATION): New enum entry.
13809 * parse.y (reorder_static_initialized): New function.
13810 (java_parser_context_pop_initialized_field): Use it.
13811 (add_inner_class_fields): Use
13812 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13813 augmented. Install marker after last alias initializer, if any.
13814 (generate_finit): Fixed typo. Don't try to retain only the used
13815 fields.
13816 (method_header): Compute and set DECL_FUNCTION_NAP.
13817 (method_declarator): Fixed comment. Insert alias initializer in
13818 parameter list.
13819 (build_alias_initializer_parameter_list): Fixed leading
13820 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13821 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13822 (java_complete_expand_class): Code to retain only used aliases
13823 removed.
13824 (java_complete_expand_methods): New local `first_decl'. Generate
13825 $finit$ first, then expand the constructors, regular methods and
13826 <clinit>.
13827 (java_complete_expand_method): Don't report error on missing
13828 return statement if previously detected bogus.
13829 (fix_constructors): Don't patch constructor parameters list.
13830 (patch_method_invocation): Use new AIPL enum values. Reverse
13831 alias initializer list for anonymous classes.
13832
13833 2000-01-30 Anthony Green <green@redhat.com>
13834
13835 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13836 determine how many stack slots to pop.
13837
13838 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13839
13840 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13841 error handling/recovery.
13842 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13843
13844 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13845
13846 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13847 FIELD_LOCAL_ALIAS_USED): New macros.
13848 (DECL_FUNCTION_NAP): New macro.
13849 (struct lang_decl): New field `nap'.
13850 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13851 (struct lang_type): New fields `finit_stmt_list' and
13852 `clinit_stmt_list'.
13853 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13854 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13855 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13856 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13857 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13858 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13859 (BUILD_THROW): Macro line separator re-indented.
13860 * parse.y (end_class_declaration): New function.
13861 (maybe_generate_pre_expand_clinit): New name for
13862 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13863 pre-expand static fields.
13864 (maybe_generate_clinit): Function deleted.
13865 (check_for_static_method_reference): Prototype's parameter list
13866 indented.
13867 (generate_finit): New name for maybe_generate_finit. Changed
13868 leading comment. Function rewritten to use
13869 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13870 (build_alias_initializer_parameter_list): New function.
13871 (java_parser_context_pop_initialized_field): Likewise.
13872 (add_inner_class_fields): Likewise.
13873 (type_declaration:): Call end_class_declaration.
13874 (class_member_declaration:): Likewise.
13875 (formal_parameter_list:): Fixed typos.
13876 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13877 element. Improved error handling.
13878 (block_statement:): Call end_class_declaration.
13879 (anonymous_class_creation:): Likewise.
13880 (create_anonymous_class): Fixed comments.
13881 (create_class): Call add_inner_class_fields.
13882 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13883 (method_header): Use MARK_FINAL_PARMS.
13884 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13885 (method_declarator): Propagate final argument flag.
13886 (craft_constructor): New local `artificial'. Call
13887 build_alias_initializer_parameter_list. Use
13888 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13889 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13890 necessary.
13891 (complete_expand_class): Get rid of unused outer context local
13892 alias fields.
13893 (java_complete_expand_methods): Fixed leading
13894 comment. Generate/pre-expand <clinit> first. Changed method
13895 expansion order to regular, $finit$, constructors, <clinit>.
13896 (java_complete_expand_method): Set current_function_decl.
13897 (fix_constructors): Fix constructor parameter list to account for
13898 outer context local alias initializers.
13899 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13900 (resolve_expression_name): Lookup outer context local aliases. New
13901 local `access', use it.
13902 (patch_method_invocation): Patch inner class ctor invocation with
13903 outer context local aliases initialization values. $finit$
13904 invocation patching now includes things generated with
13905 build_alias_initializer_parameter_list.
13906 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13907 (build_super_invocation): Likewise.
13908 (patch_assignment): Changed comment.
13909
13910 2000-01-27 Andrew Haley <aph@cygnus.com>
13911
13912 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13913 (emit_if): Ditto.
13914 (emit_jsr): Ditto.
13915
13916 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13917
13918 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13919 concatenation.
13920 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13921
13922 * parse.y (register_fields): Don't pass a format specifier to
13923 OBSOLETE_MODIFIER_WARNING.
13924 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13925 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13926 specifier.
13927 (check_modifiers): Change function into a macro.
13928 (check_class_interface_creation): Pass a literal format string.
13929
13930 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13931
13932 * buffer.h: PROTO -> PARAMS.
13933 * check-init.c: Likewise.
13934 * class.c: Likewise.
13935 * constants.c: Likewise.
13936 * convert.h: Likewise.
13937 * decl.c: Likewise.
13938 * except.c: Likewise.
13939 * expr.c: Likewise.
13940 * gjavah.c: Likewise.
13941 * java-except.h: Likewise.
13942 * java-tree.h: Likewise.
13943 * jcf-depend.c: Likewise.
13944 * jcf-dump.c: Likewise.
13945 * jcf-parse.c: Likewise.
13946 * jcf-path.c: Likewise.
13947 * jcf-reader.c: Likewise.
13948 * jcf-write.c: Likewise.
13949 * jcf.h: Likewise.
13950 * jv-scan.c: Likewise.
13951 * jvgenmain.c: Likewise.
13952 * jvspec.c: Likewise.
13953 * lang.c: Likewise.
13954 * lex.c: Likewise.
13955 * lex.h: Likewise.
13956 * parse-scan.y: Likewise.
13957 * parse.h: Likewise.
13958 * parse.y: Likewise.
13959 * typeck.c: Likewise.
13960 * verify.c: Likewise.
13961 * xref.c: Likewise.
13962 * xref.h: Likewise.
13963 * zextract.c: Likewise.
13964 * zipfile.h: Likewise.
13965
13966 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13967
13968 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13969 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13970 * constants.c (build_constant_data_ref): Check for cached
13971 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13972 in TYPE_CPOOL_DATE_REF.
13973 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13974 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13975 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13976 (LOCAL_FINAL): New macro.
13977 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13978 constant pool -- don't try to reuse.
13979 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13980 TYPE_LANG_SPECIFIC.
13981 (find_in_current_zip): Use TYPE_JCF.
13982 * parse.h (java_check_final): Prototype removed.
13983 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13984 (maybe_create_class_interface_decl,
13985 check_class_interface_creation): Likewise.
13986 (java_expand_finals): Function removed.
13987 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13988 (block_statement:): Fixed comment.
13989 (anonymous_class_creation:): Likewise.
13990 (check_class_interface_creation): Reversed Jan 12, 2000 extra
13991 argument patch.
13992 (check_class_interface_creation): Loosened error report on (inner)
13993 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13994 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13995 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13996 argument patch.
13997 (create_interface): Likewise.
13998 (anonymous_class_counter): New static global.
13999 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14000 patch. Fixed comments.
14001 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14002 anonymous_class_counter when declaring a toplevel class.
14003 (craft_constructor): Fixed constructor name when handling
14004 anonymous classes. Anonymous class constructors to feature hidden
14005 this$<n> parameter.
14006 (java_fix_constructors): Added comment.
14007 (java_check_final): Function removed.
14008 (java_complete_expand_methods): Fixed comment. Don't generate
14009 class data, save its outgoing constant pool instead.
14010 (verify_constructor_super): Skip anonymous class constructor
14011 hidden this$<n> parameter.
14012 (java_expand_classes): New local `saved_ctxp'. Removed call to
14013 java_expand_finals and java_check_final. Expand anonymous class
14014 constructors. Generate class data.
14015 (build_super_invocation): Skip anonymous class hidden this$<n>
14016 parameter.
14017 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14018 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14019 (set_java_signature): Likewise.
14020
14021 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14022
14023 * gjavah.c: Delete ACC_VISIBILITY define.
14024 * jcf.h: Add ACC_VISIBILITY define.
14025 * parse.y: final: rule tagged <value>.
14026 (java_check_regular_methods): Use ACC_VISIBILITY define for
14027 default package access check.
14028 (local_variable_declaration_statement): Use final: rule.
14029
14030 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14031
14032 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14033 (final:): New rule.
14034
14035 2000-01-17 Tom Tromey <tromey@cygnus.com>
14036
14037 * gjavah.c (print_field_info): Allow non-static final fields.
14038
14039 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14040
14041 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14042 * parse.y (patch_anonymous_class): New function.
14043 (create_anonymous_class): Register incomplete type when the
14044 class/interface to extends/implement isn't known yet.
14045 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14046 (verify_constructor_super): Tuned error message.
14047
14048 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14049
14050 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14051 (ANONYMOUS_CLASS_P): New macro.
14052 (TYPE_SIGNATURE, TYPE_JCF): New macros.
14053 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14054 * parse.y (create_class): Added leading argument.
14055 (maybe_create_class_interface_decl,
14056 check_class_interface_creation): Likewise.
14057 (craft_constructor): New function.
14058 (verify_constructor_super): Added argument in prototype.
14059 (class_declaration:): Inserted leading argument.
14060 (for_begin:): Use FOR_LOOP_P.
14061 (anonymous_class_creation): Create WFL of the anonymous class to
14062 instantiate. Call build_new_invocation. Added comments.
14063 (check_class_interface_creation): Handle parameter `anonymous' in
14064 verbose mode class creation announce.
14065 (link_nested_class_to_enclosing): Exclude anonymous classes.
14066 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14067 anonymous class, even though they appear to have an enclosing
14068 context.
14069 (create_interface): Pass extra argument to
14070 check_class_interface_creation.
14071 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14072 (create_class): Call check_class_interface_creation and
14073 maybe_create_class_interface_decl with extra new argument. Don't
14074 add private this$<n> to anonymous classes.
14075 (method_declarator): Insert hidden this$<n> to anonymous class
14076 constructors.
14077 (java_fix_constructors): Deleted code creating default
14078 constructor. Call craft_constructor instead.
14079 (java_check_regular_methods): Set `saw_constructor' to 1 for
14080 anonymous classes.
14081 (fix_constructors): Pass extra argument to verify_constructor_super.
14082 (verify_constructor_super): New local `sdecl', use it. Search for
14083 matching constructor (possibly featuring arguments) in super
14084 class.
14085 (lookup_method_invoke): Craft constructor according to arguments
14086 list when dealing with anonymous class constructors.
14087 (build_super_invocation): Pass arguments to anonymous class super
14088 constructors.
14089 (search_loop): Use FOR_LOOP_P.
14090 (labeled_block_contains_loop_p): Likewise.
14091
14092 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14093
14094 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14095 (enclosing_context_p): New function.
14096 (get_access_flags_from_decl): Handle CLASS_STATIC.
14097 (maybe_layout_super_class): Extra first argument passed to
14098 do_resolve_class.
14099 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14100 ID_INIT_P.
14101 * decl.c (access0_identifier_node): New global.
14102 (init_decl_processing): access0_identifier_node initialized.
14103 (pushdecl): Set DECL_CONTEXT only on non type decls.
14104 * expr.c (lookup_field): Lookup inner class fields in enclosing
14105 contexts.
14106 (expand_invoke): Use ID_INIT_P.
14107 (expand_java_field_op): Use DECL_CLINIT_P.
14108 * java-tree.def (CLASS_LITERAL): New tree code.
14109 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14110 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14111 (struct lang_decl): New field `inner_access'.
14112 (enclosing_context_p): Prototyped.
14113 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14114 ID_CLINIT_P): New macros.
14115 (CLASS_STATIC): New macro.
14116 (CLASS_ACCESS0_GENERATED_P): New macro.
14117 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14118 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14119 INNER_CLASS_P): New macros.
14120 (DECL_INNER_CLASS_LIST): New macro.
14121 * jcf-parse.c (yyparse): Avoid the use of ANSI string
14122 concatenation.
14123 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14124 the shift value to int. Fixed typo in comment.
14125 * lex.c (inst_id, wpv_id): Initialize.
14126 * mangle.c (unicode_mangling_length): Take `$' into account.
14127 * parse.h (DRECOVER, RECOVER): Terminate properly.
14128 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14129 (typedef struct _jdep): New field `enclosing'.
14130 (JDEP_ENCLOSING): New macro.
14131 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14132 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14133 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14134 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14135 GET_ENCLOSING_CPC_CONTEXT): New macros.
14136 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14137 (do_resolve_class): Added extra argument in prototype.
14138 * parse.y (resolve_class): Added extra argument in prototype.
14139 (maybe_create_class_interface_decl): Likewise.
14140 (maybe_use_access_method, build_wfl_wrap): New functions.
14141 (java_complete_expand_classes, java_complete_expand_class):
14142 Likewise.
14143 (java_parser_context_push_initialized_field,
14144 java_parser_context_suspend, java_parser_context_resume):
14145 Likewise.
14146 (maybe_make_nested_class_name, make_nested_class_name,
14147 set_nested_class_simple_name_value,
14148 link_nested_class_to_enclosing, find_as_inner_class,
14149 find_as_inner_class_do, check_inner_class_redefinition,
14150 build_thisn_assign, build_current_thisn, build_access_to_thisn,
14151 maybe_build_thisn_access_method, build_outer_field_access,
14152 build_outer_field_access_methods, build_outer_field_access_expr,
14153 build_outer_method_access_method, build_new_access_id,
14154 build_outer_field_access_method, outer_field_access_p,
14155 outer_field_expanded_access_p, outer_field_access_fix,
14156 build_incomplete_class_ref, patch_incomplete_class_ref,
14157 create_anonymous_class): Likewise.
14158 (inst_id, wpv_id): New static global variables.
14159 (synchronized:): New rule, tagged <node>.
14160 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14161 rules.
14162 (anonymous_class_creation:): New rule, tagged <node>.
14163 (NEW_TK): Tagged <node>.
14164 (type_literals, array_type_literal): New rules, tagged <node>.
14165 (class_declaration:): Removed action when reducing by class_body:
14166 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14167 using GET_CPC in sub-rules.
14168 (class_member_declaration): Handle inner classes.
14169 (method_declaration): When reducing method_header:, reset
14170 current_function_decl when appropriate.
14171 (method_declarator:): Set the number of formal parameter to 0 for
14172 method declared without arguments.
14173 (constructor_declarator:): Likewise.
14174 (static_initializer:): List of elements kept in a list.
14175 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14176 use of the keyword `static' for type declarations.
14177 (block_statement:): Handle inner class declarations.
14178 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14179 type qualified `this'.
14180 (class_instance_creation_expression): Use anonymous_class_creation:
14181 to handle inner class instances creation. Handle qualified `new'.
14182 (something_dot_new): Added appropriate actions.
14183 (create_new_parser_context): New function.
14184 (java_push_parser_context, java_parser_context_save_global,
14185 java_parser_context_suspend): Use create_new_parser_context.
14186 (check_modifiers): Changed leading comment.
14187 (check_class_interface_creation): Handle interclasses.
14188 (add_superinterfaces): Fixed comment.
14189 (create_interface): Build qualified name from the raw_name instead
14190 of its matching WFL. Push the initialized fields list. raw_name added
14191 as an extra argument to maybe_create_class_interface_decl.
14192 (create_class): Build qualified name from the raw_name instead of
14193 its matching WFL. Removed assignment to current_parsed_class_un.
14194 Call PUSH_ERROR before returning an error. Suspend the current
14195 parser context when processing an inner class. Push the
14196 initialized fields list. raw_name added as an extra argument to
14197 maybe_create_class_interface_decl. Add the private this$<n>
14198 field.
14199 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14200 (register_fields): Get the class type from GET_CPC and handle
14201 previous errors. Added code to handle the creation of static
14202 fields in inner classes. Initialized fields initialization
14203 statements kept in a list of lists.
14204 (maybe_generate_finit): Initialized fields initialization
14205 statements kept in a list of lists. Use GET_CPC.
14206 (maybe_generate_clinit): Likewise.
14207 (method_header): Use GET_CPC and GET_CPC_UN.
14208 (parser_qualified_classname): Handle inner classes.
14209 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14210 (java_fix_constructors): Hide pointer to enclosing context
14211 instance in constructor list when dealing with inner classes.
14212 (jdep_resolve_class): Call resolve_class with extra first argument
14213 JDEP_ENCLOSING.
14214 (resolve_class): Add enclosing context as a first extra argument
14215 to do_resolve_class.
14216 (do_resolve_class): Call find_as_inner_class. Handle WFLs
14217 properly.
14218 (resolve_no_layout): Extra argument added to resolve_class
14219 invocation.
14220 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14221 (java_get_real_method_name): Use GET_CPC_UN.
14222 (check_abstract_method_definitions): Use DECL_CLINIT_P.
14223 (java_check_abstract_methods): Handle static method declared in
14224 inner classes by an error.
14225 (java_check_regular_methods): Use DECL_CLINIT_P.
14226 (source_start_java_method): Also set DECL_MAX_LOCALS.
14227 (create_artificial_method): Call java_parser_context_save_global
14228 and java_parser_context_restore_global instead of saving/restoring
14229 the context by hand.
14230 (expand_start_java_method): Improved verbose mode message.
14231 (java_complete_expand_methods): Fixed leading comment. Use
14232 DECL_CLINIT_P.
14233 (fix_constructors): Added assignment to this$<n> if necessary.
14234 (java_expand_classes): Call java_complete_expand_classes instead
14235 of java_complete_expand_methods.
14236 (make_qualified_primary): Simplified.
14237 (merge_qualified_name): Optimized for missing left or right parts.
14238 (resolve_expression_name): Handle access to outer class fields from
14239 interclasses.
14240 (resolve_qualified_expression_name): New macro
14241 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14242 classes. Report error on non appropriate qualification of
14243 `new'. Handle qualified `this'.
14244 (not_accessible_p): Allow access to outer class private fields from
14245 inner classes.
14246 (patch_method_invocation): Handle method invocations through
14247 access methods and inner class constructor invocations.
14248 (find_applicable_accessible_methods_list): Search enclosing
14249 contexts of an inner class.
14250 (search_applicable_methods_list): Fixed typo.
14251 (argument_types_convertible): Handle inner class constructors'
14252 hidden outer context reference argument.
14253 (qualify_ambiguous_name): Handle qualified `this'.
14254 (java_complete_lhs): Handle use of field accessed through
14255 artificial access methods in various cases of assignments. Handle
14256 CLASS_LITERAL node.
14257 (check_final_assignment): Use DECL_CLINIT_P.
14258 (valid_ref_assignconv_cast_p): Handle the destination being an
14259 enclosing context of the source.
14260 (patch_unaryop): Handle use of field accessed through artificial
14261 access methods.
14262 (patch_return): Use DECL_CLINIT_P.
14263 (patch_throw_statement): Use DECL_CLINIT_P.
14264 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14265 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
14266 ID_INIT_P.
14267
14268 2000-01-16 Anthony Green <green@cygnus.com>
14269
14270 * parse.y (build_string_concatenation): Only use
14271 StringBuffer(String) shortcut if String arg is constant.
14272
14273 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14274
14275 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14276 the shift value to int. Fixed typo in comment.
14277
14278 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
14279
14280 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14281 * jcf-write.c: Likewise.
14282 * parse.y: Likewise.
14283 * parse.c: Regenerate.
14284
14285 2000-01-09 Anthony Green <green@cygnus.com>
14286
14287 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14288 bytecodes in the correct order.
14289
14290 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14291
14292 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14293
14294 2000-01-06 Anthony Green <green@cygnus.com>
14295
14296 * expr.c (java_lang_expand_expr): Switch to permanent obstack
14297 before building constant array decl.
14298
14299 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
14300
14301 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
14302 method invocation and typo in conditional expression.
14303 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
14304 the appropriate NOTE_POP.
14305 * parse.y (patch_binop): Shift value mask to feature the right
14306 type.
14307
14308 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14309
14310 * class.c (assume_compiled, assume_compiled_node): Add static
14311 prototype.
14312 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
14313
14314 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
14315
14316 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
14317
14318 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
14319 to `__modifier' to avoid stringifying it.
14320
14321 * parse.y (verify_constructor_circularity): Don't call a variadic
14322 function with a non-literal format string.
14323 (java_check_abstract_methods): Move unreachable code inside
14324 `continue' statement.
14325 (lookup_method_invoke): Call xstrdup, not strdup.
14326
14327 * expr.c (expand_java_field_op): Avoid the use of ANSI string
14328 concatenation.
14329
14330 * jcf-parse.c (yyparse): Likewise.
14331
14332 * jv-scan.c (main): Likewise.
14333
14334 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14335
14336 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
14337 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14338 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
14339 concatenation.
14340
14341 * parse.y (synchronized, variable_redefinition_error,
14342 check_class_interface_creation, create_interface, create_class,
14343 method_header, finish_method_declaration,
14344 check_modifiers_consistency, method_declarator,
14345 complete_class_report_errors, check_abstract_method_definitions,
14346 java_check_regular_methods, check_throws_clauses,
14347 java_check_abstract_methods, read_import_dir,
14348 check_pkg_class_access, declare_local_variables, fix_constructors,
14349 cut_identifier_in_qualified, resolve_expression_name,
14350 resolve_qualified_expression_name, patch_method_invocation,
14351 java_complete_lhs, patch_assignment, try_builtin_assignconv,
14352 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
14353 patch_exit_expr, patch_exit_expr, patch_switch_statement,
14354 patch_try_statement, patch_synchronized_statement,
14355 patch_throw_statement, check_thrown_exceptions,
14356 patch_conditional_expr): Likewise.
14357
14358 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14359
14360 * Makefile.in (LIBDEPS): Added gcc's errors.o
14361 (../jcf-dump$(exeext):): Link with gcc's errors.o
14362 (../gcjh$(exeext):): Likewise.
14363 * expr.c (expand_java_NEW): Layout the entire target type instead of
14364 laying out its methods only.
14365 (lookup_field): Layout the class after having loaded it.
14366 * java-tree.h (java_debug_context): Declared.
14367 * jcf-io.c (toplev.h): Included.
14368 (find_class): Removed assignment to jcf's outofsynch
14369 field. Force source file to be read if newer than its matching
14370 class file. Tweaked debug messages.
14371 * jcf-parse.c (jcf_out_of_synch): Deleted.
14372 (read_class): Call to jcf_out_of_synch removed.
14373 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
14374 (jcf_out_of_synch): Prototype deleted.
14375 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
14376 `deprecated' and `class_err': integer turned into bit-fields.
14377 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
14378 * parse.y (package_list): New global.
14379 (package_declaration:): Record newly parsed package name.
14380 (extra_ctxp_pushed_p): Static global deleted.
14381 (java_parser_context_save_global): Create buffer context for the
14382 purpose of saving globals, if necessary.
14383 (java_parser_context_restore_global): Pop context pushed for the
14384 purpose of saving globals, if necessary.
14385 (java_debug_context_do): New prototype and function.
14386 (java_debug_context): Likewise.
14387 (do_resolve_class): Use already parsed package names to qualify
14388 and lookup class candidate.
14389 (java_pre_expand_clinit): Removed unnecessary local variable.
14390
14391 1999-12-17 Tom Tromey <tromey@cygnus.com>
14392
14393 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
14394 fixes PR gcj/119.
14395 (process_file): Use `\n\' at end of each line in string.
14396
14397 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14398
14399 * expr.c (expand_invoke): Layout the loaded class before
14400 attempting to use it.
14401 (expand_java_field_op): Allow final field assignments to take
14402 place in $finit$.
14403 * typeck.c (convert): Return error_mark_node if expr is null.
14404
14405 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14406
14407 * class.c (class_depth): Return -1 if the class doesn't load
14408 properly.
14409 * expr.c (can_widen_reference_to): Check for errors during depth
14410 computation and return 0 accordingly.
14411 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14412 create default constructors and add an other error check.
14413 * parse.h (java_fix_constructors): Prototyped.
14414 * parse.y (java_pre_expand_clinit): Likewise.
14415 (build_super_invocation): Re-prototyped to feature one argument.
14416 (java_check_circular_reference): Directly use `current'.
14417 (java_fix_constructors): New function.
14418 (java_check_regular_methods): Don't create default constructors
14419 here, but abort if none were found.
14420 (java_complete_expand_methods): Pre-process <clinit> calling
14421 java_pre_expand_clinit.
14422 (java_pre_expand_clinit): New function.
14423 (fix_constructors): build_super_invocation invoked with the
14424 current method declaration as an argument.
14425 (build_super_invocation): Use the context of the processed method
14426 decl argument instead of current_class.
14427 * typeck.c (lookup_java_method): Take WFLs in method names into
14428 account.
14429
14430 1999-12-14 Per Bothner <per@bothner.com>
14431
14432 * class.c (make_class_data): flag_keep_inline_functions to keep
14433 private methods in the method array.
14434
14435 1999-12-15 Anthony Green <green@cygnus.com>
14436
14437 * check-init.c (check_init): Take into account both types of
14438 `throw's when checking for uninitialized variables.
14439
14440 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14441
14442 * parse.y (java_complete_lhs): Force conversion of array
14443 dimensions to int_type_node, that's what runtime's ABI expects.
14444
14445 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14446
14447 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
14448 operand of a WFL, until the Java front-end gets fixed with regard
14449 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
14450
14451 1999-12-10 Andrew Haley <aph@cygnus.com>
14452
14453 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14454 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14455 expr.c (build_java_athrow): Add support for sjlj-exceptions.
14456 java-tree.h: Ditto.
14457 jcf-write.c: Ditto.
14458
14459 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
14460
14461 * expr.c (java_lang_expand_expr): Switch to permanent obstack
14462 before calling expand_eh_region_start and expand_start_all_catch.
14463 * except.c (expand_start_java_handler): Switch to permanent
14464 obstack before calling expand_eh_region_start.
14465 (expand_end_java_handler): Switch to permanent obstack before
14466 calling expand_start_all_catch.
14467
14468 1999-12-5 Anthony Green <green@cygnus.com>
14469
14470 * decl.c (init_decl_processing): Mark throw_node as a noreturn
14471 function with side effects.
14472 (init_decl_processing): Mark all memory allocating DECLs with
14473 DECL_IS_MALLOC.
14474
14475 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14476
14477 * except.c (expand_end_java_handler): Call
14478 expand_resume_after_catch and end_catch_handler.
14479
14480 1999-11-30 Anthony Green <green@cygnus.com>
14481
14482 * verify.c (verify_jvm_instructions): Create new return label
14483 chain if non existent (don't rely on the verified state of the jsr
14484 target.)
14485
14486 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14487
14488 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
14489 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
14490
14491 * parse.y (patch_assignment): Removed bogus final class test on
14492 lhs when checking on whether to emit an ArrayStoreException runtime
14493 check.
14494 * expr.c (expand_java_arraystore): Likewise.
14495
14496 1999-11-28 Anthony Green <green@cygnus.com>
14497
14498 * decl.c (find_local_variable): Reuse single slot decls when
14499 appropriate.
14500
14501 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14502
14503 * jcf-parse.c (saw_java_source): Global variable removed.
14504 (read_class): Don't use `saw_java_source'. Added extra braces.
14505 (yyparse): Code setting `saw_java_source' removed.
14506
14507 1999-11-24 Mark Mitchell <mark@codesourcery.com>
14508
14509 * except.c (emit_handlers): Zero catch_clauses after emitting them.
14510
14511 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14512
14513 * verify.c (merge_type_state): Non verified subroutines being
14514 considered more than once to trigger passive type merge.
14515
14516 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14517
14518 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
14519 in case of error. Error message tuned.
14520
14521 1999-11-21 Anthony Green <green@cygnus.com>
14522
14523 * constants.c (find_methodref_index): Unwrap method names before
14524 inserting them in the constant pool.
14525
14526 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14527
14528 * class.c (assume_compiled_node): New typedef.
14529 (assume_compiled_tree): New static data.
14530 (find_assume_compiled_node): New function.
14531 (add_assume_compiled): New function.
14532 (assume_compiled): New function.
14533 * class.c (make_class_data): Use assume_compiled.
14534 (is_compiled_class): Use assume_compiled.
14535
14536 * java-tree.h (add_assume_compiled): Declare.
14537
14538 * lang.c (lang_decode_option): Parse new options.
14539
14540 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14541
14542 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
14543 int_type_node: that's what `_Jv_AllocObject' expects.
14544
14545 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14546
14547 * parse.y (lookup_method_invoke): Use lang_printable_name to
14548 reliably build the type name during error report. Fixes PR gcj/97.
14549
14550 1999-11-09 Tom Tromey <tromey@cygnus.com>
14551
14552 * jcf-path.c: Include <sys/stat.h>.
14553 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
14554 (DIR_UP): New macro.
14555
14556 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14557
14558 * parse.y (source_end_java_method): Resume permanent allocation,
14559 reversing Apr 27 1998 patch.
14560 (patch_string_cst): Pop obstacks after having pushed the permanent
14561 ones.
14562
14563 1999-11-05 Tom Tromey <tromey@cygnus.com>
14564
14565 * class.c (finish_class): Emit inlined methods if any native
14566 methods exist in the class. Fixes PR gcj/85.
14567
14568 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
14569
14570 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14571 (qualify_ambiguous_name): Likewise.
14572
14573 1999-11-03 Godmar Back <gback@cs.utah.edu>
14574
14575 * typeck.c: (lookup_java_method): search all inherited
14576 interfaces when looking up interface method.
14577
14578 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14579
14580 * parse.y (method_header:): Issue error message for rule `type
14581 error'.
14582 (synchronized:): Error report when not using synchronized.
14583
14584 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14585
14586 * parse.y (resolve_qualified_expression_name): Prevent `this' from
14587 being used before the superclass constructor has been called.
14588 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14589 instead of `CALL_THIS_CONSTRUCTOR_P'.
14590
14591 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
14592
14593 * check-init.c: Fix typo in comment.
14594
14595 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14596
14597 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14598 and final method.
14599
14600 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14601
14602 * parse.y (expression_statement:): Call function to report
14603 improper invocation of a constructor.
14604 (parse_ctor_invocation_error): New function.
14605
14606 1999-10-26 Mark Mitchell <mark@codesourcery.com>
14607
14608 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14609 remember_end_note.
14610
14611 1999-10-21 Tom Tromey <tromey@cygnus.com>
14612
14613 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14614 in generated `main'.
14615
14616 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
14617
14618 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14619 (qualify_ambiguous_name): Likewise.
14620
14621 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14622
14623 * parse.y (java_complete_tree): fold_constant_for_init to work on
14624 permanent_obstack.
14625 (java_complete_lhs): Likewise.
14626 (array_constructor_check_entry): Complete an initializer element
14627 on permanent_obstack.
14628
14629 1999-10-19 Tom Tromey <tromey@cygnus.com>
14630
14631 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14632 From Mike Moreton <mike@pillim.demon.co.uk>.
14633
14634 1999-10-15 Greg McGary <gkm@gnu.org>
14635
14636 * java-tree.h (flag_bounds_check): Remove extern decl.
14637 * lang.c (flag_bounds_check): Remove global variable.
14638 (lang_f_options): Remove "bounds-check" entry.
14639 (lang_init_options): Default flag_bounds_check to "on".
14640
14641 1999-10-14 Tom Tromey <tromey@cygnus.com>
14642
14643 * jvgenmain.c (usage): New function.
14644 (main): Use it. Also, handle `-D' options.
14645 * jvspec.c (lang_specific_driver): Recognize -D.
14646 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14647
14648 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14649
14650 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14651
14652 * jcf-dump.c (print_constant, disassemble_method): Don't call a
14653 variadic function with a non-literal format string.
14654
14655 * parse-scan.y (report_main_declaration): Likewise.
14656
14657 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14658
14659 * parse.y (read_import_dir, patch_assignment, patch_binop,
14660 patch_array_ref): Likewise.
14661
14662 * typeck.c (build_java_array_type): Likewise.
14663
14664 * verify.c (verify_jvm_instructions): Likewise.
14665
14666 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14667
14668 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14669
14670 1999-10-07 Anthony Green <green@cygnus.com>
14671
14672 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14673 where CHECK_PUT may fail for valid reasons.
14674
14675 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14676 UNSAFE_PUTN): New macros.
14677
14678 1999-10-04 Tom Tromey <tromey@cygnus.com>
14679
14680 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14681 well. Fixes Java PR gcj/59.
14682 * parse-scan.y (yyerror): Report errors.
14683
14684 1999-09-24 Glenn Chambers <GChambers@provsol.com>
14685
14686 * decl.c (insert_block): Remove unconditional `abort'.
14687
14688 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
14689
14690 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
14691 FUNCTION_CODE now of type int. All callers changed.
14692 Set the builtin's DECL_BUILT_IN_CLASS.
14693
14694 1999-09-23 Tom Tromey <tromey@cygnus.com>
14695
14696 * jvspec.c (lang_specific_driver): Don't read spec file if
14697 -fsyntax-only given.
14698
14699 1999-09-22 Tom Tromey <tromey@cygnus.com>
14700
14701 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14702
14703 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14704 (WORDS_TO_LONG): Likewise.
14705 (WORDS_TO_DOUBLE): Likewise.
14706
14707 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14708
14709 * jcf-write.c (RELOCATION_VALUE_0): New macro.
14710 (RELOCATION_VALUE_1): Likewise.
14711 (emit_iinc, emit_reloc, push_constant1, push_constant2,
14712 push_in_const, push_long_const): Prototyped.
14713 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14714 (push_constant2): Likewise.
14715 (push_int_const): Cast find_constant1's integer arguments to `jword'.
14716 (find_constant_wide): Cast find_constant2's integer arguments to
14717 `jword'.
14718 (find_constant_index): Cast find_constant2's and find_constant2's
14719 integer arguments to `jword'.
14720 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14721 (emit_switch_reloc): Use RELOCATION_VALUE_0.
14722 (emit_if): Use RELOCATION_VALUE_1.
14723 (emit_goto): Likewise.
14724 (emit_jsr): Likewise.
14725 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14726 argument to push_long_const to HOST_WIDE_INT.
14727
14728 1999-09-15 Andreas Schwab <schwab@suse.de>
14729
14730 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14731
14732 1999-09-20 Nick Clifton <nickc@cygnus.com>
14733
14734 * lang.c (lang_decode_option): Extend comment.
14735
14736 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14737
14738 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14739 instead of fndecl.
14740
14741 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14742
14743 * gjavah.c (get_field_name, print_method_info, print_include,
14744 add_namelet): Use xmalloc, not malloc.
14745
14746 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
14747 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14748 NULL pointer.
14749
14750 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14751
14752 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14753
14754 * jcf-path.c (add_entry): Likewise.
14755
14756 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14757
14758 * jv-scan.c (xmalloc): Remove definition.
14759
14760 * jvgenmain.c (xmalloc): Likewise.
14761
14762 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14763
14764 * lex.c (java_store_unicode): Use xrealloc, not realloc.
14765
14766 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
14767 concat, not xmalloc/sprintf.
14768 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14769 (xstrdup): Remove definition.
14770
14771 * parse.y (duplicate_declaration_error_p,
14772 constructor_circularity_msg, verify_constructor_circularity,
14773 check_abstract_method_definitions, java_check_regular_methods,
14774 java_check_abstract_methods, patch_method_invocation,
14775 check_for_static_method_reference, patch_assignment, patch_binop,
14776 patch_cast, array_constructor_check_entry, patch_return,
14777 patch_conditional_expr): Use xstrdup, not strdup.
14778
14779 * zextract.c (ALLOC): Use xmalloc, not malloc.
14780
14781 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14782
14783 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14784
14785 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
14786 (do_spec, lang_specific_pre_link, lang_specific_driver,
14787 input_filename, input_filename_length): Don't declare.
14788 (main_class_name, jvgenmain_spec, lang_specific_driver):
14789 Constify a char*.
14790 (lang_specific_driver): All calls to the function pointer
14791 parameter now explicitly call `fatal'.
14792
14793 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14794
14795 * parse.y (find_applicable_accessible_methods_list): Search
14796 abstract classes as interfaces.
14797
14798 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14799
14800 * class.c (finish_class): We're now outside a valid method
14801 declaration. Tell the rest of gcc so.
14802
14803 1999-09-08 Bruce Korb autogen@linuxbox.com
14804
14805 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14806
14807 1999-09-07 Tom Tromey <tromey@cygnus.com>
14808
14809 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14810 java-array.h.
14811 (decode_signature_piece): Don't emit "::" in JArray<>.
14812 (print_namelet): Only print trailing `;' when printing a class.
14813
14814 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
14815
14816 * java-tree.h: Delete declarations for all tree nodes now moved to
14817 global_trees.
14818 * decl.c: Delete their definitions.
14819
14820 1999-09-04 Mark Mitchell <mark@codesourcery.com>
14821
14822 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14823 * Makefile.in (OBJS): Add ggc-callbacks.o.
14824 (OBJDEPS): Likewise.
14825
14826 1999-09-03 Tom Tromey <tromey@cygnus.com>
14827
14828 * parse.y (strip_out_static_field_access_decl): Return operand if
14829 it satisfies JDECL_P.
14830
14831 1999-09-02 Tom Tromey <tromey@cygnus.com>
14832
14833 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14834 Handle nested arrays, like `[[I'.
14835
14836 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14837
14838 * class.c (finish_class): Remove unused parameter, all callers
14839 changed.
14840
14841 * expr.c (build_java_athrow): Change return type to void.
14842 (java_lang_expand_expr): Make sure each case in switch returns a
14843 value.
14844
14845 * java-tree.h (finish_class): Fix prototype to take void args.
14846
14847 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14848 (main): Issue return from main, not exit.
14849
14850 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14851
14852 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14853
14854 * jv-scan.c (main): Issue return from main, not exit.
14855
14856 * parse.y (check_abstract_method_definitions,
14857 java_check_abstract_method_definitions): Add static prototypes.
14858 (java_complete_expand_methods): Fix call to `finish_class'.
14859
14860 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14861 and `prevpc'.
14862
14863 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14864
14865 * lang.c (language_string): Constify.
14866
14867 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14868
14869 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14870 Remove hacks for stuff which comes from libiberty.
14871
14872 * Make-lang.in: Likewise.
14873
14874 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
14875
14876 * Makefile.in (xref.o): Depend on xref.c explicitly.
14877
14878 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14879
14880 * java-tree.h (lang_printable_name): Constify a char*.
14881
14882 * lang.c (lang_printable_name): Likewise.
14883
14884 1999-08-27 Jeffrey A Law (law@cygnus.com)
14885
14886 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14887 comments in C code.
14888
14889 1999-08-26 Tom Tromey <tromey@cygnus.com>
14890
14891 * gjavah.c (print_cxx_classname): Print "::" before qualified
14892 name.
14893
14894 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14895
14896 * parse.y (lookup_cl): Changed leading comment. Now does its best
14897 to set the column number.
14898 (qualify_ambiguous_name): Take WFL wrappers into account.
14899
14900 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
14901
14902 * verify.c (verify_jvm_instructions): Don't check instruction
14903 validity beyond end of method.
14904
14905 1999-08-25 Tom Tromey <tromey@cygnus.com>
14906
14907 * jvspec.c (lang_specific_driver): Correctly handle --help again.
14908
14909 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14910
14911 * gjavah.c (print_name, print_base_classname, utf8_cmp,
14912 cxx_keyword_subst, generate_access, name_is_method_p,
14913 get_field_name, print_field_name, super_class_name, print_include,
14914 decode_signature_piece, print_class_decls, usage, help,
14915 java_no_argument, version, add_namelet, print_namelet): Add static
14916 prototype.
14917 (print_base_classname, utf8_cmp, cxx_keyword_subst,
14918 name_is_method_p): Constify a char*.
14919 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
14920 Provide a final else clause in an if-else-if.
14921 (print_field_info): Add missing final arg in function call to
14922 `print_field_name'.
14923 (print_method_info, decompile_method, decode_signature_piece,
14924 print_c_decl, print_full_cxx_name, print_stub,
14925 print_mangled_classname, super_class_name, print_include,
14926 add_namelet, add_class_decl, print_class_decls, process_file,
14927 help): Constify a char*.
14928
14929 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14930 push_int_const, find_constant_wide, find_constant_index,
14931 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14932 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14933 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14934 emit_if, emit_goto, emit_jsr, call_cleanups,
14935 make_class_file_name): Add static prototypes.
14936 (generate_bytecode_return, generate_bytecode_insns): Pass a
14937 NULL_PTR, not a NULL_TREE.
14938
14939 * jv-scan.c: Include "jcf.h".
14940 (main): Declare using DEFUN macro.
14941
14942 * jvspec.c (find_spec_file, lang_specific_pre_link,
14943 lang_specific_driver): Add prototypes.
14944 (find_spec_file): Constify a char*.
14945
14946 * keyword.gperf (hash, java_keyword): Add prototypes.
14947
14948 * lang.c (lang_print_error): Add static prototype.
14949 (lang_init): Prefer memcpy over bcopy to avoid casts.
14950
14951 * lex.c (yylex): Add static prototype.
14952
14953 * parse-scan.y: Include "lex.c" earlier.
14954
14955 * parse.h: Remove redundant declaration for `yylex'.
14956
14957 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14958 labeled_block_contains_loop_p): Add static prototypes.
14959 (not_accessible_p): Make static to match prototype.
14960
14961 * verify.c (start_pc_cmp): Don't needlessly cast away const.
14962
14963 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14964
14965 * parse.y (check_method_redefinition): Changed leading comment.
14966 (check_abstract_method_definitions): New function.
14967 (java_check_abstract_method_definitions): New function.
14968 (java_check_regular_methods): Call it.
14969 (verify_constructor_super): Fixed indentation.
14970 (lookup_method_invoke): Likewise.
14971
14972 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14973
14974 * parse.y (method_header): Return a null pointer if the current
14975 class node is null.
14976 (finish_method_declaration): Return if the current function decl
14977 is null.
14978 (source_start_java_method): Likewise.
14979 (java_method_add_stmt): Likewise.
14980
14981 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14982
14983 * class.c (emit_register_class): Removed unnecessary call to
14984 start_sequence.
14985 * parse.y (labeled_block_contains_loop_p): Removed unused local
14986 variable.
14987
14988 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14989
14990 * parse.y (java_refold): Added prototype.
14991
14992 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14993
14994 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14995 (java_stabilize_reference): Removed unnecessary `else'.
14996 (java_complete_lhs): Set flag to remember boolean. Call
14997 java_refold. Added comments.
14998 (java_decl_equiv): New function.
14999 (binop_compound_p): Likewise.
15000 (java_refold): Likewise.
15001 (patch_unaryop): Striped static field access assigned to decl and
15002 op. Changed promotion scheme for ++/-- operators.
15003 (search_loop): New function.
15004 (labeled_block_contains_loop_p): Likewise.
15005 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15006 comment.
15007 (patch_bc_statement): Call search_loop. Fixed comment.
15008
15009 1999-08-14 Anthony Green <green@cygnus.com>
15010
15011 * expr.c (java_lang_expand_expr): Mark static array data as
15012 referenced.
15013
15014 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
15015
15016 * jvgenmain.c (main): NUL-terminate name_obstack.
15017
15018 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15019
15020 * check-init.c (check_bool2_init, done_alternative): Add static
15021 prototypes.
15022
15023 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15024 (add_method, build_utf8_ref, build_class_ref,
15025 append_gpp_mangled_type, layout_class_method): Constify a char*.
15026
15027 * decl.c (push_promoted_type, make_binding_level): Add static
15028 prototypes.
15029 (push_promoted_type, pushdecl): Constify a char*.
15030
15031 * except.c (find_handler_in_range, link_handler,
15032 check_start_handlers): Add static prototypes.
15033
15034 * expr.c (process_jvm_instruction): Constify a char*.
15035
15036 * gjavah.c (main): Constify a char*.
15037
15038 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15039 Constify a char*.
15040
15041 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15042 static prototypes.
15043 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15044 munge, print_ents): Constify a char*.
15045
15046 * jcf-dump.c (disassemble_method): Constify a char*.
15047 (print_constant_pool, print_exception_table): Add static prototypes.
15048 (print_constant, print_exception_table, main, disassemble_method):
15049 Constify a char*.
15050
15051 * jcf-io.c (find_classfile, find_class): Likewise.
15052
15053 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15054 (set_source_filename, predefined_filename_p): Add static prototypes.
15055 (set_source_filename, get_constant, get_class_constant,
15056 find_in_current_zip): Constify a char*.
15057
15058 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15059 static prototypes.
15060 (add_entry, add_path, jcf_path_classpath_arg,
15061 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15062
15063 * jcf-reader.c (get_attribute, jcf_parse_preamble,
15064 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15065 jcf_parse_one_method, jcf_parse_methods,
15066 jcf_parse_final_attributes): Add static prototypes.
15067 (get_attribute): Constify a char*.
15068
15069 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15070 jcf_dependency_add_target, jcf_path_classpath_arg,
15071 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15072
15073 * jv-scan.c (main): Constify a char*.
15074 (gcc_obstack_init): Add prototype arguments.
15075
15076 * jvgenmain.c (gcc_obstack_init): Likewise.
15077 (main): Constify a char*.
15078
15079 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15080 static prototypes.
15081 (put_decl_string, lang_print_error): Constify a char*.
15082 (lang_init): Remove redundant extern prototype.
15083
15084 * mangle.c (emit_unicode_mangled_name): Constify a char*.
15085
15086 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15087 Add static prototypes.
15088 (get_type_from_signature): Constify a char*.
15089
15090 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15091 Add static prototypes.
15092 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15093 (verify_jvm_instructions): Constify a char*.
15094
15095 * xref.c (xref_flag_value): Likewise.
15096
15097 * xref.h (xref_flag_value): Likewise.
15098
15099 * zextract.c (makeword, makelong): Add static prototypes.
15100 (makeword, makelong): Constify a uch*.
15101
15102 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15103
15104 * lang.c (java_dummy_print): Constify a char*.
15105 (lang_print_error): Likewise.
15106 (lang_init): Remove redundant prototype for `print_error_function'.
15107 (lang_init_source): Likewise.
15108 (lang_identify): Constify a char*.
15109
15110 1999-08-09 Tom Tromey <tromey@cygnus.com>
15111
15112 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15113 (WORDS_TO_LONG): Likewise.
15114 (WORDS_TO_DOUBLE): Likewise.
15115
15116 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15117
15118 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15119
15120 * expr.c (java_stack_pop, java_array_data_offset,
15121 build_java_throw_out_of_bounds_exception, case_identity,
15122 build_java_check_indexed_type): Add static prototypes.
15123 (linenumber_table, expand_invoke, expand_java_field_op,
15124 build_primtype_type_ref, expand_byte_code): Constify a char*.
15125
15126 * java-tree.h (build_primtype_type_ref, linenumber_table):
15127 Constify a char*.
15128 (java_lang_expand_expr): Add prototype.
15129
15130 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
15131 `java_lang_expand_expr'.
15132
15133 * lex.c (java_lex_error): Constify a char*.
15134 (java_get_unicode, java_read_char, java_allocate_new_line,
15135 java_unget_unicode, java_sneak_unicode): Prototype.
15136
15137 * parse-scan.y (current_class, package_name, method_declarator,
15138 report_class_declaration, yyerror): Constify a char*.
15139
15140 * parse.h (java_report_errors): Prototype.
15141 (yyerror): Constify a char*.
15142
15143 * parse.y (classitf_redefinition_error, check_modifiers,
15144 parse_jdk1_1_error, lookup_package_type,
15145 lookup_package_type_and_set_next, get_printable_method_name,
15146 purify_type_name): Constify a char*.
15147 (build_super_invocation, maybe_generate_finit,
15148 verify_constructor_super, parser_add_interface,
15149 add_superinterfaces, jdep_resolve_class, note_possible_classname,
15150 java_complete_expand_methods, java_expand_finals,
15151 cut_identifier_in_qualified, java_stabilize_reference,
15152 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15153 merge_string_cste): Prototype.
15154 (single_type_import_declaration, yyerror,
15155 variable_redefinition_error, build_array_from_name,
15156 build_unresolved_array_type, check_class_interface_creation,
15157 resolve_class, complete_class_report_errors,
15158 note_possible_classname, read_import_dir,
15159 find_in_imports_on_demand, resolve_package, fix_constructors,
15160 check_deprecation, lookup_method_invoke,
15161 maybe_build_primttype_type_ref, array_constructor_check_entry):
15162 Constify a char*.
15163 (java_complete_expand_methods, java_expand_finals): Make static.
15164 (convert_narrow): Remove static prototype.
15165
15166 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
15167
15168 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15169
15170 1999-08-02 Richard Henderson <rth@cygnus.com>
15171
15172 * decl.c: Include defaults.h instead of expr.h.
15173 * parse.y: Likewise.
15174
15175 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
15176
15177 * java/decl.c (start_java_method): Change all uses of
15178 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15179 Ensure expr.h is included.
15180 * java/expr.c (pop_arguments): Ditto.
15181 * java/parse.y (expand_start_java_method): Ditto.
15182
15183 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15184
15185 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15186
15187 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
15188
15189 * decl.c: Include "function.h".
15190 * except.c: Likewise.
15191 * parse.y: Likewise.
15192 * Makefile.in: Update dependencies.
15193
15194 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15195
15196 * expr.c (build_java_soft_divmod): Provide a default case in switch.
15197 (java_lang_expand_expr): Mark parameters `target', `tmode' and
15198 `modifier' with ATTRIBUTE_UNUSED.
15199
15200 * gjavah.c (process_file): Add braces around ambiguous `else'.
15201
15202 * jcf-dump.c (print_access_flags, localvar_free): Change return
15203 type to void.
15204
15205 * parse.y (java_complete_expand_method): Initialize variable
15206 `exception_copy'.
15207 (resolve_qualified_expression_name): Likewise for `field_decl'.
15208 (patch_method_invocation): Likewise for `class_to_search'.
15209 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15210 (patch_assignment): Likewise for `lhs_type'.
15211
15212 * verify.c (verify_jvm_instructions): Remove unused variable
15213 `caller'.
15214
15215 1999-07-25 Richard Henderson <rth@cygnus.com>
15216
15217 * decl.c (va_list_type_node): New.
15218
15219 1999-07-25 Anthony Green <green@cygnus.com>
15220
15221 * gjavah.c (print_stub): New function.
15222 (METHOD_IS_NATIVE): New macro.
15223 (print_mangled_classname): Make static.
15224 (HANDLE_END_FIELD): Don't emit fields during stub generation.
15225 (process_file): Perform stub generation.
15226 (HANDLE_METHOD): Don't emit class decls during stub
15227 generation.
15228 (HANDLE_END_METHOD): Take into account stub generation.
15229 (print_method_info): Handle stub generation.
15230 (print_stub): New function.
15231 (print_cxx_classname): Make signature consistant with others.
15232 (help): Describe -stubs option.
15233 (main): Create stub file.
15234 (version): Use version.c.
15235 (print_full_cxx_name): New function.
15236 (print_c_decl): Use print_full_cxx_name.
15237
15238 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15239
15240 * check-init.c (check_init): Handle MAX_EXPR.
15241
15242 1999-07-15 Andrew Haley <aph@cygnus.com>
15243
15244 * lang.c (flag_use_divide_subroutine): New variable.
15245 * typeck.c: (convert_ieee_real_to_integer): Bounds check
15246 fp-to-integer conversion.
15247 (convert): Call convert_ieee_real_to_integer when flag_fast_math
15248 is not set.
15249
15250 * expr.c (build_java_soft_divmod): New function.
15251 (build_java_binop): Call build_java_soft_divmod if
15252 flag_use_divide_subroutine is set.
15253 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15254 soft_lrem_node: new builtin functions.
15255 (init_decl_processing) Initialize the new builtins.
15256 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15257 soft_lrem_node: new builtin functions.
15258 (build_java_soft_divmod): New function.
15259 * parse.y: Call build_java_soft_divmod if
15260 flag_use_divide_subroutine is set.
15261 * parse.c: Rebuilt.
15262
15263 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15264 a --specs= arg) even if not linking.
15265 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15266 -fuse-divide-subroutine
15267
15268 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15269
15270 * parse.y (resolve_and_layout): Check methods only once.
15271 (resolve_qualified_expression_name): Verify thrown exceptions
15272 compatibility.
15273 (check_thrown_exceptions): Reject exceptions thrown in
15274 initializer. Error message tuned.
15275
15276 1999-07-14 Andrew Haley <aph@cygnus.com>
15277
15278 * expr.c (expand_expr): Do not return the last statement in a
15279 block as the block's value.
15280
15281 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15282
15283 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
15284 CALL_EXPR, to avoid order of evaluation changes.
15285
15286 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15287
15288 * parse.y (qualify_ambiguous_name): Do not use
15289 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
15290
15291 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15292
15293 * check-init.c (check_init): Handle MAX_EXPR.
15294 * expr.c (force_evaluation_order): Force method call arguments to
15295 be evaluated in left-to-right order.
15296 * parse.y (qualify_ambiguous_name): Loop again to qualify
15297 NEW_ARRAY_EXPR properly.
15298
15299 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15300
15301 * parse.y (patch_invoke): Resolve unresolved invoked method
15302 returned type.
15303 (qualify_ambiguous_name): STRING_CST to qualify expression for
15304 type name resolution.
15305
15306 1999-06-24 Andrew Haley <aph@cygnus.com>
15307
15308 * class.c (finish_class): Whenever a deferred method is
15309 output, rescan the list of methods to see if a new candidate for
15310 output can be found.
15311
15312 1999-06-28 Tom Tromey <tromey@cygnus.com>
15313
15314 * jvspec.c (lang_specific_driver): Recognize --help.
15315
15316 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
15317
15318 * parse.y (resolve_package): Fixed bogus return statement.
15319 (patch_method_invocation): Resolve method invocation beginning with
15320 a package name qualifier.
15321
15322 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15323
15324 * Make-lang.in (java.stage1): Depend on stage1-start.
15325 (java.stage2): Likewise for stage2-start.
15326 (java.stage3): Likewise for stage3-start.
15327 (java.stage4): Likewise for stage4-start.
15328
15329 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15330
15331 * parse.y (java_complete_lhs): When doing cross referencing, don't
15332 try to keep file location on a WFL expanded as a CALL_EXPR.
15333
15334 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15335
15336 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
15337 compiling to class file a void method with an empty method body.
15338 As a side effect, the bytecode backend will generate the
15339 appropriate `return' instruction.
15340
15341 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15342
15343 * parse.y (lookup_package_type_and_set_next): New function prototype.
15344 (resolve_package): Search current and imported packages.
15345 (lookup_package_type_and_set_next): New function.
15346
15347 1999-06-22 Andrew Haley <aph@cygnus.com>
15348
15349 * verify.c (verify_jvm_instructions): Check for pending blocks
15350 before invalid PC test and opcode switch, not after.
15351
15352 1999-06-21 Andrew Haley <aph@cygnus.com>
15353
15354 * except.c (find_handler_in_range): The upper limit for exception
15355 ranges is exclusive, not inclusive: (start <= pc < end).
15356 (link_handler): find child pointer which points to outer by
15357 searching sibling list: previous code incorrectly assumed that
15358 outer->outer->first_child must point to outer.
15359 * verify.c (verify_jvm_instructions): FIXME added to code for
15360 `athrow'.
15361 (verify_jvm_instructions): Do not assume that the last block
15362 processed in a subroutine is a block which ends with a `ret'
15363 instruction. With some control flows it is possible that the last
15364 block ends with an `athrow'.
15365
15366 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15367
15368 * parse.y (qualify_ambiguous_name): Reorganized the post
15369 evaluation of non WFL leading expression nodes.
15370
15371 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15372
15373 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
15374 CONVERT_EXPR.
15375
15376 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15377
15378 * parse.y (qualify_ambiguous_name): Handle qualified expression
15379 beginning with a STRING_CST.
15380
15381 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15382
15383 * parse.y (register_fields): Set DECL_INITIAL on both
15384 pre-initialized static and public fields.
15385 (resolve_field_access): Static field access expressions to always
15386 use pointer types.
15387 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
15388 qualification. CONVERT_EXPR to be resolved as an expression name.
15389 (java_complete_lhs): Identify and access qualified final
15390 initialized field in switch statement case expression.
15391 (fold_constant_for_init): Pre-initialized field decl constant to
15392 be folded.
15393
15394 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
15395
15396 * parse.y (note_possible_classname): Mark returned node with
15397 QUALIFIED_P only if the original class name contained a '/'.
15398
15399 1999-06-05 Anthony Green <green@cygnus.com>
15400
15401 * Make-lang.in (gcjh): More parallel build fixes.
15402
15403 1999-06-03 Mike Stump <mrs@wrs.com>
15404
15405 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15406
15407 1999-06-02 Anthony Green <green@cygnus.com>
15408
15409 * except.c (link_handler): Chain exception handlers in order.
15410
15411 1999-06-02 Anthony Green <green@cygnus.com>
15412
15413 * expr.c (expand_byte_code): Fill unreachable bytecode regions
15414 with nops and process as usual in order to always set correct EH
15415 ranges. Emit detailed warnings about unreachable bytecodes.
15416
15417 1999-06-02 Anthony Green <green@cygnus.com>
15418
15419 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
15420 constant.
15421
15422 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15423
15424 * parse.y (lookup_field_wrapper): Unified returned value to NULL
15425 or the searched field decl.
15426
15427 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15428
15429 * parse.y (fold_constant_for_init): Convert numerical constant
15430 values to the type of the assigned field.
15431
15432 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15433
15434 * expr.c (lookup_field): Relaxed the test on class loading error
15435 detection.
15436 * parse.y (fold_constant_for_init): Enabeled old code.
15437
15438 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15439
15440 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
15441 decide the validity of the cast of a java.lang.Cloneable reference
15442 to an array.
15443 (patch_conditional_expr): Fixed first argument passed to
15444 binary_numeric_promotion.
15445
15446 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15447
15448 * parse.y (qualify_ambiguous_name): Take into account that a
15449 CONVERT_EXPR might specify a type as a WFL.
15450
15451 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
15452
15453 * parse.y (patch_assignment): Save the rhs before using it as an
15454 argument to _Jv_CheckArrayStore.
15455
15456 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
15457
15458 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15459
15460 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15461
15462 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
15463 floating point literal only when the exponent indicator has been
15464 parsed.
15465
15466 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15467
15468 * parse.y (formal_parameter:): Construct argument tree list
15469 element even if a yet unsupported final parameter was encountered.
15470
15471 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15472
15473 * parse.y (finish_method_declaration): Issue errors for native or
15474 abstract methods declared with a method body, as well as for non
15475 native or non abstract methods with no method body.
15476
15477 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15478
15479 * class.c (build_utf8_ref): Initialize variable `field'.
15480
15481 * decl.c (init_decl_processing): Initialize variable `field'.
15482
15483 * expr.c (build_known_method_ref): Mark parameters `method_type',
15484 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
15485 (process_jvm_instruction): Likewise for parameter `length'.
15486
15487 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
15488 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
15489 ATTRIBUTE_UNUSED.
15490
15491 * parse.y (maybe_generate_clinit): Remove unused variable
15492 `has_non_primitive_fields'.
15493 (find_in_imports_on_demand): Initialize variables `node_to_use'
15494 and `cl'.
15495 (patch_binop): Likewise for variable `prom_type'.
15496 (patch_unaryop): Likewise for variable `prom_type'.
15497
15498 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
15499
15500 * xref.c (xref_table): Add missing initializer.
15501
15502 1999-05-14 Tom Tromey <tromey@cygnus.com>
15503
15504 * java-except.h (struct eh_range): Removed unused `next' member.
15505 * verify.c (verify_jvm_instructions): Call check_nested_ranges
15506 after adding all exception handlers. Sort exception ranges in
15507 order of start PC.
15508 (struct pc_index): New structure.
15509 (start_pc_cmp): New function.
15510 * except.c (add_handler): Return `void'. Don't call link_handler;
15511 instead construct an ordinary linked list and do range
15512 coalescing.
15513 (check_nested_ranges): New function.
15514 (link_handler): Changed interface to allow merging of eh_ranges.
15515 Split overlapping ranges. Return `void'.
15516
15517 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15518
15519 * parse.y (constructor_block_end:): New rule, tagged <node>.
15520 (constructor_body:): Use `constructor_block_end' instead of
15521 `block_end'.
15522
15523 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15524
15525 * parse.y (statement_nsi:): Pop `for' statement block.
15526 (java_complete_lhs): Labeled blocks containing no statement are
15527 marked as completing normally.
15528
15529 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15530
15531 * xref.c (xref_set_current_fp): New function, defined.
15532 * xref.h (xref_set_current_fp): New function, prototyped.
15533
15534 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15535
15536 * check-init.c (check_init): Take into account that
15537 LABELED_BLOCK_STMT can be empty.
15538
15539 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
15540
15541 * parse.y (java_check_regular_methods): Warning check on not
15542 overriding methods with default access in other packages does not
15543 apply to `<clinit>'.
15544 (java_complete_lhs): If block body is an empty_stmt_node, replace
15545 it by NULL_TREE. This prevents gcc from generating an irrelevant
15546 warning.
15547
15548 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
15549
15550 * check-init.c (check_init): Removed code accepting to see things
15551 falling through default:, when doing xrefs.
15552 * java-tree.h (do_not_fold): New global variable, declared.
15553 * parse.y (do_not_fold): New global variable, defined.
15554 (java_complete_expand_method): Set `do_not_fold' to the value of
15555 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15556 and reinstall them after them have been purged; do not check for
15557 initializations; do not issue missing return errors.
15558 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
15559 when doing xrefs.
15560 (patch_binop): Skip the fold part when doing xrefs.
15561 (build_string_concatenation): Skip the concatenation part when
15562 doing xrefs.
15563 (patch_synchronized_statement): Do not generate a try-finally when
15564 doing xrefs.
15565 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
15566 and keep the location where the throw was seen.
15567 * typeck.c (convert): When `do_not_fold' is set, do not attempt
15568 any treatment on the converted node an simply return a NOP_EXPR of
15569 the targeted type.
15570 * xref.c (xref_get_data): New function, defined.
15571 * xref.h (xref_get_data): New function, declared.
15572 (XREF_GET_DATA): Use xref_get_data.
15573
15574 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15575
15576 * gjavah.c (print_include): Cast the result of `strlen' to int
15577 when comparing against a signed value.
15578 (add_namelet): Likewise.
15579
15580 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15581
15582 * expr.c (expand_invoke): Mark parameter `nargs' with
15583 ATTRIBUTE_UNUSED.
15584 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15585
15586 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15587 ATTRIBUTE_UNUSED.
15588
15589 * jcf-reader.c (get_attribute): Cast a value to long
15590 when comparing against a signed expression. Likewise.
15591
15592 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15593 HOST_BITS_PER_CHAR.
15594
15595 1999-05-11 Andrew Haley <aph@cygnus.com>
15596
15597 * parse.y (source_end_java_method): If the current method contains
15598 any exception handlers, force asynchronous_exceptions: this is
15599 necessary because signal handlers in libjava may throw exceptions.
15600 * decl.c (end_java_method): Ditto.
15601
15602 1999-05-11 Tom Tromey <tromey@cygnus.com>
15603
15604 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15605 flags.
15606 * jvspec.c (THREAD_NAME): Removed.
15607 (GC_NAME): Likewise.
15608 (MATHLIB): Likewise.
15609 (WITHLIBC): Likewise.
15610 (GCLIB): Likewise.
15611 (THREADLIB): Likewise.
15612 (MATH_LIBRARY): Likewise.
15613 (lang_specific_driver): Don't add `-l' options to command line.
15614 Instead, add a single --specs option. Recognize `-L' options and
15615 use them to search for spec file.
15616 (find_spec_file): New function.
15617 (SPEC_FILE): New define.
15618
15619 1999-05-11 Dave Brolley <brolley@cygnus.com>
15620
15621 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15622 cpplib-enabled build.
15623
15624 1999-05-05 Per Bothner <bothner@cygnus.com>
15625
15626 * class.c (make_field_value): DECL_INITIAL may be a string literal;
15627 temporarily zero it while calling rest_of_decl_compilation.
15628
15629 * java-tree.h (string_ptr_type_node): Add declaration.
15630 * decl.c: Define and initialize string_ptr_type_node.
15631 * parse.y (patch_string_cst): Use string_ptr_type_node.
15632
15633 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
15634 * parse.y (for_statement): Now unconditionally exit_block.
15635 (finish_labeled_statement): No longer exit_block if for-loop.
15636 (patch_loop_statement): Check harder if the loop is already labeled.
15637
15638 * parse.y (patch_initialized_static_field): Removed function.
15639 (maybe_generate_clinit): Removed special handling for interfaces.
15640 (java_complete_expand_methods): Do a preliminary java_complete_tree
15641 on <clinit> to determine if it can be removed.
15642 (java_complete_expand_method): Remove special handling for <clinit>.
15643 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
15644 optimize if we get back empty_stmt_node.
15645 For MODIFY_EXPR, re-do checking of static initializers.
15646 (fold_constant_for_init): Don't return immediate if VAR_DECL.
15647 For VAR_DECL, pass correct context.
15648
15649 * verify.c (verify_jvm_instructions): Better error messages.
15650
15651 1999-05-03 Tom Tromey <tromey@cygnus.com>
15652
15653 * parse-scan.y (interface_declaration): Call
15654 report_class_declaration for interfaces.
15655
15656 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
15657
15658 * Makefile.in: Remove -v from bison command lines.
15659
15660 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15661
15662 * check-init.c (check_init): Exclude a case of error when doing
15663 xrefs.
15664 * class.c (layout_class_method): Don't generate the error message
15665 twice when compiling from source.
15666 * lang-options.h: Added `-Wredundant-modifers' and
15667 `-Wunusupported-jdk11' flags and help text.
15668 * lang.c (lang_decode_option): Added support for
15669 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15670 flag_static_local_jdk11 and flag_redundant set accordingly.
15671 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15672 * parse.h (EXPR_WFL_ADD_COL): New macro.
15673 (DECL_END_SOURCE_LINE): Likewise.
15674 (DECL_INHERITED_SOURCE_LINE): Likewise.
15675 * parse.y (static_ref_err): New function, prototyped.
15676 (CCB_TK): Now tagged <operator>.
15677 (class_body:): Remember the location of the closing '}' of a class
15678 definition when doing xrefs.
15679 (block:): Likewise.
15680 (block_end:): Likewise.
15681 (create_class): Remember the location of the inherited class
15682 identifier when doing xrefs.
15683 (register_fields): Added test on first operand of `init' before
15684 testing it TREE_CODE.
15685 (method_header): Store the location of the class identifier in the
15686 class decl when doing xrefs.
15687 (finish_method_declaration): Don't combine first/last method line
15688 when doing xref.
15689 (java_check_regular_methods): Warning check on not overriding
15690 methods with default access on other packages move before check on
15691 static methods. Initialization of `aflags' also moved up.
15692 (resolve_expression_name): Call static_ref_err to report the error.
15693 (static_ref_err): New function, implemented.
15694 (resolve_field_access): Returned simplified static field access
15695 when doing xrefs.
15696 (resolve_qualified_expression_name): Check for illegal use of
15697 static fields in a non static context. Call static_ref_err to
15698 report error in various places.
15699 (java_complete_tree): Do not fold initialized static fields when
15700 doing xrefs.
15701 (java_complete_lhs): Likewise.
15702
15703 1999-04-29 Anthony Green <green@cygnus.com>
15704
15705 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15706 create internal labels.
15707 (lookup_label): Ditto.
15708
15709 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15710
15711 * class.c (layout_class_method): Generate <clinit>'s rtl for
15712 interfaces.
15713 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15714 for interfaces' <clinit>.
15715 * expr.c (lookup_field): Search for fields in interfaces.
15716 (expand_invoke): Fixed indentation.
15717 (expand_java_field_op): Likewise. Use IS_CLINIT.
15718 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15719 (IS_CLINIT): New macro.
15720 * parse.y (type_declaration:): Call maybe_generate_clinit after an
15721 interface was parsed.
15722 (maybe_generate_clinit): Don't generate if the current class is an
15723 interface with only fields of primitive types.
15724 (reset_method_name): Use IS_CLINIT.
15725 (java_complete_expand_method): Expand <clinit> when it exists for
15726 interfaces. Use IS_CLINIT.
15727 (resolve_expression_name): Use DECL_CONTEXT instead of
15728 current_class to build static field references.
15729 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15730 ARRAY_REF when doing xreferencing.
15731 (check_final_assignment): Fixed typo in leading comment. Use
15732 IS_CLINIT.
15733 (patch_array_ref): Don't fully expand array references when
15734 xreferencing.
15735 (patch_return): Use IS_CLINIT.
15736 (patch_throw_statement): Likewise.
15737
15738 1999-04-22 Tom Tromey <tromey@cygnus.com>
15739
15740 * Make-lang.in (JAVA_SRCS): Added check-init.c.
15741
15742 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15743
15744 * decl.c (predef_filenames, predef_filenames_size): New globals
15745 (init_decl_processing): predef_filenames and predef_filenames_size
15746 initialized.
15747 * java-tree.h (predef_filenames, predef_filenames_size): Declared
15748 extern.
15749 * jcf-parse.c (predefined_filename_p): New function.
15750 (yyparse): Check that files on the command line are specified only
15751 once and issue a warning otherwise.
15752 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15753 * parse.y (source_end_java_method): Nullify NOP method bodies, to
15754 avoid a gcc warning with -W -Wall turned on.
15755 (java_expand_classes): Abort if errors were encountered.
15756 (java_complete_lhs): If the cross reference flag is set, wrap
15757 field DECL node around a WFL when resolving expression name.
15758
15759 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15760
15761 * lang.c (lang_decode_option): Fixed returned value when parsing
15762 `-fxref=...' and `-Wall'.
15763 * parse.y (source_end_java_method): Do not generate code when
15764 flag_emit_xref is set.
15765 (resolve_expression_name): Do not build static field access when
15766 flag_emit_xref is set.
15767 (resolve_field_access): No special treatment on `length' when
15768 flag_emit_xref is set. Do not build qualified static field access
15769 when flag_emit_xref is set.
15770 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15771 when flag_emit_xref is set.
15772 (patch_assignment): Do not generate array store runtime check when
15773 flag_emit_xref is set.
15774 * xref.c (xref_flag_value): Fixed function declaration
15775 indentation.
15776 (xset_set_data): New function.
15777 * xref.h (xref_set_data): Added prototype for new function.
15778 (typedef struct xref_flag_table): New field data.
15779 (XREF_GET_DATA): New macro.
15780
15781 1999-04-19 Tom Tromey <tromey@cygnus.com>
15782
15783 * xref.h (enum): Removed trailing comma.
15784
15785 * parse.y (resolve_qualified_expression_name): Added missing
15786 `break'.
15787
15788 1999-04-15 Anthony Green <green@cygnus.com>
15789
15790 * gjavah.c: New prototypes for java_float_finite and
15791 java_double_finite.
15792
15793 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15794
15795 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15796 references.
15797
15798 1999-04-06 Jeffrey A Law (law@cygnus.com)
15799
15800 * Makefile.in (TREE_H): Add tree-check.h.
15801 (RTL_H): Add genrtl.h.
15802
15803 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15804
15805 * parse.y (patch_assignment): Added ArrayStoreException runtime
15806 check.
15807
15808 1999-04-06 Per Bothner <bothner@cygnus.com>
15809
15810 * expr.c (pop_type_0): New function.
15811 (pop_type): Use pop_type_0.
15812 * java-tree.h (pop_type_0): New declaration.
15813 * verify.c (verify_jvm_instructions): Check return instructions.
15814
15815 * parse.y (patch_binop): Don't fold if non-constant and emiting
15816 class files.
15817
15818 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15819
15820 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15821
15822 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
15823 (main_jcf): Don't define.
15824 (process_file): Don't set `main_jcf'.
15825
15826 * java-tree.h (main_jcf): Don't declare.
15827
15828 * jcf-parse.c (main_jcf): Add static definition.
15829
15830 * lang.c (main_jcf): Don't define.
15831
15832 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15833
15834 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15835
15836 * decl.c (copy_lang_decl): Likewise for `bcopy'.
15837
15838 * jcf-depend.c: Include "config.h", not <config.h>.
15839
15840 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15841 `bcopy' to PTR.
15842
15843 * jcf-path.c: Include "config.h", not <config.h>.
15844
15845 * lex.c: Don't include various system header files.
15846 (java_init_lex): Cast the argument of `bzero' to PTR
15847
15848 * parse-scan.y (java_push_parser_context): Likewise.
15849
15850 * parse.y (java_push_parser_context): Likewise.
15851 (patch_bc_statement): Match format specifier to variable argument.
15852
15853 * xref.c: Don't include <stdio.h>.
15854
15855 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
15856
15857 * parse.y (struct parser_ctxt *ctxp): Now global.
15858 (declare_local_variables): Use WFL compound value for the
15859 declaration source line value, when doing cross-referencing.
15860
15861 1999-03-31 Tom Tromey <tromey@cygnus.com>
15862
15863 * gjavah.c (print_field_info): Allow constants of other types.
15864 (print_include): Generate include when new name is proper prefix
15865 of already printed name.
15866 (add_namelet): Likewise.
15867 (cxx_keyword_subst): New function.
15868 (print_method_info): Use it.
15869 (print_field_name): New function.
15870 (get_field_name): New function.
15871 (print_field_info): Use get_field_name and print_field_name.
15872
15873 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15874
15875 * Makefile.in (keyword.h): Generate using gperf language 'C', not
15876 'KR-C', so gperf uses the `const' keyword on strings.
15877
15878 * keyword.gperf (java_keyword): Const-ify a char*.
15879
15880 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15881
15882 * parse.y (patch_bc_statement): Fixed identation and a bogus
15883 `printf' format.
15884
15885 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15886
15887 * parse.y (patch_assignment): Allow static variables in other
15888 classes to be assigned.
15889
15890 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15891
15892 * class.c (maybe_add_interface): Remove unused variable
15893 `interface_binfo'.
15894 (make_class_data): Use = for assignment, not ==. Likewise.
15895 (emit_register_classes): Remove unused variable `decl'.
15896
15897 * lex.c: Fix comment so as not to contain an embedded `/*'.
15898
15899 * verify.c (verify_jvm_instructions): Remove unused variable
15900 `self_type'.
15901
15902 1999-03-27 Per Bothner <bothner@cygnus.com>
15903
15904 * parse.y (complete_loop_body): Rename to finish_loop_body.
15905 (complete_labeled_statement): Rename to finish_labeled_statement.
15906 (complete_for_loop): Rename to finish_for_loop.
15907 (complete_method_declaration): Rename to finish_method_declaration.
15908
15909 * java-tree.h (continue_identifier_node): New global node.
15910 * decl.c: Define and initialize continue_identifier_node.
15911 * parse.y (generate_labeled_block): Remove - no longer needed.
15912 (build_loop_body): Use continue_identifier_node for continue block.
15913 (finish_labeled_statement): Also do pop_labeled_block actions.
15914 (java_complete_lhs): POP_LOOP even if error.
15915 (build_labeled_block): Special handling for continue_identifier_node.
15916 (patch_loop_statement): Re-organize.
15917 (patch_bc_statement): Re-write.
15918
15919 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15920
15921 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15922 using a WFL compound value.
15923 * parse.y (xref.h): Include.
15924 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15925 WFL compound value.
15926 (register_fields): Set WFL compound value to lineno if doing
15927 xrefs.
15928 (java_complete_expand_method): Call expand_xref if flag_emit_xref
15929 is set.
15930 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15931 * xref.h (expand_xref): Prototype renamed from xref_generate.
15932
15933 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15934
15935 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15936 (GET_CURRENT_BLOCK): New macro.
15937 * parse.y (current_static_block): New global variable.
15938 (method_body:): Define action.
15939 (complete_method_declaration): Set current_function_decl to NULL
15940 when work on the current method is done.
15941 (declare_local_variables): Use GET_CURRENT_BLOCK.
15942 (java_method_add_stmt): Likewise.
15943 (java_complete_expand_method): Disable the use of `this' when
15944 expanding <clinit>.
15945 (enter_a_block): If no current method exist, use
15946 current_static_block to link static initializer blocks.
15947 (exit_block): Rewritten to use current_static_block when no current
15948 method decl exists.
15949 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15950 (patch_return): Forbid the use of `return' in static initializers.
15951 (patch_throw_statement): Fixed indentation. Issue specific error
15952 for uncaught thrown checked exception in static initializer
15953 blocks. Removed FIXME.
15954
15955 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
15956
15957 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15958 Link gcj from gcc.o.
15959
15960 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15961
15962 * parse.y (find_applicable_accessible_methods_list): When dealing
15963 with interface: ensure that a given interface or java.lang.Object
15964 are searched only once.
15965
15966 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15967
15968 * gjavah.c (print_c_decl): Remove unused argument `flags'.
15969
15970 * jcf-dump.c (print_access_flags): Add braces around if-else.
15971
15972 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15973 COMBINE_INPUTS.
15974
15975 * lex.c (build_wfl_node): Add static prototype.
15976
15977 * lex.h (build_wfl_node): Remove static prototype.
15978
15979 * parse.y: Include lex.c early enough to declare everything needed.
15980 Ensure calls to `build_wfl_node' pass the proper arguments.
15981 (create_class): Remove unused variable `super_decl'.
15982 (get_printable_method_name): Initialize variable `name'.
15983
15984 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15985
15986 * Changelog: Fixed 1999-03-22 typos.
15987 * lang.c (lang_decode_option): Fixed typo in error string in the
15988 XARG section.
15989
15990 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15991
15992 * Makefile.in (JAVA_OBJS): Added entry xref.o.
15993 (xref.o): New rule.
15994 * java-tree.h (flag_emit_xref): Declared extern.
15995 * lang.c (xref.h): Included.
15996 (flag_emit_xref): New global variable.
15997 (lang_decode_option): Added support for -fxref.
15998 * xref.c: Created.
15999 * xref.h: Likewise.
16000
16001 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
16002
16003 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16004 linked with.
16005
16006 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16007
16008 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16009 $(srcdir)/../system.h and $(JAVA_TREE_H).
16010 (jcf-io.o): Depend on $(JAVA_TREE_H).
16011 (mangle.o): Likewise.
16012
16013 * check-init.c (check_cond_init): Add static prototype.
16014
16015 * class.c (build_java_method_type, hashUtf8String,
16016 make_field_value, get_dispatch_vector, get_dispatch_table,
16017 append_gpp_mangled_type, mangle_static_field): Likewise.
16018 (strLengthUtf8): Hide unused definition.
16019 (hashUtf8String): Const-ify.
16020 (make_field_value): Un-ANSI-fy.
16021
16022 * constants.c: Move inclusion of jcf.h above java-tree.h.
16023 (set_constant_entry, find_class_or_string_constant,
16024 find_name_and_type_constant, get_tag_node,
16025 build_constant_data_ref): Add static prototype.
16026
16027 * decl.c (push_jvm_slot, builtin_function,
16028 lookup_name_current_level): Likewise.
16029 (builtin_function): Const-ify.
16030
16031 * except.c (expand_start_java_handler, expand_end_java_handler):
16032 Add static prototype.
16033
16034 * expr.c (flush_quick_stack, push_value, pop_value,
16035 java_stack_swap, java_stack_dup, build_java_athrow,
16036 build_java_jsr, build_java_ret, expand_java_multianewarray,
16037 expand_java_arraystore, expand_java_arrayload,
16038 expand_java_array_length, build_java_monitor, expand_java_pushc,
16039 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16040 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16041 expand_compare, expand_test, expand_cond, expand_java_goto,
16042 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16043 expand_java_field_op, java_push_constant_from_pool): Likewise.
16044
16045 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16046 (build_java_arraynull_check): Mark parameters `node' and `type'
16047 with ATTRIBUTE_UNUSED.
16048 (note_label): Likewise for parameter `current_pc'.
16049 (expand_java_call, expand_java_ret): Hide unused definition.
16050
16051 * java-tree.h (make_class, build_constants_constructor,
16052 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16053 init_outgoing_cpool, register_class, emit_register_classes,
16054 java_layout_seen_class_methods): Prototype.
16055 (unicode_mangling_length): Const-ify.
16056 (append_gpp_mangled_name, append_gpp_mangled_classtype,
16057 emit_unicode_mangled_name, format_int, format_uint,
16058 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16059 jcf_print_utf8_replace, open_class): Prototype.
16060
16061 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
16062 <stdio.h>. Include tree.h/java-tree.h.
16063 (utf8_equal_string usage, process_class): Add static prototype.
16064 (open_class): Don't prototype this here.
16065 (utf8_equal_string): Match arguments to format specifiers.
16066 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16067 TABLE_SWITCH, disassemble_method): Likewise.
16068
16069 * jcf-io.c: Include tree.h/java-tree.h.
16070 (open_class, find_classfile, jcf_print_utf8,
16071 jcf_print_utf8_replace): Const-ify.
16072
16073 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16074 parse_class_file): Add static prototype.
16075 (find_in_current_zip): Match definition to existing static
16076 prototype.
16077
16078 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16079 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16080 finish_jcf_block, define_jcf_label, get_jcf_label_here,
16081 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16082 write_chunks, adjust_typed_op, generate_bytecode_conditional,
16083 generate_bytecode_return, perform_relocations, init_jcf_state,
16084 init_jcf_method, release_jcf_state, generate_classfile):
16085 Add static prototype.
16086 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16087 (make_class_file_name): Const-ify.
16088
16089 * jcf.h (find_classfile): Const-ify.
16090
16091 * jv-scan.c (reset_report): Remove prototype.
16092
16093 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16094 (error): Rewrite to allow varargs.
16095
16096 * lang.c (lang_f_options): Const-ify.
16097
16098 * lex.c (java_parse_escape_sequence): Add static prototype.
16099 (java_allocate_new_line): Match definition to existing static
16100 prototype.
16101
16102 * mangle.c Include tree.h/java-tree.h.
16103 (unicode_mangling_length, emit_unicode_mangled_name,
16104 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16105
16106 * parse.h (jdep_code): Remove trailing comma in enumeration.
16107 (java_get_line_col): Move prototype outside of !JC1_LITE test.
16108 (reset_report): Add prototype.
16109
16110 * verify.c (push_pending_label, merge_types): Add static
16111 prototypes.
16112
16113 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16114
16115 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16116
16117 * parse.y (find_applicable_accessible_methods_list): Extend the
16118 search to superinterfaces when relevant.
16119 (search_applicable_methods_list): New function.
16120
16121 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16122
16123 * class.c (unmangle_classname): Implemented stricter testing
16124 before setting the QUALIFIED_P flag on an identifier.
16125
16126 1999-03-16 Per Bothner <bothner@cygnus.com>
16127
16128 * parse.y (java_complete_lhs): Call force_evaluation_order
16129 after patch_newarray.
16130 (patch_binop): Don't call fold if there are side effects.
16131
16132 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16133
16134 * parse.y (java_stabilize_reference): Use save_expr instead of
16135 building a SAVE_EXPR node.
16136 (java_complete_lhs): Patch the resulting string of the `+='
16137 operator (if necessary) and complete the RHS after having built
16138 the cast.
16139
16140 1999-03-15 Per Bothner <bothner@cygnus.com>
16141
16142 * class.c (make_class): Don't set CLASS_P here (because
16143 this function is also called by build_java_array_type).
16144 (push_class): Set CLASS_P here instead.
16145 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
16146
16147 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
16148 context. If the context is class, perfer "super" over "synchronized".
16149 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
16150
16151 * parse.y (create_class): Don't call parser_check_super here;
16152 it is not robust. Always wait until later.
16153
16154 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
16155 match what JDK 1.2 does), but don't set ACC_PUBLIC.
16156
16157 1999-03-13 Per Bothner <bothner@cygnus.com>
16158
16159 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
16160 * lex.h (UNGETC): Change misleading macro.
16161
16162 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16163
16164 * parse.y (java_stabilize_reference): Return NODE when patching a
16165 COMPOUND_EXPR.
16166 (java_complete_lhs): Put parenthesis around truth values.
16167
16168 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16169
16170 * class.c (layout_class_method): Don't make rtl for interface
16171 methods.
16172 * parse.h (GET_TYPE_NAME): New macro.
16173 * parse.y (if_then_statement:): Fixed indentation.
16174 (if_then_else_statement:): Likewise.
16175 (for_statement:): Fixed spacing.
16176 (try_statement:): Fixed indentation.
16177 (create_interface): Don't force interfaces to be abstract.
16178 (method_header): Abstract methods are OK in interfaces.
16179 (declare_local_variables): Fixed typo in comment.
16180 (java_complete_expand_method): Fixed indentation.
16181 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16182 non accessible fields.
16183 (java_stabilize_reference): New function.
16184 (java_complete_lhs): Fixed indentation. Use
16185 java_stabilize_reference in compound assignment. Insert the
16186 cast. If not processing `+' fix string constants before processing
16187 binop.
16188
16189 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16190
16191 * constants.c (find_class_or_string_constant): Cast variable `j'
16192 to a `jword' when comparing against one.
16193
16194 * expr.c (java_lang_expand_expr): Remove unused variables
16195 `has_finally_p' and `op0'.
16196
16197 * gjavah.c (print_field_info): Cast a value to jint when comparing
16198 against one. Likewise for a jlong.
16199 (add_namelet): Likewise cast a `sizeof' to an int when comparing
16200 against a signed quantity.
16201
16202 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16203 (print_signature): Don't needlessly dereference variable `str'
16204
16205 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16206 `max_locals' with ATTRIBUTE_UNUSED.
16207 (jcf_parse_class): Likewise for variable `index'.
16208
16209 * parse.h (reverse_jdep_list): Remove static prototype.
16210
16211 * parse.y (build_jump_to_finally): Remove prototype and definition.
16212 (reverse_jdep_list): Add static prototype.
16213
16214 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16215 `assignment' and `expr_decl'.
16216
16217 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16218
16219 1999-03-12 Andrew Haley <aph@cygnus.com>
16220
16221 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16222 we'll need a directory separator and a null character.
16223
16224 1999-03-10 Per Bothner <bothner@cygnus.com>
16225
16226 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
16227
16228 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
16229
16230 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16231 interfaces.
16232
16233 1999-03-05 Per Bothner <bothner@cygnus.com>
16234
16235 * lex.c (java_parse_end_comment): Take extra parameter (next char).
16236
16237 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
16238
16239 * class.c (layout_class_method): A static method in a base class
16240 is never overridden, so treat it like it doesn't exist.
16241 However, do complain about private non-static method overriding
16242 public static method.
16243
16244 * parse.y: Don't set unused INITIALIZED_P flag.
16245 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
16246
16247 * parse.y (find_expr_with_wfl): Optimize tail-calls.
16248 (build_array_from_name): Re-order &index[string] to &string[index].
16249
16250 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
16251 error_mark (it might catch more errors, but it is more likely to lose).
16252
16253 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16254
16255 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16256 (parse-scan.o): Depend on toplev.h.
16257
16258 * class.c (make_method_value): Add prototype. Make it static.
16259 Remove unused second argument, caller changed.
16260
16261 * expr.c (java_lang_expand_expr): Remove unused variable
16262 `return_label'.
16263
16264 * java-tree.h: Don't prototype find_in_current_zip.
16265 Add prototypes for verify_constant_pool, start_java_method,
16266 end_java_method, give_name_to_locals, expand_byte_code,
16267 open_in_zip, set_constant_value, find_constant1, find_constant2,
16268 find_utf8_constant, find_string_constant, find_class_constant,
16269 find_fieldref_index, find_methodref_index, write_constant_pool,
16270 count_constant_pool_bytes and encode_newarray_type.
16271
16272 * jcf-dump.c: Remove unused variable `LONG_temp'.
16273
16274 * jcf-parse.c: Include parse.h.
16275 (jcf_parse_source): Remove unused parameter, all callers changed.
16276 (jcf_figure_file_type): Add static prototype.
16277 (find_in_current_zip): Likewise. Also remove unused parameter,
16278 all callers changed.
16279 (read_class): Initialize variable `saved_pos'.
16280
16281 * jcf-reader.c (jcf_parse_preamble): Mark variables
16282 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16283
16284 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16285 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16286 (java_parse_doc_section): Initialize variable `seen_star'.
16287 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16288 (java_lex_error): Mark parameters `msg' and `forward' with
16289 ATTRIBUTE_UNUSED.
16290 (java_get_line_col): Mark parameters `filename' and `line' with
16291 ATTRIBUTE_UNUSED.
16292
16293 * parse-scan.y: Include toplev.h.
16294 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16295
16296 * parse.h: use `struct JCF', not plain `JCF'.
16297 (java_parser_context_save_global, java_expand_classes
16298 java_parser_context_restore_global, java_parse): Add prototypes.
16299
16300 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16301 `node'.
16302
16303 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
16304
16305 * check-init.c (check_init): COPYN takes word count, not bit count.
16306
16307 1999-02-26 Per Bothner <bothner@cygnus.com>
16308
16309 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
16310 explicit build_decl. (Avoids crash in reload when optimizing.)
16311
16312 1999-02-25 Per Bothner <bothner@cygnus.com>
16313
16314 * decl.c (complete_start_java_method): Handle synchronized method
16315 even when compiling from bytecode.
16316
16317 1999-02-26 Tom Tromey <tromey@cygnus.com>
16318
16319 * gjavah.c (add_class_decl): Only generate `#include' if outer
16320 class is not the name of the class we are processing. Correctly
16321 append `.h' in #include.
16322 (process_file): Clean up newlines around generated `#include's.
16323 (decode_signature_piece): Correctly handle inner classes.
16324 (struct include): New structure.
16325 (all_includes): New global.
16326 (print_include): New function.
16327 (add_class_decl): Use it.
16328 (process_file): Likewise.
16329 (add_class_decl): Generate include for java-array.h if array
16330 seen.
16331 (process_file): Don't generate java-array.h include.
16332
16333 * gjavah.c (add_namelet): Check for standard package names here.
16334 (add_class_decl): Don't check for standard package names here.
16335
16336 1999-02-25 Tom Tromey <tromey@cygnus.com>
16337
16338 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
16339 When reading a zip file, only use strncmp if both strings are
16340 bigger than the buffer length. Initialize `k' when looping
16341 through zip file.
16342
16343 1999-02-24 Tom Tromey <tromey@cygnus.com>
16344
16345 * gjavah.c (struct namelet): New structure.
16346 (add_namelet): New function.
16347 (print_namelet): New function.
16348 (print_class_decls): Use add_namelet and print_namelet to generate
16349 namespaces and not classes.
16350 (method_printed): New global.
16351 (HANDLE_END_METHOD): Examine method_printed.
16352 (print_method_info): Set method_printed when required. Print
16353 error if function to be ignored is marked virtual. Handle $finit$
16354 method.
16355 (METHOD_IS_FINAL): New macro.
16356 (print_field_info): Use it.
16357 (HANDLE_METHOD): Clear method_printed.
16358 (method_pass): New global.
16359 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
16360 (process_file): Do two passes over both fields and methods.
16361 (HANDLE_METHOD): Examine method_pass.
16362 (root): New global.
16363 (add_class_decl): New function.
16364 (print_class_decls): Don't scan over entire constant pool.
16365
16366 1999-02-23 Tom Tromey <tromey@cygnus.com>
16367
16368 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
16369 disable linking in that case.
16370
16371 1999-02-20 Tom Tromey <tromey@cygnus.com>
16372
16373 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
16374 not 0x1f.
16375
16376 1999-02-21 Per Bothner <bothner@cygnus.com>
16377
16378 * decl.c (build_result_decl), java-tree.h: New method.
16379 (complete_start_java_method): Handle synchronized methods.
16380 Don't build DECL_RESULT here. (Ordering dependency problem.)
16381 (start_java_method): Call build_result_decl here instead ...
16382 * parse.y (java_complete_expand_method): ... and here.
16383 (expand_start_java_method): Don't call complete_start_java_method here.
16384 (java_complete_expand_method): Call it here instead.
16385 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
16386 * java-tree.h: ... here.
16387
16388 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
16389 * parse.y (java_complete_lhs): Don't call force_evaluation_order
16390 for ARRAY_REF - it doesn't work when array bounds are checked.
16391 (patch_array_ref): Handle it here instead.
16392
16393 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
16394
16395 1999-02-19 Per Bothner <bothner@cygnus.com>
16396
16397 Force left-to-right evaluation of binary operations etc.
16398 * expr.c (force_evaluation_order), java-tree.h: New function.
16399 * parse.y (java_complete_lhs): Pass binary operations, procedure
16400 calls, and ARRAY_REFs to force_evaluation_order.
16401 (various): Set TREE_SIDE_EFFECTS more carefully.
16402
16403 Tolerate random (non-UTF8) encoding in comments without complaining.
16404 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
16405 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
16406
16407 * parse.y (resolve_qualified_expression_name): Handle error_mark.
16408 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
16409
16410 * parse.y (java_complete_lhs): Ignore an empty statement in a
16411 COMPOUND_EXPR. Don't complain about empty statement after return.
16412
16413 1999-02-19 Per Bothner <bothner@cygnus.com>
16414
16415 * parse.y (obtain_incomplete_type): Don't wrap unknown types
16416 in TREE_LIST - just chain the POINTER_TYPEs together.
16417 (resolve_class): If type already resolved, return decl.
16418 After resolving, update TREE_TYPE(class_type), and name (if array).
16419 * parse.h (do_resolve_class), parse.y: Make non-static.
16420 * class.c (maybe_layout_super_class): Take this_class argument.
16421 Do do_resolve_class if necessary.
16422 (layout_class, layout_class_methods): Adjust calls appropriately.
16423 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16424 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
16425 * typeck.c (build_java_array_type): Don't call layout_class.
16426
16427 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16428
16429 * parse.y (check_pkg_class_access): Allow private class access
16430 within the same package.
16431 (strip_out_static_field_access_decl): New function.
16432 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
16433 operator argument before testing its nature.
16434
16435 1999-02-03 Per Bothner <bothner@cygnus.com>
16436
16437 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
16438 (TRY_EXPR): Simplify - it no longer has a finally clause.
16439 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
16440 Simpler handling of TRY_EXPR, which no longer has a finally clause.
16441 * expr.c (java_lang_expand_expr): Likewise.
16442 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
16443 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
16444 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
16445 (build_try_statement): Remove finally parameter and handling.
16446 (build_try_finally_statement): New function.
16447 (patch_try_statement): No longer need to support finally clause.
16448 (try_statement): Update grammar action rules.
16449 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
16450 Simpler handling of TRY_EXPR, which no longer has a finally clause.
16451
16452 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
16453
16454 * jcf-parse.c (get_constant): Add braces around computation of 'd'
16455 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
16456
16457 1999-02-17 Andrew Haley <aph@cygnus.com>
16458
16459 * class.c (build_utf8_ref): Back out broken patch which was
16460 intended to to output signatures using '.' as a separator.
16461
16462 * class.c (make_class_data): Output signatures using '.' as a
16463 separator, rather than '/'.
16464 (mangled_classname): Likewise.
16465 (make_field_value): Likewise.
16466 (make_method_value): Likewise.
16467 * constants.c (alloc_class_constant): Likewise.
16468 * expr.c (build_invokeinterface): Likewise.
16469
16470 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16471
16472 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
16473 of an ancient workaround.
16474
16475 1999-02-10 Jeffrey A Law (law@cygnus.com)
16476
16477 * jvspec.c (xmalloc): Kill the prototype. It does not belong
16478 here anymore.
16479
16480 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16481
16482 * lex.c (yylex): Encode \0 as UTF8.
16483
16484 1999-02-10 Tom Tromey <tromey@cygnus.com>
16485
16486 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
16487 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
16488 (libgcj_zip): Renamed.
16489 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
16490 LIBJAVA_ZIP_FILE.
16491 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
16492
16493 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
16494 (GC_NAME): Renamed -lgc to -lgcjgc.
16495
16496 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16497
16498 * lex.c (java_lang_cloneable): Initialize.
16499 * parse.y (java_lang_cloneable): New static variable.
16500 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
16501 doing one more qualification round.
16502 (valid_ref_assignconv_cast_p): Reject null source or
16503 destination. Allow an array to be cast into java.lang.Cloneable.
16504 (patch_cast): Swapped two first arguments to first call to
16505 valid_ref_assignconv_cast_p.
16506
16507 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
16508
16509 * parse.h: DECL_P renamed JDECL_P.
16510 * parse.y: DECL_P replaced by JDECL_P.
16511 (build_array_from_name): Always use pointer's type.
16512 (patch_bc_statement): Extra code to search continue target in a
16513 for loop. Fixed comments. Continue target is current loop when
16514 unlabeled.
16515
16516 1999-02-05 Andrew Haley <aph@cygnus.com>
16517
16518 * class.c (make_class_data): The superclass of an interface should
16519 be null, not class Object.
16520
16521 * lex.c (java_lex): Sign extend hex literals.
16522
16523 1999-02-04 Andrew Haley <aph@cygnus.com>
16524
16525 * class.c (build_utf8_ref): Output signatures using '.' as a
16526 separator, rather than '/'.
16527 (make_class_data): Likewise.
16528
16529 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
16530
16531 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16532 mkstemp.o. Get them from libiberty now.
16533
16534 1999-02-02 Jeffrey A Law (law@cygnus.com)
16535
16536 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16537
16538 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16539
16540 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
16541 from libiberty.h
16542
16543 1999-02-02 Per Bothner <bothner@cygnus.com>
16544
16545 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16546 * jcf-write.c (generate_bytecode_return): New function.
16547 (generate_bytecode_insns): Use it, for RETURN_EXPR.
16548
16549 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
16550 generate special [fd]const_[01] instructions.
16551
16552 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
16553
16554 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
16555 handling OPCODE_lookupswitch or OPCODE_tableswitch.
16556
16557 1999-02-01 Per Bothner <bothner@cygnus.com>
16558
16559 * parse.y (patch_method_invocation): Handle calling static methods,
16560 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16561
16562 * parse.y (java_complete_lhs): Don't complain about unreachable
16563 exit condition in a do-while statement.
16564
16565 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
16566
16567 * lex.c (java_read_char): Fixed utf8 decoding.
16568 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
16569 range.
16570 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
16571 comments. Local variable `all_primitive' is gone. Broadened
16572 acceptance of `0' to floating point targets. `long' can now be
16573 widened to `double' or `float'.
16574 (valid_method_invocation_conversion_p): Added leading
16575 comment. Fixed tabulation.
16576 (build_string_concatenation): Optimize out left or right empty
16577 string constants.
16578
16579 1999-01-28 Per Bothner <bothner@cygnus.com>
16580
16581 * jcf-write.c (localvar_alloc): Only emit entry for
16582 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16583 (generate_bytecode_insns): Only call put_linenumber if
16584 debug_info_level > DINFO_LEVEL_NONE.
16585 * jvspec.c (lang_specific_driver): If no -O* or -g* option
16586 is specified, add -g1 (for compatibility wih javac).
16587
16588 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
16589
16590 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16591 gjavah.o, check-init.o, jv-scan.o
16592
16593 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16594
16595 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16596
16597 * gjavah.c: Include config.h and system.h.
16598
16599 * javaop.h (inline): Don't define, its handled by system.h.
16600 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16601 from `inline' to `static inline'.
16602
16603 * jcf.h (inline): Don't define, its handled by system.h.
16604
16605 * lex.c (inline): Likewise.
16606
16607 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
16608
16609 * lang-specs.h: Map -Qn to -fno-ident.
16610
16611 1999-01-29 Richard Henderson <rth@cygnus.com>
16612
16613 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16614
16615 1999-01-29 Tom Tromey <tromey@cygnus.com>
16616
16617 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16618 then cast it to Object before calling `append' method.
16619
16620 1999-01-28 Per Bothner <bothner@cygnus.com>
16621
16622 * check-init.c (check_bool2_init, check_bool_init, check_init):
16623 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16624 * jcf-write.c (generate_bytecode_insns): Likewise.
16625
16626 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16627
16628 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16629 * parse.y (patch_cast): Allow a boolean to be cast into a
16630 boolean.
16631
16632 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16633
16634 * parse.y: (class_declaration:): Fixed indentation.
16635 (class_member_declaration:): Extra `;' after field declaration now
16636 accepted.
16637 (interface_declaration:): Removed debug messages in error reports.
16638 (patch_binop): Nodes created and returned inherit the orignal
16639 node's COMPOUND_ASSIGN_P flag value.
16640 (patch_cast): Fix cast from char to floating point.
16641
16642 1999-01-25 Andrew Haley <aph@cygnus.com>
16643
16644 * except.c, java-except.h (expand_resume_after_catch): new
16645 function.
16646 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16647 to branch back to main flow of control after a catch block.
16648
16649 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16650
16651 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16652 $(srcdir)/../system.h.
16653 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16654 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16655 (jcf-write.o): Likewise.
16656 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16657 (mangle.o): Depend on $(srcdir)/../toplev.h.
16658 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16659 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16660
16661 * class.c: Include output.h and parse.h.
16662 (mangled_classname): Add the `const' keyword to a char*.
16663 (find_named_method): Hide unused function definition.
16664 (build_utf8_ref): Change type of variable `c' to unsigned char.
16665 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16666 (build_class_ref): Add the `const' keyword to a char*.
16667 (layout_class_method): Remove unused variable `buf'.
16668
16669 * decl.c (find_local_variable): Remove unused variable `rtl'.
16670 (pushdecl): Likewise for variables `different_binding_level' and
16671 `oldglobal'.
16672 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16673 (maybe_build_cleanup): Likewise for parameter `decl'.
16674
16675 * except.c (expand_start_java_handler): Mark parameter `range'
16676 with ATTRIBUTE_UNUSED.
16677
16678 * expr.c: Include except.h.
16679 (pop_type): Remove unused variable `i'.
16680 (pop_value): Likewise for variables `n_words' and `i'.
16681 (expand_java_arrayload): Likewise for variable `convert'.
16682 (java_lang_expand_expr): Likewise for variables `op0', `type',
16683 `mode', `unsignedp', `node' and `elements'.
16684 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16685 `eh_ranges'.
16686 (process_jvm_instruction): Add a `const' qualifier to a char*.
16687
16688 * gjavah.c (output_directory): Add the `const' keyword to a char*.
16689 (temp_directory): Likewise.
16690 (print_c_decl): Likewise.
16691 (print_method_info): Likewise.
16692 (decode_signature_piece): Likewise.
16693 (print_mangled_classname): Likewise.
16694
16695 * java-except.h: Provide prototypes for maybe_start_try,
16696 maybe_end_try and add_handler.
16697
16698 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16699 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
16700 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16701 init_expr_processing, push_super_field, init_class_processing,
16702 can_widen_reference_to, class_depth, verify_jvm_instructions,
16703 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16704 set_local_type, merge_type_state, push_type, load_type_state,
16705 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16706 emit_unicode_mangled_name): Add prototypes.
16707
16708 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16709 (print_signature_type): Use ISDIGIT, not isdigit.
16710 (print_signature): Remove unused variable `j'.
16711
16712 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16713 int when comparing against one.
16714
16715 * jcf-parse.c: Include toplev.h.
16716
16717 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
16718 (localvar_free): Remove unused variable `i'.
16719 (generate_bytecode_conditional): Likewise for variable `kind'.
16720
16721 * jv-scan.c: Include config.h and system.h. Remove redundant
16722 OS header and gansidecl.h includes.
16723 (warning): Add the `const' keyword to a char*. Also add
16724 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
16725 __STDC__, when determining whether to use ANSI-isms.
16726 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
16727 (xmalloc): Don't redundantly prototype here.
16728 (main): Remove unused parameter `envp'. Also fix the arguments
16729 passed to function `fatal' to match the format specifier.
16730
16731 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16732
16733 * mangle.c: Include toplev.h.
16734 (emit_unicode_mangled_name): Declare parameter `len'.
16735
16736 * parse.y (parse_warning_context): Add the `const' keyword to a
16737 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
16738 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16739 (issue_warning_error_from_context): Add the `const' keyword to
16740 a char*.
16741 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
16742 not `__STDC__' for whether to use ANSI-isms.
16743
16744 * typeck.c (incomplete_type_error): Mark parameters `value' and
16745 `type' with ATTRIBUTE_UNUSED.
16746 (parse_signature_type): Use ISDIGIT, not isdigit.
16747
16748 * verify.c (check_pending_block): Add the `const' keyword to a char*.
16749 (verify_jvm_instructions): Likewise. Remove unused variables
16750 `field_name' and `default_val'.
16751
16752 * zextract.c: Include config.h and system.h. Remove redundant
16753 OS header includes.
16754
16755 * zipfile.h: Prototype `read_zip_archive'.
16756
16757 1999-01-21 Andrew Haley <aph@cygnus.com>
16758
16759 * typeck.c (convert): Allow conversions to void type: some
16760 optimizations in gcc do this.
16761
16762 1999-01-21 Andrew Haley <aph@cygnus.com>
16763
16764 * typeck.c (convert_ieee_real_to_integer): New function.
16765 (convert): When not using fast-math and using hardware fp, convert
16766 an IEEE NaN to zero.
16767
16768 1999-01-18 Andrew Haley <aph@cygnus.com>
16769
16770 * parse.y (patch_binop): Do a type conversion from signed to
16771 unsigned and then back to signed when a ">>>" is found.
16772
16773 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16774
16775 * java-tree.h: (check_for_initialization): Added prototype.
16776 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16777 * parse.y (do_resolve_class): Removed unused locals.
16778 (read_import_dir): Likewise.
16779 (resolve_qualified_expression_name): Array creation
16780 expressions are valid primary expressions.
16781 (qualify_ambiguous_name): Likewise.
16782 (patch_synchronized_statement): Removed unused local.
16783
16784 1999-01-17 Jeffrey A Law (law@cygnus.com)
16785
16786 * Makefile.in (zextract.o): Add dependencies.
16787
16788 * Makefile.in: Do not put ^Ls at the start of a line.
16789
16790 1999-01-15 Per Bothner <bothner@cygnus.com>
16791
16792 * expr.c (process_jvm_instruction): Coerce to correct Throwable
16793 sub-type the result of the call that gets the exception value.
16794
16795 * parse.y (java_complete_expand_methods): If flags_syntax_only,
16796 don't call finish_class.
16797
16798 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
16799 clear found before continuing.
16800
16801 * verify.c (verify_jvm_instructions): On an array load, allow
16802 and handle top of stack to be TYPE_NULL.
16803
16804 * gjavah.c (generate_access): Translate Java package private or
16805 protected access to C++ public, but with a comment.
16806
16807 1999-01-13 Andrew Haley <aph@cygnus.com>
16808
16809 * expr.c (generate_name): Name prefix changed to avoid clashes
16810 with assembler temp labels.
16811
16812 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16813 MODIFY_EXPR. Without this, code for the assignment may not be
16814 generated at all and the synchronized statement will read an
16815 uninitialized variable.
16816
16817 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16818
16819 * class.c (maybe_layout_super_class): Fixed returned value.
16820 * lex.c: Added 1999 to the copyright.
16821 (java_init_lex): Initialize java_lang_imported.
16822 * lex.h: Added 1999 to the copyright.
16823 * parse.h: Added 1999 to the copyright.
16824 (REGISTER_IMPORT): Fixed typo in trailing macro.
16825 (CURRENT_OSB): New macro.
16826 (struct parser_ctxt): New fields osb_depth, osb_limit.
16827 * parse.y (java_lang_id): New global variable.
16828 (type_import_on_demand_declaration): Don't import java.lang.* twice.
16829 (array_creation_expression:): Use CURRENT_OSB.
16830 (dims:): Uses a stack to keep track of array dimensions.
16831 (cast_expression:): Use CURRENT_OSB.
16832 (find_expr_with_wfl): Return NULL if node found doesn't meet the
16833 conditions.
16834 (register_fields): Fixed typos in comment.
16835 (check_method_redefinition): Fixed comment indentation.
16836 (java_check_regular_methods): Set saved found wfl to NULL after
16837 having reinstalled it in the previously found DECL_NAME.
16838
16839 1999-01-10 Richard Henderson <rth@cygnus.com>
16840
16841 * gjavah.c (java_float_finite): Use a union to do type punning.
16842 (java_double_finite): Likewise.
16843
16844 1999-01-09 Per Bothner <bothner@cygnus.com>
16845
16846 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
16847 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16848 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
16849 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
16850 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16851 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
16852
16853 1999-01-08 Per Bothner <bothner@cygnus.com>
16854
16855 * check-init.c (check_init): If compiling to native, we don't
16856 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
16857
16858 1999-01-08 Tom Tromey <tromey@cygnus.com>
16859
16860 * parse-scan.y (variable_declarator_id): Set or increment
16861 bracket_count.
16862 (bracket_count): New global.
16863 (formal_parameter): Handle case where bracket pairs trail variable
16864 declarator id.
16865
16866 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
16867
16868 * jcf-parse.c (yyparse): variable len changed from a char to an
16869 int to prevent overflow.
16870
16871 1999-01-06 Per Bothner <bothner@cygnus.com>
16872
16873 * java-tree.h: Declare read_class.
16874 * jcf-parse.c (read_class): New function.
16875 (load_class): Now just call read_class.
16876
16877 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
16878 * jcf-parse.c (parse_source_file): Declare save_error_count,
16879 which is needed by java_parse_abort_on_error macro,
16880 * parse.y (java_layout_classes, java_expand_classes): Likewise.
16881
16882 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
16883 constructor, if initializing a static field.
16884 (patch_new_array_init): Set TREE_CONSTANT if it is.
16885 * expr.c (java_lang_expand_expr): For a static array constructor
16886 of primitive elements, allocate the array itself statically.
16887 Disabled until we can set the vtable field statically.
16888
16889 * check-init.c: New file. Checks for definite assignment.
16890 * Makefile.in (JAVA_OBJS): Add check-init.o.
16891 * parse.y (java_complete_expand_method): Call check_for_initialization.
16892 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
16893
16894 1999-01-06 Graham <grahams@rcp.co.uk>
16895
16896 * parse.y : include system.h instead of including
16897 standard headers directly with the exception of <dirent.h>.
16898
16899 1999-01-06 Per Bothner <bothner@cygnus.com>
16900
16901 * lex.h: Moved static function declarations to lex.c,
16902 to shut up some -Wall warnings.
16903 * lex.c: Static function declarations moved here.
16904 * jcf-dump.c: Small fixes to shut up -Wall warnings.
16905
16906 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16907
16908 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16909
16910 1998-12-22 Per Bothner <bothner@cygnus.com>
16911
16912 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
16913 * verify.c (verify_jvm_instructions): Fix off-by-one error.
16914
16915 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
16916 (localvar_alloc): Change return type to void,
16917 (emit_unop): Remove unused variable size.
16918
16919 * jcf-write.c (struct jcf_block): Add new union.
16920 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
16921 (call_cleanups): New functions.
16922 (struct jcf_partial): New fields num_finalizers and return_value_decl.
16923 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
16924 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16925 * lang.c (lang_init): Call using_eh_for_cleanups.
16926 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
16927 completing operands to patch_synchronized_statement.
16928 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16929 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16930 WITH_CLEANUP_EXPR instead of TRY_EXPR.
16931
16932 1998-12-20 John F. Carr <jfc@mit.edu>
16933
16934 * Make-lang.in: Comment out control-Ls; they upset some makes.
16935
16936 1998-12-18 Tom Tromey <tromey@cygnus.com>
16937
16938 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16939 consistently.
16940
16941 1998-12-17 Tom Tromey <tromey@cygnus.com>
16942
16943 * parse.y (DIR_SEPARATOR): New define.
16944 (check_class_interface_creation): Use it.
16945
16946 * parse-scan.y (report_main_declaration): Recognize
16947 `java.lang.String' in argument to main.
16948
16949 1998-12-16 Per Bothner <bothner@cygnus.com>
16950
16951 * parse.y (create_interface): Remove bogus test.
16952
16953 1998-12-16 Per Bothner <bothner@cygnus.com>
16954
16955 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
16956 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
16957
16958 1998-12-16 Tom Tromey <tromey@cygnus.com>
16959
16960 * parse-scan.y (qualified_name): Use correct sprintf format.
16961
16962 1998-12-15 Tom Tromey <tromey@cygnus.com>
16963
16964 * gjavah.c (print_field_info): Changed how most negative number is
16965 printed.
16966
16967 1998-12-14 Per Bothner <bothner@cygnus.com>
16968
16969 * parse.y (fold_constant_for_init): New function.
16970 (resolve_expression_name): Don't replace static final
16971 constant-initialized fields by its value.
16972 (java_complete_lhs): New. Same as java_complete_tree, except does
16973 not replace static final constant-initialized fields by their values.
16974 (register_fields): If there is an initializer, set DECL_INITIAL and
16975 MODIFY_EXPR_FROM_INITIALIZATION_P.
16976 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
16977 Only call patch_initialized_static_field if
16978 MODIFY_EXPR_FROM_INITIALIZATION_P.
16979 (patch_initialized_static_field): If not valid constant, clear
16980 DECL_INITIAL.
16981
16982 * parse.y (lookup_field_wrapper): Fix thinko.
16983
16984 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
16985 set and restore global lineno.
16986
16987 1998-12-14 Tom Tromey <tromey@cygnus.com>
16988
16989 * gjavah.c (print_field_info): If value to print is the smallest
16990 value of its size, then print as hex to avoid later warnings from
16991 C++ compiler.
16992
16993 1998-12-14 Tom Tromey <tromey@cygnus.com>
16994
16995 * gjavah.c (decompile_method): Decompile `return null'.
16996 (process_file): Generate `#pragma interface'.
16997 (method_declared): New global.
16998 (print_method_info): Set it.
16999 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17000 (print_method_info): Handle abstract methods.
17001
17002 1998-12-13 Per Bothner <bothner@cygnus.com>
17003
17004 * parse.y (patch_method_invocation): If class_decl is null
17005 (e.g. an array type), use original type.
17006
17007 * parse.y (check_thrown_exceptions): Temporary hack to suppress
17008 errors about uncaught exception from clone (of array, specifically).
17009
17010 1998-12-13 Tom Tromey <tromey@cygnus.com>
17011
17012 * gjavah.c (decompile_method): Handle all types of `return'
17013 opcode. Decompile `return this' and `return'.
17014 (method_access): New global.
17015 (print_method_info): Set it.
17016 (decompile_method): Don't decompile a synchronized method.
17017
17018 1998-12-13 Tom Tromey <tromey@cygnus.com>
17019
17020 * jcf-reader.c (jcf_parse_one_method): Recognize
17021 HANDLE_END_METHOD.
17022 * gjavah.c (HANDLE_END_METHOD): New macro.
17023 (HANDLE_CODE_ATTRIBUTE): New macro.
17024 (decompile_method): New function.
17025 (print_method_info): Don't print `;\n' at end of function decl.
17026 Include java-opcodes.h.
17027 (decompiled): New global.
17028
17029 1998-12-12 Per Bothner <bothner@cygnus.com>
17030
17031 * class.c (build_class_ref): Handle PRIMTYPE.class if
17032 flag_emit_class_files.
17033 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
17034 if flag_emit_class_files.
17035 * parse.y (java_complete_tree): Pre-liminary support for
17036 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17037
17038 * parse.y (patch_synchronized_statement): Don't call monitorexit
17039 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
17040
17041 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
17042
17043 * zipfile.h (opendir_in_zip): New declaration.
17044 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
17045 (opendir_in_zip): New function, using code from open_in_zip.
17046 (open_in_zip): Call opendir_in_zip.
17047 (find_class): Remove no-longer-used do_class_file parameter,
17048 but add source_ok parameter. Change logic so if we find a .java file,
17049 we don't look for .class in later classpath emtries.
17050 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
17051 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
17052 * gjavah.c: Update call to find_class.
17053 * jcf-dump.c: Likewise.
17054
17055 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
17056 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
17057 nothing if body is empty_stmt_node.
17058 Various little fixes so SP gets correctly adjusted.
17059 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17060 For CALL_EXPR, test if static first.
17061 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
17062 such as the ones we create for Object and Class.
17063 Set and restore current_function_decl.
17064 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17065 (note_possible_classname): New function.
17066 (read_import_entry): Removed. Merged with read_import_dir.
17067 (read_import_dir): Don't call find_class - that only gives us
17068 the first classpath entry having the needed package.
17069 Use the struct buffer data structure from buffer.h.
17070 (read_import_dir, find_in_imports_on_demand): The remembered
17071 class names now use '.' (not '/') as package separator.
17072
17073 * parse.y (java_complete_expand_methods): Call write_classfile
17074 here, and not in java_expand_classes (which only gets first class).
17075
17076 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17077
17078 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
17079 (register_fields): If a static fields has an initializer, just
17080 chain it on ctxp->static_initialized, and handle later.
17081 (java_complete_expand_methods): Force <clinit> first.
17082 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
17083 - it's already been completed.
17084 (patch_initialized_static_field): New function.
17085 (java_complete_field): Call it.
17086
17087 1998-12-12 Per Bothner <bothner@cygnus.com>
17088
17089 * expr.c (encode_newarray_type, build_new_array): New functions.
17090 * java-tree.h: Declare build_new_array.
17091 * jcf-write.c (patch_newarray): Use build_new_array.
17092
17093 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
17094 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
17095
17096 * parse.y (patch_new_array_init): Re-organize.
17097 Now is passed the actual array (pointer) type of the value.
17098 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17099 (patch_array_constructor): Removed - merged into patch_new_array_init.
17100 (java_complete_tree): Update patch_new_array_init.
17101
17102 * jcf-write.c (find_constant_index): New function.
17103 (generate_bytecode_insns): Use find_constant_index.
17104 (generate_classfile): Use find_constant_index for ConstantValue.
17105
17106 1998-12-11 Tom Tromey <tromey@cygnus.com>
17107
17108 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17109 * decl.c (init_decl_processing): Renamed dtable -> vtable.
17110 * class.c (make_class_data): Renamed dtable -> vtable, and
17111 dtable_method_count -> vtable_method_count.
17112
17113 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17114
17115 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17116 global variables, initialized.
17117 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17118 Declared new global variables.
17119 * lex.c (java_lex): Return long_zero_node, float_zero_node,
17120 double_zero_node, integer_zero_node upon direct matching.
17121 * parse.y (purify_type_name): Added function prototype.
17122 (duplicate_declaration_error_p): Consider new_type as potentially
17123 being a incomplete type. Use purify_type_name on type string.
17124 (method_header): saved_type: unused variable removed. Don't figure
17125 return type if method name is invalid.
17126 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17127 processed by patch_unaryop.
17128 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17129 increment/decrement node into its original type after binary
17130 numeric promotion on its operands.
17131
17132 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17133
17134 * parse.y (array_initializer:): Array init operand is NULL_TREE
17135 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17136 now an error. Fixed indentation problems.
17137 (patch_string): Handle error_mark_node as an argument.
17138 (patch_new_array_init): Fixed indentation problems.
17139 (array_constructor_check_entry): Removed check on null wfl_value.
17140 Return an error if wfl_value's walk returns an error.
17141
17142 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17143
17144 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17145 * lex.c (java_lex): Remember column position before advancing one
17146 token. Retain location information on OCB_TK.
17147 * lex.h (typedef struct java_lc): Added new field.
17148 * parse.h (GET_SKIP_TYPE): New macro.
17149 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17150 * parse.y (build_new_array_init, patch_new_array_init,
17151 patch_array_constructor, maybe_build_array_element_wfl,
17152 array_constructor_check_entry): New function prototypes.
17153 (switch_block:): Tagged <node>.
17154 (OCB_TK): Tagged <operator>.
17155 (array_initializer:): Installed actions.
17156 (variable_initializer): Build location information on element if
17157 necessary.
17158 (switch_statement:): Fixed indentation typo.
17159 (switch_block:): Redefined default action.
17160 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17161 (patch_assignment): Removed duplicate code.
17162 (maybe_build_array_element_wfl, build_new_array_init,
17163 patch_new_array_init, patch_array_constructor,
17164 array_constructor_check_entry): New functions.
17165
17166 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
17167
17168 * parse.y (array_initializer): Tagged <node>.
17169 (variable_initializer:): Use default rule.
17170 (array_initializer:): Defined actions.
17171 (variable_initializers:): Likewise.
17172 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17173 non-static field accesses.
17174 (patch_invoke): Fixed indentation typo.
17175 (java_complete_tree): Likewise.
17176 (build_labeled_block): Changed leading comment. Generate an error
17177 in case of duplicate loop labels.
17178 (patch_conditional_expr): Patch results of string concatenation
17179 operations.
17180
17181 1998-12-06 Per Bothner <bothner@cygnus.com>
17182
17183 * constants.c (find_methodref_index): When the class is an interface,
17184 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17185
17186 * decl.c (finit_identifier_node): Use "$finit$", rather than
17187 "<finit>" (which Sun's verifier rejects).
17188 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
17189 (generate_field_initialization_code): Removed.
17190 (fix_constructors) Don't add call to $finit$ here (wrong order).
17191 (patch_method_invocation): Add $finit$ call here.
17192
17193 * java-tree.h (CALL_USING_SUPER): New macro.
17194 * parse.y (patch_invoke): Remove im local variable.
17195 (patch_method_invocation, patch_invoke): Don't pass super parameter.
17196 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
17197 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
17198
17199 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
17200
17201 * parse.y (java_complete_tree): Don't complain about unreachable
17202 statement if it is empty_stmt_node.
17203
17204 * jcf-write.c (find_constant_wide): New function.
17205 (push_long_const): Use find_constant_wide.
17206
17207 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
17208 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
17209 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17210 Emit invokeinterface when calling an interface method.
17211 Emit invokespecial also when calling super or private methods.
17212
17213 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
17214
17215 1998-12-06 Per Bothner <bothner@cygnus.com>
17216
17217 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
17218
17219 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
17220
17221 * java-tree.h (java_layout_seen_class_methods): New function
17222 prototype.
17223 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17224 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17225 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17226 * parse.y (method_declarator:): Defined action.
17227 (issue_warning_error_from_context): input_filename saved, set to
17228 the appropriate value and restored after java_error is called.
17229 (build_unresolved_array_type): Fixed comment.
17230 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17231 (method_header): Deal with return type the same way type are
17232 handled for fields and method's parameters and local variables
17233 types are handled.
17234 (check_method_redefinition): Removed extra CR.
17235 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17236 (java_layout_seen_class_methods): New function.
17237 (java_layout_classes): Call java_layout_seen_class_methods.
17238
17239 1998-12-03 Per Bothner <bothner@cygnus.com>
17240
17241 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
17242
17243 1998-12-03 Per Bothner <bothner@cygnus.com>
17244
17245 * jcf-dump.c (main): Fix error message.
17246 * jcf-path.c (add_entry): Style fix.
17247
17248 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
17249
17250 * class.c (layout_class_method): Call build_java_argument_signature
17251 on constructors too.
17252 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
17253 (patch_method_invocation): Define a primary when resolving an
17254 expression name. Augmented comment on code checking illegal `this'
17255 usage. Loosened it test by accepting NEW_CLASS_EXPR.
17256
17257 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
17258
17259 * class.c (layout_class_method): Don't report error on non-static
17260 overriding static if the method is private.
17261 * java-tree.h (finish_class): Prototype added.
17262 * lex.c (java_get_line_col): Handle col argument -2 value.
17263 * parse.h: All static method declarations moved to parse.y.
17264 * parse.y: Now contains all static method declarations previously
17265 found in parse.h.
17266 (find_expr_with_wfl, missing_return_error,
17267 unreachable_stmt_error): New functions.
17268 (java_get_real_method_name): Identify constructors bearing class
17269 names in source code compiled classes only.
17270 (java_complete_expand_methods): Call missing_return_error.
17271 (invocation_mode): Private methods invoked as static methods.
17272 (java_complete_tree): Call unreachable_stmt_error.
17273
17274 1998-12-01 Tom Tromey <tromey@cygnus.com>
17275
17276 * Makefile.in (+target): Removed.
17277 (+xmake_file): Likewise.
17278 (+tmake_file): Likewise.
17279 (.NOEXPORT): Removed duplicate.
17280
17281 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17282
17283 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17284
17285 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
17286
17287 * jvgenmain.c: Remove the xmalloc prototype, we get it from
17288 libiberty.h. Provide an xmalloc definition.
17289
17290 * jvspec.c: Remove the xmalloc prototype.
17291
17292 * parse-scan.y: Include config.h and system.h. Don't include
17293 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
17294 Provide an xstrdup definition.
17295
17296 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
17297
17298 * jcf-path.c (add_entry): Recognize ".jar" too.
17299 * lang-specs.h: Likewise.
17300
17301 1998-11-26 Per Bothner <bothner@cygnus.com>
17302
17303 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
17304 soft_monitorenter_node, soft_monitorexit_node, throw_node.
17305
17306 * jcf-write.c (generate_bytecode_insns):
17307 Handle pre/post-increment/decrement of long.
17308
17309 * jcf-write.c (generate_bytecode_insns):
17310 Handle missing exception handler (finally for synchronized).
17311
17312 1998-11-25 Per Bothner <bothner@cygnus.com>
17313
17314 * java-tree.h (end_params_node): Declare global.
17315 * decl.c (end_params_node): New global.
17316 (init_decl_processing, start_java_method): Use end_params_node for
17317 end of list of parameter types. Follows correct gcc conventions.
17318 * expr.c (pop_argument_types, pop_arguments): Likewise.
17319 * lang.c (put_decl_node): Likewise.
17320 * typeck.c (various places): Likewise.
17321 * class.y (various places): Likewise.
17322 * parse.y (various places): Likewise.
17323
17324 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
17325 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
17326
17327 * class.c: Add #include flags.h, remove no-longer needed declaration.
17328
17329 * class.c (layout_class_method): Remove commented-out code, re-format.
17330 Don't add vtable entry (or index) for private methods.
17331 * expr.c (expand_invoke): A private method is implicitly final.
17332 * class.c (make_class_data): If inlining or optimizing,
17333 skip private methods.
17334
17335 * class.c (finish_class): New function. Calls existing methods,
17336 but alls emits deferred inline functions.
17337 * jcf-parse.c (parse_class_file): Call finish_class.
17338 * parse.y (java_complete_expand_methods): Likewise.
17339
17340 * expr.c (build_java_binop): Explicit default, to silence -Wall.
17341
17342 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
17343
17344 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
17345
17346 * jcf-write.c (generate_bytecode_conditional): Fix typo.
17347
17348 1998-11-24 Per Bothner <bothner@cygnus.com>
17349
17350 * (generate_classfile): Always write class access flag with
17351 ACC_SUPER set.
17352
17353 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
17354
17355 * class.c (maybe_layout_super_class): New function.
17356 (layout_class): Reorganized. Loop on class methods dispatched into
17357 a new function. Call maybe_layout_super_class.
17358 (layout_class_methods, layout_class_method): New functions.
17359 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
17360 class.
17361 (expand_invoke): Likewise.
17362 * java-tree.h (all_class_list): New global variable declared.
17363 (layout_class_methods, layout_class_method): New function
17364 prototypes.
17365 (LAYOUT_SEEN_CLASS_METHODS): New macro.
17366 * jcf-parse.c (all_class_list): New global variable.
17367 (load_class): Extended what class_or_name can be. Use parser
17368 context mechanism to save globals before calling jcf_parse.
17369 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
17370 is set on the file name.
17371 (jcf_parse): Layout class methods when Object is loaded, otherwise
17372 record class in all_class_list for delayed method layout.
17373 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
17374 * lang.c (put_decl_node): Decode <init> into the decl context
17375 class name.
17376 * lex.c (java_allocate_new_line): Use xmalloc.
17377 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
17378 pointers, not TREE_LIST elements.
17379 (struct parser_ctxt): Fixed comment indentations, added comments
17380 and reordered some fields.
17381 (java_check_methods): Function prototype removed.
17382 * parse.y (java_push_parser_context): Use xmalloc.
17383 (java_parser_context_restore_global): Pop extra pushed ctxp only
17384 when there's nothing next.
17385 (maybe_create_class_interface_decl): Fixed comment, add new
17386 created class decl to all_class_list.
17387 (method_header): Use GET_REAL_TYPE on argument's types.
17388 (method_declarator): Use GET_REAL_TYPE, change type to the real
17389 type in TREE_LIST dependency node. Build argument list with the
17390 real type.
17391 (create_jdep_list): Use xmalloc. Removed allocation error message.
17392 (obtain_incomplete_type): Fixed leading comment. Broadened
17393 incoming argument meaning.
17394 (register_incomplete_type): Use xmalloc. Removed allocation error
17395 message.
17396 (safe_layout_class): Fixed leading comment.
17397 (jdep_resolve_class): Reversed if statement condition and switch
17398 if and else bodies.
17399 (resolve_and_layout): Fixed leading comment. Broadened incoming
17400 argument meaning.
17401 (complete_class_report_errors): New local variable name, for
17402 clarity. purify_type_name used for all error cases.
17403 (java_get_real_method_name): Stricter check on constructors.
17404 (java_check_regular_methods): Reverse methods list only if not
17405 already laid out. Layout artificial constructor.
17406 (java_check_methods): Deleted.
17407 (source_start_java_method): Obtain incomplete type for patchable
17408 method arguments.
17409 (java_layout_classes): Fixed leading comment. Use
17410 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17411 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17412 before returning. Fixed comments.
17413 (java_expand_classes): Check for errors up front.
17414 (patch_method_invocation): Class to search is resolved and laid
17415 out.
17416
17417 1998-11-24 Per Bothner <bothner@cygnus.com>
17418
17419 * expr.c (java_lang_expand_expr): Add missing emit_queue.
17420
17421 * javaop.h (int8): Removed - not used.
17422 (jbyte): Redefine portably with correct signedness.
17423
17424 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
17425
17426 * jcf-write.c (generate_bytecode_insns): Fix typo
17427 OPCODE_getstatic to OPCODE_getfield.
17428
17429 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
17430 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
17431 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17432
17433 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17434
17435 * jcf-parse.c (jcf_parse_source): Function returned type is
17436 void. Added prototype.
17437 (jcf_parse): Function returned type is void.
17438 (yyparse): Remove call to fclose on the last parsed file.
17439
17440 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17441
17442 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17443
17444 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17445 (layout_class): Cope with methods featuring WFL in decl names.
17446 * decl.c (unqualified_object_id_node): New global variable,
17447 initialized.
17448 (build_decl_no_layout): Removed.
17449 * expr.c (build_primtype_type_ref): Handle Double.
17450 (java_lang_expand_expr): Fixed indentations.
17451 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17452 (flag_wall, flag_redundant, flag_not_overriding,
17453 flag_static_local_jdk1_1, unqualified_object_id_node): Global
17454 variable declarations.
17455 (build_decl_no_layout): Removed prototype.
17456 (java_get_real_method_name): Added prototype.
17457 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17458 (java_parse_abort_on_error): Macro now just returns.
17459 * jcf-parse.c (jcf_parse_source): Check fclose returned
17460 value. Call emit_register_classes if java_report_errors returns
17461 zero.
17462 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
17463 flag_static_local_jdk1_1): New integer flags.
17464 (lang_decode_option): New flags set here.
17465 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17466 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
17467 the flag_redundant variable.
17468 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
17469 when parsing java.lang.Object class.
17470 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
17471 NULL_TREE to build.
17472 (resolve_qualified_expression_name): Fixed indentation.
17473 (patch_array_ref): Changed prototype.
17474 (not_initialized_as_it_should_p): Prototype removed.
17475 (java_report_errors): Added function prototype.
17476 * parse.y (formal_parameter:): Changed error message for not yet
17477 supported final parameters.
17478 (class_type_list:): Set both PURPOSE and VALUE of created
17479 TREE_LIST to be class_type.
17480 (primary_no_new_array:): Handle class literals on primitive types.
17481 (parse_warning_context): Reinstalled correct force_error and
17482 do_warning flags setups.
17483 (java_report_errors): Changed prototype. Return java_error_count
17484 value.
17485 (variable_redefinition_error): Consider treating variable type as
17486 a fake pointer.
17487 (create_interface): Warn about redundant abstract modifier if
17488 flag_redundant is set. Changed error message.
17489 (lookup_field_wrapper): Save/restore globals before/after looking
17490 up field.
17491 (duplicate_declaration_error_p): Consider treating declaration
17492 type as a fake pointer.
17493 (register_fields): Extract real type from dependency node. Check
17494 for duplicate field declaration after type adjustment. Use
17495 DECL_INITIAL to store static final initialized values.
17496 (method_header): Extract real function type from dependency node.
17497 (check_abstract_method_header): Use GET_METHOD_NAME.
17498 (obtain_incomplete_type): Layout fake pointer type.
17499 (safe_layout_class): Don't try to check for methods before layout.
17500 (java_complete_class): Don't check for correct throws clause
17501 elements inheritance here.
17502 (resolve_and_layout): Broadened name parameter meaning.
17503 (reset_method_name): Use GET_METHOD_NAME.
17504 (java_get_real_method_name): New function.
17505 (java_check_regular_methods): Don't check methods in
17506 java.lang.Object. Verify lineage of throws clause elements. Use
17507 flag_no_overriding in warning report.
17508 (check_throws_clauses): Don't check if class was from
17509 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
17510 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
17511 (declare_local_variables): Use flag_static_local_jdk1_1 to report
17512 warning on unsupported final local variables. Use build_decl
17513 instead of build_decl_no_layout. Get real local variable type from
17514 dependency node.
17515 (source_start_java_method): Get real parameter type from
17516 dependency node. Call build_decl instead of build_decl_no_layout.
17517 (java_layout_classes): Reverse tree and layout type and class as
17518 required. Mark class as loaded when done.
17519 (resolve_field_access): Fixed indentation. Restricted condition
17520 leading to static field access code generation. Set field_type
17521 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
17522 (resolve_qualified_expression_name): Initialize type_found to
17523 null. Handle static field resolved during qualification. Fixed
17524 layout on non primitive field decl types.
17525 (not_accessible_p): Fixed typo in comment.
17526 (patch_method_invocation): Resolve and layout class to search from
17527 type.
17528 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
17529 layout non primitive type, if necessary. Make method node only to
17530 report errors.
17531 (find_applicable_accessible_methods_list): Consider WFL'ed method
17532 decl names. Fixed indentation.
17533 (argument_types_convertible): Resolve and layout target type if
17534 necessary.
17535 (java_complete_tree): Fixed indentation problems. Rewrote
17536 CALL_EXPR thrown exceptions check. Re-installed further processing
17537 of the assignment in certain cases.
17538 (patch_assignment): Call maybe_build_primttype_type_ref to perform
17539 inlining on class literals.
17540 (valid_builtin_assignconv_identity_widening_p): Cope with constant
17541 0 literal.
17542 (valid_method_invocation_conversion_p): Likewise.
17543 (patch_string): Temporary disable forbidden use of `this' in
17544 explicit constructor invocations when doing string concatenation
17545 within their scope.
17546 (patch_unaryop): Added comment. Reinstalled code to disable
17547 further check on assignment operation with cast expression RHS.
17548 (patch_switch_statement): Fixed indentation.
17549 (build_try_statement): Call build_decl instead of
17550 build_decl_no_layout.
17551 (patch_synchronized_statement): Likewise.
17552 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
17553 IS_UNCHECKED_EXPRESSION_P.
17554 (check_thrown_exceptions_do): Changed leading comment. Resolve and
17555 layout argument exception type.
17556 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
17557 of IS_UNCHECKED_EXPRESSION_P.
17558
17559 1998-11-18 Anthony Green <green@cygnus.com>
17560
17561 * jcf-parse.c (yyparse): Open class file in binary mode.
17562
17563 1998-11-15 Per Bothner <bothner@cygnus.com>
17564
17565 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
17566
17567 * jcf-write.c (perform_relocations): Move check out one loop.
17568
17569 1998-11-15 Anthony Green <green@hoser.cygnus.com>
17570
17571 * Make-lang.in: Fix reference to srcdir.
17572 * jv-scan.c: Add missing xmalloc prototype.
17573 * jvgenmain.c: Ditto.
17574
17575 1998-11-15 Per Bothner <bothner@cygnus.com>
17576
17577 * decl.c (error_mark_node), java-tree.h: New global.
17578 * parse.y: Use empty_stmt_node instead of size_zero_node.
17579 (build_if_else_statement): If missing else, use empty_stmt_node.
17580
17581 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
17582 (java_complete_expand_method): Complain if return is missing.
17583 (java_check_regular_methods): Comment out incorrect error check.
17584 (not_accessible_p): Fix incorrect handling of protected methods.
17585 (patch_method_invocation): Pass correct context to not_accessible_p.
17586 (find_applicable_accessible_methods_list): Likewise.
17587 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
17588 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
17589 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
17590 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
17591
17592 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
17593 (push_int_const): Remove reundant NOTE_PUSH.
17594 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
17595 (- case SWITCH_EXPR): Fix code generation bug.
17596 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
17597 (generate_classfile): More robust for abstract methods.
17598
17599 1998-11-15 Anthony Green <green@cygnus.com>
17600
17601 * Makefile.in: jv-scan and jvgenmain all require libiberty.
17602 * Make-lang.in: Ditto.
17603
17604 * jv-scan.c: Remove xmalloc and xstrdup definitions.
17605 * jvgenmain: Ditto.
17606
17607 1998-11-15 Per Bothner <bothner@cygnus.com>
17608
17609 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
17610
17611 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
17612
17613 1998-11-14 Per Bothner <bothner@cygnus.com>
17614
17615 Allow uses of interface types to verify. This is not really
17616 type-safe, but it matches what Sun does, and is OK as long as
17617 there are appropriate run-time checks.
17618 * verify.c (merge_types): If merging two interface types,
17619 just set the result to java.lang.Object.
17620 * expr.c (pop_type): Any interface is matches by java.lang.Object.
17621
17622 1998-11-13 Tom Tromey <tromey@cygnus.com>
17623
17624 * gjavah.c (main): Handle --output-class-directory argument.
17625 * jvspec.c (lang_specific_driver): Translate `-d' into
17626 -foutput-class-dir.
17627 * jcf.h (jcf_write_base_directory): Declare.
17628 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17629 * lang-options.h: Mention -foutput-class-dir.
17630 * jcf-write.c (jcf_write_base_directory): New global.
17631 (make_class_file_name): Put generated .class file into `-d'
17632 directory, or into source directory if -d not given. Function now
17633 static.
17634 (write_classfile): Free class file name. Handle case where class
17635 file name is NULL.
17636 (DIR_SEPARATOR): New macro.
17637 Include <sys/stat.h>
17638
17639 * Makefile.in (prefix): New macro.
17640
17641 1998-11-12 Per Bothner <bothner@cygnus.com>
17642
17643 * parse.y (patch_invoke): Do less if flag_emit_class_files.
17644 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
17645 here (done in patch_invoke instead).
17646 (case_identity): Moved here from parse.y.
17647
17648 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
17649 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
17650 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
17651 so they can be efficiently scanned without recursion.
17652 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17653 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
17654 in BLOCK iteratively, rather than recursively.
17655
17656 * parse.y (do_unary_numeric_promotion): New function.
17657 (patch_unaryop, patch_binop, patch_array_ref): Use it.
17658
17659 * parse.y (patch_newarray): Various fixes.
17660
17661 Re-do handling of switch statements (for proper block scoping).
17662 * parse.y: Add just a single block for the enture switch block,
17663 but don't create any "case blocks".
17664 (group_of_labels): Rmeoved unneeded non-terminal.
17665 CASE_EXPR and DEFAULT_EXPR are added to current block.
17666 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
17667 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17668 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
17669 * parse.y (wfl_operator, print_int_node): Make non-static.
17670 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
17671 as part of recursive scan of block.
17672 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
17673 (patch_switch_statement): Most tests move dinto java_complete_tree.
17674
17675 * parse.y: Make various production be non-typed (void).
17676 * parse.y (parse_error): Merged into issue_warning_error_from_context.
17677 * parse.y (add_stmt_to_compound): Don't create/change extra node.
17678 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
17679
17680 * jcf-write.c (struct jcf_handler): New type.
17681 (struct jcf_switch_state): New type.
17682 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
17683 (alloc_handler, emit_unop, emit_reloc): New functions.
17684 (adjust_typed_op): Add extra parameter ("max type" offset).
17685 (emit_switch_reloc, emit_case-reloc): New function.
17686 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
17687 (generate_bytecode_insns): Support REAL_CST, switch statements,
17688 exception handling, method calls, object/array creation, and more.
17689
17690 * class.c: Remove some unused variables.
17691 * constants.c (find_string_constant): New function.
17692 (count_constant_pool_bytes): Fix to correctly handle wide constants.
17693 * decl.c (complete_start_java_method): Don't _Jv_InitClass
17694 if flag_emit_class_files.
17695
17696 1998-11-12 Tom Tromey <tromey@cygnus.com>
17697
17698 * jcf-io.c (find_class): Added explanatory comment.
17699
17700 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
17701 trailing slash to `.zip' entries.
17702
17703 * jvspec.c (lang_specific_driver): Correctly handle case where
17704 GC_NAME not defined.
17705
17706 1998-11-11 Tom Tromey <tromey@cygnus.com>
17707
17708 * jvspec.c (GC_NAME): New define.
17709 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
17710 if required.
17711 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17712
17713 1998-11-11 Per Bothner <bothner@cygnus.com>
17714
17715 * jcf-dump.c (TABLE_SWITCH): Fix typos.
17716
17717 1998-11-11 Tom Tromey <tromey@cygnus.com>
17718
17719 * jcf-dump.c (main): Correctly recognize `--'-style long options.
17720
17721 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17722
17723 * class.c (is_compiled_class): Call safe_layout_class for class
17724 compiled from source.
17725 * conver.h (convert_to_integer, convert_to_real,
17726 convert_to_pointer): Added prototypes.
17727 * decl.c (init_decl_processing): Non longer push the decls of
17728 `methodtable', `constants', `Class', `Field', `dispatchTable'
17729 `jexception' and `Method'.
17730 * expr.c (build_invokeinterface): New function.
17731 (expand_invoke): static variable CLASS_IDENT now in
17732 build_invokeinterface. Use build_invokeinterface.
17733 (expand_java_field_op): Moved code to inline
17734 java.lang.PRIMTYPE.TYPE into a function.
17735 (build_primtype_type_ref): New function.
17736 * java-tree.def (INSTANCEOF_EXPR): New tree code.
17737 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17738 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17739 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17740 (DECL_LOCAL_STATIC_VALUE): New macro.
17741 (build_invokeinterface, build_primtype_type_ref): New function
17742 prototypes.
17743 (java_parse_abort_on_error): Macro rewritten.
17744 * jcf-parse.c (current_method): Add comment to declaration.
17745 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17746 Function prototypes fixed.
17747 (jcf_parse_source): push/pop parser context. save/restore global.
17748 (parse_source_file): Fixed leading comment. Now take a
17749 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17750 classes and pop the parser context anymore.
17751 (yyparse): Push parser context, save globals, parse the source
17752 file, restore globals and pop the parser context when processing a
17753 source file.
17754 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17755 * lex.c (java_parse_doc_section): New function.
17756 (java_lex): Call java_parse_doc_section when appropriate. Build an
17757 operator around INSTANCEOF_TK.
17758 * lex.h (java_lineterminator, java_sprint_unicode,
17759 java_unicode_2_utf8, java_lex_error, java_store_unicode):
17760 Prototypes rewritten.
17761 (java_parse_escape_sequence, java_letter_or_digit_p,
17762 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17763 java_read_unicode, java_store_unicode, java_read_char,
17764 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17765 Added function prototypes.
17766 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17767 define.
17768 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17769 New macros
17770 (struct parser_ctxt): New fields: deprecated,
17771 current_parsed_class_un, gclass_list.
17772 (fix_method_argument_names, issue_warning_error_from_context,
17773 resolve_package, lookup_package_type): New function prototypes.
17774 (resolve_expression_name): Fixed function prototype.
17775 (find_applicable_accessible_methods_list): Fixed indentation, added
17776 extra argument in prototype.
17777 (check_final_assignment, build_null_of_type, check_deprecation,
17778 check_method_redefinition, reset_method_name,
17779 java_check_regular_methods, java_check_abstract_methods,
17780 maybe_build_primttype_type_ref): New function prototype.
17781 * parse.y (conver.h): Include.
17782 (INSTANCEOF_TK): Tagged <operator>.
17783 (single_type_import_declaration): Use REGISTER_IMPORT macro.
17784 (relational_expression:): Build binop for instanceof.
17785 (java_push_parser_context): Remember ctxp->gclass_list across
17786 contexts.
17787 (java_pop_parser_context): Simply return if no context
17788 exists. Remember gclass_list across contexts.
17789 (issue_warning_error_from_context): New function.
17790 (parse_error_context): Don't setup ctxp->elc here. Call
17791 issue_warning_error_from_context instead.
17792 (parse_warning_context): Likewise.
17793 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17794 setup. Link new class/interface to ctxp->gclass_list.
17795 (add_superinterfaces): Register interface as incomplete if not
17796 loaded.
17797 (create_class): Remember class unqualified name in
17798 ctxp->current_parsed_class_un. Check class deprecation.
17799 (register_fields): Check field deprecation. Remember static final
17800 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17801 processing INIT.
17802 (method_header): New local variable ORIG_ARG. Use unqualified
17803 current class name for check on constructor errors. Promote return
17804 type if of record type. Argument list fix moved in
17805 fix_method_argument_names, called here. Check method deprecation.
17806 (fix_method_argument_names): New function.
17807 (method_declarator): Promote record typed arguments.
17808 (safe_layout_class): Check class methods before layout.
17809 (java_complete_class): Compute field layout when patched.
17810 (do_resolve_class): Try to load class after having it renamed
17811 after the package name.
17812 (get_printable_method_name): Use DECL_CONTEXT.
17813 (reset_method_name): New function.
17814 (check_method_redefinition): Use reset_method_name.
17815 (java_check_regular_methods): New local variable
17816 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17817 names for error report. Check for compile-time error when method
17818 found has default (package) access.
17819 (java_check_abstract_methods): Now takes an interface DECL node as
17820 an argument. Also reinstall real name on unchecked
17821 overriding/hiding methods for error report.
17822 (java_check_methods): Fixed leading comment. Get classes to verify
17823 from ctxp->gclass_list. Use CHECK_METHODS macro and set
17824 CLASS_METHOD_CHECKED_P on class verification.
17825 (lookup_java_method2): Get real method name if necessary.
17826 (find_in_imports): Don't check package class access here.
17827 (resolve_package, lookup_package_type): New functions.
17828 (java_layout_classes): Fixed leading comment. Take classes to be
17829 laid out from ctxp->gclass_list.
17830 (java_complete_expand_methods): Don't expand native and abstract
17831 methods.
17832 (java_expand_classes): New function.
17833 (resolve_expression_name): Use additional argument ORIG. Retrieve
17834 values of static final field of primitive types.
17835 (resolve_field_access): Handles static final field of promotive
17836 type.
17837 (resolve_qualified_expression_name): Handle STRING_CST as
17838 primaries and package name resolution. Check deprecation on found
17839 decls. Set where_found and type_found on non static field resolved
17840 during qualification. Layout non primitive field decl types.
17841 (check_deprecation): New function.
17842 (maybe_access_field): Simplified.
17843 (patch_method_invocation_stmt): Local variable CLASS_TYPE
17844 removed. Reverse method's argument when primary is a type. Don't
17845 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17846 instead. Include abstract class in the list of class searchable
17847 for constructors. Use DECL_CONTEXT of found method for access
17848 checks. Check method deprecation.
17849 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17850 converting arguments. Handle INVOKE_INTERFACE.
17851 (lookup_method_invoke): Search constructor using existing
17852 infrastructure (don't rely on lookup_java_constructor anymore).
17853 (find_applicable_accessible_methods_list): Extra argument flag
17854 LC. Now include constructor in the search.
17855 (qualify_ambiguous_name): Conditional expression are primaries.
17856 (not_initialized_as_it_should_p): static final are always
17857 initialized.
17858 (java_complete_tree): Pass extra NULL argument to
17859 resolve_expression_name. Stricter test to carry on patching
17860 assignments. New case for INSTANCEOF_EXPR.
17861 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17862 (check_final_assignment, maybe_build_primttype_type_ref): New
17863 functions.
17864 (patch_assignment): Detect resolved static finals and carry normal
17865 assignment error check on them. Inline PRIMTYPE.TYPE read access.
17866 (try_builtin_assignconv): Access constant 0 on all primitive
17867 types.
17868 (valid_builtin_assignconv_identity_widening_p): Accept identical
17869 types. Accept all promoted type on int type.
17870 (valid_ref_assignconv_cast_p): Accept a null pointer to be
17871 assigned to a reference.
17872 (valid_method_invocation_conversion_p): Accept to check null
17873 pointers.
17874 (build_binop): Merge declaration and initialization of local
17875 variable BINOP.
17876 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17877 numeric types. Improved validity test for qualify operators on
17878 references.
17879 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17880 and PREINCREMENT_EXPR. Also detect resolved static finals of a
17881 primitive type and issue the appropriate error message.
17882 (resolve_type_during_patch): Mark class loaded when resolved.
17883 (patch_cast): Allow null to be cased to reference types.
17884 (build_null_of_type): New function.
17885 (patch_array_ref): Handle array on references correctly.
17886 (patch_return): Removed unused local variable MODIFY. Force
17887 boolean to be returned as integers. Allows null to be returned by
17888 a function returning a reference.
17889 * typeck.c (convert_to_integer, convert_to_real,
17890 convert_to_pointer): Prototypes moved to convert.h
17891 (lookup_argument_method): Use method real name, if necessary.
17892
17893 1998-10-30 Tom Tromey <tromey@cygnus.com>
17894
17895 * class.c (build_class_ref): Changed name of primitive classes to
17896 start with `_Jv_'.
17897
17898 * class.c (make_class_data): Renamed fields: nmethods to
17899 method_count, method_count to dtable_method_count. Always set
17900 `state' field to 0.
17901 * decl.c (init_decl_processing): Likewise.
17902
17903 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17904
17905 * class.c (layout_class): Don't mangle <finit>, produce
17906 __finit<class> instead. Don't verify artificial methods.
17907 * decl.c (finit_identifier_node): New declared global.
17908 (init_decl_processing): finit_identifier_node initialized.
17909 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17910 * java-tree.h (finit_identifier_node): Declared as extern.
17911 (struct lang_decl): New field called_constructor.
17912 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17913 (CLASS_HAS_FINIT_P): New macro.
17914 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17915 explicit constructor invocation.
17916 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17917 CALL_SUPER_CONSTRUCTOR_P): New macros.
17918 (write_classfile): Added prototype.
17919 * jcf-parse.c (jcf_parse_source): Parse and remember for
17920 generation if the file was seen on the command line.
17921 (parse_source_file): Don't write the class file here.
17922 (yyparse): Loop on files rewritten. Set current_jcf.
17923 (parse_zip_file_entries): Parse class file only if it was found.
17924 * lang.c (init_parse): Don't open command line provided filename
17925 here.
17926 (lang_parse): Don't set main_jcf anymore.
17927 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17928 (JCONSTRUCTOR_CHECK): New macro.
17929 (JBSC_TYPE_P): New macro.
17930 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17931 (COMPLETE_CHECK_OP_2): New macro.
17932 (struct parse_ctxt): New field explicit_constructor_p.
17933 (check_class_interface_creation): Fixed prototype indentation.
17934 (patch_method_invocation_stmt): Prototype reflects added argument.
17935 (patch_invoke): Likewise.
17936 (complete_method_declaration, build_super_invocation,
17937 verify_constructor_circularity,
17938 build_this_super_qualified_invocation, get_printable_method_name,
17939 patch_conditional_expr, maybe_generate_finit, fix_constructors,
17940 verify_constructor_super, create_artificial_method,
17941 start_artificial_method_body, end_artificial_method_body,
17942 generate_field_initialization_code): New function prototypes.
17943 * parse.y: Fixed leading comment
17944 (constructor_header:, constructor_body:, block_end:): Rules tagged
17945 <node>.
17946 (type_declaration:): Call maybe_generate_finit.
17947 (method_declaration:): Action for method_body: placed in new
17948 function complete_method_declaration, called here.
17949 (constructor_declaration:): Defined actions. Removed leading
17950 FIXME.
17951 (constructor_header:): New rule with action.
17952 (constructor_body:): Rule rewritten using block_begin: and
17953 block_end:. Defined actions.
17954 (constructor_declarator:, explicit_constructor_invocation:):
17955 Defined actions.
17956 (block:): Use new rules block_begin: block_end:.
17957 (block_begin:, block_end:): New rules and actions.
17958 (block_statements:): Fixed error message for explicit
17959 constructors.
17960 (method_invocation:): Call build_this_super_qualified_invocation
17961 if primary is `this' or `super' was seen.
17962 (conditional_expression:): Action defined.
17963 (extra_ctxp_pushed_p): New static global flag.
17964 (java_parser_context_save_global): Create parser context if
17965 necessary. Use extra_ctxp_pushed_p to remember it.
17966 (java_parser_context_restore_global): Pop extra parser context if
17967 one exists.
17968 (build_array_from_name): Array on primitive types are marked
17969 loaded.
17970 (register_fields): Restore new name in field initializer
17971 expression if type was altered. Non static fields initialized upon
17972 declaration marked initialized.
17973 (maybe_generate_finit): New function.
17974 (maybe_generate_clinit): Use create_artificial_method,
17975 start_artificial_method_body, end_artificial_method_body. Generate
17976 debug info for enclosed initialization statements.
17977 (method_header): Fixed leading comment. Check constructor
17978 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17979 accordingly.
17980 (complete_method_declaration, constructor_circularity_msg,
17981 verify_constructor_circularity): New functions.
17982 (get_printable_method_name): New function.
17983 (check_method_redefinition): Don't rename <finit> methods. Fix
17984 declared constructor names. Error message for
17985 constructors modified.
17986 (java_check_regular_methods): Local variable seen_constructor
17987 renamed saw_constructor. Skip verification on constructors. Create
17988 default constructor with create_artificial_method.
17989 (java_check_methods): Removed unnecessary empty line.
17990 (create_artificial_method, start_artificial_method_body,
17991 end_artificial_method_body): New functions.
17992 (java_layout_classes): Changed leading comment. Reverse fields
17993 list if necessary. Always layout java.lang.Object if being
17994 defined.
17995 (java_complete_expand_methods): Verify constructor circularity.
17996 (java_complete_expand_method): Call fix_constructor on
17997 constructors. Local variable no_ac_found removed. Restore
17998 bindings if method body expansion failed.
17999 (fix_constructors, verify_constructor_super,
18000 generate_field_initialization_code): New function.
18001 (java_expand_classes): Fixed leading comment. Write class file
18002 here.
18003 (resolve_expression_name): Check for illegal instance variable
18004 usage within the argument scope of an explicit constructor
18005 invocation.
18006 (resolve_qualified_expression_name): Pass extra from_super flag
18007 when invoking patch_method_invocation_stmt. New case for
18008 conditional expression when used as a primary. Check for error
18009 when acquiring super.
18010 (patch_method_invocation_stmt): Added extra argument super. New
18011 local variable is_static_flag. Set class_to_search according to
18012 the nature of the constructor invocation. Don't add `this'
18013 argument when expanding NEW_CLASS_EXPR. Check for illegal method
18014 invocation within the argument scope of explicit constructor
18015 invocation. Set is_static according to is_static_flag. Provide
18016 extra `super' argument to patch_invoke invocation.
18017 (patch_invoke): New argument from_super. Loop on arguments
18018 indentation fixed. Pass from_super to invocation_mode. New switch
18019 case INVOKE_SUPER. Fixed error message in switch default case.
18020 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18021 value.
18022 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18023 (lookup_method_invoke): Fixed prototypes in candidates list. Error
18024 message takes constructors into account.
18025 (find_applicable_accessible_methods_list): Fixed indentation.
18026 (qualify_ambiguous_name): Take explicit constructor invocation
18027 into account. Deal with a conditional expression as a primary to
18028 a method call.
18029 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18030 case. Added extra argument to patch_method_invocation_stmt.
18031 Register calls made to explicit constructor `this'. Don't call
18032 save_expr in ARRAY_REF case when emitting class files. Check for
18033 illegal use of this when expanding explicit constructor invocation
18034 arguments.
18035 (complete_function_arguments): Set and reset parser context
18036 explicit_constructor_p field value when appropriate.
18037 (build_super_invocation, build_this_super_qualified_invocation):
18038 New functions.
18039 (patch_assignment): Fixed typo.
18040 (patch_unaryop): Check on final fields occurs only when a decl
18041 exits.
18042 (patch_return): Take constructors into account.
18043 (patch_conditional_expr): New function.
18044 * typeck.c (build_java_signature): Removed unnecessary empty line.
18045
18046 1998-10-28 Jeffrey A Law (law@cygnus.com)
18047
18048 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18049
18050 1998-10-28 Tom Tromey <tromey@cygnus.com>
18051
18052 * decl.c (init_decl_processing): Renamed fields.
18053 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18054 interface_len, msize fields.
18055
18056 * class.c (make_class_data): Removed subclass_head and
18057 subclass_next fields.
18058 * decl.c (init_decl_processing): Removed subclass_head and
18059 subclass_next fields.
18060
18061 1998-10-28 Jeffrey A Law (law@cygnus.com)
18062
18063 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18064 * mangle.c (emit_unicode_mangled_name): Similarly.
18065
18066 1998-10-26 Nick Clifton <nickc@cygnus.com>
18067
18068 * jcf-parse.c (get_constant): Place braces around code to compute
18069 'd' when REAL_ARITHMETIC is not defined.
18070
18071 1998-10-25 H.J. Lu (hjl@gnu.org)
18072
18073 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18074 dependency.
18075
18076 1998-10-23 Tom Tromey <tromey@cygnus.com>
18077
18078 * lang-specs.h: `.zip' files are input to jc1.
18079
18080 1998-10-22 Per Bothner <bothner@cygnus.com>
18081
18082 * jvspecs.c: Add (but don't enable) support for combining multiple
18083 .class and .java input filenames to a single jc1 invocation.
18084 Add support for -C flag (copile to .class files).
18085 Translate -classpath and -CLASSPATH arguments.
18086 * lang-specs.h: Don't set %2 spec.
18087
18088 1998-10-22 Tom Tromey <tromey@cygnus.com>
18089
18090 * jcf-path.c (add_entry): Don't add trailing separator if entry is
18091 a .zip file.
18092 (add_path): Don't add trailing separator to non-empty path
18093 elements.
18094
18095 * lang.c (lang_decode_option): Check for -fclasspath and
18096 -fCLASSPATH before examining other `-f' options.
18097
18098 * java-tree.h (finalize_identifier_node): Don't declare.
18099 * class.c (make_class_data): Don't push "final" field.
18100 * decl.c (init_decl_processing): Don't push "final" field.
18101 (finalize_identifier_node): Removed.
18102 (init_decl_processing): Don't set finalize_identifier_node.
18103
18104 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18105
18106 1998-10-11 Anthony Green <green@cygnus.com>
18107
18108 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18109 (JV_SCAN_SOURCES): New macro.
18110 (JCF_DUMP_SOURCES): Likewise.
18111 (jcf-dump$(exeext)): New target.
18112 (jv-scan$(exeext)): New target.
18113
18114 1998-10-22 Tom Tromey <tromey@cygnus.com>
18115
18116 * Makefile.in (LEX): Removed.
18117 (LEXFLAGS): Likewise.
18118 (SET_BISON): New macro.
18119 (BISON): Removed.
18120 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
18121 spurious diffs in parse.c.
18122 ($(PARSE_SCAN_C)): Likewise.
18123 (PARSE_DIR): New macro.
18124 (PARSE_C): Use it.
18125 (PARSE_SCAN_C): Likewise.
18126 (PARSE_RELDIR): New macro.
18127
18128 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18129
18130 * jcf-io.c (find_class): Use saw_java_source to determine when to
18131 look for `.java' file.
18132 * jcf-parse.c (saw_java_source): New global.
18133 (yyparse): Set it if `.java' file seen.
18134
18135 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18136 (GCJH_SOURCES): Likewise.
18137 * Makefile.in (datadir): New macro.
18138 (libjava_zip): Likewise.
18139 (JAVA_OBJS): Added jcf-path.o.
18140 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18141 (../gcjh$(exeext)): Likewise.
18142 (jcf-path.o): New target.
18143 * java-tree.h (fix_classpath): Removed decl.
18144 * jcf-parse.c (fix_classpath): Removed.
18145 (load_class): Don't call fix_classpath.
18146 * parse.y (read_import_dir): Don't call fix_classpath.
18147 * lex.h: Don't mention classpath.
18148 * lex.c (java_init_lex): Don't initialize classpath.
18149 * jcf-io.c (classpath): Removed global.
18150 (find_class): Use jcf_path iteration functions. Correctly search
18151 class path for .java file.
18152 (open_in_zip): New argument `is_system'.
18153 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
18154 classpath-related options.
18155 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18156 and -I.
18157 (lang_init): Call jcf_path_init.
18158 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18159 * lang-specs.h: Handle -I. Minor cleanup to -M options.
18160 Correctly put braces around second string in each entry.
18161 * gjavah.c (main): Call jcf_path_init. Recognize all the new
18162 classpath-related options.
18163 (help): Updated for new options.
18164 * jcf.h: Declare functions from jcf-path.c. Don't mention
18165 `classpath' global.
18166 * jcf-path.c: New file.
18167
18168 * jcf-depend.c: Include jcf.h.
18169
18170 * jcf-write.c (localvar_alloc): Returns `void'.
18171 (localvar_free): Removed unused variable.
18172
18173 * lang.c (OBJECT_SUFFIX): Define if not already defined.
18174 (init_parse): Use OBJECT_SUFFIX, not ".o".
18175
18176 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
18177
18178 * class.c (emit_register_classes): Renamed from
18179 emit_register_class.
18180 * java-tree.h (emit_register_classes): Prototype renamed from
18181 emit_register_class.
18182 * jcf-parse.c (yyparse): Call emit_register_classes once before
18183 returning.
18184 * parse.y (java_expand_classes): No longer register classes.
18185
18186 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18187
18188 * class.c (is_compiled_class): New local variable
18189 seen_in_zip. Identify classes found in currently compiled source
18190 file(s).
18191 * decl.c (complete_start_java_method): Fixed typo.
18192 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18193 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18194 (CLASS_P): Moved around.
18195 (java_parse_abort_on_error): Macro moved from jcf-parse.c
18196 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18197 java-tree.h
18198 (jcf_parse_source): Changed leading comment. Removed unnecessary
18199 fclose and CLASS_FROM_SOURCE_P marking.
18200 (parse_source_file): New local variables remember_for_generation
18201 and filename. Mark parsed file name identifier node. Removed block
18202 executed when parse_only was null. Set remember_for_generation.
18203 Use it as an argument to java_pop_parser_context.
18204 (yyparse): New local variables several_files, list, next node and
18205 current_file_list. Split ampersand separated file names into
18206 current_file_list. Iterate through the list and parse accordingly.
18207 * parse.h (java_pop_parser_context): New function prototype.
18208 * parse.y (ctxp_for_generation): New static global variable.
18209 (java_pop_parser_context): New argument generate. Link popped ctxp
18210 to ctxp_for_generation list accordingly.
18211 (java_complete_expand_methods): Fixed indentation.
18212 (java_expand_classes): New function.
18213
18214 1998-10-17 Per Bothner <bothner@cygnus.com>
18215
18216 * Makefile.in: Link with libiberty.a instead of memmove.o.
18217
18218 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
18219
18220 * lex.c (setjmp.h): No longer included.
18221 * lex.h (setjmp.h): Included.
18222 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18223 (duplicate_declaration_error_p): Renamed from
18224 duplicate_declaration_error.
18225 (build_array_from_name): New function prototype.
18226 * parse.y (setjmp.h): No longer included.
18227 (variable_declarator_id): Define action.
18228 (build_array_from_name): New function.
18229 (duplicate_declaration_error_p): Renamed from
18230 duplicate_declaration_error. Fixed leading comment.
18231 (register_fields): Main `for' loop reorganized. Uses
18232 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
18233 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
18234 build_array_from_name.
18235 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
18236 types.
18237 (read_import_dir): Don't try to skip `.' and `..'.
18238 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
18239 build_array_from_name. Main `for' loop reorganized.
18240 (resolve_qualified_expression_name): When building access to a
18241 field, use the type where the field was found, not its own type.
18242 (maybe_access_field): Use field DECL_CONTEXT if the type where the
18243 field was found is null.
18244 (qualify_ambiguous_name): Sweep through all successive array
18245 dimensions.
18246
18247 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
18248
18249 * java-tree.h (pop_labeled_block, lang_printable_name,
18250 maybe_add_interface, set_super_info, get_access_flags_from_decl,
18251 interface_of_p, inherits_from_p, fix_classpath,
18252 complete_start_java_method, emit_handlers, init_outgoing_cpool,
18253 make_class_data, register_class, alloc_name_constant): New
18254 function prototypes.
18255 * lang.c (lang_decode_option): Set argc argument unused. Fixed
18256 indentation. Added cast to remove warning.
18257 (lang_printable_name): Set v argument unused.
18258 (lang_print_error): Added argument to lang_printable_name call.
18259 (java_dummy_print, print_lang_decl, print_lang_type,
18260 print_lang_identifier, lang_print_xnode): All argument marked
18261 unused.
18262 * lex.c (java_unget_unicode): Removed unnecessary argument.
18263 (java_allocate_new_line): Unused local variable is gone.
18264 (java_read_char): Added parenthesis in expressions to remove
18265 warnings. Added final return statement.
18266 (java_read_unicode): Added parenthesis in expression to remove
18267 warning.
18268 (java_parse_end_comment): Fixed java_unget_unicode invocation.
18269 (java_parse_escape_sequence): Likewise.
18270 (java_lex): Unused local variables are gone. Fixed
18271 java_unget_unicode invocation.
18272 * lex.h (set_float_handler): Prototype added when JC1_LITE not
18273 defined.
18274 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
18275 lang_printable_name invocation in macro.
18276 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
18277 Likewise.
18278 (duplicate_declaration_error): Suppressed unused argument in
18279 prototype.
18280 (identical_subpath_p): Function declaration is gone.
18281 (patch_invoke): Suppressed unused argument in prototype.
18282 (patch_cast, build_labeled_block, check_thrown_exceptions):
18283 Likewise.
18284 * parse.y (setjmp.h): Included
18285 (toplev.h): Likewise.
18286 (field_declaration:): Suppressed unused local
18287 (label_decl:): Fixed build_labeled_block invocation.
18288 (java_pop_parser_context): Put extra parenthesis around assignment
18289 in if.
18290 (yyerror): Suppressed unused local variables.
18291 (variable_redefinition_error): Fixed lang_printable_name
18292 invocation.
18293 (create_interface): Suppressed unused local variables.
18294 (create_class): Likewise.
18295 (duplicate_declaration_error): Suppressed unused argument. Fixed
18296 lang_printable_name invocation.
18297 (register_fields): Suppressed unused local variable. Fixed
18298 duplicate_declaration_error invocation.
18299 (method_header): Suppressed unused local variable.
18300 (method_declarator, parser_check_super): Likewise.
18301 (java_complete_class): Suppressed unused local variable. Fixed
18302 fatal error message.
18303 (complete_class_report_errors): Added default: in switch.
18304 (java_check_regular_methods): Fixed lang_printable_name
18305 invocations.
18306 (check_throws_clauses): Likewise.
18307 (java_check_abstract_methods): Suppressed unused local
18308 variable. Fixed lang_printable_name invocation.
18309 (read_import_entry): Added supplemental return statement.
18310 (read_import_dir): Suppressed unused local variables.
18311 (check_pkg_class_access, declare_local_variables): Likewise.
18312 (source_start_java_method): Suppressed unused extern variable
18313 declarations
18314 (expand_start_java_method): Suppressed unused extern and local
18315 variable declarations.
18316 (java_complete_expand_methods): Likewise.
18317 (java_complete_expand_method): Suppressed unused local variables.
18318 (make_qualified_name): Likewise.
18319 (resolve_qualified_expression_name): Added default: in
18320 switch. Fixed lang_printable_name invocation.
18321 (class_instance_creation_expression): Added parenthesis around
18322 expressions.
18323 (patch_method_invocation_stmt): Fixed lang_printable_name and
18324 patch_invoke invocations.
18325 (check_for_static_method_reference): Fixed lang_printable_name
18326 invocation.
18327 (patch_invoke): Suppressed unused arguments and local variables.
18328 (lookup_method_invoke): Suppressed unused local variables.
18329 (qualify_ambiguous_name): Added default: in switch.
18330 (identical_subpath_p): Function removed.
18331 (patch_assignment): Suppressed unused local variables. Suppressed
18332 unnecessary if statement. Fixed lang_printable_name invocations.
18333 (try_builtin_assignconv): Fixed lang_printable_name invocations.
18334 (valid_ref_assignconv_cast_p): Parenthesis around
18335 expression. Suppressed unused local variables.
18336 (build_binop): Suppressed unused local variables. fixed
18337 lang_printable_name invocations.
18338 (string_constant_concatenation): Suppressed unused local
18339 variables.
18340 (patch_unaryop): Fixed lang_printable_name invocation.
18341 (patch_cast): Suppressed unnecessary argument. Fixed
18342 lang_printable_name invocation.
18343 (patch_array_ref): Fixed lang_printable_name invocation.
18344 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
18345 (build_labeled_block): Suppressed unused argument.
18346 (generate_labeled_block): Fixed build_labeled_block invocation.
18347 (build_loop_body): Suppressed unused local variables.
18348 (patch_loop_statement): Likewise.
18349 (patch_exit): Fixed lang_printable_name invocation.
18350 (patch_switch_statement): Likewise.
18351 (case_identity): First argument marked unused.
18352 (patch_try_statement): Fixed lang_printable_name invocations.
18353 (patch_synchronized_statement, patch_throw_statement): Likewise.
18354 (check_thrown_exceptions): Fixed check_thrown_exceptions and
18355 lang_printable_name invocations.
18356 (check_thrown_exceptions_do): Suppressed unused argument.
18357
18358 1998-10-14 Tom Tromey <tromey@cygnus.com>
18359
18360 * jcf-write.c (write_classfile): Add output class file as target.
18361 * lang-options.h: Added -MD, -MMD, -M, and -MM.
18362 * jcf.h: Added declarations for dependency-tracking functions.
18363 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
18364 * lang.c (lang_decode_option): Recognize -MD and -MMD.
18365 (finish_parse): Call jcf_dependency_write.
18366 (dependency_tracking): New global.
18367 (DEPEND_SET_FILE): New define.
18368 (DEPEND_ENABLE): New define.
18369 (init_parse): Enable dependency tracking if required.
18370 Include "flags.h".
18371 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
18372 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18373 (../gcjh$(exeext)): Likewise.
18374 (jcf-depend.o): New target.
18375 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
18376 (GCJH_SOURCES): Likewise.
18377 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
18378 dep_name argument.
18379 (find_classfile): Added dep_name argument.
18380 (find_class): Compute name of dependency.
18381 (open_in_zip): Call jcf_dependency_add_file.
18382 * gjavah.c (output_file): No longer global.
18383 (usage): Don't mention "gjavah".
18384 (help): Likewise.
18385 (java_no_argument): Likewise.
18386 (version): Likewise.
18387 (main): Recognize and handle -M family of options.
18388 (print_mangled_classname): Return is void.
18389 (process_file): Handle case where output is suppressed.
18390 (HANDLE_END_FIELD): Likewise.
18391 (HANDLE_METHOD): Likewise.
18392 * jcf-depend.c: New file.
18393
18394 1998-10-13 Jeffrey A Law (law@cygnus.com)
18395
18396 * java-tree.def: Add missing newline at EOF.
18397
18398 1998-10-13 Tom Tromey <tromey@cygnus.com>
18399
18400 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18401 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
18402 function.
18403 Include <config.h> and "system.h".
18404 (disassemble_method): Undefine RET to avoid clash with
18405 config/i386/i386.h.
18406
18407 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
18408
18409 * decl.c (runtime_exception_type_node, error_exception_type_node):
18410 New global variables.
18411 (init_decl_processing): Initialized.
18412 * expr.c (java_lang_expand_expr): Set caught exception type to
18413 null if catch handler argument doesn't exit.
18414 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
18415 tree codes.
18416 * java-tree.h (runtime_exception_type_node,
18417 error_exception_type_node): Global variables declared.
18418 (DECL_FUNCTION_THROWS): New macro.
18419 (DECL_FUNCTION_BODY): Modified comment.
18420 (DECL_SPECIFIC_COUNT): Likewise.
18421 (struct lang_decl): New field throws_list.
18422 (IS_UNCHECKED_EXPRESSION_P): New macro.
18423 * lex.c (java_lex): Generate location information for THROW_TK.
18424 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
18425 EXCEPTIONS_P): New macros.
18426 (enum jdep_code): New value JDEP_EXCEPTION.
18427 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
18428 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18429 PATCH_METHOD_RETURN_ERROR): New macros.
18430 (patch_method_invocation_stmt): Added new argument to prototype.
18431 (patch_synchronized_statement, patch_throw_statement,
18432 check_thrown_exceptions, check_thrown_exceptions_do,
18433 purge_unchecked_exceptions, check_throws_clauses): New function
18434 prototypes.
18435 * parse.y Fixed typo in keyword section.
18436 (throw:): Rule tagged <node>.
18437 (THROW_TK): Keyword tagged <operator>.
18438 (method_header:): Last argument to call to method_header passed
18439 from throws: rule.
18440 (throws:, class_type_list:, throw_statement:,
18441 synchronized_statement:, synchronized:): Defined actions.
18442 (method_header): New local variable current. Register exceptions
18443 from throws clause.
18444 (java_complete_tree): Complete and verify exceptions from throws
18445 clause.
18446 (complete_class_report_errors): Error message on exceptions not
18447 found
18448 (java_check_regular_methods): Fixed typo. Shortcut on private
18449 overriding methods. Changed error message on method
18450 redefinition. Check for throws clause compatibility.
18451 (check_throws_clauses): New function.
18452 (java_check_abstract_methods): Use DECL_NAME for wfl or current
18453 method. Changed error message on method redefinition.
18454 (currently_caught_type_list): New static variable.
18455 (java_complete_expand_methods): Purge unchecked exceptions from
18456 throws clause list. Call PUSH_EXCEPTIONS before walk and
18457 POP_EXCEPTIONS after.
18458 (resolve_qualified_expression_name): Pass new argument as NULL to
18459 patch_method_invocation_stmt.
18460 (patch_method_invocation_stmt): New argument ref_decl. Invoke
18461 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18462 argument list when appropriate. Use new argument if non null to
18463 store selected method decl.
18464 (patch_invoke): Convert if necessary args of builtin types before
18465 forming CALL_EXPR. Argument list no longer reversed here.
18466 (invocation_mode): Treat final methods as static methods.
18467 (java_complete_tree): New cases for THROW_EXPR: and
18468 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
18469 function call.
18470 (complete_function_arguments): No more RECORD_TYPE
18471 conversion. Function parameter nodes no longer saved.
18472 (valid_ref_assignconv_cast_p): Avoid handling null type.
18473 (patch_binop): Fixed null constant reference handling.
18474 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
18475 BUILD_THROW macros.
18476 (patch_try_statement): Fixed comments. Record caught types in
18477 list, push the list, expand try block and pop the list.
18478 (patch_synchronized_statement, patch_throw_statement,
18479 check_thrown_exceptions, check_thrown_exceptions_do,
18480 purge_unchecked_exceptions): New functions.
18481 * typeck.c (lookup_argument_method): Allow WFL in place of method
18482 DECL_NAME during method definition check
18483
18484 1998-10-09 Tom Tromey <tromey@cygnus.com>
18485
18486 * gjavah.c (decode_signature_piece): New function.
18487 (print_c_decl): Use it. Added `name_override' argument.
18488 (print_method_info): Use name_override argument to print_c_decl.
18489 (seen_fields): Removed.
18490 (print_field_info): Don't update seen_fields.
18491 (struct method_name): New structure.
18492 (method_name_list): New global.
18493 (print_method_info): Add new method to list of methods.
18494 (name_is_method_p): New function.
18495 (print_field_info): If field name has same name as method, then
18496 change field name.
18497 (process_file): Parse methods before fields.
18498 (field_pass): New global.
18499 (HANDLE_END_FIELD): Take field_pass into account.
18500
18501 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18502
18503 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
18504 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
18505
18506 1998-10-03 Anthony Green <green@cygnus.com>
18507
18508 * jvspec.c: Fix bug in jvgenmain_spec patch.
18509
18510 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18511
18512 * Makefile.in (lang.o:): Install dependency on java-tree.def.
18513 * decl.c (soft_exceptioninfo_call_node): New global variable.
18514 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
18515 takes extra integer argument. soft_exceptioninfo_call_node
18516 initialized.
18517 * except.c (java_set_exception_lang_code): New function
18518 (method_init_exceptions): Called here.
18519 (prepare_eh_table_type): New function.
18520 (expand_end_java_handler): Called here.
18521 * expr.c (build_java_throw_out_of_bounds_exception): Now features
18522 one argument. Modified generation of call to
18523 soft_badarrayindex_node to use new argument.
18524 (build_java_arrayaccess): Pass faulty index value to
18525 build_java_throw_out_of_bounds_exception.
18526 (generate_name): New function.
18527 (java_lang_expand_expr): New local variables node, current,
18528 has_finally_p. Expand TRY_EXPR node.
18529 (process_jvm_instruction): Replace top of the stack with thrown
18530 object reference when entering exception handler.
18531 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
18532 specific tree codes.
18533 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
18534 global.
18535 (DECL_SPECIFIC_COUNT): New macro.
18536 (prepare_eh_table_type, java_set_exception_lang_code,
18537 generate_name): New function declarations.
18538 (match_java_method): Declaration deleted.
18539 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
18540 macros.
18541 * lex.c (TRY_TK, CATCH_TK): Generate location information.
18542 * parse.h (redefinition_error, refine_accessible_methods_list,
18543 can_cast_to_p): Function declaration removed.
18544 (classitf_redefinition_error, variable_redefinition_error,
18545 parse_jdk1_1_error, find_applicable_accessible_methods_list,
18546 find_most_specific_methods_list, argument_types_convertible,
18547 enter_a_block, valid_builtin_assignconv_identity_widening_p,
18548 valid_cast_to_p, valid_method_invocation_conversion_p,
18549 try_reference_assignconv, add_stmt_to_compound,
18550 build_jump_to_finally, build_tree_list, patch_try_statement,
18551 java_get_catch_block): New function declarations.
18552 * parse.y (string_buffer_type): Global variable deleted.
18553 (group_of_labels, catches, catch_clause, catch_clause_parameter,
18554 finally): Rules tagged <node>.
18555 (TRY_TK, CATCH_TK): Token tagged <operator>.
18556 (class_body_declaration:, class_member_declaration:,
18557 formal_parameter:, explicit_constructor_invocation:,
18558 interface_member_declaration:, constant_declaration:,
18559 primary_no_new_array:, class_instance_creation_expression:,
18560 array_creation_expression:): Issue error on unsuported JDK1.1
18561 features.
18562 (try_statement:, catches:, finally:): Define actions.
18563 (catch_clause_parameter): New rule.
18564 (catch_clause:): Use new rule catch_clause_parameter.
18565 (parse_jdk1_1_error): New function.
18566 (redefinition_error): Renamed classitf_redefinition_error.
18567 (variable_redefinition_error): New function.
18568 (check_class_interface_creation): Call
18569 classitf_redefinition_error.
18570 (java_complete_tree): Added error message on JDEP_TYPE: case.
18571 (complete_class_report_errors): Fixed indentation.
18572 (declare_local_variables): Call variable_redefinition_error.
18573 (source_end_java_method): Call java_set_exception_lang_code and
18574 emit_handlers where appropriate.
18575 (java_method_add_stmt): Call add_stmt_to_block.
18576 (add_stmt_to_block): New function.
18577 (lookup_method_invoke): Fixed outside comment. new local variable
18578 candicates. Call find_applicable_accessible_methods_list and
18579 find_most_specific_methods_list when searching for a
18580 method. Modified error report to list possible candidates when
18581 applicable.
18582 (find_applicable_accessible_methods_list,
18583 find_most_specific_methods_list, argument_types_convertible): New
18584 function.
18585 (refine_accessible_methods_list): Function deleted.
18586 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
18587 expr (if applicable) before calling patch_array_ref.
18588 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18589 (enter_block): Fixed comment.
18590 (enter_a_block): New function.
18591 (patch_assignment): Reorganized. Call try_reference_assignconv for
18592 references. Call valid_cast_to_p instead of can_cast_to_p.
18593 (try_reference_assignconv,
18594 valid_builtin_assignconv_identity_widening_p): New functions.
18595 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18596 (valid_cast_to_p, valid_method_invocation_conversion_p): New
18597 functions.
18598 (build_string_concatenation): Don't resolve StringBuffer.
18599 (patch_cast): Fixed inverted arguments.
18600 (patch_array_ref): Code to save array expr deleted. Call
18601 valid_cast_to_p instead of can_cast_to_p.
18602 (generate_labeled_block): Call generate_name.
18603 (build_jump_to_finally, build_try_statement, java_get_catch_block,
18604 patch_try_statement): New functions.
18605 * typeck.c (match_java_method): Function deleted.
18606
18607 1998-10-02 Anthony Green <green@cygnus.com>
18608
18609 * jvspec.c: jvgenmain_spec uses different temporary file names.
18610
18611 1998-10-02 Anthony Green <green@cygnus.com>
18612
18613 * jvspec.c (lang_specific_driver): Fail if user specifies
18614 --main= when not linking.
18615
18616 1998-09-28 Tom Tromey <tromey@cygnus.com>
18617
18618 * class.c (make_class_data): Push value for `thread' field.
18619 * decl.c (init_decl_processing): Added `thread' field to class.
18620
18621 * class.c (add_field): Always make static fields externally
18622 visible.
18623
18624 1998-09-26 Anthony Green <green@cygnus.com>
18625
18626 * expr.c (build_java_athrow,
18627 build_java_throw_out_of_bounds_exception, expand_invoke,
18628 build_newarray, expand_java_multianewarray, build_java_monitor):
18629 Update comments to reflect _Jv_* function names.
18630
18631 1998-09-25 Per Bothner <bothner@cygnus.com>
18632
18633 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
18634 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
18635 * parse.y (expand_start_java_method): Likewise.
18636
18637 1998-09-24 Per Bothner <bothner@cygnus.com>
18638
18639 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
18640
18641 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18642 (add_field): No longer need to convert from RECORD_TYPE to pointer,
18643 * expr.c: Remove no-longer-needed calls to promote_type.
18644 * decl.c (give_name_to_locals): Liekwise.
18645 * jcf-parse.c (get_class_constant): Compensate for new signatures.
18646 * parse.y: Add/remove promote_type calls as appropriate.
18647 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
18648 (parse_signature_string): Likewise.
18649 (build_java_array_type): Fix for now signature convenions.
18650
18651 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
18652
18653 1998-09-23 Tom Tromey <tromey@cygnus.com>
18654
18655 * class.c (init_class_processing): libjava function renamed to
18656 _Jv_RegisterClass.
18657
18658 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
18659
18660 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18661 * java-tree.def: Fixed DEFTREECODE third argument.
18662 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18663 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18664 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18665 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18666 JAVA_THIS_EXPR): Now replaced by tree code definitions.
18667 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18668 * lang.c (java_tree_code_type, java_tree_code_length,
18669 java_tree_code_name): New arrays.
18670 (lang_init): Append Java tree node definitions to Gcc ones.
18671 * lex.c (expression_obstack): Declared as extern when JC1_LITE
18672 defined.
18673 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18674 wfl_to_string.
18675 (java_lex): Allow declaration of empty string constants. Retain
18676 location information on CASE_TK and DEFAULT_TK.
18677 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18678 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18679 Modified to be more robust.
18680 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18681 (build_new_invocation, try_builtin_assignconv,
18682 patch_switch_statement, string_constant_concatenation,
18683 build_string_concatenation, patch_string_cst, patch_string,
18684 java_expand_switch): New function declarations.
18685 * parse.y: Rules related to switch and EH tagged <node>.
18686 (label_id): Set to NULL_TREE
18687 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18688 tree nodes.
18689 (this_or_super:): Fixed indentation.
18690 (statement:, statement_nsi:, statement_without_trailing_substatement:,
18691 statement_expression:): Removed call to RULE on all sub-rules.
18692 (switch_expression:, switch_labels:): New rules.
18693 (switch_statement:, switch_block:, switch_block_statement_groups:,
18694 switch_block_statement_group:, switch_labels:, switch_label:):
18695 Defined actions.
18696 (throw_statement:, synchronized_statement:, try_statement:):
18697 Defined temporary actions.
18698 (class_instance_creation_expression:): Call
18699 build_new_invocation. Fixed indentation.
18700 (field_access): Fixed indentation.
18701 (method_invocation): Likewise.
18702 (make_qualified_primary): Use THIS_EXPR.
18703 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18704 resolving from SUPER, set *type_found.
18705 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18706 (java_complete_tree): Removed unused local variable `location'. Case
18707 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18708 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18709 on MODIFY_EXPR: and all binary operator tree code cases. Removed
18710 STRING_CST: case. default: checks for patchable strings.
18711 (complete_function_arguments): Transform string constant or
18712 crafted StringBuffer if necessary.
18713 (build_method_invocation): Fixed comments.
18714 (build_new_invocation): New function.
18715 (patch_assignment): Call try_builtin_assignconv to figure a valid
18716 assignment conversion between builtin types.
18717 (try_builtin_assignconv): New function.
18718 (build_binop): Use URSHIFT_EXPR directly to call build.
18719 (operator_string): Use UNARY_PLUS_EXPR.
18720 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18721 operator.
18722 (do_merge_string_cste, merge_string_cste,
18723 string_constant_concatenation, build_string_concatenation,
18724 patch_string, patch_string_cst): New function.
18725 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18726 (patch_unaryop): Likewise. New test of valid ++/-- operands.
18727 (build_newarray_node): Use NEW_ARRAY_EXPR.
18728 (build_this): Use THIS_EXPR.
18729 (build_return): Enable debug information on return statement.
18730 (build_if_else_statement): Likewise.
18731 (complete_labeled_statement): Fixed related comment.
18732 (build_loop_body): Fixed comment.
18733 (build_bc_statement): Enable debug information on break/continue
18734 statements.
18735 (patch_bc_statement): Fixed typos. Handle SWITCH statement
18736 context.
18737 (patch_switch_statement, case_identity, java_expand_switch): New
18738 functions.
18739
18740 1998-09-21 Per Bothner <bothner@cygnus.com>
18741
18742 * buffer.h (BUFFER_INIT): New macro.
18743 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
18744 Pass (struct jcf_partial *state) to most functions.
18745 (jcf_block, jcf_relocation): New types.
18746 Support labels, branches, conditionals, loops.
18747
18748 1998-09-21 Tom Tromey <tromey@cygnus.com>
18749
18750 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18751
18752 1998-09-21 Per Bothner <bothner@cygnus.com>
18753
18754 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
18755 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
18756 not integer_type_node (INT_TYPE_SIZ bits).
18757
18758 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
18759
18760 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
18761 * jcf-dump.c (print_exception_table): New function.
18762 (disassemble_method): Better handling of wide instructions.
18763 Make more robust for bad input.
18764
18765 1998-09-30 Jeffrey A Law (law@cygnus.com)
18766
18767 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18768 FreeBSD.
18769
18770 1998-09-17 Jeffrey A Law (law@cygnus.com)
18771
18772 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18773
18774 1998-09-17 Tom Tromey <tromey@cygnus.com>
18775
18776 * Makefile.in ($(PARSE_H)): Removed target.
18777
18778 1998-09-17 Jeffrey A Law (law@cygnus.com)
18779
18780 * Makefile.in (JAVA_OBJS): Add memmove.o
18781 (memmove.o): New target & rules.
18782
18783 1998-09-15 Tom Tromey <tromey@cygnus.com>
18784
18785 * expr.c (expand_invoke): Don't generate a call to the class init
18786 code.
18787
18788 1998-09-14 Jeffrey A Law (law@cygnus.com)
18789
18790 * Makefile.in: Add many missing dependencies.
18791 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18792 as appropriate.
18793 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18794 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18795
18796 1998-09-11 Per Bothner <bothner@cygnus.com>
18797
18798 * decl.c (complete_start_java_method): If method is static (and
18799 not private) call _Jv_InitClass.
18800 * expr.c (expand_invoke): Don't call build_class_init.
18801
18802 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
18803
18804 1998-09-10 Jeffrey A Law (law@cygnus.com)
18805
18806 * Make-lang.in (GCJ): Define before using.
18807
18808 1998-09-09 Jeffrey A Law (law@cygnus.com)
18809
18810 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18811 losing due to namespace pollution in GNU getopt.h
18812
18813 1998-09-09 Tom Tromey <tromey@cygnus.com>
18814
18815 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18816 (java.all.cross): Likewise.
18817 (java.rest.encap): Likewise.
18818
18819 1998-09-08 Jeffrey A Law (law@cygnus.com)
18820
18821 * gjavah.c (print_class_decls): Fix thinko in arglist
18822 * jcv-io.c (find_classfile): Similarly.
18823
18824 1998-09-07 Jeffrey A Law (law@cygnus.com)
18825
18826 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18827
18828 1998-09-05 Tom Tromey <tromey@cygnus.com>
18829
18830 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18831 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18832 * Makefile.in (PARSE_C): New macro.
18833 (PARSE_H): Likewise.
18834 (PARSE_SCAN_C): Likewise.
18835 ($(PARSE_C)): Target renamed from parse.c.
18836 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18837 (clean): Remove parse-scan.c as well.
18838 (parse.o): Depend on $(PARSE_C).
18839
18840 1998-09-05 Anthony Green <green@cygnus.com>
18841
18842 * README, license.terms: Removed.
18843
18844 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18845 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18846 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18847 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18848 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18849 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18850 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18851 and Java trademark attribution.
18852
18853 1998-09-04 Tom Tromey <tromey@cygnus.com>
18854
18855 * Makefile.in: Use gcjh, not gjavah.
18856 * config-lang.in (stagestuff): Use gcjh, not gjavah.
18857 * Make-lang.in: Changed gjavah to gcjh everywhere.
18858
18859 1998-09-03 Per Bothner <bothner@cygnus.com>
18860
18861 * gjavah.c: Support new -prepend -add -append flags.
18862 (print_method_info): Method is not virtual if class is final.
18863
18864 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18865
18866 * jv-scan.c: Fixed copyright assignment.
18867 * keyword.gperf: Likewise.
18868 * keyword.h: Likewise.
18869 * lex.c: Fixed copyright assignment.
18870 (java_lex): Push unicode back when parsing '<'.
18871 * lex.h: Fixed copyright assignment.
18872 * parse-scan.y: Likewise.
18873 * parse.h: Fixed copyright assignment.
18874 (build_debugable_stmt, complete_for_loop): New function prototypes.
18875 * parse.y: Fixed copyright assignment.
18876 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18877 size_zero_node when completing a loop with no exit condition.
18878 (for_statement_nsi:): Define action.
18879 (for_init:, for_update:): Return size_zero_node when empty.
18880 (declare_local_variables): Call build_debugable_stmt.
18881 (build_debugable_stmt): New function.
18882 (build_loop_body): Build debugable statement around loop
18883 condition part.
18884 (complete_loop_body): Take into account the debugable statement
18885 around the EXIT_EXPR.
18886 (complete_loop_body): New function.
18887 (patch_exit_expr): Fixed condition inversion.
18888
18889 1998-09-02 Tom Tromey <tromey@cygnus.com>
18890
18891 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18892 name of thread define.
18893 * jvspec.c (THREAD_NAME): New macro.
18894 (GCLIB): Likewise.
18895 (THREADLIB): Likewise.
18896 (lang_specific_driver): Recognize attempt to link with thread
18897 library or gc library. Recognize -ljava on command line so it
18898 isn't linked against more than once.
18899
18900 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18901
18902 * parse-scan.y (report_main_declaration): Name of the class
18903 containing `main' can be a qualified name.
18904
18905 1998-08-31 Tom Tromey <tromey@cygnus.com>
18906
18907 * config-lang.in: Changed gjavac to gjc everywhere.
18908 * Make-lang.in: Changed gjavac to gjc everywhere.
18909
18910 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
18911
18912 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18913 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18914 and install the files.
18915 * Makefile.in (JAVA_OBJS_LITE): New variable.
18916 (compiler:): Now include jv-scan as a dependency.
18917 (../jv-scan$(exeext), parse-scan.c): New targets.
18918 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18919 * config-lang.in (compilers): Removed gcj, gjavah from the list.
18920 * jcf-parse.c (parse_source_file): Call java_layout_classes and
18921 check for errors even if parse_only.
18922 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18923 defined.
18924 (yylex): New function. Uses java_lex body.
18925 (java_lex): Removed commented out statement. Remove local variable
18926 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18927 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18928 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18929 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18930 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18931 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18932 where appropriate.
18933 (java_lex_error): Empty if JC1_LITE is defined.
18934 (java_get_line_col): Return 0 if JC1_LITE is defined.
18935 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18936 SET_MODIFIER_CTX): Moved into the section containing the macros
18937 conditionally defined by JC1_LITE.
18938 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18939 argument if JC1_LITE is defined.
18940 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18941 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18942 is defined.
18943 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18944 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18945 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18946 to different values according to JC1_LITE.
18947 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18948 declared if JC1_LITE set.
18949 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18950 defined if JC1_LITE not set.
18951 (struct parser_ctx): Reorganized and skip the jc1 front end part
18952 if JC1_LITE set.
18953 (java_layout_classes): New function definition.
18954 (java_push_parser_context, java_init_lex, yyparse, yylex,
18955 yyerror): Prototype always declared. All other static function
18956 prototypes declared only if JC1_LITE is not set.
18957 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18958 declared in parse.h.
18959 (java_layout_classes): New function.
18960 (java_complete_expand_methods): No longer layout the class here.
18961 * parse-scan.y: New file.
18962 * jv-scan.c: New file.
18963
18964 1998-08-25 Tom Tromey <tromey@cygnus.com>
18965
18966 * gjavah.c (main): Handle -friend option.
18967 (friend_specs): New global.
18968 (generate_access): Handle friend_specs.
18969 (process_file): Likewise.
18970 (MAX_FRIENDS): New macro.
18971 (friend_count): New global.
18972 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
18973 Changed all callers.
18974
18975 1998-08-24 Per Bothner <bothner@cygnus.com>
18976
18977 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
18978 (main): Handle processing all the entries of a named .zip archive.
18979 * jcf-io.c (jcf_trim_old_input): New function.
18980 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
18981
18982 1998-08-24 Per Bothner <bothner@cygnus.com>
18983
18984 * lang.c (flag_assume_compiled): Make default be on.
18985
18986 1998-08-21 Per Bothner <bothner@cygnus.com>
18987
18988 * jcf-dump.c: Add bunches of flags to control output more.
18989 (process_class): New function; support printing more than one class.
18990 (main): Support new --print-main and --javap flags.
18991 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
18992 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
18993
18994 1998-08-20 Per Bothner <bothner@cygnus.com>
18995
18996 Change mangling of dispatch table to match C++ vtable (w/thunks).
18997 * class.c (build_dtable_decl), java-tree.h: New function.
18998 (make_class_data): Call it.
18999 * decl.c (init_decl_processing): Likewise.
19000
19001 1998-08-19 Warren Levy <warrenl@cygnus.com>
19002
19003 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19004 soft_anewarray; adjust args passed.
19005 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19006 match _Jv_NewObjectArray.
19007
19008 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
19009
19010 * decl.c (push_labeled_block, pop_labeled_block): New functions.
19011 * expr.c (loopup_label): Call create_label_decl.
19012 (create_label_decl): New function.
19013 (java_lang_expand_expr): Call expand_start_bindings with argument
19014 set to zero.
19015 * java-tree.h Added space after PROTO in function declarations
19016 when necessary.
19017 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19018 (create_label_decl, push_labeled_block): New function
19019 declarations.
19020 * lex.c (label_id): Initialize.
19021 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19022 switch.
19023 * parse.h Added space after PROTO in function declarations when
19024 necessary.
19025 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19026 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19027 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19028 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19029 macros.
19030 (struct parser_ctxt): New fields current_loop,
19031 current_labeled_block.
19032 (build_if_else_statement, patch_if_else_statement,
19033 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19034 generate_labeled_block, complete_labeled_statement,
19035 build_bc_statement, patch_bc_statement, patch_loop_statement,
19036 build_new_loop, build_loop_body, complete_loop_body): New function
19037 declarations.
19038 * parse.y (java_warning_count): New global variable.
19039 (label_id): New static variable.
19040 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19041 (block:): Return size_zero_node when block is empty.
19042 (empty_statement:): Return size_zero_node.
19043 (statement:): Implement supplemental action when for_statement: is
19044 reduced.
19045 (label_decl:): New rule.
19046 (labeled_statement:): Rewritten using label_decl. Actions
19047 implemented.
19048 (labeled_statement_nsi:): Likewise.
19049 (if_then_statement): Actions implemented.
19050 (while_expression): New rule.
19051 (while_statement:): Rewritten using while_expression. Actions
19052 implemented.
19053 (while_statement_nsi:): Likewise.
19054 (do_statement_begin:): New rule.
19055 (do_statement:): Rewritten using do_statement_begin. Actions
19056 implemented.
19057 (for_statement:): Rewritten using for_begin. Actions implemented.
19058 (for_statement_nsi:): Likewise.
19059 (for_header:, for_begin:): New rules.
19060 (for_init:): Actions implemented.
19061 (statement_expression_list:, break_statement:,
19062 continue_statement:): Likewise.
19063 (yyerror): Count number of issued warning(s).
19064 (java_report_errors): Report error(s) and/or warning(s).
19065 (java_complete_class): Use build_java_argument_signature to
19066 recompute completed method signature.
19067 (java_check_regular_methods): New locals method_wfl and aflags.
19068 Use method_wfl instead of lookup_cl during error reports. Fixed
19069 indentation and modified some error messages. Use
19070 lang_printable_name in method instead of the DECL_NAME. New code
19071 to issue warnings on methods not overriding corresponding methods
19072 private to a different package.
19073 (java_method_add_stmt): Call add_stmt_to_compound.
19074 (add_stmt_to_compound): New function.
19075 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19076 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19077 (build_if_else_statement, patch_if_else_statement,
19078 build_labeled_block, generate_labeled_block,
19079 complete_labeled_statement, build_new_loop, build_loop_body,
19080 complete_loop_body, patch_loop_statement, build_bc_statement,
19081 patch_bc_statement, patch_exit_expr): New functions.
19082 * typeck.c (build_java_signature): Build argument signature before
19083 enclosing it in between parenthesis.
19084
19085 1998-08-17 Warren Levy <warrenl@cygnus.com>
19086
19087 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19088 (JAVA_OBJS): Added reminder comment
19089
19090 1998-08-13 Nick Clifton <nickc@cygnus.com>
19091
19092 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19093 be interpreted as a long long.
19094
19095 1998-08-13 Warren Levy <warrenl@cygnus.com>
19096
19097 * decl.c (init_decl_processing): Use _Jv_InitClass, not
19098 soft_initialise_class. Use _Jv_NewMultiArray, not
19099 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
19100 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
19101 _Jv_CheckArrayStore, not soft_checkarraystore. Use
19102 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19103
19104 1998-08-12 Per Bothner <bothner@cygnus.com>
19105
19106 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19107 length_identifier_node): New global tree node constants.
19108 * parse.y (kw_super, kw_this, kw_length): Removed globals.
19109 Replace uses by super_identifier_node etc.
19110 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
19111
19112 * parse.y (resolve_field_access): Don't special-case ".length" if
19113 flag_emit_class_files.
19114 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
19115 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
19116 and ARRAY.length.
19117
19118 1998-08-11 Per Bothner <bothner@cygnus.com>
19119
19120 * decl.c (init_decl_processing): Remove unused method_type_node fields.
19121 * class.c (make_method_value): Remove init for removed fields.
19122
19123 * class.c (layout_class): Use build_java_argument_signature.
19124 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
19125
19126 * typeck.c (push_java_argument_signature): Removed. Merged into ...
19127 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
19128 (build_java_signature): Don't use push_java_argument_signature.
19129
19130 * typeck.c (lookup_argument_method): New function.
19131 * parse.y (java_check_regular_methods): Use lookup_argument_method
19132 instead of lookup_java_method2 followed by lookup_java_method.
19133
19134 * parse.y (check_method_redefinition): Minor optimization.
19135
19136 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
19137 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19138
19139 1998-08-10 Tom Tromey <tromey@cygnus.com>
19140
19141 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19142 c-pragma.o.
19143
19144 * gjavah.c (java_float_finite): Use K&R-style definition.
19145 (java_double_finite): Likewise.
19146 (generate_access): Now returns void. Changed all callers.
19147 (last_access_generated): Removed.
19148 (process_file): Only make a single pass over the .class file.
19149
19150 1998-07-29 Per Bothner <bothner@cygnus.com>
19151
19152 * class.c (get_dispatch_table): Add extra dummy vtable entry,
19153 for compatibility for G++ (with -fvtable-thunks).
19154 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
19155
19156 * gjavah.c (process_file): Use public inheritance for super-class.
19157
19158 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
19159
19160 * lex.c (java_init_lex): Initialize ctxp->package.
19161 * parse.h (struct parser_ctxt): package and package_len replaced
19162 by tree package, an identifier node. Field method_decl_list is
19163 gone. Fixed comments.
19164 (lookup_field_wrapper, merge_qualified_name, not_accessible,
19165 class_in_current_package): New function prototypes.
19166 * parse.y (array_type:): Set class loaded flag on primitive type
19167 arrays.
19168 (package_declaration:): Assign ctxp->package to the
19169 identifier node.
19170 (method_invocation:): Handle invocation of method qualified by
19171 `super'.
19172 (single_type_import_declaration:): Removed ambiguity check.
19173 (java_pop_parser_context): New local variable `next'. Reset and
19174 set IMPORT_CLASSFILE_NAME flags on current and previous import
19175 list.
19176 (java_accstring_lookup): Use new local macro COPY_RETURN.
19177 (lookup_field_wrapper): New function.
19178 (parser_qualified_classname): Use merge_qualified_name.
19179 (parser_check_super_interface): Broaden error message.
19180 (do_resolve_class): Check for qualified class name in the current
19181 compilation unit if appropriate.
19182 (process_imports): Check for already defined classes.
19183 (check_pkg_class_access): Got rid of call to
19184 get_access_flags_from_decl.
19185 (java_complete_expand_methods): Call safe_layout_class based on
19186 the current class size.
19187 (make_qualified_primary): Build a WFL qualification on primary if
19188 none exists.
19189 (merge_qualified_name): New function.
19190 (make_qualified_name): Use merge_qualified_name.
19191 (resolve_expression_name): Use safe_lookup_field.
19192 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19193 (resolve_qualified_expression_name): Likewise. Check on resolved
19194 element accessibility.
19195 (not_accessible_p, class_in_current_package): New functions.
19196 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19197 (patch_method_invocation_stmt): Merged common pieces. Check
19198 accessibility of invoked method.
19199 (check_for_static_method_reference): Add returned type in error
19200 message.
19201 (invocation_mode): Get rid of bogus check on PRIVATE methods.
19202 (refine_accessible_methods_list): Merged two conditions in test.
19203 (java_complete_class): Sanity check on stabilize_ref gone.
19204 * zextract.c (read_zip_archive): Cast lseek second argument to long.
19205
19206 1998-07-28 Per Bothner <bothner@cygnus.com>
19207
19208 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
19209
19210 1998-07-24 Tom Tromey <tromey@cygnus.com>
19211
19212 * gjavah.c (F_NAN): Removed.
19213 (F_NAN_MASK): New macro.
19214 (F_POSITIVE_INFINITY): Removed.
19215 (F_NEGATIVE_INFINITY): Likewise.
19216 (java_float_finite): Rewrote.
19217 (D_NAN_MASK): Renamed.
19218 (java_double_finite): Rewrote.
19219 (D_POSITIVE_INFINITY): Removed.
19220 (D_NEGATIVE_INFINITY): Likewise.
19221
19222 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19223 If verbose, print underlying representation of value in hex.
19224
19225 1998-07-24 Per Bothner <bothner@cygnus.com>
19226
19227 * buffer.h, buffer.c: New files.
19228 * Makefile.in (JAVA_OBJS): Add buffer.o.
19229
19230 Support locals variables and writing their debug entries to .class.
19231 * jcf-write.c: Simplify some by user new buffer type.
19232 (vode_buffer_grow): Removed.
19233 (struct localvar_info): New type.
19234 (localsvars, localvartable): New buffers.
19235 (localvar_alloc, localvar_free): New functions.
19236 (generate_bytecode_insns): Handle local variables.
19237 (generate_classfile): Write LocalVariableTable attribute.
19238
19239 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
19240
19241 * jcf-io.c (open_in_zip): Check the zipfile magic number.
19242 * zipfile.h (ZIPMAGIC): New macro.
19243
19244 1998-07-24 Tom Tromey <tromey@cygnus.com>
19245
19246 * Makefile.in (gjavah.o): Updated dependencies.
19247 (jcf-dump.o): Likewise.
19248 (all.indirect): Use ../gjavah.
19249 (../gjavah$(exeext)): Likewise.
19250 (clean): Don't remove gjavah.
19251 (clean): Remove parse.c, not java/parse.c.
19252 * Make-lang.in (java): Added gjavah.
19253 (gjavah$(exeext)): New target.
19254 (GJAVAH_SOURCES): New macro.
19255 (java.all.build): Added gjavah.
19256 (java.all.cross): Likewise.
19257 (java.rest.encap): Likewise.
19258 * config-lang.in (compilers, stagestuff): Added gjavah.
19259
19260 1998-07-23 Tom Tromey <tromey@cygnus.com>
19261
19262 * gjavah.c (java_float_finite): New function.
19263 (java_double_finite): Likewise.
19264 (F_POSITIVE_INFINITY): New macro.
19265 (F_NEGATIVE_INFINITY): Likewise.
19266 (F_NAN): Likewise.
19267 (D_POSITIVE_INFINITY): Likewise.
19268 (D_NEGATIVE_INFINITY): Likewise.
19269 (D_NAN): Likewise.
19270 (print_field_info): Use java_float_finite and java_double_finite.
19271
19272 1998-07-23 Per Bothner <bothner@cygnus.com>
19273
19274 * parse.y (method_header): Name "this" implicit argument.
19275
19276 1998-07-22 Per Bothner <bothner@cygnus.com>
19277
19278 * jcf-write.c: Write out LineNumberTable attribute in .class file.
19279 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
19280 (put_linenumber): New function.
19281 (generate_bytecode_insns, generate_classfile): Write line numbers.
19282
19283 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19284
19285 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19286 (lookup_name, build_known_method_ref, build_class_init,
19287 build_invokevirtual, invoke_build_dtable, match_java_method,
19288 build_field_ref, pushdecl_force_head, build_java_binop,
19289 binary_numeric_promotion, build_decl_no_layout,
19290 build_java_arrayaccess, build_newarray, build_anewarray,
19291 build_java_array_length_access, build_java_arraynull_check): New
19292 extern function prototypes.
19293 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19294 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19295 java-tree.h.
19296 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
19297 to NULL
19298 * jcf.h (jcf_out_of_synch): New extern function prototype.
19299 * parse.h: Static/global function implemented in parse.y
19300 prototyped and declarations moved at the end of the file.
19301 (DECL_P): Check that the argument isn't null.
19302 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19303 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
19304 (QUAL_DECL_TYPE): New macro.
19305 (PARAMS): Macro definition removed.
19306 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19307 (return_statement:): Call build_return.
19308 (field_access:): Call make_qualified_primary in sub rule.
19309 (method_invocation:): Build method invocation and call
19310 make_qualified_primary when processing primaries.
19311 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
19312 get_type_from_signature.
19313 (java_check_regular_method): Extra integer 0 argument when calling
19314 lookup_java_method2.
19315 (lookup_java_interface_method2): Extra method DECL argument when
19316 calling lookup_java_interface_method2.
19317 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
19318 COMPOUND_EXPR node.
19319 (java_complete_expand_method): Layout current class iff not
19320 already done. Don't process interface's methods.
19321 (java_complete_expand_method): Use super class only if it
19322 exists. Use current class otherwise.
19323 (make_qualified_primary): New function.
19324 (resolve_expression_name): Process qualified expression or
19325 expression from primary the same way.
19326 (resolve_expression_name): Two last arguments to
19327 resolve_field_access are now NULL_TREEs.
19328 (resolve_field_access): New variable is_static. Local field must
19329 be DECLs. is_static computed on field DECLs only. Append code in
19330 where_found to the field access if necessary. Use QUAL_DECL_TYPE
19331 to initialize field_type.
19332 (resolve_qualified_expression_name): New local variable,
19333 previous_call_static and is_static. Handle primaries with function
19334 calls, casts, array references and `this'. `super' now handled as
19335 `(super_class)this'. Use is_static to clarify boolean expressions.
19336 Added code to handle case where a proper handle is required to
19337 access a field. Use QUAL_DECL_TYPE where applicable.
19338 (maybe_access_field): New function.
19339 (patch_method_invocation_stmt): New arguments primary, where,
19340 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
19341 deleted. Use `where' as a type to search from if specified. Check
19342 for static method reference where forbidden. Append primary or
19343 current_this to the argument list if not calling constructor nor
19344 static methods.
19345 (check_for_static_method_reference): New function.
19346 (patch_invoke): Layout the class on which new is done if
19347 necessary.
19348 (lookup_method_invoke): Changed format to report errors on
19349 methods.
19350 (qualify_ambiguous_name): New local variable this_found. Now
19351 handle things from primaries. Method call are considered
19352 expression names.
19353 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
19354 changed into NULLs.
19355 (not_initialized_as_it_should_p): Comply with the new DECL_P.
19356 (java_complete_tree): New case fo RETURN_EXPR. Process function
19357 call arguments in separate function.
19358 (complete_function_arguments): New function.
19359 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
19360 anymore.
19361 (patch_assignment): Take the return function slot into account as
19362 a RHS. Distinguish assignment from a return.
19363 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
19364 when checking methods in interfaces.
19365 (resolve_type_during_patch): NULL argument to unresolve_type_p
19366 instead of NULL_TREE.
19367 (patch_newarray): Fixed typo in comment.
19368 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
19369 (build_return, patch_return): New functions.
19370 * typeck.c (lookup_java_constructor): Fixed typo in comment.
19371
19372 1998-07-21 Per Bothner <bothner@cygnus.com>
19373
19374 * constants.c (find_name_and_type_constant, find_fieldref_index,
19375 find_methodref_index): New methods.
19376 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
19377 just return given method. Also, rename to build_known_method_ref.
19378 (expand_invoke): Rename call to build_invoke_non_interface.
19379 * java-tree.h, parse.h: Update prototype.
19380 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
19381 (such as expand_expr_stmt) if flag_emit_class_files.
19382 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
19383 STACK_TARGET, IGNORE_TARGET): New macros.
19384 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
19385 (generate_bytecode_insn): New function to generate method's bytecode.
19386 (generate_classfile): Node generate Code attribute for a method.
19387 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
19388 push_long_const, field_op, adjust_typed_op, maybe_wide):
19389 New functions used by generate_bytecode_insn.
19390
19391 * typeck.c (signature_include_return): Remove variable.
19392 (push_java_argument_signature, build_java_argument_signature): New.
19393 (build_java_signature): Use push_java_argument_signature.
19394 * parse.y: Use build_java_argument_signature instead of fiddling
19395 with signature_include_return.
19396
19397 1998-07-17 Tom Tromey <tromey@cygnus.com>
19398
19399 * gjavah.c (print_c_decl): Always generate JArray<>* for array
19400 types.
19401
19402 * Makefile.in (all.indirect): Added gjavah$(exeext).
19403 (gjavah$(exeext)): Added $(exeext).
19404 (clean): Likewise.
19405
19406 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19407
19408 * class.c (layout_class): Call to java_layout_parsed_class replace
19409 by safe_layout_class.
19410 * expr.c (build_java_array_length_access): Removed static storage
19411 class in the function definition.
19412 (build_java_arraynull_check): Likewise.
19413 Also fixed typos in two comments.
19414 * lex.c (java_init_lex): Initialize static global kw_length.
19415 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19416 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
19417 java_lex_error.
19418 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19419 * parse.h (resolve_no_layout): New static function declaration.
19420 (get_identifier_in_static): Declaration removed.
19421 (java_layout_parsed_class): Function name declaration changed to
19422 safe_layout_class.
19423 (build_newarray_node, patch_newarray, resolve_type_during_patch,
19424 not_initialized_as_it_should_p, build_this): New static function
19425 declarations.
19426 (pushdecl_force_head, build_java_binop, int_fits_type_p,
19427 binary_numeric_promotion, stabilize_reference,
19428 build_decl_no_layout, build_java_arrayaccess): Extern function
19429 declarations moved into their own section.
19430 (build_newarray, build_anewarray, build_java_array_length_access,
19431 build_java_arraynull_check): New extern function declarations.
19432 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19433 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
19434 fake tree codes.
19435 (CALL_CONSTRUCTOR_P): New macro.
19436 * parse.y (kw_length): New static global tree node.
19437 (return_statement): Tagged <node>.
19438 (RETURN_TK): Tagged <operator>.
19439 (variable_declarator_id:): Build variable declaration with an
19440 empty initialization value if a syntax error was found in the
19441 initialization part of the variable declaration.
19442 (statement_without_trailing_substatement:): return_statement: now
19443 uses the default rule.
19444 (return_statement:): Temporarily fixed to return NULL_TREE.
19445 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19446 (class_instance_creation_expression:): Class creation rules now
19447 call build_method_invocation upon reduction.
19448 (array_creation_expression:): Rules call build_newarray_node upon
19449 reduction.
19450 (dim_exprs:): Build a list of dimension expressions.
19451 (dim_expr:): Store location of the OSB_TK in the dimension
19452 expression node.
19453 (method_invocation:): Added a new error rule.
19454 (build_unresolved_array_type): WFL argument may also be an array
19455 on a primitive type. Name of the argument changed to reflect this.
19456 (method_declarator): Insert argument type at the beginning of the
19457 argument type list and later reverse the list.
19458 (unresolved_type_p): Argument 'returned' may be optionally
19459 NULL_TREE.
19460 (java_layout_class_from_source): Function renamed
19461 safe_layout_class.
19462 (resolve_and_layout): Now call resolve_no_layout and
19463 safe_layout_class.
19464 (resolve_no_layout): New function.
19465 (purify_type_name): New function.
19466 (complete_class_report_errors): Call purify_type_name during error
19467 report on a type not found.
19468 (process_imports): error_found local variable doesn't need to be
19469 initialized to zero.
19470 (declare_local_variables): New local type_wfl. Fixed typo in error
19471 message. type_wfl assigned to unresolved type and used to register
19472 incomplete type. Build a WFL around the variable initialization
19473 statement so that debug info can be generated on it.
19474 (source_start_java_method): Reverse argument list after they've
19475 been processed.
19476 (current_this): New static global variable.
19477 (java_complete_expand_methods): Set current_this when appropriate.
19478 (resolve_expression_name): Build correct static and non static
19479 field access bearing a simple name.
19480 (resolve_field_access): Resolve the length field of arrays. Handle
19481 f.m() cases.
19482 (patch_method_invocation_stmt): Set the type of the method
19483 invocation to error_mark_node. This value is later overridden by a
19484 valid type, if any. Don't handle qualified constructor invocation
19485 as qualified method invocation. Call lookup_method_invoke with its
19486 new flag. It's no longer necessary to access the selected method
19487 as the value of a tree list. Handle constructor invocation.
19488 (patch_invoke): Reverse argument list when invoking non interface
19489 methods. Insert call to new as the first argument of the
19490 constructor.
19491 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
19492 defined within a final class. Return INVOKE_STATIC if the invoked
19493 method is a constructor.
19494 (lookup_method_invoke): New lc argument is a flag to indicate a
19495 constructor lookup. Now handle constructor lookup. Choose the most
19496 specific method in case several were matching the invocation
19497 requirements. Return a method decl instead of a tree list featuring
19498 one single method decl element.
19499 (refine_accessible_methods_list): New lc flag argument to
19500 indicate that a constructor is being looked up.
19501 (not_initialized_as_it_should_p): New function.
19502 (java_complete_tree): Now process fake tree codes
19503 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
19504 save_expr on resolved function call arguments. Case on
19505 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
19506 (patch_assignment): LHS can be a field access expression. When
19507 dealing with reference, lhs_type is the promoted type of the
19508 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
19509 applicable.
19510 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19511 (patch_binop): Use not_initialized_as_it_should_p where
19512 applicable.
19513 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19514 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
19515 where applicable.
19516 (resolve_type_during_patch): New function.
19517 (patch_cast): Call resolve_type_during_patch to resolve type and
19518 report error accordingly.
19519 (patch_array_ref): Use not_initialized_as_it_should_p where
19520 applicable. Array base expression is saved before being
19521 used. Promote the type of an array elements if it contains non
19522 builtin types.
19523 (build_newarray_node, patch_newarray, build_this): New functions.
19524
19525 1998-07-16 Tom Tromey <tromey@cygnus.com>
19526
19527 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19528 increment it in `for' statement.
19529 (print_field_info): If number is inf or nan, don't print it.
19530 (print_method_info): If method name is `delete', just ignore it.
19531 (print_c_decl): Special-case jstringArray.
19532
19533 * gjavah.c (help): New function.
19534 (no_argument): New function.
19535 (usage): Changed text.
19536 (main): Rewrote argument handling. Now handles -v, --help,
19537 --version.
19538 (version): New function.
19539 (found_error): New global.
19540 (main): Return found_error.
19541 (generate_access): Set found_error.
19542 (print_c_decl): Likewise.
19543
19544 1998-07-15 Tom Tromey <tromey@cygnus.com>
19545
19546 * gjavah.c (print_c_decl): Don't print "," when examining field.
19547 Skip type name when looking at "[L" types.
19548 (process_file): Now static.
19549 (generate_access): Now returns int.
19550 (last_access_generated): New global.
19551 (process_file): Clear last_access_generated; make multiple passes
19552 over the class.
19553 (print_field_info): Just return if generate_access returns true.
19554 (print_method_info): Likewise. Also, allow <init> functions to
19555 pass through.
19556 (print_c_decl): Added is_init argument. Print constructors
19557 properly.
19558 (print_cxx_classname): Use UTF8_GET to extract characters from
19559 string.
19560 (print_base_classname): New function.
19561 (print_class_decls): New function.
19562 (process_file): Use it.
19563 (utf8_cmp): New function.
19564
19565 1998-07-13 Nick Clifton <nickc@cygnus.com>
19566
19567 * lang-options.h: Format changed to match changes in gcc/toplev.c
19568 to implement a --help option.
19569
19570 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
19571
19572 * decl.c (init_decl_processing): Revert change to dtable_type.
19573
19574 1998-07-09 Per Bothner <bothner@cygnus.com>
19575
19576 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19577
19578 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
19579
19580 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19581
19582 * lang.c (lang_init): Default flag_exceptions to 1, without
19583 checking to see if it's 2 first.
19584
19585 1998-07-08 Jeffrey A Law (law@cygnus.com)
19586
19587 * constants.c: Include "system.h".
19588 * decl.c: Likewise.
19589 * lang.c (flag_new_exceptions): Get via extern now.
19590 (lang_init_options): New functions. Turn on flag_new_exceptions.
19591
19592 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
19593
19594 * lex.c (java_lex): Return 0 when we see an invalid character in
19595 the input.
19596
19597 * lex.c (java_read_char): Specify extra argument when calling
19598 java_lex_error.
19599 (java_read_unicode, java_parse_end_comment,
19600 java_parse_escape_sequence): Likewise,
19601 (java_lex): Specify extra argument when calling
19602 java_lex_error. Test that IDs are beginning with a legal character
19603 for IDs. Handle invalid characters with an error message and a
19604 call to java_lex_error.
19605 (java_lex_error): Adjust column position by new argument
19606 `forward'. Issue an error even if in the middle of reporting an
19607 other error.
19608
19609 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
19610
19611 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19612 we don't explicitly put a null pointer when we're copying it.
19613
19614 1998-07-07 Tom Tromey <tromey@cygnus.com>
19615
19616 * gjavah.c (print_cxx_classname): New function.
19617 (super_class_name): Likewise.
19618 (print_super_fields): Removed.
19619 (in_super): Removed.
19620 (print_field_info): Never generate #defines.
19621 (print_c_decl): Changed generated types to match JNI. No longer
19622 print class name before method name.
19623 (print_method_info): Print "static" before static methods.
19624 Print "virtual" before non-final methods.
19625 (usage): Use exit(1), not exit(-1).
19626 (main): Likewise.
19627 (print_field_info): Use %.17g to print a double.
19628 (last_access): New globals.
19629 (process_file): Initialize last_access.
19630 (usage): Now static.
19631 (ACC_VISIBILITY): New define.
19632 (generate_access): New function.
19633 (print_field_info): Call it.
19634 (print_method_info): Likewise. Also, generate information for all
19635 methods, not just native methods. Return void.
19636 (print_c_decl): Return void.
19637 (print_field_info): Return void.
19638
19639 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19640
19641 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19642 processing the jc1 grammar file. Prefix bison functions and
19643 variables with java_.
19644 (parse.c): Dependencies on parse.h and lex.h
19645 * expr.c (build_java_arrayaccess): Function now global.
19646 * java-tree.h: Comment reorganized to carry on previous
19647 classification effort.
19648 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19649 RESOLVE_TYPE_NAME_P): New flags on WFLs.
19650 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19651 java_parse (new prefix java_ generated by bison).
19652 (java_layout_parsed_class, java_register_parsed_class): Function
19653 call removed.
19654 (yyparse): Removed unnecessary call to init_outgoing_cpool.
19655 * lex.c (static tree wfl_op): Variable deleted.
19656 (java_init_lex): Initialize kw_super and kw_this. Initialize more
19657 ctxp fields to NULL_TREE.
19658 (java_lex): No longer create WFL for operators. Filename caching
19659 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19660 created as STRING_CST and later expanded. Removed extra argument
19661 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19662 and SUPER.
19663 (build_wfl_node): Removed code in comments.
19664 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19665 store token and location data in the current bison token.
19666 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19667 static/extern function declaration at the beginning of the file.
19668 (struct qualification): Data structure definition deleted.
19669 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19670 (qualify_ambiguous_name): Function declaration modified. Function
19671 now returns nothing.
19672 (build_array_ref, patch_array_ref, make_qualified_name,
19673 resolve_qualified_expression_name, maybe_generate_clinit,
19674 resolve_field_access): New static function declarations.
19675 (build_java_arrayaccess): New extern function declaration.
19676 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19677 (CALL_EXPR_PRIMARY): Macro deleted.
19678 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19679 (struct parser_ctxt): Field initialized_final
19680 removed. non_static_initialized, static_initialized: New fields.
19681 * parse.y (static tree kw_super, static tree kw_this): New global
19682 static.
19683 (%union): tree wfl field of operator member replaced by int
19684 location. WFLs are non longer created for operators.
19685 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19686 (qualified_name:): Now calls make_qualified_name to build the
19687 identifier.
19688 (type_declaration:): Consider generating <clinit> when class
19689 parsing completed.
19690 (variable_declarator:): Directly build an assignment node when the
19691 variable is initialized when declared.
19692 (this_or_super:): Build a WFL and set current location when THIS
19693 or SUPER are parsed.
19694 (expression_statement:): Wrap statement around a WFL.
19695 (primary_no_new_array:): Fixed typo. Changed value returned by
19696 THIS_TK because of its new type (temporary).
19697 (dim_exprs:): Temporary fix because of OSB_TK's new type.
19698 (field_access:): Build qualified name with SUPER.
19699 (method_invocation:): Fixed returned value because of SUPER's new
19700 type.
19701 (array_access:): Use OSB_TK location information.
19702 (post_increment_expression:, post_decrement_expression:,
19703 unary_expression:, pre_increment_expression:,
19704 pre_decrement_expression:, unary_expression_not_plus_minus:,
19705 cast_expression:, multiplicative_expression:,
19706 additive_expression:, shift_expression:, relational_expression:,
19707 equality_expression:, and_expression:, exclusive_or_expression:,
19708 inclusive_or_expression:, conditional_and_expression:,
19709 conditional_or_expression:, assignment:): Use new location/token
19710 information available on operators.
19711 (create_class): Set super_decl_type to NULL_TREE when processing
19712 java.lang.Object.
19713 (register_fields): Field initialization is now a MODIFY_EXPR
19714 node. Chain initialization code to the matching lists (according
19715 to the field declaration modifiers).
19716 (maybe_generate_clinit): New function.
19717 (method_header): Don't set method's DECL_NAME to a WFL when adding
19718 methods to java.lang.Object.
19719 (resolve_and_layout): Now can return NULL_TREE if the type
19720 resolution fails. Otherwise, return the class DECL instead of its
19721 TYPE.
19722 (check_method_redefinition): Don't patch method DECL_NAME if it
19723 belongs to java.lang.Object.
19724 (process_imports): Simply assign error_found to the value returned
19725 by check_pkg_class_access.
19726 (declare_local_variables): Don't use their init statements (if
19727 any) when parsing error were previously found. Reuse MODIFY_EXPR
19728 build during parsing as an init statement.
19729 (java_method_add_stmt): Now return the current method body.
19730 (java_layout_parsed_class, java_register_parsed_class): Functions
19731 removed.
19732 (java_complete_expand_methods): Initialize the constant pool on a
19733 per class basis. Layout the classes before expanding their method
19734 bodies. Don't try expand artificial constructor code if error were
19735 found. Make the classes data and register them if no error were
19736 found.
19737 (java_complete_expand_method): Retrieve an artificial constructor
19738 argument list before entering its body. Assign the top block to
19739 the artificial constructor function body and set types of declared
19740 blocks and compound statements to void. Walk method body if not an
19741 artificial constructor.
19742 (make_qualified_name, cut_identifier_in_qualified): New functions.
19743 (resolve_expression_name): Fixed comments. Save/restore the
19744 current class CLASS_LOADED_P flag value. Build non qualified
19745 static field access and handle qualified expression names.
19746 (resolve_field_access, resolve_qualified_expression_name): New
19747 functions.
19748 (patch_method_invocation_stmt): Use the new expression resolution
19749 scheme, calling resolve_field_access when the function call is
19750 resolved as an expression.
19751 (qualify_ambiguous_name): Function rewritten to work on qualified
19752 expression produced by make_qualified_name.
19753 (java_complete_tree): Promote type when function's argument are
19754 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19755 the assignment to discover further errors if RHS is a expression
19756 name that fails to evaluate. Declare LHS initialized even though
19757 the assignment failed. Don't use the location variable and removed
19758 extra argument in patch function calls. Now handle the ARRAY_REF
19759 case and build internal string representation when STRING_CSTs are
19760 walked.
19761 (build_method_invocation): Don't wrap function call around a WFL.
19762 (build_assignment): Likewise. Use the operator location
19763 information.
19764 (patch_assignment): Handle array access LHSs. Handle error
19765 provenance, resulting in a better error report.
19766 (build_binop): Use op_location from operator as binop location
19767 information.
19768 (build_unaryop, build_incdec, build_cast): Likewise.
19769 (patch_binop): Extract location information from the node. Fixed
19770 typo in error message.
19771 (patch_unary_op): Extract location information from the node.
19772 (build_array_ref, patch_array_ref): New functions.
19773
19774 1998-07-01 Tom Tromey <tromey@cygnus.com>
19775
19776 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19777 match _Jv_IsInstanceOf.
19778 * decl.c (init_decl_processing): Use _Jv_NewArray, not
19779 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
19780
19781 1998-06-30 Tom Tromey <tromey@cygnus.com>
19782
19783 * decl.c (init_decl_processing): Functions are now named
19784 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19785
19786 1998-06-29 Per Bothner <bothner@cygnus.com>
19787
19788 * java-tree.h (load_class): Add prototype.
19789 * class.c (is_compiled_class): Add missing arg to load_class.
19790 * expr.c (expand_java_NEW): Call load_class.
19791 * parse.y (process_import): Removed bogus use of void return value.
19792
19793 1998-06-25 Per Bothner <bothner@cygnus.com>
19794
19795 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
19796 Function name is "_Jv_Throw" instead of "soft_athrow".
19797 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
19798 Function name is "_Jv_AllocObject" instead of "soft_new".
19799 Takes an extra parameter (object size).
19800 * expr.c: Update calls.
19801
19802 1998-06-24 Per Bothner <bothner@cygnus.com>
19803
19804 * lex.c (java_get_line_col): Handle end-of-file.
19805 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
19806
19807 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
19808
19809 * lang.c (lang_init): Make -fexceptions the default.
19810 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19811 exception handling is not turned on.
19812
19813 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
19814
19815 * lang.c (flag_new_exceptions): Make this this default.
19816 * decl.c (end_java_method): Call emit_handlers.
19817 * except.c (method_init_exceptions): Set language code and version.
19818 (expand_start_java_handler): Enable exception, and call
19819 expand_eh_region_start.
19820 (expand_end_java_handler): Enable exception, and set up catch blocks.
19821 (emit_handlers): New routine to generate the saved handlers.
19822 * java-except.h (emit_handlers): Add prototype.
19823
19824 1998-06-12 Per Bothner <bothner@cygnus.com>
19825
19826 We used to have three different representations of the constant pool:
19827 the CPool structure, the tree_constant_pool, and the constructures
19828 used to build the Class object (which may need class and string
19829 constants) in compiled code. None were appropriate for compiling
19830 to .class files, so I did a major overhaul.
19831
19832 First, the tree_constant_pool array was removed. Things were
19833 modified to the CPool structure in the JCF could be used.
19834 Second, a "capacity" field was added to the CPool, and functions
19835 written to search for a matching constant, adding one if not found.
19836 The code that generated the Class object was changed to use a CPool.
19837 The actual TREE_LISTs used to build the CONSTRUCTORs used for
19838 the static Class object are now only in build_constants_constructor.
19839 Finally, I wrote code which can generate a .class file (including its
19840 constant pool) from the RECORD_TYPE of a class. This is a big step
19841 on the way to compiling Java source into .class files.
19842
19843 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
19844 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
19845
19846 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19847 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
19848 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19849 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19850 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
19851 (lang_type): Removed constant_pool field.
19852 * jcf.h (CPool): Renamed size to count. Added field capacity.
19853 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19854 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
19855 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19856
19857 * constants.c (current_constant_pool_tags, current_constant_pool_data,
19858 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19859 * constants.c (build_constants_constructor): Use new outgoing_cpool.
19860 (set_constant_entry, find_constant1, find_constant2,
19861 find_class_constant, count_constant_pool_bytes, write_constant_pool,
19862 find_utf8_constant, find_class_or_string_constant): New functions.
19863
19864 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
19865 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
19866 (give_name_to_class, get_class_constant): Likewise.
19867 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
19868 (get_name_and_type_constant, get_ref_constant): Removed.
19869 * parse.h (parser_ctxt): Remove field tree_constant_pool.
19870 * parse.y: Don't save/restore tree_constant_pool.
19871 * verify.c (verify_jvm_instructions): Update for new approach.
19872 * expr.c (expand_invoke, expand_java_field_op): Likewise.
19873
19874 * lang-options.h: Added -femit-class-file, -femit-class-files.
19875 * lang.c (flag_emit_class_files), java-tree.h: New flag.
19876 (lang_f_options): Added "emit-class-file(s)".
19877
19878 * expr.c (build_java_arrayaccess): Generate more efficient array
19879 bounds checking, by using unsigned compare.
19880
19881 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
19882
19883 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
19884
19885 * parse.h: New comment on the handling of unresolved type
19886 identifiers. JDEPs are now part of the jdep_code enum.
19887 (typedef struct jdep): Now use enum jdep_code or int, depending on
19888 availability. Both are narrowed down to an 8 bits bitfield.
19889 (CALL_EXPR_PRIMARY): Fixed comment.
19890
19891 1998-06-10 Tom Tromey <tromey@cygnus.com>
19892
19893 * Make-lang.in (java): Added gjavac and jvgenmain.
19894 (java.start.encap): Depend on gjavac.
19895 (java.rest.encap): Depend on jvgenmain.
19896
19897 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19898 (JAVA_CROSS_NAME): Likewise.
19899 (java.all.build): Depend on jvgenmain and gjavac.
19900 (java.all.cross): Depend on jvgenmain and gjavac-cross.
19901 (jvgenmain$(exeext)): New target.
19902 (java.install-common): Wrote.
19903 * config-lang.in (compilers, stagestuff): Added gjavac and
19904 jvgenmain.
19905
19906 1998-06-10 Dave Brolley <brolley@cygnus.com>
19907
19908 * lang.c (lang_decode_option): New argc/argv interface.
19909
19910 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
19911
19912 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19913 * decl.c (build_decl_no_layout): New function.
19914 * expr.c (java_lang_expand_expr): Layout declarations found in
19915 blocks before they're pushed.
19916 * jcf-parse.c (load_class): Save current line when parsing class
19917 file.
19918 (parse_source_file): Register class before expanding their
19919 methods.
19920 * lang.c (put_decl_node): Produce `null' when `void *' is
19921 processed.
19922 * lex.c (static tree wfl_op): New static global, for error report
19923 on casts.
19924 (java_init_lex): wfl_operator and wfl_op initialized
19925 here. Filename caching added for wfl_op. Return wfl_op when `(' is
19926 parsed.
19927 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19928 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19929 build_unresolved_array_type): New static function definitions.
19930 (build_decl_no_layout): New extern function declared.
19931 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19932 faulty modifier exists.
19933 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19934 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19935 (UNARY_PLUS_EXPR): New fake operator.
19936 (struct parser_ctxt): New field osb_number.
19937 * parse.y (static tree wfl_operator): New static WFL for operator
19938 bound error messages.
19939 (DECR_TK, INCR_TK): Moved.
19940 (OP_TK): Tagged <operator>.
19941 (array_type:): Now call build_unresolved_array_type.
19942 (dim_expr:): Count the number of '[' seen.
19943 (post_increment_expression, post_decrement_expression,
19944 pre_increment_expression, pre_decrement_expression,
19945 unary_expression_not_plus_minus, unary_expression:): Actions are
19946 now building the corresponding unary expressions.
19947 (cast_expression:): Actions are now building cast expressions.
19948 (build_unresolved_array_type): New function.
19949 (create_interface): Reset the number of declared interfaces.
19950 (create_class): Likewise.
19951 (method_header): Methods declared within the scope of an interface
19952 are now implicitly set public and abstract.
19953 (java_complete_class): Variable's and parameter's type are patched
19954 with a promoted type.
19955 (declare_local_variables): Resolved non builtin types are promoted
19956 before being used to build a variable decl. Removed type patch
19957 posted on variable initialization statement.
19958 (source_start_java_method): Use build_decl_no_layout to build the
19959 decl of a parameter of incomplete type.
19960 (java_register_parsed_class): Process interfaces too. Call
19961 rest_of_decl_compilation on each processed class declarations.
19962 (java_complete_expand_methods): Don't attempt to expand things in
19963 interfaces.
19964 (java_complete_tree): Process CONVERT_EXPR, even though it always
19965 has a type. Propagate error_mark_node to node's type too. Promote
19966 method's call argument type and return error_mark_node if
19967 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19968 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19969 handle unary operator nodes.
19970 (build_assignment): Added comment.
19971 (print_int_node): New function.
19972 (patch_assignment): New second argument. New error handling. Use
19973 print_int_node. Handle references. Use can_cast_to_p to issue
19974 different error message according to the context and check upon
19975 the initialization of the RHS.
19976 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19977 (operator_string): Handle more operators.
19978 (patch_binop): No longer use a function static
19979 wfl_operator. Improved error message on shift distance.
19980 (build_unaryop, build_incdec, build_cast, patch_unaryop,
19981 patch_cast): New functions.
19982
19983 1998-06-05 Per Bothner <bothner@cygnus.com>
19984
19985 * jvspec.c: New file.
19986 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
19987
19988 * java-tree.h (identifier_subst): Add declaration.
19989
19990 1998-06-04 Tom Tromey <tromey@cygnus.com>
19991
19992 * jvgenmain.c (main): Generate call to JvRunMain.
19993
19994 * class.c (make_class_data): Push value for "sync_info" field.
19995 * decl.c (init_decl_processing): Push "sync_info" field.
19996
19997 1998-06-03 Per Bothner <bothner@cygnus.com>
19998
19999 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
20000 Java (source) name, not signature.
20001 Set TYPE_ALIGN to (at least) that of element_type.
20002
20003 1998-06-02 Per Bothner <bothner@cygnus.com>
20004
20005 * class.c: Moved classname-mangling-rekated code to ...
20006 * mangle.c: ... this new file.
20007 * jvgenmain.c: New program (needs mangle.c) to generate main program.
20008 * Makefile.in: Update for above changes.
20009
20010 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20011
20012 * expr.c (truthvalue_conversion): Convert integer and floating
20013 point value to their truth value.
20014 * lex.c (java_lex): Handle the `null' literal.
20015 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20016 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20017 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20018 New macros.
20019
20020 * parse.y: Reorganization/documentation on token declaration.
20021 (binop_lookup[]): New added new tree codes.
20022 (relational_expression): Build corresponding binary operators.
20023 (equality_expression, conditional_and_expression,
20024 conditional_or_expression): Likewise.
20025 (java_complete_class): Fix crash in debug message.
20026 (java_complete_tree): Check initialization of method call
20027 arguments. Further bogus node evaluation to detect more error
20028 during assignments. Handles more binary operators.
20029 (patch_assignment): Use DECL_P.
20030 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20031 code.
20032 (operator_string): Handle more case. Compacted source.
20033 (patch_binop): Changed function comment. Checking for
20034 uninitialized first operand takes the compound assignment into
20035 account and uses DECL_P. Checking for uninitialized second operand
20036 delayed to routine's end. Use macros to issue type bound error
20037 messages and issue messages on both operands if their types are
20038 different. Force fixed type into node. Handle all binary
20039 operators.
20040
20041 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20042
20043 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20044 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20045 build operator node and return tokens.
20046 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20047 * parse.h (java_complete_tree): Changed returned type in prototype.
20048 (build_method_invocation, build_assignment, patch_assignment,
20049 patch_binop): New static function declarations.
20050 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20051 BUILD_EXPR_WFL): New macros.
20052 * parse.y (enum tree_code binop_lookup[]): New static for token to
20053 TREE_CODE lookup.
20054 (%union): Parser union has new sub-structure `operator'.
20055 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20056 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20057 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20058 ASSIGN_ANY_TK): Tokens tagged `operator'.
20059 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20060 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20061 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20062 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20063 (assignment_operator:): Rule tagged `operator'.
20064 (expression_statement:): Re-installed default rule.
20065 (method_invocation:): Sub rules call build_method_invocation.
20066 (postfix_expression:): Don't attempt to resolve name here. Just
20067 return an ID.
20068 (multiplicative_expression:): Sub-rules build corresponding binop
20069 expression node.
20070 (additive_expression:, shift_expression:, and_expression:,
20071 exclusive_or_expression:, inclusive_or_expression:): Likewise.
20072 (assignment:): Sub rule invoke build_assignment.
20073 (assignment_operator:): Default rules on sub rules.
20074 (force_error): Added documentation on this variable.
20075 (declare_local_variables): Build initialization calling
20076 build_assignment.
20077 (expand_start_java_method): Removed unused rtx declaration. Mark
20078 arguments as already initialized.
20079 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20080 (java_complete_expand_methods): Don't process next method if
20081 completion of the previous one triggered errors.
20082 (java_complete_expand_method): Call source_end_java_method if no
20083 error were found during completion.
20084 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20085 locals declaratilon. Handle names found within a class. Return
20086 error_mark_node when things aren't found.
20087 (patch_method_invocation_stmt): Return error_mark_node on failures.
20088 (patch_invoke): Removed unused local. Return the correct node.
20089 (java_complete_tree): Now returns a value. The BLOCK section binds
20090 local identifiers and the type of a BLOCK is now void. Assign the
20091 result of operand completion on COMPOUND_EXPR. Assign the
20092 encapsulated node of a WFL to the result of its completion, except
20093 when the node is an identifier. Now handle MODIFY_EXPR and several
20094 binary operators. Return error_mark_node on errors.
20095 (build_method_invocation, build_assignment, patch_assignment,
20096 build_binop, operator_string, patch_binop): New functions.
20097 * typeck.c (binary_numeric_promotion): New function.
20098
20099 1998-05-21 Per Bothner <bothner@cygnus.com>
20100
20101 * class.c (identifier_subst): New convenience wrapper for ident_subst.
20102 Replace most uses of ident_subst by identifier_subst.
20103
20104 * class.c (push_class_static_dummy_field): Removed function.
20105 (build_class_ref): Find Class object decl by looking up "CNAME.class",
20106 instead of looking got "class" static field. Create that decl here.
20107 (class_identifier_node): Removed; no longer needed.
20108 (init_class_processing): Don't init class_identifier_node.
20109 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
20110 Do nreverse 0 times (instead of twice) for Object and Class.
20111 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20112
20113 1998-05-20 Per Bothner <bothner@cygnus.com>
20114
20115 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
20116 while initializing linenumber_count and linenumber_table.
20117 Do it before init_function_start (which calls emit_line_note).
20118 * expr.c (expand_byte_code): Don't need to clear lineno here.
20119
20120 1998-05-18 Tom Tromey <tromey@cygnus.com>
20121
20122 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20123 then mangle number as _N_.
20124
20125 * class.c (mangle_class_field): New function.
20126 (build_class_ref): Set assembler name of class reference using
20127 mangle_class_field.
20128 (push_class_static_dummy_field): Likewise.
20129
20130 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
20131
20132 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20133 of assigning to TREE_CODE. The latter method exploits a feature
20134 of GCC that is not ANSI compliant.
20135
20136 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
20137
20138 * decl.c (pushdecl_force_head): New function.
20139 (pushlevel): Removed conditional printf.
20140 (complete_start_java_method): Don't enter local variable scope if
20141 function is compiled from source code.
20142 * expr.c: parse.h now included
20143 (java_lang_expand_expr): New function.
20144 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20145 printf. Terminate buffer when doing directories.
20146 * jcf-parse.c (parse_source_file): Call lang_init_source before
20147 parsing and before code generation.
20148 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20149 use printf if the macro is defined.
20150 * lang.c (lang_init): Install lang_expand_expr hook on
20151 java_lang_expand_expr.
20152 (java_dummy_print): New function.
20153 (lang_init_source): New function.
20154 * lex.c (java_lex): Remember location of an opening brace at the
20155 second nesting level.
20156 (java_is_eol): Unget character seen after a CR if it is EOF.
20157 * parse.h: Now includes lex.h
20158 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20159 printf if the macro is defined.
20160 (expand_start_java_method, build_expr_block, enter_block,
20161 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20162 New static function declarations.
20163 (pushdecl_force_head): New extern function declaration.
20164 (INCOMPLETE_TYPE_P): New macro.
20165 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20166 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20167 BLOCK_EXPR_ORIGIN): New macros.
20168 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20169 DECL_SOURCE_LINE_LAST): New macros.
20170 (struct parser_ctxt): Removed field current_method_decl, redundant
20171 with the field current_function_decl. Added fields
20172 first_ccb_indent1 and pending_block.
20173 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20174 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20175 tagged <node>
20176 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20177 (compilation_unit:): Cosmetic on sub rule.
20178 (type_declaration:): Cosmetic on sub rules. Added an error rule.
20179 (variable_initializer:): Installed default rule on expression:.
20180 (method_declaration:): method_header: starts a new
20181 method. method_body: installs the function body, absorbs blocks
20182 emitted for temporary variable scopings, pops function's body block
20183 and merges function's last statement lineno in DECL_SOURCE_LINE.
20184 (method_body:): Installed default rules.
20185 (block:): Call enter_block when an opening brace is seen. Absorb
20186 scoping blocks and call exit_block when a closing brace is seen.
20187 (block_statement:): Cosmetic changes.
20188 (method_invocation:): Create WFL around CALL_EXPR node.
20189 (patch_stage): Added comment around definition.
20190 (method_header): Try to use first_ccb_indent1 as the first line of
20191 the method, so BP debug info are emitted at the first opening
20192 brace of the function. If the function has no body, use the
20193 location of the function's name. Override currently defined method
20194 name with the matching WFL so we can point redefinition errors
20195 using the location where the function's name was declared.
20196 (check_abstract_method_header): Interprets DECL_NAME as an
20197 identifier or as a WFL, accordingly.
20198 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20199 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20200 location and name information out of it and reinstall DECL_NAME to
20201 its original identifier node value.
20202 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20203 function's source code).
20204 (read_import_dir): Test the value returned by find_class and issue
20205 a fatal accordingly.
20206 (declare_local_variables): Push a new block for the scope of the
20207 new variable(s) if code has been already generated at that nesting
20208 level. Pinpoint redefinition errors using the variable id
20209 WFLs. Generate initialization code if necessary. If the variable
20210 type is incomplete, register a patch on its decl.
20211 (source_start_java_method): Rewritten. Define a new block for the
20212 function's parameters. Build parameter decl out of function's
20213 arguments and register them for a patch if their types are
20214 incomplete.
20215 (expand_start_java_method): Includes the part of
20216 source_start_java_method that was pushing the parameter decls and
20217 completing the method start code.
20218 (source_end_java_method): Removed call the expand_end_bindings and
20219 poplevel (already taken care of). Reinstall function's arguments
20220 and get function's last line of code before calling
20221 expand_function_end.
20222 (java_method_add_stmt): New comment before the function's
20223 code. Complement the second operand of the current COMPOUND_EXPR
20224 if necessary.
20225 (java_complete_expand_methods): Don't generate debug info on line
20226 zero when expanding a generated constructor.
20227 (java_complete_expand_method): Set start and end line numbers for
20228 a artificially generated constructor to one and manually call
20229 enter_block and exit_block when defining it. For all methods:
20230 expand function's start calling the new expand_start_java_method
20231 and invoke java_complete_tree on the effective method's body, if
20232 any.
20233 (resolve_expression_name): Now use lookup_name_in_blocks to search
20234 local variable decls and print out an error when variables are
20235 undefined.
20236 (patch_method_invocation_stmt): Inserted comment before the
20237 function's code.
20238 (lookup_method_invoke): Chain method's arguments using chainon
20239 with the current arg list as a second argument. Inserted missing
20240 IDENTIFIER_POINTER when reporting an error on methods not found.
20241 (refine_accessible_methods_list): Don't retain constructors.
20242 (patch_arguments): Function removed.
20243 (java_complete_tree): Inserted comment before the function's
20244 code. New case for BLOCKs. Moved the WFL case a bit
20245 further. Complete function's arguments.
20246 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
20247 maybe_absorb_scoping_blocks): New functions.
20248
20249 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20250
20251 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
20252 previously set.
20253 * jcf-parse.c (parse_source_file, java_error_count): New forward
20254 and extern declarations.
20255 (java_parse_abort_on_error): Macro moved.
20256 (jcf_parse_source): fatal called if fopen fails. Now calls
20257 parse_source_file.
20258 (parse_source_file): New parse_only parameter. Reflects the
20259 elimination of the second pass.
20260 (yyparse): parse_source_file called with argument set to 0.
20261 * jcf.h (JCF_ZERO): Sets java_source to zero.
20262 * lex.c (java_init_lex): pass argument is gone. Function modified
20263 to be called once during the analysis of a file.
20264 (java_unget_unicode): Fixed typo in fatal message.
20265 (java_get_line_col): Likewise.
20266 (java_lval): Likewise. String literals no longer built during
20267 second pass.
20268 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
20269 account.
20270 * parse.h (MODIFIER_WFL): New macro.
20271 (parse_check_super, parser_check_super_interface): Now return int.
20272 (parser_chain_incomplete_item, not_builtin_p,
20273 complete_method_decl): Declarations removed.
20274 (build_method_invocation_stmt, build_invoke): Renamed using the
20275 `patch' instead of `build'
20276 (register-incomplete_type, obtain_incomplete_type,
20277 java_complete_tree, java_complete_expand_method,
20278 unresolved_type_p, create_jdep_list): New function declarations.
20279 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
20280 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
20281 (jdep): New typedef on new struct _jdep.
20282 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
20283 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20284 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20285 JDEP_RESOLVED_P): New macros.
20286 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
20287 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20288 JDEP_VARIABLE): New enum values and jdep kinds.
20289 (jdeplist): New typedef on struct _jdeplist.
20290 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
20291 macros.
20292 (CALL_EXPR_PRIMARY): New macro.
20293 (struct parser_ctxt): Fields java_pass, current_method_decl,
20294 method_decl_list deleted. New field jdeplist.
20295 (INCOMPLETE_P): Macro deleted.
20296 * parse.y (single_type_import_declaration:): Removed pass switch.
20297 (type_import_on_demand_declaration): Likewise.
20298 (field_declaration:): Removed pass switch on all sub rules.
20299 (class_declaration:): Call the complete_class_decl removed on
20300 class_body rules.
20301 (method_declaration:): Removed second pass switch. No longer chain
20302 methods decl when method_header reduced.
20303 (method_header:): Sub rules no longer depend on pass switch.
20304 (method_declarator:): Likewise.
20305 (method_body:): Likewise.
20306 (abstract_method_declaration:): Likewise.
20307 (block_statement:): Likewise.
20308 (local_variable_declaration:): Likewise.
20309 (argument_list:): Likewise.
20310 (method_invocation:): Likewise. Call to build_method_invocation_stmt
20311 removed. Partial CLASS_EXPR tree node built instead.
20312 (postfix_expression:): Removed pass switch on all sub rules.
20313 (java_pop_parser_context): Free classd_list content.
20314 (yyerror): Call obstrack_grow0 to finalize error message.
20315 (check_class_interface_creation): Comment modified to reflect new
20316 returned value meaning. Removed second pass switch. Return 1 if an
20317 error was found, 0 otherwise. Adjust pointer on filename if a
20318 leading path separator was found.
20319 (maybe_create_class_interface_decl): Removed first pass switch
20320 when linking the class decl to the class_list. Install a new
20321 jdep_list for the class.
20322 (add_superinterfaces): List of unresolved interfaces is
20323 gone. Unresolved interfaces are directly added to the current
20324 dependencies list.
20325 (create_interface): Second pass shortcut removed.
20326 ctpx->modifier_ctx access through MODIFIER_WFL.
20327 (create_class): Second pass shortcut removed. Call to
20328 register_incomplete_type replaces the call to
20329 parser_chain_incomplete_item.
20330 (complete_class_decl): Function removed.
20331 (duplicate_declaration_error): New way of retrieving redeclared
20332 item type.
20333 (register_fields): Call to lookup_modifier_cl replaced by
20334 MODIFIER_WFL. New way of handling unresolved type, using
20335 unresolved_type_p and obtain_incomplete_type.
20336 register_incomplete_type replaces call to parser_chain_incomplete_item.
20337 (patch_stage): New static global variable.
20338 (method_header): New way of handling unresolved type, using
20339 unresolved_type_p and obtain_incomplete_type. patch_stage used to
20340 indicates that the method decl needs to be patched.
20341 (check_abstract_method_header): Call to lookup_modifier_cl
20342 replaced by MODIFIER_WFL.
20343 (method_declarator): Incomplete argument type are registered
20344 calling register_incomplete_type. Patch on the declared method is
20345 issued in that case.
20346 (unresolved_type_p): New function.
20347 (parser_check_super_interface): New comment to reflect function's
20348 modified returned type (int). Function and has a new argument
20349 this_wfl. Call to parse_error_context uses this_wfl instead of
20350 relying on lookup_cl.
20351 (parser_check_super): Comment reflects function's new returned
20352 type (int). Function returns nonzero value on error.
20353 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
20354 register_incomplete_type, jdep_resolve_class): New functions to
20355 handle incomplete types in declarations.
20356 (java_complete_class): Rewritten to work with the new incomplete
20357 type handling scheme.
20358 (complete_class_report_errors): Likewise.
20359 (complete_method_decl): Removed: it jobs is now handled by
20360 java_complete_class.
20361 (do_resolve_class): Class loaded in not already loaded and not
20362 found in Java source code.
20363 (java_check_regular_methods, java_check_abstract_methods): Don't
20364 call complete_method_decl anymore.
20365 (lookup_modifier_cl, not_builtin_p): Functions deleted.
20366 (read_import_dir): Got rid of the pass number dependency.
20367 (declare_local_variables): New handling of unresolved types (patch
20368 issued).
20369 (source_start_java_method): New parameter level. Function called
20370 with level set to 1 when argument types are potentially
20371 unresolved. Called to complete the job with level set to 2 once
20372 types are complete.
20373 (source_end_java_method): Call to permanent_allocation
20374 removed. Waiting to be replaced by a more suitable obstack
20375 management.
20376 (java_complete_expand_methods, java_complete_expand_method,
20377 java_expand_finals): New functions.
20378 (build_method_invocation_stmt): Renamed
20379 patch_method_invocation_stmt. Extracts function call expression
20380 (wfl) and arguments (args) from CALL_EXPR tree operands.
20381 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
20382 call. Patch the function and argument operand of the CALL_EXPR
20383 tree argument.
20384 (patch_argument, java_complete_tree): New functions.
20385
20386 1998-04-20 Per Bothner <bothner@cygnus.com>
20387
20388 Recover from missing fields and methods (i.e. error instead of fatal).
20389 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
20390 * expr.c (expand_invoke): Recover from missing method.
20391 (expand_java_field_op): Recover from missing field.
20392 Inline references to java.lang.{Integer,Char,...}.TYPE.
20393 * typeck.c (get_type_from_signature), java-tree.h: New function.
20394 * class.c (add_method): Use get_type_from_signature.
20395 (build_class_ref): Handle a class that was not found.
20396 * typeck.c (convert): Handle conversion to pointers (for convenience).
20397 * verify.c (verify_jvm_instructions): Use get_type_from_signature
20398 instead of lookup_field to handle missing fields.
20399
20400 * jcf-parse.c (process_zip_dir): Set java_source.
20401
20402 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
20403
20404 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20405
20406 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
20407
20408 * jcf-parse.c (load_class): Don't change input_filename before
20409 calling jcf_parse_source (but still do it before calling
20410 jcf_parse).
20411 (jcf_parse_source): Assign input_filename after having saved the
20412 parser context.
20413 * lex.c (java_init_lex): Chain a WFL node to the import on demand
20414 list. ctxp->modifier_ctx zeroed according to its new
20415 definition. ctxp->filename initialized. Removed
20416 JAVA_MODIFIER_CTX_UNMARK.
20417 (java_unget_unicode): Update the character based column position.
20418 (java_allocate_new_line): ref_count not used anymore. Always free
20419 ctxp->p_line. Initialize c_line->char_col to 0.
20420 (java_get_unicode): Update the character based column position.
20421 (java_lex): Use ctxp->elc to store current position in source
20422 file, at the beginning of the parsed token. Set modifier_ctx entry
20423 corresponding to the parse modifier to a WFL node. Return a WFL
20424 node when an identifier is parsed.
20425 (java_lex_error): Now uses ctxp->elc to store current position in
20426 source.
20427 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20428 * lex.h (build_wfl_node): New function definitions.
20429 (struct java_line): ref_count and next fields are gone. New field
20430 char_col.
20431 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20432 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
20433 (JAVA_COLUMN_DELTA): New macro.
20434 (java_lc): New typedef on new struct _java_lc.
20435 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20436 (parse_error_context, parse_warning_context): Changed prototypes.
20437 (java_get_line_col): Added as an available global function.
20438 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20439 (IC_DECL): Replaced by macro IC_TYPE
20440 (DEPEND_WFL): New macro.
20441 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20442 wrong modifier.
20443 (exit_java_complete_class): Removed a commented out statement.
20444 (struct parser_ctxt): Added comments on fields. modifier_ctx is
20445 now an array of tree nodes. Deleted fields line_list and
20446 e_line. New field elc, to replace e_line.
20447 * parse.y (array_type:): Build WFL node.
20448 (qualified_name:): Build a single WFL node out of two. Retain
20449 the location information of the first node in the resulting node.
20450 (package_declaration:): Use package name as a WFL node
20451 (single_type_import_declaration:): Use imported name as a WFL node.
20452 (type_import_on_demand_declaration:): Use root of the imported
20453 packages as a WFL node.
20454 (field_declaration:): Removed unused local variable cl.
20455 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20456 (yyerror): New static elc. Removed static error_line, error_pos.
20457 New local code_from_source. Save ctxp->elc into elc at the first
20458 pass. Call java_get_line_col to get a string of the line where
20459 the error occurred.
20460 (debug_line): Removed static function.
20461 (parse_error_context, parse_warning_context): Parameter cl is now
20462 a WFL node. Use its value to initialize ctxp->elc.
20463 (redefinition_error): Parameter cl is now a WFL node.
20464 (parse_add_interface): New parameter wfl. No longer call
20465 lookup_cl, use wfl instead.
20466 (check_class_interface_creation): Parameter cl is now a WFL node.
20467 (maybe_create_class_interface_decl): Likewise.
20468 (add_superinterfaces): New function.
20469 (create_interface): Removed local cl, node, super_decl,
20470 super_decl_type. Function now uses id as a WFL node. Better
20471 warning/error report on obsolete or forbidden mix of
20472 modifiers. Now calls add_superinterfaces to register interfaces.
20473 (create_class): Removed local cl, node. Local variable id is used
20474 as a WFL node. Better error report on forbidden modifier
20475 mix. Uses add_superinterfaces to register interfaces.
20476 (find_field): Argument cl is now a WFL node. Now store the WFL
20477 node of a fields that needs to be checked for their
20478 initialization.
20479 (method_header): Local variable node non longer used. Local
20480 variable id replaces cl.
20481 (check_modifiers_consistency): Local variable cl is now a WFL
20482 node.
20483 (method_declarator): Local variable cl replaced by parameter id.
20484 (parser_qualified_name): Now uses parameter name as a WFL node.
20485 (parser_check_super_interface): New parameter wfl, for achieve
20486 greater accuracy during error reports.
20487 (parser_chain_incomplete_item): New parameter named location. Used,
20488 along the decl, to construct the incomplete item node.
20489 (java_complete_class): resolve_class now uses WFL node extracted
20490 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
20491 where appropriate.
20492 (complete_method_decl): Unresolved function's argument types are WFL.
20493 (resolve_class): Parameter cl is now a WFL node.
20494 (resolve_and_layout): Likewise.
20495 (do_resolve_class): Likewise. Try first to use cl and then do the
20496 lookup on the decl when calling check_pkg_class_access.
20497 (complete_class_report_errors): Use IC_TYPE in place of
20498 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
20499 instead of doing a lookup over the decl.
20500 (java_check_final): Use WFL info from field tree list.
20501 (lookup_cl): Rewritten and returns a statically defined WFL node.
20502 (lookup_modifier_cl): Now uses information from WFL nodes.
20503 (process_imports): Likewise.
20504 (read_import_dir): name and cl arguments replaced by a single WFL
20505 node. Function modified accordingly.
20506 (find_in_imports_on_demand): Now uses WFL node.
20507 (check_pkg_class_access): cl argument is now a WFL node.
20508 (declare_local_variables): Fixed to use WFL nodes.
20509 (resolve_expression_name): Likewise.
20510 (build_method_invocation_stmt): name_combo argument renamed
20511 wfl. Function modified to use WFL nodes.
20512 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
20513 (lookup_method_invoke): cl is now a WFL node. Added missing
20514 IDENTIFIER_POINTER to class type decl name.
20515
20516 1998-04-14 Dave Brolley <brolley@cygnus.com>
20517
20518 * lang.c (init_parse): Now returns char* containing the filename.
20519
20520 1998-04-10 Per Bothner <bothner@cygnus.com>
20521
20522 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
20523
20524 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
20525 * class.c (make_class_data): If flag_assume_compiled, initial class
20526 state is CSTATE_PREPARED; make superclass and interfaces direct
20527 references, rather than constant pool indexes.
20528
20529 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
20530
20531 * parser.y: Include flags.h. Removed debug variable pl.
20532 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20533 (block:): Likewise.
20534 (labeled_statement_nsi:): Generate debug info when reducing
20535 expression_statement:.
20536 (check_pkg_class_access): get_access_flags_from_decl invocation
20537 fixed for new CLASS_* flags location.
20538 (source_end_java_method): Save/restore parser context when
20539 entering/leaving this routine. Restore lineno to its right value
20540 before calling expand_end_bindings.
20541 (build_method_invocation_stmt): build_invoke called with the
20542 current line information.
20543 (build_invoke): New argument cl. Wrap the function call around a
20544 wfl node.
20545 (refine_accessible_methods_list): Changed comment, removed
20546 unnecessary code.
20547 * parse.h: Fixed typo in comments.
20548 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20549 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20550 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
20551 parser_ccb_indent.
20552 * lex.c (java_lex): Record the last closing curly bracket of a
20553 function.
20554 * jcf-parse.c (jcf_parse_source): Now calls
20555 java_check_methods. Clarified comment, fixed typo.
20556
20557 1998-04-09 Dave Brolley <brolley@cygnus.com>
20558
20559 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20560 (finish_parse): Expose for non USE_CPPLIB builds.
20561
20562 1998-04-08 Jeffrey A Law (law@cygnus.com)
20563
20564 * lang.c (lang_print_xnode): New function.
20565
20566 1998-04-03 Per Bothner <bothner@cygnus.com>
20567
20568 * decl.c (class_dtable_decl), java-tree.h: New tree node.
20569 * class.c (get_dispatch_vector, get_dispatch_table): New functions
20570 used to build a class's dispatch table.
20571 (make_class_data): Generate dispatch table if flag_assume_compiled.
20572 Set dtable of class object to address of class_dtable_decl.
20573
20574 * decl.c (int_decl_processing): Make soft_badarrayindex_node
20575 be volatile and have side effects - generates better code.
20576
20577 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
20578 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20579
20580 * expr.c (expand_invoke): If class is final, method is
20581 effectively final, so can call it directly.
20582
20583 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
20584
20585 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
20586
20587 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
20588
20589 * parse.y (build_method_invocation_stmt): Removed extra argument
20590 to build_invoke.
20591
20592 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20593
20594 * expr.c (dtable_indent): Now static global.
20595 (expand_invoke): Now call invoke_build_dtable and
20596 build_invokevirtual.
20597 (invoke_build_dtable, build_invokevirtual): New functions.
20598 * jcf-io.c (find_class): Defer issuing a warning by setting
20599 jcf->outofsynch to 1.
20600 * jcf-parse.c (jcf_out_of_synch): New function.
20601 (load_class): Test this_jcf.outofsynch flag and call
20602 jcf_out_of_synch accordingly.
20603 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20604 comment indentation.
20605 * lex.c (java_get_unicode): Fixed code indentation.
20606 (java_lex): Create string literal. Fixed typo. Removed several
20607 premature obstack_free.
20608 * parse.h: New enums for name resolution and invocation mode.
20609 (struct qualification): New data structure.
20610 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20611 (do_resolve_class, build_method_invocation_stmt,
20612 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20613 debug_line, identical_subpath_p, invocation_mode,
20614 refine_accessible_methods_list, build_invoke,
20615 lookup_method_invoke): New functions declared.
20616 (build_invokevirtual, invoke_build_dtable, match_java_method,
20617 build_field_ref, jcf_out_of_synch): New references to external
20618 functions.
20619 (struct parse_ctxt): Removed artificial_constructor field.
20620 * parse.y: (array_type:): Type defined for this rule.
20621 (class_type:): Installed default rule for interface_type:.
20622 (array_type:): Now build Java array type.
20623 (qualified_name:): Now use obstack_grow0.
20624 (method_declaration:): Skip the artificial constructor added to
20625 the list, if any.
20626 (abstract_method_declaration:): Execute the code only during pass 1.
20627 (block:): Installed default rule in block_statements:.
20628 (block_statement:): Add the statement to the method during pass 2.
20629 (statement_expression): Installed default rule for
20630 method_invocation:.
20631 (argument_list:): Added code to build the argument list.
20632 (method_invocation:): Added call to create the method invocation
20633 node.
20634 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20635 (debug_line): New function for debug.
20636 (complete_class_decl): No longer do something during pass 1.
20637 (method_header): Use BUILD_PTR_FROM_NAME.
20638 (parser_qualified_classname): Use obstack_grow0. Removed bogus
20639 obstack_free.
20640 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20641 function's main comment.
20642 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20643 classes.
20644 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20645 (resolve_class): Now works with arrays.
20646 (do_resolve_class, resolve_and_layout): New functions.
20647 (java_check_regular_methods): Reverse method list before and after
20648 having processed it. No longer set ctxp->artificial_constructor.
20649 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20650 accordingly. Fixed typo in issued error message. Now use
20651 obstack_grow0.
20652 (find_in_imports_on_demand): Now use obstack_grow0.
20653 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20654 (source_end_java_method): Call expand_expr_stmt instead of
20655 expand_expr. Calls it before calling expand_function_end.
20656 (java_method_add_stmt): Do nothing if errors were found during
20657 parsing.
20658 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20659 (build_method_invocation_stmt, build_invoke, invocation_mode,
20660 lookup_method_invoke, refine_accessible_methods_list,
20661 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20662 New functions.
20663 * typeck.c (build_java_signature): Properly end method signature
20664 if return type skipped.
20665 (match_java_method): New function.
20666
20667 1998-03-16 Per Bothner <bothner@cygnus.com>
20668
20669 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
20670
20671 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
20672
20673 * expr.c (build_invoke_non_interface): New function.
20674 (methods_ident, ncode_ident): Now static globals.
20675 (expand_invoke): Use build_invoke_non_interface.
20676 * java-tree.h (struct lang_decl): New field function_decl_body.
20677 (DECL_FUNCTION_BODY): New macro.
20678 * jcf-parse.c (jcf_parse_source): Deeper check before setting
20679 CLASS_FROM_SOURCE_P.
20680 (parse_source_file): Fixed typos. Call java_layout_parsed_class
20681 before starting pass 2. Call to java_generate_parsed_class replaced
20682 by java_register_parsed_class.
20683 * lex.c: Fixed typo in header. Some line width related formating.
20684 * lex.h: Some line width related formating.
20685 * parse.h (source_end_java_method, resolve_expression_name,
20686 complete_class_decl, maybe_create_class_interface_decl,
20687 check_class_interface_creation): New static function declarations.
20688 (java_layout_parsed_class, java_method_add_stmt): New function
20689 declarations.
20690 (struct parser_ctxt): Field mark_class_generate removed. New
20691 fields class_list and artificial_constructor.
20692 * parse.y: Fixed typo in header.
20693 (class_declaration:): Call complete_class_decl when class body
20694 parsed.
20695 (method_declaration:): Call source_end_java_method in pass 2 when
20696 the method body is defined.
20697 (postfix_expression:): Do expression name resolution on sub-rule
20698 name during pass 2.
20699 (create_class, create_interface): Merged common pieces.
20700 (check_class_interface_creation, maybe_create_class_interface_decl):
20701 New functions.
20702 (complete_class_decl): New function.
20703 (register_fields): Fixed line width related typo.
20704 (method_header): Correctly skip first argument when fixing
20705 argument line. Changed the loop.
20706 (java_check_circular_reference): Now use ctxp->class_list.
20707 (java_complete_class): Removed start/stop marking.
20708 (java_check_regular_methods): Now takes a class decl as an
20709 argument. Add default constructor if none were encountered.
20710 (java_check_methods): Now use ctxp->class_list. Changed call to
20711 java_check_regular_methods.
20712 (source_start_java_method): Set DECL_ARG_TYPE for each function
20713 arguments.
20714 (source_end_java_method, java_method_add_stmt): New functions.
20715 (java_generate_parsed_class): No longer exists.
20716 (java_layout_parsed_class, java_register_parsed_class): New functions.
20717 (resolve_expression_name): New function.
20718
20719 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
20720
20721 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20722 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20723 until pass initializations are done. Call read_import_dir with
20724 pass set to 0.
20725 * parse.h: (lookup_modifier_cl): New function declared.
20726 (INTERFACE_FIELD_MODIFIERS): New macro.
20727 (OBSOLETE_MODIFIER_WARNING): New macro.
20728 * parse.y: (register_fields): Class type and current field name in
20729 local variables. Check modifier(s) if adding field(s) to an interface.
20730 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20731 and report errors using the faulty modifier line context.
20732 (lookup_modifier_cl): New function.
20733 (read_import_dir): Detect and report default import processing
20734 failure.
20735
20736 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
20737
20738 Add a pair of -fassume-compiled/-fno-assume-compiled options.
20739 * class.c (is_compiled_class): Return 1 after making sure it
20740 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20741 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20742 * java-tree.h (flag_assume_compiled): Add decl.
20743 * lang.c (lang_f_options): Add the flag.
20744 (flag_assume_compiled): Add decl, default to 0.
20745
20746 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
20747
20748 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20749 (is_compiled_class): Likewise.
20750 (layout_class): Likewise.
20751 (layout_class): Detect and lay out classes defined in source code.
20752 (interface_of_p, add_interface_do, may_add_interface): New
20753 function.
20754 (add_interface): Now use add_interface_do.
20755 (add_method_1): New function.
20756 (add_method): Now use add_method_1.
20757 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20758 (complete_start_java_method): New function.
20759 (start_java_mehod): Now call complete_start_java_method.
20760 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20761 (expand_invoke): Likewise and fixed typo.
20762 *gjava.c: (print_super_field): Use new argument to find_class
20763 DO_CLASS_FILE.
20764 (main): Likewise.
20765 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20766 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20767 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20768 IDENTIFIER_NODE.
20769 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20770 (add_method_1, push_class): New prototypes.
20771 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20772 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20773 directory where the class was found.
20774 (find_class): New argument DO_CLASS_FILE. Function find_class
20775 modified accordingly.
20776 *jcf-parse.c: (fix_class_path): New function.
20777 (load_class): Use new VERBOSE argument. load_class now finds and
20778 loads/parses .class/.java files. Save read_state of current_jcf
20779 if necessary.
20780 (java_parser_abort_on_error): New macro.
20781 (jcf_parse_source, parse_source_file): New function.
20782 (jcf_parse): Fixed typo.
20783 (yyparse): Call parse_source_file () only.
20784 (process_zip_dir): Fixed typo, fix zdir->filename_length when
20785 writing the real class name back in the zip directory entry.
20786 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20787 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20788 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20789 (find_class): Prototype fixed.
20790 *lex.c: Added 1998 time stamp.
20791 Removed all static global variables, moved into the parser
20792 context data structure.. Now include unistd.h if SEEK_SET not
20793 defined.
20794 (java_init_lex): Rewritten.
20795 (java_sneak_unicode): Modified current unicode access in current line.
20796 (java_unget_unicode): Likewise.
20797 (java_allocate_new_line): New allocation management.
20798 (java_read_char): Modified access and storage of unget_utf8_value.
20799 New way of processing current unicode.
20800 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20801 (java_get_unicode): Now use the parser context.
20802 (java_lineterminator): Likewise.
20803 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20804 of the reentrant parser implementation. Function now use the
20805 parser context data structure and java_lval. Fixed production of
20806 the float and double constant "out of range" error message. Fixed
20807 obstack use. Return integer value when hitting a modifier. Now
20808 return type for TRUE, FALSE and other predefined types. Return
20809 identifier as a TREE_LIST list containing the current line context
20810 as the TREE_VALUE sub-node.
20811 (java_unicode_2_utf8): Fixed typo in declaration.
20812 (java_lex_error): Now use the parser context data structure.
20813 *lex.h: Added 1998 time stamp.
20814 (struct java_line): New fields ref_count and next.
20815 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20816 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20817 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20818 *parse.h: Added 1998 time stamp.
20819 (java_parse_source_file): Renamed from parse_source_file.
20820 (YYERROR_NOW, YYNOT_TWICE): Fixed.
20821 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20822 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20823 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20824 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20825 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20826 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20827 (struct parser_ctxt): New data structure to keep the parser context.
20828 *parse.y: Added 1998 time stamp, got rid of static global variables.
20829 (java_error_count, ctxp): New global variables.
20830 (%union): New value field.
20831 (numeric_type, integral_type): Rules removed.
20832 (primitive_type): Rule defined to handle integral, float, double and
20833 boolean types.
20834 (qualified_name, package_declaration,
20835 single_type_import_declaration, type_import_on_demand_declaration,
20836 modifiers, class_declaration, super, interfaces,
20837 interface_type_list, class_body, field_declaration,
20838 field_declaration, variable_declarators, variable_declarator,
20839 variable_declarator_id, method_declaration, method_header,
20840 formal_parameter_list, formal_parameter, method_body, block,
20841 static, interface_declaration, extends_interfaces,
20842 abstract_method_declaration, local_variable_declarators): Rules now
20843 define actions.
20844 (force_error, do_warning): New global statics.
20845 (push_parser_context, parser_context_save_global,
20846 parser_context_restore_global, pop_parser_context): New functions.
20847 (yyerror): Now uses the global parser context. Fixed use of obstack.
20848 (parse_error, parse_error_context, parse_warning_context,
20849 java_accstring_lookup, redefinition_error, check_modifiers,
20850 parser_add_interface, create_interface, create_class, find_field,
20851 duplicate_declaration_error, register_fields, method_header,
20852 check_modifiers_consistency, check_abstract_method_header,
20853 method_declarator, parser_qualified_classname,
20854 parser_check_super_interface, parser_check_super,
20855 parser_chain_incomplete_item, java_check_circular_reference,
20856 layout_class_from_source, java_complete_class,
20857 complete_method_decl, resolve_class, complete_class_report_errors,
20858 java_check_final, check_method_redefinition,
20859 java_check_regular_methods, java_check_abstract_methods,
20860 java_check_methods, lookup_java_interface_method2,
20861 lookup_java_method2, lookup_cl, find_name_in_single_imports,
20862 process_imports, find_in_imports, read_import_entry,
20863 read_import_dir, find_in_imports_on_demand,
20864 check_pkg_class_access, not_builtin_p, declare_local_variables,
20865 source_start_java_method, java_generate_parsed_class): New
20866 functions.
20867 *typeck.c: (signature_include_return): New global variable.
20868 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20869 to add the function returned type in the signature.
20870
20871 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
20872
20873 * jcf-io.c (open_in_zip): Use strncmp and LEN.
20874
20875 1998-01-29 Dave Brolley <brolley@cygnus.com>
20876
20877 * Make-lang.in (java.info): Added.
20878 (java.install-info): Added
20879
20880 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
20881
20882 * Makefile.in (clean): Also remove java/parse.c.
20883
20884 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
20885
20886 Add a pair of -fbounds-check/-fno-bounds-check options.
20887 * lang.c (lang_decode_option): Add code to grok arguments.
20888 (flag_bounds_check): Add decl.
20889 (lang_f_options): New array w/ the option in it.
20890 * java-tree.h (flag_bounds_check): Add decl.
20891 * lang-options.h: New file.
20892 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20893 of a static macro value.
20894 (JAVA_ARRAY_EXCEPTION): Delete macro.
20895
20896 1998-01-23 Per Bothner <bothner@cygnus.com>
20897
20898 * typeck.c (build_java_array_type): Fix two bugs in previous change.
20899 * expr.c (build_anewarray): Add missing promote_type.
20900
20901 1998-01-22 Per Bothner <bothner@cygnus.com>
20902
20903 Add array types with known length to optimize bounds checking.
20904 * typeck.c (build_java_array_type): Take length parameter.
20905 (java_array_type_length, build_prim_array_type): New functions.
20906 * java-tree.h: Update for new functions.
20907 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20908 * class.c: Use build_prim_array_type.
20909 * expr.c (can_widen_reference_to): Handle known-length array types.
20910 (verify_jvm_instructions): Keep track of integer push instructions
20911 followed by newarray/anewarray, so we can build known-length arrays.
20912 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
20913 (java_array_data_offset): New function.
20914 (build_java_array_length_access): New function. Optimize if constant.
20915 (build_java_arrayaccess): Constant fold bounds check.
20916 (expand_java_newarray, expand_java_anewarray): Replaced by ...
20917 (build_newarray, build_anewarray): New functions.
20918 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
20919 * verify.c (merge_types): Handle known-lengh array types.
20920
20921 1998-01-19 Per Bothner <bothner@cygnus.com>
20922
20923 * expr.c (expand_byte_code): Fix performace bug, which caused
20924 searching linenumber_table to be linear rather than constant.
20925
20926 1997-12-12 Per Bothner <bothner@cygnus.com>
20927
20928 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
20929
20930 * decl.c, java-tree.h (soft_fmod_node): New global.
20931 * decl.c (init_decl_processing): Define __builtin_fmod.
20932 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
20933 using __builtin_fmod.
20934
20935 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
20936
20937 * keyword.h: New file, output of keyword.gperf as processed by
20938 gperf.
20939 * lex.c (java_lex_init): Initialize java_error_flag.
20940 * parse.c (YYERROR_NOW): Uses java_error_flag.
20941 * parse.y: New static java_error_flag. Useless definition of
20942 buffer_error gone.
20943 * parse.y (java_error): Portable error recovery using
20944 java_error_flag (not yet completely tuned).
20945
20946 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
20947
20948 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20949
20950 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20951
20952 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20953 (parse.c, lex.c, keyword.h): New rules for Java source code
20954 front-end.
20955 * parse.c: Renamed into jcf-parse.c.
20956 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20957 * keyword.gperf: New file, Java keywords.
20958 * parse.y: New file, Java language grammar.
20959 * parse.h: New file, Java language grammar definitions.
20960 * lex.c: New file, Java language lexer.
20961 * lex.h: New file, Java language lexer definitions.
20962
20963 1997-12-03 Per Bothner <bothner@cygnus.com>
20964
20965 * decl.c (clinit_identifier_node), java-tree.h: New global.
20966 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
20967 * verify.c (verify_jvm_instructions): Inline use of removed macros.
20968 * expr.c (expand_java_field_op): Check for invalid assignment
20969 to final field.
20970
20971 * jcf-reader.c (get_attribute): Test for wrong attribute length.
20972
20973 1997-10-27 Per Bothner <bothner@cygnus.com>
20974
20975 * verify.c (verify_jvm_instructions): When processing a handler,
20976 attempt to set the current_subr to the right value.
20977 (More complicated code combines Sep 17 and Oct 22 versions.)
20978
20979 1997-10-24 Per Bothner <bothner@cygnus.com>
20980
20981 * class.c (push_class): Figure out (guess) name of source file.
20982 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
20983 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
20984 (parse_class_file): Change return type from int to void.
20985 Call debug_start_source_file/debug_end_source_file.
20986
20987 * expr.c (build_java_binop): Fix masking 2nd operand.
20988 * decl.c (init_decl_processing): Set sizetype first.
20989
20990 1997-10-22 Per Bothner <bothner@cygnus.com>
20991
20992 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
20993 (Revert Sep 17 change.)
20994
20995 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
20996
20997 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20998 .class extension in their name and fix thing so we don't process
20999 them parse_zip_file_entries().
21000 (parse_zip_file_entries): Cleaned unused local variables.
21001
21002 1997-10-20 Per Bothner <bothner@cygnus.com>
21003
21004 * expr.c (can_widen_reference_to): Allows equal array element types.
21005 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
21006 * jcf-dump.c (RET): Get (and print) index.
21007
21008 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21009 Promote element type to POINTER_TYPE.
21010
21011 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
21012
21013 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21014 find_in_current_zip, jcf_figure_file_type): Moved from
21015 jcf-reader.c to parse.c.
21016 * zextract.c: (read_zip_archive): takes file_comment_length possible
21017 field into account.
21018
21019 1997-10-20 Per Bothner <bothner@cygnus.com>
21020
21021 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
21022
21023 * verify.c (merge_types): Handle array types even better ...
21024
21025 1997-10-17 Per Bothner <bothner@cygnus.com>
21026
21027 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
21028
21029 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
21030 * class.c (make_class_data): Don't build fields_decl if no fields.
21031 When building fields_decl, skip if DECL_ARTIFICIAL.
21032
21033 * expr.c (java_stack_swap): Update stack_type_map.
21034 * verify.c (merge_types): Handle array types better.
21035
21036 1997-10-15 Per Bothner <bothner@cygnus.com>
21037
21038 * class.c (add_field): Don't promote short integral fields to
21039 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21040 * expr.c (push_value): Promote and convert short integral values.
21041
21042 * decl.c, java-tree.h (integer_two_node): New constant node.
21043 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
21044
21045 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21046
21047 * class.c (append_gpp_mangled_type): Use function argument
21048 unpromoted type to generate mangled name.
21049
21050 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
21051
21052 * constants.c (build_constant_data_ref): Now uses current_class
21053 instead of main_class.
21054 (build_constants_constructor): Now uses current_class instead of
21055 main_class.
21056 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21057 of the global variable SeepZipFiles done here.
21058 * zextract.c (read_zip_archive): extra_field optional field taken
21059 into account while computing the position of the class file in the
21060 archive.
21061 * verify.c (verify_jvm_instructions): Use current_jcf to search
21062 the constant pool.
21063 * parse.c (load_class): First search for the class to load in the
21064 current zip file. Saves current_jcf (restored before returning
21065 from that function). Don't call JCF_FINISH in the class was found
21066 in the current ZIP file.
21067 (jcf_parse): If the class was found in the current ZIP file, save
21068 its tree_constant_pool (for later reuse).
21069 (parse_class_file): New function. Process each method defined in
21070 the current class and record the class as to be later registered.
21071 (yyparse): Rewritten. Figure the type of the current file and switch
21072 accordingly.
21073 * lang.c: New global variable current_jcf.
21074 (lang_init): Removed compiling_from_source test (done later, in
21075 yyparse). Removed call the jcf_parse ().
21076 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21077 (typedef struct JCF): New fields seen_in_zip (to mark a class found
21078 in the current ZIP file) and zip_offset (offset to the class data in
21079 the current zip file).
21080 * jcf-reader.c: zipfile.h included.
21081 localToFile: New ZipFileCache static global variable
21082 (parse_zip_file_entries): New function. Browse the current ZIP
21083 file directory and process each class found.
21084 (process_zip_dir): New function. Register each class found in the
21085 ZIP file directory. The class aren't parsed but a valid JCF is
21086 link to each of them.
21087 (find_in_current_zip): New function. Search for a class in the
21088 current ZIP file directory. If found, prepare the class so that it
21089 can be loaded.
21090 (jcf_figure_file_type): New function. Examine the file structure
21091 to figure a class file, a ZIP file. If none of these categories are
21092 matched, a source file is assumed.
21093 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21094 SeenZipFile: New global variable.
21095 (open_in_zip): Use zipmember's length to accelerate the search for
21096 a member. If zipmember was NULL and zip file successfully read,
21097 return 0.
21098 * java-tree.h: New global variable current_jcf declared. Added
21099 declaration for current_constant_pool_tags, current_constant_pool_data,
21100 current_constant_pool_length, current_constant_pool_data_ref.
21101 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21102 store the JCF of classes seen in a zip file) and tree *constant_pool
21103 (to save a loaded class constant pool). current_class declared here.
21104 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21105 retrieve method_ref_constant.
21106 (PUSHC): java_push_constant_from_pool now uses current_jcf.
21107 (OBJECT): get_class_constant now uses current_jcf.
21108 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21109 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21110 (expand_invoke): Now uses current_class instead of main_class
21111 (build_class_init): Now uses current_class instead of main_class
21112 * class.c: New static global variable registered_class.
21113 (register_class): New function.
21114 (emit_register_class): Modified to use registered_class instead of
21115 main_class
21116 (is_compiled_class): Now take into account class seen in the archive.
21117
21118 1997-10-06 Per Bothner <bothner@cygnus.com>
21119
21120 * except.h: Renamed to: java-except.h.
21121 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
21122 * except.c: Add semi-working (commented out) implementation.
21123
21124 * expr.c (expand_iinc): Add needed flush_quick_stack.
21125 * parse.c (set_source_filename): New function.
21126 (give_name_to_class): Set input_filename from package.classname.java.
21127
21128 * jcf-io.c (find_class): Don't look first in ".".
21129
21130 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21131
21132 * zextract.c (read_zip_archive): Now takes into account the
21133 extra_field field.
21134 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21135
21136 1997-09-20 Per Bothner <bothner@cygnus.com>
21137
21138 * constants.c, java-tree.h (build_internal_class_name): New function.
21139 (alloc_class_constant): Re-implement using build_internal_class_name.
21140 * class.c (make_class_data): Likewise.
21141 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
21142
21143 1997-09-17 Per Bothner <bothner@cygnus.com>
21144
21145 * verify.c (verify_jvm_instructions): Temporarily set current_subr
21146 to NULL before pushing an exception handler target.
21147
21148 * expr.c (flush_quick_stack): Save from low stack indexes to high.
21149 (java_stack_swap, java_stack_dup): Re-write to be safe from
21150 clobbering registers.
21151 (build_class_init): New function.
21152
21153 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
21154
21155 * typeck.c (build_java_array_type): Temporary use
21156 permanent_obstack to create the array 'length' field.
21157 * expr.c (lookup_label): Temporay use permanent_obstack to create
21158 label if not found.
21159 * class.c (push_super_field): Tempory use permanent_obstack.
21160
21161 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21162
21163 * typeck.c (type_for_mode): Now handles double_type_node and
21164 float_type_node.
21165 * verify.c (verify_jvm_instructions): The instruction following
21166 the wide bytecode is checked. OPCODE_ret added to the list of
21167 wide.
21168
21169 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21170
21171 * class.c (make_class): Temporary use permanent_obstack. Set the
21172 class CLASS_P field to 1.
21173 (push_class): Temporary use permanent_obstack.
21174 (set_super_info): Temporary use permanent_obstack.
21175 (add_method): Temporary use permanent_obstack, set
21176 METHOD_TRANSIENT().
21177 (add_field): Temporary use permanent_obstack. Sets
21178 FIELD_VOLATILE() and FIELD_TRANSIENT().
21179 (build_class_ref): Temporary use permanent_obstack if the class
21180 isn't compiled.
21181 (build_static_field_ref): Temporary use permanent_obstack when
21182 creating field's rtl.
21183 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21184 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21185 and fields. Function finalized, as far as flag handling.
21186 (push_class_static_dummy_field): Temporary use permanent_obstack.
21187 (emit_register_class): Force generation of class registration at
21188 -O3 or deeper.
21189 * decl.c (end_java_method): Call permanent_allocation() before
21190 returning.
21191 * expr.c (can_widen_reference_to): Added comment to interface
21192 handling, fixed typo.
21193 (lookup_field): Now uses CLASS_P() to correct FIXME
21194 (expand_invoke): Verification on public && !static &&
21195 !abstract moved into soft_lookupinterfacemethod (kaffe).
21196 Use Object class dtable if objectref is an array when expanding
21197 invokeinterface.
21198 (java_push_constant_from_pool): Temporary use permanent_obstack
21199 for CONSTANT_string
21200 * parse.c (get_ref_constant): Temporary use permanent_obstack to
21201 create constant references.
21202 (get_constant): Temporary use permanent_obstack to create constant.
21203 (load_class): Temporary use permanent_obstack to load class.
21204 (jcf_parse): Temporary use permanent_obstack to perform class
21205 layout.
21206 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21207 (build_java_signature): Temporary use permanent_obstack.
21208 * verify.c: (verify_jvm_instruction): removed unnecessary verification
21209 on ACC_SUPER flag.
21210 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21211 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21212 (CLASS_P): Defined
21213
21214 1997-09-11 Per Bothner <bothner@cygnus.com>
21215
21216 * class.c (append_gpp_mangled_type): Fix typo.
21217 (emit_register_class): Use main_class to get class object, rather
21218 than looking for no-longer-existing static decl starting with _CL.
21219 * typeck.c (parse_signature_type): Promote array element type
21220 if it is a RECORD_TYPE.
21221
21222 1997-09-10 Per Bothner <bothner@cygnus.com>
21223
21224 * class.c (push_class_static_dummy_field): New function.
21225 (mangle_static_field): New. Do G++-style mangling of static fields.
21226 (layout_class): Mandle static fields here, not in add_field.
21227 (build_class_ref): The class object is now a dummy static field.
21228 * decl.c (find_local_variable): Look for best, instead of first match.
21229 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
21230 (build_java_athrow): Don't check here if exception is Throwable.
21231 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
21232 (TYPE_USED): Removed. No longer used ...
21233 * parse.c (jcf_parse): Call push_class_static_dummy_field.
21234 * verify.c (push_pending_label): New function.
21235 (push_pending_block): Renamed to check_pending_block.
21236 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
21237 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
21238 re-checking possible handlers) after a store (less wasted work).
21239 Check for null handler (finally) before calling add_handler.
21240 Various changes to (finally?) correctly handle try/finally.
21241
21242 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
21243
21244 * class.c: Include stdio.h.
21245
21246 1997-09-04 Per Bothner <bothner@cygnus.com>
21247
21248 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
21249 to make sure class is initialized before static/special invoke.
21250
21251 * verify.c (verify_jvm_instructions): On a store instruction,
21252 call find_local_variable to force pre-allocation of decl and rtx.
21253 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
21254
21255 1997-09-03 Per Bothner <bothner@cygnus.com>
21256
21257 * class.c (build_class_ref): Strip off "promoted_" if need be.
21258 (make_field_value): Call build_java_signature when needed.
21259 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
21260 * expr.c (build_java_athrow): Don't push_value of exception.
21261 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21262 match specification of [fd]cmp[lg] for NaNs.
21263 (expand_byte_code): Add support for exception handler ranges.
21264 * except.c: Add skeleton for EH code-generation.
21265 * verify.c (merge_types): Treat all promoted integral types as equal.
21266 * constants.c (build_constants_constructor): To force creation of
21267 current_constant_pool_data_ref, call build_constant_data_ref.
21268
21269 * javaop.def (lload): Fix typo.
21270 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
21271
21272 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
21273
21274 * parse.c: Don't include function.h.
21275
21276 1997-08-27 Per Bothner <bothner@cygnus.com>
21277
21278 * except.[ch]: New files.
21279 * Makefile.in (JAVA_OBJS): Add except.o
21280 * expr.c: Temporary warning about unimplemented exceptions.
21281 * verify.c: Verify exception handlers.
21282
21283 * jcf-dump.c (disassemble_method): Print exception table.
21284
21285 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21286
21287 * expr.c (verify_jvm_instructions): Started a thorough
21288 verification of invoke* bytecodes.
21289 (expand_byte_code): flush quick stack if PC is the target of a
21290 branch. and undef RET (conflicting with config/i386/i386.h).
21291 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
21292 used.
21293 (expand_invoke): Now handles invokeinterface and do more
21294 verification according to the bytecode.
21295 (lookup_field): Don't try to load the class if processing
21296 dtable_type.
21297 (can_widen_reference_to): Now handles interfaces.
21298 * decl.c (init_decl_processing): New global variable
21299 soft_lookupinterfacemethod_node, declared in java-tree.h.
21300 Call set_super_info on string_type_node.
21301 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21302 defined.
21303 * class.c (set_super_info): Fills the CLASS_* flags according to
21304 access_flags.
21305 (get_access_flags_from_decl): Handles all class flags.
21306
21307 1997-08-26 Per Bothner <bothner@cygnus.com>
21308
21309 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
21310 * parse.c (yyparse): Check for abstract method, and missing code.
21311 * expr.c (expand_byte_code): Change interface.
21312 * lang.c (put_decl_node): Print promoted types prettier.
21313 * verify.c (verify_jvm_instruction): Change interface.
21314 Partial support for scanning exception table.
21315 For load instructions, handle promoted integral types.
21316
21317 1997-08-21 Per Bothner <bothner@cygnus.com>
21318
21319 * verify.c: New file, with contents moved from expr.c.
21320 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
21321 * typeck.c (is_array_type_p): Moved here from expr.c.
21322 * java-tree.h: Add some now-needed function declarations.
21323 * Makefile.in (JAVA_OBJS): Added verify.o.
21324
21325 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
21326
21327 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
21328 METHOD_ABSTRACT flag.
21329
21330 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
21331 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
21332 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
21333
21334 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
21335 variables.
21336 (start_java_method): Hook for SYNCHRONIZED methods.
21337
21338 * expr.c (build_java_jsr, build_java_ret): New functions
21339 (JSR,PRE): New macros
21340 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
21341 (verify_jvm_instructions): tableswitch, lookupswitch,
21342 monitorenter, monitorexit, goto_w: verified.
21343 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
21344 (build_java_monitor): New function.
21345 (MONITOR_OPERATION): Modified to call build_java_monitor()
21346 (verify_jvm_instructions): Started a thorough verification of
21347 invoke* bytecodes.
21348
21349 1997-08-19 Per Bothner <bothner@cygnus.com>
21350
21351 Support verification of jsr/ret subroutines (used for try/finally).
21352 * decl.c (return_address_type_node): New type node.
21353 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
21354 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
21355 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
21356 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
21357 TYPE_USED): New macros for special types in type_map.
21358
21359 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
21360 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
21361 BCODE_JUMP_TARGET.
21362 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
21363
21364 * expr.c (can_widen_reference_to): New function.
21365 (pop_type): Use it.
21366 (merge_type_state): Support handling start of subroutine.
21367 (push_pending_block): Return char* error message, instead of calling
21368 fatal on an error. Also handle subroutines.
21369 (verify_jvm_instructions): Handle errors from push_poending_block.
21370 Support jsr and ret instructions.
21371
21372 1997-08-19 Per Bothner <bothner@cygnus.com>
21373
21374 * jcf-io.c (find_classfile): Fix thinko.
21375 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
21376
21377 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
21378
21379 * Makefile.in (BISON): Remove.
21380
21381 1997-08-07 Per Bothner <bothner@cygnus.com>
21382
21383 * Makefile.in: Convert to autoconf.
21384 * config-lang.in (outputs): Added java/Makefile.
21385
21386 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
21387 Rename cc1java to jc1.
21388
21389 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
21390 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
21391
21392 * class.c (class_depth): Do load_class if needed.
21393
21394 Mostly better verification.
21395 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
21396 (init_decl_processing): Change return type of soft_checkcast.
21397 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
21398 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21399 lang_print_error): New functions.
21400 (lang_init): Set global hook print_error_function to lang_print_error.
21401 * expr.c: In the type_map ptr_type_node is only used for null now.
21402 (pop_type, merge_types): Hence ptr_type_node matches any reference.
21403 (merge_types): Dererence pointer to record types before comparing.
21404 (decode_newarray_type, merge_types): On error just return NULL.
21405 (build_java_binop): Add preliminary implementation (with warning)
21406 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21407 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
21408 (expand_compare, expand_java_goto, expand_java_call): Don't
21409 push_pending_block, since that only makes sense when verifying.
21410 (merge_type_state): Different return codes.
21411 (push_pending_block): A block may need to be verified more than once.
21412 (expand_byte_code): Warn about unused code at code generation time.
21413 (verify_jvm_instruction): Changed logic, since code may need to be
21414 re-verified if type-state has changed. Also, better error handling.
21415 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21416 Improve newarray, anewarray, ?aload, athrow,
21417 * java-tree.h (LABEL_CHANGED): New macro.
21418
21419 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
21420
21421 * decl.c (soft_athrow_node): New global variable initialized.
21422 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21423 * typeck.c (convert): Added support for REAL_TYPE.
21424 (convert_to_char): New function.
21425 (convert): Handle CHAR_TYPE.
21426 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21427 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21428 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21429 promoted type.
21430 (verify_jvm_instructions): Added break a the end of bogus unop: label.
21431 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21432 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21433 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21434 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21435 to Use The Right Things.
21436 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
21437 compatible with INT. BOOLEAN is made equivalent to BYTE.
21438 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
21439 OPCODE_ifnonnull): Now supported.
21440 (build_java_athrow): New function.
21441
21442 1997-08-04 Per Bothner <bothner@cygnus.com>
21443
21444 Rename method name <init> to match G++ (and fix mangling).
21445 * class.c (layout_class): Replace method name of <init> by class name.
21446 (make_method_value): Do inverse renaming of constructor from <init>.
21447 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
21448 * typeck.c (lookup_java_constructor): New function.
21449 * expr.c (expand_invoke): If method_name is <init>, call
21450 lookup_java_constructor to find constructor.
21451
21452 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
21453
21454 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21455
21456 * parse.c (get_class_constant): Modified to handle array "classes"
21457 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21458 wide type.
21459 (convert): Modified to handle real type.
21460 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21461 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21462 variables declared.
21463 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21464 soft_multianewarray, soft_newarray_node, soft_throw_node): New
21465 global variables initialized.
21466 (find_local_variable): Handles the case of a pointer
21467 (end_java_method): Restore the use of one more scope
21468 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
21469 build_java_array_length_access, expand_java_arrayload,
21470 expand_java_arraystore, expand_java_array_length,
21471 expand_java_multianewarray, expand_java_anewarray,
21472 build_java_check_indexed_type, is_array_type_p,
21473 build_java_throw_out_of_bound_exception): New functions.
21474 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
21475 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
21476 OPCODE_<t>aload): Implemented code for verification.
21477 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
21478 ARRAY_NEW_MULTI): Macro defined.
21479 (CONVERT): Modified to invoke convert().
21480 (case OPCODE_aload2): Fixed index typo from 2 to 1.
21481
21482 1997-07-31 Per Bothner <bothner@cygnus.com>
21483
21484 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
21485 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
21486 (make_class_data): Field name needs '/' as package prefix.
21487 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
21488
21489 1997-07-25 Per Bothner <bothner@cygnus.com>
21490
21491 Implement debug information for local variables.
21492 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
21493 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
21494 DECL_LOCAL_SLOT_CHAIN): New macros.
21495 (struct lang_decl_var): New type.
21496 * parse.c (give_name_to_locals): Move to decl.c.
21497 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
21498 (start_java_method): Re-write parameter handling.
21499 (pending_local_decls): New global variable.
21500 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
21501 (find_local_variable): Accept pc so we can skips decls not in range.
21502 (struct binding_level): Add end_pc field.
21503 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
21504 (various): Change so current pc gets passed to find_local_variable.
21505
21506 * decl.c (init_decl_processing): Re-arrange fields in
21507 class_type_node and and method_type_node to match kaffe 0.9.1.
21508 * class.c (make_method_value, make_class_data): Update
21509 initializations to match.
21510
21511 1997-07-16 Per Bothner <bothner@cygnus.com>
21512
21513 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
21514 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
21515 (push_super_field): New function.
21516 (make_class_data): Handle inheritance of class static initializer.
21517 (layout_class): New name mangling.
21518 * constants.c (build_constant_data_ref): Init type of data array
21519 to a one-element array.
21520 (build_constants_constructor): Set DECL_SIZE from complete array type.
21521 * decl.c: Rename class_type, object_type etc to class_type_node,
21522 object_type_node etc. Make former inherit from latter.
21523 * expr.c (expand_invoke): Add cast of function address.
21524 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
21525 * parse.c (yyparse): Don't call layout_class here.
21526 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
21527
21528 1997-06-14 Per Bothner <bothner@cygnus.com>
21529
21530 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
21531 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
21532 (alloc_class_constant): New.
21533 * expr.c (expand_invoke): Make sure method's class is initialized.
21534 * class.c (interits_from_p, emit_register_class): New functions.
21535 * parse.c (yyparse): Call emit_register_class.
21536
21537 1997-06-09 Per Bothner <bothner@cygnus.com>
21538
21539 * constants.c: New file, to handle constant pool.
21540 * Makefile.in (JAVA_OBJS): Add constants.o.
21541 * decl.c (init_decl_processing): Update, fix, finish various structs.
21542 (pushdecl_top_level): New.
21543 * parse.c (layout_class): Moved to class.c.
21544 * expr.c (java_push_constant_from_pool): New function.
21545 * class.c (build_class_ref): Make work fully
21546 (make_class_data): Emit super-class, constant pool, interface vector.
21547
21548 1997-06-03 Per Bothner <bothner@cygnus.com>
21549
21550 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
21551 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
21552 * class.c (class_depth): New function.
21553 (lookup_named_class): Replaced by new function lookup_class.
21554 * decl.c (object_type_node, string_type_node): New.
21555 Remove various types that we no longer need.
21556 * expr.c (verify_jvm_instructions): New separate verifier pass.
21557 (push_type, pop_type): New functions for verifier.
21558 (type_stack_dup, pop_argument_types, merge_types): Likewise.
21559 (expand_byte_code): Simplify, since we assume already verified.
21560 (expand_invoke): Now mostly works.
21561 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21562 * lang.c (main_class): Move to parse.c. Don't make_class yet.
21563 * parse.c: Wait to allocate class object until we know its name.
21564 (layout_class): Calculate DECL_VINDEX for each virtual method.
21565 * typeck.c (get_array_type): Rename to ...
21566 (build_java_array_type): ... and provide working implementation.
21567 (build_java_signature): New function - build Java signature of type.
21568 (set_java_signature): New function - cache signature with type.
21569 (lookup_java_method): New function.
21570
21571 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
21572
21573 * class.c (ident_subst): Take extra SUFFIX parameter.
21574 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
21575 (set_constant_value, build_static_field_ref, is_compiled_class): New.
21576 (build_class_ref): Actually implement.
21577 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
21578 * decl.c (builtin_function): New.
21579 (init_decl_processing): Update for current Kaffe. Declare some
21580 builtin Kaffe functions.
21581 * expr.c (build_address_of): New.
21582 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21583 Renamed (from expand_java_new etc), and added working implementations.
21584 (build_field_ref): Now also handle static fields.
21585 (expand_invoke): Implement invokestatic, and start implement rest.
21586 * java-opcodes.h: Use javaop.def to avoid duplicated list.
21587 * javaop.def: Rename invokevirt -> invokevirtual.
21588 * lang.c (use_handles): Removed.
21589 * parse.c: Add support for ConstantValue attribute.
21590 Handle nested loading of a class. (JPOOL_UTF): New.
21591
21592 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
21593
21594 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
21595
21596 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
21597
21598 * Make-lang.in (java.install-man): New empty rule.
21599 * typeck.c (set_local_type): New function.
21600 * expr.c (STORE_INTERNAL): Call find_local_variable,
21601 not find_stack_slot. Call set_local_type.
21602
21603 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
21604
21605 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
21606 and building RECORD_TYPE CONSTRUCTORs.
21607 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21608
21609 * lang.c (use_handles): Change the default to 0.
21610 * decl.c: Define and build class_type, field_type, utf8const_type.
21611 * class.c (make_class_data, make_field_value,
21612 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21613 hashUtf8String, strLengthUtf8, mangled_classname:
21614 Functions to build reflective data structures.
21615 * parse.c (yyparse): Call make_class_data.
21616
21617 * jcf-io.c (open_class, find_classfile): New functions.
21618 * jcf-dump.c: Support reading classfile from explicitly-named
21619 class file (without CLASSPATH searching).
21620
21621 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
21622
21623 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
21624 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21625 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21626 (get_constant): Now trivial for CONSTANT_Utf8.
21627
21628 * jcf.h: Make NEW_CPOOL the default.
21629 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
21630
21631 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
21632
21633 New directory.