re PR bootstrap/44825 (Failed to bootstrap)
[gcc.git] / gcc / java / ChangeLog
1 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
2
3 PR bootstrap/44825
4 * class.c (make_class_data): Cast result of VEC_length calls to int.
5
6 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
7
8 * constants.c (build_constants_constructor): Use build_constructor
9 instead of build_constructor_from_list.
10 * class.c (make_method_value): Likewise.
11 (get_dispatch_table): Likewise.
12 (make_class_data): Likewise.
13 (emit_indirect_register_classes): Likewise.
14 (emit_symbol_table): Likewise.
15 (add_assertion_table_entry): Likewise.
16 (emit_assertion_table): Likewise.
17 (make_field_value): Use build_constructor_single instead of
18 build_constructor_from_list.
19
20 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
21
22 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
23 VEC.
24 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
25 instead of tree_cons.
26 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
27 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
28
29 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
30
31 * lang.c: Do not include except.h
32 * except.c: Likewise.
33 (doing_eh): New, moved from except.c (in gcc/) but removed the
34 do_warning flag.
35 (maybe_start_try): Update doing_eh call.
36 * Make-lang.in: Update dependencies.
37
38 2010-06-23 Anatoly Sokolov <aesok@post.ru>
39
40 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
41 of build_int_cst_wide.
42 * boehm.c (set_bit): Remove.
43 (mark_reference_fields): Use double_int type for 'mask' argument.
44 Use double_int_setbit instead of set_bit.
45 (get_boehm_type_descriptor): Use double_int_setbit instead of
46 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
47
48 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
49
50 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
51
52 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
53
54 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
55
56 * jcf-parse.c (java_parse_file): Likewise.
57 (process_zip_dir): Likewise.
58
59 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
60 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
61
62 * expr.c (add_type_assertion): Likewise.
63
64 * decl.c (make_binding_level): Likewise.
65 (java_dup_lang_specific_decl): Likewise.
66
67 * constants.c (set_constant_entry): Likewise.
68 (cpool_for_class): Likewise.
69
70 * class.c (add_method_1): Likewise.
71 (java_treetreehash_new): Likewise.
72
73 * java-tree.h (struct lang_type): Add variable_size GTY option.
74 (struct lang_decl): Likewise.
75
76 * jch.h (struct cpool_entry): Likewise.
77
78 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
79
80 * except.c (prepare_eh_table_type): Update
81 java_treetreehash_create call.
82
83 * class.c (add_method_1): Update java_treetreehash_create call.
84 (java_treetreehash_create): Remove parameter gc. Use
85 htab_create_ggc.
86
87 2010-06-04 Joseph Myers <joseph@codesourcery.com>
88
89 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
90 diagnostics.
91
92 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
93
94 * except.c: Include tm.h.
95
96 2010-05-28 Joseph Myers <joseph@codesourcery.com>
97
98 * jvspec.c (lang_specific_driver): Use fatal_error instead of
99 fatal. Use warning instead of error for warnings.
100
101 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
102
103 * expr.c (get_symbol_table_index): Add spaces in expression.
104
105 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
106
107 * java-tree.h (method_entry): Declare. Declare VECs containing it.
108 (struct lang_type): Change type of otable_methods, atable_methods, and
109 itable_methods to VECs. Fix comment for atable_methods.
110 (emit_symbol_table): Take a VEC instead of a tree.
111 (get_symbol_table_index): Take a VEC * instead of a tree *.
112 * class.c (add_table_and_syms): Take a VEC instead of a tree.
113 (emit_symbol_table): Update for changed parameter type.
114 * expr.c (get_symbol_table_index): Likewise.
115
116 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
117
118 * buildings.c: Pretend to be a backend file by undefining
119 IN_GCC_FRONTEND (still need rtl.h here).
120
121 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
122
123 * java-tree.h (struct lang_decl_func): Change type of throws_list
124 field to a VEC.
125 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
126 of DECL_FUNCTION_THROWS.
127 * class.c (make_method_value): Likewise.
128
129 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
130
131 * class.c (utf8_decl_list): Delete.
132 (build_utf8_ref): Remove references to it.
133 * java-tree.h (all_class_list): Delete.
134 (predef_filenames): Delete.
135 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
136 Delete.
137 * jcf-parse.c (parse_roots): Decrease size to 2.
138 (current_file_list): Convert to a VEC.
139 (all_class_list): Declare.
140 (jcf_parse): Adjust for new type of all_class_list.
141 (java_layout_seen_class_methods): Likewise.
142 (predefined_filenames): Declare.
143 (add_predefined_file): Use it.
144 (predefined_filename_p): Likewise.
145 (java_parse_file): Adjust for new type of current_file_list. *
146
147 2010-05-25 Jakub Jelinek <jakub@redhat.com>
148
149 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
150 for interfaces.
151
152 PR debug/43260
153 * java-tree.h (pending_static_fields): New extern declaration.
154 (java_write_globals): New prototype.
155 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
156 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
157 of a static field push it into pending_static_fields vector.
158 * class.c (pending_static_fields): New variable.
159 (add_field): If static field is not DECL_EXTERNAL, push it into
160 pending_static_fields vector.
161 (java_write_globals): New function.
162
163 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
164
165 * expr.c (quick_stack): Change type to a VEC. Update comment.
166 (tree_list_free_list): Delete.
167 (flush_quick_stack): Update for quick_stack type change.
168 (push_value): Likewise.
169 (pop_value): Likewise.
170
171 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
172
173 * java-gimplify.c: Do not include tm.h, toplev.h.
174 * typeck.c: Do not include tm.h.
175 * mangle_name.c: Do not include tm.h.
176 * jcf-dump.c: Do not include tm.h, ggc.h.
177 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
178 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
179 and timevar.h.
180 * jcf-parse.c: Do not include tm.h and tm_p.h.
181 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
182 target.h, and expr.h.
183 * except.c: Do not include tm.h, rtl.h, function.h.
184 * builtins.c: Do not include convert.h. Explain why RTL headers
185 have to be included here.
186 * verify-glue.c: Do not include tm.h.
187 * jcf-depend.c: Do not include tm.h.
188 * jcf-reader.c: Include ggc.h.
189 * jcf-io.c: Do not include tm.h, toplev.h.
190 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
191 gimple.h.
192 * lang.c: Do not include rtl.h, expr.h.
193 * Make-lang.in: Update dependencies.
194
195 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
196
197 * jcf-parse.c: Include bitmap.h.
198 * Make-lang.in: Update dependencies.
199
200 2010-05-20 Jakub Jelinek <jakub@redhat.com>
201
202 PR debug/43521
203 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
204 PARM_DECL.
205
206 2010-05-19 Anatoly Sokolov <aesok@post.ru>
207
208 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
209 build_int_cst_wide_type.
210
211 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
212
213 * expr.c (pop_arguments): Fix use of undeclared variable.
214
215 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
216
217 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
218 build_call_list.
219 (pop_arguments): Return a VEC instead of a tree. Take a method type
220 rather than a list of argument types.
221 (rewrite_rule): Change signature. of rewrite_arglist member.
222 (rewrite_arglist_getcaller): Update signature.
223 (rewrite_arglist_getclass): Likewise.
224 (maybe_rewrite_invocation): Update for rewrite_arglist change.
225 (build_known_method_ref): Take a VEC instead of a tree.
226 (invoke_build_dtable): Likewise.
227 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
228 instead of build_call_list.
229 (build_jni_stub): Use build_call_vec instead of build_call_list.
230 * java-tree.h (maybe_rewrite_invocation): Update declaration.
231 (build_known_method_ref): Likewise.
232 (invoke_build_dtable): Likewise.
233
234 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
235
236 PR 44103
237 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
238 vector. Move call to build_constructor...
239 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
240 TREE_CONSTANT on the constructor.
241 (PUSH_SUPER_VALUE): Change first argument to a vector.
242 (PUSH_FIELD_VALUE): Likewise.
243 * resource.c (compile_resource_data): Update calls to above macros.
244 * constants.c (build_constants_constructor): Likewise.
245 * class.c (build_utf8_ref): Likewise.
246 (make_field_value): Likewise.
247 (make_method_value): Likewise.
248 (add_table_and_syms): New function.
249 (make_class_data): Call it. Update calls to above macros.
250 (build_symbol_table_entry): New function.
251 (build_symbol_entry): Call it. Update calls to above macros.
252 (emit_symbol_table): Likewise.
253 (make_catch_class_record): Update calls to above macros.
254 (build_assertion_table_entry): New function.
255 (add_assertion_table_entry): Call it.
256 (emit_assertion_table): Likewise.
257
258 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
259
260 PR 40989
261 * lang.c (java_handle_option): Add argument kind.
262
263 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
264
265 * decl.c (java_init_decl_processing): Remove argument in call to
266 initialize_sizetypes
267
268 2010-04-07 Jakub Jelinek <jakub@redhat.com>
269
270 * exception.cc (_Jv_Throw): Avoid set but not used warning.
271 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
272 sizeof to avoid set but not used warnings.
273
274 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
275
276 * lang.c (java_post_options): Constify variable "dot".
277
278 * jcf-parse.c (set_source_filename): Constify variable "dot".
279 (load_class): Constify variable "separator".
280 Use get_identifier_with_length.
281
282 * jvspec.c (lang_specific_driver): Constify two variables named "p".
283
284 2010-01-09 Jakub Jelinek <jakub@redhat.com>
285
286 * jcf-dump.c (version): Update copyright notice dates.
287
288 2009-11-28 Jakub Jelinek <jakub@redhat.com>
289
290 * jvspec.c (lang_specific_driver): Remove unused
291 saw_verbose_flag variable.
292 * jcf-dump.c (main): Remove unused general_purpose_bits
293 variable.
294 * builtins.c (initialize_builtins): Remove unused float_ftype_float
295 variable.
296 * expr.c (java_stack_pop): Remove unused val variable.
297 (build_jni_stub): Remove unused res_type variable.
298 * verify-impl.c (check_field_constant): Remove unused len variable.
299
300 2009-10-20 Joel Dice <dicej@mailsnare.net>
301
302 PR java/28474
303 * mangle_name.c (append_unicode_mangled_name): Fix mangling
304 of names with multiple underscores and "U".
305 (unicode_mangling_length): Likewise.
306
307 2009-10-03 Simon Baldwin <simonb@google.com>
308
309 * config-lang.in (lang_dirs): Remove zlib.
310
311 2009-09-28 Richard Henderson <rth@redhat.com>
312
313 * builtins.c (initialize_builtins): Update call to
314 build_common_builtin_nodes.
315 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
316
317 2009-09-14 Richard Henderson <rth@redhat.com>
318
319 * builtins.c (initialize_builtins): Update call to
320 build_common_builtin_nodes.
321 * decl.c (java_init_decl_processing): Don't call
322 default_init_unwind_resume_libfunc.
323 * except.c: Include tree-iterator.h.
324 (build_exception_object_var): New.
325 (build_exception_object_ref): Use it.
326 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
327 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
328 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
329
330 2009-09-13 Richard Guenther <rguenther@suse.de>
331 Rafael Avila de Espindola <espindola@google.com>
332
333 * decl.c (do_nothing): Remove.
334 (java_init_decl_processing): Do not set lang_eh_runtime_type.
335 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
336 * lang.c (java_eh_personality): New.
337 (java_eh_personality_decl): Likewise.
338 (LANG_HOOKS_EH_PERSONALITY): Define.
339
340 2009-09-03 Diego Novillo <dnovillo@google.com>
341
342 * lang.c (lang_hooks): Remove const qualifier.
343
344 2009-09-01 Jakub Jelinek <jakub@redhat.com>
345
346 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
347 type.
348
349 2009-09-01 Richard Guenther <rguenther@suse.de>
350
351 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
352 * java-tree.h (java_mark_addressable): Likewise.
353 * typeck.c (java_mark_addressable): Likewise.
354
355 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
356
357 * Make-lang.in (java.install-pdf): Install gcj.pdf in
358 $(pdfdir)/gcc, alongside the other manuals.
359
360 2009-08-12 Andrew Haley <aph@redhat.com>
361
362 * builtins.c (compareAndSwapInt_builtin): Use
363 flag_use_atomic_builtins.
364 (compareAndSwapLong_builtin): Likewise.
365 (compareAndSwapObject_builtin): Likewise.
366 * jvspec.c: Add flag_use_atomic_builtins.
367 * gcj.texi: Likewise.
368 * java-tree.h: Likewise.
369 * lang.opt: Likewise.
370
371 2009-08-11 Dodji Seketeli <dodji@redhat.com>
372
373 PR debug/40990
374 * lang.c (put_decl_node): Outputs different level of information
375 depending on the verbosity level.
376
377 2009-07-31 Andrew Haley <aph@redhat.com>
378
379 PR java/40867
380 * decl.c (java_replace_references): Set EXPR_LOCATION on all
381 generated expressions.
382 (binding_level.loc): new field.
383 (clear_binding_level): Initialize loc.
384 (set_input_location): New function.
385 (pushlevel): Set new binding_level.loc.
386 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
387 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
388 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
389
390 2009-07-17 Richard Guenther <rguenther@suse.de>
391
392 PR c/40401
393 * java-gimplify.c (java_genericize): Do not gimplify here.
394 But replace all local references.
395 (java_gimplify_expr): Do not replace local references here.
396 (java_gimplify_modify_expr): Likewise.
397 * jcf-parse.c (java_parse_file): Do not finalize the CU or
398 optimize the cgraph here.
399 * decl.c (java_replace_reference): Make static.
400 (java_replace_references): New function.
401 (end_java_method): Clear base_decl_map.
402 * java-tree.h (java_replace_references): Declare.
403 (java_replace_reference): Remove.
404
405 2009-07-14 Taras Glek <tglek@mozilla.com>
406 Rafael Espindola <espindola@google.com>
407
408 * Make-lang.in (java.install-plugin): New target for
409 installing plugin headers.
410
411 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
412
413 * class.c: Replace %J by an explicit location. Update all calls.
414
415 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
416
417 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
418
419 2009-06-29 Andrew Haley <aph@redhat.com>
420
421 PR java/40590
422 * java-tree.h (cxx_keyword_p): New declaration.
423 * mangle_name.c (utf8_cmp): Move here from mangle.c.
424 (cxx_keywords): Likewise.
425 (cxx_keyword_p): Likewise.
426 (MANGLE_CXX_KEYWORDS): New macro.
427 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
428 (append_gpp_mangled_name): Likewise.
429 * mangle.c: Move code to mangle_name.c.
430 (mangle_member_name): Don't call cxx_keyword_p.
431
432 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
433
434 * java-gimplify.c (java_gimplify_block): New argument to
435 build_empty_stmt.
436 * expr.c (force_evaluation_order): Same.
437 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
438 * class.c: Same.
439 * decl.c: Same.
440 * jcf-parse.c: Same.
441 * constants.c: Same.
442 * resource.c: Same.
443 * except.c: Same.
444 * builtins.c: Same.
445 * expr.c: Same.
446 * java-tree.h (PUSH_FIELD): Add location field.
447
448 2009-06-09 Ian Lance Taylor <iant@google.com>
449
450 * verify.h: Remove extern "C".
451
452 2009-06-07 Ian Lance Taylor <iant@google.com>
453
454 * jcf-parse.c (handle_constant): Change local variable 'kind' to
455 unsigned int.
456
457 2009-06-01 Ian Lance Taylor <iant@google.com>
458
459 * jcf-io.c (find_class): Use CONST_CAST.
460
461 2009-05-27 Ian Lance Taylor <iant@google.com>
462
463 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
464 $(LINKER).
465 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
466
467 2009-05-26 Ian Lance Taylor <iant@google.com>
468
469 * Make-lang.in (jvspec.o): Use $(COMPILER).
470 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
471 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
472
473 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
474
475 * Make-lang.in (GCJ): Renamed to...
476 (XGCJ): ... this.
477
478 2009-04-27 Ian Lance Taylor <iant@google.com>
479
480 * builtins.c (java_builtins): Add casts to enum type.
481 * verify-impl.c (check_class_constant): Add cast to enum type.
482 (check_constant, check_wide_constant): Likewise.
483
484 2009-04-27 Richard Guenther <rguenther@suse.de>
485
486 PR java/38374
487 * constants.c (build_constants_constructor): Retain the old
488 pointer type as valid TYPE_POINTER_TO after patching the
489 type of the constant pool decl.
490
491 2009-04-24 Ian Lance Taylor <iant@google.com>
492
493 * jcf-parse.c (handle_constant): Add cast to enum type.
494
495 2009-04-21 Taras Glek <tglek@mozilla.com>
496
497 * builtins.c: Update GTY annotations to new syntax
498 * decl.c: Likewise
499 * java-tree.h: Likewise
500 * jcf.h: Likewise
501 * lang.c: Likewise
502
503 2009-04-21 Joseph Myers <joseph@codesourcery.com>
504
505 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
506 license notices.
507
508 2009-04-18 Ian Lance Taylor <iant@google.com>
509
510 * verify-impl.c (verify_instructions_0): Add cast to enum type.
511
512 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
513
514 * builtins.c (compareAndSwapLong_builtin,
515 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
516 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
517
518 2009-03-31 Richard Guenther <rguenther@suse.de>
519
520 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
521 the first operand of binary and comaprison expressions.
522
523 2009-03-30 Joseph Myers <joseph@codesourcery.com>
524
525 PR rtl-optimization/323
526 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
527 Give an error for -fexcess-precision=standard for processors where
528 the option is significant.
529
530 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
531
532 * lang.opt: Unify help text for -Wdeprecated.
533
534 2009-02-03 Jakub Jelinek <jakub@redhat.com>
535
536 * jcf-dump.c (version): Update copyright notice dates.
537
538 2009-01-16 Richard Guenther <rguenther@suse.de>
539
540 PR tree-optimization/38835
541 PR middle-end/36227
542 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
543
544 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
545
546 PR bootstrap/38262
547 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
548
549 2008-11-04 Andrew Haley <aph@redhat.com>
550
551 PR java/37068
552 * jcf-parse.c (java_emit_static_constructor): Don't call
553 cgraph_build_static_cdtor. Rewrite.
554
555 2008-10-24 Jakub Jelinek <jakub@redhat.com>
556
557 * Make-lang.in (check-java-subtargets): New target.
558
559 2008-10-16 David Edelsohn <edelsohn@gnu.org>
560
561 PR target/35483
562 * Make-lang.in (class.o): Depend on $(TM_P_H).
563 (expr.o): Same.
564 * class.c: Include tm_p.h.
565 * expr.c: Include tm_p.h.
566
567 2008-10-14 Andrew Haley <aph@redhat.com>
568
569 * constants.c (build_constant_data_ref): Make sure we only build
570 one copy of the decl for the constant pool.
571
572 2008-09-22 Andrew Haley <aph@redhat.com>
573
574 * expr.c (rules): Add new rule for
575 gnu.java.lang.VMCPStringBuilder.toString.
576 (rewrite_rule.new_classname): New field.
577 (maybe_rewrite_invocation): Use new_classname field instead of
578 DECL_CONTEXT (*method_p).
579 Allow rewrite_arglist to be NULL.
580
581 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
582
583 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
584 (java_get_callee_fndecl): Kill.
585
586 2008-09-17 Jan Hubicka <jh@suse.cz>
587
588 PR c++/18071
589 * class.c (add_method_1): Do not initialize DECL_INLINE.
590 (make_local_function_alias): Likewise.
591 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
592 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
593
594 2008-09-09 Richard Guenther <rguenther@suse.de>
595
596 * decl.c (build_result_decl): Remove no longer applicable
597 promotion.
598
599 2008-09-05 David Daney <ddaney@avtrex.com>
600
601 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
602
603 2008-08-21 David Daney <ddaney@avtrex.com>
604
605 * class.c (make_class_data): Don't add field_index when
606 flag_reduced_reflection set.
607
608 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
609
610 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
611
612 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
613
614 PR 28875
615 * lang.c (java_handle_option): Replace set_Wunused with
616 warn_unused.
617
618 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
619
620 * gcj.texi: Update copyright years. Do not list GPL as
621 Invariant Section.
622
623 2008-07-29 Jakub Jelinek <jakub@redhat.com>
624
625 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
626 from ctype's sizes.
627
628 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
629 alignment.
630
631 2008-07-29 Jan Hubicka <jh@suse.cz>
632
633 * lang.c (java_post_options): Remove handling of flag_no_inline.
634
635 2008-07-28 Richard Guenther <rguenther@suse.de>
636
637 Merge from gimple-tuples-branch.
638
639 2008-07-18 Richard Guenther <rguenther@suse.de>
640
641 * expr.c: Include tree-iterator.h.
642 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
643
644 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
645
646 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
647 * expr.c: Same.
648
649 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
650
651 * java-gimplify.c (java_gimplify_expr): Same.
652 (java_gimplify_modify_expr): Same.
653 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
654
655 2008-05-02 Diego Novillo <dnovillo@google.com>
656
657 * expr.c (build_java_throw_out_of_bounds_exception): Fix
658 mixed declarations and code.
659
660 2008-05-02 Doug Kwan <dougkwan@google.com>
661
662 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
663 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
664
665 2008-02-19 Diego Novillo <dnovillo@google.com>
666
667 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
668
669 * java-gimplify.c (java_gimplify_self_mod_expr): Change
670 gimple_seq arguments to gimple_seq *. Update all users.
671
672 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
673
674 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
675 sequences.
676 (java_gimplify_self_mod_expr): Same.
677 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
678 sequences.
679
680 2008-07-24 Jan Hubicka <jh@suse.cz>
681
682 * java/decl.c: Include cgraph.h
683 (end_java_method): Remove non-unit-at-a-time code.
684 (java_mark_decl_local): Likewise; sanity check that we don't touch
685 finalized nodes.
686
687 2008-07-15 Jan Hubicka <jh@suse.cz>
688
689 * lang.c (java_init_options): Enable unit-at-a-time by default.
690
691 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
692
693 * Make-lang.in (jvspec.o): Fix dependencies.
694
695 2008-07-06 Tom Tromey <tromey@redhat.com>
696
697 * Make-lang.in (java/parse.o-warn): Remove.
698 (java/jcf-io.o-warn): Remove.
699
700 2008-07-05 Tom Tromey <tromey@redhat.com>
701
702 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
703 (compare_path): Remove.
704 (java_or_class_file): Likewise.
705 (memoized_dirlist_entry): Likewise.
706 (memoized_dirlist_hash): Likewise.
707 (memoized_dirlist_lookup_eq): Likewise.
708 (memoized_dirlists): Likewise.
709 (caching_stat): Likewise.
710 (find_class): Use stat.
711 * jcf.h (JCF_USE_SCANDIR): Remove.
712
713 2008-06-30 Joshua Sumali <jsumali@redhat.com>
714
715 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
716 doc/rebuild-gcj-db.1
717 (java.uninstall): Likewise.
718 (java.maintainer-clean): Likewise.
719 (aot-compile.pod): New rule.
720 (rebuild-gcj-db.pod): New rule.
721 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
722 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
723
724 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
725
726 * Make-lang.in (java/jcf-io.o-warn): New.
727
728 2008-06-24 Tom Tromey <tromey@redhat.com>
729
730 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
731 * expr.c (add_type_assertion): Rename argument.
732 (build_java_arrayaccess): Don't name variable 'throw'.
733 (ARRAY_NEW_MULTI): Don't name variable 'class'.
734 * jcf-io.c (find_class): Don't name variable 'class'.
735 * mangle.c (compression_table_add): Don't name variable 'new'.
736 * constants.c (cpool_for_class): Rename argument.
737 (alloc_constant_fieldref): Likewise.
738 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
739 'class'.
740 (read_class): Likewise.
741 (parse_zip_file_entries): Likewise.
742 (process_zip_dir): Likewise.
743 * decl.c (java_mark_class_local): Rename argument.
744 * class.c (GEN_TABLE): Use type_name, not typename.
745 (gen_indirect_dispatch_tables): Likewise.
746 (add_field): Rename argument.
747 (is_compiled_class): Likewise.
748 (safe_layout_class): Likewise.
749 (emit_assertion_table): Likewise.
750 * typeck.c (has_method): Rename argument.
751
752 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
753
754 * class.c (ident_subst, mangled_classname, unmangle_classname,
755 gen_indirect_dispatch_tables, add_method_1,
756 build_fieldref_cache_entry, make_local_function_alias,
757 layout_class, java_treetreehash_find, java_treetreehash_new,
758 split_qualified_name): Fix for -Wc++-compat.
759 * constants.c (set_constant_entry, cpool_for_class): Likewise.
760 * decl.c (make_binding_level, java_dup_lang_specific_decl,
761 start_java_method): Likewise.
762 * except.c (prepare_eh_table_type): Likewise.
763 * expr.c (type_assertion_hash, note_instructions): Likewise.
764 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
765 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
766 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
767 Likewise.
768 * jcf-parse.c (reverse, java_read_sourcefilenames,
769 annotation_grow, rewrite_reflection_indexes, java_parse_file,
770 process_zip_dir): Likewise.
771 * jcf-path.c (add_entry, add_path, jcf_path_init,
772 jcf_path_extdirs_arg): Likewise.
773 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
774 * jvgenmain.c (do_mangle_classname): Likewise.
775 * lang.c (put_decl_string): Likewise.
776 * verify-impl.c (make_state_copy, make_state, add_new_state):
777 Likewise.
778
779 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
780
781 * gcj.texi: Expand TABs, remove whitespace from blank lines.
782
783 2008-06-14 Tom Tromey <tromey@redhat.com>
784
785 PR java/36247:
786 * class.c (build_class_ref): Initialize this_classdollar when
787 needed.
788
789 2008-05-23 Andrew Haley <aph@redhat.com>
790
791 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
792 pathname of source file.
793
794 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
795
796 * jcf-dump.c (print_constant): Use
797 HOST_LONG_LONG_FORMAT.
798
799 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
800
801 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
802 DECL_PURE_P.
803
804 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
805
806 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
807 (build_classdollar_field): Don't set TREE_INVARIANT.
808 (get_dispatch_table): Don't set TREE_INVARIANT.
809 (make_class_data): Don't set TREE_INVARIANT.
810 (build_symbol_entry): Don't set TREE_INVARIANT.
811 (emit_symbol_table): Don't set TREE_INVARIANT.
812 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
813 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
814 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
815 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
816
817 2008-04-03 Tom Tromey <tromey@redhat.com>
818
819 * Make-lang.in (java_OBJS): New variable.
820
821 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
822
823 * java-tree.h (insert_block): Kill.
824 * decl.c (insert_block): Kill.
825
826 2008-04-01 Joseph Myers <joseph@codesourcery.com>
827
828 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
829 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
830 gpl.texi.
831
832 2008-03-27 Tom Tromey <tromey@redhat.com>
833
834 * Make-lang.in: Revert automatic dependency patch.
835
836 2008-03-25 Tom Tromey <tromey@redhat.com>
837
838 * Make-lang.in: Removed most explicit .o targets.
839 (java/jvspec.o): Reduce to variable setting. Moved to java/.
840 ($(GCJ)$(exeext)): Update.
841 (JAVA_OBJS): New variable.
842 (JCFDUMP_OBJS): Reformat.
843 (java_OBJS): New variable.
844 (java/jvspec.o-warn): Update.
845 (java/parse.o-warn): Remove.
846 (JAVA_TREE_H): Remove.
847 (java/jcf-io.o): Reduce to variable setting.
848 (ALL_CPPFLAGS): Likewise.
849
850 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
851
852 * mangle.c (java_mangle_decl): Remove dead check.
853
854 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
855
856 * jcf-parse.c (java_parse_file): Assert binding levels are
857 left in order.
858 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
859 Delete.
860
861 2008-03-02 Jakub Jelinek <jakub@redhat.com>
862
863 * jcf-dump.c (version): Update copyright notice dates.
864
865 2008-02-29 Tom Tromey <tromey@redhat.com>
866
867 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
868 method.
869 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
870
871 2008-02-26 Tom Tromey <tromey@redhat.com>
872
873 * lang.c (java_post_options): Remove conditional.
874 * expr.c (expand_byte_code): Remove old location code.
875 * jcf-parse.c (set_source_filename): Remove old location code.
876 (give_name_to_class): Likewise.
877 (jcf_parse): Likewise.
878 (duplicate_class_warning): Likewise.
879 (parse_class_file): Likewise.
880 (java_parse_file): Likewise.
881 * decl.c (finish_method): Remove old location code.
882 * class.c (push_class): Remove old location code.
883
884 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
885
886 PR other/35107
887 * Make-lang.in (jc1): Add $(GMPLIBS).
888
889 2008-01-23 David Daney <ddaney@avtrex.com>
890
891 * class.c (hide) Rename to...
892 (java_hide_decl) ... this throughout, and make public.
893 * resource.c (Jr_count): Remove.
894 (compile_resource_data): Call java_mangle_resource_name to generate
895 decl name. Make resource decl public and hidden.
896 * mangle.c (java_mangle_resource_name): New function.
897 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
898 functions.
899
900 2008-01-04 Andrew Haley <aph@redhat.com>
901
902 PR java/17779
903 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
904 C90.
905
906 2008-01-03 Andrew Haley <aph@redhat.com>
907
908 PR java/17779
909 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
910 we're about to re-layout the type.
911
912 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
913
914 * lang.c (java_classify_record): Don't return
915 RECORD_IS_INTERFACE for now.
916
917 2007-12-18 Andrew Haley <aph@redhat.com>
918
919 PR java/27643
920 * jcf-parse.c (java_parse_file): Remove call to
921 java_mark_class_local.
922 (parse_class_file): Reinstate call to java_mark_class_local here.
923 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
924 already set, call java_mangle_decl() and make_decl_rtl() to
925 rewrite its name as a hidden alias.
926
927 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
928
929 PR debug/7081
930 * lang.c (java_classify_record): New.
931 (LANG_HOOKS_CLASSIFY_RECORD): Override.
932
933 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
934
935 PR 34081/C++
936 * decl.c (finish_method): Pass 'false' for the new
937 allocate_struct_function parameter.
938
939 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
940
941 * expr.c (build_jni_stub): Use the computed jni func type for
942 variable meth.
943
944 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
945
946 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
947
948 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
949
950 * expr.c (type_assertion_hash): Hash type uids rather than
951 tree pointers.
952
953 2007-11-17 David Daney <ddaney@avtrex.com>
954 Andrew Haley <aph@redhat.com>
955
956 * constants.c (build_constants_constructor): Use POINTER_SIZE
957 insead of BITS_PER_WORD in big-endian work around.
958
959 2007-11-07 Tom Tromey <tromey@redhat.com>
960
961 PR java/34019:
962 * gcj.texi (Input Options): Add missing noun.
963
964 2007-11-02 Tom Tromey <tromey@redhat.com>
965
966 PR java/33765:
967 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
968 * zipfile.h (ZIPEMPTYMAGIC): New define.
969
970 2007-11-01 Tom Tromey <tromey@redhat.com>
971
972 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
973 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
974 (java/jcf-io.o): Depend on zipfile.h.
975
976 2007-10-17 Richard Guenther <rguenther@suse.de>
977
978 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
979 dependencies.
980
981 2007-10-03 Andrew Haley <aph@redhat.com>
982
983 PR java/33639
984 * class.c (mangled_classname): Detect and replace illegal
985 characters in assembly language symbols.
986 (gen_indirect_dispatch_tables): Call mangled_classname() on
987 the type.
988
989 2007-09-27 Jakub Jelinek <jakub@redhat.com>
990
991 * lang.c (java_print_error_function): Add third argument.
992
993 2007-09-15 Tom Tromey <tromey@redhat.com>
994
995 * java-tree.h (struct lang_decl_func) <function_decl_body>:
996 Remove.
997 <init_final>: Likewise.
998 * lang.c (java_dump_tree): Update.
999 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1000
1001 2007-09-11 Jan Hubicka <jh@suse.cz>
1002
1003 * decl.c (java_expand_body): Kill.
1004 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1005
1006 2007-09-06 Tom Tromey <tromey@redhat.com>
1007
1008 * jcf-parse.c (parse_class_file): Re-enter the current file.
1009
1010 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1011
1012 * boehm.c (mark_reference_fields): Move misaligned pointer check
1013 after JREFERENCE_TYPE_P test
1014
1015 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1016
1017 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1018 if pointer is misaligned.
1019
1020 2007-09-06 Tom Tromey <tromey@redhat.com>
1021
1022 * lang.c (java_post_options): Update.
1023 * jcf-parse.c (set_source_filename): Update.
1024 (give_name_to_class): Update.
1025 (jcf_parse): Update.
1026 (duplicate_class_warning): Update.
1027 (parse_class_file): Update.
1028 (java_parse_file): Update.
1029 * expr.c (expand_byte_code): Update.
1030
1031 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1032
1033 * decl.c (finish_method): Use set_cfun.
1034
1035 2007-09-04 Andrew Haley <aph@redhat.com>
1036
1037 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1038 when using the ARM EABI.
1039
1040 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1041
1042 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1043
1044 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1045
1046 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1047 CONST_CAST.
1048 * jcf.h (JCF_FINISH): Likewise.
1049
1050 2007-08-28 Tom Tromey <tromey@redhat.com>
1051
1052 * Make-lang.in (java.tags): Don't tag '*.y' files.
1053
1054 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1055
1056 * lang.c (java_decl_ok_for_sibcall): Likewise.
1057
1058 2007-08-21 Paul Brook <paul@codesourcery.com>
1059 Nathan Sidwell <nathan@codesourcery.com>
1060 Mark Mitchell <mark@codesourcery.com>
1061 Joseph Myers <joseph@codesourcery.com>
1062
1063 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1064 date.
1065
1066 2007-08-20 Richard Guenther <rguenther@suse.de>
1067
1068 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1069 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1070
1071 2007-08-17 Tom Tromey <tromey@redhat.com>
1072
1073 * typeck.c (find_method_in_interfaces): Update.
1074 * jcf-parse.c (load_class): Update.
1075 * java-gimplify.c (java_gimplify_component_ref): Removed.
1076 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1077 arguments.
1078 (java_gimplify_expr): Update.
1079 * decl.c (java_init_decl_processing): Update.
1080 * class.c (set_constant_value): Update.
1081 (make_class_data): Update.
1082 (finish_class): Update.
1083 (build_static_field_ref): Update.
1084 (is_compiled_class): Update.
1085 (maybe_layout_super_class): Update.
1086 (layout_class): Update.
1087 (layout_class_method): Update.
1088 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1089 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1090 (lang_decl_func) <init_calls_this>: Removed field.
1091 (lang_type) <dot_class, verify_method>: Removed fields.
1092 (FIELD_NESTED_ACCESS): Removed.
1093 (FIELD_NESTED_ACCESS_P): Removed.
1094 (DECL_FIELD_FINAL_IUD): Removed.
1095 (DECL_LOCAL_FINAL_IUD): Removed
1096 (LOCAL_FINAL_P): Removed.
1097 (FINAL_VARIABLE_P): Removed.
1098 (CLASS_FINAL_VARIABLE_P): Removed.
1099 (DECL_BIT_INDEX): Removed.
1100 (DECL_INIT_CALLS_THIS): Removed.
1101 (FIELD_LOCAL_ALIAS): Removed.
1102 (FIELD_LOCAL_ALIAS_USED): Removed.
1103 (FIELD_THISN): Removed.
1104 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1105 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1106 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1107 (TYPE_DOT_CLASS): Removed.
1108 (TYPE_VERIFY_METHOD): Removed.
1109 (ID_CLASSDOLLAR_P): Removed.
1110 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1111 Removed.
1112 (classdollar_identifier_node): Removed.
1113 (TYPE_UNKNOWN): Removed.
1114 (CLASS_FROM_SOURCE_P): Removed.
1115 * expr.c (build_jni_stub): Update.
1116 (force_evaluation_order): Update.
1117 (build_java_empty_stmt): Update.
1118 (build_class_init): Update.
1119 (java_stack_swap): Update.
1120 (build_jni_stub): Update.
1121
1122 2007-08-17 Tom Tromey <tromey@redhat.com>
1123
1124 * java-tree.h (LABEL_TYPE_STATE): Removed.
1125 (load_type_state): Removed.
1126 (LABEL_PC): Removed.
1127 (LABEL_VERIFIED): Removed.
1128 (type_states): Declare.
1129 * expr.c (type_states): New global.
1130 (load_type_state): Now static. Use type_states. Changed
1131 argument.
1132 (lookup_label): Don't set LABEL_PC.
1133 (expand_byte_code): Don't use LABEL_VERIFIED.
1134 (note_instructions): Initialize type_states.
1135 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1136 (vfy_note_stack_type): Use type_states.
1137 (vfy_note_local_type): Likewise.
1138
1139 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1140
1141 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1142 * jcf.h (JCF_FINISH): Likewise.
1143
1144 2007-07-31 Nick Clifton <nickc@redhat.com>
1145
1146 * java-gimplify.c: Change copyright header to refer to version 3
1147 of the GNU General Public License and to point readers at the
1148 COPYING3 file and the FSF's license web page.
1149 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1150 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1151 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1152 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1153 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1154 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1155 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1156
1157 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1158
1159 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1160
1161 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1162
1163 * lang.c (java_get_callee_fndecl): Constify.
1164
1165 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1166
1167 * mangle.c (set_type_package_list): Constify.
1168 * verify-glue.c (vfy_make_string): Delete.
1169 * verify.h (vfy_make_string): Likewise.
1170
1171 2007-07-26 Tom Tromey <tromey@redhat.com>
1172
1173 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1174 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1175 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1176 * lang.c (java_tree_inlining_walk_subtrees): Update.
1177 (java_dump_tree): Likewise.
1178 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1179 Remove.
1180 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1181 * java-gimplify.c (java_gimplify_labeled_block_expr,
1182 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1183 (java_gimplify_expr): Update.
1184
1185 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1186
1187 * class.c (java_treetreehash_hash, java_treetreehash_compare):
1188 Constify.
1189 * expr.c (type_assertion_eq): Likewise.
1190 * jcf-io.c (compare_path): Likewise.
1191 * jcf-parse.c (cmpstringp): Likewise.
1192 * verify-impl.c (get_one_type, compute_argument_types,
1193 compute_return_type): Likewise.
1194
1195 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1196
1197 PR target/32462
1198 PR libgcj/32465
1199 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1200
1201 2007-07-12 Richard Guenther <rguenther@suse.de>
1202
1203 * expr.c (expand_java_return): RETURN_EXPR has void type.
1204 (build_jni_stub): Likewise. Use a comparison against zero
1205 for null-pointer test in COND_EXPR.
1206 (build_field_ref): Build POINTER_PLUS_EXPR with correct
1207 type. Convert result instead.
1208 (build_invokevirtual): Likewise.
1209
1210 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1211
1212 PR 32617
1213 * lang.c (java_init): Remove setting of force_align_functions_log.
1214 * class.c (add_method_1): Set DECL_ALIGN of non-static method
1215 to cope with ptrmemfunc_vbit_in_pfn.
1216
1217 2007-07-03 David Daney <ddaney@avtrex.com>
1218
1219 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
1220 include path.
1221 (doc/gcj.dvi): Same.
1222 (doc/gcj.pdf): Same.
1223 (java/index.html): Same.
1224
1225 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1226
1227 * class.c (make_class_data): Build the index in sizetype.
1228 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1229 adding to a pointer type.
1230 (build_symbol_entry): Likewise.
1231 * expr.c (build_java_arrayaccess): Likewise.
1232 (build_field_ref): Likewise.
1233 (build_known_method_ref): Likewise.
1234 (build_invokevirtual): Likewise.
1235 * except.c (build_exception_object_ref): Do a
1236 NEGATIVE and then a POINTER_PLUS_EXPR instead
1237 of a MINUS_EXPR.
1238
1239 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
1240
1241 * typeck.c (java_signed_type): Remove.
1242 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1243 * java-tree.h (java_signed_type): Remove.
1244
1245 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1246
1247 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1248 (print_constant): Likewise.
1249
1250 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
1251
1252 * expr.c (build_java_binop): Use unsigned_type_for instead of
1253 java_unsigned_type.
1254 * java-tree.h (java_unsigned_type): Remove.
1255 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1256 * typeck.c (java_unsigned_type): Remove.
1257
1258 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1259
1260 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1261 instead of checking GIMPLE_STMT_P in chain_next.
1262
1263 2007-04-06 Colin Walters <walters@redhat.com>
1264
1265 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1266 * jcf-io.c (open_class): Copy 'filename'.
1267
1268 2007-04-03 Andrew Haley <aph@redhat.com>
1269
1270 * jvgenmain.c (main): Change main to use class$, not class$$.
1271 (do_mangle_classname): Likewise.
1272 * class.c (hide): New function.
1273 (add_field): Hide everything that shouldn't be visible outside a
1274 DSO.
1275 (build_static_class_ref): Likewise.
1276 (build_classdollar_field): Likewise.
1277 (make_class_data): Likewise.
1278 (layout_class_method): Likewise.
1279 * expr.c (special_method_p): New function.
1280
1281 * class.c (push_class): Don't bogusly guess the source filename.
1282 * jcf-parse.c (give_name_to_class): Don't set input_location from
1283 DECL_ARTIFICIAL decls.
1284
1285 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
1286
1287 * typeck.c (java_signed_or_unsigned_type): Removed.
1288 (java_signed_type): use get_signed_or_unsigned_type instead of
1289 java_signed_or_unsigned_type.
1290 (java_unsigned_type): Ditto.
1291 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1292 * java-tree.h (java_signed_or_unsigned_type): Removed.
1293
1294 2007-03-26 Tom Tromey <tromey@redhat.com>
1295
1296 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1297 (java.maintainer-clean): Likewise.
1298 (java.install-man): Likewise.
1299 (.INTERMEDIATE): Removed grmiregistry.pod.
1300 (grmiregistry.pod): Removed.
1301 * gcj.texi (Invoking gcjh): Removed.
1302 (Invoking gjnih): Likewise.
1303 (Invoking grmiregistry): Likewise.
1304 (direntry): Updated.
1305 (Top): Likewise.
1306 (which-gcj): Removed.
1307
1308 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1309
1310 * Make-lang.in: Add install-pdf target as copied from
1311 automake v1.10 rules.
1312
1313 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
1314
1315 * gcj.texi: Standardize title page.
1316
1317 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1318
1319 * class.c: Fix a comment typo.
1320
1321 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1322 Brooks Moses <brooks.moses@codesourcery.com>
1323 Lee Millward <lee.millward@codesourcery.com>
1324
1325 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1326 of build3.
1327 (BUILD_MONITOR_EXIT): Likewise.
1328
1329 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1330 (java_gimplify_modify_expr): Likewise.
1331
1332 * class.c (cache_this_class_ref): Use build_call_expr.
1333 (build_static_field_ref): Likewise.
1334 (emit_indirect_register_classes): Likewise.
1335 (emit_register_classes): Likewise.
1336
1337 * resource.c (write_resource_constructor): Use build_call_expr.
1338
1339 * builtins.c (builtin_creator_function): Change interpretation of
1340 the second parameter to be the whole CALL_EXPR instead of the arglist.
1341 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
1342 (min_builtin): Likewise.
1343 (abs_builtin): Likewise.
1344 (java_build_function_call_expr): Likewise.
1345 (convert_real): Likewise.
1346 (UNMARSHAL3): Likewise.
1347 (UNMARSHAL4): Likewise.
1348 (UNMARSHAL5): Likewise.
1349 (build_arglist_for_builtin): Delete. Fix callers to use
1350 build_call_expr instead.
1351 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
1352 accessors.
1353 (compareAndSwapInt_builtin): Likewise.
1354 (compareAndSwapLong_builtin): Likewise.
1355 (compareAndSwapObject_builtin): Likewise.
1356 (putVolatile_builtin): Likewise.
1357 (getVolatile_builtin): Likewise.
1358 (VMSupportsCS8_builtin): Likewise.
1359 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1360 instead of arglist.
1361
1362 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1363 (build_java_throw_out_of_bounds_exception): Likewise.
1364 (java_check_reference): Likewise.
1365 (build_java_arraystore_check): Likewise.
1366 (build_newarray): Likewise.
1367 (build_anewarray): Likewise.
1368 (expand_java_multinewarray): Use build_call_list instead of build3.
1369 (build_java_monitor): Use build_call_nary instead of build3.
1370 (java_create_object): Likewise.
1371 (expand_java_NEW): Likewise.
1372 (build_instanceof): Likewise.
1373 (expand_java_CHECKCAST): Likewise.
1374 (build_java_soft_divmod): Likewise.
1375 (build_java_binop): Likewise.
1376 (build_field_ref): Likewise.
1377 (build_class_init): Likewise.
1378 (rewrite_arglist_getcaller): Use build_call_expr.
1379 (build_invokeinterface): Use build_call_nary instead of build3.
1380 (expand_invoke): Use build_call_list instead of build3.
1381 (build_jni_stub): Use build_call_nary, build_call_list, or
1382 build_call_expr instead of build3.
1383 (expand_java_field_op): Use build_call_expr instead of build3.
1384 (force_evaluation_order): Use new CALL_EXPR accessors.
1385
1386 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1387
1388 2007-02-15 David Daney <ddaney@avtrex.com>
1389
1390 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1391 (java.maintainer-clean):Add gc-analyze.1.
1392 (.INTERMEDIATE): Add gc-analyze.pod.
1393 (gc-analyze.pod): New rule.
1394 (java.install-man): Install gc-analyze.1
1395 * gcj.texi: Add new section for the gc-analyze program.
1396
1397 2007-02-07 Andrew Haley <aph@redhat.com>
1398
1399 * class.c (uncache_this_class_ref): New.
1400 * expr.c (build_jni_stub): Initialize the class.
1401 (expand_byte_code): Call uncache_this_class_ref after generating
1402 code.
1403
1404 2007-02-06 Tom Tromey <tromey@redhat.com>
1405
1406 PR java/30714:
1407 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1408
1409 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
1410
1411 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1412
1413 2007-02-02 Andrew Haley <aph@redhat.com>
1414
1415 * expr.c (expand_byte_code): Call cache_this_class_ref() and
1416 cache_cpool_data_ref().
1417 Set TYPE_CPOOL_DATA_REF.
1418 (cache_cpool_data_ref): New function.
1419 * constants.c (build_ref_from_constant_pool): Remove special-case
1420 code for flag_indirect_classes.
1421 (build_constant_data_ref): Move special-case code for
1422 flag_indirect_classes here from build_ref_from_constant_pool.
1423 * decl.c (finish_method): Move class initialization from here to
1424 cache_this_class_ref.
1425 * class.c (cache_this_class_ref): New function.
1426 (build_class_ref): Use this_classdollar for the ouput class.
1427
1428 2007-02-02 David Daney <ddaney@avtrex.com>
1429
1430 * class.c (is_compiled_class): Move check to avoid reloading
1431 current class.
1432 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1433 already set.
1434
1435 2007-02-01 Andrew Haley <aph@redhat.com>
1436
1437 PR java/30641
1438 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1439
1440 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
1441
1442 * class.c, jcf-parse.c: Fix comment typos.
1443
1444 2007-01-30 Tom Tromey <tromey@redhat.com>
1445
1446 * gcj.texi (Strings): Fix documentation for JvNewString.
1447
1448 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1449
1450 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1451 typos.
1452
1453 2007-01-30 Ben Elliston <bje@au.ibm.com>
1454
1455 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1456
1457 2007-01-29 Tom Tromey <tromey@redhat.com>
1458
1459 PR java/30607:
1460 * jvspec.c (lang_specific_driver): Handle separate -I argument.
1461 * lang.opt (-I): Add 'Separate'.
1462
1463 2007-01-29 Andrew Haley <aph@redhat.com>
1464
1465 * class.c (add_method_1): Mark fndecl as external unless we are
1466 compiling it into this object file.
1467
1468 2007-01-24 Andrew Haley <aph@redhat.com>
1469
1470 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1471 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1472
1473 2007-01-22 Andrew Haley <aph@redhat.com>
1474
1475 * builtins.c (VMSupportsCS8_builtin): New function.
1476
1477 2007-01-23 Andrew Pinski <pinskia@gmail.com>
1478
1479 PR java/30454
1480 * jcf-io.c (opendir_in_zip): Close the file
1481 and free zipf before returning after an error.
1482
1483 2007-01-16 Tom Tromey <tromey@redhat.com>
1484
1485 * java-tree.def: Added copyright header.
1486
1487 2007-01-15 Tom Tromey <tromey@redhat.com>
1488
1489 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1490 case.
1491 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1492 Removed case.
1493 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1494 (EXPR_WFL_NODE): Likewise.
1495 (EXPR_WFL_LINECOL): Likewise.
1496 (EXPR_WFL_FILENAME): Likewise.
1497 (EXPR_WFL_LINENO): Likewise.
1498 (build_expr_wfl, expr_add_location): Don't declare.
1499 (build_unknown_wfl): Removed.
1500 (EXPR_WFL_FILENAME_NODE): Removed.
1501 (EXPR_WFL_COLNO): Removed.
1502 (EXPR_WFL_SET_LINECOL): Removed.
1503 (DECL_FUNCTION_WFL): Removed.
1504 (DECL_FIELD_FINAL_WFL): Removed.
1505 (struct lang_decl_func) <wfl>: Removed field.
1506 <called_constructor>: Likewise.
1507 <inner_access>: Likewise.
1508 (struct lang_decl_var) <wfl>: Removed field.
1509 (DECL_CONSTRUCTOR_CALLS): Removed.
1510 (DECL_FUNCTION_ACCESS_DECL): Likewise.
1511 (DECL_FUNCTION_INNER_ACCESS): Likewise.
1512 (DECL_SPECIFIC_COUNT): Likewise.
1513 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1514 * expr.c (build_expr_wfl): Removed.
1515 (expr_add_location): Likewise.
1516
1517 2007-01-12 Tom Tromey <tromey@redhat.com>
1518
1519 * jcf-dump.c (main): Updated call to find_class.
1520 * lang.c (java_init): Removed dead code.
1521 * jcf-parse.c (read_class): Don't use java_source field. Removed
1522 dead code.
1523 (parse_zip_file_entries): Don't use java_source field.
1524 (process_zip_dir): Likewise.
1525 (jcf_parse): Removed dead code.
1526 (java_parse_file): Likewise.
1527 (read_class): Updated call to find_class.
1528 * jcf-io.c (find_class): Don't use java_source field. Removed
1529 'source_ok' argument, .java logic.
1530 * jcf.h (JCF) <java_source>: Removed field.
1531 (JCF_ZERO): Updated. (find_class): Updated.
1532 * decl.c: Removed dead code.
1533 * class.c: Removed dead code.
1534
1535 2007-01-11 Tom Tromey <tromey@redhat.com>
1536
1537 * typeck.c (convert): Don't use flag_emit_class_files.
1538 * lang.c (java_post_options): Don't use flag_emit_class_files.
1539 (java_handle_option): Don't use flag_extraneous_semicolon or
1540 flag_redundant.
1541 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1542 flag_emit_class_files.
1543 (load_class): Likewise.
1544 * java-tree.h (flag_emit_class_files): Don't declare.
1545 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1546 (flag_extraneous_semicolon): Don't declare.
1547 (flag_not_overriding): Likewise.
1548 (flag_static_local_jdk1_1): Likewise.
1549 (flag_redundant): Likewise.
1550 * expr.c (build_newarray): Don't use flag_emit_class_files.
1551 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1552 flag_emit_class_files.
1553 (build_class_ref): Likewise.
1554 * builtins.c (check_for_builtin): Don't use
1555 flag_emit_class_files.
1556
1557 2007-01-10 Tom Tromey <tromey@redhat.com>
1558
1559 * lang.c (java_can_use_bit_fields_p): Removed.
1560 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1561
1562 2007-01-09 Andrew Haley <aph@redhat.com>
1563
1564 * expr.c (build_java_arrayaccess): Rewrite to generate array
1565 access in canonical form.
1566 (expand_java_arraystore): Use build_fold_addr_expr() on address of
1567 array access.
1568
1569 2007-01-03 Andrew Haley <aph@redhat.com>
1570
1571 PR java/28754
1572 * expr.c (expand_java_field_op): If we're initializing a field's
1573 declaring interface we should not also initialize the class
1574 context in which it was referenced.
1575
1576 2007-01-02 Tom Tromey <tromey@redhat.com>
1577
1578 * java-tree.h (compiling_from_source, current_encoding,
1579 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1580 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1581 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1582 JTI_WFL_OPERATOR): Removed
1583 (finit_identifier_node, instinit_identifier_node,
1584 length_identifier_node, super_identifier_node,
1585 continue_identifier_node, access0_identifier_node, wfl_operator):
1586 Removed.
1587 (cyclic_inheritance_report,
1588 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1589 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1590 DECL_FIXED_CONSTRUCTOR_P): Removed.
1591 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1592 Removed.
1593 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1594 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1595 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1596 import_list, import_demand_list>: Removed.
1597 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1598 cxx_keyword_p): Removed.
1599 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1600 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1601 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1602 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1603 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1604 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1605 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1606 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1607 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1608 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1609 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1610 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1611 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1612 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1613 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1614 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1615 java_parse_abort_on_error, extract_field_decl): Removed.
1616 (finput): Declare.
1617 * lang.c: (compiling_from_source, current_encoding): Removed.
1618 (java_handle_option): Ignore -fencoding.
1619 * parse.h: Don't include lex.h.
1620 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1621 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1622 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1623 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1624 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1625 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1626 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1627 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1628 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1629 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1630 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1631 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1632 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1633 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1634 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1635 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1636 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1637 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1638 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1639 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1640 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1641 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1642 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1643 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1644 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1645 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1646 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1647 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1648 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1649 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1650 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1651 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1652 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1653 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1654 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1655 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1656 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1657 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1658 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1659 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1660 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1661 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1662 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1663 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1664 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1665 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1666 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1667 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1668 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1669 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1670 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1671 SET_CPC_STATIC_INITIALIZER_STMT,
1672 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1673 java_complete_class, java_check_circular_reference,
1674 java_fix_constructors, java_layout_classes, java_reorder_fields,
1675 java_method_add_stmt, java_get_line_col, reset_report,
1676 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1677 java_finish_classes, ctxp, ctxp_for_generation,
1678 ctxp_for_generation_last): Removed.
1679 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1680 * mangle.c (utf8_cmp): New function.
1681 (cxx_keywords): New global.
1682 (cxx_keyword_p): New function.
1683 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1684 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1685 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1686 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1687 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1688 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1689 * Make-lang.in (java.srcextra): Do nothing.
1690 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1691 (JAVA_OBJS): Don't mention deleted files.
1692 (java.mostlyclean): Likewise.
1693 (java.clean): Likewise.
1694 (JAVA_LEX_C): Removed.
1695 (buffer.o, check-init.o, parse.o): Remove unused targets.
1696 (typeck.o): Updated.
1697 * jcf-parse.c (read_class): Comment out unused code.
1698 (java_layout_seen_class_methods): New function.
1699 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1700 Removed.
1701 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
1702 (init_jcf_parse): Removed.
1703 * config-lang.in (gtfiles): Remove deleted files.
1704 * decl.c (java_init_decl_processing): Don't initialize
1705 finit_identifier_node, instinit_identifier_node,
1706 length_identifier_node, super_identifier_node,
1707 continue_identifier_node, access0_identifier_node. Don't call
1708 init_jcf_parse.
1709 * class.c (cyclic_inheritance_report): New global.
1710 (add_method_1): Don't use
1711 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1712 (maybe_layout_super_class): Comment out code.
1713 (safe_layout_class): New function.
1714 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1715 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1716 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1717 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1718 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1719 (java_gimplify_case_expr): Removed.
1720 (java_gimplify_default_expr): Likewise.
1721 (java_gimplify_new_array_init): Likewise.
1722 * parse.y: Removed.
1723 * keyword.gperf, keyword.h: Removed.
1724 * chartables.h: Removed.
1725 * check-init.c: Removed.
1726 * buffer.c, buffer.h: Removed.
1727 * convert.h: Removed.
1728 * gen-table.pl: Removed.
1729 * lex.c, lex.h: Removed.
1730
1731 2007-01-02 Andrew Haley <aph@redhat.com>
1732
1733 * expr.c (expand_java_arraystore): Make sure we perform a bounds
1734 check at runtime before we perform a type check.
1735
1736 2006-12-19 Andrew Haley <aph@redhat.com>
1737
1738 * decl.c: Bump minor BC ABI version.
1739
1740 2006-12-13 Gary Benson <gbenson@redhat.com>
1741
1742 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1743
1744 2006-12-12 Tom Tromey <tromey@redhat.com>
1745
1746 * lang-specs.h: Pass -M options to jc1.
1747 * jcf-depend.c (jcf_dependency_add_file): Don't emit
1748 dependencies.
1749
1750 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
1751
1752 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1753
1754 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
1755
1756 * lang-specs.h: Pass '%U'-based options as separate arguments.
1757
1758 2006-12-05 Tom Tromey <tromey@redhat.com>
1759
1760 PR java/29495:
1761 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1762 classes as well.
1763 * class.c (add_field): Handle ACC_SYNTHETIC.
1764 (add_method_1): Likewise. Handle bridge and varargs.
1765 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1766 annotation.
1767 (set_class_decl_access_flags): Handle synthetic and annotation.
1768 * java-tree.h (METHOD_BRIDGE): New macro.
1769 (METHOD_VARARGS): Likewise.
1770 (TYPE_SYNTHETIC): Likewise.
1771 (TYPE_ANNOTATION): Likewise.
1772 (lang_type): New fields 'synthetic' and 'annotation'.
1773 (lang_decl_func): New fields 'varargs' and 'bridge'.
1774
1775 2006-12-04 Andrew Haley <aph@redhat.com>
1776
1777 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
1778 there's no map.
1779
1780 2006-11-29 Gary Benson <gbenson@redhat.com>
1781
1782 * expr.c (rewrite_arglist_getcaller): Reorder.
1783
1784 2006-11-29 Andrew Haley <aph@redhat.com>
1785
1786 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
1787 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1788
1789 2006-11-23 Andrew Haley <aph@redhat.com>
1790
1791 * expr.c (rewrite_arglist_getcaller): New.
1792 (rewrite_arglist_getclass): Fix indentation.
1793 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
1794 gnu.classpath.VMStackWalker.getCallingClassLoader().
1795 * builtins.c (initialize_builtins): Remove duplicate def'n of
1796 __sync_synchronize.
1797 Add __builtin_return_address.
1798
1799 2006-11-22 Andrew Haley <aph@redhat.com>
1800
1801 * jcf-reader.c (get_attribute): Mark attr_type unused.
1802
1803 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1804
1805 2007-01-08 Richard Guenther <rguenther@suse.de>
1806
1807 * lex.c (do_java_lex): Use build_int_cst_wide_type.
1808 * jcf-parse.c (get_constant): Likewise.
1809
1810 2006-11-12 Jan Hubicka <jh@suse.cz>
1811
1812 * resource.c (compile_resource_data): Update for new varpool names.
1813 * java/class.c (build_utf8_ref): Likewise.
1814
1815 2006-11-12 David Daney <ddaney@avtrex.com>
1816
1817 PR java/29805
1818 * typeck.c (build_java_array_type): Increase buffer sizes.
1819
1820 2006-11-11 Richard Guenther <rguenther@suse.de>
1821
1822 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1823 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1824
1825 2006-11-06 Andrew Haley <aph@redhat.com>
1826
1827 * java-tree.h (CONSTANT_LazyFlag): New.
1828 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1829 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1830 reflection_data.
1831 (handle_constant): Return 0 for dummy cpool entries.
1832 Handle constants of kind Class.
1833 Handle constants of kind NameAndType.
1834 (handle_enclosingmethod_attribute): New.
1835 (handle_signature_attribute): New.
1836 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1837 (HANDLE_SIGNATURE_ATTRIBUTE): New.
1838 (handle_constant): Use unmangle_classname()rather than calling
1839 identifier_subst() directly.
1840
1841 2006-11-02 Andrew Haley <aph@redhat.com>
1842
1843 * java-tree.h (FIELD_ENUM): New.
1844 (lang_decl_var.field_enum): New.
1845 (lang_type.enum_class): New.
1846 (CLASS_ENUM): New.
1847 * class.c (set_class_decl_access_flags): Handle enum types.
1848 (add_field): Handle enum fields.
1849 (get_access_flags_from_decl): Likewise.
1850
1851 * class.c (make_class_data): Put reflection_data into rodata.
1852
1853 2006-11-01 Andrew Haley <aph@redhat.com>
1854
1855 * jcf-parse.c (field_offsets, bit_obstack): New variables.
1856 (jcf_parse): Write end marker to annotation_data.
1857 (java_parse_file): Create field_offsets bitmap. Destroy it.
1858 (annotation_grow, annotation_rewrite_byte)
1859 (annotation_rewrite_short, annotation_rewrite_int)
1860 (annotation_read_short, annotation_write_byte)
1861 (annotation_write_short, annotation_write_int)
1862 (handle_long_constant, handle_constant, handle_element_value)
1863 (handle_annotation, handle_annotations)
1864 (handle_annotation_attribute, rewrite_reflection_indexes)
1865 (handle_member_annotations, handle_parameter_annotations)
1866 (handle_default_annotation): New functions.
1867 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
1868 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
1869 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
1870 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
1871 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
1872 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
1873 (TYPE_REFLECTION_DATA): New.
1874 (TYPE_REFLECTION_DATASIZE): New.
1875 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
1876 an enum.
1877 * jcf-reader.c (get_attribute): Pass field/method index and
1878 attribute type to get_attribute().
1879 * constants.c (find_class_or_string_constant): Make nonstatic.
1880 (cpool_for_class): Likewise.
1881 (build_constants_constructor): Separate string and scalar types.
1882 * class.c (make_class_data): Generate field_indexes permutation.
1883 Pass it to rewrite_reflection_indexes().
1884 (make_class_data): Generate constructor for reflection_data field.
1885
1886 2006-10-20 Tom Tromey <tromey@redhat.com>
1887
1888 * gcj.texi (Top): Don't mention jv-scan.
1889 (Invoking gcj): Likewise.
1890 (Invoking gcjh): Likewise.
1891 (Invoking gjnih): Likewise.
1892 (Invoking gij): Likewise.
1893 (Invoking gcj-dbtool): Likewise.
1894 (Invoking jv-scan): Removed.
1895 * parse-scan.y: Removed.
1896 * jv-scan.c: Removed.
1897 * config-lang.in (stagestuff): Don't mention jv-scan.
1898 * Make-lang.in (java): Removed jv-scan.
1899 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1900 (JVSCAN_OBJS): Removed.
1901 (jv-scan$(exeext)): Likewise.
1902 (JAVA_MANFILES): Removed jv-scan.1.
1903 (java.uninstall): Don't mention jv-scan.
1904 (java.mostlyclean): Likewise.
1905 (java.maintainer-clean): Likewise.
1906 (.INTERMEDIATE): Likewise.
1907 (java/jv-scan.o): Removed.
1908 (jv-scan.pod): Likewise.
1909 (java.srcextra): Don't mention parse-scan.c.
1910 (java.mostlyclean): Likewise.
1911 (java/parse-scan.c): Removed.
1912 (java/parse-scan.o-warn): Removed.
1913 (java/parse-scan.o): Removed.
1914
1915 2006-10-20 Tom Tromey <tromey@redhat.com>
1916
1917 * lang.c (java_handle_option): Don't use
1918 jcf_write_base_directory.
1919 * jcf.h (jcf_write_base_directory): Removed.
1920 * parse.y (java_expand_classes): Don't call write_classfile.
1921 * config-lang.in (gtfiles): Removed jcf-write.c.
1922 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
1923 (java/jcf-write.o): Removed.
1924 * jcf-parse.c (parse_class_file): Don't call write_classfile.
1925 * java-tree.h (write_classfile): Removed declaration.
1926 * jcf-write.c: Removed.
1927
1928 2006-10-20 Tom Tromey <tromey@redhat.com>
1929
1930 * Make-lang.in (java): Removed gjnih, gcjh.
1931 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1932 (GCJH_OBJS): Removed.
1933 (GJNIH_OBJS): Likewise.
1934 (gjnih$(exeext)): Likewise.
1935 (gcjh$(exeext)): Likewise.
1936 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1937 (java.install-common): Don't special case gcjh.
1938 (java.uninstall): Don't mention gcjh, gjnih.
1939 (java.mostlyclean): Likewise.
1940 (java.maintainer-clean): Likewise.
1941 (.INTERMEDIATE): Likewise.
1942 (gcjh.pod): Removed.
1943 (gjnih.pod): Likewise.
1944 (GCJH_TARGET_INSTALL_NAME): Removed.
1945 (java/gjavah-jni.o): Removed.
1946 (java/gjavah.o): Likewise.
1947 * config-lang.in (stagestuff): Removed gjnih, gcjh.
1948 * gjavah.c: Removed.
1949
1950 2006-10-17 Tom Tromey <tromey@redhat.com>
1951
1952 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1953 "string" case.
1954
1955 2006-10-17 Tom Tromey <tromey@redhat.com>
1956
1957 * jvgenmain.c (main): Handle -findirect-dispatch.
1958 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1959 jvgenmain.
1960
1961 2006-10-06 Andrew Haley <aph@redhat.com>
1962
1963 * builtins.c (compareAndSwapInt_builtin): Check that we really do
1964 have a compare_and_swap builtin.
1965 (compareAndSwapLong_builtin): Likewise.
1966 (compareAndSwapObject_builtin): Likewise.
1967
1968 2006-10-04 Andrew Haley <aph@redhat.com>
1969
1970 * builtins.c (java_builtins): Add compareAndSwapInt,
1971 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1972 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1973 putObjectVolatile, getObjectVolatile, getIntVolatile,
1974 getLongVolatile, getLong.
1975 (UNMARSHAL3): New macro.
1976 (UNMARSHAL4): Likewise.
1977 (UNMARSHAL5): Likewise.
1978 (build_arglist_for_builtin): New function.
1979 (build_addr_sum, build_check_this): New functions.
1980 (putObject_builtin. compareAndSwapInt_builtin,
1981 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1982 putVolatile_builtin, getVolatile_builtin): New builtins.
1983
1984 2006-06-08 Andrew Haley <aph@redhat.com>
1985
1986 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1987 get_symbol_table_index().
1988 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1989 private method.
1990 (build_known_method_ref): New arg: special. Pass it to
1991 get_symbol_table_index.
1992 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1993 the method list.
1994 (build_invokevirtual): New arg: special. Pass it to
1995 get_symbol_table_index.
1996 (expand_invoke): New variable: special.
1997 Pass it to maybe_rewrite_invocation().
1998 Pass it to build_known_method_ref().
1999 * class.c (build_symbol_entry): Add new arg: special. Use it to
2000 build the symbol table conbstructor.
2001 (emit_symbol_table): Extract SPECIAL from the method list and pass
2002 it to build_symbol_entry().
2003 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2004 special accordingly.
2005
2006 2006-09-08 Andrew Haley <aph@redhat.com>
2007
2008 * class.c (layout_class_method): Use build_java_signature, not
2009 build_java_argument_signature. Use lookup_java_method, not
2010 lookup_argument_method.
2011
2012 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2013 Bryce McKinlay <bryce@mckinlay.net.nz>
2014
2015 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2016
2017 2006-07-18 Tom Tromey <tromey@redhat.com>
2018
2019 * lang.opt: Added missing -W options.
2020
2021 2006-07-12 Tom Tromey <tromey@redhat.com>
2022
2023 PR java/28329:
2024 * lang-specs.h: Pass '%U'-based options as separate arguments.
2025 Use -faux-classpath.
2026 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2027 * lang.opt (faux-classpath): New option.
2028
2029 2006-07-07 Tom Tromey <tromey@redhat.com>
2030
2031 * class.c (make_class_data): Set value for reflection_data field.
2032 * decl.c (java_init_decl_processing): Add reflection_data field.
2033
2034 2006-07-07 Tom Tromey <tromey@redhat.com>
2035
2036 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2037 earlier.
2038 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2039
2040 2006-07-07 Andrew Haley <aph@redhat.com>
2041
2042 * jcf-parse.c (set_source_filename): Don't check for
2043 CLASS_FROM_CURRENTLY_COMPILED_P.
2044 Remove // comments.
2045
2046 2006-07-07 Andrew Haley <aph@redhat.com>
2047
2048 * java-tree.h (java_read_sourcefilenames): Declare.
2049 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2050 * lang.opt (fsource-filename): New opt.
2051 * lang-specs.h: Add -fsource-filename.
2052 * jcf-parse.c (num_files, filenames): New variables.
2053 (reverse, cmpstringp, java_read_sourcefilenames,
2054 find_sourcefile): New.
2055 (set_source_filename): Call find_sourcefile to find the real name
2056 of a source file.
2057
2058 2006-06-27 Tom Tromey <tromey@redhat.com>
2059
2060 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2061 Signature, LocalVariableTypeTable, annotation attributes.
2062 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2063 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2064 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2065 (HANDLE_METHOD): Likewise.
2066 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2067 (print_annotation): New function.
2068 (print_element_value): Likewise.
2069 (indent): Likewise.
2070 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2071 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2072 (print_parameter_annotations): New function.
2073 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2074 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2075 Likewise.
2076 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2077 (print_annotations): New function.
2078
2079 2006-06-23 Tom Tromey <tromey@redhat.com>
2080
2081 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2082 emitting class files, always use 1.5.
2083 * gcj.texi (Input Options): Document -fsource.
2084 (Code Generation): Document -ftarget.
2085
2086 2006-06-21 Tom Tromey <tromey@redhat.com>
2087
2088 PR java/28089:
2089 * expr.c (expand_java_field_op): Initialize field's declaring
2090 class.
2091
2092 2006-06-20 Tom Tromey <tromey@redhat.com>
2093
2094 * expr.c (push_value): Always flush quick stack.
2095
2096 2006-06-19 Tom Tromey <tromey@redhat.com>
2097
2098 * expr.c (push_value): Also flush quick stack if value is a
2099 component_ref.
2100
2101 2006-06-19 Tom Tromey <tromey@redhat.com>
2102
2103 * expr.c (push_value): Flush quick stack if value has side
2104 effects.
2105
2106 2006-06-13 Tom Tromey <tromey@redhat.com>
2107
2108 * class.c (is_compiled_class): Explicitly check for current
2109 class.
2110
2111 2006-06-09 Tom Tromey <tromey@redhat.com>
2112
2113 * gjavah.c (decompile_method): Don't decompile a static field
2114 accessor method.
2115
2116 2006-06-06 Tom Tromey <tromey@redhat.com>
2117
2118 * lang-specs.h <jc1>: Add .jar file to command line if
2119 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2120
2121 2006-06-05 Tom Tromey <tromey@redhat.com>
2122
2123 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2124 synthetic, enum, annotation.
2125 * jcf.h (ACC_BRIDGE): New macro.
2126 (ACC_VARARGS): Likewise.
2127 (ACC_SYNTHETIC): Likewise.
2128 (ACC_ENUM): Likewise.
2129 (ACC_ANNOTATION): Likewise.
2130
2131 2006-06-04 Tom Tromey <tromey@redhat.com>
2132
2133 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2134 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2135 and -ftarget.
2136 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2137 when needed. Handle classpath-setting.
2138 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2139 * lang-specs.h: Rewrote.
2140
2141 2006-06-04 Tom Tromey <tromey@redhat.com>
2142
2143 * jcf-io.c (find_class): Set source_ok to 0.
2144 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2145 (parse_class_file): Don't call java_mark_class_local.
2146 (java_parse_file): Skip .java files. Call java_mark_class_local
2147 before lowering any code.
2148 (parse_zip_file_entries): Don't call duplicate_class_warning
2149 here.
2150 (process_zip_dir): ... call it here.
2151 * class.c (add_field): Don't mark field external if it is being
2152 compiled into this object.
2153 (make_class_data): Handle situation where class_dtable_decl is
2154 created before Class is compiled.
2155 (is_compiled_class): Don't assume files in zip are compiled into
2156 this object.
2157 (layout_class_method): Don't mark method external if it is being
2158 compiled into this object.
2159
2160 2006-06-04 Tom Tromey <tromey@redhat.com>
2161
2162 * jcf-path.c (jcf_path_compute): New function.
2163 * jcf.h (jcf_path_compute): Declare.
2164
2165 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2166
2167 * decl.c: Include langhooks.h.
2168 (builtin_function): Remove.
2169 (java_init_decl_processing): Replace calls to builtin_function
2170 with add_builtin_function.
2171 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2172 (java/decl.o): Depend on langhooks.h.
2173 * java-tree.h (builtin_function): Remove.
2174
2175 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2176
2177 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2178
2179 2006-09-12 Tom Tromey <tromey@redhat.com>
2180
2181 * expr.c (push_value): Always flush quick stack.
2182
2183 2006-09-12 Tom Tromey <tromey@redhat.com>
2184
2185 PR java/29013:
2186 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2187 the push of the called method's return result.
2188
2189 2006-09-12 Tom Tromey <tromey@redhat.com>
2190
2191 * jvspec.c (lang_specific_driver): Read spec file even if
2192 -fsyntax-only.
2193
2194 2006-09-12 Tom Tromey <tromey@redhat.com>
2195
2196 PR java/28754:
2197 * expr.c (expand_java_field_op): Initialize field's declaring
2198 interface if necessary.
2199
2200 2006-09-12 Tom Tromey <tromey@redhat.com>
2201
2202 PR java/28892:
2203 * expr.c (expand_java_field_op): No error for assignments not in
2204 class initializer or constructor.
2205
2206 2006-08-22 Andrew Haley <aph@redhat.com>
2207
2208 * decl.c (java_add_stmt): Give the statement list a type.
2209
2210 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2211 Bryce McKinlay <bryce@mckinlay.net.nz>
2212
2213 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2214
2215 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
2216
2217 PR java/8923
2218 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2219 or '--' is used with a constant operand.
2220 (java_complete_lhs): When processing a '++' or '--' expression,
2221 don't call java_complete_tree but java_complete_lhs, so that a
2222 static final variable operand is never replaced by its value. This
2223 avoids an ICE later on.
2224 (patch_unaryop): Fixed typo in comment.
2225
2226 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2227
2228 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2229
2230 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2231
2232 * builtins.c (check_for_builtin): If a builtin could result in a
2233 direct call being generated, don't use it if flag_indirect_dispatch
2234 is set.
2235
2236 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2237
2238 * gcj.texi (Invocation): Corrections for Invocation API example.
2239
2240 2006-07-04 Andrew Haley <aph@redhat.com>
2241
2242 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2243 entry.
2244
2245 2006-06-21 Andrew Haley <aph@redhat.com>
2246
2247 * java-tree.h (update_aliases): Remove
2248 * expr.c (expand_iinc): Remove call to update_aliases().
2249 (STORE_INTERNAL): Likewise.
2250 * decl.c (update_aliases, initialize_local_variable)
2251 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2252
2253 2006-06-19 Andrew Haley <aph@redhat.com>
2254
2255 PR java/1305
2256 PR java/27908
2257 * expr.c (java_modify_addr_for_volatile): New function.
2258 (expand_java_field_op): Handle volatile fields.
2259 * java-gimplify.c (java_gimplify_component_ref): Call
2260 java_modify_addr_for_volatile to give the field_ref the correct
2261 volatile type.
2262 (java_gimplify_modify_expr): Likewise.
2263 * java-tree.h (java_modify_addr_for_volatile): New decl.
2264
2265 2006-06-17 Karl Berry <karl@gnu.org>
2266
2267 * gcj.texi (@dircategory): Use "Software development" instead
2268 of "Programming", following the Free Software Directory.
2269
2270 2006-06-16 Andrew Haley <aph@redhat.com>
2271
2272 * class.c (make_class_data): When using flag_indirect_classes,
2273 don't initialize the vtable of Class instances.
2274
2275 2006-06-09 Andrew Haley <aph@redhat.com>
2276
2277 PR java/1305
2278 PR java/27908
2279 * builtins.c (initialize_builtins): Add __sync_synchronize().
2280 * class.c (add_field): Mark volatile fields.
2281 * java-gimplify.c (java_gimplify_expr): Call new functions to
2282 handle self-modifying exprs and COMPONENT_REFs.
2283 (java_gimplify_component_ref): New.
2284 (java_gimplify_modify_expr): Add handling for volatiles.
2285
2286 2006-06-08 Tom Tromey <tromey@redhat.com>
2287
2288 * gcj.texi (libgcj Runtime Properties): Document
2289 gnu.gcj.user.realname.
2290
2291 2006-06-08 Andrew Haley <aph@redhat.com>
2292
2293 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2294 get_symbol_table_index().
2295 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2296 private method.
2297 (build_known_method_ref): New arg: special. Pass it to
2298 get_symbol_table_index.
2299 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2300 the method list.
2301 (build_invokevirtual): New arg: special. Pass it to
2302 get_symbol_table_index.
2303 (expand_invoke): New variable: special.
2304 Pass it to maybe_rewrite_invocation().
2305 Pass it to build_known_method_ref().
2306 * class.c (build_symbol_entry): Add new arg: special. Use it to
2307 build the symbol table conbstructor.
2308 (emit_symbol_table): Extract SPECIAL from the method list and pass
2309 it to build_symbol_entry().
2310 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2311 special accordingly.
2312
2313 2006-06-06 David Daney <ddaney@avtrex.com>
2314
2315 * gcj.texi (libgcj Runtime Properties): Document
2316 gnu.gcj.runtime.NameFinder.show_raw and
2317 gnu.gcj.runtime.NameFinder.remove_unknown.
2318
2319 2006-06-06 Tom Tromey <tromey@redhat.com>
2320
2321 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2322 synthetic, enum, annotation.
2323 * jcf.h (ACC_BRIDGE): New macro.
2324 (ACC_VARARGS): Likewise.
2325 (ACC_SYNTHETIC): Likewise.
2326 (ACC_ENUM): Likewise.
2327 (ACC_ANNOTATION): Likewise.
2328
2329 2006-06-06 Mike Stump <mrs@apple.com>
2330
2331 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2332 installing during build.
2333
2334 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
2335
2336 * gcj.texi (Extensions): Document the new gcj-dbtool-based
2337 classname-to-library resolution mechanism.
2338 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2339 mechanism deprecated.
2340 (libgcj Runtime Properties): Document
2341 gnu.gcj.runtime.VMClassLoader.library_control's new default.
2342
2343 2006-05-29 Jakub Jelinek <jakub@redhat.com>
2344
2345 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2346 bit wide type.
2347 (jword): Define to uint64 on 64-bit arches.
2348 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2349
2350 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2351
2352 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2353 typos.
2354
2355 2006-05-26 Tom Tromey <tromey@redhat.com>
2356
2357 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2358 * verify-glue.c (vfy_class_type): New function.
2359 * verify-impl.c (check_constant): Allow 'ldc class'.
2360 * verify.h (vfy_class_type): Declare.
2361
2362 2006-05-25 Andrew Haley <aph@redhat.com>
2363
2364 PR java/27756
2365 * decl.c (maybe_pushlevels): When variable ranges are non-nested
2366 update all lifetimes, not just the first one.
2367
2368 2006-05-24 Tom Tromey <tromey@redhat.com>
2369
2370 * java-tree.h: Fixed flag documentation.
2371
2372 2006-05-24 Tom Tromey <tromey@redhat.com>
2373
2374 PR libgcj/27729:
2375 * jcf.h (ACC_INVISIBLE): Changed value.
2376
2377 2006-05-24 Andrew Haley <aph@redhat.com>
2378
2379 PR java/27754
2380 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2381 COMPOUND_EXPR.
2382
2383 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2384
2385 * lang.opt (femit-class-file): Remove VarExists.
2386
2387 2006-05-16 Tom Tromey <tromey@redhat.com>
2388
2389 * verify-impl.c (verify_instructions_0) <op_return>: Special case
2390 for Object.<init>.
2391
2392 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2393
2394 PR driver/26885
2395 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2396 $(GCC_OBJS).
2397
2398 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
2399
2400 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2401 (java/expr.o): Replace target.h with $(TARGET_H).
2402 (java/parse.o): Likewise.
2403
2404 2006-05-10 Andrew Haley <aph@redhat.com>
2405
2406 * class.c (emit_indirect_register_classes): Fix comment.
2407
2408 2006-05-04 Tom Tromey <tromey@redhat.com>
2409
2410 * java-tree.h (uses_jv_markobj_p): Declare.
2411 * class.c (uses_jv_markobj_p): Removed.
2412 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2413 (get_boehm_type_descriptor): Use it.
2414 (uses_jv_markobj_p): Moved from class.c. Return bool.
2415
2416 2006-05-04 Tom Tromey <tromey@redhat.com>
2417
2418 * java-tree.def (THIS_EXPR): Now a tcc_expression.
2419
2420 2006-05-04 Andrew Haley <aph@redhat.com>
2421
2422 * class.c (make_field_value): Always build_address_of fdecl if
2423 there is an initializer.
2424
2425 2006-05-03 Andrew Haley <aph@redhat.com>
2426
2427 PR libgcj/27352
2428 * expr.c (maybe_rewrite_invocation): New function.
2429 (rewrite_arglist_getclass): Likewise.
2430 (rules): New.
2431 (expand_invoke): Call maybe_rewrite_invocation.
2432 * parse.y (patch_invoke): Likewise.
2433 * java-tree.h: (maybe_rewrite_invocation): New function.
2434
2435 2006-04-21 Andrew Haley <aph@redhat.com>
2436
2437 * lang.c (java_init): Handle flag_indirect_classes.
2438 * jvgenmain.c: Use "class$$" instead of "class$".
2439 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2440 DECLs.
2441 (mangle_class_field): Special case "class$$" as well as "class$".
2442 * constants.c (build_ref_from_constant_pool): If
2443 flag_indirect_classes, generate a ref into the heap.
2444 * decl.c (constants_field_decl_node,
2445 constants_data_field_decl_node): New.
2446 * class.c (build_static_class_ref): New.
2447 (build_classdollar_field): Factor out from build_class_ref().
2448 (make_field_value): Handle static fields in heap.
2449 (make_class_data): Make sure we get a static ref to class.
2450 Make class initializer const if flag_indirect_classes.
2451 (register_class): Build a class_ref for initialization if
2452 flag_indirect_classes.
2453 (emit_indirect_register_classes): New.
2454
2455 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
2456
2457 * expr.c, gjavah.c: Fix comment typos.
2458
2459 2006-04-03 Andrew Haley <aph@redhat.com>
2460
2461 PR java/26858
2462 * expr.c (build_field_ref): Don't check the field offset if
2463 flag_syntax_only.
2464
2465 2006-03-30 Andrew Haley <aph@redhat.com>
2466
2467 PR java/26858
2468 * lang.c (java_attribute_table): New.
2469 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2470 * expr.c (build_field_ref): Add a null pointer check for all
2471 fields of offset > 4k. Don't do so for accesses via the this
2472 pointer, which we know can never be null.
2473 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2474 methods nonnull.
2475
2476 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
2477
2478 * Make-lang.in: Rename docdir to gcc_docdir.
2479
2480 2006-03-30 Tom Tromey <tromey@redhat.com>
2481
2482 PR java/26042:
2483 * parse.y (java_reorder_fields): Reset superclass field's size as
2484 well.
2485
2486 2006-03-28 Tom Tromey <tromey@redhat.com>
2487
2488 PR java/26390:
2489 * parse.y (find_most_specific_methods_list): Added 'class'
2490 argument.
2491 (lookup_method_invoke): Updated.
2492
2493 2006-03-15 Tom Tromey <tromey@redhat.com>
2494
2495 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2496 non-static method calls.
2497
2498 2006-03-15 David Daney <ddaney@avtrex.com>
2499
2500 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2501 declaration.
2502
2503 2006-03-15 David Daney <ddaney@avtrex.com>
2504
2505 * lang.opt (-freduced-reflection): New option.
2506 * lang.c (java_post_options): Generate an error if
2507 -freduced-reflection used with -fjni or -findirect-dispatch.
2508 * java-tree.h (flag_reduced_reflection): Declare new variable.
2509 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2510 if bitmap overflows and flag_reduced_reflection set.
2511 * class.c (uses_jv_markobj_p): New function.
2512 (make_class_data): Moved generation of vtable to before
2513 reflection data, generate less reflection data if
2514 flag_reduced_reflection set.
2515 * gcj.texi: Document -freduced-reflection.
2516
2517 2006-03-15 Tom Tromey <tromey@redhat.com>
2518
2519 PR java/26638:
2520 * class.c (get_interface_method_index): Don't put <clinit> into
2521 interface table.
2522
2523 2006-03-15 Tom Tromey <tromey@redhat.com>
2524
2525 * parse.y (analyze_clinit_body): Ignore empty statements.
2526
2527 2006-03-08 David Daney <ddaney@avtrex.com>
2528
2529 * gcj.texi: Document -static-libgcj option.
2530
2531 2006-02-20 Andrew Haley <aph@redhat.com>
2532
2533 * jcf-parse.c (parse_class_file): Set input_location from
2534 current_class.
2535
2536 2006-02-15 Andrew Haley <aph@redhat.com>
2537
2538 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2539 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2540 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2541
2542 2006-02-09 Andrew Haley <aph@redhat.com>
2543
2544 PR java/26192
2545 * expr.c (expand_invoke): Allow methods in arrays to be resolved
2546 in their superclass.
2547
2548 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2549 array types.
2550
2551 2006-02-08 Tom Tromey <tromey@redhat.com>
2552
2553 PR java/22578:
2554 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2555 * builtins.c (convert_real): New function.
2556 (java_builtins): Handle Float.intBitsToFloat,
2557 Float.floatToRawIntBits, Double.longBitsToDouble,
2558 Double.doubleToRawLongBits.
2559
2560 2006-02-07 Andrew Haley <aph@redhat.com>
2561
2562 * expr.c (expand_invoke): (BC mode.) If we find a method in a
2563 class other than the one in which we expected to find it, ignore
2564 the result.
2565
2566 PR java/25535
2567 * constants.c (build_constants_constructor): move initializer into
2568 first halfword on a 64-bit big-endian machine.
2569
2570 2006-02-04 Tom Tromey <tromey@redhat.com>
2571
2572 PR java/25676:
2573 * builtins.c (max_builtin): Skip floating point 'max'.
2574 (min_builtin): Skip floating point 'min'.
2575 (check_for_builtin): Never return NULL_TREE.
2576
2577 2006-02-04 Tom Tromey <tromey@redhat.com>
2578
2579 PR java/26097:
2580 * expr.c (push_type): Avoid side effect in gcc_assert.
2581
2582 2006-02-04 Roger Sayle <roger@eyesopen.com>
2583
2584 * decl.c (java_init_decl_processing): Create char_type_node as a
2585 regular INTEGER_TYPE node.
2586 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2587 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2588 test for char_type_node and promoted_char_type_node as special
2589 instances of INTEGER_TYPE tree codes.
2590 (promote_type,build_java_signature): Likewise.
2591 * jcf-write.c (adjust_typed_op): Likewise.
2592 * mangle.c (mangle_type): Likewise.
2593 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2594 * parse.h (JINTEGRAL_TYPE_P): Likewise.
2595
2596 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
2597
2598 * expr.c (java_stack_swap): Revert gcc_assert patch.
2599
2600 2006-02-03 Ben Elliston <bje@au.ibm.com>
2601
2602 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2603 * typeck.c: Likewise.
2604 * verify-impl.c: Likewise.
2605 * class.c: Likewise.
2606 * decl.c: Likewise.
2607 * jcf-parse.c: Likewise.
2608 * constants.c: Likewise.
2609 * check-init.c: Likewise.
2610 * jcf-write.c: Likewise.
2611 * verify-glue.c: Likewise.
2612 * mangle.c: Likewise.
2613 * expr.c: Likewise.
2614 * lang.c: Likewise.
2615 * boehm.c: Likewise.
2616
2617 2006-02-01 Jan Hubicka <jh@suse.cz>
2618
2619 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2620 * lang.c (java_init_options): Set no_unit_at_a_time_default.
2621
2622 2006-01-30 Andrew Haley <aph@redhat.com>
2623
2624 PR java/21428
2625 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2626
2627 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
2628
2629 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2630 Update copyright notice dates.
2631
2632 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2633
2634 * jvspec.c (lang_specific_spec_functions): Remove.
2635
2636 2006-01-06 Tom Tromey <tromey@redhat.com>
2637
2638 * gcj.texi (Arrays): Added more documentation for
2639 JvNewObjectArray.
2640 (Primitive types): Correct information about primitive classes.
2641 (Reference types): New node.
2642 (Index): New node.
2643
2644 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
2645
2646 * jcf-parse.c (set_source_filename): Set the decl source location
2647 even when returning early.
2648
2649 2005-12-15 Tom Tromey <tromey@redhat.com>
2650 Andrew Haley <aph@redhat.com>
2651
2652 PR java/25429
2653 * parse.y (resolve_expression_name): Don't generate accessor
2654 methods for constant fields.
2655
2656 2005-12-13 Andrew Haley <aph@redhat.com>
2657
2658 PR java/25366
2659 PR java/25368
2660 * class.c (maybe_layout_super_class): Update current_class before
2661 calling do_resolve_class.
2662
2663 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
2664
2665 PR java/25330
2666 * jcf-write.c (write_classfile): Use PID in temporary class
2667 file. Save/restore errno when reporting error.
2668
2669 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
2670
2671 PR java/9861
2672 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2673 to bare_function_type and including the return type
2674 * builtins.c (initialize_builtins) : Change builtin mangled name
2675 constants to conform to new mangling scheme
2676
2677 2005-12-08 Andrew Haley <aph@redhat.com>
2678
2679 PR libgcj/25265
2680 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2681 (soft_abstractmethod_node): New.
2682 * expr.c (build_field_ref): Add in-line check for missing field.
2683 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2684
2685 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2686
2687 * Make-lang.in (java.all.build, java.install-normal): Remove.
2688
2689 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2690
2691 * Make-lang.in: Remove all dependencies on s-gtype, except for
2692 gt-java-parse.h.
2693
2694 2005-12-07 Richard Sandiford <richard@codesourcery.com>
2695
2696 * class.c (build_utf8_ref, emit_register_classes): Use
2697 switch_to_section and get_section.
2698
2699 2005-12-06 Tom Tromey <tromey@redhat.com>
2700
2701 PR java/25283:
2702 * parse.y (patch_new_array_init): Revert previous patch.
2703 (lookup_method_invoke): Use size-less array type when creating an
2704 anonymous constructor.
2705
2706 2005-12-05 Tom Tromey <tromey@redhat.com>
2707
2708 * parse.y (patch_new_array_init): Don't set length on array.
2709
2710 2005-12-02 Richard Guenther <rguenther@suse.de>
2711
2712 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2713 buildN instead of build.
2714 * class.c (finish_class): Likewise.
2715 * expr.c (java_create_object): Likewise.
2716
2717 2005-11-28 Tom Tromey <tromey@redhat.com>
2718
2719 PR java/18278:
2720 * expr.c (build_jni_stub): Unwrap the return value.
2721 * java-tree.h (soft_unwrapjni_node): New define.
2722 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2723 * decl.c (java_init_decl_processing): Initialize
2724 soft_unwrapjni_node.
2725
2726 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
2727
2728 * gcj.texi (gij options): Add -Xss documentation.
2729
2730 2005-11-08 Wil Mahan <wmahan@gmail.com>
2731
2732 PR java/23617
2733 * zextract.c (read_zip_archive): Fix out of memory error when
2734 reading jar files with zip-style comments.
2735
2736 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
2737
2738 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2739 formats.
2740 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2741
2742 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
2743 Wil Mahan <wmahan@gmail.com>
2744
2745 PR java/23620
2746 * class.c (make_class): Create empty binfo here.
2747 (set_super_info): Only create binfo if we have superclasses.
2748
2749 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
2750
2751 PR java/24127
2752 * parse.y (method_header): Make the result of the rule a NULL_TREE
2753 when a parsing error occurs.
2754
2755 2005-09-29 Tom Tromey <tromey@redhat.com>
2756
2757 PR java/24120:
2758 * jcf-io.c (memoized_dirlist_hash): New function.
2759 (caching_stat): Use it.
2760
2761 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
2762
2763 PR java/21418
2764 * class.c (inherits_from_p): Try to lay out super class
2765 if it is not already laid out.
2766 (maybe_layout_super_class): Handle the case where SUPER_CLASS
2767 is a NULL_TREE.
2768
2769 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
2770
2771 * builtins.c (max_builtin, min_builtin, abs_builtin,
2772 java_build_function_call_expr): Use fold_buildN.
2773 * class.c (layout_class_method): Likewise.
2774 * expr.c (java_truthvalue_conversion, build_java_jsr,
2775 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2776 build_java_binop, build_field_ref, expand_compare,
2777 build_known_method_ref, build_invokevirtual,
2778 process_jvm_instruction): Likewise.
2779 * parse.y (patch_binop, patch_exit_expr): Likewise.
2780 * typeck.c (convert_ieee_real_to_integer): Likewise.
2781 (convert): Don't call fold after convert_ieee_real_to_integer.
2782
2783 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
2784
2785 PR java/23891
2786 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
2787 the newly created type. Set import lists here, not in create_class.
2788 (jdep_resolve_class): Set current_class.
2789 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
2790 the current package context, not ctxp->package.
2791 (cicp_cache): Removed.
2792 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2793 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2794 * java-tree.h (TYPE_PACKAGE): New macro.
2795 (struct lang_type): New member 'package'.
2796
2797 2005-09-09 Andrew Haley <aph@redhat.com>
2798
2799 PR libgcj/23182
2800 * expr.c (pop_type_0): If the expected type is object or ptr
2801 (i.e. void*), return the type of the object we just popped from
2802 the stack.
2803
2804 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
2805
2806 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2807 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2808
2809 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
2810
2811 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2812 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2813 typos. Follow spelling conventions.
2814
2815 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
2816
2817 PR java/23431
2818 * typeck.c (lookup_do): Look up interfaces for the original class,
2819 not the base class.
2820 * parse.y (java_check_regular_methods): Fix diagnostic message for
2821 more restrictive overriding of a method from an interface.
2822
2823 2005-08-16 Tom Tromey <tromey@redhat.com>
2824
2825 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2826 class' initial state.
2827
2828 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
2829
2830 PR java/22113
2831 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2832 `literal_token' for large numeric input tokens.
2833
2834 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
2835
2836 PR java/19870
2837 * parse.y (nested_field_access_p): Rename to nested_member_access_p
2838 and expand to handle method accesses across nested classes.
2839 (build_outer_method_access_method): Rename to
2840 build_nested_method_access_method. Minor adjustments to comments.
2841 (resolve_expression_name): Use the newly-renamed
2842 nested_member_access_p method.
2843 (resolve_qualified_expression_name): Likewise.
2844 (patch_method_invocation): Also consider static methods for access
2845 method generation. Minor adjustments to comments.
2846 (maybe_use_access_method): Use the more general
2847 nested_memeber_access_p to determine access across nested class
2848 boundaries. Allow THIS_ARG to be NULL (for static methods).
2849
2850 2005-08-15 Tom Tromey <tromey@redhat.com>
2851
2852 PR java/23300.
2853 * expr.c (build_field_ref): Don't generate otable reference when
2854 DECL_FIELD_OFFSET is 0.
2855 * class.c (maybe_layout_super_class): Pass outer class to
2856 do_resolve_class.
2857
2858 2005-08-15 Tom Tromey <tromey@redhat.com>
2859
2860 * java-tree.h (LABEL_IN_SUBR): Removed.
2861 (LABEL_IN_SUBR): Likewise.
2862 (LABEL_IS_SUBR_START): Likewise.
2863 (LABEL_SUBR_START): Likewise.
2864 (LABEL_SUBR_CONTEXT): Likewise.
2865 (LABEL_CHANGED): Likewise.
2866 (LABEL_RETURN_LABEL): Likewise.
2867 (LABEL_RETURN_TYPE_STATE): Likewise.
2868 (LABEL_RETURN_LABELS): Likewise.
2869 (RETURN_MAP_ADJUSTED): Likewise.
2870 (LABEL_PENDING_CHAIN): Likewise.
2871
2872 2005-08-15 Tom Tromey <tromey@redhat.com>
2873
2874 * Make-lang.in (JAVA_OBJS): Removed verify.o
2875 (java/verify.o): Removed.
2876 * verify.c: Removed.
2877 * lang.c (flag_new_verifier): Removed.
2878 (java_post_options): Updated.
2879 * java-tree.h (flag_new_verifier): Removed.
2880 (verify_jvm_instructions): Removed.
2881 * expr.c (pop_type_0): Assume flag_new_verifier is true.
2882 (build_java_check_indexed_type): Likewise.
2883 (expand_java_arraystore): Likewise.
2884 (expand_java_arrayload): Likewise.
2885 (pop_arguments): Likewise.
2886 (expand_byte_code): Likewise.
2887 (process_jvm_instruction): Likewise.
2888
2889 2005-08-10 Andrew Haley <aph@redhat.com>
2890
2891 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
2892 type mismatches to make legal GIMPLE.
2893
2894 2005-08-10 Robin Green <greenrd@greenrd.org>
2895
2896 PR java/23230:
2897 * parse.y (maybe_use_access_method): Generalize check from
2898 java.lang.Object to any superclass of current_class
2899
2900 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
2901
2902 * class.c (build_class_ref): Wrap the primary class type in a
2903 NOP_EXPR.
2904 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
2905 primary class type from the NOP_EXPR in which it was placed.
2906
2907 2005-07-28 Diego Novillo <dnovillo@redhat.com>
2908
2909 * expr.c (expand_load_internal): Fix missing parens in
2910 predicate.
2911
2912 2005-07-28 Andrew Haley <aph@redhat.com>
2913
2914 * expr.c (expand_load_internal): Convert to destination type.
2915
2916 2005-07-22 Manfred Hollstein <mh@suse.com>
2917
2918 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
2919 (check_constant): Likewise.
2920 (check_wide_constant): Likewise.
2921
2922 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
2923
2924 Make CONSTRUCTOR use VEC to store initializers.
2925 * check-init.c (check_init): Update to cope with VEC in
2926 CONSTRUCTOR_ELTS.
2927 * class.c (make_field_value, make_method_value, get_dispatch_table,
2928 make_class_data, emit_symbol_table, emit_catch_table,
2929 emit_assertion_table): Use build_constructor_from_list instead of
2930 build_constructor.
2931 * constants.c (build_constants_constructor): Likewise.
2932 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2933 VEC in CONSTRUCTOR_ELTS.
2934 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2935 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2936 of a TREE_LIST.
2937 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2938 CONSTRUCTOR_ELTS.
2939 * parse.y (build_new_array_init): Use build_constructor_from_list
2940 instead of build_constructor.
2941 (patch_new_array_init): Update to cope with VEC in
2942 CONSTRUCTOR_ELTS.
2943 (array_constructor_check_entry): Likewise.
2944
2945 2005-07-12 Tom Tromey <tromey@redhat.com>
2946
2947 * jvspec.c (lang_specific_driver): Put filelist_filename first on
2948 command line.
2949
2950 2005-07-12 Tom Tromey <tromey@redhat.com>
2951
2952 PR java/19674:
2953 * parse-scan.y (interface_member_declaration): Added
2954 empty_statement.
2955
2956 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
2957
2958 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2959 (LABEL_PENDING_CHAIN): Ditto.
2960 (LABEL_PC): Ditto.
2961 (DECL_BIT_INDEX): Ditto.
2962
2963 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
2964
2965 PR java/18119
2966 * parse.y (inner_class_accessible): New function. Logic moved from
2967 check_inner_class_access.
2968 (check_inner_class_access): Use inner_class_accessible.
2969 (resolve_inner_class): Simplify arguments. Create circularity hash
2970 here. Keep looking for classes if we found one that was inaccessible.
2971 Return the inaccessible class only if there is no other match.
2972 (do_resolve_class): Update for new resolve_inner_class arguments.
2973 Don't create circularity_hash here.
2974
2975 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
2976
2977 PR java/21045
2978 * parse.y (add_exception_to_throws): New function.
2979 (purge_unchecked_exceptions): Removed.
2980 (get_constructor_super): Renamed from verify_constructor_super. Now
2981 returns the super constructor after verification.
2982 (java_complete_expand_method): Don't use purge_unchecked_exceptions
2983 or save/restore the exception list.
2984 (check_thrown_exceptions): Add uncaught exceptions in anonymous
2985 class initializers and constructors to the throws clause of the method.
2986
2987 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
2988
2989 PR java/19674
2990 * parse.y (interface_member_declaration): Allow empty statements in
2991 interface declarations.
2992
2993 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
2994
2995 * Makefile.in (parse.o): Adjust dependencies.
2996 * parse.y: Include tree-dump.h.
2997
2998 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2999
3000 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3001 flag for quoting.
3002
3003 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3004
3005 * parse.y (issue_warning_error_from_context): Call
3006 pp_output_formatted_text to be able to get the buffer.
3007
3008 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3009
3010 * parse.y (issue_warning_error_from_context): Update for the
3011 renaming of pp_format_text to pp_format.
3012
3013 2005-06-28 Paul Brook <paul@codesourcery.com>
3014
3015 * decl.c (java_init_decl_processing): Call
3016 default_init_unwind_resume_libfunc.
3017
3018 2005-06-27 Tom Tromey <tromey@redhat.com>
3019
3020 PR java/21540, PR java/13788:
3021 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3022 fold_constant_for_init.
3023 (patch_binop): Added 'folding' argument. Updated all callers.
3024 (patch_unaryop) <NOP_EXPR>: New case.
3025 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3026 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3027
3028 2005-06-25 Jan Hubicka <jh@suse.cz>
3029
3030 * builtins.c (define_builtin): Accept new flags parameter.
3031 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3032
3033 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3034
3035 * all files: Update FSF address in copyright headers.
3036
3037 2005-06-24 Tom Tromey <tromey@redhat.com>
3038
3039 * verify-impl.c (verify_instructions_0): Correctly handle
3040 situation where PC falls off end.
3041
3042 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3043
3044 PR java/20697
3045 * parse.y (find_most_specific_methods_list): Remove special case for
3046 inner classes.
3047
3048 2005-06-15 Tom Tromey <tromey@redhat.com>
3049
3050 PR libgcj/21906:
3051 * class.c (make_method_value): Use soft_abstractmethod_node for
3052 abstract method.
3053 * java-tree.h (soft_abstractmethod_node): New define.
3054 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3055 * decl.c (java_init_decl_processing): Initialize
3056 soft_abstractmethod_node.
3057
3058 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3059
3060 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3061
3062 2005-06-13 Per Bothner <per@bothner.com>
3063
3064 * expr.c (int highest_label_pc_this_method,
3065 start_label_pc_this_method): New globals.
3066 (lookup_label): Add start_label_pc_this_method to pc for label, and
3067 update highest_label_pc_this_method. This prevents conflicts between
3068 labels from different methods.
3069 * java-tree.h: Declare new globals.
3070 * jcf-parse.c (parse_class_file): If needed bump
3071 start_label_pc_this_method and reset highest_label_pc_this_method.
3072
3073 2005-06-13 Tom Tromey <tromey@redhat.com>
3074
3075 PR java/21844:
3076 * parse.y (nested_field_access_p): Handle case where outer field
3077 is inherited by enclosing class.
3078
3079 2005-06-12 Per Bothner <per@bothner.com>
3080
3081 * class.c (inherits_from_p): Do load_class if needed.
3082
3083 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3084
3085 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3086 * java-tree.h (parse_error_context): Move...
3087 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3088 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3089 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3090
3091 2005-06-08 Roger Sayle <roger@eyesopen.com>
3092
3093 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3094
3095 2005-06-06 Jakub Jelinek <jakub@redhat.com>
3096
3097 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3098 msgid for argument name.
3099 * gjavah.c (error): Likewise.
3100 * java-tree.h (parse_error_context): Likewise.
3101 * parse.y (parse_error_context, parse_warning_context,
3102 issue_warning_error_from_context): Likewise.
3103
3104 2005-06-01 Tom Tromey <tromey@redhat.com>
3105
3106 PR java/21722:
3107 * class.c (build_static_field_ref): Don't fold constant fields if
3108 current class is from a .class file and we're using indirect
3109 dispatch.
3110
3111 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3112
3113 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3114 * java/Make-lang.in: Updates dependencies.
3115
3116 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3117
3118 PR java/19870.
3119 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3120 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3121 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3122 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3123 * jcf-write.c (generate_classfile): Use
3124 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3125 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3126 * parse.y (build_outer_field_access): Rename to
3127 build_nested_field_access. Support static fields and outer-to-inner
3128 class accesses.
3129 (outer_field_access_p): Rename to nested_field_access_p. Support
3130 static fields and generalise to outer-to-inner class and sibling
3131 inner class accesses.
3132 (outer_field_expanded_access_p): Rename to
3133 nested_field_expanded_access_p and support static fields.
3134 (outer_field_access_fix): Rename to nested_field_access_fix and
3135 support static fields.
3136 (build_outer_field_access_expr): Rename to
3137 build_nested_field_access_expr and support static fields.
3138 (build_outer_field_access_methods): Rename to
3139 build_nested_field_access_methods and support static fields. For
3140 static fields, generate accessors without class instance parameters.
3141 (build_outer_field_access_method): Rename to
3142 build_nested_field_access_method and support static fields.
3143 (build_outer_method_access_method): Use
3144 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3145 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3146 (resolve_expression_name): Consider static field accesses across
3147 nested classes.
3148 (resolve_qualified_expression_name): Likewise.
3149 (java_complete_lhs): Use nested_field_access_fix instead of
3150 outer_field_access_fix.
3151 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3152 Use nested_field_expanded_access_p instead of
3153 outer_field_expanded_access_p. Use nested_field_access_fix instead
3154 of outer_field_access_fix.
3155 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3156 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3157
3158 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3159
3160 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3161 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3162 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3163 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3164 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3165 (parse_version): Calculate version ID using new method. Use bit-flags
3166 for flag_indirect_dispatch and flag_bootstrap_classes.
3167
3168 2005-05-25 Richard Henderson <rth@redhat.com>
3169
3170 PR libgcj/21692
3171 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3172 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3173 DECL_CONTEXT; avoid pushdecl_top_level.
3174 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3175 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3176 (layout_class_method): Likewise.
3177 * decl.c (java_mark_cni_decl_local): New.
3178 (java_mark_class_local): Use it.
3179 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3180 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3181 (struct lang_decl_func): Add local_cni;
3182 (struct lang_decl_var): Add class_field, vtable.
3183 (java_mangle_decl): Declare.
3184 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3185 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3186 (mangle_obstack_1): New.
3187 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
3188 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
3189 lhd_set_decl_assembler_name for things that don't need mangling.
3190 (mangle_class_field): Rename from java_mangle_class_field, make
3191 static, don't call init_mangling or finish_mangling.
3192 (mangle_vtable): Similarly.
3193 (mangle_local_cni_method_decl): New.
3194 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
3195 gcc_assert, and MANGLE_RAW_STRING.
3196 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3197
3198 2005-05-25 DJ Delorie <dj@redhat.com>
3199
3200 * class.c (set_constant_value): Move warning control from if() to
3201 warning(OPT_*).
3202
3203 2005-05-24 Richard Henderson <rth@redhat.com>
3204
3205 * builtins.c (define_builtin): Don't call make_decl_rtl.
3206 * constants.c (build_constant_data_ref): Likewise.
3207 * class.c (build_utf8_ref): Likewise.
3208 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3209 (get_dispatch_table, layout_class_method): Likewise.
3210 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3211 by hand.
3212 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3213 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3214 to determine if we need a non-zero address.
3215 * decl.c (builtin_function): Don't call make_decl_rtl.
3216 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3217 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3218 * resource.c (compile_resource_data): Likewise.
3219 * parse.y (resolve_field_access): Re-word comment to avoid
3220 building DECL_RTL.
3221
3222 2005-05-24 Richard Henderson <rth@redhat.com>
3223
3224 * class.c (registered_class): Take it out of class_roots; turn into
3225 a vec of trees.
3226 (register_class): Make static. Don't duplicate decl node. Use
3227 VEC_safe_push.
3228 (emit_register_classes): Use VEC_iterate. Use output_constant
3229 instead of assemble_integer. Don't call mark_decl_referenced
3230 directly.
3231 * java-tree.h (register_class): Remove decl.
3232
3233 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
3234
3235 PR java/17845
3236
3237 * parse.y (register_package, package_list): Remove.
3238 (package_declaration): Do not call register_package.
3239 (do_resolve_class): Do not use package_list.
3240
3241 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
3242
3243 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3244 unused variable.
3245
3246 2005-05-15 Tom Tromey <tromey@redhat.com>
3247
3248 PR java/21519:
3249 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3250 NOTE_PUSH.
3251
3252 2005-05-12 Aaron Luchko <aluchko@redhat.com>
3253
3254 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3255
3256 2005-05-11 Tom Tromey <tromey@redhat.com>
3257
3258 * gcj.texi (Code Generation): Document -fbootstrap-classes.
3259 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3260 (parse_version): Use it.
3261 * lang.opt (-fbootstrap-classes): New option.
3262
3263 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
3264
3265 PR java/21436
3266 * class.c (maybe_layout_super_class): Look for imports in this_class.
3267 * parse.h (ctxp_for_generation_last): New.
3268 (do_resolve_class): Add a parameter.
3269 * parse.y (ctxp_for_generation_last): New.
3270 (java_pop_parser_context): Add at end of list.
3271 (find_in_imports, find_in_imports_on_demand): Look in ctxp
3272 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3273 the given type are NULL.
3274 (do_resolve_class): Look into the imports of the new second parameter.
3275 Adjust recursive calls.
3276 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3277 calls to do_resolve_class.
3278 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3279 (java_complete_class): Do not do that here.
3280
3281 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
3282
3283 PR java/20309
3284 * Make-lang.in (java): Add gjnih.
3285 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3286 (GJNIH_OBJS): New variable.
3287 (gjnih$(exeext)): New target.
3288 (JAVA_MANFILES): Add gjnih.1.
3289 (java.uninstall): Add gjnih.1.
3290 (java.mostlyclean): Add gjnih.
3291 (java.maintainer-clean): Add gjnih.1.
3292 (java/gjavah-jni.o): New target.
3293 (.INTERMEDIATE): Add gjnih.pod.
3294 (gjnih.pod): New target.
3295 * config-lang.in (stagestuff): Add gjnih.
3296 * gcj.texi (Top): Add gjnih node.
3297 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3298 -bootclasspath options.
3299 (Invoking gjnih): New node.
3300 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3301 (TOOLNAME): New macro.
3302 (error): Replace hard-coded gcjh with TOOLNAME.
3303 (process_file): Likewise.
3304 (usage): Likewise.
3305 (version): Likewise.
3306 (help): Likewise. Add help output for -force, -old, -trace and -J
3307 options.
3308 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3309 (options): Add force, old, trace and J fields.
3310 (main): Handle -force, -old, -trace and -J options.
3311
3312 2005-05-03 Tom Tromey <tromey@redhat.com>
3313
3314 PR java/21245:
3315 * gjavah.c (main): Unlink output file on error.
3316
3317 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
3318
3319 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3320 copyright.
3321
3322 2005-04-29 Tom Tromey <tromey@redhat.com>
3323
3324 * expr.c (build_jni_stub): Updated for change to build_block.
3325
3326 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
3327
3328 * expr.c (force_evaluation_order): Declare 'saved' earlier.
3329
3330 2005-04-28 Andrew Haley <aph@redhat.com>
3331
3332 PR java/19285
3333 * java-tree.h (soft_resolvepoolentry_node): New.
3334 (alloc_constant_fieldref): Declare.
3335 * expr.c (expand_java_field_op): Don't call class_init for
3336 accesses to static fields with indirect dispatch.
3337 * builtins.c (initialize_builtins): Add "__builtin_expect".
3338 * decl.c (soft_resolvepoolentry_node): New variable.
3339 (java_init_decl_processing): Create a decl for
3340 "_Jv_ResolvePoolEntry".
3341 * class.c (build_fieldref_cache_entry): New function.
3342 (build_static_field_ref): Rewrite for indirect dispatch.
3343 * constants.c (find_name_and_type_constant_tree): New function.
3344 (alloc_constant_fieldref): Likewise.
3345 (build_constants_constructor): Handle CONSTANT_Fieldref and
3346 CONSTANT_NameAndType.
3347
3348 PR java/21115
3349 * expr.c (force_evaluation_order): Convert outgoing args smaller
3350 than integer.
3351
3352 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
3353
3354 * gcj.texi (libgcj Runtime Properties): Remove obsolete
3355 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
3356 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3357
3358 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3359
3360 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3361 to `unlock_stream' with `unlock_std_streams'.
3362
3363 2005-04-25 Jakub Jelinek <jakub@redhat.com>
3364
3365 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3366 instead of just expr.h.
3367
3368 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3369
3370 * gjavah.c (main): Unlock the stdio streams.
3371 * jcf-dump.c (main): Likewise.
3372 * jv-scan.c (main): Likewise.
3373 * jvgenmain.c (main): Likewise.
3374
3375 2005-04-23 DJ Delorie <dj@redhat.com>
3376
3377 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3378 parse.y: Adjust warning() callers.
3379
3380 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
3381
3382 * gcj.texi (Object fields): Change "Integer" to "Int" in example
3383 contructor.
3384
3385 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
3386
3387 * gcj.texi: Fix typos and bogus example.
3388
3389 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
3390
3391 * except.c: Fix a comment typo.
3392
3393 2005-04-19 Julian Brown <julian@codesourcery.com>
3394
3395 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3396 indirect dispatch with PIC.
3397
3398 2005-04-18 Andrew Haley <aph@redhat.com>
3399
3400 * java-except.h (struct eh_range.handler): Remove unused field.
3401 (handle_nested_ranges): Remove function declaration.
3402 (sanity_check_exception_range): Add function declaration.
3403 * verify.c (verify_jvm_instructions): Remove call to
3404 handle_nested_ranges.
3405 * verify-glue.c (verify_jvm_instructions_new): Call
3406 sanity_check_exception_range.
3407 * except.c (link_handler, eh_range_freelist, link_handler,
3408 handle_nested_ranges): Remove.
3409 (add_handler): Rewrite.
3410 (sanity_check_exception_range): New function.
3411 (print_ranges): New function.
3412
3413 2005-04-13 Julian Brown <julian@codesourcery.com>
3414
3415 * decl.c (finish_method): Give methods once-only linkage.
3416
3417 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
3418
3419 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3420
3421 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3422
3423 * java-tree.h: Don't use PARAMS().
3424
3425 2005-04-07 Per Bothner <per@bothner.com>
3426
3427 * class.c (push_class): By default, suppress debug output.
3428 (finish_class): Enable debug output for classes we're emitting.
3429
3430 2005-04-07 Andrew Haley <aph@redhat.com>
3431
3432 * gcj.texi: Correct gcj-dbtool instructions.
3433
3434 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
3435
3436 * gcj.texi: Fix a typo.
3437 * lang.c: Fix a comment typo.
3438
3439 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
3440
3441 * gcj.texi (Invoking gij): Add descriptions of new -X options.
3442 Mention recognized-and-ignored compatibility options.
3443 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3444 JvFree.
3445 (About CNI): Add Memory allocation section.
3446
3447 2005-04-01 Tom Tromey <tromey@redhat.com>
3448
3449 * decl.c (java_init_decl_processing): Fix types of
3450 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3451 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3452 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3453
3454 2005-03-31 Jan Hubicka <jh@suse.cz>
3455
3456 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3457 * class.c: Include cgraph.h
3458 (make_local_functoin_alias): Mark aslias as needed.
3459 * resource.c: Include cgraph.h
3460 (compile_resource_data): Go via cgraph interface.
3461
3462 2005-03-30 Ian Lance Taylor <ian@airs.com>
3463
3464 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3465
3466 2005-03-30 Tom Tromey <tromey@redhat.com>
3467
3468 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3469 inner_class_info_index==0 or outer_class_info_index==0.
3470
3471 2005-03-29 Tom Tromey <tromey@redhat.com>
3472
3473 * gcj.texi (libgcj Runtime Properties): Document
3474 gnu.gcj.runtime.endorsed.dirs.
3475
3476 2005-03-24 Anthony Green <green@redhat.com>
3477
3478 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3479 'gcj-dbtool -p'.
3480
3481 2005-03-23 Tom Tromey <tromey@redhat.com>
3482
3483 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3484 (parse_version): Use it.
3485
3486 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
3487
3488 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3489
3490 2005-03-18 Andrew Haley <aph@redhat.com>
3491
3492 PR java/20522
3493 * decl.c (update_aliases): Don't update variables that are about
3494 to die.
3495 (maybe_poplevels): Add comment.
3496
3497 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
3498
3499 PR java/20502
3500 * jcf-parse.c (duplicate_class_warning): New function.
3501 (java_parse_file): Call duplicate_class_warning if
3502 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3503 (parse_zip_file_entries): Likewise. Also set
3504 CLASS_FROM_CURRENTLY_COMPILED_P.
3505
3506 2005-03-16 Andrew Haley <aph@redhat.com>
3507
3508 * expr.c (expand_java_arrayload): Don't generate a
3509 NullPointerException based on the type of the node.
3510 (build_java_array_length_access): Likewise.
3511
3512 2005-03-15 Zack Weinberg <zack@codesourcery.com>
3513
3514 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3515
3516 2005-03-11 Tom Tromey <tromey@redhat.com>
3517
3518 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3519 (libgcj Runtime Properties): Document the default .db.
3520
3521 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
3522
3523 PR java/20312
3524 * parse.y (checks_throws_clauses): Check exceptions list even when
3525 the base class does not come from a source file being compiled.
3526 (java_complete_lhs): Remove unused variable 'wfl'.
3527
3528 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
3529
3530 PR java/20338
3531 * decl.c (finish_method): Emit _Jv_InitClass for private static
3532 methods inside inner classes as well.
3533
3534 2005-03-08 Julian Brown <julian@codesourcery.com>
3535 * Revert patch from 2005-03-08 for causing bootstrap failure on
3536 ppc-darwin.
3537
3538 2005-03-08 Julian Brown <julian@codesourcery.com>
3539
3540 * decl.c (finish_method): Give methods once-only linkage.
3541
3542 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3543
3544 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3545
3546 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
3547
3548 * verify-glue.c (vfy_is_assignable_from): Perform static check using
3549 can_widen_reference_to if the C++ ABI is in use.
3550 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3551 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3552 type_isresolved, init_state, set_pc, state_get_pc,
3553 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3554 (verify_fail): Report the current PC from the verifier context.
3555 (free_state): Remove #if 0 block to enable this function.
3556 (free_verifier_context): Call free_state on state_list iterator
3557 values before freeing them.
3558 * expr.c (pop_type_0): Pop correct type for error message when stack
3559 contains a multi-word type.
3560
3561 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3562
3563 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3564 for known NULL array length access.
3565
3566 2005-03-07 Tom Tromey <tromey@redhat.com>
3567
3568 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3569
3570 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
3571
3572 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3573 typeck.c: Update copyright.
3574
3575 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
3576
3577 Remove xref code.
3578 * xref.c, xref.h: Remove file.
3579 * Make-lang.in (java/xref.o): Remove.
3580 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3581 * lang.c (flag_emit_xref): Remove definition.
3582 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3583 * typeck.c (convert): Remove use of do_not_fold.
3584 * parse.y (do_not_fold): Remove definition.
3585 (parser grammar): Remove xref code.
3586 (maybe_create_class_interface_decl, create_class): Likewise.
3587 (register_fields, method_header, finish_method_declaration): Likewise.
3588 (declare_local_variables, source_end_java_method): Likewise.
3589 (java_complete_expand_classes): Do not set do_not_fold.
3590 (java_complete_expand_method): Remove xref code.
3591 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3592 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3593 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3594 (patch_synchronized_statement, patch_throw_statement): Likewise.
3595 (maybe_build_class_init_for_field): Likewise.
3596
3597 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
3598
3599 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3600 instead of IS_NON_TYPE_CODE_CLASS.
3601
3602 2005-03-04 Andrew Haley <aph@redhat.com>
3603
3604 PR java/18362
3605 * class.c (set_method_index): Don't set method_index if it is
3606 NULL_TREE.
3607 (layout_class_method): Don't complain about "non-static method foo
3608 overrides static method" in the case of indirect dispatch.
3609
3610 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3611
3612 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3613 warning.
3614 * Make-lang.in: Don't elide warnings in jcf-io.c.
3615
3616 2005-03-01 Per Bothner <per@bothner.com>
3617
3618 PR java/8608
3619 * check-init.c (wfl): Remove static.
3620 (final_assign_error, check_init): Replace calls to parse_error_context
3621 by plain error.
3622 (check_init): Save, set, and restore input_location for each exp.
3623
3624 2005-03-01 Per Bothner <per@bothner.com>
3625
3626 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3627 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3628 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3629
3630 2005-03-01 Per Bothner <per@bothner.com>
3631
3632 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3633
3634 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
3635
3636 PR libgcj/16923
3637 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3638 JvVMOption.
3639
3640 2005-02-22 Tom Tromey <tromey@redhat.com>
3641
3642 PR java/20056:
3643 * verify-impl.c (EITHER): New define.
3644 (types_compatible): Handle it.
3645 (check_field_constant): Use it.
3646
3647 2005-02-18 Tom Tromey <tromey@redhat.com>
3648
3649 PR java/20056:
3650 * verify-impl.c (types_equal): Fixed test.
3651
3652 PR java/20056:
3653 * verify-glue.c (vfy_class_has_field): New function.
3654 * verify.h (vfy_class_has_field): Declare.
3655 * verify-impl.c (check_field_constant): Added 'putfield'
3656 argument.
3657 (verify_instructions_0): Updated.
3658 (types_equal): New function.
3659
3660 2005-02-14 Tom Tromey <tromey@redhat.com>
3661
3662 PR java/19921:
3663 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3664 stack effect of multianewarray.
3665
3666 2005-02-14 Andrew Haley <aph@redhat.com>
3667
3668 PR java/19907
3669 * expr.c (expand_byte_code): Call promote_arguments().
3670 (promote_arguments): New function.
3671 * decl.c (check_local_unnamed_variable): Remove special case for
3672 new verifier.
3673 (find_local_variable): Promote all boolean types to int
3674 when searching for local variable decls.
3675
3676 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
3677
3678 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3679 parse-scan.y: Update copyright.
3680
3681 2005-02-11 Per Bothner <per@bothner.com>
3682
3683 PR java/15543
3684 * parse-scan.y (input_location): Remove variable.
3685 (main_input_filename): New - replaces input_filename, which isn't
3686 settable if USE_MAPPED_LOCATION.
3687 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3688 so we don't reference input_location or wfl_operator in that case.
3689 * jv-scan.c (expand_location): Remove - no longer used.
3690 (main): Set main_input_filename rather than input_filename.
3691
3692 2005-02-09 Richard Henderson <rth@redhat.com>
3693
3694 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3695 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3696
3697 2005-02-08 Marcin Dalecki <martin@dalecki.de>
3698
3699 * expr.c (add_type_assertion): Use the proper enumeration type,
3700 since this is what htab_find_slot() is expecting.
3701
3702 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
3703
3704 * gcj.texi: Update copyright dates.
3705
3706 2005-02-02 Tom Tromey <tromey@redhat.com>
3707
3708 * gcj.texi (libgcj Runtime Properties): Default library_control
3709 to 'cache'.
3710
3711 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
3712
3713 PR java/15543
3714 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3715 (modifiers) when square brackets are present in a declaration for
3716 a final paramter.
3717 * jv-scan.c (main): Set input_filename and input_line.
3718
3719 2005-02-01 Tom Tromey <tromey@redhat.com>
3720
3721 PR java/19742:
3722 * gjavah.c (get_field_name): Don't override name for JNI header.
3723
3724 2005-02-01 Roger Sayle <roger@eyesopen.com>
3725
3726 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3727 of unsigned types using iushr and lushr JVM bytecodes.
3728
3729 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3730
3731 PR java/19738
3732 * gjavah.c (jni_print_float): Do not emit floating-point
3733 initialiser for a static final field.
3734 (jni_print_double): Likewise.
3735
3736 2005-02-01 Mark Mitchell <mark@codesourcery.com>
3737
3738 Revert:
3739 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3740 * gjavah.c (print_field_info): Mark static data members of
3741 floating-point type with "__extension__".
3742
3743 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3744
3745 * gjavah.c (print_field_info): Mark static data members of
3746 floating-point type with "__extension__".
3747
3748 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3749
3750 PR java/9157
3751 * parse.y (build_string_concatenation): Remove redundant if.
3752 (patch_conditional_expr): Attempt to patch_string() the condition
3753 of a ?: as well, in addition to its other operands.
3754
3755 2005-01-25 Tom Tromey <tromey@redhat.com>
3756
3757 * Make-lang.in (java/java-tree-inline.o): Removed.
3758
3759 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
3760
3761 PR java/19070
3762 * parse.y (patch_binop): Allow comparisons against NULL only
3763 if the other operand is of a reference type.
3764
3765 2005-01-24 Tom Tromey <tromey@redhat.com>
3766
3767 * java-tree.h (gcj_abi_version): Declare.
3768 * class.c (make_class_data): Push gcj_abi_version into "next"
3769 field. Renamed field.
3770 * decl.c (gcj_abi_version): New global.
3771 (parse_version): New function.
3772 (java_init_decl_processing): Call it. Renamed 'next' field.
3773 Include version.h.
3774 (GCJ_BINARYCOMPAT_ADDITION): New define.
3775
3776 2005-01-24 Roger Sayle <roger@eyesopen.com>
3777
3778 PR java/19295
3779 * jcf-write.c (generate_bytecode_insns): Conversions between
3780 integer types of the same precision shouldn't generate widening
3781 or narrowing conversion bytecodes.
3782
3783 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
3784
3785 * java-except.h, java-tree.h: Remove unused prototypes.
3786
3787 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
3788
3789 PR java/18091:
3790 * jcf-write.c (perform_relocations): Don't call memcpy if source
3791 and destination are the same.
3792
3793 2005-01-17 Tom Tromey <tromey@redhat.com>
3794
3795 * verify-impl.c (get_short): Sign extend.
3796 (get_int): Likewise.
3797
3798 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
3799
3800 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3801 with TYPE_SIZE.
3802
3803 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
3804
3805 * verify.c: Revert to the version before the BC-ABI merge.
3806
3807 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
3808
3809 PR java/19277
3810 * check-init.c (check_init): Take care of references that do not
3811 have an explicit final variable declaration (e.g. array length
3812 access) for pre/post in/de-crement operators.
3813
3814 2005-01-08 Mark Wielaard <mark@klomp.org>
3815
3816 * parse.y (process_imports): Allocate (and free) original_name only
3817 when not already defined.
3818 * jcf-parse.c (read_class): Free results of find_class() and
3819 lrealpath().
3820 (java_parse_file): Keep pointer to head of file_list and free when
3821 done. Free result of lrealpath().
3822
3823 2005-01-05 Tom Tromey <tromey@redhat.com>
3824
3825 * gcj.texi (Standard Properties): java.ext.dirs is now used.
3826
3827 2004-12-20 Andrew Haley <aph@redhat.com>
3828
3829 * typeck.c: Use fold_convert for ints and booleans.
3830
3831 2004-12-17 Andrew Haley <aph@redhat.com>
3832
3833 PR java/18931
3834 * typeck.c (convert): Use a CONVERT_EXPR when converting to
3835 BOOLEAN_TYPE or CHAR_TYPE.
3836 (convert_to_boolean, convert_to_char) : Remove.
3837 * convert.h (convert_to_boolean, convert_to_char) : Remove.
3838 * expr.c (expand_load_internal): Do type conversion if type is not
3839 as required.
3840
3841 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
3842
3843 PR target/18459
3844 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
3845 Update comment.
3846
3847 2004-12-07 Andrew Haley <aph@redhat.com>
3848
3849 PR java/18811:
3850 * jcf-parse.c (load_class): Remove sanity test for missing inner
3851 class file.
3852
3853 2004-12-06 Tom Tromey <tromey@redhat.com>
3854
3855 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
3856 (java.uninstall): Likewise.
3857 (java.maintainer-clean): Likewise.
3858 (.INTERMEDIATE): Likewise.
3859 (java.install-man): Likewise.
3860 (gcj-dbtool.pod): New target.
3861 * gcj.texi (Code Generation): Document -findirect-dispatch.
3862 (libgcj Runtime Properties): Document
3863 gnu.gcj.precompiled.db.path.
3864 (Top): Link to "Invoking gcj-dbtool".
3865
3866 2004-12-06 Tom Tromey <tromey@redhat.com>
3867
3868 PR java/14853:
3869 * java-tree.h (extract_field_decl): Declare.
3870 * parse.y (extract_field_decl): Renamed from
3871 strip_out_static_field_access_decl. No longer static.
3872 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
3873
3874 2004-12-03 Tom Tromey <tromey@redhat.com>
3875
3876 * lang.c (flag_new_verifier): Define.
3877 (java_post_options): Set flag_new_verifier if indirect dispatch
3878 is being used.
3879 * lang.opt (fnew-verifier): Removed.
3880
3881 2004-12-03 Tom Tromey <tromey@redhat.com>
3882
3883 PR bootstrap/14614:
3884 * Make-lang.in (java.install-common): Only install transformed
3885 gcjh if gcj-cross exists.
3886
3887 2004-12-03 Andrew Haley <aph@redhat.com>
3888
3889 PR java/18812
3890 * except.c (link_handler): Patch 'outer' field of siblings of the
3891 range we're demoting.
3892
3893 2004-12-03 Andrew Haley <aph@redhat.com>
3894
3895 PR java/18697
3896 * class.c (layout_class_method): Don't fail to override a method
3897 simply because it has DECL_ARTIFICIAL set.
3898
3899 2004-12-02 Tom Tromey <tromey@redhat.com>
3900
3901 PR java/16675:
3902 * parse.y (craft_constructor): Special case null_pointer_node.
3903
3904 2004-12-02 Tom Tromey <tromey@redhat.com>
3905
3906 PR java/18741:
3907 * java-gimplify.c (java_gimplify_expr): Don't call
3908 SET_EXPR_LOCATION unless wrapped tree is an expression.
3909
3910 2004-11-27 Per Bothner <per@bothner.com>
3911
3912 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
3913 Fix fencepost error in 'i', which got executed one too many times.
3914 Also, fold memcpy into explicit loop, as originally intended.
3915 Also, free temporary 'buf' which otherwise leaks.
3916
3917 2004-11-27 Per Bothner <per@bothner.com>
3918
3919 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
3920 local static variables if not USE_MAPPED_LOCATION.
3921
3922 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
3923
3924 * class.c, decl.c, expr.c: Fix comment typos.
3925
3926 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
3927
3928 PR java/18305
3929 * decl.c (end_java_method): Call
3930 attach_init_test_initialization_flags on all the init_decls.
3931 * parse.y (attach_init_test_initialization_flags): Move to ...
3932 * expr.c (attach_init_test_initialization_flags): here and
3933 support BIND_EXPR also.
3934 * java-tree.h (attach_init_test_initialization_flags): Prototype.
3935 * jcf-parse.c (parse_class_file): Don't disable class init
3936 optimization.
3937
3938 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
3939
3940 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3941 in diagnostics.
3942
3943 2004-11-24 Richard Henderson <rth@redhat.com>
3944
3945 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3946 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3947
3948 2004-11-24 Tom Tromey <tromey@redhat.com>
3949
3950 * verify.c (defer_merging): Don't use C++-style comment.
3951 * verify.h (java_opcode): Added java_opcode_end.
3952 * class.c (build_class_ref): Remove C++ comment and old FIXME.
3953
3954 * verify-impl.c (vfy_push_type): Removed bogus "return".
3955 (initialize_stack): Use vfy_alloc and vfy_free.
3956 (verify_instructions_0): Likewise.
3957
3958 * Merged gcj-abi-2-dev-branch to trunk.
3959
3960 2004-11-24 Andrew Haley <aph@redhat.com>
3961
3962 * jcf-parse.c (parse_class_file): Set file_start_location.
3963
3964 2004-11-10 Tom Tromey <tromey@redhat.com>
3965
3966 * class.c (make_field_value): Don't call build_static_field_ref.
3967 (build_static_field_ref): Don't emit direct references when using
3968 indirect dispatch.
3969
3970 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
3971 -verbose:class into man page synopsis.
3972
3973 2004-11-09 Tom Tromey <tromey@redhat.com>
3974
3975 * expr.c (build_java_arraystore_check): Still generate check if
3976 element type is itself an array.
3977
3978 2004-11-08 Tom Tromey <tromey@redhat.com>
3979
3980 * java-tree.h (soft_check_assignment_node): Removed.
3981 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3982 * decl.c (java_init_decl_processing): Don't initialize
3983 soft_check_assignment_node.
3984
3985 2004-11-05 Tom Tromey <tromey@redhat.com>
3986
3987 * class.c (layout_class_methods): Don't add Miranda methods when
3988 using indirect dispatch.
3989
3990 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
3991
3992 * class.c (make_class_data): Call emit_assertion_table to set the
3993 'assertion_table' field.
3994 (build_signature_for_libgcj): Move here from expr.c.
3995 (add_assertion_table_entry): New function. Callback for assertion
3996 hashtable traversal.
3997 (emit_assertion_table): New. Take class argument, and generate
3998 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3999 * decl.c (init_decl_processing): Define assertion_entry_type record.
4000 Push 'assertion_table' class field instead of 'verify'.
4001 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4002 (type_assertion_hash): Include 'assertion_code' in hash.
4003 (add_type_assertion): Rewritten. Take class and assertion_code
4004 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4005 (can_widen_reference_to): Use new add_type_assertion() arguments.
4006 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4007 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4008 (verify_identifier_node): Removed.
4009 (assertion_entry_type, assertion_table_type): New.
4010 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4011 assertion code definitions.
4012 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4013 'target_type' to 'op1' and 'op2'.
4014 (add_type_assertion): Declare.
4015 (lang_printable_name_wls): Remove unused definition.
4016 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4017 to emit runtime assertion.
4018 (vfy_note_stack_type): Clean up non-C90 declarations.
4019 (vfy_note_local_type): Likewise.
4020 * verify.h (vfy_is_assignable_from): Declare.
4021 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4022 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4023 instead of is_assignable_from_slow().
4024 (types_compatible): Reinstate ref_compatible() call.
4025
4026 2004-11-04 Tom Tromey <tromey@redhat.com>
4027
4028 * class.c (build_static_field_ref): Reverted previous patch.
4029
4030 * class.c (build_static_field_ref): Don't emit direct references
4031 when using indirect dispatch.
4032
4033 2004-11-03 Tom Tromey <tromey@redhat.com>
4034
4035 * expr.c (expand_java_arrayload): Set lhs_type_node.
4036 (expand_java_arraystore): Set rhs_type_node.
4037
4038 2004-11-02 Tom Tromey <tromey@redhat.com>
4039
4040 * jcf-parse.c (compute_class_name): Use filename length from zip
4041 directory, not strlen.
4042
4043 * expr.c (expand_invoke): Mark new interface methods as abstract.
4044
4045 2004-11-01 Tom Tromey <tromey@redhat.com>
4046
4047 * verify-impl.c (push_jump): Removed check for uninitialized
4048 objects.
4049 (push_exception_jump): Likewise.
4050 (handle_ret_insn): Likewise.
4051 (handle_jsr_insn): Likewise.
4052 (state_check_no_uninitialized_objects): Removed.
4053
4054 * decl.c (check_local_unnamed_variable): Recognize
4055 promoted-to-int parameters when using the new verifier.
4056 * expr.c (expand_java_arraystore): Explicitly request array type
4057 when using new verifier.
4058 (expand_java_arrayload): Likewise.
4059 (invoke_build_dtable): Don't pass object_type_node as
4060 expression argument to build_java_indirect_ref.
4061 (build_java_check_indexed_type): Do nothing.
4062 (build_java_arraystore_check): Handle case where array doesn't
4063 have array type.
4064 (build_java_array_length_access): Likewise.
4065 (expand_invoke): Handle case where interface overrides a method
4066 from Object.
4067 (pop_type_0): Always succeed for reference types.
4068 (process_jvm_instruction): Don't pop a value in a dead
4069 exception handler.
4070 (pop_arguments): Convert arguments to correct types.
4071
4072 2004-10-29 Andrew Haley <aph@redhat.com>
4073
4074 * jcf-parse.c (give_name_to_class): Remove line that was
4075 incorrectly merged.
4076
4077 2004-10-29 Andrew Haley <aph@redhat.com>
4078
4079 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4080
4081 2004-10-20 Andrew Haley <aph@redhat.com>
4082
4083 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4084
4085 2004-10-26 Tom Tromey <tromey@redhat.com>
4086
4087 * verify.h (vfy_notify_verified): Removed.
4088 * verify-glue.c (vfy_notify_verified): Removed.
4089
4090 2004-10-26 Tom Tromey <tromey@redhat.com>
4091
4092 * verify-impl.c (debug_print_state): Declare `i' before code.
4093 (merge_types): Modify `t' when it is null_type.
4094
4095 2004-10-26 Tom Tromey <tromey@redhat.com>
4096
4097 * verify-impl.c (type_print): Renamed from print. Now static and
4098 takes an argument.
4099 (debug_print_state): Use type_print.
4100
4101 2004-10-25 Tom Tromey <tromey@redhat.com>
4102
4103 * expr.c (build_invokeinterface): Compute correct offset for
4104 index into interface methods.
4105
4106 2004-10-20 Tom Tromey <tromey@redhat.com>
4107
4108 * java-tree.h (verify_jvm_instructions_new): Declare.
4109
4110 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4111 command line.
4112
4113 * verify-impl.c (verify_instructions): Correctly handle wide
4114 types on the stack.
4115 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4116 (vfy_get_component_type): Strip pointer types.
4117 (vfy_find_class): Use get_type_from_signature. Strip pointer
4118 types.
4119 Include java-except.h.
4120
4121 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4122
4123 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4124 vfy_push_type_t, set_variable, add_new_state, merge_into,
4125 handle_jsr_insn, branch_prepass, check_class_constant,
4126 check_wide_constant, get_one_type, compute_static_types,
4127 verify_instructions_0): Clean up C99 declarations after statements.
4128
4129 2004-10-20 Tom Tromey <tromey@redhat.com>
4130
4131 * verify-impl.c (merge_refs): Compare reference against iterator,
4132 not ref2.
4133
4134 * verify-glue.c (vfy_tag): Mask off resolved flag.
4135
4136 2004-10-19 Tom Tromey <tromey@redhat.com>
4137
4138 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4139 (init_state_with_stack): Initialize `this_type' in state.
4140 (verify_method): Use debug_print.
4141 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4142 (vfy_note_stack_depth): Reverted last patch.
4143 (vfy_note_stack_type): Note pointer to Object, not Object.
4144 (vfy_note_local_type): Likewise.
4145
4146 * verify.h (vfy_note_instruction_seen): Declare.
4147 * verify-glue.c (verify_jvm_instructions_new): Set
4148 BCODE_EXCEPTION_TARGET on target instruction.
4149 (vfy_note_instruction_seen): New function.
4150 * verify-impl.c (FLAG_INSN_SEEN): New define.
4151 (verify_instructions_0): Set flag on instruction. Save state for
4152 PC=0 later.
4153 (verify_instructions): Call vfy_note_instruction_seen.
4154
4155 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4156 (verify_jvm_instructions_new): Call method_init_exceptions,
4157 add_handler, and handle_nested_ranges.
4158 * verify-impl.c (verify_method): Return 1 on success.
4159 (verify_instructions_0): Save the state at PC=0.
4160
4161 * verify-impl.c (init_type_from_class): Set is_resolved and
4162 ref_next on new ref_intersection.
4163 (init_type_from_string): Likewise.
4164
4165 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4166
4167 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4168 if flag_new_verifier is set.
4169 * java-tree.h (flag_new_verifier): Declare.
4170 * lang.opt (fnew-verifier): New option.
4171 * verify-impl.c: Work around namespace pollution by undef'ing
4172 'current_class'.
4173 (struct verifier_context): Make 'bytecode' const.
4174 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4175 (types_compatible): For the BC-ABI, always consider reference types
4176 compatible.
4177 (check_class_constant): Use vfr->current_class.
4178 (check_constant): Likewise.
4179 (check_wide_constant): Likewise.
4180 (check_field_constant): Check for 'L' at start of type name.
4181 (get_one_type): Return pointer instead of type. Set type result in
4182 caller via passed type pointer.
4183 (compute_argument_types): Update to use new get_one_type arguments.
4184 (compute_return_type): Likewise.
4185 (make_verifier_context): New. Allocate and initialize 'vfr'.
4186 (free_verifier_context): New. Free 'vfr' and its contents.
4187 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4188 and free_verifier_context.
4189
4190 2004-10-15 Tom Tromey <tromey@redhat.com>
4191
4192 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4193 * verify.h (vfy_fail): Fixed formatting.
4194
4195 * verify-impl.c (vfr): Fixed comment formatting.
4196 (collapse_type): New function.
4197 (verify_instructions): Notify compiler about type map.
4198 * verify.h (vfy_note_stack_depth): Updated.
4199 (vfy_note_stack_type): Likewise.
4200 (vfy_note_local_type): Likewise.
4201 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4202 Declare.
4203 * verify-glue.c (vfy_note_stack_depth): Correctly size type
4204 state. Added `method' argument.
4205 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
4206 argument.
4207 (vfy_note_local_type): New function.
4208 (vfy_unsuitable_type): Likewise.
4209 (vfy_return_address_type): Likewise.
4210 (vfy_null_type): Likewise.
4211
4212 * verify.h (VFY_IN_GCC): Removed.
4213 (VFY_WANT_TYPEMAP): Removed.
4214 * verify-impl.c (verify_instructions_0): Removed useless "\".
4215 (struct state) <next>: Uncomment.
4216
4217 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
4218
4219 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4220 C-style.
4221
4222 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4223
4224 * Make-lang.in (verify.o): Re-enabled this target.
4225 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4226 (vfy_get_interface): Likewise.
4227 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4228 * verify.h (verify_jvm_instructions_new): Declare.
4229 * verify-impl.c (free_state): Temporarily comment out unused
4230 function.
4231
4232 2004-10-06 Tom Tromey <tromey@redhat.com>
4233
4234 * java-tree.h (JV_STATE_READ): New enum value.
4235
4236 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4237
4238 * verify.h: New file.
4239
4240 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
4241
4242 * verify-impl.c, verify-glue.c, verify.h: New files.
4243 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4244
4245 2004-09-24 Andrew Haley <aph@redhat.com>
4246
4247 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4248 for a slot if it's of pointer type.
4249
4250 2004-09-14 Tom Tromey <tromey@redhat.com>
4251
4252 * class.c (make_class_data): Correctly initialize "state" field.
4253 Initialize "engine" field.
4254 * decl.c (java_init_decl_processing): Add "engine" field.
4255
4256 2004-09-10 Andrew Haley <aph@redhat.com>
4257
4258 PR java/12760
4259 * expr.c (build_invokeinterface): Use fast method for interface
4260 dispatch.
4261 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4262 JTI_ITABLE_PTR_TYPE.
4263 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
4264 (emit_symbol_table): Add new arg, element_size.
4265 * decl.c (java_init_decl_processing): Initialize Class.itable.
4266 * class.c (GEN_TABLE): New macro.
4267 (gen_indirect_dispatch_tables): Use it. Add itable.
4268 (make_class_data): Add new arg for emit_symbol_table().
4269 Emit itable.
4270 (add_miranda_methods): Make sure search_class has been parsed.
4271 (emit_symbol_table): Add new arg, element_size.
4272
4273 2004-09-06 Andrew Haley <aph@redhat.com>
4274
4275 * verify.c (merge_types): Return Object for all merges of
4276 interfaces.
4277 * expr.c (add_type_assertion): Don't generate assertions when
4278 source type is array of Object.
4279
4280 2004-09-03 Andrew Haley <aph@redhat.com>
4281
4282 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4283
4284 * lang.c (java_post_options): Force flag_verify_invocations if
4285 we're not using indirect dispatch.
4286
4287 * expr.c (pop_type_0): Move test for interfaces before call to
4288 can_widen_reference_to().
4289 (build_signature_for_libgcj): Remove generation of canonical array
4290 type.
4291 (add_type_assertion): Canonicalize both arrays.
4292 Don't assert that type X can be assigned to Object.
4293 Don't assert that type X an be assigned to type X.
4294 Don't assert that Object can be assigned to type X.
4295 (can_widen_reference_to): Warn whenever we generate an assertion.
4296 (process_jvm_instruction): Use throwable_type_node for the type of
4297 an exception class.
4298
4299 2004-09-01 Andrew Haley <aph@redhat.com>
4300
4301 * decl.c (java_init_decl_processing): Change
4302 verify_identifier_node to "__verify".
4303 * expr.c (add_type_assertion): Use verify_identifier_node for name.
4304 * java-tree.h (verify_identifier_node): Change to "__verify".
4305
4306 * expr.c (build_signature_for_libgcj): New function.
4307 (add_type_assertion): Use it to construct signatures for
4308 source_type and target_type.
4309
4310 2004-08-27 Andrew Haley <aph@redhat.com>
4311
4312 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4313 (verify_identifier_node): New.
4314 (TYPE_VERIFY_METHOD): New.
4315 (struct type_assertion): New type.
4316 * expr.c (type_assertion_eq): New function.
4317 (type_assertion_hash): New function.
4318 (add_type_assertion): New function.
4319 (can_widen_reference_to): Call add_type_assertion().
4320 * decl.c (java_init_decl_processing): Add verify_identifier_node.
4321 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4322 (finish_class): Output TYPE_VERIFY_METHOD (type).
4323
4324 * decl.c (end_java_method): Nullify unused fields.
4325
4326 2004-08-17 Andrew Haley <aph@redhat.com>
4327
4328 * verify.c (defer_merging): Quieten.
4329 * jcf-parse.c (load_class): Only try to open a class file if it's
4330 java.lang.Object or if it's part of the current compilation.
4331 Check that the class we just tried to load is the class we just
4332 loaded. Quieten.
4333 (java_parse_file): Set flag_verify_invocations off if we're
4334 compiling from .class.
4335 (parse_zip_file_entries): Abort if we try to read a dummy class.
4336 * expr.c (can_widen_reference_to): Quieten.
4337 (build_invokevirtual): Abort if we try to invokevirtual an
4338 interface.
4339 (expand_invoke): Don't build a non-interface call to an interface.
4340 (build_instanceof): Don't do premature optimization if
4341 flag_verify_invocations is not set.
4342 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4343 from superclass.
4344 (build_static_field_ref): Add correct type conversion for
4345 field_address.
4346 (add_miranda_methods): Disable generation of Miranda methods for
4347 dummy classes.
4348 (layout_class_method): Don't complain about non-static method
4349 overrides static method with dummy classes.
4350
4351 2004-08-13 Tom Tromey <tromey@redhat.com>
4352
4353 * class.c (build_static_field_ref): Re-enable atable lookups for
4354 static fields.
4355
4356 * parse.y (strip_out_static_field_access_decl): Indentation fix.
4357
4358 2004-08-11 Tom Tromey <tromey@redhat.com>
4359
4360 * gcj.texi (libgcj Runtime Properties): Document new properties.
4361
4362 2004-08-06 Andrew Haley <aph@redhat.com>
4363
4364 * jcf-parse.c (load_class): Check that we really have loaded the
4365 class we're looking for.
4366
4367 2004-07-19 Andrew Haley <aph@redhat.com>
4368
4369 * verify.c (verify_jvm_instructions): Comment change only.
4370
4371 * typeck.c (build_java_array_type): Add size field to array name.
4372
4373 * java-tree.h (LOCAL_SLOT_P): New.
4374 (update_aliases): Add PC argument.
4375 (pushdecl_function_level): New function.
4376
4377 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4378 MODIFY_EXPR, and SAVE_EXPR.
4379 (java_gimplify_modify_expr): New function.
4380
4381 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4382 (expand_iinc): Pass PC to update_aliases().
4383 (STORE_INTERNAL): Likewise.
4384 (process_jvm_instruction): Likewise.
4385
4386 * decl.c (base_decl_map): New variable.
4387 (uniq): New variable.
4388 (update_aliases): Rewrite with more thorough checking.
4389 (debug_variable_p): New function.
4390 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4391 (check_local_named_variable): Delete whole function.
4392 (initialize_local_variable): New function.
4393 (check_local_unnamed_variable): Add checks and comments.
4394 (find_local_variable): Rewrite.
4395 (java_replace_reference): New function.
4396 (function_binding_level): New variable.
4397 (pushdecl_function_level): New function.
4398 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4399 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4400 (start_java_method): Reset uniq. Create base_decl_map. Set
4401 function_binding_level.
4402 (end_java_method): Null unused fields to save memory.
4403
4404 2004-06-29 Andrew Haley <aph@redhat.com>
4405
4406 * except.c (expand_start_java_handler): Push a new binding level.
4407 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4408 register_exception_range() to register where we'll do it.
4409 (expand_end_java_handler): Remove old bogus code. Replace with
4410 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4411 the top of the expression we're curently building.
4412 (maybe_end_try): Delete.
4413 * decl.c (binding_level.exception_range): New field.
4414 (clear_binding_level): Add field exception_range. Reformat.
4415 (poplevel): Call expand_end_java_handler().
4416 (poplevel): Call java_add_stmt only if functionbody is false.
4417 (maybe_poplevels): Don't call maybe_end_try() from here.
4418 (end_java_method): Clear no longer used trees in function decl.
4419 (register_exception_range): New function.
4420 * java-tree.h (register_exception_range, struct eh_range): Declare.
4421
4422 2004-06-22 Andrew Haley <aph@redhat.com>
4423
4424 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4425 the otable.
4426 * check-init.c (get_variable_decl): Teach check-init about
4427 FIELD_DECLs addressed via the otable.
4428 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4429 CLASS_PARSED_P.
4430
4431 2004-05-28 Andrew Haley <aph@redhat.com>
4432
4433 * jcf-parse.c (load_class): Don't try to read a class that we've
4434 already read.
4435
4436 * expr.c (build_invokeinterface): Use the old-fashioned way of
4437 doing indirect dispatch: look up interfaces by name.
4438 * java-tree.h (enum java_tree_index): Add
4439 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4440 * decl.c (java_init_decl_processing): Add
4441 soft_lookupinterfacemethodbyname_node.
4442
4443 * gjavah.c (print_method_info): Final methods have vtable entries,
4444 so gjavah needs to output them.
4445 * class.c (layout_class_method): Generate vtable entries for final
4446 methods.
4447 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4448 dispatch, even if a method is final.
4449
4450 2004-05-25 Andrew Haley <aph@redhat.com>
4451
4452 * class.c (build_symbol_entry): Convert the names of constructors
4453 to init_identifier_node when generating an entry for the indirect
4454 dispatch table.
4455
4456 * expr.c (build_known_method_ref): Generate indirect calls for
4457 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4458
4459 2004-05-24 Andrew Haley <aph@redhat.com>
4460
4461 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4462 atable element is of the right type.
4463
4464 * class.c (build_static_field_ref): Cast pointer to correct type
4465 for field.
4466
4467 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
4468
4469 * Merged with HEAD as of 20040514. Diff against
4470 gcj-abi-2-merge-20040514.
4471
4472 2004-04-16 Andrew Haley <aph@redhat.com>
4473
4474 * verify.c (check_pending_block): Disable subroutine checks.
4475 (defer_merging): New function.
4476 (merge_types): If types are dummy, use defer_merging to combine them.
4477 (verify_jvm_instructions): If invocation is invokeinterface and
4478 target is dummy, assume target really is an interface.
4479
4480 * parse.y (patch_invoke): Break out call to java_create_object.
4481
4482 * lang.c (flag_verify_invocations): New.
4483
4484 * jcf-parse.c (load_class): If we've already failed to load a
4485 class, don't try again.
4486 (load_class): If we can't find a .class file, don't fail, but emit
4487 a warning.
4488 (parse_class_file): Don't act on dummy methods.
4489
4490 * java-tree.h (flag_verify_invocations): New.
4491 (TYPE_DUMMY): New.
4492 (lang_type.dummy_class): New field.
4493 (java_create_object): New function.
4494 (METHOD_DUMMY): New.
4495
4496 * expr.c (build_field_ref): Widen field offset.
4497 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4498 that each of its elements is compatible with the one we're
4499 popping.
4500 (pop_type_0): Issue a warning to say that we need to generate a
4501 runtime check.
4502 (java_create_object): New function.
4503 (build_field_ref): Only generate hard refs if we're not using
4504 indirect dispatch.
4505 (expand_java_field_op): If we're using !verify_invocations and we
4506 see a missing field, generate a decl for it.
4507
4508 (expand_invoke): If a class doesn't have the method we seek and
4509 we're using !flag_verify_invocations, generate a decl for the
4510 method now.
4511
4512 (build_known_method_ref): Always use indirect dispatch via the
4513 atable for static methods.
4514
4515 (expand_java_NEW): Break out object creation into new function,
4516 java_create_object.
4517
4518 (can_widen_reference_to): Issue a warning to say that we need to
4519 generate a runtime check.
4520
4521 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4522 (make_method_value): Also use index for interfaces.
4523 (make_class_data): Skip dummy field for inherited data.
4524 Don't build method array for dummy methods.
4525 Set size_in_byte to -1 when using inirect dispatch
4526 Don't build a hard class ref if we don't have a hard ref to our
4527 superclass, or if we're using inirect dispatch.
4528 Null out dispatch tables.
4529
4530 (layout_class_method): Don't complain about non-static method
4531 overrides static method is method is artificial.
4532
4533 (build_static_field_ref): Disable atable references to static
4534 fields for the time being.
4535
4536 (layout_class_methods): Check for CLASS_INTERFACE as
4537 well as CLASS_ABSTRACT.
4538
4539 2004-11-24 Steven Bosscher <stevenb@suse.de>
4540
4541 * class.c (make_class_data): Don't check flag_inline_functions.
4542 * lang.c (flag_really_inline): Remove unused flag.
4543 (java_handle_option): Don't set it here. Remove special handling
4544 of flag_inline_functions for Java.
4545 (java_init): Don't set flag_inline_trees here. Already done...
4546 (java_post_options): ...here. Don't clear flag_inline_functions.
4547
4548 2004-11-24 Steven Bosscher <stevenb@suse.de>
4549
4550 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4551 (java_gimplify_exit_block_expr): New function.
4552 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4553 LABELED_BLOCK_EXPR.
4554 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4555 (EXIT_BLOCK_EXPR): Likewise.
4556 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4557 (LABELED_BLOCK_BODY): Likewise.
4558 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4559 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4560 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
4561 TREE_OPERAND.
4562 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4563 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4564 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
4565 second operand of EXIT_BLOCK_EXPR.
4566 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4567 TREE_OPERAND.
4568 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4569
4570 2004-11-23 Ben Elliston <bje@au.ibm.com>
4571
4572 * xref.h (xref_flag_value): Remove.
4573 (xref_set_data, xref_get_data): Likewise.
4574 (xref_set_current_fp): Likewise.
4575 (XREF_NONE): Likewise.
4576 (XREF_GET_DATA): Likewise.
4577 * xref.c (xref_flag_value): Remove.
4578 (xref_set_data, xref_get_data): Likewise.
4579 (xref_set_current_fp): Likewise.
4580
4581 2004-11-23 Ben Elliston <bje@au.ibm.com>
4582
4583 * gjavah.c (output_directory): Make static.
4584 (temp_directory): Likewise.
4585
4586 2004-11-15 Tom Tromey <tromey@redhat.com>
4587
4588 * decl.c (instn_ptr_type_node): Removed.
4589 (lineNumbers_ptr_type_node): Removed.
4590 (jint_type): Removed.
4591 (jint_ptr_type): Removed.
4592
4593 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
4594
4595 PR java/15576
4596 * check-init.c (check_init): Ignore DECL_EXPR.
4597 * expr.c (always_initialize_class_p): Reenable.
4598 (build_class_init): Use a variable to store the decl. Also use
4599 boolean_false_node instead of integer_zero_node.
4600 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4601 to the block.
4602
4603 2004-11-08 Tom Tromey <tromey@redhat.com>
4604
4605 PR java/16843:
4606 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4607 generating a JNI header.
4608 (print_field_info): Handle JNI headers.
4609 (jni_print_float): Likewise.
4610 (jni_print_double): Likewise.
4611
4612 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
4613
4614 * decl.c (end_java_method): Remove duplicated code.
4615
4616 2004-11-06 Zack Weinberg <zack@codesourcery.com>
4617 Gerald Pfeifer <gerald@pfeifer.com>
4618
4619 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4620 as well.
4621
4622 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
4623
4624 PR java/17265
4625 * class.c: Reinstate 2004-08-18 patch.
4626 (make_local_function_alias): Don't create an alias for extern (native)
4627 functions.
4628
4629 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
4630
4631 PR java/17265
4632 * class.c (make_local_function_alias): Revert 2004-08-18 change.
4633 (make_method_value): Likewise.
4634
4635 2004-10-21 Andrew Haley <aph@redhat.com>
4636
4637 PR java/18091:
4638 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4639
4640 2004-10-20 Andrew Haley <aph@redhat.com>
4641
4642 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4643 Remove duplicated code block.
4644
4645 2004-10-18 Steven Bosscher <stevenb@suse.de>
4646
4647 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4648 New rules to work around old Bison warnings.
4649
4650 2004-10-17 Steven Bosscher <stevenb@suse.de>
4651
4652 * class.c (ident_subst): Always alloca buffer.
4653 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4654 opcode after including javaop.def.
4655 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4656 conditional expression that exits, to avoid warnings.
4657 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4658 a user of an extension.
4659 * win32-host.c: Move check down to have non-empty file when
4660 WIN32 is not defined.
4661
4662 * Make-lang.in (java-warn): Add STRICT_WARN.
4663 (java/jcf-io.o-warn): Don't have Werror for this file.
4664 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4665
4666 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
4667
4668 * expr.c (expr_add_location): Move declaration to before all
4669 statements.
4670 * parse.y (java_expand_classes): Ditto.
4671 * lex.c (java_peek_unicode): Ditto.
4672
4673 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4674
4675 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4676 if possible, else convert `foo' to 'foo'.
4677 * class.c: Likewise.
4678 * decl.c: Likewise.
4679 * expr.c: Likewise.
4680 * jcf-io.c: Likewise.
4681 * jcf-parse.c: Likewise.
4682 * lang.c: Likewise.
4683 * lex.c: Likewise.
4684 * parse.h: Likewise.
4685
4686 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4687
4688 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4689 rename parameter 'msg' to 'msgid' in function declaration.
4690 (issue_warning_error_from_context): Likewise.
4691 (yyerror): Rename parameter 'msg' to 'msgid'.
4692 (all over): Use new quoting style for diagnostics.
4693
4694 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
4695
4696 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4697 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4698 Update copyright.
4699
4700 2004-10-14 Matt Austern <austern@apple.com>
4701
4702 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4703 pointer_set_t* now.
4704
4705 2004-10-13 Tom Tromey <tromey@redhat.com>
4706
4707 PR java/15578:
4708 * lang.opt (--extdirs): Document.
4709 * jvspec.c (lang_specific_driver): Recognize -encoding and
4710 -extdirs.
4711
4712 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
4713
4714 * parse.y (issue_warning_error_from_context): Use va_list *
4715 instead of va_list parameter.
4716 (parse_error_context): Update call.
4717 (parse_warning_context): Likewise.
4718
4719 2004-10-05 Zack Weinberg <zack@codesourcery.com>
4720
4721 * parse.y, parse-scan.y: Add list of diagnostic messages to
4722 insulate translation template from version of yacc/bison used
4723 to compile the grammar.
4724
4725 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
4726
4727 Prepare for %q, %< and %> in diagnostic message strings.
4728 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4729 Name second parameter 'msgid'.
4730 * parse.y: Additionally include pretty-print.h and diagnostic.h.
4731 (issue_warning_error_from_context): Use pretty-printer functions
4732 instead of vsprintf for constructing formatted messages. Rename
4733 parameter 'msg' to 'msgid'.
4734 (parse_error_context): Rename parameter 'msg' to 'msgid'.
4735 (parse_warning_context): Likewise.
4736
4737 2004-10-05 Andrew Haley <aph@redhat.com>
4738
4739 PR java/17779
4740 * jcf-parse.c (parse_zip_file_entries): If a class has a
4741 superclass and a TYPE_SIZE of zero, lay it out.
4742
4743 2004-09-30 Andrew Haley <aph@redhat.com>
4744
4745 PR java/17733
4746 * jcf-parse.c (compute_class_name): Rewrite.
4747
4748 2004-10-01 Jan Hubicka <jh@suse.cz>
4749
4750 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4751
4752 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4753
4754 * lex.c: Fix a comment typo.
4755
4756 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4757
4758 * java-tree.h: Fix a comment typo.
4759
4760 2004-09-30 Per Bothner <per@bothner.com>
4761
4762 Simplify lexer. Implement --enable-mapped-location support.
4763 * jcf-parse.c (parse_class_file): Use linemap_line_start.
4764 (parse_source_file_1): Pass filename as extra parameter, so we can call
4765 linemap_add and set input_location here, rather than in both callers.
4766 (read_class): Pass copied filename to parse_source_file_1.
4767 Don't initialize wfl_operator - only needed for source compilation.
4768 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
4769 * lex.h: Remove a bunch of debugging macros.
4770 * lex.h (struct_java_line, struct java_error): Remove types.
4771 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
4772 (struct java_lc_s): Remove prev_col field.
4773 (struct java_lexer): New fields next_unicode, next_columns, and
4774 avail_unicode. New position field, and maybe token_start field.
4775 Don't need hit_eof field - use next_unicode == -1 instead.
4776 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
4777 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
4778 * parse.h: Various changes for USE_MAPPED_LOCATION.
4779 (EXPR_WFL_EMIT_LINE_NOTE): XXX
4780 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
4781 (struct parser_ctxt): New file_start_location field.
4782 Remove p_line, c_line fields since we no longer save lines.
4783 Remove elc, lineno, and current_jcf fields - no longer used.
4784 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
4785 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
4786 source_location and is probably not needed anymore anyway.
4787 Use new expr_add_Location function.
4788 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
4789 (java_pop_parser_context): Minor cleanup.
4790 (java_parser_context_save_global, java_parser_context_restore_global,
4791 java_pop_parser_context): Save/restore input_location as a unit.
4792 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
4793 a source_location instead of a wfl context node.
4794 (check_class_interface_creation): input_filename is not addressable.
4795 (create_artificial_method): Calling java_parser_context_save_global
4796 and java_parser_context_restore_global is overkill. Instead,
4797 temporarily set input_location from class decl.
4798 (java_layout_seen_class_methods): Set input_location from method decl.
4799 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4800 (finish_loop_body): Likewise.
4801 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
4802 (java_sprint_unicode): Take a character, not index in line.
4803 (java_sneak_uncode): Replaced by java_peek_unicode.
4804 (java_unget_unicode): No longer used.
4805 (java_allocate_new_line. java_store_unicode): Removed, since we
4806 no longer remember "lines".
4807 (java_new_lexer): Update for new data structures.
4808 (java_read_char): Move unget_value checking to java_read_unicode.
4809 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4810 efficient functions that are used directly when lexing.
4811 (java_read_unicode_collapsing_terminators): No longer needed.
4812 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4813 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4814 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
4815 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
4816 combine switch branches, and test for common token kinds earlier.
4817 (java_lex_error): Rewrite.
4818 * jv-scan.c (expand_location): New function, copied from tree.c.
4819 (main): Set ctxp->filename instead of setting input_filename directly.
4820
4821 2004-09-30 Per Bothner <per@bothner.com>
4822
4823 More cleanup for --enable-mapped-location.
4824 * class.c (push_class): If USE_MAPPED_LOCATION don't set
4825 input_location here. Instead do it in give_name_to_class.
4826 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4827 * expr.c (expand_byte_code): Call linemap_line_start.
4828 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
4829 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
4830 (expr_add_location): New function, if USE_MAPPED_LOCATION.
4831 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
4832 to USE_MAPPED_LOCATION case.
4833
4834 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
4835 * jcf-parse.c (java_parse_file): Don't set input_filename.
4836 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4837 Create a list of TRANSLATION_UNIT_DECL.
4838 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
4839 reason is so we can set a DECL_SOURCE_LOCATION for each file.
4840 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
4841 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
4842 (file_start_location): New static.
4843 (set_source_filename): Avoid extra access to input_filename macro.
4844 Concatenate new name with class's package prefix.
4845 (set_source_filename, give_name_to_class): Update.
4846 (give_name_to_class): Set class's "line 0" input_location here.
4847 (parse_class_file): Set input_location as a unit.
4848
4849 * jcf-parse.c (load_class): Sanity test if missing inner class file.
4850
4851 2004-09-29 Per Bothner <per@bothner.com>
4852
4853 * java-tree.h: Redefine some macros and add some declaration
4854 to handle the USE_MAPPED_LOCATION case.
4855 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
4856 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
4857 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
4858 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
4859
4860 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
4861 * decl.c (finish_method, java_add_stmt): Likewise.
4862 * java-gimplify.c (java-gimplify.c): Likewise.
4863 * jcf-write.c (generate_bytecode_insns): Likewise.
4864 * lang.c (java_post_options): Likewise - call linemap_add.
4865
4866 2004-09-29 Andrew Haley <aph@redhat.com>
4867
4868 PR java/17007
4869 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
4870 result of TRUNC_MOD_EXPR.
4871 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
4872 * decl.c (java_init_decl_processing): Mark
4873 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
4874
4875 2004-09-28 Tom Tromey <tromey@redhat.com>
4876
4877 PR java/15710:
4878 * class.c (add_miranda_methods): Load superinterface if not
4879 already loaded.
4880
4881 2004-09-28 Andrew Haley <aph@redhat.com>
4882
4883 PR java/17586
4884 * jcf-parse.c (load_class): Don't try to read a class that we've
4885 already read.
4886
4887 2004-09-28 Andrew Haley <aph@redhat.com>
4888
4889 * jcf-parse.c (load_class): Back out previous broken patch.
4890
4891 2004-09-28 Andrew Haley <aph@redhat.com>
4892
4893 PR java/17586
4894 * jcf-parse.c (load_class): Don't try to read a class that we've
4895 already read.
4896 Check that we really did read the right class.
4897
4898 2004-09-25 Tom Tromey <tromey@redhat.com>
4899
4900 PR java/17500:
4901 * parse.y (create_artificial_method): Use add_method_1.
4902
4903 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
4904
4905 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
4906 comment typos.
4907 * gcj.texi: Fix typos.
4908
4909 2004-09-24 Tom Tromey <tromey@redhat.com>
4910
4911 PR java/15656:
4912 * parse.y (class_instance_creation_expression): Set `$$' to NULL
4913 in error parts of rule.
4914 (unary_expression): Don't call error_if_numeric_overflow when $1
4915 is NULL.
4916
4917 2004-09-24 Tom Tromey <tromey@redhat.com>
4918
4919 PR java/16789:
4920 * parse.y (resolve_qualified_expression_name): Set
4921 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
4922 * expr.c (force_evaluation_order): Check for empty argument list
4923 after stripping COMPOUND_EXPR.
4924
4925 2004-09-23 Andrew Haley <aph@redhat.com>
4926
4927 PR java/16927:
4928 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4929 COND_EXPRs.
4930
4931 2004-09-23 Tom Tromey <tromey@redhat.com>
4932
4933 PR java/17329:
4934 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4935 where operand is null.
4936
4937 2004-09-23 Tom Tromey <tromey@redhat.com>
4938
4939 PR java/17380:
4940 * parse.y (not_accessible_p): Allow access to protected members
4941 even when class is not static.
4942
4943 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
4944
4945 * Make-lang.in: Revert the gcc-none.o change.
4946
4947 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
4948
4949 * parse.y (patch_anonymous_class): VEC_space returns true if there
4950 is space.
4951
4952 2004-09-21 Matt Austern <austern@apple.com>
4953
4954 Fix bootstrap.
4955 * gjavah.c (free_method_name_list): Fix function definition so
4956 it's a proper C prototype.
4957
4958 2004-09-21 Tom Tromey <tromey@redhat.com>
4959
4960 PR java/17575:
4961 * gjavah.c (free_method_name_list): New method.
4962 (main): Call it.
4963
4964 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
4965 Zack Weinberg <zack@codesourcery.com>
4966
4967 * java-tree.def: Use tree_code_class enumeration constants
4968 instead of code letters.
4969 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4970 new tree-class enumeration constants.
4971
4972 2004-09-13 Tom Tromey <tromey@redhat.com>
4973
4974 PR java/17216:
4975 * class.c (layout_class_method): Put synthetic methods into the
4976 vtable.
4977
4978 2004-09-11 Andrew Pinski <apinski@apple.com>
4979
4980 * Make-lang.in (java/ggc-none.c): Change dependency
4981 for ggc.h into $(GGC_H).
4982
4983 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
4984
4985 * Make-lang.in (java/win32-host.o): Add dependency on
4986 coretypes.h.
4987 * win32-host.c: Add includes for coretypes.h, jcf.h
4988
4989 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
4990
4991 * Make-lang.in (GCJH_OBJS): Change dependency from
4992 ggc-none.o to java/ggc-none.o
4993 (JCFDUMP_OBJS): Likewise.
4994 (java/ggc-none.o): New target.
4995
4996 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4997
4998 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
4999 * class.c (build_utf8_ref, build_static_field_ref,
5000 make_field_value, make_method_value, get_dispatch_table,
5001 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5002 * constants.c (get_tag_node, build_ref_from_constant_pool,
5003 build_constants_constructor): Likewise.
5004 * decl.c (java_init_decl_processing): Likewise.
5005 * expr.c (build_java_array_length_access, build_newarray,
5006 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5007 build_java_binop, build_field_ref, expand_java_add_case,
5008 expand_java_call, build_known_method_ref, build_invokevirtual,
5009 build_invokeinterface, build_jni_stub): Likewise.
5010 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5011 * jcf-parse.c (get_constant): Likewise.
5012 * lex.c (do_java_lex): Likewise.
5013 * parse.y (patch_binop, patch_unaryop, patch_cast,
5014 build_newarray_node, patch_newarray): Likewise.
5015 * resource.c (compile_resource_data): Likewise.
5016 * typeck.c (build_prim_array_type): Likewise.
5017
5018 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5019
5020 * decl.c (java_init_decl_processing): Adjust
5021 initialize_sizetypes call.
5022
5023 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5024
5025 * jv-scan.c (fancy_abort): Add.
5026
5027 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5028
5029 * expr.c (build_java_arrayaccess): Use convert to change
5030 len's type.
5031
5032 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5033
5034 * class.c (make_local_function_alias): Allocate extra space for 'L'
5035 in name buffer. Reported by Thomas Neumann.
5036
5037 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5038
5039 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5040 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5041 * lex.c (do_java_lex): Adjust.
5042 (error_if_numeric_overflow): Likewise.
5043
5044 2004-08-18 Andrew Pinski <apinski@apple.com>
5045
5046 * class.c (make_local_function_alias): Only make a new decl if we
5047 support alias attribute on all decls.
5048
5049 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5050
5051 * class.c (make_local_function_alias): New function. Create local
5052 alias for public method DECL.
5053 (make_method_value): Use make_local_function_alias.
5054 * parse.y (craft_constructor): Don't special-case anonymous classes.
5055 Always set ctor_name to init_identifier_node.
5056 (lookup_method_invoke): Call layout_class_method when creating
5057 anonymous class constructor.
5058
5059 2004-08-18 Richard Henderson <rth@redhat.com>
5060
5061 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5062 default case. Treat '<' similarly. Update for
5063 is_gimple_formal_tmp_var name change.
5064
5065 2004-08-17 Andrew Haley <aph@redhat.com>
5066
5067 * lang.c (lang_printable_name): Obey verbose flag.
5068 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5069 lang_printable_name().
5070 (verify_constructor_circularity, get_printable_method_name,
5071 check_abstract_method_definitions, java_check_regular_methods,
5072 java_check_abstract_methods, check_inner_class_access,
5073 fix_constructors, patch_method_invocation, patch_return):
5074 Likewise.
5075 * expr.c (pop_type_0): Likewise.
5076
5077 * java-tree.h (lang_printable_name_wls): Delete.
5078
5079 2004-08-16 Tom Tromey <tromey@redhat.com>
5080
5081 PR java/8473:
5082 * parse.y (primary): Changed for initialized and uninitialized
5083 array creations.
5084 (array_access): Handle array_creation_initialized.
5085 (array_creation_expression): Split into
5086 array_creation_initialized and array_creation_uninitialized.
5087
5088 2004-08-16 Andrew Haley <aph@redhat.com>
5089
5090 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5091 generating bytecode.
5092
5093 2004-08-16 Elliot Lee <sopwith@redhat.com>
5094
5095 PR java/9677
5096 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5097 spaces, and quoted filelists.
5098
5099 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5100
5101 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5102 * class.c (build_utf8_ref, build_static_field_ref,
5103 make_field_value, make_method_value, get_dispatch_table,
5104 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5105 * constants.c (get_tag_node, build_ref_from_constant_pool,
5106 build_constants_constructor): Likewise.
5107 * decl.c (java_init_decl_processing): Likewise.
5108 * expr.c (build_java_array_length_access, build_newarray,
5109 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5110 build_java_binop, build_field_ref, expand_java_add_case,
5111 expand_java_call, build_known_method_ref, build_invokevirtual,
5112 build_invokeinterface, build_jni_stub): Likewise.
5113 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5114 * jcf-parse.c (get_constant): Likewise.
5115 * lex.c (do_java_lex): Likewise.
5116 * parse.y (patch_binop, patch_unaryop, patch_cast,
5117 build_null_of_type, patch_newarray): Likewise.
5118 * resource.c (compile_resource_data): Likewise.
5119 * typeck.c (build_prim_array_type): Likewise.
5120
5121 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5122
5123 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5124 Don't create BLOCK here or call java_gimplify_block.
5125
5126 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5127
5128 * java-tree.h (flag_deprecated): Removed.
5129 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5130 * parse.y (check_deprecation): Check warn_deprecated instead of
5131 flag_deprecated.
5132
5133 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5134
5135 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5136 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5137 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5138 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5139 flag_force_classes_archive_check, flag_optimize_sci,
5140 flag_indirect_dispatch): Remove explicit declarations.
5141 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5142 final comment.
5143
5144 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5145
5146 PR bootstrap/14893
5147 * Make-lang.in (java.install-man): Install from either build
5148 tree or source tree, whichever has the file first.
5149
5150 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5151
5152 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5153 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5154 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5155 (do_java_lex): Likewise. Adjust force_fit_type call.
5156
5157 2004-08-04 Roger Sayle <roger@eyesopen.com>
5158 Andrew Haley <aph@redhat.com>
5159
5160 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5161 checking trees as they're being built.
5162 (convert): Call convert_ieee_real_to_integer if we're
5163 converting a constant, even if we're writing a class file.
5164
5165 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5166
5167 PR java/16701
5168 * parse.y (fold_constant_for_init): Call resolve_field_access with
5169 correct current_class context.
5170
5171 2004-08-01 Roger Sayle <roger@eyesopen.com>
5172
5173 * decl.c (update_aliases, initialize_local_variable): Replace calls
5174 to build with calls to buildN.
5175 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5176 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5177 * parse.h (BUILD_THROW): Likewise.
5178 * parse.y (switch_expression, synchronized_statement,
5179 catch_clause_parameter, array_creation_expression,
5180 conditional_expression, make_qualified_name,
5181 resolve_qualified_expression_name, patch_method_invocation,
5182 patch_invoke, build_method_invocation, build_new_invocation,
5183 build_assignment, patch_assignment, build_binop, patch_binop,
5184 build_string_concatenation, build_incdec, patch_unaryop,
5185 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5186 patch_return, build_if_else_statement, build_labeled_block,
5187 build_new_loop, build_loop_body, build_bc_statement,
5188 build_assertion, encapsulate_with_try_catch, build_try_statement,
5189 build_try_finally_statement, patch_synchronized_statement,
5190 emit_test_initialization): Likewise, replace build with buildN.
5191
5192 2004-07-28 Eric Christopher <echristo@redhat.com>
5193
5194 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5195 (java_unsafe_for_reeval): Ditto.
5196
5197 2004-07-26 <hp@bitrange.com>
5198
5199 * parse.y (build_super_invocation): Adjust declaration order to
5200 avoid declaration after statement.
5201
5202 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5203
5204 * decl.c: Rename all identifiers named `class' to `cl'.
5205
5206 2004-07-25 Richard Henderson <rth@redhat.com>
5207
5208 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5209
5210 2004-07-23 Mike Stump <mrs@apple.com>
5211
5212 * boehm.c (set_bit): Improve type safety wrt unsignedness.
5213 * gjavah.c (throwable_p, decode_signature_piece,
5214 print_full_cxx_name, print_include, add_namelet, add_class_decl,
5215 process_file): Likewise.
5216 * jcf-dump.c (main): Likewise.
5217 * jcf-io.c (read_zip_member): Likewise.
5218 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5219 give_name_to_class, get_class_constant): Likewise.
5220 * jcf-write.c (find_constant_wide, push_long_const,
5221 generate_classfile): Likewise.
5222 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5223 * parse.y (read_import_dir): Likewise.
5224 * typeck.c (parse_signature_type): Likewise.
5225 * verify.c (verify_jvm_instructions): Likewise.
5226 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5227
5228 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
5229
5230 * Make-lang.in: Replace rmic and rmiregistry references with
5231 grmic and grmiregistry.
5232 * gcj.texi: Likewise.
5233
5234 2004-07-20 Andrew Haley <aph@redhat.com>
5235
5236 PR java/16431.
5237 * verify.c (verify_jvm_instructions): Comment change only.
5238
5239 * typeck.c (build_java_array_type): Add size field to array name.
5240
5241 * java-tree.h (LOCAL_SLOT_P): New.
5242 (update_aliases): Add PC argument.
5243 (pushdecl_function_level): New function.
5244
5245 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5246 MODIFY_EXPR, and SAVE_EXPR.
5247 (java_gimplify_modify_expr): New function.
5248
5249 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5250 (expand_iinc): Pass PC to update_aliases().
5251 (STORE_INTERNAL): Likewise.
5252 (process_jvm_instruction): Likewise.
5253
5254 * decl.c (base_decl_map): New variable.
5255 (uniq): New variable.
5256 (update_aliases): Rewrite with more thorough checking.
5257 (debug_variable_p): New function.
5258 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5259 (check_local_named_variable): Delete whole function.
5260 (initialize_local_variable): New function.
5261 (check_local_unnamed_variable): Add checks and comments.
5262 (find_local_variable): Rewrite.
5263 (java_replace_reference): New function.
5264 (function_binding_level): New variable.
5265 (pushdecl_function_level): New function.
5266 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5267 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5268 (start_java_method): Reset uniq. Create base_decl_map. Set
5269 function_binding_level.
5270 (end_java_method): Null unused fields to save memory.
5271
5272 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5273
5274 * class.c (add_interface_do): Remove.
5275 (set_super_info, interface_of_p, maybe_add_interface,
5276 add_interface, make_class_data, layout_class,
5277 add_miranda_methods): Adjust BINFO accessors and addition.
5278 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5279 accessors.
5280 * jcf-write.c (generate_classfile): Likewise.
5281 * parse.y (patch_anonymous_class, check_inner_circular_reference,
5282 check_circular_reference, java_complete_class,
5283 check_abstract_method_definitions,
5284 java_check_abstract_method_definitions,
5285 check_interface_throws_clauses, java_check_abstract_methods,
5286 lookup_java_interface_method2,
5287 find_applicable_accessible_methods_list): Adjust BINFO accessors
5288 and addition.
5289 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5290
5291 2004-07-18 Roger Sayle <roger@eyesopen.com>
5292
5293 * builtins.c (max_builtin, min_builtin,
5294 java_build_function_call_expr): Replace calls to build with buildN.
5295 * class.c (build_class_ref, build_static_field_ref,
5296 get_dispatch_table, make_class_data, layout_class_method): Likewise.
5297 * constants.c (build_ref_from_constant_pool): Likewise.
5298 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5299 add_stmt_to_compound): Likewise.
5300 * except.c (build_exception_object_ref, expand_end_java_handler):
5301 Likewise.
5302 * java-gimplify.c (java_gimplify_case_expr,
5303 java_gimplify_default_expr, java_gimplify_block,
5304 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5305 * jcf-write.c (generate_bytecode_insns): Likewise.
5306 * typeck.c (convert_ieee_real_to_integer): Likewise.
5307
5308 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5309
5310 * java-tree.h (builtin_function): Declare.
5311
5312 2004-07-16 Steven Bosscher <stevenb@suse.de>
5313
5314 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5315 abuse restore_line_number_status.
5316
5317 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
5318
5319 g++/15861
5320 * jcf-parse.c (java_emit_static_constructor): Specify default
5321 priority.
5322
5323 2004-07-13 Per Bothner <per@bothner.com>
5324
5325 * java-tree.h (all_class_filename): Remove useless macro.
5326 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
5327 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
5328 * parse.y (java_parser_context_restore_global): Replace
5329 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5330 * jcf-parse.c (read_class, java_parse_file): Likewise.
5331
5332 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
5333
5334 PR java/16474
5335 gjavah.c (print_field_info): Emit constant only if field is static.
5336
5337 2004-07-11 Roger Sayle <roger@eyesopen.com>
5338
5339 * expr.c (java_truthvalue_conversion, flush_quick_stack,
5340 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5341 build_java_ret, build_java_throw_out_of_bounds_exception,
5342 build_java_array_length_access, java_check_reference,
5343 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5344 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5345 expand_java_arrayload, build_java_monitor, expand_java_return,
5346 expand_load_internal, expand_java_NEW, build_get_class,
5347 build_instanceof, expand_java_CHECKCAST, expand_iinc,
5348 build_java_soft_divmod, build_java_binop, build_field_ref,
5349 expand_compare, expand_java_goto, expand_java_switch,
5350 expand_java_add_case, build_class_init, build_known_method_ref,
5351 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5352 expand_invoke, build_jni_stub, expand_java_field_op,
5353 java_expand_expr, expand_byte_code, STORE_INTERNAL,
5354 force_evaluation_order, emit_init_test_initialization): Convert
5355 calls to "build" into calls to the prefered "buildN" functions.
5356
5357 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5358
5359 * java-tree.h (set_block): Remove.
5360 * lang.c (java_clear_binding_stack): New.
5361 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5362 * decl.c (struct binding_level): Remove this_block.
5363 (clear_binding_level): Likewise.
5364 (poplevel): Don't handle this_block.
5365 (set_block): Remove.
5366
5367 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
5368
5369 * class.c (common_enclosing_context_p): Remove statement with no
5370 side-effects.
5371
5372 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5373
5374 PR java/8618
5375 * parse.y (create_anonymous_class): Remove 'location' argument. Use
5376 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5377 (craft_constructor): Inherit access flags for implicit constructor
5378 from the enclosing class.
5379 (create_class): Fix comment typo.
5380 (resolve_qualified_expression_name): Pass type of qualifier to
5381 not_accessible_p, not the type in which target field was found.
5382 (not_accessible_p): Handle inner classes. Expand protected
5383 qualifier-subtype check to enclosing instances, but don't apply this
5384 check to static members. Allow protected access to inner classes
5385 of a subtype. Allow private access within common enclosing context.
5386 (build_super_invocation): Get WFL line number info from current
5387 class decl.
5388 (build_incomplete_class_ref): Update for new create_anonymous_class
5389 signature.
5390 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5391 common_enclosing_instance_p.
5392 * class.c (common_enclosing_context_p): New. Determine if types
5393 share a common enclosing context, even across static contexts.
5394 (common_enclosing_instance_p): Renamed from
5395 common_enclosing_context_p. Determines if types share a common
5396 non-static enclosing instance.
5397 * java-tree.h (common_enclosing_instance_p): Declare.
5398 * jcf-write.c (get_method_access_flags): New. Surpress private flag
5399 for inner class constructors.
5400 (generate_classfile): Use get_method_access_flags.
5401
5402 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5403
5404 * class.c (interface_of_p): Check for null TYPE_BINFO.
5405
5406 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
5407
5408 * class.c (make_class): Do not create binfo here.
5409 (set_super_info): Create it here.
5410 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5411
5412 2004-07-08 Richard Henderson <rth@redhat.com>
5413
5414 * expr.c (case_identity, get_primitive_array_vtable,
5415 java_expand_expr, emit_init_test_initialization): Remove.
5416 * java-tree.h (java_expand_expr): Remove.
5417 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5418
5419 2004-07-07 Per Bothner <per@bothner.com>
5420
5421 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
5422 get internal error due to mismatched types.
5423
5424 * gcj.texi (Invoking gij): Document new -verbose:class flag.
5425
5426 * gcj.texi (Linking): New node. Document -lgij usage.
5427
5428 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5429
5430 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5431 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5432 * java/class.c (set_super_info, class_depth, interface_of_p,
5433 maybe_add_interface, add_interface, make_class_data,
5434 layout_class, add_miranda_methods): Adjust BINFO macros.
5435 * expr.c (can_widen_reference_to, lookup_field): Likewise.
5436 * jcf-write.c (generate_classfile): Likewise.
5437 * parse.y (patch_anonymous_class,
5438 check_inner_circular_reference, check_circular_reference,
5439 java_complete_class, check_abstract_method_definitions,
5440 java_check_abstract_method_definitions,
5441 check_interface_throws_clauses, java_check_abstract_methods,
5442 lookup_java_interface_method2,
5443 find_applicable_accessible_methods_list): Likewise.
5444 * typeck.c (find_method_in_interface): Likewise.
5445 * verify.c (merge_types): Likewise.
5446
5447 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5448
5449 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5450 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5451
5452 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5453
5454 * class.c (make_class): Use make_tree_binfo.
5455 (set_super_info, add_interface_do): Likewise.
5456 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5457
5458 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
5459
5460 * verify.c: Correct array element access formatting thinko.
5461
5462 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
5463
5464 * verify.c: Insert a short blurb at the start referring to the JVMS.
5465 (merge_type_state): Remove redundant nested if statement.
5466 (verify_jvm_instructions): Ensure current_subr is initialised to
5467 NULL_TREE.
5468 Minor formatting fixes all over the place.
5469
5470 2004-07-02 Richard Henderson <rth@redhat.com>
5471
5472 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5473
5474 2004-07-01 Richard Henderson <rth@redhat.com>
5475
5476 * class.c (registerClass_libfunc): Remove.
5477 (init_class_processing): Don't set it.
5478 (emit_register_classes): Take list_p parameter. Fill it in
5479 with _Jv_RegisterClass calls.
5480 * decl.c (java_init_decl_processing): Don't call
5481 init_resource_processing.
5482 * jcf-parse.c (java_emit_static_constructor): New.
5483 (java_parse_file): Call it.
5484 * resource.c (registerResource_libfunc): Remove.
5485 (init_resource_processing): Remove.
5486 (write_resource_constructor): Take list_p parameter. Fill it in
5487 with _Jv_RegisterResource calls.
5488 * java-tree.h: Update prototypes.
5489
5490 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
5491
5492 PR java/1262
5493 * class.c (layout_class_method): Do not override package-private
5494 method if its in a different package.
5495 (split_qualified_name): Move here from parse.y. Rename from
5496 breakdown_qualified. Add comment.
5497 (in_same_package): Move here from parse.y. Add comment.
5498 * java-tree.h (break_down_qualified, in_same_package): Declare.
5499 (in_same_package): Likewise.
5500 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5501 Callers updated.
5502
5503 2004-06-29 Andrew Haley <aph@redhat.com>
5504
5505 * except.c (expand_start_java_handler): Push a new binding level.
5506 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5507 register_exception_range() to register where we'll do it.
5508 (expand_end_java_handler): Remove old bogus code. Replace with
5509 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5510 the top of the expression we're curently building.
5511 (maybe_end_try): Delete.
5512 * decl.c (binding_level.exception_range): New field.
5513 (clear_binding_level): Add field exception_range. Reformat.
5514 (poplevel): Call expand_end_java_handler().
5515 (poplevel): Call java_add_stmt only if functionbody is false.
5516 (maybe_poplevels): Don't call maybe_end_try() from here.
5517 (end_java_method): Clear no longer used trees in function decl.
5518 (register_exception_range): New function.
5519 * java-tree.h (register_exception_range, struct eh_range): Declare.
5520
5521 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
5522
5523 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5524
5525 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
5526
5527 Formatting fixes.
5528 * expr.c (class_has_finalize_method): Fix method name indentation.
5529 (expand_java_call): Remove K&R style parameter declaration.
5530 (expand_invoke): Fix statement indentation.
5531 (expand_java_field_op): Likewise.
5532 * parse-scan.y: Fix typo.
5533 (reset_report): Fix method name indentation.
5534 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5535 line. Fix typos.
5536 * verify.c (verify_jvm_instructions): Document parameters, insert
5537 page break.
5538 * lang.c (lang_init_source): Fix method name indentation.
5539 * class.c (common_enclosing_context_p): Likewise.
5540 (emit_symbol_table): Fix parameter list indentation.
5541 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5542 parameter declaration.
5543 * constants.c: Fix copyright notice indentation.
5544 * typeck.c (find_method_in_superclasses): Fix parameter list
5545 indentation.
5546 (find_method_in_interfaces): Likewise.
5547 * zextract.c (makelong): Fix method name indentation.
5548
5549 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5550
5551 PR java/15715.
5552 * parse.y (create_interface): Set correct access modifiers for
5553 interfaces.
5554 * jcf-write.c (get_classfile_modifiers): New function.
5555 (generate_classfile): Use get_classfile_modifiers, not
5556 get_access_flags.
5557
5558 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5559
5560 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5561 dependency to current parser context, not NULL_TREE, for top-level
5562 classes.
5563 (jdep_resolve_class): Enable member access check for all inner
5564 class dependencies.
5565
5566 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5567
5568 * parse.y (qualify_and_find): Pass type decl, not identifier, to
5569 load_class.
5570
5571 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5572
5573 PR java/15734
5574 * expr.c (expand_java_field_op): Ensure that target class for static
5575 field access has been loaded.
5576
5577 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5578 Ranjit Mathew <rmathew@hotmail.com>
5579
5580 PR java/1207, java/16178
5581 * jcf-parse.c (load_class): Return immediately if passed a type decl
5582 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5583 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5584 before calling load_class.
5585 (qualify_and_find): Likewise.
5586 (find_in_imports_on_demand): Likewise.
5587 (find_applicable_accessible_methods_list): Likewise.
5588
5589 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
5590
5591 * parse.y (java_layout_seen_class_methods): Don't call load_class
5592 on class defined by source parser.
5593
5594 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
5595
5596 * parse.y (set_nested_class_simple_name_value): Removed.
5597 (java_complete_expand_class): Remove calls to
5598 set_nested_class_simple_name_value.
5599
5600 2004-06-22 Andrew Haley <aph@redhat.com>
5601 Ranjit Mathew <rmathew@hotmail.com>
5602
5603 Fixes PR java/16113.
5604 * decl.c (force_poplevels): Remove call to expand_end_bindings.
5605
5606 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
5607
5608 * parse.y (create_class): Correct diagnostic message about
5609 java.lang.Object extending anything else.
5610
5611 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5612
5613 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5614 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5615 * constants.c (build_ref_from_constant_pool): Likewise.
5616 * expr.c (build_java_array_length_access): Likewise.
5617 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5618 (invoke_build_dtable, build_invokevirtual): Likewise.
5619 (build_invokeinterface, java_expand_expr): Likewise.
5620 (emit_init_test_initialization): Likewise.
5621 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5622 * parse.y (make_qualifed_name, build_array_ref): Likewise.
5623
5624 2004-06-21 Andrew Haley <aph@redhat.com>
5625
5626 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5627 block.
5628
5629 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5630
5631 * jcf.h (struct JCF): Change java_source, right_zip and finished
5632 to unsigned int.
5633 * lex.h (struct java_lexer): Change hit_eof, read_anything,
5634 byte_swap and use_fallback to unsigned int.
5635 * parse.h (struct _jdep): Change flag0 to unsigned int.
5636
5637 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
5638
5639 Fixes PR java/13948
5640 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5641 before trying to lay out its methods.
5642 * jcf-parse.c (read_class): Track parsed files using canonical paths
5643 obtained via lrealpath from libiberty.
5644 (java_parse_file): Likewise.
5645 (parse_source_file_1): Rename formal parameter to reflect its
5646 modified purpose. Minor formatting fix.
5647
5648 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5649
5650 * class.c (emit_register_classes): Make the function uninlinable,
5651 do not set current_function_cannot_inline.
5652 * resource.c (write_resource_constructor): Do not reset
5653 flag_inline_functions around rest_of_compilation.
5654
5655 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
5656
5657 PR java/15769
5658 * expr.c (java_truthvalue_conversion): Handle
5659 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5660 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5661 i.e. return the expression.
5662
5663 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
5664
5665 * gjavah.c: Include version.h
5666
5667 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
5668
5669 * jcf-write.c (generate_bytecode_conditional): Correct handling
5670 of unordered conditionals. Add comment.
5671
5672 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
5673 Per Bothner <per@bothner.com>
5674
5675 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5676 local variable was initialised upon declaration.
5677 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5678 variable was final and initialised upon declaration.
5679 * check-init.c (check_final_reassigned): Give error only if a blank
5680 final is not definitely unassigned or if an initialised final is
5681 reassigned.
5682 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5683 assignment expressions. Remove case MODIFY_EXPR, label do_default.
5684 (check_init): Perform initialised-variable-removing-optimisation
5685 only on non-final local variables.
5686
5687 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5688
5689 * jcf-write.c (generate_bytecode_conditional): Handle binops
5690 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5691 and LTGT_EXPR.
5692 (generate_bytecode_insns): Likewise.
5693
5694 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5695
5696 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5697 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5698
5699 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5700
5701 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5702 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5703
5704 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5705
5706 * decl.c (struct binding_level): Add GTY marker. Compile
5707 binding_depth unconditionally.
5708 (current_binding_level, free_binding_level, global_binding_level):
5709 Likewise.
5710 (clear_binding_level): Unconditionally set binding_depth.
5711 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5712
5713 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5714
5715 * lex.c (java_new_lexer): Set 'encoding'.
5716 (java_read_char): Improve error message for unrecognized characters.
5717 * lex.h (struct java_lexer): New field 'encoding'.
5718
5719 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5720
5721 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5722
5723 2004-05-21 Mark Wielaard <mark@klomp.org>
5724
5725 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5726 extern.
5727
5728 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
5729
5730 * typeck.c: Remove non-printable character 160.
5731
5732 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
5733
5734 * check-init.c: Correct minor typos.
5735
5736 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5737
5738 * Make-lang.in, expr.c, java-gimplify.c: Rename
5739 tree-simple.[ch] to tree-gimple.[ch].
5740
5741 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
5742
5743 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5744
5745 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5746
5747 Merge from tree-ssa-20020619-branch. See
5748 ChangeLog.tree-ssa for details.
5749
5750 * Make-lang.in, builtins.c, check-init.c, class.c,
5751 constants.c, decl.c, except.c, expr.c, java-except.h,
5752 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5753 lang.c, lang.opt, parse.y, resource.c: Merged.
5754 * java-gimplify.c: New file.
5755
5756 2004-05-10 Andrew Haley <aph@redhat.com>
5757
5758 * parse.y (create_class): Set TYPE_VFIELD.
5759 * decl.c (java_init_decl_processing): Likewise.
5760
5761 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5762 * class.c (make_method_value): Replace DECL_VINDEX with call to
5763 get_method_index().
5764 (get_dispatch_vector): Likewise.
5765 (layout_class_method): Likewise.
5766 Replace set of DECL_VINDEX with call to set_method_index().
5767 (set_method_index): New function.
5768 (get_method_index): New function.
5769 * java-tree.h (set_method_index): New function decl.
5770 (get_method_index): New function decl.
5771
5772 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
5773
5774 * parse.y (check_pkg_class_access): Add new argument
5775 and use it when cl is NULL to call lookup_cl on it.
5776 (parser_check_super_interface): Do not call lookup_cl.
5777 Pass this_decl to check_pkg_class_access and NULL
5778 instead of lookup_cl.
5779 (parser_check_super): Update for change in
5780 check_pkg_class_access.
5781 (do_resolve_class): Likewise.
5782 (process_imports): Likewise.
5783 (find_in_imports_on_demand): Likewise.
5784 (resolve_qualified_expression_name): Likewise.
5785
5786 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
5787
5788 Fixes PR java/9685, PR java/15073
5789 * parse.y (accessibility_string): New method.
5790 (not_accessible_field_error): Use accessibility_string()
5791 instead of java_accstring_lookup().
5792 (resolve_qualified_expression_name): Check with
5793 check_pkg_class_access() before allowing access using
5794 qualified names.
5795 Fix comment typo.
5796 Use check_pkg_class_access() instead of not_accessible_p()
5797 for unqualified types.
5798 (not_accessible_p): Use DECL_CONTEXT (member) instead of
5799 REFERENCE for package-private access checking.
5800 (patch_method_invocation): Use accessibility_string() instead
5801 of java_accstring_lookup().
5802
5803 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
5804
5805 Fixes PR java/15133
5806 * gjavah.c (struct method_name): Add member is_native.
5807 (overloaded_jni_method_exists_p): Match candidate method only if
5808 it is native.
5809 (print_method_info): Initialise is_native flag from the method's
5810 access flags.
5811
5812 2004-04-30 Roger Sayle <roger@eyesopen.com>
5813
5814 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5815 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5816
5817 2004-04-22 Roger Sayle <roger@eyesopen.com>
5818
5819 * resource.c (write_resource_constructor): Guard call to possibly
5820 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5821
5822 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
5823
5824 * class.c (make_class_data): Add new field aux_info.
5825 * decl.c (java_init_decl_processing): Push type and decl for
5826 `aux_info'.
5827
5828 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
5829
5830 * expr.c (expand_java_NEW): Don't use size argument for
5831 _Jv_AllocObject calls.
5832 * parse.y (patch_invoke): Likewise.
5833
5834 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
5835
5836 * expr.c (build_invokeinterface): Remove unused variables to
5837 fix warnings.
5838
5839 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
5840
5841 * class.c (get_interface_method_index): New function. Return dispatch
5842 index for interface method.
5843 (make_method_value): For interface methods, set index field to
5844 iface dispatch index, not DECL_VINDEX.
5845 * expr.c (build_invokeinterface): Use get_interface_method_index.
5846
5847 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5848
5849 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
5850
5851 2004-03-31 Andrew Haley <aph@redhat.com>
5852
5853 PR java/14104
5854 * jcf-io.c (opendir_in_zip): Tidy up error handling.
5855
5856 2004-03-30 Zack Weinberg <zack@codesourcery.com>
5857
5858 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
5859 form of GTY markers.
5860
5861 2004-03-25 Marcus Meissner <meissner@suse.de>
5862
5863 PR java/14689:
5864 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
5865
5866 2004-03-23 Tom Tromey <tromey@redhat.com>
5867
5868 PR java/14315:
5869 * jcf-write.c (make_class_file_name): Don't report if mkdir
5870 failed with EEXIST.
5871
5872 2004-03-23 Tom Tromey <tromey@redhat.com>
5873
5874 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
5875
5876 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
5877
5878 * class.c, gjavah.c, lang.c: Fix comment typos.
5879 * gcj.texi: Fix typos.
5880
5881 2004-03-19 Per Bothner <per@bothner.com>
5882
5883 * gcj.texi (Code Generation): Document new flags and assert defaults.
5884
5885 * class.c (assume_compiled_node_struct): Rename type to
5886 class_flag_node_struct, as it is now also used for enable_assertions.
5887 Rename assume_compiled_node typedef. Rename excludep field to value.
5888 (find_assume_compiled_node): Rename function to find_class_flag_node.
5889 Minor optimization - avoid needless strlen.
5890 (add_assume_compiled): Some tweaking and optimization.
5891 Rename and generalize to add_class_flag takem an extra parameter.
5892 (add_assume_compled): New just calls add_class_flag.
5893 (add_enable_assert, enable_assertions): New functions.
5894 (enable_assert_tree): New static.
5895 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
5896 * lang.opt (fenable-assertions, fenable-assertions=,
5897 fdisable-assertions, fdisable-assertions=): New options.
5898 * lang.c (java_handle_option): Handle new options.
5899 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
5900 class in an interface - create helper class nested in outer interface.
5901 (build_assertion): Short-circuit if enable_assertions is false.
5902
5903 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5904
5905 * java-tree.h: Changes throughout to add checking to macros
5906 and numerous whitespace changes.
5907 (VAR_OR_FIELD_CHECK): New macro.
5908 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
5909 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
5910
5911 2004-03-16 Per Bothner <per@bothner.com>
5912
5913 * jcf-jump.c (options): New --print-constants option.
5914 * gcj.texi (Invoking jcf-dump): Document --print-constants.
5915
5916 * jcf-dump.c (flag_print_constant_pool): Default to off.
5917 (print_constant_terse_with_index): New helper function.
5918 (various places): Check flag_print_constant_pool where missing.
5919 (main): If verbose set flag_print_constant_pool.
5920 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
5921
5922 2004-03-15 Andrew Haley <aph@redhat.com>
5923
5924 PR java/14581
5925 * parse.y (java_complete_lhs): Check that final variable has an
5926 initializer.
5927
5928 2004-03-12 Andrew Haley <aph@redhat.com>
5929
5930 PR java/14551
5931 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5932 conversion.
5933
5934 2004-02-29 Roger Sayle <roger@eyesopen.com>
5935
5936 * jcf-parse.c (java_parse_file): Handle the case that input_filename
5937 is NULL.
5938
5939 2004-02-27 Per Bothner <per@bothner.com>
5940
5941 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
5942 suggestion: Use build_incomplete_class_ref.
5943 This fixes PR java/13508, java/11714.
5944
5945 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
5946
5947 * java/parse.h: Update copyright.
5948
5949 2004-02-26 Andrew Haley <aph@redhat.com>
5950
5951 PR java/14231:
5952 * parse.y (check_interface_throws_clauses): Check for
5953 !METHOD_INVISIBLE (iface_method).
5954 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5955 well as CLASS_ABSTRACT.
5956
5957 2004-02-25 Per Bothner <per@bothner.com>
5958
5959 * parse.y (build_assertion): If we're in an inner class, create the
5960 class$ helper routine in the outer class.
5961
5962 2004-02-19 Richard Henderson <rth@redhat.com>
5963
5964 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5965
5966 2004-02-16 Geoffrey Keating <geoffk@apple.com>
5967
5968 * Make-lang.in (java.install-man): Add extra dependencies.
5969
5970 2004-02-13 Geoffrey Keating <geoffk@apple.com>
5971
5972 * Make-lang.in: Install man pages under the same names
5973 (possibly transformed) as the program they document.
5974
5975 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
5976
5977 * gjavah.c: Include "intl.h".
5978 (error): New function.
5979 (main): Call gcc_init_libintl.
5980 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5981 print_stub_or_jni, process_file, main): Use error rather than
5982 fprintf.
5983 (print_method_info, usage, help, version, main): Mark strings for
5984 translation with _. Avoid splitting up sentences. Send
5985 information messages to stdout.
5986 * jcf-dump.c: Include "intl.h".
5987 (main): Call gcc_init_libintl.
5988 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5989 Mark error, usage and version messages for translation with _.
5990 Avoid splitting up sentences.
5991 * jv-scan.c: Include "intl.h".
5992 (fatal_error, warning): Change parameter s to msgid. Translate
5993 messages.
5994 (main): Call gcc_init_libintl.
5995 (usage, help, version): Mark error, usage and version messages for
5996 translation with _. Avoid splitting up sentences.
5997 * jvgenmain.c: Include "intl.h".
5998 (main): Call gcc_init_libintl.
5999 (usage, main): Mark error messages for translation with _.
6000 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6001 JVGENMAIN_OBJS): Add intl.o.
6002 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6003 java/jvgenmain.o): Update dependencies.
6004
6005 2004-02-08 Per Bothner <per@bothner.com>
6006
6007 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6008 class don't use not_accessible_field_error, which can get confused.
6009
6010 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6011
6012 Make-lang.in (po-generated): Delete.
6013
6014 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6015
6016 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6017 Depend on target.h.
6018 * decl.c: Include target.h.
6019 (start_java_method): Replace PROMOTE_PROTOTYPES with
6020 targetm.calls.promote_prototypes.
6021 * expr.c: Include target.h.
6022 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6023 targetm.calls.promote_prototypes.
6024 * parse.y: Include target.h.
6025 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6026 with targetm.calls.promote_prototypes.
6027
6028 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6029
6030 * typeck.c: Update copyright.
6031
6032 2004-02-02 Tom Tromey <tromey@redhat.com>
6033
6034 * decl.c (java_init_decl_processing): Remove duplicate
6035 gnu/gcj/RawData.
6036
6037 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6038
6039 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6040
6041 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6042
6043 * expr.c (build_field_ref): Move variable
6044 definition up.
6045
6046 2004-01-28 Andrew Haley <aph@redhat.com>
6047
6048 * expr.c (build_field_ref): Widen field offset.
6049
6050 2004-01-27 Andrew Haley <aph@redhat.com>
6051
6052 java/13273
6053 * parse.y (check_interface_throws_clauses): Make sure class_decl
6054 has been loaded.
6055
6056 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6057
6058 PR java/13733
6059 * parse.y (patch_assignment): Don't modify lhs_type for
6060 reference assignments.
6061
6062 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6063
6064 * Make-lang.in: Replace $(docdir) with doc.
6065 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6066 (java.install-man): Revamp rule.
6067
6068 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6069
6070 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6071 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6072 instead of deferred backquote.
6073
6074 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6075
6076 * typeck.c (find_method_in_interfaces): Move variable
6077 definition up.
6078
6079 2004-01-16 Andrew Haley <aph@redhat.com>
6080
6081 PR java/13273:
6082 * typeck.c (shallow_find_method): New.
6083 (find_method_in_superclasses): New.
6084 (find_method_in_interfaces): New.
6085 (lookup_do): Rewrite.
6086 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6087
6088 * jcf-parse.c (read_class): Save and restore output_class.
6089 * decl.c (java_expand_body): Set output_class from fndecl.
6090
6091 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6092
6093 * class.c (gen_indirect_dispatch_tables): Fix string length
6094 calculations.
6095
6096 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6097
6098 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6099 (java.srcextra): Copy above back to source directory if requested.
6100 (po-generated): Delete reference to $(parsedir).
6101 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6102 Use implicit rule.
6103
6104 2004-01-14 Jan Hubicka <jh@suse.cz>
6105
6106 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6107 estimation.
6108
6109 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6110
6111 * java-tree.h (java_expand_expr): Change prototype.
6112 * expr.c (java_expand_expr): Add alt_rtl parameter.
6113
6114 2004-01-09 Andrew Haley <aph@redhat.com>
6115
6116 PR java/12755:
6117 * parse.y (java_fix_constructors): Set output_class.
6118 (java_reorder_fields): Likewise.
6119 (java_layout_classes): Likewise.
6120 (java_expand_classes): Generate indirect dispatch tables.
6121 (java_expand_classes): Set output_class.
6122 (java_finish_classes): Likewise.
6123 * lang.c (java_init): Turn on always_initialize_class_p if we're
6124 using indirect dis[atch.
6125 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6126 (java_get_callee_fndecl): Use class local atable.
6127 * jcf-parse.c
6128 (always_initialize_class_p): Decl moved to java-tree.h.
6129 (HANDLE_CLASS_INFO): Set output_class.
6130 (read_class): Likewise.
6131 (parse_class_file): Call gen_indirect_dispatch_tables.
6132 (parse_zip_file_entries): Set output_class.
6133 (java_parse_file): Set output_class. Don't emit symbol tables.
6134 * java-tree.h (output_class): New.
6135 Remove global declarations for otable, atable, and ctable.
6136 (always_initialize_class_p): moved here from decl.c.
6137 (DECL_OWNER): New.
6138 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6139 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6140 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6141 (struct lang_type): Add otable_methods, otable_decl,
6142 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6143 ctable_decl, catch_classes, type_to_runtime_map.
6144 * expr.c (build_field_ref): Make otable, atable, and ctable class
6145 local rather than global.
6146 (build_known_method_ref): Likewise.
6147 (build_invokeinterface): Likewise.
6148 (java_expand_expr): Pass runtime type (rather than actual type) to
6149 expand_start_catch.
6150 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6151 this class. Look up each class in that map to delete duplicates.
6152 (expand_end_java_handler): Pass runtime type (rather than actual
6153 type) to expand_start_catch.
6154 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6155 (do_nothing): New.
6156 (java_init_decl_processing): Rearrange things. Remove global
6157 declarations of otable, atable, and ctable.
6158 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6159 (java_expand_body): Set output_class.
6160 * constants.c (build_constant_data_ref): Use output_class, not
6161 current_class.
6162 (alloc_name_constant): Likewise.
6163 * class.c (gen_indirect_dispatch_tables): New.
6164 (build_class_ref): Generate hard reference to superclass, even if
6165 using indirect dispatch.
6166 (build_static_field_ref): Use class local atable.
6167 (make_class_data): Generate hard reference to superclass, even if
6168 using indirect dispatch.
6169 Generate symbolic references to interfaces when using indirect
6170 dispatch.
6171 (make_class_data): Emit otable, atable, and ctable.
6172 Make otable, atable, and ctable class local rather than global.
6173 (emit_catch_table): Make otable, atable, and ctable class local
6174 rather than global.
6175
6176 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6177
6178 * parse.y (catch_clause_parameter): Fix typo.
6179
6180 PR java/13404
6181 * parse.y: (catch_clause_parameter): Return early if $3, aka
6182 formal_parameter, is null.
6183
6184 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6185
6186 * class.c: Remove uses of "register" specifier in
6187 declarations of arguments and local variables.
6188 * decl.c: Likewise.
6189 * expr.c: Likewise.
6190 * gjavah.c: Likewise.
6191 * jcf-dump.c: Likewise.
6192 * jcf-io.c: Likewise.
6193 * jcf-parse.c: Likewise.
6194 * jcf-write.c: Likewise.
6195 * keyword.h: Likewise.
6196 * parse.y: Likewise.
6197 * typeck.c: Likewise.
6198 * verify.c: Likewise.
6199
6200 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
6201
6202 * Make-lang.in (GCJ_CROSS_NAME): Delete.
6203 (java.install_common, java.install-man): Adjust for above.
6204 (java.uninstall): Likewise.
6205
6206 2003-12-03 Michael Koch <konqueror@gmx.de>
6207
6208 * class.c (make_class_data):
6209 Push field value to 'hack_signers' instead of 'signers'.
6210 * decl.c (java_init_decl_processing):
6211 Push field 'hack_signers' instead of 'signers'.
6212
6213 2003-12-03 Zack Weinberg <zack@codesourcery.com>
6214
6215 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6216 including iconv.h.
6217
6218 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
6219
6220 PR java/12374:
6221 * parse.y (qualify_ambiguous_name): Remove lots of broken
6222 field access processing - there's no need to do that here,
6223 because we have resolve_field_access. Remove
6224 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6225 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6226 used.
6227
6228 2003-12-01 Jeff Sturm <jsturm@one-point.com>
6229
6230 Fix PR java/13237
6231 * parse.y (java_complete_lhs): Save location prior to patching
6232 CALL_EXPR.
6233
6234 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
6235
6236 PR java/12548
6237 * resource.c (write_resource_constructor): Append
6238 "_resource" to constructor identifier name.
6239
6240 2003-11-25 Jeff Sturm <jsturm@one-point.com>
6241
6242 Fix PR java/13183.
6243 * constants.c (cpool_for_class): New function.
6244 (outgoing_cpool): Remove global variable.
6245 (alloc_name_constant): Use cpool_for_class.
6246 (build_constants_constructor): Likewise.
6247 * decl.c (java_expand_body): Set current_class.
6248 * java-tree.h (outgoing_cpool) Remove declaration.
6249 (init_outgoing_cpool): Likewise.
6250 * jcf-parse.c (init_outgoing_cpool): Remove function.
6251 (parse_class_file): Don't call init_outgoing_cpool.
6252 * parse.y (java_complete_expand_methods): Don't call
6253 init_outgoing_cpool. Don't save outgoing_cpool.
6254 (java_expand_classes): Don't restore outgoing_cpool.
6255 (java_finish_classes): Likewise.
6256
6257 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
6258
6259 * Make-lang.in: (java.install-common) Add
6260 symlink for $(target_noncanonical)-gcjh for
6261 native builds.
6262
6263 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6264
6265 * Make-lang.in (java.extraclean): Delete.
6266
6267 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6268
6269 * Make-lang.in (check-java): Add.
6270
6271 2003-11-19 Jeff Sturm <jsturm@one-point.com>
6272
6273 Fix PR java/13024.
6274 * except.c (prepare_eh_table_type): Allocate variable-sized
6275 buffer `buf' with alloca.
6276
6277 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6278
6279 Fix PR java/12857.
6280
6281 decl.c (java_init_decl_processing): Don't initialize
6282 class_not_found_type_node, no_class_def_found_type_node.
6283
6284 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6285 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6286 (class_not_found_type_node, no_class_def_found_type_node):
6287 Don't define.
6288
6289 parse.y (build_dot_class_method_invocation): Add this_class
6290 argument. Qualify method invocations to a different class.
6291 (create_new_parser_context): Initialize saved_data_ctx to 0.
6292 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6293 (build_dot_class_method): Don't load classes. Register
6294 incomplete types.
6295 (build_incomplete_class_ref): Special cases for interfaces
6296 and inner classes. Move build_dot_class_method call to here...
6297 (patch_incomplete_class_ref): ...from here. Pass current_class
6298 to build_dot_class_method_invocation.
6299 (build_assertion): Pass class_type to
6300 build_dot_class_method_invocation.
6301 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6302
6303 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6304
6305 Fix PR java/12739.
6306 * java-tree.h (BLOCK_EMPTY_P): Define.
6307 * parse.y (java_complete_lhs): Check for empty blocks
6308 in TRY_FINALLY_EXPR case.
6309
6310 2003-11-17 Andrew Haley <aph@redhat.com>
6311
6312 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6313 (struct lang_decl_var:freed): New variable.
6314 * decl.c (poplevel): Mark local vars that have gone out of scope.
6315 (push_jvm_slot): Don't use the RTL of a var that has gone out of
6316 scope.
6317
6318 2003-11-16 Jason Merrill <jason@redhat.com>
6319
6320 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6321 and TAGS files that include them for each front end.
6322
6323 2003-11-15 Tom Tromey <tromey@redhat.com>
6324
6325 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6326
6327 2003-11-12 Jason Merrill <jason@redhat.com>
6328
6329 PR optimization/12547
6330 * lang.c (java_tree_inlining_walk_subtrees): Just walk
6331 BLOCK_EXPR_BODY directly.
6332
6333 2003-11-12 Andrew Haley <aph@redhat.com>
6334
6335 PR java/11045
6336 * parse.y (fold_constant_for_init): Check that we really do have a
6337 constant.
6338
6339 PR java/11533
6340 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6341 init_test_decls being inlined.
6342
6343 PR java/12890:
6344 * parse.y (do_resolve_class): Check return value from
6345 breakdown_qualified().
6346
6347 2003-11-11 Tom Tromey <tromey@redhat.com>
6348
6349 PR java/12915:
6350 * parse.y (merge_string_cste): Handle case where we have a
6351 pointer that happens to be zero, not null_pointer_node.
6352
6353 2003-11-10 Tom Tromey <tromey@redhat.com>
6354
6355 * jcf-parse.c (classify_zip_file): Correctly compare
6356 filename_length against length of manifest file's name.
6357
6358 2003-11-08 Tom Tromey <tromey@redhat.com>
6359
6360 PR java/12894:
6361 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6362
6363 2003-11-06 Andrew Haley <aph@redhat.com>
6364
6365 * expr.c (java_stack_swap): Make sure destination stack slots are
6366 of the correct type.
6367
6368 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
6369
6370 * Make-lang.in (dvi): Move targets to $(docobjdir).
6371 (gcj.dvi): Simplify rule and adjust target.
6372 (gcj.info): Simplify rule.
6373 (gcj.pod): New intermediate rule.
6374 (gcjh.pod): Likewise.
6375 (jv-scan.pod): Likewise.
6376 (jcf-dump.pod): Likewise.
6377 (gij.pod): Likewise.
6378 (jv-convert.pod): Likewise.
6379 (rmic.pod): Likewise.
6380 (rmiregistry.pod): Likewise.
6381 (gcj.1): Delete.
6382 (gcjh.1): Delete.
6383 (jv-scan.1): Delete.
6384 (jcf-dump.1): Delete.
6385 (gij.1): Delete.
6386 (jv-convert.1): Delete.
6387 (rmic.1): Delete.
6388 (rmiregistry.1): Delete.
6389
6390 2003-11-02 Jeff Sturm <jsturm@one-point.com>
6391
6392 Fixes PR java/12866.
6393 * parse.y (resolve_qualified_expression_name): Move test
6394 for outer field access methods from here...
6395 (check_thrown_exceptions) ...to here.
6396
6397 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
6398
6399 * .cvsignore: Delete.
6400
6401 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
6402
6403 * verify.c (verify_jvm_instructions): Don't warn about legal
6404 eh binding regions generated for example by jdk 1.4.1.
6405
6406 2003-10-24 David S. Miller <davem@redhat.com>
6407
6408 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6409
6410 2003-10-22 Andrew Haley <aph@redhat.com>
6411
6412 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6413 (java_get_callee_fndecl): New.
6414
6415 * jcf-parse.c (java_parse_file): Call emit_catch_table().
6416
6417 * java-tree.h (ctable_decl): New.
6418 (catch_classes): New.
6419 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6420
6421 * decl.c (java_init_decl_processing): Add catch_class_type.
6422 Add ctable_decl.
6423 Add catch_classes field.
6424
6425 * class.c (build_indirect_class_ref): Break out from
6426 build_class_ref.
6427 (make_field_value): Check flag_indirect_dispatch.
6428 (make_class_data): Ditto.
6429 Tidy uses of PUSH_FIELD_VALUE.
6430 Add field catch_classes.
6431 (make_catch_class_record): New.
6432
6433 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6434
6435 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
6436
6437 * jcf-write.c: Follow spelling conventions.
6438 * parse.y: Likewise.
6439
6440 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
6441
6442 * ChangeLog: Fix typos.
6443 * expr.c: Fix comment typos.
6444 * jcf-write.c: Likewise.
6445 * lang.c: Likewise.
6446 * lex.c: Likewise.
6447 * mangle.c: Likewise.
6448 * parse-scan.y: Likewise.
6449 * parse.y: Likewise.
6450
6451 2003-10-22 Tom Tromey <tromey@redhat.com>
6452
6453 * expr.c (expand_byte_code): Only warn about dead bytecode when
6454 extra_warnings is set.
6455
6456 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
6457
6458 Fix for PR java/12586.
6459 * mangle.c (find_compression_record_match): Don't iterate through
6460 package namespace elements unless they all match compression_table
6461 entries.
6462
6463 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
6464
6465 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6466 (generate-manpages): Likewise.
6467 (java.maintainer-clean): Likewise.
6468 (gcj.info): Likewise.
6469 (gcj.1): Likewise.
6470 (gcjh.1): Likewise.
6471 (jv-scan.1): Likewise.
6472 (jcf-dump.1): Likewise.
6473 (gij.1): Likewise.
6474 (jv-convert.1): Likewise.
6475 (rmic.1): Likewise.
6476 (rmiregistry.1): Likewise.
6477 (java.install-man): Likewise.
6478 (parse-scan.o): Move and define complete compile line.
6479 (parse.o): Likewise.
6480 (jcf-tree-inline.o): Move.
6481
6482 2003-10-20 Mark Mitchell <mark@codesourcery.com>
6483
6484 * Make-lang.in (info): Update dependencies.
6485 (java.install-info): Remove.
6486 ($(srcdir)/java/gcj.info): Replace with ...
6487 ($(docobjdir)/gcj.info): ... this.
6488
6489 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
6490
6491 * Make-lang.in: Replace uses of $(target_alias) with
6492 $(target_noncanonical).
6493
6494 2003-10-09 Tom Tromey <tromey@redhat.com>
6495
6496 * decl.c (java_init_decl_processing): Declare signers field.
6497 * class.c (make_class_data): Set signers field.
6498
6499 2003-10-09 Jason Merrill <jason@redhat.com>
6500
6501 * parse.y (patch_assignment): Use make_node to create a BLOCK.
6502 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6503 POINTER_TYPE.
6504
6505 2003-10-06 Mark Mitchell <mark@codesourcery.com>
6506
6507 * Make-lang.in (java.info): Replace with ...
6508 (info): ... this.
6509 (java.dvi): Replace with ...
6510 (dvi): ... this.
6511 (java.generated-manpages): Replace with ...
6512
6513 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
6514
6515 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6516
6517 2003-10-01 Andrew Haley <aph@redhat.com>
6518
6519 * jcf-parse.c (java_parse_file): Write otable and atable.
6520 * java-tree.h (atable_methods): New.
6521 (atable_decl): New.
6522 (atable_syms_decl): New.
6523 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6524 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6525 (symbol_*type): Rename method_symbol* to symbol*type.
6526 (emit_offset_symbol_table): Delete.
6527 (emit_symbol_table): New.
6528 (get_symbol_table_index): New.
6529 (atable_type): New.
6530 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6531 (build_known_method_ref): Likewise.
6532 (get_symbol_table_index): Rename from get_offset_table_index.
6533 Parameterize to allow re-use by differing types of symbol table.
6534 (build_invokevirtual): Pass table to get_offset_table_index.
6535 * decl.c (java_init_decl_processing): Push types and decls for
6536 atable and atable_syyms.
6537 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6538 (make_class_data): Add new fields atable and atable_syms.
6539 (emit_symbol_table): Rename from emit_offset_symbol_table.
6540 Parameterize to allow re-use by different types of symbol table.
6541 (build_symbol_entry): Renamed from build_method_symbols_entry.
6542
6543 2003-09-30 Roger Sayle <roger@eyesopen.com>
6544
6545 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6546 semantics for SAVE_EXPR, by caching the result in a temporary.
6547
6548 2003-09-28 Richard Henderson <rth@redhat.com>
6549
6550 * check-init.c (check_init): Save and restore input_location
6551 instead of file and line separately.
6552 * decl.c (java_expand_body): Likewise.
6553 * jcf-write.c (generate_bytecode_insns): Likewise.
6554 * parse.y (safe_layout_class): Likewise.
6555 * jcf-parse.c (read_class, parse_class_file): Likewise.
6556 (java_parse_file): Use %H for warning locator.
6557
6558 2003-09-28 Roger Sayle <roger@eyesopen.com>
6559
6560 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6561 with void-type branches instead of using a COMPOUND_EXPR.
6562
6563 2003-09-28 Jeff Sturm <jsturm@one-point.com>
6564
6565 * decl.c (java_optimize_inline, dump_function): Remove.
6566 * java-tree.h (java_optimize_inline): Remove declaration.
6567 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6568 * parse.y (source_end_java_method, java_expand_classes):
6569 Likewise. Remove dead code.
6570
6571 2003-09-27 Roger Sayle <roger@eyesopen.com>
6572
6573 * lang.c (java_init_options): Set flag_evaluation_order.
6574 * expr.c (force_evaluation_order): Don't attempt to force
6575 evaluation order of binary operations using save_expr.
6576 * parse.y (java_complete_lhs): No longer need to call
6577 force_evaluation_order when constructing binary operators.
6578
6579 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6580 Bryce McKinlay <bryce@mckinlay.net.nz>
6581
6582 PR java/1333:
6583 * parse.y (not_accessible_field_error): New function.
6584 (resolve_expression_name): Check field access permissions.
6585 (resolve_qualified_expression_name): Use
6586 not_accessible_field_error.
6587 (resolve_qualified_expression_name): Likewise.
6588
6589 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6590
6591 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6592
6593 2003-09-23 Roger Sayle <roger@eyesopen.com>
6594
6595 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6596 with equal operands without side-effects.
6597
6598 2003-09-22 Jeff Sturm <jsturm@one-point.com>
6599
6600 * decl.c (java_init_decl_processing): Don't emit otable decls
6601 if flag_indirect_dispatch is not set.
6602
6603 2003-09-21 Richard Henderson <rth@redhat.com>
6604
6605 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6606 resource.c: Revert.
6607
6608 2003-09-21 Richard Henderson <rth@redhat.com>
6609
6610 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6611 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6612
6613 2003-09-20 Richard Henderson <rth@redhat.com>
6614
6615 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6616
6617 2003-09-18 Roger Sayle <roger@eyesopen.com>
6618
6619 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6620 * check-init.c (check_init): Likewise.
6621
6622 2003-09-18 Roger Sayle <roger@eyesopen.com>
6623
6624 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6625
6626 2003-09-16 Andrew Haley <aph@redhat.com>
6627
6628 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6629
6630 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
6631
6632 Fixes PR java/9577
6633 * mangle.c (find_compression_record_match): Skip
6634 over a "6JArray" (the array template mangled string)
6635 IDENTIFIER_NODE.
6636 (mangle_array_type): Correct minor typo.
6637 (atms): Move definition to the beginning.
6638
6639 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
6640
6641 * class.c (add_miranda_methods): Ensure super-interfaces are laid
6642 out. Fix for PR java/12254.
6643
6644 2003-09-11 Richard Henderson <rth@redhat.com>
6645
6646 * parse.y (source_end_java_method): Update for new
6647 cgraph_finalize_function argument.
6648
6649 2003-09-09 Richard Henderson <rth@redhat.com>
6650
6651 * parse.y (source_end_java_method): Update call to
6652 cgraph_finalize_function.
6653
6654 2003-09-03 Jeff Sturm <jsturm@one-point.com>
6655
6656 * decl.c (java_expand_body): New function.
6657 * expr.c (build_class_init): Set DECL_IGNORED_P.
6658 * java-tree.h (start_complete_expand_method,
6659 java_expand_body): Declare.
6660 * jcf-parse.c (cgraph.h): Include.
6661 (java_parse_file): Handle flag_unit_at_a_time.
6662 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6663 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6664 (java_estimate_num_insns): Use walk_tree_without_duplicates.
6665 (java_start_inlining): New function.
6666 * parse.h (java_finish_classes): Declare.
6667 * parse.y: Include cgraph.h.
6668 (block): Don't special-case empty block production.
6669 (craft_constructor): Set DECL_INLINE.
6670 (source_end_java_method): Handle flag_unit_at_a_time.
6671 Replace inline code with call to java_expand_body.
6672 (start_complete_expand_method): Remove static modifier.
6673 (java_expand_method_bodies): Patch function tree for
6674 class initialization and/or synchronization as needed.
6675 Don't begin RTL expansion yet.
6676 (java_expand_classes): Check flag_unit_at_a_time before
6677 calling finish_class.
6678 (java_finish_classes): New function.
6679 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6680 (patch_assignment): Set DECL_CONTEXT on temporary variable.
6681 (emit_test_initialization): Set DECL_IGNORED_P.
6682
6683 2003-09-03 Roger Sayle <roger@eyesopen.com>
6684
6685 * builtins.c (enum builtin_type): Delete unused enumeration.
6686 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6687
6688 2003-08-28 Tom Tromey <tromey@redhat.com>
6689
6690 * gcj.texi (Extensions): Document gcjlib URLs.
6691
6692 2003-08-20 Tom Tromey <tromey@redhat.com>
6693
6694 * gcj.texi (Extensions): Added xref.
6695 (libgcj Runtime Properties): Document
6696 gnu.gcj.runtime.VMClassLoader.library_control.
6697
6698 2003-08-20 Andrew Haley <aph@redhat.com>
6699
6700 * except.c (prepare_eh_table_type): Use new encoding for exception
6701 handlers when using -fno-assume-compiled.
6702
6703 2003-08-13 Tom Tromey <tromey@redhat.com>
6704
6705 * gcj.texi (Invoking gij): Document -X and -?.
6706
6707 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
6708
6709 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6710 GCJH_OBJS, JCFDUMP_OBJS
6711 * win32-host.c: Removed the unnecessary and broken dependency
6712 on jcf.h
6713
6714 2003-08-11 Tom Tromey <tromey@redhat.com>
6715
6716 * parse.y (java_check_regular_methods): Typo fixes. Call
6717 check_interface_throws_clauses. Use
6718 check_concrete_throws_clauses.
6719 (check_interface_throws_clauses): New function.
6720 (check_concrete_throws_clauses): New function.
6721 (hack_is_accessible_p): New function.
6722 (find_most_specific_methods_list): Added FIXME.
6723 * typeck.c (lookup_do): Use `flags' argument to decide what to
6724 do. Reimplemented.
6725 (lookup_argument_method_generic): New function.
6726 (lookup_argument_method2): Removed.
6727 * jcf.h (ACC_INVISIBLE): New define.
6728 * jcf-write.c (generate_classfile): Skip invisible methods.
6729 * class.c (add_miranda_methods): New function.
6730 (layout_class_methods): Use it.
6731 (get_access_flags_from_decl): Use ACC_INVISIBLE.
6732 * java-tree.h (METHOD_INVISIBLE): New define.
6733 (lang_decl_func) [invisible]: New field.
6734 (lookup_argument_method_generic): Declare.
6735 (SEARCH_INTERFACE): New define.
6736 (SEARCH_SUPER): Likewise.
6737 (SEARCH_ONLY_INTERFACE): Likewise.
6738 (SEARCH_VISIBLE): Likewise.
6739 (lookup_argument_method2): Removed declaration.
6740
6741 2003-08-05 Tom Tromey <tromey@redhat.com>
6742
6743 Fix for PR java/11600:
6744 * parse.y (java_complete_lhs): See whether we're calling a method
6745 on an array.
6746 (check_thrown_exceptions): Added `is_array_call' argument;
6747 fixed `clone' checking; updated all callers.
6748
6749 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
6750
6751 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6752
6753 2003-08-03 Tom Tromey <tromey@redhat.com>
6754
6755 * java-tree.h (METHOD_TRANSIENT): Removed.
6756 * decl.c (pushdecl): Removed some dead code.
6757 * class.c (get_access_flags_from_decl): Can't have transient
6758 method.
6759 (add_method_1): Can't have a transient method.
6760
6761 2003-07-28 Andreas Jaeger <aj@suse.de>
6762
6763 * jvspec.c: Convert to ISO C90 prototypes.
6764
6765 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
6766
6767 * decl.c (force_poplevels): Fix warning call.
6768
6769 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6770
6771 * expr.c (expand_java_field_op): Don't use xxx_with_decl
6772 (expand_java_field_op): Likewise.
6773 * class.c (layout_class_method): Likewise
6774 (emit_register_classes): Likewise.
6775 * decl.c (pushdecl): Likewise.
6776 (poplevel): Likewise.
6777 (force_poplevels): Likewise.
6778 (give_name_to_locals): Likewise.
6779 * check-init.c (check_for_initialization): Likewise.
6780
6781 2003-07-24 Jason Merrill <jason@redhat.com>
6782
6783 * java-tree.h: Move boolean_type_node et al to the back end.
6784
6785 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6786
6787 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6788 casts.
6789
6790 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
6791
6792 * lang.opt: Don't show -MD_ and -MDD_.
6793
6794 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
6795
6796 * lang-options.h: Remove.
6797 * lang.opt: Add help text.
6798
6799 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
6800
6801 * expr.c: Remove the last argument to expand_assignment().
6802
6803 2003-07-09 Jan Hubicka <jh@suse.cz>
6804
6805 * java-tree.h (DECL_NUM_STMTS): Rename to...
6806 (DECL_ESTIMATED_INSNS): ... this.
6807 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6808 New static functions.
6809 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6810 * parser.y (add_stmt_to_compound): Do not account statements.
6811
6812 2003-07-08 Mark Wielaard <mark@klomp.org>
6813
6814 * gcj.texi: CNI now expands to Compiled Native Interface.
6815
6816 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6817
6818 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6819
6820 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
6821
6822 * expr.c (expand_byte_code): Adjist emit_line_note call.
6823
6824 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
6825
6826 * lang.c (java_handle_option): Don't handle filenames.
6827
6828 2003-07-02 Zack Weinberg <zack@codesourcery.com>
6829
6830 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6831 DIR_SEPARATOR.
6832 Use FILENAME_CMP.
6833 * jcf-write.c: Don't default-define DIR_SEPARATOR.
6834 * jcf.h: Delete COMPARE_FILENAMES definition.
6835
6836 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
6837
6838 * lang.c (java_init_options): Update prototype.
6839
6840 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
6841
6842 * decl.c (poplevel): Adjust define_label call.
6843
6844 2003-06-27 Zack Weinberg <zack@codesourcery.com>
6845
6846 * gjavah.c (flag_jni): Make non-static.
6847 * parse-scan.y (ctxp): Make non-static.
6848
6849 * class.c (build_method_symbols_entry)
6850 * expr.c (get_offset_table_index)
6851 * jcf-parse.c (jcf_parse):
6852 Mark the definition static, matching the forward declaration.
6853
6854 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
6855
6856 * lang.c (java_handle_option): Don't check for missing arguments.
6857
6858 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
6859
6860 * class.c (push_class): Use a location_t to save place.
6861 (emit_register_classes): Set input_location. Adjust
6862 expand_function_end call.
6863 * resource.c (write_resource_constructor): Likewise.
6864 * decl.c (end_java_method): Adjust expand_function_end call.
6865 * parse.y (source_end_java_method): Likewise.
6866
6867 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
6868
6869 * lang.c (java_handle_option): Likewise.
6870
6871 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
6872
6873 * lang.c (java_handle_option): Special-casing of optional
6874 joined arguments no longer needed.
6875 * lang.opt: Update switches that take optional argument.
6876
6877 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
6878
6879 * lang.opt: Declare Java.
6880 * lang.c (java_init_options): Update.
6881
6882 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
6883
6884 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
6885
6886 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
6887
6888 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
6889 * lang.c (java_handle_option): -MD and -MMD have an underscore.
6890 * lang.opt: -MD and -MMD have an underscore.
6891
6892 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
6893
6894 * class.c (emit_register_classes): Adjust init_function_start
6895 call.
6896 * decl.c (complete_start_java_method): Likewise.
6897 * resource.c (write_resource_constructor): Likewise.
6898
6899 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
6900
6901 * Make-lang.in: Update to use options.c and options.h.
6902 * lang.c: Include options.h not j-options.h.
6903 (java_handle_option): Abort on unrecognized option.
6904 (java_init_options): Request Java switches.
6905
6906 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
6907
6908 * Make-lang.in: Handle mostlyclean.
6909
6910 2003-06-11 Tom Tromey <tromey@redhat.com>
6911
6912 * lang.c (java_handle_option): Update dependency_tracking for
6913 OPT_MF case.
6914
6915 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
6916 empty argument.
6917
6918 2003-06-10 Andrew Haley <aph@redhat.com>
6919
6920 * resource.c (write_resource_constructor): Use expand_expr to
6921 generate the address of the label attached to a resource.
6922 * Make-lang.in (java/resource.o): Add expr.h
6923
6924 2003-06-10 Andrew Haley <aph@redhat.com>
6925
6926 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6927 (java_decl_ok_for_sibcall): New.
6928
6929 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
6930
6931 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6932 (java/j-options.c, java/j-options.h): New.
6933 * java-tree.h (resource_name, compile_resource_file,
6934 compile_resource_data): Constify.
6935 * jcf-write.c (jcf_write_base_directory): Similarly.
6936 * jcf.h (jcf_write_base_directory): Similarly.
6937 * lang.c: Include j-options.h.
6938 (cl_options_count, cl_options, string_option, java_decode_option,
6939 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6940 process_option_with_no): Remove.
6941 (resource_name): Constify.
6942 (LANG_HOOKS_HANDLE_OPTION): Override.
6943 (java_handle_option): New.
6944 (java_init): Don't call jcf_path_init.
6945 (java_init_options): Call jcf_path_init.
6946 * lang.opt: New.
6947 * resource.c (compile_resource_data, compile_resource_file): Constify.
6948
6949 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
6950
6951 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6952 (struct lang_decl_func): Add last_line field.
6953 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6954 DECL_SOURCE_LINE_LAST): Remove.
6955 * parse.y (missing_return_error, finish_method_declaration,
6956 lookup_cl, start_artificial_method_body, source_end_java_method,
6957 start_complete_expand_method): Adjust.
6958
6959 2003-06-08 Tom Tromey <tromey@redhat.com>
6960
6961 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6962 fno-assume-compiled.
6963
6964 2003-06-08 Roger Sayle <roger@eyesopen.com>
6965
6966 * builtins.c (define_builtin_type, builtin_types): Delete.
6967 (define_builtin): Rewritten to take just the built-in code,
6968 the function's name, type and fallback library function name.
6969 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6970 (initialize_builtins): Overhaul to define the GCC builtins
6971 used by gcj manually, providing the Java run-time's
6972 implementations as the fallback library function.
6973
6974 2003-06-08 Anthony Green <green@redhat.com>
6975
6976 * parse.y (patch_cast): Fix conversions from floating-point to
6977 integral types.
6978
6979 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
6980
6981 * Make-lang.in: Update.
6982 * lang.c: Include opts.h. Define cl_options_count and cl_options.
6983
6984 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
6985
6986 * lang.c (java_init_options): Update.
6987
6988 2003-06-05 Jan Hubicka <jh@suse.cz>
6989
6990 * Make-lang.in: Add support for stageprofile and stagefeedback
6991
6992 2003-05-31 Roger Sayle <roger@eyesopen.com>
6993
6994 * lang.c (java_init_options): Prescribe wrap-around two's
6995 complement arithmetic overflow by setting flag_wrapv.
6996
6997 2003-05-29 Roger Sayle <roger@eyesopen.com>
6998
6999 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7000 (builtin_record): Add an additional builtin_code field to
7001 record which GCC built-in corresponds to the Java function.
7002 (java_builtins): Add new entries for atan, atan2, exp, log,
7003 pow and tan.
7004 (max_builtin, min_builtin, abs_builtin): Perform constant
7005 folding on the resulting tree.
7006 (java_build_function_call_expr): Likewise, perform constant
7007 folding on the resulting tree.
7008 (initialize_builtins): The NULL creators are now allowed in
7009 the java_builtins table, which is now terminated by an entry
7010 with builtin_code == END_BUILTINS.
7011 (check_for_builtin): Likewise. If the matching creator is
7012 NULL, construct the call using java_build_function_call_expr
7013 directly with the decl for the corresponding builtin_code.
7014
7015 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7016
7017 * win32-host.c: Normalize copyright boilerplate.
7018
7019 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7020
7021 * parse.y (print_int_node): Use string concatentation on
7022 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7023 function calls into one.
7024
7025 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7026
7027 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7028 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7029 all the affected error messages.
7030
7031 2003-05-13 Richard Henderson <rth@redhat.com>
7032
7033 * class.c (layout_class_method): Set DECL_EXTERNAL.
7034 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7035 * java-tree.h (java_mark_class_local): Declare.
7036 * jcf-parse.c (parse_class_file): Use it.
7037 * parse.y (java_expand_classes): Likewise.
7038
7039 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7040
7041 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7042 * lex.h: #include input.h.
7043 * jv-scan.c (input_filename): Remove.
7044
7045 2003-05-02 Tom Tromey <tromey@redhat.com>
7046
7047 PR java/10491:
7048 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7049 (handle_inner_classes): New function.
7050
7051 2003-05-01 Tom Tromey <tromey@redhat.com>
7052
7053 PR java/10459:
7054 * parse.y (finish_for_loop): Do nothing if update expression is a
7055 EXPR_WFL_NODE wrapping nothing.
7056 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7057
7058 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7059
7060 * lex.h (input_lineno): Remove declaration.
7061 * parse-scan.y: #include input.h.
7062 (input_filename): Remove declaration.
7063 (input_location): Add definition.
7064 (input_line): Remove definition.
7065
7066 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7067
7068 * lex.h (lineno): Rename to ...
7069 (input_line): ... here
7070 * parse-scan.y (lineno): Rename to ...
7071 (input_line): ... here.
7072 (reset_report): Rename lineno to input_line.
7073 * check-init.c (check_init): Likewise.
7074 * class.c (push_class): Likewise.
7075 * decl.c (complete_start_java_method, end_java_method): Likewise.
7076 * expr.c (expand_byte_code): Likewise.
7077 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7078 * jcf-write.c (generate_bytecode_insns): Likewise.
7079 * lex.c (java_init_lex, java_allocate_new_line,
7080 do_java_lex): Likewise.
7081 * parse.h (YYNOT_TWICE): Likewise.
7082 * parse.y (empty_statement, expression_statement,
7083 java_pop_parser_context, java_parser_context_save_global,
7084 yyerror, register_fields, method_header, safe_layout_class,
7085 find_in_imports_on_demand, create_artificial_method,
7086 source_end_java_method, start_complete_expand_method,
7087 build_thisn_assign, java_complete_lhs,
7088 maybe_absorb_scoping_block): Likewise.
7089
7090 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7091
7092 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7093 '/' when computing java source filename
7094
7095 2003-04-13 Tom Tromey <tromey@redhat.com>
7096
7097 * gjavah.c (print_c_decl): Indentation fix.
7098
7099 2003-04-12 Zack Weinberg <zack@codesourcery.com>
7100
7101 * class.c (make_field_value, make_method_value, get_dispatch_table)
7102 (make_class_data, emit_offset_symbol_table)
7103 * constants.c (build_constants_constructor)
7104 * java-tree.h (START_RECORD_CONSTRUCTOR)
7105 * parse.y (maybe_build_array_element_wfl):
7106 Use build_constructor.
7107
7108 2003-04-10 Eric Blake <ebb9@email.byu.edu>
7109
7110 PR java/10253:
7111 * parse.y (string_convert_int_cst): Always use at least one digit
7112 in string conversion. Remove ASCII dependence.
7113 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7114
7115 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7116
7117 * Make-lang.in: added win32-host.c
7118 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7119 resolves to open() on non-Win32 platforms and
7120 Win32-specific jcf_open_exact_case() on Win32
7121 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7122 when trying .java and .class files
7123 * win32-host.c: added to repository. Defines
7124 Win32-specific jcf_open_exact_case()
7125
7126 2003-04-10 Andrew Haley <aph@redhat.com>
7127
7128 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7129 (maybe_free_localvar): Renamed from localvar_free.
7130 Add new arg, really.
7131 (generate_bytecode_insns): Set new variable, jsrs.
7132 Only free local vars if no jsr insns have been emittted.
7133 Call maybe_free_localvar, not localvar_free.
7134
7135 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7136
7137 * gcj.texi: Remove @ at start of file.
7138
7139 2003-03-25 Tom Tromey <tromey@redhat.com>
7140
7141 * parse.y (create_interface): Call CHECK_DEPRECATED.
7142
7143 2003-03-23 Zack Weinberg <zack@codesourcery.com>
7144
7145 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7146
7147 2003-03-21 Zack Weinberg <zack@codesourcery.com>
7148
7149 * javaop.h (jfloat, jdouble): Make them structures mirroring
7150 the bit fields of IEEE float and double respectively.
7151 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7152 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7153 (union Word, union DWord): Delete.
7154 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7155
7156 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7157 D_NAN_MASK): Delete.
7158 (jni_print_float, jni_print_double): New. Generate
7159 hexadecimal floating constants.
7160 (print_field_info): Use jni_print_float/double.
7161
7162 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7163 finite floating point numbers for output; special case
7164 non-finite floats.
7165
7166 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7167
7168 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7169 Replace 0 and 1 with true and false in return statements.
7170
7171 2003-03-19 Tom Tromey <tromey@redhat.com>
7172
7173 * lex.c (do_java_lex): Renamed from java_lex.
7174 (java_lex): New function.
7175 Include timevar.h.
7176
7177 2003-03-13 Tom Tromey <tromey@redhat.com>
7178
7179 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7180 type.
7181
7182 2003-03-04 Andrew Haley <aph@redhat.com>
7183
7184 * gjavah.c (is_first_data_member): New global variable.
7185 (print_c_decl): If it's the first data member, align it as the
7186 superclass.
7187 (process_file): Set is_first_data_member.
7188
7189 2003-03-11 Tom Tromey <tromey@redhat.com>
7190
7191 * parse.y (resolve_field_access): Initialize class if field is
7192 found in another static field.
7193 * expr.c (build_class_init): Don't optimize out initialization of
7194 implemented interface.
7195
7196 2003-03-11 Andrew Haley <aph@redhat.com>
7197
7198 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7199 warning.
7200
7201 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
7202
7203 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7204 and DIR_SEPARATOR_2 for a target.
7205 Correct minor typos.
7206
7207 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7208 and DIR_SEPARATOR_2 for a target into account.
7209
7210 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
7211
7212 * lang.c (java_init): Update prototype, move code to java_post_options.
7213 (java_post_options): Similarly.
7214
7215 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
7216
7217 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7218 compare file name components depending on the case-sensitivity
7219 or otherwise of the host file system.
7220
7221 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7222 "strcmp" to compare file name components.
7223 Use IS_DIR_SEPARATOR instead of comparing directly against
7224 DIR_SEPARATOR.
7225 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7226 comparing directly against DIR_SEPARATOR.
7227
7228 2003-03-04 Tom Tromey <tromey@redhat.com>
7229
7230 * Make-lang.in (java.tags): New target.
7231
7232 2003-03-01 Roger Sayle <roger@eyesopen.com>
7233
7234 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7235 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7236
7237 2003-03-01 Tom Tromey <tromey@redhat.com>
7238
7239 * parse.y (jdep_resolve_class): Only check deprecation if we found
7240 a decl.
7241
7242 2003-02-28 Tom Tromey <tromey@redhat.com>
7243
7244 PR java/9695:
7245 * class.c (maybe_layout_super_class): Always pass a WFL to
7246 do_resolve_class.
7247 * parse.y (do_resolve_class): Updated comment to explain
7248 parameters.
7249
7250 2003-02-26 Tom Tromey <tromey@redhat.com>
7251
7252 * jcf-write.c (generate_classfile): Check whether class is
7253 deprecated before writing attribute count.
7254
7255 2003-02-25 Roger Sayle <roger@eyesopen.com>
7256
7257 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7258 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7259
7260 2003-02-23 Tom Tromey <tromey@redhat.com>
7261
7262 * lang-options.h: Added -Wdeprecated.
7263 * gcj.texi (Warnings): Document -Wdeprecated.
7264 * java-tree.h (flag_deprecated): Declare.
7265 * lang.c (lang_W_options): Added deprecated.
7266 (flag_deprecated): New global.
7267 * chartables.h: Rebuilt.
7268 * gen-table.pl (process_one): Look at whitespace.
7269 (print_tables): Define LETTER_SPACE, LETTER_MASK.
7270 * parse.h (CLEAR_DEPRECATED): New macro.
7271 (CHECK_DEPRECATED_NO_RESET): New macro.
7272 * jcf-parse.c (handle_deprecated): New function.
7273 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7274 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7275 * parse.y (resolve_type_during_patch): Check deprecation.
7276 (jdep_resolve_class): Likewise.
7277 (process_imports): Likewise.
7278 (resolve_expression_name): Likewise.
7279 (check_deprecation): Strip arrays from decl. Check
7280 flag_deprecated.
7281 (patch_method_invocation): Also check the particular constructor
7282 for deprecation.
7283 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7284 * jcf-write.c (append_deprecated_attribute): New function.
7285 (generate_classfile): Generate deprecated attribute when
7286 appropriate.
7287 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
7288 (java_lex) [case '*']: Simplify logic.
7289 (java_start_char_p): Use LETTER_MASK.
7290 (java_part_char_p): Likewise.
7291 (java_space_char_p): New function.
7292
7293 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
7294
7295 Change base class access representation.
7296 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7297 (add_interface_do): Likewise.
7298
7299 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
7300
7301 * decl.c (java_init_decl_processing): Change
7302 soft_lookupjnimethod_node to reflect the change in
7303 signature of _Jv_LookupJNIMethod in libjava/jni.cc
7304 * expr.c (build_jni_stub): Calculate and pass the size
7305 on the stack of the arguments to a JNI function. Use
7306 new target macro MODIFY_JNI_METHOD_CALL to allow a
7307 target to modify the call to a JNI method.
7308
7309 2003-02-08 Roger Sayle <roger@eyesopen.com>
7310
7311 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7312 instead of basename to avoid compiler warnings on Tru64.
7313
7314 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
7315
7316 * gcj.texi: Update to GFDL 1.2.
7317
7318 2003-01-31 Andrew Haley <aph@redhat.com>
7319
7320 * parse.y (java_expand_classes): Scan the whole class list looking
7321 for access methods that haven't yet been expanded.
7322
7323 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7324
7325 Fix for java/4269:
7326
7327 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7328 to fix bootstrap on sparc-unknown-netbsdelf1.5.
7329 * jcf-parse.c: Likewise.
7330
7331 2003-01-31 Mark Wielaard <mark@klomp.org>
7332
7333 * gjavah.c (throwable_p): Allocate 1 more byte for string.
7334
7335 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
7336
7337 * class.c (make_class): Use BINFO_ELTS.
7338 (set_super_info): Likewse.
7339 (add_interface_do): Likewise.
7340
7341 2003-01-30 Tom Tromey <tromey@redhat.com>
7342
7343 * jcf-parse.c (read_class): Update identifier's class value if it
7344 changed during parsing.
7345
7346 2003-01-30 Loren James Rittle <ljrittle@acm.org>
7347
7348 * Make-lang.in (po-generated): Find the targets in $(parsedir).
7349 Propagate change to all other rules as required.
7350 (java/parse-scan.o): Add explicit dependency on
7351 $(parsedir)/java/parse-scan.c .
7352
7353 2003-01-29 Tom Tromey <tromey@redhat.com>
7354
7355 * parse.y (patch_assignment): Only transform the rhs of an
7356 assignment when compiling to native.
7357
7358 2003-01-28 Tom Tromey <tromey@redhat.com>
7359
7360 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7361
7362 2003-01-28 Tom Tromey <tromey@redhat.com>
7363
7364 * lex.c (java_lex): Don't include UEOF as part of token.
7365 (java_read_unicode): Error if \u sequence prematurely terminated.
7366
7367 2003-01-27 Tom Tromey <tromey@redhat.com>
7368
7369 * parse.y (java_check_regular_methods): Check for construct after
7370 checking types in throws clause.
7371
7372 2003-01-24 Tom Tromey <tromey@redhat.com>
7373
7374 * class.c (build_static_field_ref): Only a String or numeric field
7375 can fold to a constant.
7376
7377 2003-01-23 Tom Tromey <tromey@redhat.com>
7378
7379 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7380 file name in resource buffer.
7381
7382 2003-01-23 Tom Tromey <tromey@redhat.com>
7383
7384 * expr.c (build_known_method_ref): Use method's context to find
7385 method table index.
7386
7387 2003-01-23 Tom Tromey <tromey@redhat.com>
7388
7389 * constants.c (set_constant_entry): Allocated cleared memory.
7390
7391 2003-01-22 Tom Tromey <tromey@redhat.com>
7392
7393 * java-tree.h: Don't use PARAMS.
7394 * resource.c: Add prototypes for all functions.
7395 (write_resource_constructor): Use `const char *' to avoid
7396 warning.
7397
7398 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
7399
7400 * jcf-parse.c (process_zip_dir): Remove unused variable.
7401
7402 2003-01-22 Tom Tromey <tromey@redhat.com>
7403
7404 * expr.c (build_invokeinterface): Abort if method's context is not
7405 an interface.
7406
7407 2003-01-22 Tom Tromey <tromey@redhat.com>
7408
7409 * gcj.texi (Input and output files): Mention non-class entries.
7410 * decl.c (java_init_decl_processing): Call
7411 init_resource_processing.
7412 * java-tree.h (compile_resource_data, write_resource_constructor,
7413 compile_resource_file, init_resource_processing): Declare.
7414 * config-lang.in (gtfiles): Added resource.c.
7415 * Make-lang.in (gt-java-resource.h): New target.
7416 (JAVA_OBJS): Added resource.o.
7417 (java/resource.o): New target.
7418 * resource.c: New file.
7419 * class.c (compile_resource_file): Moved to resource.c.
7420 (registerResource_libfunc): Likewise.
7421 (utf8_decl_list): Mark with GTY; now static.
7422 * jcf-parse.c (classify_zip_file): New function.
7423 (parse_zip_file_entries): Use it; compile .properties files.
7424 (process_zip_dir): Use classify_zip_file and compute_class_name.
7425 Don't write class name into zip directory.
7426 (java_parse_file): Call write_resource_constructor.
7427 (compute_class_name): New function.
7428 * jcf-io.c (read_zip_member): Reindented.
7429
7430 2003-01-21 Tom Tromey <tromey@redhat.com>
7431
7432 * class.c (supers_all_compiled): New function.
7433 (make_class_data): Use it.
7434
7435 2003-01-21 Tom Tromey <tromey@redhat.com>
7436
7437 * parse.y (method_header): Native method can't be strictfp.
7438 No method can be transient or volatile.
7439
7440 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7441
7442 Make-lang.in (jvspec.o-warn): Add -Wno-error.
7443
7444 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
7445
7446 * check-init.c: Fix comment typos.
7447 * class.c: Likewise.
7448 * constants.c: Likewise.
7449 * decl.c: Likewise.
7450 * except.c: Likewise.
7451 * expr.c: Likewise.
7452 * java-except.h: Likewise.
7453 * java-tree.h: Likewise.
7454 * javaop.h: Likewise.
7455 * jcf-dump.c: Likewise.
7456 * jcf-io.c: Likewise.
7457 * jcf-parse.c: Likewise.
7458 * jcf-write.c: Likewise.
7459 * lang.c: Likewise.
7460 * mangle.c: Likewise.
7461 * typeck.c: Likewise.
7462 * verify.c: Likewise.
7463
7464 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7465
7466 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7467 * jcf-write.c: Include "tm_p.h".
7468
7469 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7470
7471 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7472
7473 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7474
7475 * builtins.c (java_build_function_call_expr): Renamed from
7476 build_function_call_expr. All callers changed.
7477
7478 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7479 * jcf-parse.c: Include tm_p.h.
7480
7481 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7482 warning.
7483
7484 2003-01-14 Tom Tromey <tromey@redhat.com>
7485
7486 * class.c (make_class_data): Check that super is compiled before
7487 building class reference to it.
7488
7489 2003-01-14 Andrew Haley <aph@redhat.com>
7490
7491 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7492 varargs function -- correct.
7493
7494 2003-01-14 Andrew Haley <aph@redhat.com>
7495
7496 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7497
7498 2003-01-14 Andrew Haley <aph@redhat.com>
7499
7500 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7501 varargs function -- correct.
7502
7503 * parse.y (patch_assignment): Copy the rhs of an assignment into a
7504 temporary if the RHS is a reference.
7505
7506 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7507
7508 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7509 * keyword.h: Regenerated.
7510
7511 * All Files: Convert to ISO C style function definitions.
7512
7513 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
7514
7515 * parse.y (check_pkg_class_access): ANSIfy definition.
7516
7517 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7518
7519 * decl.c, parse-scan.y, parse.y: Don't cast return value of
7520 xmalloc et al.
7521
7522 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7523
7524 2003-01-09 Geoffrey Keating <geoffk@apple.com>
7525
7526 Merge from pch-branch:
7527
7528 2002-12-02 Geoffrey Keating <geoffk@apple.com>
7529
7530 * Make-lang.in (java/gjavah.o): Update dependencies.
7531 * gjavah.c: Include ggc.h.
7532
7533 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
7534
7535 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7536 (JCFDUMP_OBJS): Add ggc-none.o.
7537 (java/jcf-dump.o): Depend on GGC_H.
7538 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7539 CPool substructures.
7540 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7541 * jcf-dump.c: Include ggc.h.
7542
7543 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7544
7545 * jcf.h (union cpool_entry): New.
7546 (struct CPool): Use gengtype to mark. Change field 'data' to be
7547 an array of unions.
7548 (struct JCF): Use gengtype to mark.
7549 (CPOOL_UINT): Update for new cpool_entry type.
7550 (CPOOL_USHORT1): Likewise.
7551 (CPOOL_USHORT2): Likewise.
7552 (CPOOL_FINISH): Use GC to free cpool subfields.
7553 * parse.h (struct parser_ctxt): Mark field current_jcf.
7554 * lex.c (java_init_lex): Use GC to allocate struct JCF.
7555 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7556 (main_jcf): Use gengtype to mark.
7557 (ggc_mark_jcf): Delete.
7558 (get_constant): Update for new cpool_entry type.
7559 (give_name_to_class): Likewise.
7560 (get_class_constant): Likewise.
7561 (init_outgoing_cpool): Use GGC to allocate struct CPool.
7562 (java_parse_file): Use GGC to allocate struct JCF.
7563 (init_jcf_parse): Don't call ggc_add_root.
7564 * jcf-reader.c (jcf_parse_constant_pool): Update for new
7565 cpool_entry type.
7566 * java-tree.h (current_jcf): Use gengtype to mark.
7567 (CPOOL_UTF): Update for new cpool_entry type.
7568 (outgoing_cpool): Use gengtype to mark.
7569 (struct lang_type): GC struct JCF and struct CPool.
7570 * config-lang.in (gtfiles): Add jcf.h.
7571 * constants.c (find_tree_constant): New.
7572 (set_constant_entry): Allocate cpool subfields using GGC. Update
7573 for new cpool_entry type.
7574 (find_constant1): Update for new cpool_entry type.
7575 (find_constant2): Likewise.
7576 (find_utf8_constant): Use find_tree_constant.
7577 (find_class_or_string_constant): Remove unnecessary cast to jword.
7578 Update for new cpool_entry type.
7579 (count_constant_pool_bytes): Update for new cpool_entry type.
7580 (write_constant_pool): Likewise.
7581 (alloc_name_constant): Use find_tree_constant.
7582 (build_constants_constructor): Update for new cpool_entry type.
7583
7584 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7585
7586 * parse.y (mark_parser_ctxt): Delete.
7587 (goal): Don't use ggc_add_root.
7588 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7589 (java_pop_parser_context): Let GC free parser_ctxt.
7590 (java_parser_context_resume): Likewise.
7591 * parse.h (struct parser_ctxt): Use gengtype to mark.
7592 (ctxp): Likewise.
7593 (ctxp_for_generation): Likewise.
7594 * lex.h (struct java_lc_s): Mark for gengtype.
7595 (java_lexer): Rearrange for gengtype.
7596 * config-lang.in (gtfiles): Add lex.h, parse.h.
7597
7598 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7599
7600 * All Files: Remove PARAMS macro.
7601
7602 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7603 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7604 `__STDC__' macros.
7605
7606 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7607 VA_CLOSE.
7608
7609 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
7610
7611 * Make-lang.in (java.install-common, java.uninstall,
7612 java.install-info, java.install-man): Prepend $(DESTDIR)
7613 to destination paths in all (un)installation commands.
7614 (java.install-common): Rewrite $(LN) command to support
7615 DESTDIR with "ln" as well as with "ln -s".
7616
7617 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
7618
7619 * java-tree.h: Protect against multiple inclusion.
7620
7621 2003-01-07 Tom Tromey <tromey@redhat.com>
7622
7623 * class.c (add_assume_compiled): Don't adjust parent if we're
7624 already at the root of tree.
7625
7626 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7627
7628 * lang.c (dump_compound_expr): Prototype.
7629
7630 2003-01-03 Tom Tromey <tromey@redhat.com>
7631
7632 Fix for PR java/8712:
7633 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7634 when simply checking against `null'.
7635
7636 2003-01-03 Tom Tromey <tromey@redhat.com>
7637
7638 * gcj.texi (Standard Properties): Document http.proxyHost and
7639 http.proxyPort.
7640
7641 * gcj.texi (GNU Classpath Properties): Document new properties.
7642
7643 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7644
7645 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7646 java/lang-options.h, java/mangle.c, java/mangle_name.c,
7647 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7648
7649 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7650
7651 * Make-lang.in, boehm.c, buffer.c,
7652 buffer.h, builtins.c, class.c,
7653 config-lang.in, constants.c,
7654 convert.h, decl.c, except.c,
7655 expr.c, java-except.h,
7656 java-tree.h, javaop.def,
7657 jcf-parse.c, jcf-write.c,
7658 jv-scan.c, jvgenmain.c,
7659 jvspec.c, keyword.gperf,
7660 keyword.h, lang-options.h,
7661 lang-specs.h, lang.c, lex.c,
7662 lex.h, mangle.c, mangle_name.c,
7663 parse-scan.y, parse.h, parse.y,
7664 typeck.c, verify.c, xref.c,
7665 xref.h: Replace "GNU CC" with
7666 "GCC" in the copyright header.
7667
7668 * check-init.c, gjavah.c, javaop.h,
7669 jcf-depend.c, jcf-dump.c, jcf-io.c,
7670 jcf-path.c, jcf-reader.c, jcf.h,
7671 zextract.c, zipfile.h: These files are
7672 "part of GCC". Also say "GCC" not "GNU CC".
7673
7674 2002-12-30 DJ Delorie <dj@redhat.com>
7675
7676 * Make-lang.in: Protect against texi2pod/pod2man failing.
7677
7678 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
7679
7680 * gcj.texi: Use @copying.
7681
7682 2002-12-27 Mark Mitchell <mark@codesourcery.com>
7683
7684 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7685 print_cxx_classname.
7686 (print_cxx_classname): Add add_scope parameter.
7687 (print_class_decls): Do not emit a semicolon after the extern
7688 "Java" block.
7689 (process_file): Adjust calls to print_cxx_classname.
7690
7691 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7692
7693 * gcj.texi: Include Cover Texts in man page.
7694
7695 2002-12-23 Jeff Sturm <jsturm@one-point.com>
7696
7697 * class.c (build_static_field_ref): Check FIELD_FINAL.
7698
7699 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7700 instead of current_constant_pool_data_ref.
7701 * java-tree.h (current_constant_pool_data_ref): Undefine.
7702 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7703 * jcf-parse.c (init_outgoing_cpool): Don't initialize
7704 current_constant_pool_data_ref.
7705
7706 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7707 not build_internal_class_name.
7708
7709 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7710 Use it when class ref isn't certain to be compiled.
7711
7712 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7713
7714 * gcj.texi: Include gcc-common.texi.
7715 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7716 $(srcdir)/doc/include/gcc-common.texi.
7717
7718 2002-12-22 Anthony Green <green@redhat.com>
7719
7720 * gcj.texi (Limitations): Add note about org.xml.sax and
7721 org.w3c.dom.
7722
7723 2002-12-20 Tom Tromey <tromey@redhat.com>
7724
7725 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7726 where minimum case value is Integer.MIN_VALUE.
7727 Fixes PR java/8955.
7728
7729 2002-12-18 Andrew Haley <aph@redhat.com>
7730
7731 * parse.y (patch_invoke): Force evaluation order when `check' is
7732 set. For PR libgcj/8945.
7733
7734 2002-12-16 Mark Mitchell <mark@codesourcery.com>
7735
7736 * gcj.texi: Change version number to 3.4.
7737
7738 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
7739 Andrew Haley <aph@redhat.com>
7740
7741 * parse.y (source_end_java_method): Remove custom encoding of line
7742 numbers for a function decl before passing it to the back end.
7743
7744 2002-12-03 Andrew Haley <aph@redhat.com>
7745
7746 * class.c (make_class_data): New field, "chain".
7747 * decl.c (java_init_decl_processing): Likewise.
7748
7749 2002-12-02 Tom Tromey <tromey@redhat.com>
7750
7751 For PR java/8740:
7752 * parse.y (do_resolve_class): Handle qualified name via
7753 recursion.
7754
7755 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7756
7757 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7758 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7759 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7760 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7761 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7762 Include coretypes.h and tm.h.
7763 * Make-lang.in: Update dependencies.
7764
7765 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7766
7767 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7768
7769 2002-11-25 Diego Novillo <dnovillo@redhat.com>
7770
7771 * jcf-reader.c: Don't expand JCF_readu4 inside the
7772 expansion of JCF_SKIP.
7773
7774 2002-11-25 Diego Novillo <dnovillo@redhat.com>
7775
7776 * jcf-reader.c: Don't expand JCF_readu4 inside the
7777 expansion of JCF_SKIP.
7778
7779 2002-11-22 Tom Tromey <tromey@redhat.com>
7780
7781 * parse.y (patch_binop): Cast right hand side of shift expression
7782 to `int'. Fixes PR java/8676.
7783
7784 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
7785 Andrew Haley <aph@redhat.com>
7786
7787 * gcc/java/jcf-write.c (write_classfile): Remove target
7788 class file, if it exists, before renaming the temporary
7789 class file to it.
7790
7791 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7792
7793 * jvspec.c (lang_specific_spec_functions): New.
7794
7795 2002-11-18 Tom Tromey <tromey@redhat.com>
7796
7797 Fix for PR java/7912:
7798 * expr.c (can_widen_reference_to): Allow cast of array to
7799 Cloneable or Serializable.
7800 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7801 (java_io_serializable_identifier_node): Likewise.
7802 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7803 (valid_ref_assignconv_cast_p): Use new identifier nodes.
7804 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7805 java_io_serializable.
7806 * decl.c (java_init_decl_processing): Initialize
7807 java_lang_cloneable_identifier_node and
7808 java_io_serializable_identifier_node.
7809 (java_lang_cloneable_identifier_node): New global.
7810 (java_io_serializable_identifier_node): Likewise.
7811
7812 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
7813
7814 * buffer.c: Remove unnecessary casts.
7815 * check-init.c: Likewise.
7816 * class.c: Likewise.
7817 * constants.c: Likewise.
7818 * decl.c: Likewise.
7819 * except.c: Likewise.
7820 * gjavah.c: Likewise.
7821 * jcf-io.c: Likewise.
7822 * jcf-parse.c: Likewise.
7823 * jcf-path.c: Likewise.
7824 * jvspec.c: Likewise.
7825 * lang.c: Likewise.
7826 * lex.c: Likewise.
7827 * verify.c: Likewise.
7828
7829 2002-11-06 Tom Tromey <tromey@redhat.com>
7830
7831 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7832 a JNI header.
7833
7834 2002-11-05 Tom Tromey <tromey@redhat.com>
7835
7836 Fix for PR java/6388.
7837 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7838 * java-tree.h (enum java_tree_index): New values
7839 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7840 (decimal_int_max, decimal_long_max): New defines.
7841 * lex.c (yylex): Rewrote range checking. Sign extend literals.
7842 (error_if_numeric_overflow): Rewrote range checking.
7843 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
7844 decimal_long_max.
7845
7846 2002-11-02 Tom Tromey <tromey@redhat.com>
7847
7848 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
7849
7850 * class.c (make_method_value): Put class name, not signature, into
7851 `throws' field. For PR java/8415.
7852
7853 2002-10-24 Tom Tromey <tromey@redhat.com>
7854
7855 * gcj.texi (Invoking gij): Document --showversion.
7856 (Standard Properties): java.library.path now set.
7857
7858 2002-10-23 Tom Tromey <tromey@redhat.com>
7859
7860 * gjavah.c (decode_signature_piece): In JNI mode, print
7861 `jobjectArray' when array depth is nonzero.
7862 Fixes PR java/8296.
7863
7864 2002-10-15 Andrew Haley <aph@redhat.com>
7865
7866 * parse.y (patch_invoke): Call force_evaluation_order on a static
7867 arg list.
7868 (resolve_qualified_expression_name): Call force_evaluation_order
7869 on a arg list that is part of a Qualified Expression Name.
7870
7871 * lang.c (dump_compound_expr): New.
7872 (java_dump_tree): New.
7873
7874 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
7875
7876 * gcj.texi: Added item describing the GCJ runtime property
7877 "gnu.gcj.progname".
7878
7879 2002-10-15 Richard Henderson <rth@redhat.com>
7880
7881 * jcf-parse.c (get_constant): Fix type warning.
7882
7883 2002-10-15 Andrew Haley <aph@redhat.com>
7884
7885 * java-tree.h (java_inlining_merge_static_initializers): Declare.
7886 (java_inlining_map_static_initializers): Declare.
7887
7888 2002-10-14 Andrew Haley <aph@redhat.com>
7889
7890 * tree-inline.c (remap_block): All local class initialization
7891 flags go in the outermost scope.
7892 (expand_call_inline): Call java_inlining_map_static_initializers.
7893 (expand_call_inline): Call java_inlining_merge_static_initializers.
7894 * java/lang.c (merge_init_test_initialization): New.
7895 (java_inlining_merge_static_initializers): New.
7896 (inline_init_test_initialization): New.
7897 (java_inlining_map_static_initializers): New.
7898
7899 2002-10-11 Mark Wielaard <mark@klomp.org>
7900
7901 * gcj.texi (Compatibility): Add Limitations and Extensions section.
7902
7903 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7904
7905 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
7906
7907 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7908
7909 * parse.y (merge_string_cste): Add parentheses around & within |.
7910
7911 2002-10-08 Tom Tromey <tromey@redhat.com>
7912
7913 * parse.y (variable_declarator_id): Simplify error path for
7914 array declarator error. For PR java/8003.
7915
7916 2002-10-08 Zack Weinberg <zack@codesourcery.com>
7917
7918 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
7919 bug_report_url.
7920
7921 2002-10-08 Andrew Haley <aph@redhat.com>
7922
7923 * parse.y (attach_init_test_initialization_flags): Check for
7924 error_mark_node.
7925
7926 2002-10-07 Anthony Green <green@redhat.com>
7927
7928 * parse.y (merge_string_cste): Fix bug in string concatenation.
7929
7930 2002-10-03 Michael Koch <konqueror@gmx.de>
7931
7932 * gcj.texi (Standard properties):
7933 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7934
7935 2002-10-02 Roger Sayle <roger@eyesopen.com>
7936
7937 PR optimization/6627
7938 * lang.c (java_init): If storing the vbit in function
7939 pointers, ensure that force_align_functions_log is atleast
7940 one to aid compatability with g++ vtables.
7941
7942 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
7943
7944 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7945 foul of type-based aliasing.
7946
7947 2002-09-30 Anthony Green <green@redhat.com>
7948
7949 * gcj.texi (Invoking jv-scan): Fix texinfo.
7950
7951 2002-09-28 Anthony Green <green@redhat.com>
7952
7953 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7954 (Code Generation): Add -fno-assert documentation.
7955 * jv-scan.c (flag_assert): New global.
7956 (options): Add assert option.
7957 (help): Add --no-assert documentation.
7958 * parse-scan.y (flag_assert): New global.
7959 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7960 (flag_assert): New global.
7961 * java-tree.h (flag_assert): New global.
7962 * lex.c (java_lex): Obey flag_assert.
7963 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7964 calling cc1.
7965
7966 2002-09-26 Andrew Haley <aph@redhat.com>
7967
7968 * expr.c (build_java_array_length_access): Check for null pointer.
7969 * expr.c (expand_java_arrayload): Likewise.
7970
7971 2002-09-21 Richard Henderson <rth@redhat.com>
7972
7973 * jcf-parse.c (get_constant): Decode from IEEE no matter
7974 what the target format.
7975
7976 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
7977
7978 * ChangeLog: Follow spelling conventions.
7979 * class.c: Likewise.
7980 * decl.c: Likewise.
7981 * expr.c: Likewise.
7982 * gjavah.c: Likewise.
7983 * java-tree.h: Likewise.
7984 * jcf-dump.c: Likewise.
7985 * jcf-parse.c: Likewise.
7986 * jvspec.c: Likewise.
7987 * lang.c: Likewise.
7988 * mangle.c: Likewise.
7989 * parse.y: Likewise.
7990
7991 2002-09-17 Tom Tromey <tromey@redhat.com>
7992
7993 * lex.c (java_read_unicode_collapsing_terminators): Handle case
7994 where \r appears at EOF. Fixes PR java/7950.
7995
7996 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7997
7998 * jvspec.c (lang_specific_driver): Remove unused variable.
7999
8000 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8001
8002 * java-tree.h (union lang_tree_node): Add chain_next option.
8003
8004 2002-09-16 Richard Henderson <rth@redhat.com>
8005
8006 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8007 use new real.h interface.
8008 * jcf-write.c (find_constant_index): Use new real.h interface.
8009 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8010
8011 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8012
8013 * lang.c: Follow spelling conventions.
8014
8015 2002-09-11 Per Bothner <per@bothner.com>
8016
8017 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8018 constant to the type of the field.
8019 (java_complete_tree): Remove now-redundant code.
8020
8021 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8022
8023 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8024
8025 For PR java/5794:
8026 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8027 return label if a ret instruction for the jsr has been reached.
8028
8029 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8030
8031 * parse.y (DIR_SEPARATOR): Don't define.
8032 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8033
8034 2002-08-28 Andrew Haley <aph@redhat.com>
8035
8036 * verify.c (verify_jvm_instructions): Allow exception handler
8037 inside code that is being protected, but generate a warning.
8038 * except.c (link_handler): Initialize `expanded' in new eh_range.
8039 (binding_depth, is_class_level, current_pc): Declare extern.
8040
8041 2002-09-01 Mark Wielaard <mark@klomp.org>
8042
8043 * gcj.texi: Add chapter about system properties.
8044 Fixed some typos.
8045
8046 2002-08-26 Tom Tromey <tromey@redhat.com>
8047
8048 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8049 conversion if RHS_TYPE is byte, short, or char.
8050
8051 2002-08-22 Tom Tromey <tromey@redhat.com>
8052
8053 * gcj.texi (Invoking gij): Document -cp and -classpath.
8054
8055 2002-08-21 Tom Tromey <tromey@redhat.com>
8056
8057 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8058 $(prefix)/share. For PR libgcj/7633.
8059
8060 For PR java/6005 and PR java/7611:
8061 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8062 (java_can_use_bit_fields_p): New function.
8063
8064 2002-08-16 Tom Tromey <tromey@redhat.com>
8065
8066 * gcj.texi (Class Initialization): Mention class initialization of
8067 arrays.
8068
8069 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8070
8071 * Make-lang.in (java-tree-inline.o): New.
8072 (JAVA_OBJS): Add java-tree-inline.o.
8073 * parse.y (source_end_java_method): Call java_optimize_inline.
8074 (java_expand_method_bodies): Save method's tree in
8075 DECL_SAVED_TREE.
8076 (add_stmt_to_compound): Keep track of the number of statments.
8077 * lang.c (java_init): Enable flag_inline_trees.
8078 (java_post_options): If flag_inline_functions is on, enable
8079 flag_inline_trees instread.
8080 (decl_constant_value): New.
8081 (java_tree_inlining_walk_subtrees): New.
8082 * java-tree.h (DECL_NUM_STMTS): New macro.
8083 (java_optimize_inline): Declare.
8084 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8085 Handle a LABEL_EXPR.
8086 * decl.c (build_result_decl): If we already have a DECL_RESULT
8087 don't make another.
8088 (dump_function): New.
8089 (java_optimize_inline): New.
8090 (dump_function): New.
8091
8092 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8093
8094 For PR java/7483:
8095 * parse.y (build_assertion): Invert return from
8096 desiredAssertionStatus.
8097
8098 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8099
8100 * jcf-write.c (get_access_flags): Return correct access flags for
8101 private and protected inner classes.
8102
8103 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8104
8105 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8106
8107 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8108
8109 * mangle_name.c: Don't include obstack.h twice.
8110 * xref.c: Don't include obstack.h.
8111
8112 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8113
8114 * class.c: (permanent_obstack): Delete declaration.
8115 * constants.c: (permanent_obstack): Delete declaration.
8116 * except.c: (permanent_obstack): Delete declaration.
8117 * expr.c: (permanent_obstack): Delete declaration.
8118 * jcf-parse.c: (permanent_obstack): Delete declaration.
8119 (saveable_obstack): Delete declaration.
8120 * parse.h: (permanent_obstack): Delete declaration.
8121 * typeck.c: (permanent_obstack): Delete declaration.
8122
8123 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8124
8125 * gcj.texi (version-gcc): Increase to 3.3.
8126
8127 2002-07-22 Tom Tromey <tromey@redhat.com>
8128
8129 * lex.c (java_lex): Check for `e' or `E' after 0.
8130
8131 2002-07-21 Richard Henderson <rth@redhat.com>
8132
8133 * lang.c (java_unsafe_for_reeval): New.
8134 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8135
8136 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
8137
8138 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8139 (jcf_path_init): Use GET_ENVIRONMENT.
8140
8141 2002-07-10 Roger Sayle <roger@eyesopen.com>
8142 Zack Weinberg <zack@codesourcery.com>
8143
8144 * builtins.c (initialize_builtins): Remove defines that
8145 handled C/C++ specific junk hereby removed from builtins.def.
8146
8147 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
8148
8149 * lang.c (java_post_options): Update prototype.
8150
8151 2002-07-05 Roger Sayle <roger@eyesopen.com>
8152
8153 * builtins.c (initialize_builtins): Ignore the additional
8154 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8155 the builtins.def file.
8156
8157 2002-07-01 Tom Tromey <tromey@redhat.com>
8158
8159 For PR libgcj/7073:
8160 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8161 specially.
8162
8163 2002-07-01 Roger Sayle <roger@eyesopen.com>
8164
8165 * java/decl.c (builtin_function): Accept additional parameter.
8166 (java_init_decl_processing): Pass an additional NULL_TREE
8167 argument to builtin_function.
8168
8169 2002-06-29 T.J. Mather <tjmather@maxmind.com>
8170
8171 * gcj.texi: Fixed gcj invocation example so that it compiles.
8172
8173 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8174
8175 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8176 * parse.y (mark_parser_ctxt): Likewise.
8177 (check_modifiers, declare_local_variables): Avoid incorrect
8178 hardcoded constant 10.
8179
8180 * lex.c (java_read_char): Avoid "comparison is always true"
8181 warning.
8182
8183 2002-06-25 Andreas Schwab <schwab@suse.de>
8184
8185 * expr.c (JSR): Avoid undefined operation on PC.
8186
8187 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8188
8189 * decl.c (clear_binding_level): Const-ify.
8190
8191 2002-06-13 Akim Demaille <akim@epita.fr>
8192
8193 * parse.y (class_declaration, interface_declaration): Make sure
8194 all their rules have an action, in order to avoid meaningless `$$
8195 = $1' and their type clashes.
8196
8197 2002-06-11 Tom Tromey <tromey@redhat.com>
8198
8199 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8200 * parse-scan.y (statement_without_trailing_substatement): Added
8201 assert_statement.
8202 (assert_statement): New rule.
8203 * java-tree.h (struct lang_type) [assertions]: New field.
8204 (TYPE_USES_ASSERTIONS): New macro.
8205 (CLASS_USES_ASSERTIONS): Likewise.
8206 (FIELD_SYNTHETIC): New define.
8207 * lex.c (java_lval;): Added ASSERT_TK.
8208 * parse.y (ASSERT_TK): Added.
8209 (statement_without_trailing_substatement): Added assert_statement.
8210 (assert_statement): New rule.
8211 (build_assertion): New function.
8212 (maybe_generate_pre_expand_clinit): Create and initialize
8213 $assertionsDisabled.
8214 (lookup_package_type): Removed decl.
8215 * keyword.h: Rebuilt.
8216 * keyword.gperf (assert): New token.
8217
8218 2002-06-10 Akim Demaille <akim@epita.fr>
8219
8220 * parse.y (interface_type_list, class_member_declaration)
8221 (unary_expression_not_plus_minus): Remove duplicate %type.
8222 Whitespace changes.
8223
8224 2002-06-09 Tom Tromey <tromey@redhat.com>
8225
8226 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8227
8228 * parse.y (method_header): Give error message in all cases.
8229 Fixes PR java/6865.
8230
8231 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8232
8233 Don't use RTL inlining. Fix for PR java/6820.
8234 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8235 (flag_really_inline): New.
8236 (java_decode_option): Set flag_really_inline if -finline-functions
8237 is seen.
8238 (java_post_options): New function. Turn off inlining unless
8239 flag_really_inline is set.
8240
8241 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8242
8243 * gjavah.c (throwable_p): Accept argument as either a classname or
8244 signature fragment. Create null-terminated classname string for super
8245 when calling itself recursively.
8246 (decode_signature_piece): Skip first character from class name
8247 signature when calling throwable_p.
8248
8249 2002-06-08 H.J. Lu (hjl@gnu.org)
8250
8251 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8252
8253 2002-06-04 Tom Tromey <tromey@redhat.com>
8254
8255 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8256
8257 2002-06-04 Michael Koch <konqueror@gmx.de>
8258
8259 * gcj.texi (Input Options): Fixed typo.
8260
8261 2002-06-04 Zack Weinberg <zack@codesourcery.com>
8262
8263 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8264 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8265 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8266 and all now-pointless local variables. Rename other local
8267 variables to reflect their not being handles.
8268
8269 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8270 #if JCF_USE_STDIO blocks.
8271
8272 * parse.y: Add missing semicolon at end of rule.
8273
8274 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8275
8276 * check-init.c (attach_initialized_static_class): Delete, unused.
8277 * parse.y: Use htab_t instead of struct hashtable, update
8278 all uses.
8279 * java-tree.h: Include hashtab.h instead of hash.h.
8280 (struct lang_decl_func): Use htab_t, set up for gengtype.
8281 (struct init_test_hash_entry): Delete.
8282 (struct treetreehash_entry): New.
8283 (java_treetreehash_find): New
8284 (java_treetreehash_new): New prototype.
8285 (java_treetreehash_create): New prototype.
8286 (java_mark_tree): Delete prototype.
8287 (java_hash_hash_tree_node): Delete prototype.
8288 (java_hash_compare_tree_node): Delete prototype.
8289 (attach_initialized_static_class): Delete prototype.
8290 * expr.c (build_class_init): Update to use java_treetreehash
8291 functions.
8292 (java_expand_expr): Update to use htab_t.
8293 (emit_init_test_initialization): Likewise.
8294 * decl.c (java_mark_tree): Delete.
8295 * class.c (init_test_hash_newfunc): Delete.
8296 (java_hash_hash_tree_node): Delete.
8297 (java_hash_compare_tree_node): Delete.
8298 (add_method_1): Update to use java_treetreehash functions.
8299 (JAVA_TREEHASHHASH_H): New macro.
8300 (java_treetreehash_hash): New function.
8301 (java_treetreehash_compare): New function.
8302 (java_treetreehash_find): New function.
8303 (java_treetreehash_new): New function.
8304 (java_treetreehash_create): New function.
8305 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8306
8307 * Make-lang.in (java/parse.o): Depend on debug.h.
8308 * java-tree.h (struct lang_identifier): Use gengtype.
8309 (union lang_tree_node): New.
8310 (struct lang_decl_func): Use gengtype.
8311 (struct lang_decl_var): Likewise.
8312 (struct lang_decl): Likewise.
8313 * parse.y: Include debug.h.
8314 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8315
8316 * lang.c (struct language_function): New dummy structure.
8317
8318 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8319 descriminator for DECL_LANG_SPECIFIC.
8320 (struct lang_decl_func): Rename from struct lang_decl.
8321 (enum lang_decl_desc): New.
8322 (struct lang_decl): Make it a union. Update all the accessor macros.
8323 (struct lang_type): Use gengtype.
8324 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8325 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8326 are now the same size.
8327 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8328 use discriminator to mark DECL_LANG_SPECIFIC.
8329
8330 * Make-lang.in (gt-java-builtins.h): New rule.
8331 (java/builtins.o): Add dependency on gt-<filename>.h.
8332 * builtins.c: Use gengtype for roots.
8333 (union string_or_tree): Use gengtype.
8334 (struct builtin_record): Use gengtype.
8335 * config-lang.in (gtfiles): Add builtins.c.
8336
8337 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8338 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8339 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8340 gt-java-parse.h, gtype-java.h): Add rules to generate.
8341 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8342 (class.o): Add dependency on gt-*.h.
8343 (constants.o): Likewise.
8344 (decl.o): Likewise.
8345 (expr.o): Likewise.
8346 (jcf-parse.o): Likewise.
8347 (jcf-write.o): Likewise.
8348 (lang.o): Likewise.
8349 * config-lang.in (gtfiles): New.
8350 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8351 * constants.c: Replace uses of ggc_add_* with GTY markers.
8352 Include gt-*.h.
8353 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8354 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8355 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8356 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8357 Include gt-*.h.
8358 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8359 Include gt-*.h.
8360 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8361 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
8362 gt-*.h.
8363 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8364 Include gtype-java.h.
8365
8366 2002-06-02 Tom Tromey <tromey@redhat.com>
8367
8368 Fix for PR java/5913:
8369 * parse.y (patch_binop): Call patch_string on op1.
8370
8371 2002-06-02 Tom Tromey <tromey@redhat.com>
8372
8373 Fix for PR java/1343, PR java/6336:
8374 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8375 formatting. Changed return type.
8376 (anonymous_class_counter): Moved to top of file.
8377 (maybe_make_nested_class_name): Append number to class name for
8378 function-local classes.
8379
8380 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8381
8382 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8383 * Make-lang.in: Update dependency lists.
8384
8385 2002-05-18 Mark Mitchell <mark@codesourcery.com>
8386
8387 * gjavah.c (throwable_p): Do not free the name of the class after
8388 passing it to find_class.
8389 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8390 * jcf-io.c (dirent.h): Include it.
8391 (fnmatch.h): Likewise.
8392 (compare_path): New function.
8393 (java_or_class_file): Likewise.
8394 (memoized_dirlist_entry): New type.
8395 (memoized_dirlist_lookup_eq): New function.
8396 (memoized_dirlists): New variable.
8397 (caching_stat): New function.
8398 (memoized_class_lookup_eq): New function.
8399 (memoized_class_lookups): Likewise.
8400 (find_class): Use memoized_class_lookups and caching_stat.
8401 * jcf.h (JCF_USE_SCANDIR): Define.
8402 * parse.y (java_expand_classes): Write the class files in reverse
8403 order.
8404
8405 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8406
8407 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8408
8409 2002-05-13 Mark Mitchell <mark@codesourcery.com>
8410
8411 * jcf-write.c (write_classfile): Unlink the temporary file if it
8412 cannot be renamed. Use concat to build up the name of the
8413 temporary file.
8414
8415 2002-05-08 Mark Mitchell <mark@codesourcery.com>
8416
8417 * jcf-write.c (write_classfile): Write the file to a
8418 temporary file and then rename it.
8419
8420 2002-05-07 Tom Tromey <tromey@redhat.com>
8421
8422 * gjavah.c (throwable_p): Use xstrdup, not strdup.
8423
8424 Fix for PR java/1200:
8425 * gjavah.c (throwable_p): New function.
8426 (decode_signature_piece): Use it. A `WeakReference' isn't the
8427 same as a `jweak'.
8428 Include hashtab.h.
8429 (gcjh_streq): New function.
8430
8431 2002-05-07 Andreas Jaeger <aj@suse.de>
8432
8433 * parse.y (finish_for_loop): Fix if statement.
8434
8435 2002-05-06 Tom Tromey <tromey@redhat.com>
8436
8437 Fix for PR java/5941:
8438 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8439 loop update expression.
8440 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8441 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8442
8443 2002-05-04 Mark Wielaard <mark@klomp.org>
8444
8445 For PR java/6519:
8446 * parse.y (build_string_concatenation): Return just op1 only when op2
8447 is null and op1 is a STRING_CST, otherwise always construct a
8448 StringBuffer.
8449
8450 2002-04-27 Tom Tromey <tromey@redhat.com>
8451
8452 For PR java/6382:
8453 * parse.y (string_convert_int_cst): New function.
8454 (merge_string_cste): Use it.
8455
8456 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8457
8458 * java-tree.h (java_parse_file): Update.
8459 (java_set_yydebug): Remove.
8460 * jcf-parse.c (yydebug): Remove.
8461 (java_set_yydebug): Die.
8462 (java_parse_file): Update.
8463 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8464
8465 2002-04-24 Tom Tromey <tromey@redhat.com>
8466
8467 For PR java/6425:
8468 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8469 EXPR_WFL_QUALIFICATION of qual_wfl.
8470
8471 2002-04-23 Per Bothner <per@bothner.com>
8472
8473 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
8474 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
8475 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
8476
8477 2002-04-23 Tom Tromey <tromey@redhat.com>
8478
8479 For PR java/6314:
8480 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
8481 recognize `-fcompile-resource='.
8482 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
8483 a bit.
8484
8485 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8486
8487 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8488 paths. Fixes PR java/2791.
8489
8490 2002-04-19 Andrew Haley <aph@redhat.com>
8491
8492 * jcf-write.c (push_long_const): lo, hi: New variables.
8493 Use rshift_double to extract the high part of a 64-bit long.
8494 Use WORD_TO_INT to extract the low part.
8495
8496 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8497 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
8498 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8499
8500 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8501
8502 * typeck.c (incomplete_type_error): Remove.
8503
8504 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8505
8506 * class.c (make_class_data): Set DECL_ALIGN on static class data,
8507 for hash synchronization.
8508 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8509 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8510 class_type_node.
8511
8512 2002-04-16 Mark Wielaard <mark@klomp.org>
8513
8514 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8515 negative zero.
8516
8517 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8518
8519 Fix for PR java/6294:
8520 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8521 interfaces.
8522
8523 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8524
8525 Fix for PR java/6085:
8526 * parse.y (patch_method_invocation): Always use build_access_to_thisn
8527 to get enclosing "this" argument for inner-class constructor
8528 invocation. Pass correct arguments to build_access_to_thisn.
8529
8530 2002-04-10 Andreas Jaeger <aj@suse.de>
8531
8532 * gcj.texi (Input Options): Fix extdirs patch.
8533
8534 2002-04-10 Anthony Green <green@redhat.com>
8535
8536 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8537
8538 2002-04-09 Anthony Green <green@redhat.com>
8539
8540 * gcj.texi (Input Options): Add --extdirs documentation.
8541 * jcf-dump.c (OPT_extdirs): New macro.
8542 (options): Add extdirs option.
8543 (help): Describe --extdirs.
8544 (main): Handle OPT_extdirs.
8545 * gjavah.c (OPT_extdirs): New macro.
8546 (options): Add extdirs option.
8547 (help): Describe --extdirs.
8548 (main): Handle OPT_extdirs.
8549 * jcf-path.c (jcf_path_init): Add extdirs support.
8550 (jcf_path_extdirs_arg): New function.
8551 (extensions): New variable to hold extensions path entries.
8552 * jvspec.c: Remove -fextdirs= when compiling main().
8553 * lang.c (java_decode_option): Handle -fextdirs=.
8554 * jcf.h (jcf_path_extdirs_arg): Declare new function.
8555 * Make-lang.in: Compile jcf-path with version info for use in
8556 identifying the appropriate libgcj.jar.
8557
8558 2002-04-08 Tom Tromey <tromey@redhat.com>
8559
8560 For PR libgcj/5303:
8561 * .cvsignore: Added rmic.1 and rmiregistry.1.
8562 * gcj.texi (Top): Link to new nodes.
8563 (Invoking rmic): New node.
8564 (Invoking rmiregistry): Likewise.
8565 * Make-lang.in (java.generated-manpages): Added rmic.1 and
8566 rmiregistry.1.
8567 (java.maintainer-clean): Likewise.
8568 ($(srcdir)/java/rmic.1): New target.
8569 ($(srcdir)/java/rmiregistry.1): Likewise.
8570 (java.install-man): Handle rmic.1 and rmiregistry.1.
8571
8572 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8573
8574 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8575 Add note about handling uncaught exceptions. Add an exception handler
8576 to example.
8577
8578 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8579
8580 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8581 after using it to patch CALL_EXPR.
8582
8583 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8584
8585 * gcj.texi (Invocation): Document CNI invocation API.
8586
8587 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8588
8589 * expr.c (truthvalue_conversion): Rename. Update.
8590 (expand_compare): Update.
8591 * java-tree.h (java_truthvalue_conversion): New.
8592 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8593
8594 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8595
8596 * java-tree.h (java_mark_addressable): New.
8597 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8598 * typeck.c (mark_addressable): Rename, update.
8599
8600 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8601
8602 * expr.c (build_java_binop): Update.
8603 * java-tree.h (java_signed_type, java_unsigned_type,
8604 java_signed_or_unsigned_type): Update.
8605 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8606 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8607 * parse.y (patch_binop): Update.
8608 * typeck.c (signed_or_unsigned_type, unsigned_type,
8609 signed_type): Update.
8610
8611 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8612
8613 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8614 (java_dummy_print): Remove.
8615 (lang_print_error): Rename. Exit early if inhibiting output.
8616 (inhibit_error_printing_function): New.
8617 (java_init): Don't set hook.
8618 (lang_init_source): Use new boolean.
8619
8620 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8621
8622 * parse.y (do_resolve_class): Fix infinite recursion.
8623
8624 2002-03-29 Tom Tromey <tromey@redhat.com>
8625
8626 * parse.y (check_inner_circular_reference): Ignore incomplete
8627 types.
8628
8629 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8630
8631 * Make-lang.in (builtins.o): Update.
8632 * boehm.c (get_boehm_type_descriptor): Update.
8633 * builtins.c: Include langhooks.h.
8634 * decl.c (java_init_decl_processing): Update.
8635 * java-tree.h (java_type_for_mode, java_type_for_size): New.
8636 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8637 Redefine.
8638 * typeck.c (type_for_mode, type_for_size): Update.
8639
8640 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8641
8642 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8643
8644 2002-03-28 Tom Tromey <tromey@redhat.com>
8645
8646 * except.c (expand_end_java_handler): If the handler type is NULL,
8647 use java.lang.Throwable. Fixes PR java/5986.
8648
8649 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8650
8651 Fix for PR java/4715:
8652 * jcf-parse.c (parse_source_file_3): New function.
8653 (read_class): Call it.
8654 (java_parse_file): Likewise.
8655
8656 2002-03-28 Jan Hubicka <jh@suse.cz>
8657
8658 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8659
8660 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8661
8662 * parse.y (resolve_package): Initialize "decl".
8663 (lookup_package_type): Remove unused function.
8664
8665 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8666
8667 Fix for PR java/5993:
8668 * parse.y (resolve_package): Return the decl if resolution was
8669 successful. Don't special case "java.lang" and "java.lang.reflect"
8670 packages. Set type_name to the merged identifier.
8671 (resolved_qualified_expression_name): Print error using "name" if
8672 resolve_package returns NULL_TREE.
8673
8674 2002-03-27 Tom Tromey <tromey@redhat.com>
8675
8676 * expr.c (expand_invoke): Don't generate null pointer check if
8677 we're calling <init>.
8678
8679 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8680
8681 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8682 fix prototype.
8683 * java-tree.h (java_lang_expand_expr): Similarly.
8684 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8685 (java_init): Don't set hook.
8686
8687 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8688
8689 Fix for PR java/5850:
8690 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8691 context if field was not found in the current scope.
8692 * expr.c (lookup_field): Don't look in enclosing contexts.
8693
8694 2002-03-26 Tom Tromey <tromey@redhat.com>
8695
8696 Fix for PR java/5942:
8697 * parse.y (init_src_parse): Added sanity check.
8698 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8699 elements, not 11.
8700
8701 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8702
8703 * decl.c (lang_mark_tree): Rename java_mark_tree.
8704 * java-tree.h (java_mark_tree): New.
8705 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8706
8707 2002-03-25 Zack Weinberg <zack@codesourcery.com>
8708
8709 * lex.c: Change java_perform_atof to take normal parameters
8710 instead of a pointer to a parameter block. Call it directly
8711 from java_lex.
8712
8713 2002-03-22 Mark Wielaard <mark@klomp.org>
8714
8715 Fix for PR java/5368:
8716 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8717 when printing error message.
8718
8719 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8720
8721 * decl.c (maybe_build_cleanup): Remove.
8722
8723 2002-03-22 Tom Tromey <tromey@redhat.com>
8724
8725 Andrew Haley <aph@cambridge.redhat.com>
8726
8727 * expr.c (build_field_ref): Don't build a check if the field is a
8728 member of `this'.
8729
8730 2002-03-21 Eric Blake <ebb9@email.byu.edu>
8731
8732 Fix for PR java/6026:
8733 * lex.c (java_lex): Fix parsing of consecutive floats.
8734
8735 2002-03-21 Tom Tromey <tromey@redhat.com>
8736
8737 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8738 class.
8739
8740 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8741
8742 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8743 insert_block, getdecls, kept_level_p, global_bindings_p): New.
8744
8745 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8746
8747 * gcj.texi: @code{gcj} becomes @command{gcj}.
8748 @code{gcc} becomes @command{gcc}.
8749 GcjRaw changed to gnu.gcc.RawData.
8750
8751 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8752
8753 * decl.c (start_java_method): Use new hook.
8754 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8755 (java_init): Remove old hook.
8756
8757 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
8758
8759 * builtins.c (define_builtin): Do nothing if `type' is null.
8760 Fixes PR java/5876.
8761
8762 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8763
8764 * parse.y (parser_check_super_interface): Fix error message
8765 grammar/order.
8766
8767 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8768
8769 * jcf-parse.c (get_constant): Delete unused variables.
8770
8771 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8772
8773 * java-tree.h (java_parse_file): New.
8774 * jcf-parse.c (yyparse): Rename java_parse_file.
8775 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8776
8777 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8778
8779 * parse.y (craft_constructor): Return the constructor decl.
8780 (java_expand_classes): Update comments.
8781 (lookup_method_invoke): Call fix_constructors immediately for
8782 anonymous class. Fixes PR java/5935.
8783
8784 2002-03-15 Anthony Green <green@redhat.com>
8785
8786 * jcf-parse.c (yyparse): Don't emit class registration
8787 constructor when compiling resource files.
8788
8789 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8790
8791 * lang.c (java_tree_code_type, java_tree_code_length,
8792 tree_code_name): Delete.
8793 (tree_code_type, tree_code_length, tree_code_name): Define.
8794 (java_init): Don't try to copy into the various tree_code
8795 arrays.
8796
8797 2002-03-12 Tom Tromey <tromey@redhat.com>
8798
8799 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8800 UTF-8, not UCS-2. Fixes PR java/5923.
8801
8802 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8803 a call_expr wrapped in a convert. Fixes PR java/5848.
8804
8805 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8806
8807 * jcf-write.c (write_classfile): Improve error strings.
8808
8809 2002-03-11 Eric Blake <ebb9@email.byu.edu>
8810
8811 * lex.c: Adjust comments to GNU standards.
8812
8813 2002-03-11 Eric Blake <ebb9@email.byu.edu>
8814
8815 Fix for PR java/5902:
8816 * lex.c (java_lex): Fix parsing of literals.
8817
8818 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8819
8820 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8821 to prevent it getting evaluated twice in the store checking case.
8822 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8823 examining OBJECT.
8824
8825 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8826
8827 * decl.c (java_init_decl_processing): Make sure class_type_node
8828 alignment is not less than 64 bits if hash synchronization is enabled.
8829
8830 2002-03-08 Per Bothner <per@bothner.com>
8831
8832 * parse.y (java_complete_lhs): Check if patch_assignment
8833 returned an error-mark.
8834
8835 * parse.y (try_builtin_assignconv): Don't special-case zero.
8836
8837 2002-03-08 Per Bothner <per@bothner.com>
8838
8839 Fix for PR java/5812.
8840 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
8841 here instead of in JSR macro. Likewise with load_type_state call.
8842 Do the latter on if the return_pc has been verified (the jsr returns).
8843 (JSR): Now just call build_java_jsr.
8844
8845 2002-03-07 Jeff Sturm <jsturm@one-point.com>
8846
8847 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
8848 (java.install-common): Link native driver to
8849 JAVA_TARGET_INSTALL_NAME.
8850
8851 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
8852
8853 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
8854 * builtins.c(sin_builtin): Likewise
8855 * builtins.c(sqrt_builtin): Likewise
8856
8857 2002-03-03 Zack Weinberg <zack@codesourcery.com>
8858
8859 * java/expr.c, java/jcf-parse.c, java/lex.c:
8860 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
8861 REAL_ARITHMETIC blocks unconditional. Delete some further
8862 #ifdef blocks predicated on REAL_ARITHMETIC.
8863
8864 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8865
8866 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
8867 explicit sizeof/sizeof.
8868 * decl.c (java_init_decl_processing): Likewise.
8869 * jcf-parse.c (init_jcf_parse): Likewise.
8870 * parse.y (init_src_parse): Likewise.
8871
8872 2002-03-02 Per Bothner <per@bothner.com>
8873
8874 Make --CLASSPATH by a synonym for --classpath and -classpath.
8875 Implement --bootclasspath.
8876 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
8877 (classpath_l): Remove.
8878 (jcf_path_CLASSPATH_arg): Remove.
8879 (jcf_path_bootclasspath_arg): New function.
8880 (jcf_path_seal): Simplify accordingly.
8881
8882 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
8883 (jcf_path_CLASSPATH): Remove declaration.
8884 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
8885 (lang_specific_driver): Translate -bootclasspath.
8886 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
8887 * lang.c (decode_lang_options): Do jcf_path_init first.
8888 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
8889 * gjavah.c: Also handle --bootclasspath.
8890 Handle --CLASSPATH as a synonum for --classpath.
8891 * jcf-dump.c: Likewise.
8892
8893 "." is not part of system path, but is the default for --classpath.
8894 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
8895 (jcf_path_seal): Add "." if no CLASSPATH specified.
8896
8897 * gcj.texi: Document changes.
8898
8899 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8900
8901 * expr.c (build_java_arraystore_check): Fix formatting.
8902
8903 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8904
8905 Fix for PR java/5758, java/5632:
8906 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
8907 inner-class separator too.
8908 * parse.y (do_resolve_class): New local `decl_result.'
8909 Progressively build a name for what can have been loaded.
8910
8911 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8912
8913 * expr.c (java_array_data_offset): Removed function.
8914 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
8915 (build_java_array_length_access): Obtain "length" value using a
8916 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
8917 (build_java_arrayaccess): Correct comment. Access "data" using a
8918 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
8919 (build_java_arraystore_check): New function.
8920 (expand_java_arraystore): Use build_java_arraystore_check.
8921 * parse.y (patch_assignment): Simplify code to insert a store check
8922 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
8923 * check-init.c (check_init): Update to reflect that an array length
8924 access is now a COMPONENT_REF.
8925 * gcj.texi (Code Generation): Improve documentation of
8926 -fno-bounds-check. Add documentation for -fno-store-check.
8927 * java-tree.h (flag_store_check): Declare.
8928 (build_java_arraystore_check): Declare.
8929 * lang.c (flag_store_check): Initialize to 1.
8930 (lang_f_options): Add store-check option.
8931 * jvspec.c: Don't pass store-check option to jvgenmain.
8932 * lang-options.h: Add help string for -fno-store-check.
8933
8934 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
8935
8936 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8937 * java-tree.h (java_dup_lang_specific_decl): New.
8938 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8939
8940 2002-02-27 Zack Weinberg <zack@codesourcery.com>
8941
8942 * builtins.c, decl.c: Delete traditional-mode-related code
8943 copied from the C front end but not used, or used only to
8944 permit the compiler to link.
8945
8946 2002-02-22 Tom Tromey <tromey@redhat.com>
8947
8948 Fix for PR java/2369:
8949 * jvspec.c (verify_class_name): New function.
8950 (lang_specific_driver): Call it.
8951 (JAVA_START_CHAR_P): New macro.
8952 (JAVA_PART_CHAR_P): Likewise.
8953
8954 2002-02-22 Per Bothner <per@bothner.com>
8955
8956 * class.c: Change vtable to be more compatible with g++ v3 abi.
8957 (get_dispatch_table): Prepend offset-to-top (always 0) and
8958 type_info pointer (currently unimplemented hence NULL) to vtable.
8959 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8960 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
8961 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8962 (build_dtable_decl): Add declarations for new fields.
8963
8964 2002-02-20 Per Bothner <per@bothner.com>
8965
8966 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8967 to finit$ (otherwise generate_bytecode_insns drops it). However, we
8968 don't need to set it on the COMPOUND_EXPR - the caller does that.
8969
8970 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8971
8972 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8973 `--CLASSPATH' becomes `--classpath.'
8974 * gjavah.c: Likewise.
8975 * jcf-dump.c: Likewise.
8976 * lang-options.h: Likewise.
8977 * lang.c: Likewise.
8978 * jcf-path.c: Updated comment.
8979 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8980 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8981 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8982 (jcf_path_CLASSPATH_arg): Ditto.
8983 (classpath_u): Updated leading comment.
8984
8985 2002-02-20 Per Bothner <per@bothner.com>
8986
8987 * builtins.c (check_for_builtin): New function.
8988 (build_call_or_builtin): Remove.
8989 * java-tree.h: Update accordingly.
8990 * expr.c (expand_invoke): Use build + check_for_builtin instead
8991 of build_call_or_builtin.
8992 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
8993 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8994 flag (which had caused jcf-write to incorrectly emit invokevirtual).
8995
8996 2002-02-17 Tom Tromey <tromey@redhat.com>
8997
8998 * java-tree.h (TYPE_STRICTFP): New macro.
8999 (struct lang_type) [strictfp]: New field.
9000 (CLASS_STRICTFP): New macro.
9001 (METHOD_STRICTFP): New macro.
9002 (struct lang_decl) [strictfp]: New field.
9003 * parse.y (method_header): Disallow strictfp constructor or
9004 abstract method.
9005 (STRICT_TK): Move before MODIFIER_TK.
9006 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9007 (METHOD_MODIFIERS): Likewise.
9008 (INTERFACE_MODIFIERS): Likewise.
9009 * jcf-write.c (get_access_flags): Likewise.
9010 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9011 (add_method_1): Likewise.
9012 (get_access_flags_from_decl): Likewise.
9013 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9014 recognize strictfp flag.
9015 * jcf.h (ACC_STRICT): New define.
9016
9017 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9018
9019 * class.c(build_utf8_ref): Move declaration of decl_size
9020
9021 2002-02-07 Tom Tromey <tromey@redhat.com>
9022
9023 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9024 path.
9025
9026 2002-02-04 Anthony Green <green@redhat.com>
9027
9028 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9029 sections if available.
9030
9031 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9032
9033 * parse.y (java_expand_classes): Fix typo in static field loop.
9034
9035 2002-02-02 Richard Henderson <rth@redhat.com>
9036
9037 * class.c (add_field): Mark static fields external.
9038 (build_class_ref): Remove redundant set.
9039 * parse.y (java_expand_classes): Mark static fields of classes
9040 to be compiled as local.
9041 * jcf-parse.c (parse_class_file): Likewise.
9042
9043 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9044
9045 * gcj.texi (About CNI): New node.
9046
9047 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9048
9049 PR java/5080
9050 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9051 setlocale() with LC_CTYPE as a parameter.
9052 * jv-scan.c: Same.
9053
9054 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9055
9056 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9057 Follow GNU Coding Standards for --version.
9058
9059 2002-01-28 Tom Tromey <tromey@redhat.com>
9060
9061 * expr.c (build_jni_stub): Ensure storage for `meth' is
9062 generated.
9063 * parse.y (java_complete_expand_methods): Set
9064 current_function_decl before building JNI stub.
9065
9066 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9067
9068 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9069 BUILT_IN_SQRTF.
9070
9071 2002-01-22 Tom Tromey <tromey@redhat.com>
9072
9073 * decl.c (java_init_decl_processing): Use add_predefined_file.
9074 Predefine RawData.java.
9075 (predef_filenames): Removed.
9076 (java_init_decl_processing): Don't register predef_filenames.
9077 * jcf-parse.c (add_predefined_file): New function.
9078 (predefined_filename_p): Rewrote.
9079 (predefined_filename_p): No longer static.
9080 * decl.c (java_init_decl_processing): Call initialize_builtins.
9081 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9082 (java/builtins.o): New target.
9083 * builtins.c: New file.
9084 * parse.y (patch_invoke): Use build_call_or_builtin.
9085 * java-tree.h (build_call_or_builtin): Declare.
9086 (initialize_builtins): Declare.
9087 (java_set_exception_lang_code): Removed unused declaration.
9088 (PREDEF_FILENAMES_SIZE): Removed.
9089 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9090 (predef_filenames): New define.
9091 (add_predefined_file): Declare.
9092 (predefined_filename_p): Declare.
9093 * expr.c (expand_invoke): Use build_call_or_builtin.
9094
9095 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9096
9097 * parse.y (patch_switch_statement): Fix format specifier.
9098
9099 2002-01-16 Tom Tromey <tromey@redhat.com>
9100
9101 More for PR java/5365:
9102 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9103 default.
9104 (process_file): Generate include for
9105 java.lang.UnsupportedOperationExceptions.
9106
9107 2002-01-15 Andreas Jaeger <aj@suse.de>
9108
9109 * .cvsignore: Add man pages.
9110
9111 2002-01-15 Tom Tromey <tromey@redhat.com>
9112
9113 Fix for PR java/5365:
9114 * gjavah.c (process_file): Turn class name into a file name.
9115
9116 2002-01-14 Matthias Klose <doko@debian.org>
9117
9118 * gcj.texi: Fix whitespace and formatting errors in the
9119 synopsis of the man pages. Update copyright.
9120
9121 2002-01-14 Tom Tromey <tromey@redhat.com>
9122
9123 For PR libgcj/5303:
9124 * Make-lang.in (java.install-man): Handle jv-convert man page.
9125 (java.generated-manpages): Added jv-convert.1.
9126 (java.uninstall): Remove jv-convert.1.
9127 (java.maintainer-clean): Likewise.
9128 ($(srcdir)/java/jv-convert.1): New target.
9129 * gcj.texi (Top): Link to jv-convert node.
9130 (Individual utilities): Likewise.
9131 (Invoking jv-convert): New node.
9132
9133 2001-01-10 Jeff Sturm <jsturm@one-point.com>
9134 Martin Kahlert <martin.kahlert@infineon.com>
9135
9136 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9137 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9138
9139 2002-01-03 Graham Stott <grahams@redhat.com>
9140
9141 * class.c (compile_resource_file): Update copyright date.
9142 Constify filename parameter.
9143 (java-tree.h): Update copyright date.
9144 (compile_resource_file): Constify filename parameter.
9145
9146 2002-01-03 Graham Stott <grahams@redhat.com>
9147
9148 * gcc/jcf-parse.c: Update copyright date.
9149 (yyparse): Constify resource_filename.
9150
9151 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9152
9153 * parse.y (src_parse_roots): Don't needlessly zero init.
9154
9155 2001-12-31 Tom Tromey <tromey@redhat.com>
9156
9157 * parse.y (dump_java_tree): New function.
9158 (source_end_java_method): Call it.
9159 (end_class_declaration): Likewise.
9160 * lang.c (java_decode_option): Call dump_switch_p.
9161
9162 2001-12-28 Tom Tromey <tromey@redhat.com>
9163
9164 * gen-table.pl: Don't process characters after \uffff. Added
9165 comment pointing to input file.
9166
9167 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9168
9169 * gen-table.pl: Const-ify output. Document the location of a
9170 suitable unicode input file.
9171
9172 * chartables.h: Regenerate.
9173
9174 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9175
9176 * chartables.h: Const-ify.
9177 * gjavah.c (options): Likewise.
9178 * jcf-dump.c (options): Likewise.
9179 * jv-scan.c (options): Likewise.
9180 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9181 * parse.y (binop_lookup): Likewise.
9182
9183 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9184
9185 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9186 the static arrays that are output.
9187 * jvspec.c (jvgenmain_spec): Make static.
9188 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9189 * keyword.h: Regenerate.
9190 * lang.c (string_option, process_option_with_no, lang_f_options,
9191 lang_W_options): Const-ify.
9192 * lex.c (java_lex): Likewise.
9193
9194 2001-12-21 Richard Henderson <rth@redhat.com>
9195
9196 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9197 (get_boehm_type_descriptor): ... here. Arrange for the
9198 TREE_TYPE to get set properly.
9199
9200 2001-12-21 Richard Henderson <rth@redhat.com>
9201
9202 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9203 only if the target requires collect2.
9204
9205 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9206
9207 2001-12-20 Tom Tromey <tromey@redhat.com>
9208
9209 For PR java/4509:
9210 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9211 CAN_COMPLETE_NORMALLY for the node.
9212 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9213 generate code for second branch if first branch can't complete
9214 normally.
9215 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9216 the loop head if the loop body can't complete normally.
9217
9218 2001-12-20 Tom Tromey <tromey@redhat.com>
9219
9220 For PR java/4766:
9221 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9222 case where `finally' clause can't complete normally.
9223
9224 2001-12-20 Tom Tromey <tromey@redhat.com>
9225
9226 Fixes PR java/5057:
9227 * parse.y (analyze_clinit_body): Added this_class parameter.
9228 Check for more cases where we must keep <clinit>.
9229 (maybe_yank_clinit): Cleaned up flow control.
9230
9231 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9232
9233 * decl.c (java_init_decl_processing): Don't initialize
9234 finit_leg_identifier_node.
9235 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9236 (finit_leg_identifier_node): Remove.
9237 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9238
9239 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9240
9241 * mangle.c (mangle_member_name): Don't special-case for
9242 NO_DOLLAR_IN_LABEL.
9243 * mangle_name.c (unicode_mangling_length): Likewise.
9244 (append_unicode_mangled_name): Likewise.
9245 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9246 code.
9247
9248 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9249
9250 * expr.c (build_java_array_length_access): Don't force null pointer
9251 check unless flag_check_references is set.
9252
9253 2001-12-20 Tom Tromey <tromey@redhat.com>
9254
9255 Fix for PR java/3417:
9256 * parse.y (patch_assignment): Added special processing for
9257 `return'.
9258 (patch_return): Don't convert booleans to integers, and don't
9259 special-case `null'.
9260
9261 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9262
9263 * config-lang.in (diff_excludes): Remove.
9264
9265 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
9266
9267 * gcj.texi: Update link to GCC manual.
9268
9269 2001-12-17 Tom Tromey <tromey@redhat.com>
9270
9271 * parse.y (link_nested_class_to_enclosing): Removed useless
9272 statement.
9273
9274 2001-12-16 Tom Tromey <tromey@redhat.com>
9275
9276 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9277 Fixes PR java/5088.
9278
9279 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9280
9281 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9282 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9283 spelling errors.
9284
9285 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9286
9287 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9288
9289 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9290
9291 * decl.c (java_init_decl_processing): Build otable_type correctly.
9292 otable_decl is an otable_type.
9293
9294 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9295
9296 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9297 otable_type, otable_ptr_type, method_symbol_type,
9298 method_symbols_array_type, method_symbols_array_ptr_type): New
9299 field/global tree definitions.
9300 (flag_indirect_dispatch): New flag.
9301 * decl.c (java_init_decl_processing): Initialize new otable and
9302 otable_syms type nodes and decls. Add new field "index" to
9303 method_type_node.
9304 * class.c (build_method_symbols_entry): New function.
9305 (make_method_value): Set "index" to to method's vtable index for
9306 virtual methods when indirect-dispatch is not used.
9307 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9308 and set vtable_method_count to -1. Set otable and otable_syms field
9309 if indirect-dispatch is used and there was something to put in them.
9310 (build_method_symbols_entry): New function.
9311 (emit_offset_symbol_table): New function.
9312 * expr.c (get_offset_table_index): New function.
9313 (build_invokevirtual): Build array reference to otable at the index
9314 returned by get_offset_table_index, and use the result as the vtable
9315 offset.
9316 (build_invokeinterface): Similar.
9317 * jcf-parse.c (yyparse): If indirect-dispatch, call
9318 emit_offset_symbol_table at the end of compilation, after all classes
9319 have been generated.
9320 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9321 * lang.c (flag_indirect_dispatch): Define.
9322 (lang_f_options): Add indirect-dispatch flag.
9323
9324 2001-12-14 Matthias Klose <doko@debian.org>
9325
9326 * gcj.texi: Markup for man page generation. Document missing
9327 options printed by <tool> --help.
9328 Terminate description of gij's -ms option with a dot.
9329 * Make-lang.in ($(srcdir)/java/*.1): New targets.
9330 (java.generated-manpages java.install-man, java.uninstall,
9331 java-maintainer-clean) Updated.
9332
9333 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
9334
9335 * class.c (get_dispatch_table): Fix java vtable layout
9336 for TARGET_VTABLE_USES_DESCRIPTORS.
9337 * decl.c (java_init_decl_processing): Initialize
9338 alloc_no_finalizer_node, finalize_identifier_node.
9339 * expr.c (class_has_finalize_method): New function.
9340 (expand_java_NEW): Generate calls for finalizer-free allocation.
9341 (build_invokevirtual): Fix java vtable layout for
9342 TARGET_VTABLE_USES_DESCRIPTORS.
9343 * java-tree.h (enum java_tree_index): New entries:
9344 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9345 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9346 (class_has_finalize_method): declare.
9347 (HAS_FINALIZER_P): New macro.
9348 * parse.y (patch_invoke): Generate calls for finalizer-free
9349 allocation.
9350
9351 2001-12-12 Matthias Klose <doko@debian.org>
9352
9353 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9354 whitespace at end of line.
9355
9356 2001-12-11 Tom Tromey <tromey@redhat.com>
9357
9358 * lex.c (java_init_lex): Define wfl_to_string as
9359 gnu.gcj.runtime.StringBuffer unless generating bytecode.
9360
9361 2001-12-11 Jeff Sturm <jsturm@one-point.com>
9362
9363 * class.c (make_method_value): Use null_pointer_node to
9364 represent empty exception table.
9365
9366 2001-12-10 Tom Tromey <tromey@redhat.com>
9367
9368 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9369
9370 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
9371
9372 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9373
9374 2001-12-09 Per Bothner <per@bothner.com>
9375
9376 * check-init.c (current_switch_has_default): New static field.
9377 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
9378 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
9379 DEFAULT_EXPR seen, simulate a default alternative that copies state.
9380
9381 2001-12-09 Tom Tromey <tromey@redhat.com>
9382
9383 * check-init.c (check_init): Don't allow pre- or post- increment
9384 or decrement of final variable.
9385 (final_assign_error): Minor error message rewording.
9386
9387 2001-12-08 Tom Tromey <tromey@redhat.com>
9388
9389 * java-tree.h: Fixed typo.
9390
9391 * gjavah.c (decompile_method): Don't decompile to `return this'
9392 for static methods.
9393
9394 * gjavah.c (cxx_keywords): Re-sorted.
9395 * lex.c (cxx_keywords): Re-sorted.
9396
9397 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9398 else.
9399
9400 * gjavah.c (print_namelet): Clear subnamelets.
9401 (HANDLE_METHOD): Set `method_printed' earlier.
9402
9403 2001-12-07 Tom Tromey <tromey@redhat.com>
9404
9405 * lang.c (lang_f_options): Added
9406 optimize-static-class-initialization.
9407 (java_decode_option): Removed special case.
9408
9409 2001-12-07 Per Bothner <per@bothner.com>
9410
9411 * check-init.c (check_init): Fix typo freeing memory twice.
9412
9413 2001-12-05 Per Bothner <per@bothner.com>
9414
9415 Restore support for static class initialization optimization.
9416 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9417 * check-init.c (check_int): At end of BLOCK handle initialization
9418 blocks, which used to be done in java_complete_expand_method but did
9419 not handle the case where check_for_initialization might allocate
9420 more than a word of bits.
9421 * decl.c (lang_make_tree): The smic field is now a tree.
9422 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
9423 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
9424
9425 * parse.y (emit_test_initialization): Combine hash_lookup calls.
9426
9427 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9428 Change from a hash table to a list.
9429 (struct_lang_decl): Change field 'smic' to match.
9430 * class.c (add_method_1): Initialize
9431 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9432 * parse.y (adjust_init_test_initialization): Removed - inlined into -
9433 (java_expand_method_bodies): -here, since 'smic' is now a list.
9434 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
9435
9436 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
9437
9438 * class.c (java_hash_compare_tree_node): Fix casts.
9439
9440 2001-12-04 Per Bothner <per@bothner.com>
9441
9442 * check-init.c: Handle definite unassignment to finals in addition
9443 to definite assignment.
9444 (loop_current_locals): New field.
9445 (num_current_locals, int start_current_locals, num_current_words):
9446 Make static.
9447 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
9448 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9449 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
9450 (get_variable_decl, check_final_reassigned): New functions.
9451 (check_init, check_bool_init): Modify as needed for checking finals.
9452 (check_for_initialization): Take extra parameter and return void.
9453 Do extra start-up logic to check final fields for assignment.
9454 * parse.y (check_static_final_variable_assignment_flag,
9455 reset_static_final_variable_assignment_flag, check_final_assignment,
9456 check_final_variable_local_assignment_flag,
9457 reset_final_variable_indirect_assignment_flag,
9458 reset_final_variable_global_assignment_flag): Remove functions.
9459 (java_complete_expand_methods, outer_field_access_fix,
9460 patch_assignment): Remove no-longer used logic.
9461 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
9462 * parse.y (register_fields, java_complete_tree): Update accordingly.
9463
9464 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
9465 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
9466 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
9467
9468 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
9469
9470 * java-tree.h (DECL FINAL): New bit-field.
9471 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
9472 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
9473 (DECL_INIT_CALLS_THIS): New macro.
9474 (struct lang_decl): New bit-field init_calls_this.
9475 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9476 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9477 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
9478 use it for both local variables and final fields.
9479 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
9480 and local_final.
9481 (struct lang_type): Remove hfv bit-field.
9482 (check_for_initialization): Change to return void.
9483
9484 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
9485 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
9486 * check-init.c (final_assign_error): New helper function.
9487 (check_final_reassigned, check_init): Use it.
9488 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9489
9490 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
9491 bit-fields to unsigned.
9492
9493 2001-12-03 Per Bothner <per@bothner.com>
9494
9495 * parse.y (patch_binop): Minor constant folding.
9496
9497 * parse.y (build_current_thisn): Shorter 'buffer'.
9498
9499 2001-12-03 Per Bothner <per@bothner.com>
9500
9501 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
9502 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9503 * jcf-write.c (generate_bytecode_insns): Remove support for
9504 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9505 * check-init.c (check_init): Likewise.
9506
9507 2001-12-03 Per Bothner <per@bothner.com>
9508
9509 * verify.c (subroutine_nesting): New function.
9510 (verify_jvm_instructions): Use it to fix logic for checking that
9511 we're done with the current subroutine.
9512
9513 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9514 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9515
9516 2001-12-03 Per Bothner <per@bothner.com>
9517
9518 * jcf.h: Fix obvious typo in comment.
9519 * typeck.c (build_null_signature): Add comment.
9520
9521 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9522
9523 * expr.c: Remove leading capital from diagnostic messages, as
9524 per GNU coding standards.
9525 * jcf-io.c: Similarly.
9526 * jcf-parse.c: Similarly.
9527 * jv-scan.c: Similarly.
9528 * jvspec.c: Similarly.
9529 * mangle.c: Similarly.
9530
9531 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
9532 Alexandre Petit-Bianco <apbianco@redhat.com>
9533
9534 * expr.c (build_java_arrayaccess): Call save_expr on array for
9535 correct evaluation order, modified comment, fixed indentation.
9536 * parse.y: (patch_assignment): Correctly extract the array base
9537 from the tree generate by build_java_arrayaccess, added comments.
9538 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9539 Fixes PR java/3096, PR java/3803, PR java/3965.
9540
9541 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9542
9543 * expr.c (expand_byte_code): Remove trailing periods from messages.
9544 * jcf-parse.c (load_class, jcf_parse): Similarly.
9545 * jcf-write.c (generate_classfile): Similarly.
9546 * lex.c (java_lex): Similarly.
9547
9548 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9549
9550 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9551
9552 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9553
9554 * Make-lang.in (java.generated-manpages): New dummy target.
9555
9556 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9557
9558 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9559 ASM_FINAL_SPEC.
9560 (lang_specific_pre_link): Use set_input to set input_filename.
9561 Append `main' here.
9562 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9563 (main): Fix definition.
9564 Strip `main' from classname.
9565 Fixes PR java/227.
9566
9567 2001-11-18 Roger Sayle <roger@eyesopen.com>
9568
9569 * parse.h (java_expand_switch): Remove old prototype.
9570
9571 2001-11-18 Tom Tromey <tromey@redhat.com>
9572
9573 Fix for PR java/1401:
9574 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9575 arg0 is null.
9576 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9577 correctly.
9578
9579 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9580
9581 * lang.c (finish_parse): Rename to java_finish.
9582 (LANG_HOOKS_FINISH, java_finish): New.
9583
9584 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9585
9586 * decl.c (init_decl_processing): Rename java_init_decl_processing.
9587 * java-tree.h: New prototype.
9588 * lang.c (java_init): Update prototype. Combine with old init_parse.
9589
9590 2001-11-13 Tom Tromey <tromey@redhat.com>
9591
9592 * gjavah.c (method_signature): New global.
9593 (HANDLE_METHOD): Set it.
9594 (decompile_return_statement): New function.
9595 (decompile_method): Use it.
9596 (print_method_info): Removed `synth' argument.
9597
9598 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9599
9600 * java-tree.h (java_set_yydebug): New.
9601 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9602 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9603 (print_lang_decl, print_lang_type, print_lang_identifier,
9604 print_lang_statistics, lang_print_xnode): Remove.
9605
9606 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9607
9608 * jcf-parse.c (init_lex): Remove.
9609 * lang.c (language_string, lang_identify): Remove.
9610 (struct lang_hooks): Constify.
9611 (LANG_HOOKS_NAME): Override.
9612 (init_parse): Update.
9613
9614 2001-11-08 Andreas Franck <afranck@gmx.de>
9615
9616 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9617 program_transform_name the way suggested by autoconf.
9618 (java.install-common): Also transform auxiliary program names with
9619 program_transform_name.
9620
9621 2001-11-08 Tom Tromey <tromey@cygnus.com>
9622
9623 * parse.y (trap_overflow_corner_case): New rule.
9624 (unary_expression): Use it.
9625 * lex.c (java_init_lex): Don't set minus_seen.
9626 (yylex): Don't use minus_seen. Communicate overflow to parser for
9627 it to handle.
9628 (error_if_numeric_overflow): New function.
9629 * parse.h (minus_seen): Removed field.
9630 (JAVA_RADIX10_FLAG): New define.
9631
9632 2001-11-07 Tom Tromey <tromey@redhat.com>
9633
9634 Patch for PR java/1414:
9635 * parse.y (case_label_list): New global.
9636 (goal): Register case_label_list with GC.
9637 (java_complete_lhs): Save new case on case_label_list.
9638 (patch_switch_statement): Check for duplicate case labels.
9639
9640 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9641
9642 * parse.y (patch_assignment): Removed unused third argument.
9643 (java_complete_lhs): Removed unused third argument to patch_assignment.
9644
9645 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9646
9647 * lang.c: Include langhooks-def.h.
9648 * Make-lang.in: Update.
9649
9650 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9651
9652 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9653
9654 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9655
9656 * mangle.c (find_compression_record_match): Don't match compression
9657 records for package name elements unless they occur at the start of
9658 the name. Fix for PR java/4717.
9659
9660 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9661
9662 * expr.c (expand_java_field_op): Don't special-case references to
9663 java.lang.PRIMTYPE.TYPE.
9664 (build_primtype_type_ref): Removed.
9665 * java-tree.h (build_primtype_type_ref): Remove prototype.
9666 * parse.y (maybe_build_primttype_type_ref): Removed.
9667 (complete_function_arguments): Don't special-case references to
9668 java.lang.PRIMTYPE.TYPE.
9669 (patch_assignment): Likewise.
9670 (array_constructor_check_entry): Likewise.
9671
9672 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9673
9674 * mangle.c (static tree compression_table): Fixed leading comment.
9675 * parse.h (struct parser_ctxt): Fixed field comment.
9676 * parse.y (check_pkg_class_access): New prototype, fixed leading
9677 comment, new parameter used to emit error only if passed as true.
9678 (parse_check_super): Pass extra argument to check_pkg_class_access.
9679 (do_resolve_class): Likewise.
9680 (process_imports): Likewise.
9681 (read_import_dir): Fixed indentation.
9682 (find_in_imports_on_demand): New local class_type_name. Local
9683 node_to_use deleted. while loop changed into for loop. Report
9684 multiple definition only for accessible classes. Improved error
9685 message.
9686 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9687 assigned to parameter list, fixed indentation. while loop changed
9688 into for loop, restore TREE_CHAIN on local `tem' before the next
9689 iteration.
9690
9691 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9692
9693 * lang.c (lang_get_alias_set): Deleted.
9694
9695 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9696
9697 * gjavah.c (jni_print_char): Fix thinko in last change.
9698
9699 * gjavah.c (jni_print_char, decode_signature_piece): Use
9700 safe-ctype macros and/or fold extra calls into fewer ones.
9701 * lex.c (java_read_unicode, java_lex): Likewise.
9702 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9703 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9704 * mangle_name.c (append_unicode_mangled_name,
9705 unicode_mangling_length): Likewise.
9706
9707 2001-10-17 Richard Henderson <rth@redhat.com>
9708
9709 * Make-lang.in (java/lang.o): Depend on langhooks.h.
9710
9711 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
9712
9713 * lang.c (langhooks.h): Included.
9714 (LANG_HOOKS_INIT): Redefined.
9715 (LANG_HOOKS_INIT_OPTIONS): Likewise.
9716 (LANG_HOOKS_DECODE_OPTION): Likewise.
9717 (struct lang_hooks lang_hooks): New initialization.
9718
9719 2001-10-11 Per Bothner <per@bothner.com>
9720
9721 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
9722 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9723 The former is simpler, and jcf-write.c handles it better.
9724 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
9725 or WITH_CLEANUP_EXPR.
9726 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
9727 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9728
9729 * parse.y (patch_if_else_statement): If the condition is constant,
9730 optimize away the test.
9731
9732 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9733
9734 * parse.y (patch_cast): Call patch_string on the first operand of
9735 the incoming node, update it if necessary. Fixes PR java/4510.
9736
9737 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9738
9739 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9740 when name qualifier matches a package name.
9741
9742 2001-10-08 Tom Tromey <tromey@redhat.com>
9743
9744 Fix for PR java/4489:
9745 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9746 force a new label when computing `body_block'.
9747
9748 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9749
9750 * jcf-io.c (format_uint): Const-ify.
9751 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9752 * lex.c (java_get_line_col): Likewise.
9753 * parse.y (build_incdec): Likewise.
9754
9755 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9756
9757 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9758 a NULL enclosing context if appropriate. Fixes PR java/4466.
9759
9760 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9761
9762 * parse.y (patch_assignment): Use lvalue's original TYPE when
9763 building the final COMPOUND_EXPR.
9764 (try_reference_assignconv): Fixed leading comment.
9765
9766 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
9767
9768 * parse.y (check_final_variable_indirect_assignment): For
9769 COMPOUND_EXPR, return only if finals were found initialized
9770 properly, if not, keep on checking.
9771 (check_final_variable_global_assignment_flag): New local
9772 error_found, set when appropriate and used to decide whether to
9773 report uninitialized finals. Fixed typo in comment.
9774
9775 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9776
9777 * decl.c (init_decl_processing): Fixed typo in predef_filenames
9778 last three initializations. Fixes PR java/4360.
9779
9780 2001-09-21 Richard Henderson <rth@redhat.com>
9781
9782 * class.c (get_dispatch_table): Handle function descriptors.
9783 (build_dtable_decl): Likewise.
9784 * expr.c (build_invokevirtual): Likewise.
9785
9786 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9787
9788 * parse.y (patch_method_invocation): Build class initialization
9789 when static finals are used to qualify method invocation.
9790 Fixes PR java/4366.
9791
9792 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
9793
9794 * parse.h: (WFL_STRIP_BRACKET): Re-written using
9795 build_type_name_from_array_name.
9796 (STRING_STRIP_BRACKETS): New macro.
9797 * parse.y (build_type_name_from_array_name): New function.
9798 (array_creation_expression:): Accumulate []s instead of [s.
9799 (cast_expression:): Accumulate []s instead of [s after cast type
9800 name.
9801 (build_array_from_name): Local string deleted, use
9802 build_type_name_from_array_name.
9803 (build_unresolved_array_type): Accumulate []s instead of [s after
9804 type name.
9805 (register_fields): Fixed comment.
9806 (resolve_class): Local name, base deleted, new locals tname and
9807 array_dims. Use build_type_name_from_array_name. Use array_dims to
9808 build array type.
9809 (purify_type_name): Use STRING_STRIP_BRACKETS.
9810
9811 2001-09-18 Andreas Jaeger <aj@suse.de>
9812
9813 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9814 * jv-scan.c: Likewise.
9815
9816 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9817
9818 * parse.y (patch_method_invocation): Inner class creation context
9819 check not enforced within constructors. Fixes PR java/1873.
9820
9821 2001-09-16 Tom Tromey <tromey@redhat.com>
9822
9823 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9824 NOTE_PUSH for single-case push. Fixes PR java/4189.
9825
9826 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9827
9828 * java-tree.h (TYPE_IMPORT_LIST): New macro.
9829 (TYPE_IMPORT_DEMAND_LIST): Likewise.
9830 (struct lang_type): New fields import_list and import_demand_list.
9831 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9832 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9833 (do_resolve_class): New local saved_enclosing_type, initialized,
9834 passed as parameter to find_in_imports and find_in_imports_on_demand.
9835 (find_in_imports): Added paramater enclosing_type, use its
9836 TYPE_IMPORT_LIST when applicable.
9837 (find_in_imports_on_demand): Added parameter enclosing_type, use
9838 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9839 declaration and initialization.
9840 (fold_constant_for_init): Switch/restore current_class to the
9841 appropriate context.
9842
9843 2001-09-13 Mark Mitchell <mark@codesourcery.com>
9844
9845 * verify.c (verify_jvm_instructions): Fix typo.
9846
9847 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9848
9849 * expr.c (expand_invoke): Const-ification.
9850 * parse.y (patch_method_invocation): Likewise.
9851
9852 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9853
9854 * gjavah.c (cxx_keywords): Const-ification.
9855 * keyword.gperf (java_keyword): Likewise.
9856 * lang.c (java_tree_code_name): Likewise.
9857 * lex.c (cxx_keywords): Likewise.
9858 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
9859
9860 2001-09-11 Richard Henderson <rth@redhat.com>
9861
9862 * parse.h (ctxp_for_generation): Mark extern.
9863
9864 2001-09-10 Richard Henderson <rth@redhat.com>
9865
9866 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
9867
9868 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9869
9870 * typeck.c (java_array_type_length, build_prim_array_type):
9871 Represent empty arrays by NULL index.
9872
9873 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
9874
9875 * java-tree.h (compile_resource_file): Grouped with other prototypes.
9876 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
9877
9878 2001-09-06 Anthony Green <green@redhat.com>
9879
9880 * class.c (O_BINARY): Define if necessary.
9881 (registerResource_libfunc): Declare.
9882 (init_class_processing): Initilize registerResource_libfunc.
9883 (compile_resource_file): New function.
9884 * java-tree.h (resource_name): Declare.
9885 (compile_resource_file): Declare.
9886 * jcf-parse.c (yyparse): Handle compiling java resource files.
9887 * lang.c (java_decode_option): Handle -fcompile-resource option.
9888 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
9889 resource files.
9890 * gcj.texi (Code Generation): Add documentation for -R flag.
9891
9892 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9893
9894 * jcf-write.c (generate_classfile): Issue an error in case of
9895 field/initial value mismatch.
9896 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
9897 being initialized and we're generating bytecode.
9898 (java_complete_lhs): In MODIFY_EXPR section: added comments,
9899 set DECL_INITIAL properly when appropriate.
9900 Fixes PR java/4230
9901 Fixes PR java/4204
9902
9903 2001-09-01 Per Bothner <per@bothner.com>
9904
9905 * parse.y (maybe_yank_clinit): A field without an initializer is not
9906 relevant. All initializers except static final and constant require
9907 <clinit>, regardless of flag_emit_class_files.
9908
9909 2001-08-31 Per Bothner <per@bothner.com>
9910
9911 * class.c (set_constant_value): When not emitting class files, then a
9912 String ConstantValue is a utf8const_ptr_type.
9913
9914 2001-08-30 Per Bothner <per@bothner.com>
9915
9916 * jcf-write.c (generate_classfile): Check that field is primitive
9917 or string before emitting ConstantValue attribute.
9918
9919 2001-08-30 Per Bothner <per@bothner.com>
9920
9921 * parse.y (resolve_qualified_expression_name): If creating a
9922 COMPOUND_EXPR, set it's type correctly.
9923
9924 2001-08-30 Per Bothner <per@bothner.com>
9925
9926 * jcf-io.c (open_class): Set filename field.
9927
9928 * jcf-parse,c (parse_class_file): Set current_function_decl
9929 for better error message when Code attribute is missing.
9930
9931 * lang.c (put_decl_node, lang_print_error): Re-arrange for
9932 better diagnostics, especially for constructors.
9933
9934 2001-08-30 Per Bothner <per@bothner.com>
9935
9936 * jcf-write.c (generate_classfile): Don't write ConstantValue
9937 attribute if field is not final, for compatibility with jdk.
9938
9939 * jcf-write.c (generate_classfile): Convert ConstantValue values
9940 to correct type. Work-around for front-end bug.
9941 * class.c (set_constant_value): Error if constant has wrong type.
9942
9943 2001-08-30 Per Bothner <per@bothner.com>
9944
9945 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
9946 "Double" are printed at verbosity 1.
9947
9948 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
9949
9950 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
9951
9952 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
9953
9954 * parse.y (patch_assignment): Don't verify final re-assignment here.
9955 (java_complete_lhs): Verify assignments to finals calling
9956 patch_assignment. Verify re-assignments to finals before calling
9957 patch_assignment.
9958
9959 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
9960
9961 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9962 Fixes PR java/1413
9963
9964 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9965
9966 * lex.c (java_lex): new local found_hex_digits. Set and then used
9967 in test to reject invalid hexadecimal numbers.
9968 * parse.y (java_complete_tree): Prevent unwanted cast with
9969 initialized floating point finals.
9970 (patch_binop): Emit a warning when detecting a division by zero,
9971 mark result not constant, don't simplify non integer division.
9972
9973 2001-08-28 Per Bothner <per@bothner.com>
9974
9975 * jcf-write.c (generate_bytecode_insns): For increments and
9976 decrements just recurse to push constant. Improvement on Mark's patch.
9977
9978 2001-08-28 Mark Mitchell <mark@codesourcery.com>
9979
9980 * jcf-write.c (generate_bytecode_insns): Generate an integer to
9981 real conversion for increments and decrements of reals.
9982
9983 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9984
9985 * parse.y (resolve_qualified_expression_name): Handle unresolved
9986 qualified expressions, prevent numerical qualifiers, fixed typo.
9987 Fixes PR java/4141
9988
9989 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9990
9991 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9992 don't report anything but deprecated class when marked so. Handle
9993 VAR_DECL.
9994 (patch_method_invocation): Check deprecation on methods and types.
9995 (patch_binop): code becomes an enum tree_code, added default: to
9996 switch to handle that. Detect division by zero, try to fold and
9997 return before using a subroutine.
9998
9999 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10000
10001 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10002 file smaller than 4 bytes.
10003 * parse.y (check_inner_circular_reference): New function.
10004 (check_circular_reference): Likewise.
10005 (array_initializer:): Accept {,}.
10006 (java_check_circular_reference): Rewritten using
10007 check_circular_reference and check_inner_circular_reference.
10008 (java_complete_expand_method): Unconditionally save and restore
10009 the unpurged exception list.
10010 (build_dot_class_method_invocation): Unmangle signature parameter.
10011
10012 2001-08-21 Tom Tromey <tromey@redhat.com>
10013
10014 * decl.c (init_decl_processing): Add `throws' field to method
10015 descriptor.
10016 * class.c (make_method_value): Compute `throws' field for method.
10017
10018 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10019
10020 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10021 circularity is detected.
10022 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10023
10024 2001-08-17 Richard Henderson <rth@redhat.com>
10025
10026 * class.c (emit_register_classes): Add align parameter to
10027 call to assemble_integer.
10028
10029 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10030
10031 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10032 loading a class_or_name fails, try considering an innerclass name
10033 and load the enclosing context.
10034 * parse.y (resolve_inner_class): New function.
10035 (find_as_inner_class): Added leading comment.
10036 (register_incomplete_type): Keep the current context as enclosing
10037 context for JDEP_FIELD dependencies.
10038 (do_resolve_class): Locals new_class_decl and super initialized to
10039 NULL. Call resolve_inner_class, explore the enclosing context
10040 superclass if necessary.
10041 Fixes PR java/4007
10042
10043 2001-08-16 Tom Tromey <tromey@redhat.com>
10044
10045 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10046 * gjavah.c (main): Updated for change to jcf_path_seal.
10047 * lang.c (version_flag): New global.
10048 (java_decode_option): Recognize `-version'.
10049 (java_init): Update for change to jcf_path_seal.
10050 * jcf.h (jcf_path_seal): Added `print' argument.
10051 * jcf-path.c (jcf_path_seal): Added `print' argument.
10052
10053 2001-08-13 Zack Weinberg <zackw@panix.com>
10054
10055 * Make-lang.in (java/decl.o): Update dependencies.
10056 * decl.c: Include libfuncs.h, don't include toplev.h.
10057
10058 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10059
10060 * decl.c (init_decl_processing): exception_type_node,
10061 class_not_found_type_node, and no_class_def_found_type_node
10062 initialized. predef_filenames augmented accordingly.
10063 instinit_identifier_node initialized.
10064 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10065 * java-tree.h (enum java_tree_index): New entries
10066 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10067 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10068 (exception_type_node): New macro.
10069 (class_not_found_type_node): Likewise.
10070 (no_class_def_found_type_node): Likewise.
10071 (instinit_identifier_node): Likewise.
10072 (PREDEF_FILENAMES_SIZE): Adjusted.
10073 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10074 (struct lang_type): Fixed typo in bitfield name.
10075 (DECL_INSTINIT_P): New macro.
10076 (ID_INSTINIT_P): Likewise.
10077 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10078 attribute.
10079 * parse.y (encapsulate_with_try_catch): New function.
10080 (generate_instinit): Likewise.
10081 (build_instinit_invocation): Likewise.
10082 (ctors_unchecked_throws_clause_p): Likewise.
10083 (add_instance_initializer): Deleted.
10084 (build_instance_initializer): Likewise.
10085 (in_instance_initializer): Likewise.
10086 (check_method_redefinition): instinit$ not to be verified.
10087 (java_complete_expand_methods): Generate instinit$, simplified code.
10088 (build_dot_class_method): Eliminated unnecessary locals. Use
10089 encapsulate_with_try_catch, removed unnecessary code.
10090 (fix_constructors): New local iii. Use build_instinit_invocation.
10091 (patch_method_invocation): Added comment.
10092 (maybe_use_access_method): Don't consider instinit$.
10093 (find_applicable_accessible_methods_list): Shorten the search for
10094 instinit$ too.
10095 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10096 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10097 (patch_throw_statement): Likewise. Fixed typo.
10098
10099 2001-08-12 David Edelsohn <edelsohn@gnu.org>
10100
10101 Revert:
10102 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10103 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10104 ASM_FINAL_SPEC.
10105 (lang_specific_pre_link): Use set_input to set input_filename.
10106 Append `main' here.
10107 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10108 (main): Fix definition.
10109 Strip `main' from classname.
10110 Fixes PR java/227.
10111
10112 2001-08-11 Zack Weinberg <zackw@panix.com>
10113
10114 * lex.h: Don't include setjmp.h. Don't define
10115 SET_FLOAT_HANDLER or prototype set_float_handler.
10116
10117 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10118
10119 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10120 `poplevel' in the right order.
10121
10122 2001-08-09 Richard Henderson <rth@redhat.com>
10123
10124 * Make-lang.in (class.o): Depend on TARGET_H.
10125 * class.c (emit_register_classes): Use target hooks instead of
10126 assemble_constructor and assemble_destructor.
10127
10128 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10129
10130 * check-init.c (flags.h): Include
10131 (check_init): Don't report uninitialized static class
10132 initialization flags, don't free bit index when doing static class
10133 initialization optimization.
10134 (check_for_initialization): Return type changed to `unsigned int.'
10135 (attach_initialized_static_class): New function.
10136 * class.c (add_method_1): Create the initialized static class
10137 table if necessary.
10138 (finish_class): Always emit deferred inline methods.
10139 * decl.c (emit_init_test_initialization): Moved to expr.c
10140 (complete_start_java_method): Don't traverse
10141 DECL_FUNCTION_INIT_TEST_TABLE.
10142 (lang_mark_tree): Mark hash tables in function decls.
10143 * expr.c (emit_init_test_initialization): Moved from decl.c.
10144 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10145 initialization flag, set DECL_CONTEXT and
10146 LOCAL_CLASS_INITIALIZATION_FLAG.
10147 (java_lang_expand_expr): Emit initialization code for static class
10148 initialized flags when entering block, if necessary.
10149 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10150 * java-tree.h (flag_optimize_sci): New global variable declaration.
10151 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10152 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10153 (LOCAL_FINAL_P): Fixed typo in comment.
10154 (FINAL_VARIABLE_P): Likewise.
10155 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10156 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10157 (struct lang_decl): New fields `ict', `smic' and `cif.'
10158 (check_for_initialization): New returned value for global.
10159 (attach_initialized_static_class): New global function.
10160 (STATIC_CLASS_INIT_OPT_P): New macro.
10161 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10162 * lang.c (java_decode_option): Handle
10163 `-fno-optimize-static-class-initialization'
10164 * parse.y (start_complete_expand_method): New function.
10165 (java_expand_method_bodies): Likewise.
10166 (attach_init_test_initialization_flags): Likewise.
10167 (adjust_init_test_initialization): Likewise.
10168 (emit_test_initialization): Likewise.
10169 (java_complete_expand_methods): Nullify abstract and native method
10170 bodies.
10171 (java_complete_expand_method): New locals `fbody', `block_body'
10172 and `exception_copy.' Reorganized: directly return on empty method
10173 bodies, call `start_complete_expand_method', remember definitely
10174 initialized static class in function, don't expand method bodies.
10175 (java_expand_classes): Call `java_expand_method_bodies' before
10176 `finish_class' when compiling to native.
10177 (resolve_expression_name): Use `orig' after building outer class
10178 field access.
10179 (patch_invoke): Remember static method invocations.
10180
10181 2001-08-06 Richard Henderson <rth@redhat.com>
10182
10183 * class.c (emit_register_classes): Pass a symbol_ref and priority
10184 to assemble_constructor.
10185
10186 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
10187
10188 * java-tree.h (all_class_filename): New macro.
10189 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10190 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10191 newly created IDENTIFIER_NODE to `all_class_filename.'
10192
10193 2001-08-01 Jeff Sturm <jsturm@one-point.com>
10194
10195 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10196 Use ggc_add_tree_root to register roots.
10197
10198 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10199
10200 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10201 second operand calling check_init.
10202 * decl.c (complete_start_java_method): Swaped second and third
10203 arguments while creating WITH_CLEANUP_EXPR node.
10204 * jcf-write.c (generate_bytecode_insns): Use second operand
10205 instead of third when handling WITH_CLEANUP_EXPR.
10206 * parse.y (java_complete_lhs): Expand second operand of
10207 WITH_CLEANUP_EXPR nodes.
10208 (patch_synchronized_statement): Swaped second and third arguments
10209 while creating WITH_CLEANUP_EXPR node.
10210
10211 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
10212
10213 * parse.y (create_interface): Avoid cyclic inheritance report when
10214 syntax error encountered during class definition.
10215 Fixes PR java/2956
10216
10217 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10218
10219 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10220 ASM_FINAL_SPEC.
10221 (lang_specific_pre_link): Use set_input to set input_filename.
10222 Append `main' here.
10223 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10224 (main): Fix definition.
10225 Strip `main' from classname.
10226 Fixes PR java/227.
10227
10228 2001-07-18 Tom Tromey <tromey@redhat.com>
10229
10230 For PR java/2812:
10231 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10232 * lex.c (java_new_lexer): Use ICONV_CONST.
10233 (java_read_char): Likewise.
10234 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10235 (jv-scan$(exeext)): Likewise.
10236
10237 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10238
10239 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10240 * parse.y (check_class_interface_creation): Allow `private' if the
10241 enclosing is not an interface.
10242 (create_interface): Interface tagged public if the enclosing
10243 context is an interface.
10244 (create_class): Class tagged public if the enclosing context
10245 is an interface.
10246 Fixes PR java/2959
10247
10248 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10249
10250 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10251 Fixes PR java/2665
10252
10253 2001-07-14 Tim Josling <tej@melbpc.org.au>
10254
10255 * check-init.c (check_init): Remove references to EXPON_EXPR.
10256
10257 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10258
10259 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10260 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10261 Fixes PR java/3602
10262
10263 2001-07-13 Tom Tromey <tromey@redhat.com>
10264
10265 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10266 invocation.
10267
10268 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10269
10270 * parse.y (patch_method_invocation): Don't override primary if one
10271 is already provided, but let this$<n> be built. Fixed comment.
10272
10273 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10274
10275 * parse.y (empty_statement:): Report empty statement error only
10276 when found at class declaration level.
10277 Fixes PR java/3635
10278
10279 2001-07-12 Tom Tromey <tromey@redhat.com>
10280
10281 * expr.c (expand_load_internal): New function.
10282 (LOAD_INTERNAL): Use it.
10283
10284 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
10285
10286 * parse.y (verify_constructor_super): Compare anonymous class ctor
10287 args with `valid_method_invocation_conversion_p.'
10288 Fixes PR java/3285
10289
10290 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10291
10292 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10293 `-fsyntax-only.' Fixes PR java/3248
10294
10295 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10296
10297 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10298
10299 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10300
10301 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10302 current function is static. Fixes PR java/1970
10303
10304 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10305
10306 * parse.y (patch_method_invocation): Add enclosing context to ctor
10307 calls if necessary. Fixes PR java/2953
10308
10309 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10310
10311 * parse.y (resolve_package): Abort if qualified expression member
10312 isn't right.
10313 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10314 Fixes PR java/1391
10315
10316 2001-07-07 Zack Weinberg <zackw@stanford.edu>
10317
10318 * verify.c: Don't use // comments.
10319
10320 2001-07-05 Tom Tromey <tromey@redhat.com>
10321
10322 * lang.c (flag_assume_compiled): Removed.
10323 * java-tree.h (flag_assume_compiled): Removed.
10324 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10325 -fhash-synchronization, -fuse-divide-subroutine,
10326 -fcheck-references, -femit-class-file, -femit-class-files,
10327 -fassume-compiled. Updated --encoding information. Changed
10328 -foutput-class-dir to `-d'.
10329
10330 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
10331
10332 * jcf-parse.c (parse_class_file): Add lineno parameter to
10333 debug_start_source_file call.
10334
10335 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
10336
10337 * gcj.texi: Use gpl.texi.
10338 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10339 dependencies and use doc/include in search path.
10340
10341 2001-07-03 Jeff Sturm <jsturm@one-point.com>
10342
10343 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10344 `this'. If so, don't build instance initializers.
10345
10346 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10347
10348 * parse.y (resolve_expression_name): Improved error message for
10349 inner class cases. Fixes PR java/1958
10350
10351 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
10352
10353 * lang.c: #include diagnostic.h
10354 (lang_print_error): Add a `diagnostic_context *' parameter.
10355 (java_dummy_print): Likewise.
10356 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10357
10358 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10359
10360 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10361 * jcf.h (typedef struct JCF): New bitfield `finished.'
10362 (JCF_FINISH): Set `finished.'
10363 (JCF_ZERO): Reset `finished.'
10364 Fixes PR java/2633
10365
10366 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10367
10368 * parse.y (class_body_declaration:): Don't install empty instance
10369 initializers.
10370 Fixes PR java/1314
10371
10372 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10373
10374 * class.c (set_super_info): Call `set_class_decl_access_flags.'
10375 (set_class_decl_access_flags): New function.
10376 * java-tree.h (set_class_decl_access_flags): New prototype.
10377 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10378 (parse_class_file): New local `decl_max_locals.' Take wide types
10379 into account to compute DECL_MAX_LOCALS.
10380 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10381 imports on demand.
10382
10383 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
10384
10385 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10386
10387 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10388
10389 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10390 * parse.y (do_resolve_class): Moved comments out to leading comment
10391 section. Removed local `start', New local `_ht' and
10392 `circularity_hash.' Record `enclosing' in hash table and search
10393 it to detect circularity. Use `enclosing' as an argument to
10394 `lookup_cl.' Free the hash table when done.
10395
10396 2001-06-19 Tom Tromey <tromey@redhat.com>
10397
10398 * lex.c (java_read_char): Disallow invalid and overlong
10399 sequences. Fixes PR java/2319.
10400
10401 2001-06-05 Jeff Sturm <jsturm@one-point.com>
10402
10403 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10404
10405 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10406
10407 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10408 arguments accordingly.
10409
10410 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
10411
10412 * gcj.texi: Move contents to just after title page.
10413
10414 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
10415
10416 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10417 builtin type.
10418 (patch_incomplete_class_ref): Build the class ref, build the class
10419 init if necessary, complete the tree.
10420 Fixes PR java/2605
10421
10422 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10423
10424 * parse.y (lookup_field_wrapper): Test `name' code.
10425 (resolve_qualified_expression_name): Test `qual_wfl' code.
10426 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10427 handle `qual_wfl' by code.
10428 (maybe_build_primttype_type_ref): Test `wfl' code.
10429
10430 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10431
10432 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10433 fdl.texi.
10434 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
10435 the dvi file in the java directory.
10436
10437 2001-05-25 Sam TH <sam@uchicago.edu>
10438
10439 * gen-table.pl javaop.h jcf.h lex.h,
10440 parse.h: Fix header include guards.
10441
10442 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
10443
10444 * jv-scan.c (version): Update copyright year.
10445
10446 2001-05-21 Per Bothner <per@bothner.com>
10447
10448 * jcf-parse.c (read_class): If class is from .class or .zip file
10449 and it's already been read, don't push/pop parser context.
10450
10451 2001-05-18 Per Bothner <per@bothner.com>
10452
10453 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
10454 command line so the jvgenmain-generated main program comes first.
10455
10456 2001-05-15 Tom Tromey <tromey@redhat.com>
10457
10458 * class.c (build_utf8_ref): Don't generate identifier based on
10459 utf8const contents.
10460
10461 2001-05-12 Richard Henderson <rth@redhat.com>
10462
10463 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10464 * expr.c (java_lang_expand_expr): Expand it.
10465 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10466 calling build_exception_object_ref.
10467 * parse.y (catch_clause_parameter): Likewise.
10468 (build_dot_class_method): Likewise.
10469 (try_reference_assignconv): Likewise.
10470 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10471 * jcf-write.c (generate_bytecode_insns): Likewise.
10472
10473 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10474
10475 * parse.y (build_unresolved_array_type): Set
10476 EXPR_WFL_QUALIFICATION on the newly created wfl.
10477 Fixes PR java/2538. Fixes PR java/2535.
10478
10479 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10480
10481 * parse.y (fix_constructors): Removed unnecessary assignment to
10482 local. Moved assignment to `this$<n>', fixed comments and
10483 indentation.
10484 (build_wfl_wrap): Fixed indentation.
10485 Fixes PR java/2598, java/2579 and java/2658.
10486
10487 2001-05-03 Mo DeJong <mdejong@redhat.com>
10488
10489 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10490 check for byte swap.
10491
10492 2000-05-02 Jeff Sturm <jsturm@one-point.com>
10493
10494 * expr.c (build_class_init): Move MODIFY_EXPR
10495 outside of COND_EXPR. Remove variable `call'.
10496
10497 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10498
10499 * decl.c: NULL_PTR -> NULL.
10500 * jcf-write.c: Likewise.
10501
10502 2001-05-01 Tom Tromey <tromey@redhat.com>
10503
10504 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10505 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10506 * gcj.texi: Updated copyright text. Include fdl.texi.
10507 (Top): Link to new node.
10508
10509 2001-05-01 Per Bothner <per@bothner.com>
10510
10511 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
10512
10513 2001-05-01 Per Bothner <per@bothner.com>
10514
10515 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
10516 import_list contains the name, not the TREE_PURPOSE.
10517
10518 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10519
10520 * jcf-io.c (read_zip_member): Cast to long in comparison with
10521 signed value.
10522
10523 * jvspec.c (lang_specific_driver): Initialize variables.
10524
10525 * mangle.c (find_compression_record_match): Likewise.
10526
10527 * typeck.c (build_null_signature): Provide static prototype. Mark
10528 parameter with ATTRIBUTE_UNUSED.
10529
10530 * verify.c (verify_jvm_instructions): Initialize variable.
10531
10532 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10533
10534 * parse.y (do_resolve_class): Check for cyclic inheritance during
10535 inner class resolution.
10536
10537 2001-04-27 Per Bothner <per@bothner.com>
10538
10539 * parse.y (java_expand_classes): Don't change ctxp_for_generation
10540 while iterating, since that could cause gc to lose stuff.
10541
10542 2001-04-26 Per Bothner <per@bothner.com>
10543
10544 Fix method search wrt scope of inner classes to match JLS2.
10545 * typeck.c (build_null_signature): New static function.
10546 (has_method): New function. Uses build_null_signature and lookup_do.
10547 * java-tree.h (has_method): New declaration.
10548 * parse.y (find_applicable_accessible_methods_list): Do not search
10549 context of inner classes here.
10550 (patch_method_invocation): Search scope, ie. current and outer clases,
10551 for method matching simple name, to find class.
10552
10553 2001-04-26 Per Bothner <per@bothner.com>
10554
10555 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10556 Fix thinko: If a single case, use if_icmpeq, not ifeq.
10557
10558 * constants.c (find_methodref_with_class_index): New function.
10559 (find_methodref_index): Use find_methodref_with_class_index.
10560 * java-tree.h (find_methodref_with_class_index): New declaration.
10561 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
10562 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10563 If context changed from interface to class, don't use invokeinterface.
10564
10565 2001-04-25 Per Bothner <per@bothner.com>
10566
10567 * verify.c (verify_jvm_instructions): For field instructions,
10568 check that field index is valid. For invoke instructions, check that
10569 method index is valid.
10570
10571 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
10572
10573 * config-lang.in (target_libs): Copy from $libgcj_saved.
10574
10575 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10576
10577 * decl.c (init_decl_processing): Add new class "protectionDomain"
10578 field.
10579 * class.c (make_class_data): Set initial value for "protectionDomain".
10580
10581 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10582
10583 * jvspec.c (lang_specific_driver): Fix memory allocation
10584 deficit, by using concat in lieu of xmalloc/sprintf.
10585
10586 2001-04-20 Per Bothner <per@bothner.com>
10587
10588 Fixes to compile multiple .class files at once.
10589 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
10590 * java-tree.h (CLASS_PARSED_P): New macro.
10591 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10592 * jcf-parse.c (jcf_parse_source): Inline into read_class.
10593 (read_class): Avoid some code duplication.
10594 Don't call JCF_FINISH for a .class file - might be needed later.
10595 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
10596 rather than CLASS_LOADED_P, since latter implies class laid out.
10597 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
10598 * parse.y: Don't need to set CLASS_LOADED_P for array types.
10599
10600 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10601
10602 * Make-lang.in (java/boehm.o): Depend on toplev.h.
10603
10604 * boehm.c: Include toplev.h.
10605
10606 2001-04-06 Tom Tromey <tromey@redhat.com>
10607 Alexandre Petit-Bianco <apbianco@redhat.com>
10608
10609 Fix for PR gcj/1404 and PR gcj/2332:
10610 * parse.y (build_array_from_name): If we use the type_wfl then
10611 accumulate dimensions from the original type as well.
10612 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10613
10614 2001-04-06 Tom Tromey <tromey@redhat.com>
10615
10616 * parse.y (analyze_clinit_body): Return true if the second operand
10617 of a METHOD_EXPR is nonzero.
10618
10619 2001-04-06 Tom Tromey <tromey@redhat.com>
10620
10621 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10622 directory.
10623 ($(srcdir)/java/parse.c): Likewise.
10624
10625 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10626
10627 * gcj.texi: Use `which-gcj' instead of `which-g77.'
10628 (version-gcc): Initialized.
10629 (which-gcj): Likewise.
10630
10631 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10632
10633 * java-tree.h (struct lang_decl): New macro
10634 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10635 * parse.y (build_instance_initializer): New function.
10636 (add_instance_initializer): Use it.
10637 (java_fix_constructors): Set `current_class' before fix pass.
10638 (fix_constructors): Just return if already fixed. Move `super()'
10639 invocation ahead. Use `build_instance_initializer.'
10640 Fixes PR java/1315.
10641
10642 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10643
10644 * parse.y (resolve_qualified_expression_name): Pass field's
10645 DECL_CONTEXT to `not_accessible_p.'
10646 (not_accessible_p): Changed parameters order in `inherits_from_p'
10647 invocation.
10648
10649 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
10650
10651 * lang-options.h: Add flag_check_references.
10652
10653 2001-04-04 Per Bothner <per@bothner.com>
10654
10655 * java-tree.h (CONSTANT_VALUE_P): New macro.
10656 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
10657 * parse.y (maybe_build_class_init_for_field): New static function.
10658 (resolve_expression_name, resolve_field_access): Use
10659 maybe_build_class_init_for_field instead of build_class_init
10660 This does not do the init if the field is compile-time-constant.
10661 (resolve_field_access): Simplify.
10662
10663 * parse.y (fold_constant_for_init): Merge test into switch.
10664
10665 2001-04-03 Zack Weinberg <zackw@stanford.edu>
10666
10667 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10668 on gansidecl.h.
10669 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10670
10671 2001-04-02 Zack Weinberg <zackw@stanford.edu>
10672
10673 * expr.c (pop_type_0): Save the result of the first
10674 lang_printable_name call in a scratch buffer, so it
10675 won't be clobbered by the second call.
10676
10677 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10678
10679 * parse-scan.y (array_type:): Rewritten.
10680 (type_declaration:): `empty_statement' replaces `SC_TK.'
10681 (class_member_declaration:): `empty statement' added.
10682 (method_body:): Simplified.
10683 (static_initializer:): Likewise.
10684 (primary_no_new_array:): Use `type_literals.'
10685 (type_literals:): New rule.
10686 (dims:): Set and update `bracket_count.'
10687 Fixes PR java/1074. Fixes PR java/2412.
10688
10689 2001-03-28 Hans Boehm <boehm@acm.org>
10690
10691 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10692 (get_boehm_type_descriptor): Set type on returned value to be a
10693 pointer length integer.
10694
10695 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10696
10697 * expr.c (pop_type_0): Call `concat' rather than building the
10698 string manually.
10699 (pop_type): Add format specifier in call to `error'.
10700
10701 * parse.y (patch_method_invocation): Avoid casting away
10702 const-ness.
10703
10704 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
10705
10706 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10707
10708 2001-03-28 Richard Henderson <rth@redhat.com>
10709
10710 IA-64 ABI Exception Handling:
10711 * Make-lang.in (except.o): Don't depend on eh-common.h.
10712 * check-init.c (check_init): Handle EXC_PTR_EXPR.
10713 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10714 [soft_exceptioninfo_call_node]: Remove.
10715 [eh_personality_libfunc, lang_eh_runtime_type]: New.
10716 (end_java_method): No emit_handlers.
10717 * except.c (java_set_exception_lang_code): Remove.
10718 (method_init_exceptions): Don't call it.
10719 (prepare_eh_table_type): No CATCH_ALL_TYPE.
10720 (build_exception_object_ref): New.
10721 (expand_end_java_handler): Update for except.h name changes.
10722 (emit_handlers, expand_resume_after_catch): Remove.
10723 * expr.c (java_lang_expand_expr): Update for except.h name changes.
10724 (process_jvm_instruction): Use build_exception_object_ref.
10725 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10726 (soft_exceptioninfo_call_node): Remove.
10727 (build_exception_object_ref): Declare.
10728 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10729 soft_exceptioninfo_call_node. Move processing ...
10730 [EXC_PTR_EXPR]: ... here.
10731 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10732 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10733 (source_end_java_method): No java_set_exception_lang_code or
10734 emit_handlers.
10735 (build_dot_class_method): Use build_exception_object_ref.
10736 (try_reference_assignconv): Check EXC_PTR_EXPR not
10737 soft_exceptioninfo_call_node.
10738
10739 2001-03-28 Richard Henderson <rth@redhat.com>
10740
10741 * java-tree.h (throw_node): Define as a single member of
10742 java_global_trees instead of a separate array.
10743 (JTI_THROW_NODE): New.
10744 * decl.c (throw_node): Don't declare.
10745 (init_decl_processing): Init a scalar throw_node.
10746 Don't register it for gc.
10747 * check-init.c (check_init): Reference scalar throw_node.
10748 * expr.c (build_java_athrow): Likewise.
10749 * jcf-write.c (generate_bytecode_insns): Likewise.
10750 * parse.h (BUILD_THROW): Likewise.
10751
10752 2001-03-28 Richard Henderson <rth@redhat.com>
10753
10754 * decl.c (end_java_method): Do not save and restore
10755 flag_non_call_exceptions.
10756 * parse.y (source_end_java_method): Likewise.
10757 * lang.c (flag_exceptions): Don't declare.
10758 (java_init_options): Set flag_non_call_exceptions. Set
10759 flag_exceptions here ...
10760 (java_init): ... not here.
10761
10762 2001-03-27 Richard Henderson <rth@redhat.com>
10763
10764 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10765 exceptions_via_longjmp.
10766
10767 * lang.c (flag_new_exceptions): Don't declare it.
10768 (java_init_options): Or set it.
10769
10770 2001-03-27 Richard Henderson <rth@redhat.com>
10771
10772 * decl.c (end_java_method): Rename asynchronous_exceptions to
10773 flag_non_call_exceptions.
10774 * parse.y (source_end_java_method): Likewise.
10775
10776 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10777
10778 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10779
10780 2001-03-26 Mark Mitchell <mark@codesourcery.com>
10781
10782 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
10783
10784 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10785
10786 * parse.y (find_as_inner_class): Follow current package
10787 indications not to mistakingly load an unrelated class.
10788
10789 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10790
10791 * constants.c (PUTN): Use memcpy, not bcopy.
10792
10793 * lex.c (java_read_char): Use memmove, not bcopy.
10794
10795 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10796
10797 2001-03-23 Per Bothner <per@bothner.com>
10798
10799 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
10800 macro for better error pin-pointing.
10801 * java-tree.h: Fix typo in comment.
10802
10803 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
10804 Don't include jsr/goto in exception range.
10805 Check if start and end of exception range are the same (also TRY_EXPR).
10806 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10807 However, do emit the following goto even if try_block is empty.
10808 Defer freeing exception_decl until after the finalizer, to make
10809 sure the local isn't reused in the finalizer. Fixes PR java/1208.
10810
10811 * parse.y (java_complete_lhs): If the try-clause is empty, just
10812 return the finally-clause and vice versa.
10813
10814 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10815
10816 * gcj.texi (Input Options): documented the check for attribute
10817 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10818 * java-tree.h (flag_force_classes_archive_check): Declared extern.
10819 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10820 (jcf_parse): Check for the right classes archive if necessary.
10821 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10822 (jcf_parse_fields): Fixed indentation.
10823 * jcf-write.c (append_gcj_attribute): New function.
10824 (generate_classfile): Compute the attribute count, invoke
10825 `append_gcj_attribute'.
10826 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
10827 turned into bit-fields. New bit-field `right_zip.'
10828 (JCF_ZERO): Set `right_zip' to zero.
10829 * lang-options.h (-fforce-classes-archive-check): Added flag.
10830 * lang.c (flag_force_classes_archive_check): New flag.
10831 (lang_f_options): New entry `force-classes-archive-check.'
10832 Fixes PR java/1213.
10833
10834 2001-02-07 Andrew Haley <aph@redhat.com>
10835
10836 * gcj.texi (Configure-time Options): Add -fcheck-references.
10837 * expr.c (build_java_indirect_ref): New function.
10838 (java_check_reference): New function.
10839 (build_java_array_length_access): Use build_java_indirect_ref to
10840 check for null references.
10841 (build_java_arrayaccess): Likewise.
10842 (build_get_class): Likewise.
10843 (build_field_ref): Likewise.
10844 (invoke_build_dtable): Likewise.
10845 (build_invokeinterface): Likewise.
10846 * lang.c (lang_f_options): Add flag_check_references.
10847 * jvspec.c (jvgenmain_spec): Add flag_check_references.
10848 * java-tree.h (flag_check_references): New variable.
10849 * lang.c (flag_check_references): Likewise.
10850 * parse.y (patch_invoke): Use java_check_reference.
10851 (patch_assignment): Allow for extra nesting in
10852 _Jv_CheckArrayStore.
10853
10854 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
10855
10856 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
10857 * lex.c (cxx_keywords): Likewise.
10858
10859 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
10860
10861 * parse.y (qualify_ambiguous_name): Broaden `length'
10862 recognition. Help MODIFY_EXPR be resolved as expression names.
10863 Fixes PR java/2066. Fixes PR java/2400.
10864
10865 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
10866
10867 * gjavah.c (process_file): Mark interface definitions with
10868 "__attribute__ ((java_interface))".
10869
10870 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
10871
10872 * class.c (layout_class): Fixed push_super_field's second
10873 argument. Fixes PR java/2333.
10874 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
10875 too early to lay innerclasses out.
10876
10877 2001-03-20 Tom Tromey <tromey@redhat.com>
10878 Alexandre Petit-Bianco <apbianco@redhat.com>
10879
10880 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
10881 inside an array reference. Insertion of the array store check
10882 rewritten. Fixes PR java/2299.
10883
10884 2001-03-20 Tom Tromey <tromey@redhat.com>
10885
10886 * lex.c (java_read_unicode): Only accept leading `u's.
10887
10888 2001-03-20 Tom Tromey <tromey@redhat.com>
10889
10890 * jcf-parse.c (read_class): Initialize `class'.
10891
10892 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10893
10894 * jcf_parse.c (jcf_parse): Eliminate unused variable.
10895
10896 2001-03-19 Mark Mitchell <mark@codesourcery.com>
10897
10898 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
10899 (layout_class): Likewise.
10900 (layout_class_method): Likewise.
10901 (emit_register_classes): Likewise.
10902 * decl.c (builtin_function): Likewise.
10903 (give_name_to_locals): Likewise.
10904
10905 2001-03-19 Per Bothner <per@bothner.com>
10906
10907 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
10908 before trying to load an inner class.
10909
10910 Fixes to process to command-line .class files in two passes.
10911 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
10912 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
10913 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
10914 * class.c (is_compiled_class): Fix for renamed flag.
10915 * parse.y (maybe_create_class_interface_decl): Likewise.
10916 * jcf-parse.c (yyparse): Also set if compiling .class files.
10917 * jcf-parse.c (read_class); Read current_class.
10918 (jcf_parse): Make static.
10919 (load_inner_classes): New function, with code moved from jcf_parse,
10920 because we need to inner classes after the command-line files are read.
10921 (yyparse): Set finput to NULL when it doesn't need to be closed.
10922 Reduce use of main_jcf (basically only for archive) and
10923 use finput instead of main_jcf->read_state.
10924 Inline jcf_figure_file_type into yyparse.
10925 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10926 Defer load_inner_classes and parse_class_file to a second pass,
10927 after we've correctly mapped command-line .clas fiels to classes.
10928 (jcf_figure_file_type): Removed.
10929 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
10930 (JCF_ZERO): Also clear zipd field.
10931 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
10932
10933 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10934
10935 * jcf-parse.c (yyparse): Change ch from char * to char.
10936
10937 2001-03-19 Per Bothner <per@bothner.com>
10938
10939 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
10940 Add constructed filelist-file at end, following -xjava. Thus any .o
10941 and library files are not affected by the -xjava. Also wrap
10942 explicit @FILE with -xjava and -xnone.
10943
10944 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
10945
10946 * class.c (build_static_field_ref): Call make_decl_rtl() after
10947 setting the DECL_EXTERNAL flag.
10948
10949 2001-03-17 Per Bothner <per@bothner.com>
10950
10951 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
10952
10953 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
10954 when result is is needed (target is STACK_TARGET).
10955
10956 * parse.h (JDEP_SOLV): Removed.
10957 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
10958
10959 * parse.y (incomplete_class_list): Removed.
10960 (obtain_incomplete_type): Don't use or set incomplete_class_list.
10961 It doesn't work if resolve_class changes the name of an array type
10962 that is on the list and then someone else looks for the modified name.
10963 Also, seems liable to break when compiling multiple source files at
10964 once. So the simplest is to just remove incomplete_class_list -
10965 it is only a minor space win and it is not even clear it saves time.
10966
10967 * parse.y (resolve_class): Remove unneeded promote_type.
10968
10969 2001-03-15 Per Bothner <per@bothner.com>
10970
10971 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
10972 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
10973 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10974 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
10975
10976 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
10977 * parse.y (java_expand_classes): Likewise.
10978
10979 * parse.y (expand_start_java_method): Was only called once and had a
10980 misleading name, so inline in caller java_complete_expand_method.
10981 (enter_a_block): Likewise inline in enter_block and remove.
10982
10983 Remove junk from when gcc/java was created (by copying from C/C++).
10984 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
10985 (struct binding_level): Remove fields keep, keep_if_subblocks,
10986 more_cleanups_ok, have_cleanups (which have never been used).
10987 (pushlevel, poplevel): Remove related useless code.
10988
10989 * class.c (make_class_data): The class_dtable_decl (i.e. the
10990 vtable for Class) should be external, except when compiling Class.
10991
10992 * jvspec.c (lang_specific_driver): Fix -C handling.
10993 Check -save-temps to see if temp @FILE should be deleted.
10994 Follow-up to/fix for February 16 patch.
10995
10996 * verify.c (verify_jvm_instructions): Better error msgs for dup.
10997 (type_stack_dup): Remove no-longer neded error check.
10998
10999 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11000
11001 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11002 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11003 don't surround the element with 'N..E' if the type name is
11004 unqualified.
11005
11006 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11007
11008 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11009 DECL_RTL_SET_P, etc.
11010 (make_method_value): Likewise.
11011 (get_dispatch_table): Likewise.
11012
11013 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11014
11015 2001-03-07 Tom Tromey <tromey@redhat.com>
11016
11017 * config-lang.in (lang_requires): Define.
11018
11019 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11020
11021 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11022 not flag_fast_math.
11023
11024 2001-03-05 Per Bothner <per@bothner.com>
11025
11026 Fix a problem where rest_of_decl_compilation applied to
11027 class_dtable_decl causes problems because it was done too early,
11028 before output file was opened.
11029 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11030 * class.c (class_dtable_decl): Add macro - element of class_roots.
11031 (make_class_data): Define class_dtable_decl.
11032 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11033
11034 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11035
11036 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11037 uses of 'boolean' with 'bool'.
11038
11039 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11040
11041 * lang-specs.h: Add zero initializer for cpp_spec field to all
11042 array elements.
11043
11044 2001-02-16 Per Bothner <per@bothner.com>
11045
11046 Handle compiling multiple input files at once, and @FILE syntax.
11047 * gcj.texi: Updated documentation to match.
11048 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11049 * jcf-parse.c (parse_source_file): Split into ...
11050 (parse_source_file_1): New function - and:
11051 (parse_source_file_2): New function.
11052 (yyparse): On -ffilelist-file, open and scan named file.
11053 On first pass over files, only do parse_source_file_1.
11054 A new second pass calls parse_source_file_2 for each file to compile.
11055 (init_jcf_parse): Call init_src_parse.
11056 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11057 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11058 as multiple input file combined in one compilation.
11059 * lang-options.h: Add -ffilelist-file
11060 * lang.c (flag_filelist_file): New flag variable.
11061 (lang_f_options): Handle -ffilelist-file.
11062 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11063 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11064 gclass_list - use global fields of src_parse_roots instead.
11065 * parse.y (src_parse_roots): New array.
11066 (incomplete_class_list, gclass_list): New macros.
11067 (push_parser_context, java_pop_parser_context,
11068 java_parser_context_resume): Don't fiddle with deleted fields.
11069 (various): Use incomplete_class gclass_list and global macros
11070 instead of parse_ctxt fields - the lists are global.
11071 (init_src_parse): New function.
11072
11073 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11074
11075 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11076
11077 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11078
11079 * parse.y (check_inner_class_access): Moved declaration of local
11080 `enclosing_decl_type' to the right location.
11081
11082 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11083
11084 * parse.y (parser_check_super_interface): Don't call
11085 check_pkg_class_access for an inner interface.
11086 (parser_check_super): Don't call check_pkg_class_access for inner
11087 class.
11088 (do_resolve_class): Simplify enclosing type loop. Don't call
11089 check_pkg_class_access if CL and DECL are not set.
11090 (find_in_imports_on_demand): Set DECL if class_type needed to be
11091 loaded. Don't call check_pkg_class_access for an inner class.
11092 (check_inner_class_access): Rewritten to implement member access
11093 rules as per spec 6.6.1.
11094 (check_pkg_class_access): Handle the empty package correctly.
11095 (in_same_package): New function. Determine if two classes are in the
11096 same package.
11097
11098 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11099
11100 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11101 method into array types.
11102 * parse.y (patch_method_invocation): Bypass access check on clone call
11103 to array instance.
11104
11105 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11106
11107 * expr.c (build_instanceof): Check for arrays when trying fold to
11108 false.
11109
11110 2001-02-15 Jim Meyering <meyering@lucent.com>
11111
11112 * Make-lang.in (java.install-common): Depend on `installdirs'.
11113 (java.install-info): Likewise.
11114
11115 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11116
11117 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11118
11119 2001-02-14 Tom Tromey <tromey@redhat.com>
11120 Alexandre Petit-Bianco <apbianco@cygnus.com>
11121
11122 Fix for PR java/1261.
11123 * typeck.c (build_java_array_type): Add public `clone' method to
11124 arrays.
11125 * parse.y (resolve_qualified_expression_name): Use current_class
11126 when checking for inaccessibility.
11127 (patch_method_invocation): Fixed error message when accessibility
11128 denied. Added `from_super' argument.
11129
11130 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11131
11132 * parse.y (resolve_class): Don't build a fake decl. Use the one
11133 already built.
11134 * typeck.c (build_java_array_type): Build and assign decl to array
11135 type.
11136
11137 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11138
11139 * parse.y (not_accessible_p): Changed leading comment. Added extra
11140 `where' argument. Use it to enforce protected access rules.
11141 (resolve_qualified_expression_name): Added extra argument to
11142 not_accessible_p.
11143 (patch_method_invocation): Use argument `primary' to provide
11144 not_accessible_p with an extra argument.
11145 (lookup_method_invoke): Added extra argument to not_accessible_p.
11146 (search_applicable_method_list): Likewise.
11147
11148 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11149
11150 * parse.y (resolve_qualified_expression_name): Try to resolve as
11151 an inner class access only if `decl' is a TYPE_DECL.
11152
11153 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11154
11155 * decl.c (classdollar_identifier_node): Initialize.
11156 * java-tree.h (enum java_tree_index): New entry
11157 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11158 (classdollar_identifier_node): New macro.
11159 (ID_CLASSDOLLAR_P): Likewise.
11160 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11161 (build_dot_class_method_invocation): Likewise.
11162 (find_applicable_accessible_methods_list): `class$' can't be
11163 inherited.
11164
11165 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11166
11167 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11168
11169 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11170
11171 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11172 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11173 gone.
11174
11175 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11176
11177 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11178 outside of the `__U' sequence too.
11179 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11180 sequence too.
11181
11182 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11183
11184 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11185
11186 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11187
11188 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11189 (JVGENMAIN_OBJS): Likewise.
11190 * java-tree.h (append_gpp_mangled_name): New prototype.
11191 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11192 Removed cast calling `gcc_add_root.'
11193 * jvgenmain.c (mangle_obstack): New global, initialized.
11194 (main): Use it.
11195 (do_mangle_class): Constify local `ptr.'
11196 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11197 append_gpp_mangle_name and update `count' if necessary.
11198 Use `mangle_obstack.'
11199 * mangle.c (append_unicode_mangled_name): Removed.
11200 (append_gpp_mangled_name): Likewise.
11201 (unicode_mangling_length): Likewise.
11202 (mangle_member_name): Return type set to `void.'
11203 (mangle_field_decl): Don't append `U' in escaped names.
11204 (mangle_method_decl): Likewise.
11205 (mangle_member_name): Just use `append_gpp_mangled_name.'
11206 * mangle_name.c: New file.
11207
11208 2001-02-07 Per Bothner <per@bothner.com>
11209
11210 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
11211
11212 * check-init.c (check_init): Don't call done_alternative after
11213 processing loop code, as a LOOP_EXPR never terminates normally.
11214
11215 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
11216
11217 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11218
11219 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11220
11221 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11222 DECLs.
11223
11224 2001-02-06 Tom Tromey <tromey@redhat.com>
11225
11226 * lex.c (java_new_lexer): Longer error message.
11227
11228 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
11229 Alexandre Petit-Bianco <apbianco@cygnus.com>
11230
11231 * typeck.c (build_prim_array_type): Added leading comment.
11232 (build_java_array_type): Moved locals out of
11233 block. Always create the `data' field, fixed alignment to match
11234 C++.
11235
11236 2001-02-04 Tom Tromey <tromey@redhat.com>
11237
11238 * expr.c (java_lang_expand_expr): Don't bother recomputing
11239 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
11240 Fixes PR java/1866.
11241
11242 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11243
11244 * parse.y (process_imports): Save the original name of the import
11245 for better error report.
11246
11247 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
11248
11249 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11250 of macros used when compiling jvspec.c.
11251 * jvspec.c (lang_specific_driver): Link with the shared
11252 libgcc by default.
11253
11254 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11255
11256 * check-init.c (check_init): Call internal_error instead of fatal.
11257 * expr.c (java_lang_expand_expr): Likewise.
11258 * jcf-parse.c (get_constant): Likewise.
11259 * mangle.c (java_mangle_decl): Likewise.
11260 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11261 (operator_string): Likewise.
11262 * check-init.c (check_init): Call abort instead of fatal.
11263 * class.c (build_class_ref): Likewise.
11264 * constants.c (write_constant_pool): Likewise.
11265 * decl.c (start_java_method): Likewise.
11266 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11267 (java_stack_dup, encode_newarray_type): Likewise.
11268 (build_java_array_length_access): Likewise.
11269 (build_java_check_indexed_type, expand_java_pushc): Likewise.
11270 (build_java_soft_divmod, build_invokeinterface): Likewise.
11271 * java-tree.h (INNER_CLASS_P): Likewise.
11272 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11273 (give_name_to_class, get_class_constant): Likewise.
11274 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11275 (find_constant_index, generate_bytecode_conditional): Likewise.
11276 (generate_bytecode_insns, perform_relocations): Likewise.
11277 * lex.c (java_unget_unicode, java_lex): Likewise.
11278 * mangle.c (mangle_type, mangle_record_type): Likewise.
11279 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11280 (finish_mangling): Likewise.
11281 * parse.h (MARK_FINAL_PARMS): Likewise.
11282 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11283 (obtain_incomplete_type, java_complete_class): Likewise.
11284 (java_check_regular_methods, java_complete_expand_method): Likewise.
11285 (cut_identifier_in_qualified, check_deprecation): Likewise.
11286 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11287 (java_complete_lhs, lookup_name_in_blocks): Likewise.
11288 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11289 * typeck.c (set_local_type, parse_signature_type): Likewise.
11290 (parse_signature_string, build_java_signature): Likewise;
11291 (set_java_signature): Likewise.
11292 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11293 * class.c (add_method): Call fatal_error instead of fatal.
11294 (build_static_field_ref): Likewise.
11295 * expr.c (build_known_method_ref, expand_invoke): Likewise.
11296 * jcf-parse.c (get_constant, jcf_parse): Likewise.
11297 * lex.c (java_new_new_lexer): Likewise.
11298 * jv-scan.c (main): Likewise.
11299 (fatal_error): Renamed from fatal.
11300 * jcf-parse.c (yyparse): Call fatal_io_error instead of
11301 pfatal_with_name.
11302 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11303 (yyparse): Likewise.
11304 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11305 * lex.c (java_get_line_col): Likewise.
11306 * jcf-parse.c (load_class): Make errors non-fatal.
11307 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11308
11309 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
11310
11311 * jvgenmain.c (class_mangling_suffix): Remove unused string.
11312 (error): Remove unused function.
11313 (main): Don't use "__attribute__ alias" on generated class symbol.
11314
11315 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11316
11317 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11318 argument.
11319 * parse.y (finish_method_declaration): Code accounting for WFLed
11320 method DECL_NAMEs deleted.
11321 (check_abstract_method_definitions): Likewise.
11322 (resolve_type_during_patch): Layout resolved type.
11323 * typeck.c (lookup_do): Removed unused local.
11324
11325 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
11326
11327 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11328 * decl.c (init_decl_processing): Use integer_minus_one_node, not
11329 integer_negative_one_node.
11330 * expr.c (build_java_binop): Likewise.
11331
11332 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
11333
11334 * zextract.c (read_zip_archive): Read file_offset before writing
11335 zipd and consequently clobbering the header contents.
11336
11337 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11338
11339 * Make-lang.in: Remove all dependencies on defaults.h.
11340 * decl.c: Don't include defaults.h.
11341 * expr.c: Likewise.
11342 * parse.y: Likewise.
11343
11344 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11345
11346 * ChangeLog (2001-01-21): Fixed typo.
11347 * class.c (layout_class_method): Code accounting for WFLed
11348 method DECL_NAMEs deleted.
11349 * constant.c (find_methodref_index): Likewise.
11350 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11351 * java-tree.h (DECL_FUNCTION_WFL): New macro.
11352 (struct lang_decl): New field `wfl'.
11353 (java_get_real_method_name): Prototype deleted.
11354 * mangle.c (mangle_method_decl): Code accounting for WFLed
11355 method DECL_NAMEs deleted.
11356 * parse.h (GET_METHOD_NAME): Macro deleted.
11357 * parse.y (reset_method_name): Deleted.
11358 (method_header): Set DECL_FUNCTION_WFL.
11359 (check_abstract_method_header): Code accounting for WFLed method
11360 DECL_NAMEs deleted.
11361 (java_get_real_method_name): Deleted.
11362 (check_method_redefinition): Code accounting for WFLed method
11363 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11364 (java_check_regular_methods): Likewise.
11365 (java_check_abstract_methods): Likewise.
11366 (java_expand_classes): Don't call `reset_method_name.'
11367 (search_applicable_method_list): Use DECL_NAMEs instead of
11368 GET_METHOD_NAME.
11369 * typeck.c (lookup_do): Code accounting for WFLed method
11370 DECL_NAMEs deleted.
11371
11372 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
11373
11374 * lex.c (java_read_char): Check for EOF from getc first.
11375
11376 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11377
11378 * class.c (layout_class): Don't lay the superclass out if it's
11379 already being laid out.
11380 * jcf-parse.c (handle_innerclass_attribute): New function.
11381 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11382 handle_innerclasses_attribute.
11383 (jcf_parse): Don't load an innerclasses if it's already being
11384 laid out.
11385 * jcf-write.c (append_innerclass_attribute_entry): Static
11386 `anonymous_name' and its initialization deleted. `ocii' and `ini'
11387 to be zero for anonymous classes.
11388
11389 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11390
11391 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11392 necessary.
11393 * jcf-parse.c (set_source_filename): Use
11394 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11395
11396 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11397
11398 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11399 gets a unique asm name.
11400
11401 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11402
11403 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11404 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11405 if necessary.
11406 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11407 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11408 * parse.y (lookup_package_type_and_set_next): Deleted.
11409 (resolve_package): Removed unnecessary code.
11410 (find_applicable_accessible_methods_list): `finit$' can't be
11411 inherited.
11412 * verify.c (pop_argument_types): Added missing prototype.
11413
11414 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
11415
11416 * config-lang.in: Disable java by default.
11417
11418 2001-01-23 Tom Tromey <tromey@redhat.com>
11419
11420 * gcj.texi (Copying): New node.
11421 Added copyright information.
11422
11423 2001-01-21 Per Bothner <per@bothner.com>
11424
11425 Various fixes to allow compiling a compressed .jar/.zip archive.
11426 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
11427 (struct ZipFile): Add fields name and next (from ZipFileCache).
11428 (struct ZipDirectory): New field zipf points to owning ZipFile.
11429 * jcf.h (struct ZipDirectory): Add forward declaration.
11430 (struct JCF): Declare zipd field to have type struct ZipDirectory.
11431 Remove seen_in_zip and zip_offset fields.
11432 (JCF_SEEN_IN_ZIP): New macro.
11433 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
11434 * jcf-io.c: Change all ZipFileCache to ZipFile.
11435 (read_zip_member): New function.
11436 (open_in_zip): Call read_zip_member.
11437 * jcf-parse.c (find_in_current_zip): Remove function.
11438 (read_class): Merge in find_in_current_zip functionality.
11439 Call read_zip_member if needed.
11440 (parse_zip_file_entries): Use read_zip_member.
11441 (process_zip_dir): Update for removed and added JCF fields.
11442 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
11443
11444 2001-01-21 Per Bothner <per@bothner.com>
11445
11446 Minor optimization of static ggc roots.
11447 * jcf-parse.c (parse_roots): New static field.
11448 (current_field, current_method, current_file_list): Replace by macros
11449 naming fields of parse_roots.
11450 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
11451 * class.c (class_roots): New static field.
11452 (registered_class, fields_ident, info_ident, class_list):
11453 New macros naming fields of parse_roots.
11454 (build_static_field_ref): Don't register roots here.
11455 (layout_class): Static field list replaced by macro class_list.
11456 (init_class_processing): Call ggc_add_tree_root for 4 roots.
11457 Initialize fields_ident and info_ident here.
11458
11459 2001-01-21 Per Bothner <per@bothner.com>
11460
11461 * jcf-parse.c (ggc_mark_jcf): New function.
11462 (init_jcf_parse): Register current_jcf as ggc root.
11463
11464 2001-01-21 Per Bothner <per@bothner.com>
11465
11466 * lang.c (put_decl_node): Print method's name.
11467
11468 2001-01-21 Per Bothner <per@bothner.com>
11469
11470 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
11471 (verify_jvm_instructions): Use it, for better error messages on loads.
11472
11473 2001-01-21 Per Bothner <per@bothner.com>
11474
11475 * verify.c (merge_type_state): Still may have to merge even if
11476 LABEL_VERIFIED (label).
11477
11478 2001-01-21 Per Bothner <per@bothner.com>
11479
11480 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
11481 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11482
11483 2001-01-19 Per Bothner <per@bothner.com>
11484
11485 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
11486 if expeting an interface type. Refines Tom's change of 2000-09-12.
11487
11488 2001-01-18 Per Bothner <per@bothner.com>
11489
11490 * gcj.texi (Input Options): Mention .java files.
11491
11492 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11493
11494 * lang-options.h (-Wunsupported-jdk11): Removed.
11495 * lang.c (flag_not_overriding): Deleted.
11496 (flag_static_local_jdk1_1): Likewise.
11497 (lang_W_options): Removed "unsupported-jdk11" entry.
11498 * parse.y (java_check_methods): Removed dead code.
11499
11500 2001-01-17 Tom Tromey <tromey@redhat.com>
11501
11502 Changes suggested by Per Bothner:
11503 * gcj.texi (Input Options): Don't mention input files.
11504 (Code Generation): Updated --main information.
11505 (Invoking jcf-dump): Mention that --javap is incomplete.
11506 From Alexandre Petit-Bianco:
11507 (Warnings): Don't mention -Wunsupported-jdk11.
11508 My stuff:
11509 (Compatibility): Mention JDK 1.2-ness of libraries.
11510 (Resources): Mention resources used when writing gcj.
11511
11512 2001-01-17 Tom Tromey <tromey@redhat.com>
11513
11514 * gcj.texi: New file.
11515 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11516 (java.info): Depend on gcj.info.
11517 (java/gcj.dvi): New target.
11518 (java.dvi): Depend on gcj.dvi.
11519 (java.install-info): Wrote.
11520
11521 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
11522
11523 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11524 having called make_decl_rtl.
11525
11526 2001-01-14 Per Bothner <per@bothner.com>
11527
11528 Various patches to emit better messages on verification errors.
11529 * expr.c (push_type_0): Return error indication on stack overflow,
11530 instead of callinfg fatal.
11531 (push_type): Now just call push_type_0 (nd fatal on overflow).
11532 (pop_type_0): Return detailed error message (in a char** argument).
11533 (pop_type): If pop_type_0 fails, print error message.
11534 (pop_argument_types): Moved to verify.c.
11535 * verify.c (pop_argument_types): Moved from expr.c.
11536 Return a (possible) error message, rather than void.
11537 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
11538 (verify_jvm_instruction): Use new macros, improving error messages.
11539 For case OPCODE_astore use object_ptr_type_node.
11540 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
11541 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
11542
11543 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11544 constant, return body without wrapper. (Improves constant folding.)
11545 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
11546
11547 2001-01-13 Per Bothner <per@bothner.com>
11548
11549 * expr.c (expand_java_field_op): Assigning to a final field outside
11550 an initializer does not violate JVM spec, so should be warning, not
11551 error. (Sun's verifier does not complain - though MicroSoft's does.)
11552
11553 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
11554
11555 * gjavah.c (version), jcf-dump.c (version): Update copyright year
11556 to 2001.
11557
11558 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
11559
11560 * parse.y (resolve_expression_name): Permit instance variables from
11561 enclosing context in super constructor call.
11562 (resolve_qualified_expression_name): Permit enclosing class's qualified
11563 "this" in super constructor call.
11564
11565 2001-01-10 Mark Mitchell <mark@codesourcery.com>
11566
11567 * class.c (build_utf8_ref): Remove last argument in call to
11568 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11569 (build_class_ref): Likewise.
11570 (build_static_field_ref): Likewise.
11571 (get_dispatch_table): Likewise.
11572 (layout_class_method): Likewise.
11573 (emit_register_classes): Likewise.
11574 * constants.c (build_constant_data_ref): Likewise.
11575 * decl.c (builtin_function): Likewise.
11576 (create_primitive_vtable): Likewise.
11577 * expr.c (build_known_method_def): Likewise.
11578 (build_jni_stub): Likewise.
11579 (java_lang_expand_expr): Likewise.
11580
11581 2001-01-10 Tom Tromey <tromey@redhat.com>
11582
11583 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11584
11585 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11586
11587 * java-tree.h (lang_printable_name_wls): New prototype.
11588 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11589 rather than `current_class' to print type name. Don't prepend type
11590 names when printing constructor names.
11591 (lang_printable_name_wls): New function.
11592 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11593 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11594 * parse.y (patch_method_invocation): Message tuned for constructors.
11595 (not_accessible_p): Grant `private' access from within
11596 enclosing contexts.
11597
11598 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11599
11600 All files with updated copyright when applicable.
11601 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11602 * class.c (mangle_class_field): Function removed.
11603 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11604 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11605 (build_class_ref): Call `java_mangle_class_field' instead of
11606 `mangle_class_field.'
11607 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11608 (layout_class): Call `java_mangle_decl' instead of
11609 `mangle_static_field.'
11610 (cxx_keywords): Initialized static array moved to `lex.c.'
11611 (layout_class_method): Changed leading comment. Simplified to
11612 call `java_mangle_decl.' Local `ptr' moved in for loop body.
11613 * decl.c (lang_mark_tree): Mark field `package_list.'
11614 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11615 (struct lang_type): New field `package_list.'
11616 (unicode_mangling_length): Prototype removed.
11617 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11618 emit_unicode_mangled_name): Likewise.
11619 (cxx_keyword_p): New prototype.
11620 (java_mangle_decl, java_mangle_class_field,
11621 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11622 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11623 `build_expr_wfl.'
11624 * jvgenmain.c (main_method_prefix): Global variable removed.
11625 (main_method_suffix): Likewise.
11626 (do_mangle_classname): New function.
11627 (main): Call it. Format changed to accommodate new mangling scheme.
11628 * lex.c: (utf8_cmp): Conditionally prototyped.
11629 (cxx_keywords): Moved from class.c, conditionally defined.
11630 (utf8_cmp, cxx_keyword_p): Likewise.
11631 * mangle.c (obstack.h, ggc.h): Included.
11632 (mangle_field_decl): New function.
11633 (mangle_method_decl, mangle_type, mangle_pointer_type,
11634 mangle_array_type, mangle_record_type,
11635 find_compression_pointer_match, find_compression_array_match,
11636 find_compression_record_match,
11637 find_compression_array_template_match, set_type_package_list,
11638 entry_match_pointer_p, emit_compression_string, init_mangling,
11639 finish_mangling, compression_table_add, mangle_member_name): Likewise.
11640 (mangle_obstack): New global.
11641 (MANGLE_RAW_STRING): New macro.
11642 (unicode_mangling_length): Turned static.
11643 (append_unicode_mangled_name): Renamed from
11644 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
11645 replaces `obstack', removed from the parameter list.
11646 (append_gpp_mangled_name): Turned static. `mangle_obstack'
11647 replaces parameter `obstack', removed from the parameter list. Call
11648 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11649 (append_gpp_mangled_classtype): Removed.
11650 (compression_table, compression_next): New static variables.
11651 * parse.y (temporary_obstack): Extern declaration removed.
11652
11653 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11654
11655 * parse.y (patch_binop): Compute missing type in error situations.
11656
11657 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11658
11659 * class.c (make_class_data): Push initial value for "arrayclass".
11660 * decl.c (init_decl_processing): Add new class field "arrayclass".
11661
11662 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11663
11664 From patha@softlab.ericsson.se:
11665 * parse.y (switch_label): Use build, not build1, to construct
11666 DEFAULT_EXPR.
11667
11668 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
11669
11670 * lang.c (lang_decode_option): Change -MA to -MP.
11671 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11672 Update to new prototype; do quote targets.
11673 (jcf_dependency_write): Update.
11674
11675 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
11676
11677 Shorten primitive array allocation path:
11678 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11679 to create new primitive arrays.
11680 * expr.c (build_newarray): If generating native code, call
11681 soft_newarray_node with a reference to the primitive TYPE identifier
11682 instead of type_value.
11683
11684 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
11685
11686 Fix for PRs gcj/312 and gcj/253:
11687 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11688 dest if they arn't already.
11689 * class.c (layout_class): Call maybe_layout_super_class on
11690 superinterfaces also, but only if compiling from bytecode.
11691
11692 Fix for PR gcj/373:
11693 * parse.y (create_class): Set ACC_STATIC if class is declared in an
11694 interface.
11695
11696 2000-12-15 Tom Tromey <tromey@redhat.com>
11697
11698 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11699 set.
11700
11701 2000-12-14 Andrew Haley <aph@redhat.com>
11702
11703 * boehm.c (mark_reference_fields): Change test to correctly detect
11704 bitmap overflow.
11705
11706 2000-12-15 Andreas Jaeger <aj@suse.de>
11707
11708 * config-lang.in (lang_dirs): Added.
11709
11710 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
11711
11712 * parse.y (end_artificial_method_body): Fixed undefined behavior.
11713 Credits go to rth for finding it.
11714
11715 2000-12-13 Mike Stump <mrs@wrs.com>
11716
11717 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11718
11719 2000-11-07 Tom Tromey <tromey@cygnus.com>
11720
11721 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11722 * lex.c (java_ignorable_control_p): Removed.
11723 (java_letter_or_digit_p): Removed.
11724 (java_start_char_p): New function.
11725 (java_read_char): Return `int', not `unicode_t'. Changed
11726 callers.
11727 (java_read_unicode): Likewise.
11728 (java_read_unicode_collapsing_terminators): Likewise.
11729 (java_get_unicode): Likewise.
11730 (java_new_lexer): Initialize hit_eof.
11731 (java_parse_end_comment): Take `int' argument.
11732 (java_parse_doc_section): Likewise.
11733 (java_parse_escape_sequence): Don't allow backlash-newline.
11734 Return `int'.
11735 * lex.h (JAVA_DIGIT_P): Removed.
11736 (_JAVA_LETTER_OR_DIGIT_P): Removed.
11737 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11738 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11739 (JAVA_PART_CHAR_P): New macro.
11740 (UEOF): Now -1.
11741 (JAVA_CHAR_ERROR): Now -2.
11742 (java_lexer): New field `hit_eof'.
11743 * chartables.h: New file.
11744 * gen-table.pl: new file.
11745
11746 2000-11-20 Tom Tromey <tromey@cygnus.com>
11747 Alexandre Petit-Bianco <apbianco@cygnus.com>
11748
11749 * parse.y (java_complete_lhs): Only allow compound assignment of
11750 reference type if type is String.
11751
11752 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11753
11754 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11755 jcf-path.c: Likewise.
11756
11757 2000-12-09 Anthony Green <green@redhat.com>
11758
11759 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11760 filestart and filename_length as int values.
11761
11762 2000-12-07 Mo DeJong <mdejong@redhat.com>
11763
11764 * jcf-io.c (find_class): Correct the logic that tests to see if a
11765 .java file is newer than its .class file. The compiler was
11766 incorrectly printing a warning when file mod times were equal.
11767
11768 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
11769
11770 * jvgenmain.c: Use ISPRINT not isascii.
11771
11772 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11773
11774 * parse.y (end_artificial_method_body): Fixed typo.
11775
11776 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
11777
11778 * parse.y (patch_method_invocation): Pick the correct enclosing
11779 context when creating inner class instances.
11780 Fixes gcj/332.
11781
11782 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
11783
11784 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
11785 Update copyright year to 2000.
11786
11787 2000-11-23 Anthony Green <green@redhat.com>
11788
11789 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11790 Move current_file_list out of yyparse and make it static.
11791
11792 * expr.c: Declare quick_stack and tree_list_free_list as static
11793 (init_expr_processing): Register quick_stack and
11794 tree_list_free_list roots.
11795
11796 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11797
11798 * parse.y (build_outer_field_access): New local `decl_ctx', use
11799 it. Check for field's context and current class immediate outer
11800 context inheritance.
11801 (outer_field_access_p): Consider fields inherited from the last
11802 enclosing context.
11803 (build_access_to_thisn): Stop at the last enclosing context if
11804 necessary.
11805 Fixes gcj/367.
11806
11807 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
11808
11809 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11810
11811 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
11812
11813 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11814 scratch buffer.
11815
11816 2000-11-20 Tom Tromey <tromey@cygnus.com>
11817
11818 * jv-scan.c (help): Document --complexity.
11819 (options): Added --complexity.
11820 (flag_complexity): New global.
11821 (main): Call `report'.
11822 * parse-scan.y (complexity): New global.
11823 (if_then_statement, if_then_else_statement,
11824 if_then_else_statement_nsi, switch_block_statement_group,
11825 while_expression, do_statement, for_begin, continue_statement,
11826 throw_statement, catch_clause, finally, method_invocation,
11827 conditional_and_expression, conditional_or_expression,
11828 conditional_expression): Update complexity.
11829 (reset_report): Reset complexity.
11830 (report): New function.
11831
11832 2000-11-20 Tom Tromey <tromey@cygnus.com>
11833
11834 * lex.c (yylex): Added STRICT_TK case.
11835 * parse.y (STRICT_TK): Added.
11836 * parse-scan.y (STRICT_TK): Added.
11837 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11838 `;'. Use 4, not 3, with -k option. Correctly rename resulting
11839 file.
11840 * keyword.h: Rebuilt.
11841 * keyword.gperf (strictfp): Added.
11842
11843 2000-11-20 Tom Tromey <tromey@cygnus.com>
11844
11845 * lex.c (yylex): Recognize floating point constants with leading
11846 0.
11847
11848 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11849
11850 * java-tree.h (cyclic_inheritance_report): Constify.
11851 * parse.y (cyclic_inheritance_report): Likewise.
11852
11853 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
11854
11855 * parse.y (goal): Remove call to ggc_add_string_root.
11856
11857 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
11858
11859 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
11860 Create string in scratch buffer, then pass to build_string.
11861
11862 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
11863
11864 * parse.y (issue_warning_error_from_context): Add
11865 ATTRIBUTE_PRINTF.
11866
11867 2000-11-11 Anthony Green <green@redhat.com>
11868
11869 * jcf-parse.c (process_zip_dir): Add finput parameter.
11870 (jcf_figure_file_type): Call process_zip_dir with appropriate
11871 argument.
11872
11873 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11874
11875 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
11876 * jcf-parse.c (jcf_figure_file_type): Likewise.
11877
11878 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
11879
11880 * parse.y (create_new_parser_context): Use memset () instead of
11881 bzero ().
11882
11883 2000-11-08 Tom Tromey <tromey@cygnus.com>
11884
11885 * gjavah.c (process_file): Only include gcj/cni.h when generating
11886 CNI stubs.
11887
11888 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
11889
11890 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
11891 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
11892 instead of bzero ().
11893
11894 2000-11-05 Tom Tromey <tromey@cygnus.com>
11895
11896 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
11897 * lex.c (IS_ZERO): New define.
11898 (java_perform_atof): Error on floating point underflow.
11899
11900 2000-11-04 Tom Tromey <tromey@cygnus.com>
11901
11902 * lex.c (java_parse_escape_sequence): Only read two octal
11903 characters if the first one is greater than 3. Don't allow
11904 "octal" numbers to include the digits 8 or 9.
11905
11906 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
11907
11908 * Make-lang.in (java.distdir): Remove.
11909
11910 2000-11-03 Tom Tromey <tromey@cygnus.com>
11911
11912 * Make-lang.in (java.dvi): New target.
11913 Partial fix for PR other/567.
11914
11915 * lang-options.h: Mention -Wout-of-date.
11916 * jcf-dump.c (flag_newer): New global.
11917 * gjavah.c (flag_newer): New global.
11918 * jcf-io.c (find_class): Only warn when flag_newer set.
11919 * lang.c (flag_newer): New global.
11920 (struct string_option): New declaration.
11921 (lang_W_options): New global.
11922 (process_option_with_no): New function.
11923 (lang_decode_option): Use it.
11924
11925 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11926 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11927 `$'.
11928
11929 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11930 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11931 * lex.c (java_read_unicode): Removed `term_context' argument.
11932 Recognize any number of `u' in `\u'.
11933 (java_read_unicode_collapsing_terminators): New function.
11934 (java_get_unicode): Use it.
11935 (java_lineterminator): Removed.
11936 (yylex): Produce error if character literal is newline or single
11937 quote. Return if eof found in middle of `//' comment. EOF in
11938 `//' comment is only an error if pedantic.
11939 (java_ignorable_control_p): New function.
11940 (java_parse_end_comment): Return if eof found in middle of
11941 comment.
11942 Include flags.h.
11943 * jv-scan.c (pedantic): New global.
11944
11945 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11946
11947 * parse.y (outer_field_access_p): Inherited fields aren't
11948 consider outer fields.
11949 (maybe_build_thisn_access_method): Use
11950 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11951 (resolve_expression_name): Trigger an error if a static field
11952 is being accessed as an outer field.
11953
11954 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11955
11956 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11957 Fixes gcj/365.
11958
11959 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
11960
11961 * Make-lang.in: Move all build rules here from Makefile.in,
11962 adapt to new context. Wrap all rules that change the current
11963 directory in parentheses. Expunge all references to $(P).
11964 When one command depends on another and they're run all at
11965 once, use && to separate them, not ;. Add OUTPUT_OPTION to
11966 all object-file generation rules. Delete obsolete variables.
11967
11968 * Makefile.in: Delete.
11969 * config-lang.in: Delete outputs= line.
11970
11971 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11972
11973 * parse.y (patch_method_invocation): NULLify this_arg when already
11974 inserted.
11975 (maybe_use_access_method): Handle call to methods unrelated to the
11976 current class. Fixed comment.
11977 Fixes gcj/361.
11978
11979 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11980
11981 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11982 scope.
11983
11984 2000-10-24 Tom Tromey <tromey@cygnus.com>
11985
11986 * lex.c (java_new_lexer): Initialize new fields. Work around
11987 broken iconv() implementations.
11988 (java_read_char): Swap bytes if required. Use fallback decoder if
11989 required.
11990 (byteswap_init, need_byteswap): New globals.
11991 (java_destroy_lexer): Only close iconv handle if it is in use.
11992 * lex.h (java_lexer): New fields read_anything, byte_swap,
11993 use_fallback.
11994 Made out_buffer unsigned.
11995
11996 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11997
11998 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11999 where an enclosing context can be set on the jdep.
12000 (do_resolve_class): Fixed identation.
12001
12002 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12003
12004 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12005
12006 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12007 when requested.
12008
12009 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12010
12011 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12012
12013 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12014
12015 * jcf-write.c (OP1): Update `last_bc'.
12016 (struct jcf_block): Fixed indentation and typo in comments. New
12017 field `last_bc'.
12018 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12019 follows `monitorenter'.
12020 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12021 `patch_string'.
12022 Fixes gcj/232.
12023
12024 2000-10-16 Tom Tromey <tromey@cygnus.com>
12025
12026 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12027 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12028 * lang-options.h: Added -MA, -MT, -MF..
12029 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12030 (DEPEND_TARGET_SET): New macro.
12031 (DEPEND_FILE_ALREADY_SET): Likewise.
12032 (init_parse): Handle new flags.
12033 * jcf.h (jcf_dependency_print_dummies): Declare.
12034 * Make-lang.in (s-java): Added mkdeps.o.
12035 * Makefile.in (BACKEND): Added mkdeps.o.
12036 (../gcjh$(exeext)): Added mkdeps.o.
12037 (../jcf-dump$(exeext)): Added mkdeps.o.
12038 * jcf-depend.c: Include mkdeps.h.
12039 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12040 add_entry): Removed.
12041 (jcf_dependency_reset): Rewrote.
12042 (dependencies): New global.
12043 (jcf_dependency_set_target): Rewrote.
12044 (jcf_dependency_add_target): Likewise.
12045 (jcf_dependency_add_file): Likewise.
12046 (munge): Removed.
12047 (print_ents): Removed.
12048 (jcf_dependency_write): Rewrote.
12049 (print_dummies): New global.
12050 (jcf_dependency_print_dummies): New function
12051 (jcf_dependency_write): Call deps_dummy_targets if required.
12052
12053 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12054
12055 * gjavah.c (add_class_decl): Removed unused variables `tname',
12056 `tlen' and `name_index'.
12057 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12058 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12059 in `wfl_operator' with value.
12060 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12061 (jcf_figure_file_type): Fixed identation.
12062 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12063 * parse.y (analyze_clinit_body): New function.
12064 (static_initializer:): Reset `current_static_block'.
12065 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12066 `wfl_operator' with new value.
12067 (lookup_cl): Use EXPR_WFL_FILENAME.
12068 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12069 analyze_clinit_body.
12070 (build_outer_field_access): Access to this$<n> built from
12071 current_class, not its outer context.
12072 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12073 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12074 (patch_method_invocation): Use `is_static_flag' when already
12075 initialized.
12076 (patch_newarray): Removed assignment in ternary operator.
12077
12078 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12079
12080 * except.c (free_eh_ranges): Don't free `whole_range'.
12081
12082 2000-10-15 Anthony Green <green@redhat.com>
12083
12084 * decl.c (init_decl_processing): Call init_class_processing before
12085 anything else.
12086
12087 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12088
12089 * check-init.c (check_init): Fixed leading comment. Use
12090 LOCAL_FINAL_P.
12091 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12092 (give_name_to_locals): Likewise.
12093 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12094 fields in lang_decl_var.
12095 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12096 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12097 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12098 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12099 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12100 (LOCAL_FINAL): Rewritten.
12101 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12102 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12103 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12104 `init_final' fields.
12105 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12106 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12107 (TYPE_HAS_FINAL_VARIABLE): New macro.
12108 (struct lang_type): Added `afv' field.
12109 * parse.y (check_static_final_variable_assignment_flag): New function.
12110 (reset_static_final_variable_assignment_flag): Likewise.
12111 (check_final_variable_local_assignment_flag): Likewise.
12112 (reset_final_variable_local_assignment_flag): Likewise.
12113 (check_final_variable_indirect_assignment): Likewise.
12114 (check_final_variable_global_assignment_flag): Likewise.
12115 (add_inner_class_fields): Use LOCAL_FINAL_P.
12116 (register_fields): Handle local finals and final variables.
12117 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12118 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12119 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12120 on local finals.
12121 (java_complete_expand_methods): Loop to set
12122 TYPE_HAS_FINAL_VARIABLE. Call
12123 `reset_final_variable_local_assignment_flag' and
12124 `check_final_variable_local_assignment_flag' accordingly before
12125 and after constructor expansion. Call
12126 `reset_static_final_variable_assignment_flag'
12127 before expanding <clinit> and after call
12128 `check_static_final_variable_assignment_flag' if the
12129 current_class isn't an interface. After all methods have been
12130 expanded, call `check_final_variable_global_assignment_flag' and
12131 `check_static_final_variable_assignment_flag' if the current class
12132 is an interface.
12133 (maybe_yank_clinit): Fixed typo in comment.
12134 (build_outer_field_access_methods): Removed old sanity check. Use
12135 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12136 Don't create access methods for finals.
12137 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12138 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12139 existing DECL_INIT has been processed.
12140 (java_complete_lhs): Likewise.
12141 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12142 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12143 logic.
12144 (patch_assignment): Use LOCAL_FINAL_P.
12145 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12146 DECL_INITIAL is nullified.
12147 Fixes gcj/163.
12148
12149 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12150
12151 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12152
12153 * Makefile.in (parse.c, parse-scan.c): Likewise.
12154
12155 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12156
12157 * class.c (temporary_obstack): Remove.
12158 (make_class): Don't mess with obstascks.
12159 (push_class): Likewise.
12160 (set_super_info): Likewise.
12161 (add_method_1): Likewise.
12162 (add_method): Likewise.
12163 (add_field): Likewise.
12164 (build_utf8_ref): Likewise.
12165 (build_class_ref): Likewise.
12166 (build_static_field_ref): Likewise.
12167 (finish_class): Likewise.
12168 (push_super_field): Likewise.
12169 (layout_class): Likewise.
12170 (layout_class_methods): Likewise.
12171 (init_class_processing): Likewise.
12172 * constants.c (get_tag_node): Likewise.
12173 (build_constant_data_ref): Likewise.
12174 * decl.c (ggc_p): Remove.
12175 (copy_lang_decl): Use ggc_alloc.
12176 (complete_start_java_method): Don't mess with obstacks.
12177 (start_java_method): Likewise.
12178 (end_java_method): Likewise.
12179 * except.c (link_handler): Use xmalloc.
12180 (free_eh_ranges): New function.
12181 (method_init_exceptions): Use it.
12182 (add_handler): Use xmalloc.
12183 (expand_start_java_handler): Don't mess with obstacks.
12184 (prepare_eh_table_type): Likewise.
12185 (expand_end_java_handler): Likewise.
12186 * expr.c (push_value): Likewise.
12187 (create_label_decl): Likewise.
12188 (build_jni_stub): Likewise.
12189 (java_lang_expand_expr): Likewise.
12190 (note_instructions): Use xrealloc.
12191 (java_push_constant_from_pool): Don't mess with obstacks.
12192 (process_jvm_instruction): Likewise.
12193 * java-tree.h (cyclic_inheritance_report): Remove duplicate
12194 declaration.
12195 * jcf-parse.c (get_constant): Don't mess with obstacks.
12196 (read_class): Likewise.
12197 (jcf_parse): Likewise.
12198 * lex.c (expression_obstack): Remove.
12199 (java_lex): Don't use obstack_free.
12200 * parse.h (exit_java_complete_class): Don't mess with obstacks.
12201 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12202 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12203 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12204 * parse.y (gaol): Add more GC roots.
12205 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12206 (lookup_field_wrapper): Likewise.
12207 (obtain_incomplete_type): Don't mess with obstacks.
12208 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12209 macros.
12210 (craft_constructor): Don't mess with obstacks.
12211 (safe_layout_class): Likewise.
12212 (java_complete_class): Likewise.
12213 (source_end_java_method): Likewise.
12214 (build_outer_field_access_methods): Likewise.
12215 (build_outer_method_access_method): Likewise.
12216 (maybe_build_thisn_access_method): Likewise.
12217 (build_dot_class_method_invocation): Likewise.
12218 (java_complete_tree): Likewise.
12219 (java_complete_lhs): Likewise.
12220 (do_merge_string_cste): Likewise.
12221 (patch_string_cst): Likewise.
12222 (array_constructor_check_entry): Likewise.
12223 * typeck.c (build_java_array_type): Likewise.
12224 (parse_signature_string): Likewise.
12225 (build_java_signature): Likewise.
12226
12227 2000-10-12 Tom Tromey <tromey@cygnus.com>
12228
12229 Fix for PR gcj/356:
12230 * gjavah.c (add_class_decl): Don't special-case inner classes.
12231 (add_namelet): Likewise.
12232
12233 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
12234
12235 * java-tree.h: Constify current_encoding.
12236 * lang.c: Constify current_encoding.
12237
12238 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
12239
12240 * jvgenmain.c (class_mangling_suffix): Omit `.'.
12241 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12242
12243 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12244
12245 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12246 patch. Fixes gcj/340.
12247
12248 2000-10-10 Tom Tromey <tromey@cygnus.com>
12249
12250 * lex.c (java_new_lexer): Initialize out_first and out_last
12251 fields.
12252 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12253
12254 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12255
12256 * parse.y (pop_current_osb): New function.
12257 (array_type:): Use `dims:', changed actions
12258 accordingly. Suggested by Anthony Green.
12259 (array_creation_expression:): Used pop_current_osb.
12260 (cast_expression:): Likewise.
12261 (search_applicable_method_list): Fixed indentation.
12262
12263 2000-10-08 Anthony Green <green@redhat.com>
12264
12265 * parse.y (array_type_literal): Remove production.
12266 (type_literals): Refer to array_type, not array_type_literal.
12267
12268 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12269
12270 Patch contributed by Corey Minyard.
12271 * decl.c (check_local_named_variable): New function.
12272 (tree check_local_unnamed_variable): Likewise.
12273 (find_local_variable): Splitted. Call check_local_{un}named_variable.
12274
12275 2000-10-07 Anthony Green <green@redhat.com>
12276
12277 * class.c (layout_class): Handle case where superclass can't be
12278 layed out yet.
12279
12280 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
12281
12282 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12283 gperf.
12284
12285 2000-10-05 Tom Tromey <tromey@cygnus.com>
12286
12287 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12288 * jvgenmain.c (class_mangling_prefix): Removed.
12289 (class_mangling_suffix): New global.
12290 (main): Use it.
12291 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12292 `$'.
12293 (print_method_info): Handle overrides for static and final
12294 methods.
12295 (process_file): Generate declaration for class object field.
12296 * class.c (cxx_keywords): New array.
12297 (utf8_cmp): New function.
12298 (cxx_keyword_p): New function.
12299 (layout_class_method): Mangle C++ keywords by appending `$'.
12300 (mangle_field): New function.
12301 (mangle_class_field): Use mangle_field. Mangle class name as
12302 `class$'.
12303 (mangle_static_field): Use mangle_field.
12304
12305 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12306
12307 * decl.c (find_local_variable): Removed uncessary type check and
12308 fixed range check typo. From Corey Minyard.
12309
12310 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12311
12312 * decl.c (give_name_to_locals): New local `code_offset'. Call
12313 `maybe_adjust_start_pc'.
12314 * expr.c (note_instructions): New function.
12315 (expand_byte_code): Don't collect insn starts here.
12316 (peek_opcode_at_pc): New function.
12317 (maybe_adjust_start_pc): Likewise.
12318 * java-tree.h (maybe_adjust_start_pc): Declare.
12319 (note_instructions): Likewise.
12320 * jcf-parse.c (parse_class_file): Call `note_instructions'.
12321
12322 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12323
12324 * parse.y (field_access:): Fixed indentation.
12325 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12326
12327 2000-09-07 Tom Tromey <tromey@cygnus.com>
12328
12329 Fix for PR gcj/307:
12330 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12331 JPRIMITIVE_TYPE_P, for arithmetic operators.
12332 (patch_method_invocation): Indentation fix.
12333 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
12334 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12335 (do_unary_numeric_promotion): Cleaned up code.
12336 (valid_cast_to_p): Handle boolean correctly.
12337
12338 2000-09-27 Tom Tromey <tromey@cygnus.com>
12339
12340 * lex.c (java_read_unicode): Reset bs_count when finished with
12341 `\u' sequence.
12342
12343 2000-10-01 Mark Mitchell <mark@codesourcery.com>
12344
12345 Convert to GC.
12346 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12347 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12348 (typeck.o): Depend on ggc.h.
12349 * class.c (add_method_1): Use GC functions for allocation.
12350 (init_class_processing): Register roots.
12351 * decl.c (ggc_p): Set to 1.
12352 (pending_local_decls): Make it static.
12353 (push_jvm_slot): Use GC functions for allocation.
12354 (init_decl_processing): Register roots.
12355 (give_name_to_locals): Use GC functions for allocation.
12356 (lang_mark_tree): New function.
12357 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12358 functions for allocation.
12359 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12360 * lex.c (java_lex): Use build_string, rather than replicating it
12361 inline.
12362 * parse.y (goal): Add more roots.
12363 (mark_parser_ctxt): New function.
12364 * typeck.c: Include ggc.h.
12365
12366 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12367
12368 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12369 contains something else than MODIFY_EXPR.
12370
12371 2000-09-23 Mark Mitchell <mark@codesourcery.com>
12372
12373 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12374 * Makefile.in (parse.o): Depend on ggc.h.
12375 (class.o): Likewise.
12376 (constants.o): Likewise.
12377 (decl.o): Likewise.
12378 (expr.o): Likewise.
12379 (jcf-parse.o): Likewise.
12380 (jcf-write.o): Likewise.
12381 (mangle.o): Likewise.
12382 * class.c: Include ggc.h.
12383 (build_static_field_ref): Register GC roots.
12384 (layout_class): Likewise.
12385 (init_class_processing): Likewise.
12386 * constants.c: Include ggc.h.
12387 (current_constant_pool_data_ref): Remove.
12388 (tag_nodes): Move it to ...
12389 (get_tag_node): ... here. Register GC roots.
12390 * decl.c: Include ggc.h. Remove many global tree definitions.
12391 (throw_node): Define.
12392 (java_global_trees): Likewise.
12393 (predef_filenames): Make the size a constant.
12394 (init_decl_processing): Adjust accordingly.
12395 (init_decl_processing): Call init_jcf_parse. Register GC roots.
12396 * expr.c: Include ggc.h.
12397 (init_expr_processing): Register GC roots.
12398 (build_invokeinterface): Likewise.
12399 * java-tree.h: Replace extern tree declarations with macros.
12400 (java_global_trees): New variable.
12401 (java_tree_index): New enumeration.
12402 (init_jcf_parse): Declare.
12403 * jcf-parse.c: Include ggc.h.
12404 (current_class): Remove declaration.
12405 (main_class): Likewise.
12406 (all_class_list): Likewise.
12407 (predefined_filename_p): Adjust for constant size of
12408 predef_filenames.
12409 (init_jcf_parse): New function.
12410 * jcf-write.c: Include ggc.h.
12411 (generate_classfile): Register GC roots.
12412 (append_synthetic_attribute): Likewise.
12413 (append_innerclass_attribute_entry): Likewise.
12414 * lang.c: Include ggc.h.
12415 (lang_print_error): Register GC roots.
12416 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12417 with macros.
12418 * parse.y: Include ggc.h.
12419 (wfl_operator): Remove.
12420 (goal): Register GC roots.
12421 (java_pop_parser_context): Adjust for new field names.
12422 (java_parser_context_save_global): Likewse.
12423 (java_parser_context_restore_global): Likewise.
12424 (java_parser_context_suspend): Likewise.
12425 (java_parser_context_resume): Likewise.
12426 (verify_constructor_circularity): Register GC roots.
12427 (lookup_cl): Likewise.
12428 (java_reorder_fields): Likewise.
12429 (build_current_this): Likewise.
12430 (class_in_current_package): Likewise.
12431 (argument_types_convertible): Likewise.
12432 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12433
12434 2000-09-14 Tom Tromey <tromey@cygnus.com>
12435
12436 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12437
12438 2000-09-13 Tom Tromey <tromey@cygnus.com>
12439
12440 * jcf-parse.c: Include <locale.h>.
12441 * jv-scan.c: Include <locale.h>.
12442
12443 2000-09-12 Tom Tromey <tromey@cygnus.com>
12444
12445 * expr.c (pop_type_0): Return `Object' if trying to merge two
12446 interface types.
12447 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12448 interface types; `Object' is always a valid supertype.
12449
12450 2000-09-12 Tom Tromey <tromey@cygnus.com>
12451
12452 Fix for PR gcj/33:
12453 * jv-scan.c (help): Document --encoding.
12454 (options): Added `encoding' entry.
12455 (OPT_ENCODING): New define.
12456 (main): Handle --encoding.
12457 Include <langinfo.h> if nl_langinfo exists.
12458 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12459 --encoding.
12460 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12461 (parse_source_file): Correctly call java_init_lex. Added `finput'
12462 argument. Use nl_langinfo to determine default encoding.
12463 * java-tree.h (current_encoding): Declare.
12464 * parse.y (java_parser_context_restore_global): Don't restore
12465 `finput'.
12466 (java_parser_context_save_global): Don't set `finput' field.
12467 (java_pop_parser_context): Don't restore `finput'. Free old lexer
12468 if required.
12469 * lang.c (current_encoding): New global.
12470 (lang_decode_option): Recognize `-fencoding='.
12471 (finish_parse): Don't close finput.
12472 * parse.h (struct parser_ctxt): Removed `finput' and
12473 `unget_utf8_value' fields. Added `lexer' field.
12474 (java_init_lex): Fixed declaration.
12475 * lex.c (java_new_lexer): New function.
12476 (java_destroy_lexer): Likewise.
12477 (java_read_char): Added `lex' argument. Handle iconv case.
12478 (java_read_unicode): Added `lex' argument. Count backslashes in
12479 lexer structure.
12480 (java_init_lex): Added `finput' and `encoding' arguments. Set
12481 `lexer' field in ctxp.
12482 (BAD_UTF8_VALUE): Removed.
12483 (java_lex): Handle seeing UEOF in the middle of a string literal.
12484 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12485 (java_lexer): New structure.
12486 (UNGETC): Removed.
12487 (GETC): Removed.
12488 (DEFAULT_ENCODING): New define.
12489 (java_destroy_lexer): Declare.
12490
12491 2000-09-12 Tom Tromey <tromey@cygnus.com>
12492
12493 Fix for PR gcj/343:
12494 * lex.c (java_init_lex): Initialize java_io_serializable.
12495 * parse.y (java_io_serializable): New global.
12496 (valid_ref_assignconv_cast_p): An array can be cast to
12497 serializable.
12498
12499 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
12500
12501 * decl.c, expr.c: Include defaults.h if not already included.
12502 Don't define the *_TYPE_SIZE macros.
12503
12504 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
12505
12506 * typeck.c (build_java_array_type): Correct first parameter
12507 in ADJUST_FIELD_ALIGN invocation.
12508
12509 2000-09-06 Tom Tromey <tromey@cygnus.com>
12510
12511 * lang-specs.h: Also recognize `-femit-class-files'.
12512
12513 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12514
12515 * verify.c (merge_types): Load the types to merge if necessary.
12516
12517 2000-09-02 Anthony Green <green@redhat.com>
12518
12519 * jcf-io.c: Include zlib.h.
12520 (open_in_zip): Read compressed class file archives.
12521 * zipfile.h (ZipDirectory): Add uncompressed_size and
12522 compression_method fields.
12523 * zextract.c (read_zip_archive): Collect file compression info.
12524
12525 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
12526
12527 * parse.y (do_resolve_class): Also explore superclasses of
12528 intermediate enclosing contexts when searching for inner classes.
12529
12530 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12531
12532 * parse.y (variable_declarator_id:): Better error message.
12533 (expression_statement:): Use YYNOT_TWICE.
12534 (cast_expression:): Likewise.
12535 (assignment:): Likewise.
12536
12537 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12538
12539 * parse.y (do_merge_string_cste): New locals. Create new
12540 STRING_CSTs each time, use memcpy. Fixes gcj/311.
12541
12542 2000-08-07 Hans Boehm <boehm@acm.org>
12543
12544 * boehm.c (mark_reference_fields): Set marking bits for all words in
12545 a multiple-word record.
12546 (get_boehm_type_descriptor): Use the procedure marking descriptor for
12547 java.lang.Class.
12548
12549 2000-08-31 Mike Stump <mrs@wrs.com>
12550
12551 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12552 jcf-dump$(exeext)): Make parallel safe.
12553
12554 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12555
12556 * jcf-parse.c (set_source_filename): Constify a char *.
12557 * jcf-write.c (append_innerclasses_attribute,
12558 make_class_file_name): Constify a char *. Don't recycle a
12559 variable for an unrelated purpose.
12560 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12561 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12562
12563 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12564
12565 * expr.c (can_widen_reference_to): Fixed indentation.
12566 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12567 * parse.y: `finit$' replaces `$finit$' in comments.
12568 (try_builtin_assignconv): Fixed leading comment.
12569
12570 2000-08-25 Greg McGary <greg@mcgary.org>
12571
12572 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12573
12574 2000-08-24 Greg McGary <greg@mcgary.org>
12575
12576 * lang.c (lang_decode_option): Use ARRAY_SIZE.
12577 * parse.y (BINOP_LOOKUP): Likewise.
12578
12579 2000-08-22 Andrew Haley <aph@cygnus.com>
12580
12581 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12582 sign extending. Fixes gcj/321.
12583 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12584 combining to make a jlong. Fixes gcj/321.
12585
12586 2000-08-21 Nix <nix@esperi.demon.co.uk>
12587
12588 * lang-specs.h: Do not process -o or run the assembler if
12589 -fsyntax-only.
12590
12591 2000-08-16 Andrew Haley <aph@cygnus.com>
12592
12593 * typeck.c (build_java_array_type): Rewrite code to do array
12594 alignment. Take into account back-end macros when aligning array
12595 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12596 user to set alignment. Fixes gcj/252 and 160.
12597
12598 2000-08-09 Tom Tromey <tromey@cygnus.com>
12599
12600 * parse.y (check_abstract_method_definitions): Now return `int'.
12601 Check implemented interfaces. Fixes PR gcj/305.
12602
12603 * parse.y (patch_switch_statement): Disallow `long' in switch
12604 expressions. Fixes PR gcj/310.
12605
12606 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12607
12608 * decl.c (finit_leg_identifier_node): New global.
12609 (init_decl_processing): Use `finit$' to initialize
12610 finit_identifier_node. Use `$finit$' to initialize
12611 finit_leg_identifier_node.
12612 * expr.c (expand_java_field_op): Use ID_FINIT_P.
12613 * java-tree.h (finit_identifier_node): Changed attached comment.
12614 (finit_leg_identifier_node): New declaration.
12615 (ID_FINIT_P): Take finit_identifier_node and
12616 finit_leg_identifier_node into account. This is a backward
12617 compatibility hack.
12618
12619 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12620
12621 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12622 Jan 6 2000 patch.
12623 (generate_bytecode_insns): Check `nargs' before emitting it.
12624 * verify.c (merge_type_state): Fixed typo.
12625 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12626 generate_bytecode_{conditional,insns}.
12627
12628 2000-08-13 Anthony Green <green@redhat.com>
12629
12630 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12631 for -pg builds).
12632
12633 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12634
12635 * class.c (maybe_layout_super_class): Fixed indentation.
12636 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12637 (java_check_methods): New function declaration.
12638 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12639 instead of `str_ptr'.
12640 * jcf-write.c (generate_bytecode_insns): Emit number the of args
12641 of a `invokeinterface' at the right time.
12642 * parse.h (WFL_STRIP_BRACKET): New macro.
12643 (SET_TYPE_FOR_RESOLUTION): Use it.
12644 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12645 (check_class_interface_creation): Don't check for cross package
12646 innerclass name clashes.
12647 (method_header): Behave properly if MDECL is `error_mark_node'.
12648 (method_declarator): Return `error_mark_node' if bogus current
12649 class.
12650 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12651 (resolve_and_layout): New local `decl_type', set and used. Call
12652 java_check_methods.
12653 (java_check_methods): New method.
12654 (java_layout_classes): Use it.
12655 (resolve_qualified_expression_name): No EH check necessary in
12656 access$<n>.
12657 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12658 `case' statement.
12659 (patch_assignment): Set DECL_INITIAL on integral final local.
12660
12661 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12662
12663 * java-tree.h (flag_extraneous_semicolon): New extern.
12664 * lang-options.h: (-Wextraneous-semicolon): New option.
12665 * lang.c (flag_redundant): Fixed typo in leading comment.
12666 (flag_extraneous_semicolon): New global.
12667 (lang_decode_option): Set `flag_extraneous_semicolon' when
12668 -Wall. Decode `-Wextraneous-semicolon'.
12669 * parse.y (type_declaration:): Removed `SC_TK' hack, added
12670 `empty_statement' rule.
12671 (class_body_declaration): Likewise.
12672 (method_body:): Accept `;' as a method body.
12673 (static_initializer:): Removed `SC_TK' hack.
12674 (constructor_block_end:): Likewise.
12675 (empty_statement:): Report deprecated empty declaration. Fixes
12676 gcj/295
12677
12678 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12679
12680 * parse.y (build_dot_class_method_invocation): Changed parameter
12681 name to `type'. Build signature from `type' and convert it to a
12682 STRING_CST if it's an array.
12683 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12684 to use `ref_type' directly.
12685
12686 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
12687
12688 * lang-options.h: Added a comma after the last element to avoid
12689 syntax errors when other languages define additional options.
12690
12691 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
12692
12693 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12694 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12695 (jc1): Link with $(BACKEND).
12696 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12697
12698 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
12699
12700 * jvspec.c: Adjust type of second argument to
12701 lang_specific_driver, and update code as necessary.
12702
12703 * class.c (build_dtable_decl): Initialize dummy.
12704
12705 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12706
12707 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12708 method bodies not to rule out discarding `<clinit>'; don't use
12709 <clinit> to initialize static fields with constant initializers.
12710
12711 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12712
12713 * gjavah.c (print_method_info): Added `synth' parameter. Skip
12714 synthetic methods.
12715 (method_synthetic): New global.
12716 (HANDLE_METHOD): Recognize synthetic method and tell
12717 `print_method_info' about it.
12718 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12719 processing a synthetic method.
12720 * jcf-reader.c (skip_attribute): New function.
12721 ( skip_attribute): Likewise.
12722
12723 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12724
12725 * parse.y (build_outer_field_access): Fixed comments.
12726 (fix_constructors): Emit the initialization of this$<n> before
12727 calling $finit$.
12728 (resolve_qualified_expression_name): Build an access to `decl' if
12729 necessary.
12730
12731 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12732
12733 * parse-scan.y (curent_class): Non longer const.
12734 (inner_qualifier, inner_qualifier_length): Deleted.
12735 (current_class_length): New global.
12736 (bracket_count): Fixed typo in leading comment.
12737 (anonymous_count): New global.
12738 (class_instance_creation_expression:): Handle anonymous classes.
12739 (anonymous_class_creation:): New rule.
12740 (push_class_context): Rewritten.
12741 (pop_class_context): Likewise.
12742 (INNER_QUALIFIER): Macro deleted.
12743 (report_class_declaration): call `push_class_context' when
12744 entering the function. `fprintf' format modified not to use
12745 INNER_QUALIFIER.
12746 (report_class_declaration): Assign `package_name' and
12747 `current_class' to NULL separately.
12748
12749 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12750
12751 * expr.c (build_invokeinterface): Call layout_class_methods on
12752 target interface.
12753
12754 2000-07-27 Tom Tromey <tromey@cygnus.com>
12755 Anthony Green <green@cygnus.com>
12756 Alexandre Petit-Bianco <apbianco@cygnus.com>
12757
12758 * class.c (make_class_data): Create vtable for abstract classes.
12759 (get_dispatch_table): Changed to cope with abstract classes.
12760
12761 2000-07-27 Tom Tromey <tromey@cygnus.com>
12762
12763 * parse.y (patch_method_invocation): Don't reverse the argument
12764 list when dealing with anonymous class constructors. Fixed typo in
12765 comment.
12766
12767 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12768
12769 * parse.y (build_alias_initializer_parameter_list): Reverse
12770 crafted list when building aliases for anonymous class
12771 constructors.
12772
12773 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12774
12775 * parse.y (jdep_resolve_class): Don't bother checking potential
12776 innerclass access if `decl' is NULL.
12777 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
12778 WFL.
12779
12780 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12781
12782 * parse.c: Remove (again.)
12783
12784 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12785
12786 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
12787 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12788 outside the `if' statement, alias to innerclass removed, `decl'
12789 used to mark the class complete.
12790
12791 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12792
12793 * parse.y (simple_name:): Fixed typo in error message.
12794
12795 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12796
12797 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12798 or its first operand can be error marks.
12799
12800 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12801
12802 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12803 * parse.y (method_header): Likewise.
12804
12805 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12806
12807 * parse.y (process_imports): Consider that one might be trying to
12808 import an innerclass. Fixes gcj/254
12809
12810 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12811
12812 * parse.y (find_as_inner_class): Handle the case where the
12813 enclosing context of an innerclass has been loaded as bytecode.
12814
12815 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12816
12817 * parse.y (simple_name:): Reject `$' in type names.
12818 (resolve_type_during_patch): Use `type' as a second
12819 argument to resolve_no_layout. Fixes gcj/257.
12820
12821 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
12822
12823 * parse.y (find_most_specific_methods_list): Select the only
12824 non-abstract method even if max has been set.
12825 Fixes gcj/285, gcj/298.
12826
12827 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
12828
12829 * lang-specs.h: Added %(jc1) to java compiler options.
12830
12831 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
12832
12833 * .cvsignore: New file.
12834
12835 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12836
12837 * parse.y (not_accessible_p): Access granted to innerclasses
12838 (indirectly) extending the reference type. Fixes gcj/249.
12839
12840 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12841
12842 * parse.y (patch_method_invocation): Fixed comment.
12843 (maybe_use_access_method): Build this$<n>s to the context of the
12844 target method, or a type that extends it. Fixes gcj/242.
12845
12846 2000-07-13 Mark Mitchell <mark@codesourcery.com>
12847
12848 * parse.c: Remove.
12849
12850 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12851
12852 * parse.y (fold_constant_for_init): Avoid bullish conversion.
12853
12854 2000-07-13 Tom Tromey <tromey@cygnus.com>
12855
12856 * lang-specs.h: Added %{I*}.
12857
12858 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
12859
12860 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
12861
12862 2000-07-12 Mark Mitchell <mark@codesourcery.com>
12863
12864 * parse-scan.c: Remove.
12865
12866 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12867
12868 * class.c (set_super_info): Handled protected inner classes.
12869 (common_enclosing_context_p): Bail early if arguments aren't both
12870 inner classes.
12871 (get_access_flags_from_decl): Handle private and protected inner
12872 classes.
12873 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
12874 (CLASS_PROTECTED): Likewise.
12875 (struct lang_type): New bitfield `poic'.
12876 * parse.y (jdep_resolve_class): Call check_inner_class_access on
12877 inner classes only.
12878 (check_inner_class_access): Renamed arguments, added
12879 comments. Handles protected inner classes (fixes gcj/225)
12880 (not_accessible_p): Fixed comments. Avoid handling inner classes.
12881
12882 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12883
12884 * parse.y (resolve_qualified_expression_name): Verify qualified
12885 access to `this'. Fixes gcj/239.
12886
12887 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12888
12889 * jcf-write.c (generate_classfile): Don't install ConstantValue
12890 for null pointers.
12891
12892 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12893
12894 * parse.y (resolve_qualified_expression_name): Handle inner class
12895 access. Fixes gcj/256.
12896
12897 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12898
12899 * jcf-write.c (generate_classfile): Properly install the
12900 ConstantValue attribute and the initial value constant pool index
12901 on string constants.
12902 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
12903 class files.
12904
12905 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12906
12907 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
12908 construct.
12909 * parse.y (find_as_inner_class): Fixed typo.
12910 (do_resolve_class): Explore enclosing contexts when searching for
12911 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
12912 (check_inner_class_access): Check `decl' which can be null in case
12913 of previous errors.
12914
12915 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12916
12917 * java-tree.h (java_debug_context): Declared `extern'.
12918 (safe_layout_class): Likewise.
12919 * parse.y (resolve_field_access): Field must be `static' in order
12920 to be replaced by its initial value. Added comments.
12921 (find_applicable_accessible_methods_list): Fixed typo.
12922 (find_most_specific_methods_list): Methods found in innerclasses
12923 take over methods founds in the enclosing contexts.
12924 (java_complete_tree): Loosen restrictions on the type of DECLs
12925 that can be replaced by their initialization values.
12926 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
12927
12928 2000-07-05 Tom Tromey <tromey@cygnus.com>
12929
12930 * Make-lang.in (PARSE_DIR): New macro.
12931 (PARSE_RELDIR): Likewise.
12932 (PARSE_C): Likewise.
12933 (PARSE_SCAN_C): Likewise.
12934 ($(PARSE_C)): New target.
12935 ($(PARSE_SCAN_C)): Likewise.
12936 (SET_BISON): New macro.
12937 (BISONFLAGS): Likewise.
12938 (JAVABISONFLAGS): Likewise.
12939
12940 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
12941
12942 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12943 argument on the first pass for CNI as well as JNI.
12944 (print_method_info): Set up method name on the first pass only.
12945
12946 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12947
12948 * parse.y (parser_qualified_classname): Removed parameter
12949 `is_static'.
12950 (create_interface): Removed first passed parameter to
12951 parser_qualified_classname.
12952 (create_class): Likewise. Don't install alias on static
12953 innerclasses. Fixes gcj/275.
12954
12955 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12956
12957 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12958 debugable statement with empty_stmt_node. Fixes gcj/272
12959
12960 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12961
12962 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12963 gcj/271.
12964
12965 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12966
12967 * jcf-write.c (push_long_const): Appropriately cast short negative
12968 constant to jword.
12969
12970 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12971
12972 * parse.y (verify_constructor_super): Use loop variable
12973 `m_arg_type' initialized with `mdecl_arg_type'.
12974
12975 2000-06-29 Tom Tromey <tromey@cygnus.com>
12976
12977 * parse.y (resolve_field_access): Handle case where `type_found'
12978 is NULL.
12979
12980 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12981
12982 * expr.c (lookup_field): The same field can be found through two
12983 different interface. Don't declare it ambiguous in that case.
12984
12985 2000-06-27 Tom Tromey <tromey@cygnus.com>
12986
12987 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
12988 follows \r, then unget it at a lower level.
12989
12990 2000-06-26 Tom Tromey <tromey@cygnus.com>
12991
12992 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12993 java_complete_tree.
12994
12995 2000-06-25 Tom Tromey <tromey@cygnus.com>
12996
12997 * parse.y (for_statement): Wrap expression in a WFL if it is a
12998 constant. For PR gcj/268.
12999
13000 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13001
13002 * parse.y (do_resolve_class): Minor optimiztion in the package
13003 list search. Removed unnecessary test and return statement.
13004 (valid_ref_assignconv_cast_p): Order of arguments to
13005 enclosing_context_p fixed.
13006
13007 2000-06-24 Tom Tromey <tromey@cygnus.com>
13008
13009 * expr.c (lookup_field): Print error and return error_mark_node if
13010 field reference is ambiguous.
13011
13012 * parse.y (check_abstract_method_definitions): Also check if
13013 `other_method' is abstract.
13014
13015 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13016
13017 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13018 classes.
13019 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13020 (struct lang_type): New field `pic'.
13021 (CLASS_PRIVATE): New macro.
13022 * parse.y (check_inner_class_access): New function.
13023 (jdep_resolve_class): Call it.
13024
13025 2000-06-23 Tom Tromey <tromey@cygnus.com>
13026
13027 * parse.y (patch_incomplete_class_ref): Initialize the returned
13028 class. For PR gcj/260.
13029
13030 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13031
13032 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13033
13034 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13035
13036 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13037 Java specific checks.
13038 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13039 screened by DECL_P.
13040 * java-tree.def (CASE_EXPR): Marked 'e'.
13041 (DEFAULT_EXPR): Likewise.
13042 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13043 screened by DECL_P.
13044 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13045 Java specific checks.
13046 (generate_bytecode_insns): Test try_block for BLOCK before using
13047 BLOCK_EXPR_BODY.
13048 * parse.y (build_wfl_wrap): Added `location' argument. Set
13049 EXPR_WFL_LINECOL accordingly.
13050 (dim_expr:): Wrap constants with WFLs.
13051 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13052 (resolve_package): Check for `stmt' not being a BLOCK before
13053 building a debuggable statement with it.
13054 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13055 invocation.
13056 (resolve_field_access): Make sure `decl' is a DECL before treating
13057 it as such.
13058 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13059 IDENTIFIER_NODE before treating it as such.
13060 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13061 treating it as such.
13062 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13063 to be applied only on non array types.
13064
13065 2000-06-16 Per Bothner <per@bothner.com>
13066
13067 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13068 define in terms of DECL_RESULT, as that fails when --enable-checking.
13069
13070 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13071
13072 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13073 types the same in comparison.
13074 (CHECK_OP): Add static prototype.
13075
13076 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13077
13078 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13079 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13080 * parse.c: Rebuilt.
13081
13082 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13083
13084 * decl.c (create_primitive_vtable): Prototype.
13085
13086 * jcf-write.c (generate_bytecode_insns): Initialize variable
13087 `saved_context'.
13088
13089 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13090
13091 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13092
13093 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13094 to track searched classes, and do not search the same class more than
13095 once. Call find_applicable_accessible_methods_list on immediate
13096 superclass, instead of search_applicable_method_list on all ancestors.
13097 Fix for PR gcj/238.
13098
13099 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13100
13101 * parse.y (register_fields): Permit static fields in inner classes
13102 if they are final. Fix for PR gcj/255.
13103
13104 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13105
13106 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13107 * parse.y (find_in_imports): Returned type changed to void,
13108 leading comment fixed.
13109 (register_package): New function.
13110 (qualify_and_find): Likewise.
13111 (package_declaration:): Use `register_package'.
13112 (single_type_import_declaration:): Removed local variable
13113 `node'. Added missing `;' for consistency.
13114 (type_import_on_demand_declaration:): Use `chainon' to link new
13115 entries.
13116 (lookup_field_wrapper): Lookup local variables defined in outer
13117 contexts first.
13118 (java_complete_class): Don't reverse the list of imported on demand.
13119 (do_resolve_class): Reorganized. Removed local variable
13120 `original_name'. Call `qualify_and_find' with the current package
13121 name, invoke `find_in_imports_on_demand' right after. Call
13122 `qualify_and_find' with the packages we've seen so far. Fixed
13123 operations numbering in comments.
13124 (java_expand_class): Don't reverse `package_list'.
13125 (find_most_specific_methods_list): New local variables `abstract'
13126 and `candidates'. Use them to pick the right method.
13127
13128 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
13129
13130 * parse.y (check_modifiers_consistency): Don't subtract out
13131 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13132
13133 2000-06-04 Philipp Thomas <pthomas@suse.de>
13134
13135 * Makefile.in (INTLLIBS): New.
13136 (LIBS): Add above.
13137 (DEPLIBS): Ditto.
13138
13139 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13140
13141 * class.c (get_dispatch_table): Build the vtable dummy entry list
13142 element with a null purpose. Fixed leading comment.
13143 (build_dtable_decl): Build an accurate dtable type when appropriate
13144 and use it.
13145
13146 2000-06-02 Richard Henderson <rth@cygnus.com>
13147
13148 * lang.c (lang_get_alias_set): New.
13149
13150 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13151
13152 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13153 before using it as the accessed field.
13154
13155 2000-05-31 Tom Tromey <tromey@cygnus.com>
13156
13157 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13158 char_array_vtable, short_array_vtable, int_array_vtable,
13159 long_array_vtable, float_array_vtable, double_array_vtable):
13160 Declare.
13161 * expr.c (get_primitive_array_vtable): New function.
13162 (create_primitive_vtable): New function.
13163 (java_lang_expand_expr): Enable code to statically generate
13164 arrays.
13165 * decl.c (init_decl_processing): Create primitive vtables.
13166 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13167 short_array_vtable, int_array_vtable, long_array_vtable,
13168 float_array_vtable, double_array_vtable): Define.
13169
13170 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13171
13172 * java/parse.y (find_applicable_accessible_methods_list):
13173 Don't add an uninitialized value to the list.
13174
13175 2000-05-25 Tom Tromey <tromey@cygnus.com>
13176
13177 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13178 when trying to see if field's class should be initialized. Always
13179 initialize field's declaring class, not qualified class.
13180 For PR gcj/162.
13181
13182 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13183 `wfl_operator', to maybe_build_primttype_type_ref.
13184 Fixes PR gcj/235.
13185
13186 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
13187
13188 * parse.y (patch_method_invocation): Don't try to lookup methods
13189 in primitive types.
13190
13191 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13192
13193 * parse.y (resolve_field_access): Call the appropriate <clinit>
13194 before accessing the length of a static array. Craft a decl for
13195 the field while its time. Fixes PR gcj/129.
13196
13197 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13198
13199 * parse.y (resolve_package): Correctly set `*next' (was off by
13200 one.)
13201 (resolve_qualified_expression_name): Fixed comment.
13202
13203 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13204
13205 * jcf-parse.c (jcf_parse_source): Reset current_class and
13206 current_function_decl to NULL before parsing a new file.
13207
13208 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13209
13210 * parse.y (block_end:): If the collected block doesn't feature a
13211 statement, insert an empty statement.
13212
13213 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13214
13215 * parse.y (maybe_yank_clinit): New function.
13216 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13217 end of the list of methods belonging to a class.
13218 (java_complete_expand_method): Check whether <clinit> is really
13219 necessary and expand it accordingly.
13220
13221 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13222
13223 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13224 processed by the method's switch statement.
13225
13226 2000-05-19 Tom Tromey <tromey@cygnus.com>
13227
13228 * java-tree.h: Added init state enum.
13229 * decl.c (emit_init_test_initialization): Initialize class
13230 initialization check variable by looking at class' state.
13231
13232 2000-05-19 Tom Tromey <tromey@cygnus.com>
13233
13234 * java-tree.h (build_instanceof): Declare.
13235 (build_get_class): Declare.
13236 * parse.y (patch_binop): Use build_instanceof.
13237 * expr.c (build_instanceof): New function. If class is final,
13238 don't make a function call.
13239 (expand_java_INSTANCEOF): Use it.
13240 (build_get_class): New function.
13241
13242 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13243
13244 * jcf-write.c (generate_classfile): Scan the source_file for
13245 slashes with the right pointer variable.
13246
13247 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
13248
13249 * lang.c (lang_decode_option): Update -Wunused flags by calling
13250 set_Wunused.
13251 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13252
13253 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
13254
13255 * check_init.c (check_init): Constify local char *.
13256 * class.c (push_class): Constify local char *.
13257 * java_tree.h: Update prototypes.
13258 * jcf-io.c (open_class): Constify filename parameter and
13259 return value.
13260 (find_class): Remove redundant string copy. Cast return from
13261 open_class.
13262 * jcf-parse.c (read_class, parse_class_file, yyparse):
13263 Constify local char *.
13264 * jcf-write.c (generate_bytecode_insns, generate_classfile):
13265 Constify local char *.
13266 * jcf.h (JCF): Constify filename and classname.
13267 (JCF_FINISH): Cast args to FREE to char * when appropriate.
13268 * lang.c (init_parse): Constify parameter and return value.
13269 * lex.c (java_get_line_col): Constify filename parameter.
13270 * parse.h: Constify parser_ctxt.filename. Update prototypes.
13271 * parse.y (java_parser_context_suspend,
13272 issue_warning_error_from_context, safe_layout_class): Constify
13273 local char *.
13274 * parse.c: Regenerate.
13275
13276 2000-05-08 Tom Tromey <tromey@cygnus.com>
13277
13278 * expr.c (build_jni_stub): Cache the result of
13279 _Jv_LookupJNIMethod.
13280
13281 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13282
13283 * decl.c (predef_filenames_size): Now 7.
13284 (predef_filenames): New seventh entry.
13285
13286 2000-05-04 Tom Tromey <tromey@cygnus.com>
13287
13288 * boehm.c (mark_reference_fields): Don't mark RawData fields.
13289 Keep track of when we've seen a reference field after a
13290 non-reference field.
13291 (get_boehm_type_descriptor): Handle case where we see
13292 non-reference fields but no trailing reference field.
13293 * decl.c (rawdata_ptr_type_node): Define.
13294 (init_decl_processing): Initialize rawdata_ptr_type_node.
13295 * java-tree.h (rawdata_ptr_type_node): Declare.
13296
13297 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13298
13299 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13300 specifiers in calls to fprintf.
13301
13302 2000-05-03 Andrew Haley <aph@cygnus.com>
13303
13304 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13305
13306 * javaop.h (WORD_TO_INT): New function.
13307 (IMMEDIATE_s4): Use WORD_TO_INT.
13308 * jcf.h (JPOOL_INT): Ditto.
13309
13310 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13311 separator.
13312
13313 2000-04-19 Tom Tromey <tromey@cygnus.com>
13314
13315 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13316 on native function.
13317 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13318 JNI methods.
13319 * expr.c (build_jni_stub): New function.
13320 * lang-specs.h: -fjni and -femit-class-file are incompatible.
13321 * parse.c: Rebuilt.
13322 * parse.y (java_complete_expand_methods): Expand a native method
13323 and call build_jni_stub if -fjni given.
13324 * lang-options.h: Document -fjni.
13325 * lang.c (flag_jni): New global.
13326 (lang_f_options): Added `jni' entry.
13327 * java-tree.h (soft_lookupjnimethod_node,
13328 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13329 Declare.
13330 (flag_jni): Declare.
13331 (build_jni_stub): Declare.
13332 (struct lang_decl): Added `native' flag.
13333 (METHOD_NATIVE): Redefined to use `native' field of lang specific
13334 structure.
13335 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13336 soft_jnipopsystemframe_node): New globals.
13337 (init_decl_processing): Set them. _Jv_InitClass only takes one
13338 argument.
13339
13340 * java-tree.def: Put into `C' mode.
13341
13342 2000-04-27 Tom Tromey <tromey@cygnus.com>
13343
13344 Fix for PR gcj/2:
13345 * expr.c (expand_invoke): Generate check to see if object pointer
13346 is null in nonvirtual invocation case.
13347 * java-tree.h (soft_nullpointer_node): Declare.
13348 * decl.c (soft_nullpointer_node): New global.
13349 (init_decl_processing): Initialize soft_nullpointer_node.
13350 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13351 or `private' methods.
13352 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13353
13354 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
13355
13356 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13357 from <clinit>
13358
13359 2000-04-26 Tom Tromey <tromey@cygnus.com>
13360
13361 * zextract.c (find_zip_file_start): New function.
13362 (read_zip_archive): Use it.
13363
13364 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13365
13366 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13367
13368 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13369
13370 * class.c (common_enclosing_context_p): New function.
13371 * java-tree.h (common_enclosing_context_p): Added prototype.
13372 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13373 classes sharing an outer context with the current instance.
13374 * parse.y (build_access_to_thisn): Fixed leading comment.
13375 (verify_constructor_super): New local `supper_inner'. Skip
13376 enclosing context argument in the case of inner class constructors.
13377 (patch_method_invocation): Insert proper context as second
13378 parameter to pure inner class constructor super invocations.
13379
13380 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13381
13382 * parse.y (end_class_declaration): Reset the interface number
13383 counter.
13384
13385 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13386
13387 * parse.y (source_start_java_method): Deleted unnecessary code.
13388 (patch_method_invocation): Fixed comment.
13389
13390 2000-04-24 Robert Lipe <robertlipe@usa.net>
13391
13392 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13393
13394 2000-04-23 Tom Tromey <tromey@cygnus.com>
13395
13396 * boehm.c (mark_reference_fields): Use int_byte_position.
13397
13398 2000-04-22 Tom Tromey <tromey@cygnus.com>
13399
13400 * boehm.c (mark_reference_fields): Only call byte_position on
13401 non-static fields.
13402
13403 2000-04-22 Tom Tromey <tromey@cygnus.com>
13404
13405 * boehm.c (mark_reference_fields): Added `last_view_index'
13406 argument. Use DECL_FIELD_OFFSET to determine field's offset.
13407
13408 2000-04-20 Mo DeJong <mdejong@cygnus.com>
13409
13410 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13411 * parse.y (check_class_interface_creation): Fixed comments. Select
13412 permitted modifiers for (inner) interfaces. Changed error message
13413 to report rejected modifiers used with local classes.
13414
13415 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13416
13417 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13418 of directly inherited type considered in scope.
13419 * parse.y (do_resolve_class): Search inherited classes for inner
13420 classes.
13421
13422 2000-04-20 Tom Tromey <tromey@cygnus.com>
13423
13424 * parse.y (not_accessible_p): Use member's class, not current
13425 class, when doing inheritance check for protected reference.
13426 Fixes PR gcj/124.
13427
13428 2000-04-20 Jason Schroeder <shrode@subnature.com>
13429
13430 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13431
13432 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13433
13434 * parse.y (lookup_field_wrapper): Search for final local aliases.
13435 (resolve_expression_name): Let lookup_field_wrapper search for
13436 final local aliases. Force the value of `name' if one is found.
13437 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13438 an expression name. Fixed comments.
13439
13440 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13441
13442 * parse.y (yyerror): `msg' can be null, don't use it in that case.
13443
13444 2000-04-19 Tom Tromey <tromey@cygnus.com>
13445
13446 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13447
13448 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13449
13450 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13451
13452 2000-04-18 Tom Tromey <tromey@cygnus.com>
13453
13454 PR gcj/211:
13455 * gjavah.c (utf8_cmp): Changed return value.
13456 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
13457 result.
13458 (cxx_keywords): New global.
13459 (get_field_name): Handle new result of cxx_keyword_subst.
13460 (print_method_info): Likewise.
13461
13462 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
13463
13464 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13465 with a newline, for CNI.
13466 (print_stub_or_jni): Print a space or newline before method name for
13467 CNI as well as JNI.
13468 (print_cxx_classname): Don't write leading "::" in CNI stub method.
13469 (process_file): Include gcj/cni.h if generating CNI stubs.
13470
13471 2000-04-16 Tom Tromey <tromey@cygnus.com>
13472
13473 * gjavah.c (decompile_method): Use print_field_name.
13474 Fixes PR gcj/205.
13475
13476 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13477
13478 * parse.y (java_expand_classes): Reverse the package list once.
13479 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13480 reduction.
13481 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13482 the `==' and `!=' operators.
13483
13484 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13485
13486 * jcf-write.c (generate_bytecode_insns): At invocation time,
13487 always relate an interface method to the type of its selector.
13488
13489 2000-04-05 Tom Tromey <tromey@cygnus.com>
13490
13491 Fix for PR gcj/2:
13492 * expr.c (expand_invoke): Generate check to see if object pointer
13493 is null in nonvirtual invocation case.
13494 * java-tree.h (soft_nullpointer_node): Declare.
13495 * decl.c (soft_nullpointer_node): New global.
13496 (init_decl_processing): Initialize soft_nullpointer_node.
13497 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13498 or `private' methods.
13499 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13500
13501 2000-04-05 Tom Tromey <tromey@cygnus.com>
13502
13503 Fix for PR gcj/140:
13504 * parse.y (check_final_assignment): Recognize assignments to the
13505 `length' field of an array when generating class files.
13506
13507 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13508
13509 * class.c (decl_hash): Prototype removed.
13510 (decl_compare): Likewise.
13511
13512 2000-04-05 Tom Tromey <tromey@cygnus.com>
13513
13514 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13515 * parse.y (check_modifiers_consistency): Check for final/volatile
13516 clash. Fixes PR gcj/164.
13517
13518 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13519
13520 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13521 made global.
13522 (java_hash_compare_tree_node): Renamed from `decl_compare, made
13523 global.
13524 (add_method_1): Use `java_hash_hash_tree_node' and
13525 `java_hash_compare_tree_node'.
13526 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13527 (java_hash_compare_tree_node): Likewise.
13528 * parse.y (find_applicable_accessible_methods_list): Create,
13529 delete and use a hash table to remember already searched interfaces.
13530
13531 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
13532
13533 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13534 with latest entry.
13535
13536 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13537
13538 * boehm.c (mark_reference_fields, set_bit): Prototype.
13539 (set_bit): Un-ANSI-fy definition.
13540
13541 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13542 Prototype.
13543
13544 * decl.c (emit_init_test_initialization): Likewise.
13545
13546 * gjavah.c (jni_print_char): Likewise.
13547
13548 * parse.y (create_new_parser_context): Likewise.
13549
13550 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
13551
13552 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13553 patch missing hunk. Fixed indentation.
13554
13555 2000-03-30 Tom Tromey <tromey@cygnus.com>
13556
13557 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13558 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13559
13560 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13561
13562 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13563 when negative *before* using it as an array index.
13564 * ChangeLog: Fixed typo.
13565
13566 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13567
13568 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13569 to 0 when it reaches -1.
13570
13571 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13572
13573 * jcf-parse.c (get_constant): Properly cast `num' during the
13574 invocation of `add_double'.
13575 * jcf-write.c (push_long_const): Properly cast `lo' before
13576 comparing it to short bounds.
13577 * parse-scan.y (interface_declaration:): Rule re-arrange so that
13578 `interface_body:' is reduced after the current interface is
13579 pushed.
13580
13581 2000-03-26 Tom Tromey <tromey@cygnus.com>
13582
13583 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13584 Java-specific `-f' option.
13585
13586 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13587
13588 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13589 Adjust order of making types.
13590 Make bitsize_*_node values.
13591
13592 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13593
13594 * class.c (make_field_value): Use byte_position.
13595 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13596 (java_array_data_offset): Likewise.
13597 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13598 bzero call.
13599
13600 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13601
13602 * parse.y (check_abstract_method_definitions): New local
13603 `end_type_reached'. Make sure we also consider `end_type'.
13604 (java_check_abstract_method_definitions): Make sure we eventually
13605 consider `java.lang.Object'.
13606 (maybe_use_access_method): Don't use access method if not in the
13607 context of a pure inner class or if the method's context is right.
13608 (find_applicable_accessible_methods_list): New static flag
13609 `object_done'. Don't search abstract classes as interfaces. Fixed
13610 indentation. Fixed the `java.lang.Object' only search. Search
13611 class interface(s) first, then fully search enclosing contexts.
13612 (find_most_specific_methods_list): Pick the closest candidate when
13613 they're all abstract.
13614
13615 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13616
13617 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13618 properly initialize `finished_label'. Don't emit gotos for empty
13619 try statements.
13620
13621 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13622
13623 * except.c (emit_handlers): Clear catch_clauses_last.
13624
13625 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13626
13627 * parse.y (check_method_types_complete): New function.
13628 (create_class): Reset anonymous class counter only when seeing an
13629 non inner classe.
13630 (java_complete_class): JDEP_METHOD: Don't recompute signature
13631 if incomplete.
13632
13633 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13634
13635 * class.c (build_static_ref): Fixed indentation in comment.
13636 * java-tree.def (TRY_EXPR): Fixed typo in name.
13637 (CLASS_LITERAL): Likewise.
13638 * java-tree.h: (TYPE_DOT_CLASS): New macro.
13639 (struct lang_type): New field `dot_class'.
13640 * jcf-write.c (generate_bytecode_insns): Fixed error message.
13641 (generate_classfile): Method `class$' is synthetic.
13642 * parse.y (build_do_class_method): New function.
13643 (build_dot_class_method_invocation): Likewise.
13644 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13645 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13646 (qualify_ambiguous_name): Likewise.
13647 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13648 (build_try_statement): Fixed leading comment.
13649
13650 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13651
13652 * class.c (make_field_value): Properly handle sizes.
13653 (get_dispatch_vector): Use tree_low_cst and host_integerp.
13654 (layout_class_method): Count using trees.
13655 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13656 * expr.c (java_array_data_offset): Use int_bit_position.
13657 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13658 (build_invokevirtual): Use tree_low_cst and do computations with trees.
13659
13660 2000-03-16 Tom Tromey <tromey@cygnus.com>
13661
13662 * lang.c (flag_hash_synchronization): New global.
13663 (lang_f_options): Added `hash-synchronization'.
13664 * lang-options.h: Mention -fhash-synchronization.
13665 * java-tree.h (flag_hash_synchronization): Declare.
13666 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13667 hash table synchronization is disabled.
13668 * decl.c (init_decl_processing): Only push `sync_info' value when
13669 hash table synchronization is disabled.
13670 * class.c (make_class_data): Only push `sync_info' field when hash
13671 table synchronization is disabled. Removed dead code.
13672
13673 2000-03-16 Tom Tromey <tromey@cygnus.com>
13674
13675 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13676
13677 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13678
13679 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13680 classes.
13681 * parse.y (patch_method_invocation): Handle anonymous classes
13682 creation in static context.
13683
13684 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13685
13686 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13687 * parse.y (resolve_qualified_expression_name): Use it.
13688 (patch_method_invocation): Likewise.
13689
13690 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13691
13692 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13693 depending on the type of dependency which dictates what the
13694 current class is.
13695 (unresolved_type_p): Resolved types limited to the current class.
13696
13697 2000-03-15 Tom Tromey <tromey@cygnus.com>
13698
13699 * decl.c (init_decl_processing): Set type of `sync_info' to be
13700 pointer to Object.
13701
13702 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13703 Correctly compute bit number for current slot. Zero `high' and
13704 `low' in DS_LENGTH case. Don't skip inherited fields. Use
13705 mark_reference_fields.
13706 (mark_reference_fields): New function.
13707
13708 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13709
13710 * parse.y (register_incomplete_type): Fixed initialization of
13711 JDEP_ENCLOSING.
13712
13713 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13714
13715 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13716 static globals.
13717 (push_class_context, pop_class_context): New function.
13718 (class_body:): Call pop_class_context.
13719 (interface_body:): Likewise.
13720 (INNER_QUALIFIER): New macro.
13721 (report_class_declaration): Changed output format and use
13722 INNER_QUALIFIER. Call push_class_context.
13723
13724 2000-02-14 Andrew Haley <aph@cygnus.com>
13725
13726 * check-init.c (check_init): Add new cases for unary and binary
13727 tree nodes.
13728
13729 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13730
13731 * parse.y (resolve_package): Set `next' once a type name has been
13732 progressively discovered.
13733 (resolve_qualified_expression_name): Propagate resolution only if
13734 there are remaining qualifiers. Take into account `q' might have
13735 been cleared after re-qualification.
13736 * parse.y (patch_method_invocation): New local `resolved'.
13737 Section dealing with qualified expression rewritten to use
13738 resolve_field_access.
13739
13740 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13741
13742 * parse.h (PUSH_CPC): Fixed indentation.
13743 (DEBUG_CPC): New macro.
13744 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13745 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13746 * parse.y (class_body_declaration:): Use
13747 SET_CPC_INSTANCE_INITIALIZER_STMT.
13748 (method_declaration:): Check for null current_function_decl.
13749 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13750 (java_parser_context_pop_initialized_field): Better handling of
13751 empty lists.
13752 (maybe_make_nested_class_name): Mark nested class name as
13753 qualified when necessary.
13754 (end_class_declaration): Don't call java_parse_context_resume when
13755 one or more error occurred.
13756 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13757 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13758 SET_CPC_INITIALIZER_STMT.
13759 (method_header): Check for inner classes declaring static methods.
13760 (resolve_qualified_expression_name): Handle situation where `this'
13761 is implied.
13762
13763 2000-03-13 Hans Boehm <boehm@acm.org>
13764
13765 * typeck.c (build_prim_array_type): Correctly set the high word too.
13766
13767 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13768
13769 * parse.y (java_complete_expand_methods): Leave <clinit> out of
13770 ordinary methods.
13771 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13772 list of methods for interfaces.
13773
13774 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13775
13776 * parse.y (qualify_ambiguous_name): Properly handle expressions
13777 using `null'.
13778
13779 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13780
13781 * parse.y (check_final_assignment): Extended to process
13782 COMPOUND_EXPR.
13783 (patch_assignment): Have check_final_assignment called only once.
13784
13785 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13786
13787 * java-tree.h (IS_INIT_CHECKED): New flag.
13788 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13789 * parse.y (patch_string): Call force_evaluation_order on the
13790 completed string concatenation tree.
13791 * expr.c (force_evaluation_order): Call force_evaluation_order on
13792 function's arguments too.
13793
13794 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13795
13796 * decl.c (emit_init_test_initialization): Mark KEY as unused.
13797 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13798 (build_anewarray): Likewise.
13799 * parse.y (patch_newarray): Likewise.
13800 * parse.c: Regenerated.
13801
13802 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
13803
13804 * decl.c (init_decl_processing): Added new class fields `depth',
13805 `ancestors', and `idt' to class_type_node. Use
13806 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13807 * class.c (make_class_data): Push initial values for new fields.
13808 * java-tree.h: Updated prototype for `build_invokeinterface'.
13809 * expr.c (build_invokeinterface): Changed parameters to accept
13810 `method' tree. Calculate index of `method' in its declaring
13811 interface. Build call to _Jv_LookupInterfaceMethodIdx.
13812 (expand_invoke): Call `build_invokeinterface' with new parameters.
13813 * parse.y (patch_invoke): Call `build_invokeinterface' with new
13814 parameters.
13815
13816 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
13817
13818 * typeck.c (lookup_do): Search superinterfaces first
13819 when looking up an interface method. From Godmar Back
13820 <gback@cs.utah.edu>
13821
13822 2000-03-06 Tom Tromey <tromey@cygnus.com>
13823
13824 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13825
13826 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13827
13828 * java-tree.h (lookup_argument_method2): Declared.
13829 (safe_layout_class): Prototype moved from parse.h.
13830 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13831 * parse.y (java_check_regular_methods): Local `super_class' gone.
13832 Call lookup_argument_method2 instead of lookup_argument_method.
13833 Perform modifier match for methods found declared in implemented
13834 interfaces. Fixed indentation problem. Overriding/hiding error
13835 report to take place only for methods found in classes.
13836 * typeck.c (lookup_argument_method): Changed leading
13837 comment. Re-written by calling lookup_do.
13838 (lookup_argument_method2): New function.
13839 (lookup_java_method): Re-written by calling lookup_do.
13840 (lookup_do): New function.
13841
13842 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13843
13844 * check-init.c (check_init): Removed dead code. Handle (blank)
13845 final variables.
13846 * parse.y (declare_local_variables): New local `final_p', set it
13847 and use it to initialize LOCAL_FINAL.
13848 (check_final_assignment): Only check FIELD_DECLs.
13849
13850 2000-02-17 Tom Tromey <tromey@cygnus.com>
13851
13852 * Makefile.in (JAVA_OBJS): Added boehm.o.
13853 (boehm.o): New target.
13854 * Make-lang.in (JAVA_SRCS): Added boehm.c.
13855 * java-tree.h (flag_use_boehm_gc): Declare.
13856 (get_boehm_type_descriptor): Declare.
13857 * lang.c (lang_f_options): Added `use-boehm-gc'.
13858 (flag_use_boehm_gc): New global.
13859 * lang-options.h: Added -fuse-boehm-gc.
13860 * boehm.c: New file.
13861 * class.c (get_dispatch_table): If class uses a Boehm type
13862 descriptor, put it in the vtable.
13863 (make_class_data): Removed dead code.
13864
13865 2000-03-03 Per Bothner <per@bothner.com>
13866
13867 * decl.c (init_decl_processing): Initialize sizetype properly.
13868
13869 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13870
13871 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
13872 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
13873 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13874 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
13875 (jcf_parse): New local `current'. Load innerclasses seen in outer
13876 context being processed.
13877 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13878 * jcf-write.c (append_innerclasses_attribute): New function.
13879 (append_innerclasses_attribute_entry): Likewise.
13880 (get_access_flags): Handle static classes. Set anonymous and local
13881 classes to be private.
13882 (generate_classfile): Attribute count adjusted. Call
13883 append_innerclasses_attribute.
13884 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
13885 PURE_INNER_CLASS_TYPE_P.
13886 * parse.y (parser_qualified_classname): New parameter `is_static',
13887 produce non qualified name accordingly.
13888 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
13889 (create_interface): Added argument to parser_qualified_classname.
13890 (create_class): Added argument to parser_qualified_classname. Setup
13891 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
13892 (add_inner_class_fields): Fixed indentation.
13893 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
13894 (method_declarator): Fixed typo in comment.
13895 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
13896 (build_current_thisn): Likewise.
13897 (patch_method_invocation): Likewise.
13898
13899 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
13900
13901 * decl.c (current_function_decl): Move to toplev.c.
13902
13903 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13904
13905 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
13906 (DECL_BIT_INDEX): Use underlying representation.
13907 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
13908
13909 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13910
13911 * expr.c (build_java_ret): Pass proper type to size_binop.
13912
13913 2000-02-25 Anthony Green <green@cygnus.com>
13914
13915 * expr.c (build_class_init): Mark the decl to be ignored by
13916 check_init.
13917 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
13918 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
13919 * class.c (init_test_hash_newfunc): New function.
13920 (decl_hash): New function.
13921 (decl_compare): New function.
13922 * decl.c (emit_init_test_initialization): New function.
13923 (complete_start_java_method): Traverse the init test hashtable,
13924 calling emit_init_test_initialization.
13925 (always_initialize_class_p): Define.
13926 * expr.c (build_class_init): Use initialization tests when
13927 emitting class initialization code.
13928 (always_initialize_class_p): Declare.
13929 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13930 1.
13931 * java-tree.h: Include hash.h.
13932 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13933 (struct lang_decl): Add init_test_table field.
13934 (init_test_hash_entry): Define.
13935
13936 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13937
13938 * gjavah.c (main): Avoid using `argi' to report unimplemented
13939 options.
13940
13941 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13942
13943 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13944 initialize locals to avoid warnings. Local `exception_type' moved
13945 into if statement.
13946
13947 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13948
13949 * parse.y (resolve_expression_name): Use `orig' as a second
13950 argument to resolve_field_access.
13951 (resolve_field_access): Removed unnecessary code when dealing with
13952 static fields.
13953
13954 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13955
13956 * class.c (push_super_field): Don't push the field twice.
13957 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13958 * parse.h (java_reorder_fields): Prototyped.
13959 * parse.y (java_reorder_fields): New function.
13960 (java_layout_class): Simplified not to worry about re-ordering.
13961
13962 2000-02-23 Tom Tromey <tromey@cygnus.com>
13963
13964 * gjavah.c (print_name): In JNI case, correctly quote string.
13965 (print_method_info): Don't handle overrides in JNI mode.
13966
13967 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13968
13969 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13970 value type set to `boolean_type_node'.
13971
13972 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
13973
13974 * jcf-dump.c (main): Test for correct condition after
13975 output file creation.
13976
13977 2000-02-19 Anthony Green <green@cygnus.com>
13978
13979 * jcf-depend.c (add_entry): Fix test for first list entry.
13980
13981 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13982
13983 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13984 * constants.c (build_constants_constructor): Likewise.
13985
13986 2000-02-19 Anthony Green <green@cygnus.com>
13987
13988 * jcf-depend.c (add_entry): Add entries to the end of the list.
13989
13990 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
13991
13992 * decl.c (INT_TYPE_SIZE): Define if necessary.
13993 (expand_java_return): Handle the case of a native integer smaller
13994 than a JVM integer.
13995
13996 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
13997
13998 * gjavah.c (help): Use GCCBUGURL.
13999 * jv-scan.c (help): Likewise.
14000 * jcf-dump.c (help): Likewise.
14001
14002 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14003
14004 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14005 `finally' clauses.
14006
14007 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14008
14009 * jcf-parse.c (load_class): Call `fatal' if no file containing
14010 the target class are found.
14011
14012 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14013
14014 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14015 lex.c, lex.h, and PARSE_H to...
14016 (parse.o, parse-scan.o): ...here, respectively.
14017
14018 * lex.c: Split out code that may trigger SIGFPE from yylex()
14019 to its own function.
14020 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14021
14022 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14023
14024 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14025
14026 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14027
14028 * parse.y (outer_field_access_p): Stop in time when outer contexts
14029 are exhausted.
14030 (resolve_qualified_expression_name): Properly qualify *everything*
14031 after a package.type to be resoled as expression names.
14032 (find_applicable_accessible_methods_list): Save/restore `class' to
14033 isolate it from a possible outer context search.
14034
14035 2000-02-15 Tom Tromey <tromey@cygnus.com>
14036
14037 * gjavah.c (jni_print_char): New function.
14038 (print_full_cxx_name): Use it.
14039 (decode_signature_piece): Likewise.
14040 (print_cxx_classname): Likewise.
14041
14042 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14043
14044 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14045 version.o.
14046 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14047
14048 * gjavah.c: Include version.h.
14049
14050 * jcf-dump.c: Likewise.
14051
14052 * jv-scan.c: Likewise.
14053
14054 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14055
14056 * parse.y (outer_field_access_fix): First parameter now a tree
14057 node. Check for assignment to final. First argument to
14058 build_outer_field_access_fix modified to accommodate prototype.
14059 (build_outer_field_access): Don't check for assignment to final
14060 here.
14061 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14062 possibly returned by outer_field_access_fix. Changed
14063 outer_field_access_fix's first argument.
14064 (check_final_assignment): $finit$'s context is OK.
14065 (patch_unaryop): Use node instead of its line/column value when
14066 calling outer_field_access_fix.
14067
14068 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14069
14070 * parse.y (interface_declaration:): No longer tagged
14071 <node>. Re-installed default action.
14072 (class_member_declaration:): Handle inner interfaces.
14073 (interface_member_declaration): Handle inner interfaces and
14074 classes.
14075 (create_interface): Push error if one seen. Suspend parsing
14076 context when processing an inner interface.
14077 (register_fields): Inner class static field limitations not to
14078 apply to inner interfaces.
14079
14080 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14081
14082 * jcf-parse.c (load_class): Update `java_error_count' when a
14083 class' file can't be found.
14084 (parse.y): Avoid (byte)code generation when errors seen.
14085
14086 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14087
14088 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14089 decodes a valid node.
14090 (patch_binop): Handle TRUNC_DIV_EXPR.
14091
14092 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14093
14094 * parse.y (resolve_package): New local `acc'. Try to progressively
14095 build and guess a package and type name.
14096
14097 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14098
14099 * parse.y (find_applicable_accessible_methods_list): Load and
14100 layout the search class if necessary.
14101 (java_complete_tree): Keep to original type of the folded initial
14102 value.
14103
14104 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14105
14106 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14107 Generate error message if circularity is detected. New static
14108 local `list'.
14109 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14110 * jcf-write.c (generate_bytecode_insns): Very simply handle
14111 SAVE_EXPR.
14112 * parse.y (java_check_circular_reference): Use
14113 `cyclic_inheritance_report' during report, if necessary.
14114 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14115 walking NEW_ARRAY_INIT twice.
14116
14117 2000-02-09 Tom Tromey <tromey@cygnus.com>
14118
14119 * parse.y (check_class_interface_creation): Allow inner classes to
14120 be `private' or `protected', check modifiers' consistency. Prevent
14121 block local classes from bearing any modifiers.
14122
14123 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14124
14125 * except.c (check_start_handlers): Re-add prototype lost in last
14126 patch.
14127 (maybe_start_try): Remove excess argument to `check_start_handlers'.
14128
14129 2000-02-09 Andrew Haley <aph@cygnus.com>
14130
14131 * decl.c (clear_binding_level): Remove excess initializer.
14132 (maybe_poplevels): Remove unused variable.
14133 (force_poplevels): Ditto.
14134 (struct binding_level): Add comment.
14135
14136 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14137
14138 * jcf-write.c (generate_classfile): Don't consider
14139 pre-initialization with reference value (use <clinit> instead.)
14140 * parse.y (java_fix_constructors): No generated constructor for
14141 interfaces.
14142 (build_outer_field_access): Removed debug message.
14143 (outer_field_expanded_access_p): Adapted to bytecode generation.
14144 (build_outer_field_access_method): Use fix_method_argument_names.
14145 (build_outer_method_access_method): Fixed indentation. Added
14146 comment. Handle access method generation for static and also void
14147 methods.
14148 (build_access_to_thisn): Inserted debug message.
14149 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14150 (resolve_qualified_expression_name): Fixed comment.
14151 (not_accessible_p): Adapted to bytecode generation. Added comment.
14152 (patch_method_invocation): Added comment.
14153 (maybe_use_access_method): Fixed leading comment. Handle static
14154 methods.
14155 (java_complete_lhs): Don't shortcut handling of initialized upon
14156 declaration String type static fields when generating bytecode.
14157 (patch_unaryop): Handle outer field access when generating
14158 bytecode.
14159
14160 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14161
14162 * java-tree.h (FIELD_THISN): New macro.
14163 * jcf-write.c (append_synthetic_attribute): New function.
14164 (generate_classfile): Set "Synthetic" attribute on this$<n>,
14165 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14166 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14167 this$<n> fields.
14168 (build_outer_field_access): Turned on access functions usage and
14169 generation when compiling to bytecode.
14170 (maybe_use_access_method): Likewise.
14171
14172 2000-01-25 Andrew Haley <aph@cygnus.com>
14173
14174 * java-except.h (struct eh_range): Add `expanded' field.
14175 (maybe_start_try): Add end_pc arg.
14176 (maybe_end_try): Ditto.
14177 * java-tree.h (force_poplevels): new function.
14178 * expr.c (expand_byte_code): Don't call maybe_start_try or
14179 maybe_end_try.
14180 * except.c (add_handler): Reset expanded.
14181 (expand_start_java_handler): Set expanded.
14182 (check_start_handlers): Don't expand a start handler that's
14183 already been expanded.
14184 (maybe_start_try): Add end_pc arg. Only expand a handler which
14185 ends after end_pc.
14186 (expand_end_java_handler): call force_poplevels.
14187 (force_poplevels): new function.
14188 * decl.c (binding_level): Add start_pc of binding level.
14189 (maybe_pushlevels): Call maybe_start_try when pushing binding
14190 levels.
14191 (maybe_poplevels): Call maybe_end_try when popping binding levels.
14192 (LARGEST_PC): Define.
14193 (clear_binding_level): Use LARGEST_PC.
14194
14195 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14196 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14197 (binding_depth, is_class_level, current_pc): new variables.
14198 (struct binding_level): ditto.
14199 (indent): new function.
14200 (push_jvm_slot): add debugging info.
14201 (maybe_pushlevels): ditto.
14202 (maybe_poplevels): ditto.
14203 (pushlevel): ditto.
14204 (poplevel): ditto.
14205 (start_java_method): ditto.
14206 (give_name_to_locals): comment only.
14207 * except.c (binding_depth, is_class_level, current_pc):
14208 new variables.
14209 (expand_start_java_handler): add debugging info.
14210 (expand_end_java_handler): ditto.
14211
14212 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14213
14214 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14215 (print_name_for_stub_or_jni, process_file): Constify a char*.
14216
14217 2000-02-03 Tom Tromey <tromey@cygnus.com>
14218
14219 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14220
14221 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14222
14223 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14224 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14225 defined to be 1.
14226
14227 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14228
14229 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14230 * java-tree.h (TYPE_II_STMT_LIST): New macro.
14231 (struct lang_type): New field `ii_block'.
14232 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14233 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14234 * parse.h (struct parser_ctxt): New field `instance_initializers'.
14235 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14236 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14237 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14238 macros.
14239 * parse.y (add_instance_initializer): New function.
14240 (in_instance_initializer): New static global.
14241 (class_body_declaration:): Link instance initializer block.
14242 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14243 (array_creation_expression:): Remove unused local.
14244 (java_parser_context_push_initialized_field): Fixed leading
14245 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14246 CPC_INSTANCE_INITIALIZER_LIST.
14247 (java_parser_context_pop_initialized_field): Likewise.
14248 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14249 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14250 CPC_INITIALIZER_STMT.
14251 (fix_constructors): New local `class_type'. Use it. Call
14252 add_instance_initializer.
14253 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14254 (patch_return): Forbid return in instance initializers.
14255 (patch_throw_statement): Enforce exception handling in the context
14256 of instance initializers.
14257
14258 2000-02-03 Tom Tromey <tromey@cygnus.com>
14259
14260 * Make-lang.in (java.mostlyclean): Remove executables in
14261 `mostlyclean'.
14262
14263 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14264
14265 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14266 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14267 (java_float_finite): Convert to use union Word from javaop.h.
14268 (java_double_finite): Convert to use union DWord from javaop.h.
14269
14270 2000-02-02 Tom Tromey <tromey@cygnus.com>
14271
14272 * gjavah.c (options): Added `jni' entry.
14273 (help): Document -jni.
14274 (flag_jni): New global.
14275 (process_file): Handle JNI output. Don't print text from
14276 -prepend, -add, etc, when generating stubs. Only remove `.class'
14277 suffix if it actually exists.
14278 (main): Create a `.c' file when run with `--jni --stubs'. Create
14279 correct output file name with `--jni'.
14280 (print_include): Mangle header name differently in JNI case.
14281 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14282 method list.
14283 (print_method_info): Handle JNI case. Put signature info into
14284 method name. Handle case when STREAM is NULL.
14285 (print_name_for_stub_or_jni): New function.
14286 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
14287 (print_cxx_classname): Handle JNI.
14288 (print_full_cxx_name): Likewise.
14289 (decode_signature_piece): Likewise.
14290 (overloaded_jni_method_exists_p): New function.
14291 (struct method_name): Added `signature' and `sig_length' fields.
14292 (HANDLE_END_FIELD): Do nothing in JNI mode.
14293
14294 2000-02-02 Tom Tromey <tromey@cygnus.com>
14295
14296 * jv-scan.c: Include version.c, <getopt.h>.
14297 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14298 (options): New array.
14299 (usage): New function.
14300 (version): New function.
14301 (main): Use getopt_long to parse command line.
14302 * jcf-dump.c: Include version.c, <getopt.h>.
14303 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14304 OPT_JAVAP): New macros.
14305 (options): New array.
14306 (usage): Return `void'. Changed message.
14307 (help): New function.
14308 (version): New function.
14309 (main): Use getopt_long_only to parse command line.
14310 * gjavah.c: Include <getopt.h>.
14311 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14312 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14313 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14314 (options): New array.
14315 (java_no_argument): Removed.
14316 (help): Updated with missing options.
14317 (main): Use getopt_long_only to parse command line.
14318 (usage): Changed message.
14319
14320 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14321
14322 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14323 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14324 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14325 * parse.y (array_creation_expression:): Handle anonymous arrays.
14326 (build_array_from_name): Don't set `ret_name' if null.
14327 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14328 (qualify_ambiguous_name): Likewise.
14329 (java_complete_expand_class): Likewise.
14330
14331 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14332
14333 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14334 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14335 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14336 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14337 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14338 AIPL_FUNCTION_COMPLETED_INVOCATION.
14339 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14340 AIPL_FUNCTION_INVOCATION_READY.
14341 (AIPL_FUNCTION_DECLARATION): New enum entry.
14342 * parse.y (reorder_static_initialized): New function.
14343 (java_parser_context_pop_initialized_field): Use it.
14344 (add_inner_class_fields): Use
14345 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14346 augmented. Install marker after last alias initializer, if any.
14347 (generate_finit): Fixed typo. Don't try to retain only the used
14348 fields.
14349 (method_header): Compute and set DECL_FUNCTION_NAP.
14350 (method_declarator): Fixed comment. Insert alias initializer in
14351 parameter list.
14352 (build_alias_initializer_parameter_list): Fixed leading
14353 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14354 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14355 (java_complete_expand_class): Code to retain only used aliases
14356 removed.
14357 (java_complete_expand_methods): New local `first_decl'. Generate
14358 $finit$ first, then expand the constructors, regular methods and
14359 <clinit>.
14360 (java_complete_expand_method): Don't report error on missing
14361 return statement if previously detected bogus.
14362 (fix_constructors): Don't patch constructor parameters list.
14363 (patch_method_invocation): Use new AIPL enum values. Reverse
14364 alias initializer list for anonymous classes.
14365
14366 2000-01-30 Anthony Green <green@redhat.com>
14367
14368 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14369 determine how many stack slots to pop.
14370
14371 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14372
14373 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14374 error handling/recovery.
14375 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14376
14377 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14378
14379 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14380 FIELD_LOCAL_ALIAS_USED): New macros.
14381 (DECL_FUNCTION_NAP): New macro.
14382 (struct lang_decl): New field `nap'.
14383 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14384 (struct lang_type): New fields `finit_stmt_list' and
14385 `clinit_stmt_list'.
14386 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14387 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14388 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14389 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14390 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14391 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14392 (BUILD_THROW): Macro line separator re-indented.
14393 * parse.y (end_class_declaration): New function.
14394 (maybe_generate_pre_expand_clinit): New name for
14395 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14396 pre-expand static fields.
14397 (maybe_generate_clinit): Function deleted.
14398 (check_for_static_method_reference): Prototype's parameter list
14399 indented.
14400 (generate_finit): New name for maybe_generate_finit. Changed
14401 leading comment. Function rewritten to use
14402 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14403 (build_alias_initializer_parameter_list): New function.
14404 (java_parser_context_pop_initialized_field): Likewise.
14405 (add_inner_class_fields): Likewise.
14406 (type_declaration:): Call end_class_declaration.
14407 (class_member_declaration:): Likewise.
14408 (formal_parameter_list:): Fixed typos.
14409 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14410 element. Improved error handling.
14411 (block_statement:): Call end_class_declaration.
14412 (anonymous_class_creation:): Likewise.
14413 (create_anonymous_class): Fixed comments.
14414 (create_class): Call add_inner_class_fields.
14415 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14416 (method_header): Use MARK_FINAL_PARMS.
14417 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14418 (method_declarator): Propagate final argument flag.
14419 (craft_constructor): New local `artificial'. Call
14420 build_alias_initializer_parameter_list. Use
14421 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14422 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14423 necessary.
14424 (complete_expand_class): Get rid of unused outer context local
14425 alias fields.
14426 (java_complete_expand_methods): Fixed leading
14427 comment. Generate/pre-expand <clinit> first. Changed method
14428 expansion order to regular, $finit$, constructors, <clinit>.
14429 (java_complete_expand_method): Set current_function_decl.
14430 (fix_constructors): Fix constructor parameter list to account for
14431 outer context local alias initializers.
14432 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14433 (resolve_expression_name): Lookup outer context local aliases. New
14434 local `access', use it.
14435 (patch_method_invocation): Patch inner class ctor invocation with
14436 outer context local aliases initialization values. $finit$
14437 invocation patching now includes things generated with
14438 build_alias_initializer_parameter_list.
14439 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14440 (build_super_invocation): Likewise.
14441 (patch_assignment): Changed comment.
14442
14443 2000-01-27 Andrew Haley <aph@cygnus.com>
14444
14445 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14446 (emit_if): Ditto.
14447 (emit_jsr): Ditto.
14448
14449 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14450
14451 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14452 concatenation.
14453 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14454
14455 * parse.y (register_fields): Don't pass a format specifier to
14456 OBSOLETE_MODIFIER_WARNING.
14457 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14458 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14459 specifier.
14460 (check_modifiers): Change function into a macro.
14461 (check_class_interface_creation): Pass a literal format string.
14462
14463 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14464
14465 * buffer.h: PROTO -> PARAMS.
14466 * check-init.c: Likewise.
14467 * class.c: Likewise.
14468 * constants.c: Likewise.
14469 * convert.h: Likewise.
14470 * decl.c: Likewise.
14471 * except.c: Likewise.
14472 * expr.c: Likewise.
14473 * gjavah.c: Likewise.
14474 * java-except.h: Likewise.
14475 * java-tree.h: Likewise.
14476 * jcf-depend.c: Likewise.
14477 * jcf-dump.c: Likewise.
14478 * jcf-parse.c: Likewise.
14479 * jcf-path.c: Likewise.
14480 * jcf-reader.c: Likewise.
14481 * jcf-write.c: Likewise.
14482 * jcf.h: Likewise.
14483 * jv-scan.c: Likewise.
14484 * jvgenmain.c: Likewise.
14485 * jvspec.c: Likewise.
14486 * lang.c: Likewise.
14487 * lex.c: Likewise.
14488 * lex.h: Likewise.
14489 * parse-scan.y: Likewise.
14490 * parse.h: Likewise.
14491 * parse.y: Likewise.
14492 * typeck.c: Likewise.
14493 * verify.c: Likewise.
14494 * xref.c: Likewise.
14495 * xref.h: Likewise.
14496 * zextract.c: Likewise.
14497 * zipfile.h: Likewise.
14498
14499 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14500
14501 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14502 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14503 * constants.c (build_constant_data_ref): Check for cached
14504 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14505 in TYPE_CPOOL_DATE_REF.
14506 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14507 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14508 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14509 (LOCAL_FINAL): New macro.
14510 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14511 constant pool -- don't try to reuse.
14512 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14513 TYPE_LANG_SPECIFIC.
14514 (find_in_current_zip): Use TYPE_JCF.
14515 * parse.h (java_check_final): Prototype removed.
14516 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14517 (maybe_create_class_interface_decl,
14518 check_class_interface_creation): Likewise.
14519 (java_expand_finals): Function removed.
14520 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14521 (block_statement:): Fixed comment.
14522 (anonymous_class_creation:): Likewise.
14523 (check_class_interface_creation): Reversed Jan 12, 2000 extra
14524 argument patch.
14525 (check_class_interface_creation): Loosened error report on (inner)
14526 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14527 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14528 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14529 argument patch.
14530 (create_interface): Likewise.
14531 (anonymous_class_counter): New static global.
14532 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14533 patch. Fixed comments.
14534 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14535 anonymous_class_counter when declaring a toplevel class.
14536 (craft_constructor): Fixed constructor name when handling
14537 anonymous classes. Anonymous class constructors to feature hidden
14538 this$<n> parameter.
14539 (java_fix_constructors): Added comment.
14540 (java_check_final): Function removed.
14541 (java_complete_expand_methods): Fixed comment. Don't generate
14542 class data, save its outgoing constant pool instead.
14543 (verify_constructor_super): Skip anonymous class constructor
14544 hidden this$<n> parameter.
14545 (java_expand_classes): New local `saved_ctxp'. Removed call to
14546 java_expand_finals and java_check_final. Expand anonymous class
14547 constructors. Generate class data.
14548 (build_super_invocation): Skip anonymous class hidden this$<n>
14549 parameter.
14550 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14551 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14552 (set_java_signature): Likewise.
14553
14554 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14555
14556 * gjavah.c: Delete ACC_VISIBILITY define.
14557 * jcf.h: Add ACC_VISIBILITY define.
14558 * parse.y: final: rule tagged <value>.
14559 (java_check_regular_methods): Use ACC_VISIBILITY define for
14560 default package access check.
14561 (local_variable_declaration_statement): Use final: rule.
14562
14563 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14564
14565 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14566 (final:): New rule.
14567
14568 2000-01-17 Tom Tromey <tromey@cygnus.com>
14569
14570 * gjavah.c (print_field_info): Allow non-static final fields.
14571
14572 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14573
14574 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14575 * parse.y (patch_anonymous_class): New function.
14576 (create_anonymous_class): Register incomplete type when the
14577 class/interface to extends/implement isn't known yet.
14578 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14579 (verify_constructor_super): Tuned error message.
14580
14581 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14582
14583 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14584 (ANONYMOUS_CLASS_P): New macro.
14585 (TYPE_SIGNATURE, TYPE_JCF): New macros.
14586 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14587 * parse.y (create_class): Added leading argument.
14588 (maybe_create_class_interface_decl,
14589 check_class_interface_creation): Likewise.
14590 (craft_constructor): New function.
14591 (verify_constructor_super): Added argument in prototype.
14592 (class_declaration:): Inserted leading argument.
14593 (for_begin:): Use FOR_LOOP_P.
14594 (anonymous_class_creation): Create WFL of the anonymous class to
14595 instantiate. Call build_new_invocation. Added comments.
14596 (check_class_interface_creation): Handle parameter `anonymous' in
14597 verbose mode class creation announce.
14598 (link_nested_class_to_enclosing): Exclude anonymous classes.
14599 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14600 anonymous class, even though they appear to have an enclosing
14601 context.
14602 (create_interface): Pass extra argument to
14603 check_class_interface_creation.
14604 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14605 (create_class): Call check_class_interface_creation and
14606 maybe_create_class_interface_decl with extra new argument. Don't
14607 add private this$<n> to anonymous classes.
14608 (method_declarator): Insert hidden this$<n> to anonymous class
14609 constructors.
14610 (java_fix_constructors): Deleted code creating default
14611 constructor. Call craft_constructor instead.
14612 (java_check_regular_methods): Set `saw_constructor' to 1 for
14613 anonymous classes.
14614 (fix_constructors): Pass extra argument to verify_constructor_super.
14615 (verify_constructor_super): New local `sdecl', use it. Search for
14616 matching constructor (possibly featuring arguments) in super
14617 class.
14618 (lookup_method_invoke): Craft constructor according to arguments
14619 list when dealing with anonymous class constructors.
14620 (build_super_invocation): Pass arguments to anonymous class super
14621 constructors.
14622 (search_loop): Use FOR_LOOP_P.
14623 (labeled_block_contains_loop_p): Likewise.
14624
14625 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14626
14627 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14628 (enclosing_context_p): New function.
14629 (get_access_flags_from_decl): Handle CLASS_STATIC.
14630 (maybe_layout_super_class): Extra first argument passed to
14631 do_resolve_class.
14632 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14633 ID_INIT_P.
14634 * decl.c (access0_identifier_node): New global.
14635 (init_decl_processing): access0_identifier_node initialized.
14636 (pushdecl): Set DECL_CONTEXT only on non type decls.
14637 * expr.c (lookup_field): Lookup inner class fields in enclosing
14638 contexts.
14639 (expand_invoke): Use ID_INIT_P.
14640 (expand_java_field_op): Use DECL_CLINIT_P.
14641 * java-tree.def (CLASS_LITERAL): New tree code.
14642 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14643 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14644 (struct lang_decl): New field `inner_access'.
14645 (enclosing_context_p): Prototyped.
14646 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14647 ID_CLINIT_P): New macros.
14648 (CLASS_STATIC): New macro.
14649 (CLASS_ACCESS0_GENERATED_P): New macro.
14650 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14651 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14652 INNER_CLASS_P): New macros.
14653 (DECL_INNER_CLASS_LIST): New macro.
14654 * jcf-parse.c (yyparse): Avoid the use of ANSI string
14655 concatenation.
14656 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14657 the shift value to int. Fixed typo in comment.
14658 * lex.c (inst_id, wpv_id): Initialize.
14659 * mangle.c (unicode_mangling_length): Take `$' into account.
14660 * parse.h (DRECOVER, RECOVER): Terminate properly.
14661 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14662 (typedef struct _jdep): New field `enclosing'.
14663 (JDEP_ENCLOSING): New macro.
14664 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14665 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14666 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14667 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14668 GET_ENCLOSING_CPC_CONTEXT): New macros.
14669 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14670 (do_resolve_class): Added extra argument in prototype.
14671 * parse.y (resolve_class): Added extra argument in prototype.
14672 (maybe_create_class_interface_decl): Likewise.
14673 (maybe_use_access_method, build_wfl_wrap): New functions.
14674 (java_complete_expand_classes, java_complete_expand_class):
14675 Likewise.
14676 (java_parser_context_push_initialized_field,
14677 java_parser_context_suspend, java_parser_context_resume):
14678 Likewise.
14679 (maybe_make_nested_class_name, make_nested_class_name,
14680 set_nested_class_simple_name_value,
14681 link_nested_class_to_enclosing, find_as_inner_class,
14682 find_as_inner_class_do, check_inner_class_redefinition,
14683 build_thisn_assign, build_current_thisn, build_access_to_thisn,
14684 maybe_build_thisn_access_method, build_outer_field_access,
14685 build_outer_field_access_methods, build_outer_field_access_expr,
14686 build_outer_method_access_method, build_new_access_id,
14687 build_outer_field_access_method, outer_field_access_p,
14688 outer_field_expanded_access_p, outer_field_access_fix,
14689 build_incomplete_class_ref, patch_incomplete_class_ref,
14690 create_anonymous_class): Likewise.
14691 (inst_id, wpv_id): New static global variables.
14692 (synchronized:): New rule, tagged <node>.
14693 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14694 rules.
14695 (anonymous_class_creation:): New rule, tagged <node>.
14696 (NEW_TK): Tagged <node>.
14697 (type_literals, array_type_literal): New rules, tagged <node>.
14698 (class_declaration:): Removed action when reducing by class_body:
14699 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14700 using GET_CPC in sub-rules.
14701 (class_member_declaration): Handle inner classes.
14702 (method_declaration): When reducing method_header:, reset
14703 current_function_decl when appropriate.
14704 (method_declarator:): Set the number of formal parameter to 0 for
14705 method declared without arguments.
14706 (constructor_declarator:): Likewise.
14707 (static_initializer:): List of elements kept in a list.
14708 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14709 use of the keyword `static' for type declarations.
14710 (block_statement:): Handle inner class declarations.
14711 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14712 type qualified `this'.
14713 (class_instance_creation_expression): Use anonymous_class_creation:
14714 to handle inner class instances creation. Handle qualified `new'.
14715 (something_dot_new): Added appropriate actions.
14716 (create_new_parser_context): New function.
14717 (java_push_parser_context, java_parser_context_save_global,
14718 java_parser_context_suspend): Use create_new_parser_context.
14719 (check_modifiers): Changed leading comment.
14720 (check_class_interface_creation): Handle interclasses.
14721 (add_superinterfaces): Fixed comment.
14722 (create_interface): Build qualified name from the raw_name instead
14723 of its matching WFL. Push the initialized fields list. raw_name added
14724 as an extra argument to maybe_create_class_interface_decl.
14725 (create_class): Build qualified name from the raw_name instead of
14726 its matching WFL. Removed assignment to current_parsed_class_un.
14727 Call PUSH_ERROR before returning an error. Suspend the current
14728 parser context when processing an inner class. Push the
14729 initialized fields list. raw_name added as an extra argument to
14730 maybe_create_class_interface_decl. Add the private this$<n>
14731 field.
14732 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14733 (register_fields): Get the class type from GET_CPC and handle
14734 previous errors. Added code to handle the creation of static
14735 fields in inner classes. Initialized fields initialization
14736 statements kept in a list of lists.
14737 (maybe_generate_finit): Initialized fields initialization
14738 statements kept in a list of lists. Use GET_CPC.
14739 (maybe_generate_clinit): Likewise.
14740 (method_header): Use GET_CPC and GET_CPC_UN.
14741 (parser_qualified_classname): Handle inner classes.
14742 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14743 (java_fix_constructors): Hide pointer to enclosing context
14744 instance in constructor list when dealing with inner classes.
14745 (jdep_resolve_class): Call resolve_class with extra first argument
14746 JDEP_ENCLOSING.
14747 (resolve_class): Add enclosing context as a first extra argument
14748 to do_resolve_class.
14749 (do_resolve_class): Call find_as_inner_class. Handle WFLs
14750 properly.
14751 (resolve_no_layout): Extra argument added to resolve_class
14752 invocation.
14753 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14754 (java_get_real_method_name): Use GET_CPC_UN.
14755 (check_abstract_method_definitions): Use DECL_CLINIT_P.
14756 (java_check_abstract_methods): Handle static method declared in
14757 inner classes by an error.
14758 (java_check_regular_methods): Use DECL_CLINIT_P.
14759 (source_start_java_method): Also set DECL_MAX_LOCALS.
14760 (create_artificial_method): Call java_parser_context_save_global
14761 and java_parser_context_restore_global instead of saving/restoring
14762 the context by hand.
14763 (expand_start_java_method): Improved verbose mode message.
14764 (java_complete_expand_methods): Fixed leading comment. Use
14765 DECL_CLINIT_P.
14766 (fix_constructors): Added assignment to this$<n> if necessary.
14767 (java_expand_classes): Call java_complete_expand_classes instead
14768 of java_complete_expand_methods.
14769 (make_qualified_primary): Simplified.
14770 (merge_qualified_name): Optimized for missing left or right parts.
14771 (resolve_expression_name): Handle access to outer class fields from
14772 interclasses.
14773 (resolve_qualified_expression_name): New macro
14774 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14775 classes. Report error on non appropriate qualification of
14776 `new'. Handle qualified `this'.
14777 (not_accessible_p): Allow access to outer class private fields from
14778 inner classes.
14779 (patch_method_invocation): Handle method invocations through
14780 access methods and inner class constructor invocations.
14781 (find_applicable_accessible_methods_list): Search enclosing
14782 contexts of an inner class.
14783 (search_applicable_methods_list): Fixed typo.
14784 (argument_types_convertible): Handle inner class constructors'
14785 hidden outer context reference argument.
14786 (qualify_ambiguous_name): Handle qualified `this'.
14787 (java_complete_lhs): Handle use of field accessed through
14788 artificial access methods in various cases of assignments. Handle
14789 CLASS_LITERAL node.
14790 (check_final_assignment): Use DECL_CLINIT_P.
14791 (valid_ref_assignconv_cast_p): Handle the destination being an
14792 enclosing context of the source.
14793 (patch_unaryop): Handle use of field accessed through artificial
14794 access methods.
14795 (patch_return): Use DECL_CLINIT_P.
14796 (patch_throw_statement): Use DECL_CLINIT_P.
14797 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14798 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
14799 ID_INIT_P.
14800
14801 2000-01-16 Anthony Green <green@cygnus.com>
14802
14803 * parse.y (build_string_concatenation): Only use
14804 StringBuffer(String) shortcut if String arg is constant.
14805
14806 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14807
14808 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14809 the shift value to int. Fixed typo in comment.
14810
14811 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
14812
14813 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14814 * jcf-write.c: Likewise.
14815 * parse.y: Likewise.
14816 * parse.c: Regenerate.
14817
14818 2000-01-09 Anthony Green <green@cygnus.com>
14819
14820 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14821 bytecodes in the correct order.
14822
14823 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14824
14825 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14826
14827 2000-01-06 Anthony Green <green@cygnus.com>
14828
14829 * expr.c (java_lang_expand_expr): Switch to permanent obstack
14830 before building constant array decl.
14831
14832 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
14833
14834 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
14835 method invocation and typo in conditional expression.
14836 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
14837 the appropriate NOTE_POP.
14838 * parse.y (patch_binop): Shift value mask to feature the right
14839 type.
14840
14841 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14842
14843 * class.c (assume_compiled, assume_compiled_node): Add static
14844 prototype.
14845 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
14846
14847 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
14848
14849 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
14850
14851 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
14852 to `__modifier' to avoid stringifying it.
14853
14854 * parse.y (verify_constructor_circularity): Don't call a variadic
14855 function with a non-literal format string.
14856 (java_check_abstract_methods): Move unreachable code inside
14857 `continue' statement.
14858 (lookup_method_invoke): Call xstrdup, not strdup.
14859
14860 * expr.c (expand_java_field_op): Avoid the use of ANSI string
14861 concatenation.
14862
14863 * jcf-parse.c (yyparse): Likewise.
14864
14865 * jv-scan.c (main): Likewise.
14866
14867 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14868
14869 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
14870 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14871 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
14872 concatenation.
14873
14874 * parse.y (synchronized, variable_redefinition_error,
14875 check_class_interface_creation, create_interface, create_class,
14876 method_header, finish_method_declaration,
14877 check_modifiers_consistency, method_declarator,
14878 complete_class_report_errors, check_abstract_method_definitions,
14879 java_check_regular_methods, check_throws_clauses,
14880 java_check_abstract_methods, read_import_dir,
14881 check_pkg_class_access, declare_local_variables, fix_constructors,
14882 cut_identifier_in_qualified, resolve_expression_name,
14883 resolve_qualified_expression_name, patch_method_invocation,
14884 java_complete_lhs, patch_assignment, try_builtin_assignconv,
14885 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
14886 patch_exit_expr, patch_exit_expr, patch_switch_statement,
14887 patch_try_statement, patch_synchronized_statement,
14888 patch_throw_statement, check_thrown_exceptions,
14889 patch_conditional_expr): Likewise.
14890
14891 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14892
14893 * Makefile.in (LIBDEPS): Added gcc's errors.o
14894 (../jcf-dump$(exeext):): Link with gcc's errors.o
14895 (../gcjh$(exeext):): Likewise.
14896 * expr.c (expand_java_NEW): Layout the entire target type instead of
14897 laying out its methods only.
14898 (lookup_field): Layout the class after having loaded it.
14899 * java-tree.h (java_debug_context): Declared.
14900 * jcf-io.c (toplev.h): Included.
14901 (find_class): Removed assignment to jcf's outofsynch
14902 field. Force source file to be read if newer than its matching
14903 class file. Tweaked debug messages.
14904 * jcf-parse.c (jcf_out_of_synch): Deleted.
14905 (read_class): Call to jcf_out_of_synch removed.
14906 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
14907 (jcf_out_of_synch): Prototype deleted.
14908 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
14909 `deprecated' and `class_err': integer turned into bit-fields.
14910 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
14911 * parse.y (package_list): New global.
14912 (package_declaration:): Record newly parsed package name.
14913 (extra_ctxp_pushed_p): Static global deleted.
14914 (java_parser_context_save_global): Create buffer context for the
14915 purpose of saving globals, if necessary.
14916 (java_parser_context_restore_global): Pop context pushed for the
14917 purpose of saving globals, if necessary.
14918 (java_debug_context_do): New prototype and function.
14919 (java_debug_context): Likewise.
14920 (do_resolve_class): Use already parsed package names to qualify
14921 and lookup class candidate.
14922 (java_pre_expand_clinit): Removed unnecessary local variable.
14923
14924 1999-12-17 Tom Tromey <tromey@cygnus.com>
14925
14926 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
14927 fixes PR gcj/119.
14928 (process_file): Use `\n\' at end of each line in string.
14929
14930 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14931
14932 * expr.c (expand_invoke): Layout the loaded class before
14933 attempting to use it.
14934 (expand_java_field_op): Allow final field assignments to take
14935 place in $finit$.
14936 * typeck.c (convert): Return error_mark_node if expr is null.
14937
14938 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14939
14940 * class.c (class_depth): Return -1 if the class doesn't load
14941 properly.
14942 * expr.c (can_widen_reference_to): Check for errors during depth
14943 computation and return 0 accordingly.
14944 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14945 create default constructors and add an other error check.
14946 * parse.h (java_fix_constructors): Prototyped.
14947 * parse.y (java_pre_expand_clinit): Likewise.
14948 (build_super_invocation): Re-prototyped to feature one argument.
14949 (java_check_circular_reference): Directly use `current'.
14950 (java_fix_constructors): New function.
14951 (java_check_regular_methods): Don't create default constructors
14952 here, but abort if none were found.
14953 (java_complete_expand_methods): Pre-process <clinit> calling
14954 java_pre_expand_clinit.
14955 (java_pre_expand_clinit): New function.
14956 (fix_constructors): build_super_invocation invoked with the
14957 current method declaration as an argument.
14958 (build_super_invocation): Use the context of the processed method
14959 decl argument instead of current_class.
14960 * typeck.c (lookup_java_method): Take WFLs in method names into
14961 account.
14962
14963 1999-12-14 Per Bothner <per@bothner.com>
14964
14965 * class.c (make_class_data): flag_keep_inline_functions to keep
14966 private methods in the method array.
14967
14968 1999-12-15 Anthony Green <green@cygnus.com>
14969
14970 * check-init.c (check_init): Take into account both types of
14971 `throw's when checking for uninitialized variables.
14972
14973 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14974
14975 * parse.y (java_complete_lhs): Force conversion of array
14976 dimensions to int_type_node, that's what runtime's ABI expects.
14977
14978 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14979
14980 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
14981 operand of a WFL, until the Java front-end gets fixed with regard
14982 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
14983
14984 1999-12-10 Andrew Haley <aph@cygnus.com>
14985
14986 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14987 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14988 expr.c (build_java_athrow): Add support for sjlj-exceptions.
14989 java-tree.h: Ditto.
14990 jcf-write.c: Ditto.
14991
14992 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
14993
14994 * expr.c (java_lang_expand_expr): Switch to permanent obstack
14995 before calling expand_eh_region_start and expand_start_all_catch.
14996 * except.c (expand_start_java_handler): Switch to permanent
14997 obstack before calling expand_eh_region_start.
14998 (expand_end_java_handler): Switch to permanent obstack before
14999 calling expand_start_all_catch.
15000
15001 1999-12-5 Anthony Green <green@cygnus.com>
15002
15003 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15004 function with side effects.
15005 (init_decl_processing): Mark all memory allocating DECLs with
15006 DECL_IS_MALLOC.
15007
15008 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15009
15010 * except.c (expand_end_java_handler): Call
15011 expand_resume_after_catch and end_catch_handler.
15012
15013 1999-11-30 Anthony Green <green@cygnus.com>
15014
15015 * verify.c (verify_jvm_instructions): Create new return label
15016 chain if non existent (don't rely on the verified state of the jsr
15017 target.)
15018
15019 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15020
15021 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15022 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15023
15024 * parse.y (patch_assignment): Removed bogus final class test on
15025 lhs when checking on whether to emit an ArrayStoreException runtime
15026 check.
15027 * expr.c (expand_java_arraystore): Likewise.
15028
15029 1999-11-28 Anthony Green <green@cygnus.com>
15030
15031 * decl.c (find_local_variable): Reuse single slot decls when
15032 appropriate.
15033
15034 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15035
15036 * jcf-parse.c (saw_java_source): Global variable removed.
15037 (read_class): Don't use `saw_java_source'. Added extra braces.
15038 (yyparse): Code setting `saw_java_source' removed.
15039
15040 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15041
15042 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15043
15044 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15045
15046 * verify.c (merge_type_state): Non verified subroutines being
15047 considered more than once to trigger passive type merge.
15048
15049 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15050
15051 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15052 in case of error. Error message tuned.
15053
15054 1999-11-21 Anthony Green <green@cygnus.com>
15055
15056 * constants.c (find_methodref_index): Unwrap method names before
15057 inserting them in the constant pool.
15058
15059 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15060
15061 * class.c (assume_compiled_node): New typedef.
15062 (assume_compiled_tree): New static data.
15063 (find_assume_compiled_node): New function.
15064 (add_assume_compiled): New function.
15065 (assume_compiled): New function.
15066 * class.c (make_class_data): Use assume_compiled.
15067 (is_compiled_class): Use assume_compiled.
15068
15069 * java-tree.h (add_assume_compiled): Declare.
15070
15071 * lang.c (lang_decode_option): Parse new options.
15072
15073 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15074
15075 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15076 int_type_node: that's what `_Jv_AllocObject' expects.
15077
15078 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15079
15080 * parse.y (lookup_method_invoke): Use lang_printable_name to
15081 reliably build the type name during error report. Fixes PR gcj/97.
15082
15083 1999-11-09 Tom Tromey <tromey@cygnus.com>
15084
15085 * jcf-path.c: Include <sys/stat.h>.
15086 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15087 (DIR_UP): New macro.
15088
15089 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15090
15091 * parse.y (source_end_java_method): Resume permanent allocation,
15092 reversing Apr 27 1998 patch.
15093 (patch_string_cst): Pop obstacks after having pushed the permanent
15094 ones.
15095
15096 1999-11-05 Tom Tromey <tromey@cygnus.com>
15097
15098 * class.c (finish_class): Emit inlined methods if any native
15099 methods exist in the class. Fixes PR gcj/85.
15100
15101 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15102
15103 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15104 (qualify_ambiguous_name): Likewise.
15105
15106 1999-11-03 Godmar Back <gback@cs.utah.edu>
15107
15108 * typeck.c: (lookup_java_method): search all inherited
15109 interfaces when looking up interface method.
15110
15111 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15112
15113 * parse.y (method_header:): Issue error message for rule `type
15114 error'.
15115 (synchronized:): Error report when not using synchronized.
15116
15117 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15118
15119 * parse.y (resolve_qualified_expression_name): Prevent `this' from
15120 being used before the superclass constructor has been called.
15121 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15122 instead of `CALL_THIS_CONSTRUCTOR_P'.
15123
15124 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
15125
15126 * check-init.c: Fix typo in comment.
15127
15128 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15129
15130 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15131 and final method.
15132
15133 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15134
15135 * parse.y (expression_statement:): Call function to report
15136 improper invocation of a constructor.
15137 (parse_ctor_invocation_error): New function.
15138
15139 1999-10-26 Mark Mitchell <mark@codesourcery.com>
15140
15141 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15142 remember_end_note.
15143
15144 1999-10-21 Tom Tromey <tromey@cygnus.com>
15145
15146 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15147 in generated `main'.
15148
15149 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15150
15151 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15152 (qualify_ambiguous_name): Likewise.
15153
15154 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15155
15156 * parse.y (java_complete_tree): fold_constant_for_init to work on
15157 permanent_obstack.
15158 (java_complete_lhs): Likewise.
15159 (array_constructor_check_entry): Complete an initializer element
15160 on permanent_obstack.
15161
15162 1999-10-19 Tom Tromey <tromey@cygnus.com>
15163
15164 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15165 From Mike Moreton <mike@pillim.demon.co.uk>.
15166
15167 1999-10-15 Greg McGary <gkm@gnu.org>
15168
15169 * java-tree.h (flag_bounds_check): Remove extern decl.
15170 * lang.c (flag_bounds_check): Remove global variable.
15171 (lang_f_options): Remove "bounds-check" entry.
15172 (lang_init_options): Default flag_bounds_check to "on".
15173
15174 1999-10-14 Tom Tromey <tromey@cygnus.com>
15175
15176 * jvgenmain.c (usage): New function.
15177 (main): Use it. Also, handle `-D' options.
15178 * jvspec.c (lang_specific_driver): Recognize -D.
15179 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15180
15181 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15182
15183 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15184
15185 * jcf-dump.c (print_constant, disassemble_method): Don't call a
15186 variadic function with a non-literal format string.
15187
15188 * parse-scan.y (report_main_declaration): Likewise.
15189
15190 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15191
15192 * parse.y (read_import_dir, patch_assignment, patch_binop,
15193 patch_array_ref): Likewise.
15194
15195 * typeck.c (build_java_array_type): Likewise.
15196
15197 * verify.c (verify_jvm_instructions): Likewise.
15198
15199 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15200
15201 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15202
15203 1999-10-07 Anthony Green <green@cygnus.com>
15204
15205 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15206 where CHECK_PUT may fail for valid reasons.
15207
15208 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15209 UNSAFE_PUTN): New macros.
15210
15211 1999-10-04 Tom Tromey <tromey@cygnus.com>
15212
15213 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15214 well. Fixes Java PR gcj/59.
15215 * parse-scan.y (yyerror): Report errors.
15216
15217 1999-09-24 Glenn Chambers <GChambers@provsol.com>
15218
15219 * decl.c (insert_block): Remove unconditional `abort'.
15220
15221 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
15222
15223 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
15224 FUNCTION_CODE now of type int. All callers changed.
15225 Set the builtin's DECL_BUILT_IN_CLASS.
15226
15227 1999-09-23 Tom Tromey <tromey@cygnus.com>
15228
15229 * jvspec.c (lang_specific_driver): Don't read spec file if
15230 -fsyntax-only given.
15231
15232 1999-09-22 Tom Tromey <tromey@cygnus.com>
15233
15234 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15235
15236 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15237 (WORDS_TO_LONG): Likewise.
15238 (WORDS_TO_DOUBLE): Likewise.
15239
15240 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15241
15242 * jcf-write.c (RELOCATION_VALUE_0): New macro.
15243 (RELOCATION_VALUE_1): Likewise.
15244 (emit_iinc, emit_reloc, push_constant1, push_constant2,
15245 push_in_const, push_long_const): Prototyped.
15246 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15247 (push_constant2): Likewise.
15248 (push_int_const): Cast find_constant1's integer arguments to `jword'.
15249 (find_constant_wide): Cast find_constant2's integer arguments to
15250 `jword'.
15251 (find_constant_index): Cast find_constant2's and find_constant2's
15252 integer arguments to `jword'.
15253 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15254 (emit_switch_reloc): Use RELOCATION_VALUE_0.
15255 (emit_if): Use RELOCATION_VALUE_1.
15256 (emit_goto): Likewise.
15257 (emit_jsr): Likewise.
15258 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15259 argument to push_long_const to HOST_WIDE_INT.
15260
15261 1999-09-15 Andreas Schwab <schwab@suse.de>
15262
15263 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15264
15265 1999-09-20 Nick Clifton <nickc@cygnus.com>
15266
15267 * lang.c (lang_decode_option): Extend comment.
15268
15269 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15270
15271 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15272 instead of fndecl.
15273
15274 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15275
15276 * gjavah.c (get_field_name, print_method_info, print_include,
15277 add_namelet): Use xmalloc, not malloc.
15278
15279 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
15280 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15281 NULL pointer.
15282
15283 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15284
15285 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15286
15287 * jcf-path.c (add_entry): Likewise.
15288
15289 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15290
15291 * jv-scan.c (xmalloc): Remove definition.
15292
15293 * jvgenmain.c (xmalloc): Likewise.
15294
15295 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15296
15297 * lex.c (java_store_unicode): Use xrealloc, not realloc.
15298
15299 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
15300 concat, not xmalloc/sprintf.
15301 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15302 (xstrdup): Remove definition.
15303
15304 * parse.y (duplicate_declaration_error_p,
15305 constructor_circularity_msg, verify_constructor_circularity,
15306 check_abstract_method_definitions, java_check_regular_methods,
15307 java_check_abstract_methods, patch_method_invocation,
15308 check_for_static_method_reference, patch_assignment, patch_binop,
15309 patch_cast, array_constructor_check_entry, patch_return,
15310 patch_conditional_expr): Use xstrdup, not strdup.
15311
15312 * zextract.c (ALLOC): Use xmalloc, not malloc.
15313
15314 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15315
15316 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15317
15318 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
15319 (do_spec, lang_specific_pre_link, lang_specific_driver,
15320 input_filename, input_filename_length): Don't declare.
15321 (main_class_name, jvgenmain_spec, lang_specific_driver):
15322 Constify a char*.
15323 (lang_specific_driver): All calls to the function pointer
15324 parameter now explicitly call `fatal'.
15325
15326 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15327
15328 * parse.y (find_applicable_accessible_methods_list): Search
15329 abstract classes as interfaces.
15330
15331 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15332
15333 * class.c (finish_class): We're now outside a valid method
15334 declaration. Tell the rest of gcc so.
15335
15336 1999-09-08 Bruce Korb autogen@linuxbox.com
15337
15338 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15339
15340 1999-09-07 Tom Tromey <tromey@cygnus.com>
15341
15342 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15343 java-array.h.
15344 (decode_signature_piece): Don't emit "::" in JArray<>.
15345 (print_namelet): Only print trailing `;' when printing a class.
15346
15347 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
15348
15349 * java-tree.h: Delete declarations for all tree nodes now moved to
15350 global_trees.
15351 * decl.c: Delete their definitions.
15352
15353 1999-09-04 Mark Mitchell <mark@codesourcery.com>
15354
15355 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15356 * Makefile.in (OBJS): Add ggc-callbacks.o.
15357 (OBJDEPS): Likewise.
15358
15359 1999-09-03 Tom Tromey <tromey@cygnus.com>
15360
15361 * parse.y (strip_out_static_field_access_decl): Return operand if
15362 it satisfies JDECL_P.
15363
15364 1999-09-02 Tom Tromey <tromey@cygnus.com>
15365
15366 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15367 Handle nested arrays, like `[[I'.
15368
15369 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15370
15371 * class.c (finish_class): Remove unused parameter, all callers
15372 changed.
15373
15374 * expr.c (build_java_athrow): Change return type to void.
15375 (java_lang_expand_expr): Make sure each case in switch returns a
15376 value.
15377
15378 * java-tree.h (finish_class): Fix prototype to take void args.
15379
15380 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15381 (main): Issue return from main, not exit.
15382
15383 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15384
15385 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15386
15387 * jv-scan.c (main): Issue return from main, not exit.
15388
15389 * parse.y (check_abstract_method_definitions,
15390 java_check_abstract_method_definitions): Add static prototypes.
15391 (java_complete_expand_methods): Fix call to `finish_class'.
15392
15393 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15394 and `prevpc'.
15395
15396 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15397
15398 * lang.c (language_string): Constify.
15399
15400 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15401
15402 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15403 Remove hacks for stuff which comes from libiberty.
15404
15405 * Make-lang.in: Likewise.
15406
15407 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
15408
15409 * Makefile.in (xref.o): Depend on xref.c explicitly.
15410
15411 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15412
15413 * java-tree.h (lang_printable_name): Constify a char*.
15414
15415 * lang.c (lang_printable_name): Likewise.
15416
15417 1999-08-27 Jeffrey A Law (law@cygnus.com)
15418
15419 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15420 comments in C code.
15421
15422 1999-08-26 Tom Tromey <tromey@cygnus.com>
15423
15424 * gjavah.c (print_cxx_classname): Print "::" before qualified
15425 name.
15426
15427 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15428
15429 * parse.y (lookup_cl): Changed leading comment. Now does its best
15430 to set the column number.
15431 (qualify_ambiguous_name): Take WFL wrappers into account.
15432
15433 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
15434
15435 * verify.c (verify_jvm_instructions): Don't check instruction
15436 validity beyond end of method.
15437
15438 1999-08-25 Tom Tromey <tromey@cygnus.com>
15439
15440 * jvspec.c (lang_specific_driver): Correctly handle --help again.
15441
15442 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15443
15444 * gjavah.c (print_name, print_base_classname, utf8_cmp,
15445 cxx_keyword_subst, generate_access, name_is_method_p,
15446 get_field_name, print_field_name, super_class_name, print_include,
15447 decode_signature_piece, print_class_decls, usage, help,
15448 java_no_argument, version, add_namelet, print_namelet): Add static
15449 prototype.
15450 (print_base_classname, utf8_cmp, cxx_keyword_subst,
15451 name_is_method_p): Constify a char*.
15452 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
15453 Provide a final else clause in an if-else-if.
15454 (print_field_info): Add missing final arg in function call to
15455 `print_field_name'.
15456 (print_method_info, decompile_method, decode_signature_piece,
15457 print_c_decl, print_full_cxx_name, print_stub,
15458 print_mangled_classname, super_class_name, print_include,
15459 add_namelet, add_class_decl, print_class_decls, process_file,
15460 help): Constify a char*.
15461
15462 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15463 push_int_const, find_constant_wide, find_constant_index,
15464 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15465 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15466 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15467 emit_if, emit_goto, emit_jsr, call_cleanups,
15468 make_class_file_name): Add static prototypes.
15469 (generate_bytecode_return, generate_bytecode_insns): Pass a
15470 NULL_PTR, not a NULL_TREE.
15471
15472 * jv-scan.c: Include "jcf.h".
15473 (main): Declare using DEFUN macro.
15474
15475 * jvspec.c (find_spec_file, lang_specific_pre_link,
15476 lang_specific_driver): Add prototypes.
15477 (find_spec_file): Constify a char*.
15478
15479 * keyword.gperf (hash, java_keyword): Add prototypes.
15480
15481 * lang.c (lang_print_error): Add static prototype.
15482 (lang_init): Prefer memcpy over bcopy to avoid casts.
15483
15484 * lex.c (yylex): Add static prototype.
15485
15486 * parse-scan.y: Include "lex.c" earlier.
15487
15488 * parse.h: Remove redundant declaration for `yylex'.
15489
15490 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15491 labeled_block_contains_loop_p): Add static prototypes.
15492 (not_accessible_p): Make static to match prototype.
15493
15494 * verify.c (start_pc_cmp): Don't needlessly cast away const.
15495
15496 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15497
15498 * parse.y (check_method_redefinition): Changed leading comment.
15499 (check_abstract_method_definitions): New function.
15500 (java_check_abstract_method_definitions): New function.
15501 (java_check_regular_methods): Call it.
15502 (verify_constructor_super): Fixed indentation.
15503 (lookup_method_invoke): Likewise.
15504
15505 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15506
15507 * parse.y (method_header): Return a null pointer if the current
15508 class node is null.
15509 (finish_method_declaration): Return if the current function decl
15510 is null.
15511 (source_start_java_method): Likewise.
15512 (java_method_add_stmt): Likewise.
15513
15514 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15515
15516 * class.c (emit_register_class): Removed unnecessary call to
15517 start_sequence.
15518 * parse.y (labeled_block_contains_loop_p): Removed unused local
15519 variable.
15520
15521 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15522
15523 * parse.y (java_refold): Added prototype.
15524
15525 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15526
15527 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15528 (java_stabilize_reference): Removed unnecessary `else'.
15529 (java_complete_lhs): Set flag to remember boolean. Call
15530 java_refold. Added comments.
15531 (java_decl_equiv): New function.
15532 (binop_compound_p): Likewise.
15533 (java_refold): Likewise.
15534 (patch_unaryop): Striped static field access assigned to decl and
15535 op. Changed promotion scheme for ++/-- operators.
15536 (search_loop): New function.
15537 (labeled_block_contains_loop_p): Likewise.
15538 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15539 comment.
15540 (patch_bc_statement): Call search_loop. Fixed comment.
15541
15542 1999-08-14 Anthony Green <green@cygnus.com>
15543
15544 * expr.c (java_lang_expand_expr): Mark static array data as
15545 referenced.
15546
15547 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
15548
15549 * jvgenmain.c (main): NUL-terminate name_obstack.
15550
15551 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15552
15553 * check-init.c (check_bool2_init, done_alternative): Add static
15554 prototypes.
15555
15556 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15557 (add_method, build_utf8_ref, build_class_ref,
15558 append_gpp_mangled_type, layout_class_method): Constify a char*.
15559
15560 * decl.c (push_promoted_type, make_binding_level): Add static
15561 prototypes.
15562 (push_promoted_type, pushdecl): Constify a char*.
15563
15564 * except.c (find_handler_in_range, link_handler,
15565 check_start_handlers): Add static prototypes.
15566
15567 * expr.c (process_jvm_instruction): Constify a char*.
15568
15569 * gjavah.c (main): Constify a char*.
15570
15571 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15572 Constify a char*.
15573
15574 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15575 static prototypes.
15576 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15577 munge, print_ents): Constify a char*.
15578
15579 * jcf-dump.c (disassemble_method): Constify a char*.
15580 (print_constant_pool, print_exception_table): Add static prototypes.
15581 (print_constant, print_exception_table, main, disassemble_method):
15582 Constify a char*.
15583
15584 * jcf-io.c (find_classfile, find_class): Likewise.
15585
15586 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15587 (set_source_filename, predefined_filename_p): Add static prototypes.
15588 (set_source_filename, get_constant, get_class_constant,
15589 find_in_current_zip): Constify a char*.
15590
15591 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15592 static prototypes.
15593 (add_entry, add_path, jcf_path_classpath_arg,
15594 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15595
15596 * jcf-reader.c (get_attribute, jcf_parse_preamble,
15597 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15598 jcf_parse_one_method, jcf_parse_methods,
15599 jcf_parse_final_attributes): Add static prototypes.
15600 (get_attribute): Constify a char*.
15601
15602 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15603 jcf_dependency_add_target, jcf_path_classpath_arg,
15604 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15605
15606 * jv-scan.c (main): Constify a char*.
15607 (gcc_obstack_init): Add prototype arguments.
15608
15609 * jvgenmain.c (gcc_obstack_init): Likewise.
15610 (main): Constify a char*.
15611
15612 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15613 static prototypes.
15614 (put_decl_string, lang_print_error): Constify a char*.
15615 (lang_init): Remove redundant extern prototype.
15616
15617 * mangle.c (emit_unicode_mangled_name): Constify a char*.
15618
15619 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15620 Add static prototypes.
15621 (get_type_from_signature): Constify a char*.
15622
15623 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15624 Add static prototypes.
15625 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15626 (verify_jvm_instructions): Constify a char*.
15627
15628 * xref.c (xref_flag_value): Likewise.
15629
15630 * xref.h (xref_flag_value): Likewise.
15631
15632 * zextract.c (makeword, makelong): Add static prototypes.
15633 (makeword, makelong): Constify a uch*.
15634
15635 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15636
15637 * lang.c (java_dummy_print): Constify a char*.
15638 (lang_print_error): Likewise.
15639 (lang_init): Remove redundant prototype for `print_error_function'.
15640 (lang_init_source): Likewise.
15641 (lang_identify): Constify a char*.
15642
15643 1999-08-09 Tom Tromey <tromey@cygnus.com>
15644
15645 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15646 (WORDS_TO_LONG): Likewise.
15647 (WORDS_TO_DOUBLE): Likewise.
15648
15649 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15650
15651 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15652
15653 * expr.c (java_stack_pop, java_array_data_offset,
15654 build_java_throw_out_of_bounds_exception, case_identity,
15655 build_java_check_indexed_type): Add static prototypes.
15656 (linenumber_table, expand_invoke, expand_java_field_op,
15657 build_primtype_type_ref, expand_byte_code): Constify a char*.
15658
15659 * java-tree.h (build_primtype_type_ref, linenumber_table):
15660 Constify a char*.
15661 (java_lang_expand_expr): Add prototype.
15662
15663 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
15664 `java_lang_expand_expr'.
15665
15666 * lex.c (java_lex_error): Constify a char*.
15667 (java_get_unicode, java_read_char, java_allocate_new_line,
15668 java_unget_unicode, java_sneak_unicode): Prototype.
15669
15670 * parse-scan.y (current_class, package_name, method_declarator,
15671 report_class_declaration, yyerror): Constify a char*.
15672
15673 * parse.h (java_report_errors): Prototype.
15674 (yyerror): Constify a char*.
15675
15676 * parse.y (classitf_redefinition_error, check_modifiers,
15677 parse_jdk1_1_error, lookup_package_type,
15678 lookup_package_type_and_set_next, get_printable_method_name,
15679 purify_type_name): Constify a char*.
15680 (build_super_invocation, maybe_generate_finit,
15681 verify_constructor_super, parser_add_interface,
15682 add_superinterfaces, jdep_resolve_class, note_possible_classname,
15683 java_complete_expand_methods, java_expand_finals,
15684 cut_identifier_in_qualified, java_stabilize_reference,
15685 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15686 merge_string_cste): Prototype.
15687 (single_type_import_declaration, yyerror,
15688 variable_redefinition_error, build_array_from_name,
15689 build_unresolved_array_type, check_class_interface_creation,
15690 resolve_class, complete_class_report_errors,
15691 note_possible_classname, read_import_dir,
15692 find_in_imports_on_demand, resolve_package, fix_constructors,
15693 check_deprecation, lookup_method_invoke,
15694 maybe_build_primttype_type_ref, array_constructor_check_entry):
15695 Constify a char*.
15696 (java_complete_expand_methods, java_expand_finals): Make static.
15697 (convert_narrow): Remove static prototype.
15698
15699 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
15700
15701 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15702
15703 1999-08-02 Richard Henderson <rth@cygnus.com>
15704
15705 * decl.c: Include defaults.h instead of expr.h.
15706 * parse.y: Likewise.
15707
15708 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
15709
15710 * java/decl.c (start_java_method): Change all uses of
15711 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15712 Ensure expr.h is included.
15713 * java/expr.c (pop_arguments): Ditto.
15714 * java/parse.y (expand_start_java_method): Ditto.
15715
15716 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15717
15718 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15719
15720 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
15721
15722 * decl.c: Include "function.h".
15723 * except.c: Likewise.
15724 * parse.y: Likewise.
15725 * Makefile.in: Update dependencies.
15726
15727 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15728
15729 * expr.c (build_java_soft_divmod): Provide a default case in switch.
15730 (java_lang_expand_expr): Mark parameters `target', `tmode' and
15731 `modifier' with ATTRIBUTE_UNUSED.
15732
15733 * gjavah.c (process_file): Add braces around ambiguous `else'.
15734
15735 * jcf-dump.c (print_access_flags, localvar_free): Change return
15736 type to void.
15737
15738 * parse.y (java_complete_expand_method): Initialize variable
15739 `exception_copy'.
15740 (resolve_qualified_expression_name): Likewise for `field_decl'.
15741 (patch_method_invocation): Likewise for `class_to_search'.
15742 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15743 (patch_assignment): Likewise for `lhs_type'.
15744
15745 * verify.c (verify_jvm_instructions): Remove unused variable
15746 `caller'.
15747
15748 1999-07-25 Richard Henderson <rth@cygnus.com>
15749
15750 * decl.c (va_list_type_node): New.
15751
15752 1999-07-25 Anthony Green <green@cygnus.com>
15753
15754 * gjavah.c (print_stub): New function.
15755 (METHOD_IS_NATIVE): New macro.
15756 (print_mangled_classname): Make static.
15757 (HANDLE_END_FIELD): Don't emit fields during stub generation.
15758 (process_file): Perform stub generation.
15759 (HANDLE_METHOD): Don't emit class decls during stub
15760 generation.
15761 (HANDLE_END_METHOD): Take into account stub generation.
15762 (print_method_info): Handle stub generation.
15763 (print_stub): New function.
15764 (print_cxx_classname): Make signature consistant with others.
15765 (help): Describe -stubs option.
15766 (main): Create stub file.
15767 (version): Use version.c.
15768 (print_full_cxx_name): New function.
15769 (print_c_decl): Use print_full_cxx_name.
15770
15771 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15772
15773 * check-init.c (check_init): Handle MAX_EXPR.
15774
15775 1999-07-15 Andrew Haley <aph@cygnus.com>
15776
15777 * lang.c (flag_use_divide_subroutine): New variable.
15778 * typeck.c: (convert_ieee_real_to_integer): Bounds check
15779 fp-to-integer conversion.
15780 (convert): Call convert_ieee_real_to_integer when flag_fast_math
15781 is not set.
15782
15783 * expr.c (build_java_soft_divmod): New function.
15784 (build_java_binop): Call build_java_soft_divmod if
15785 flag_use_divide_subroutine is set.
15786 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15787 soft_lrem_node: new builtin functions.
15788 (init_decl_processing) Initialize the new builtins.
15789 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15790 soft_lrem_node: new builtin functions.
15791 (build_java_soft_divmod): New function.
15792 * parse.y: Call build_java_soft_divmod if
15793 flag_use_divide_subroutine is set.
15794 * parse.c: Rebuilt.
15795
15796 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15797 a --specs= arg) even if not linking.
15798 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15799 -fuse-divide-subroutine
15800
15801 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15802
15803 * parse.y (resolve_and_layout): Check methods only once.
15804 (resolve_qualified_expression_name): Verify thrown exceptions
15805 compatibility.
15806 (check_thrown_exceptions): Reject exceptions thrown in
15807 initializer. Error message tuned.
15808
15809 1999-07-14 Andrew Haley <aph@cygnus.com>
15810
15811 * expr.c (expand_expr): Do not return the last statement in a
15812 block as the block's value.
15813
15814 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15815
15816 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
15817 CALL_EXPR, to avoid order of evaluation changes.
15818
15819 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15820
15821 * parse.y (qualify_ambiguous_name): Do not use
15822 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
15823
15824 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15825
15826 * check-init.c (check_init): Handle MAX_EXPR.
15827 * expr.c (force_evaluation_order): Force method call arguments to
15828 be evaluated in left-to-right order.
15829 * parse.y (qualify_ambiguous_name): Loop again to qualify
15830 NEW_ARRAY_EXPR properly.
15831
15832 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15833
15834 * parse.y (patch_invoke): Resolve unresolved invoked method
15835 returned type.
15836 (qualify_ambiguous_name): STRING_CST to qualify expression for
15837 type name resolution.
15838
15839 1999-06-24 Andrew Haley <aph@cygnus.com>
15840
15841 * class.c (finish_class): Whenever a deferred method is
15842 output, rescan the list of methods to see if a new candidate for
15843 output can be found.
15844
15845 1999-06-28 Tom Tromey <tromey@cygnus.com>
15846
15847 * jvspec.c (lang_specific_driver): Recognize --help.
15848
15849 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
15850
15851 * parse.y (resolve_package): Fixed bogus return statement.
15852 (patch_method_invocation): Resolve method invocation beginning with
15853 a package name qualifier.
15854
15855 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15856
15857 * Make-lang.in (java.stage1): Depend on stage1-start.
15858 (java.stage2): Likewise for stage2-start.
15859 (java.stage3): Likewise for stage3-start.
15860 (java.stage4): Likewise for stage4-start.
15861
15862 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15863
15864 * parse.y (java_complete_lhs): When doing cross referencing, don't
15865 try to keep file location on a WFL expanded as a CALL_EXPR.
15866
15867 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15868
15869 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
15870 compiling to class file a void method with an empty method body.
15871 As a side effect, the bytecode backend will generate the
15872 appropriate `return' instruction.
15873
15874 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15875
15876 * parse.y (lookup_package_type_and_set_next): New function prototype.
15877 (resolve_package): Search current and imported packages.
15878 (lookup_package_type_and_set_next): New function.
15879
15880 1999-06-22 Andrew Haley <aph@cygnus.com>
15881
15882 * verify.c (verify_jvm_instructions): Check for pending blocks
15883 before invalid PC test and opcode switch, not after.
15884
15885 1999-06-21 Andrew Haley <aph@cygnus.com>
15886
15887 * except.c (find_handler_in_range): The upper limit for exception
15888 ranges is exclusive, not inclusive: (start <= pc < end).
15889 (link_handler): find child pointer which points to outer by
15890 searching sibling list: previous code incorrectly assumed that
15891 outer->outer->first_child must point to outer.
15892 * verify.c (verify_jvm_instructions): FIXME added to code for
15893 `athrow'.
15894 (verify_jvm_instructions): Do not assume that the last block
15895 processed in a subroutine is a block which ends with a `ret'
15896 instruction. With some control flows it is possible that the last
15897 block ends with an `athrow'.
15898
15899 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15900
15901 * parse.y (qualify_ambiguous_name): Reorganized the post
15902 evaluation of non WFL leading expression nodes.
15903
15904 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15905
15906 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
15907 CONVERT_EXPR.
15908
15909 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15910
15911 * parse.y (qualify_ambiguous_name): Handle qualified expression
15912 beginning with a STRING_CST.
15913
15914 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15915
15916 * parse.y (register_fields): Set DECL_INITIAL on both
15917 pre-initialized static and public fields.
15918 (resolve_field_access): Static field access expressions to always
15919 use pointer types.
15920 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
15921 qualification. CONVERT_EXPR to be resolved as an expression name.
15922 (java_complete_lhs): Identify and access qualified final
15923 initialized field in switch statement case expression.
15924 (fold_constant_for_init): Pre-initialized field decl constant to
15925 be folded.
15926
15927 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
15928
15929 * parse.y (note_possible_classname): Mark returned node with
15930 QUALIFIED_P only if the original class name contained a '/'.
15931
15932 1999-06-05 Anthony Green <green@cygnus.com>
15933
15934 * Make-lang.in (gcjh): More parallel build fixes.
15935
15936 1999-06-03 Mike Stump <mrs@wrs.com>
15937
15938 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15939
15940 1999-06-02 Anthony Green <green@cygnus.com>
15941
15942 * except.c (link_handler): Chain exception handlers in order.
15943
15944 1999-06-02 Anthony Green <green@cygnus.com>
15945
15946 * expr.c (expand_byte_code): Fill unreachable bytecode regions
15947 with nops and process as usual in order to always set correct EH
15948 ranges. Emit detailed warnings about unreachable bytecodes.
15949
15950 1999-06-02 Anthony Green <green@cygnus.com>
15951
15952 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
15953 constant.
15954
15955 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15956
15957 * parse.y (lookup_field_wrapper): Unified returned value to NULL
15958 or the searched field decl.
15959
15960 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15961
15962 * parse.y (fold_constant_for_init): Convert numerical constant
15963 values to the type of the assigned field.
15964
15965 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15966
15967 * expr.c (lookup_field): Relaxed the test on class loading error
15968 detection.
15969 * parse.y (fold_constant_for_init): Enabeled old code.
15970
15971 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15972
15973 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
15974 decide the validity of the cast of a java.lang.Cloneable reference
15975 to an array.
15976 (patch_conditional_expr): Fixed first argument passed to
15977 binary_numeric_promotion.
15978
15979 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15980
15981 * parse.y (qualify_ambiguous_name): Take into account that a
15982 CONVERT_EXPR might specify a type as a WFL.
15983
15984 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
15985
15986 * parse.y (patch_assignment): Save the rhs before using it as an
15987 argument to _Jv_CheckArrayStore.
15988
15989 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
15990
15991 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15992
15993 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15994
15995 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
15996 floating point literal only when the exponent indicator has been
15997 parsed.
15998
15999 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16000
16001 * parse.y (formal_parameter:): Construct argument tree list
16002 element even if a yet unsupported final parameter was encountered.
16003
16004 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16005
16006 * parse.y (finish_method_declaration): Issue errors for native or
16007 abstract methods declared with a method body, as well as for non
16008 native or non abstract methods with no method body.
16009
16010 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16011
16012 * class.c (build_utf8_ref): Initialize variable `field'.
16013
16014 * decl.c (init_decl_processing): Initialize variable `field'.
16015
16016 * expr.c (build_known_method_ref): Mark parameters `method_type',
16017 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16018 (process_jvm_instruction): Likewise for parameter `length'.
16019
16020 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16021 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16022 ATTRIBUTE_UNUSED.
16023
16024 * parse.y (maybe_generate_clinit): Remove unused variable
16025 `has_non_primitive_fields'.
16026 (find_in_imports_on_demand): Initialize variables `node_to_use'
16027 and `cl'.
16028 (patch_binop): Likewise for variable `prom_type'.
16029 (patch_unaryop): Likewise for variable `prom_type'.
16030
16031 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16032
16033 * xref.c (xref_table): Add missing initializer.
16034
16035 1999-05-14 Tom Tromey <tromey@cygnus.com>
16036
16037 * java-except.h (struct eh_range): Removed unused `next' member.
16038 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16039 after adding all exception handlers. Sort exception ranges in
16040 order of start PC.
16041 (struct pc_index): New structure.
16042 (start_pc_cmp): New function.
16043 * except.c (add_handler): Return `void'. Don't call link_handler;
16044 instead construct an ordinary linked list and do range
16045 coalescing.
16046 (check_nested_ranges): New function.
16047 (link_handler): Changed interface to allow merging of eh_ranges.
16048 Split overlapping ranges. Return `void'.
16049
16050 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16051
16052 * parse.y (constructor_block_end:): New rule, tagged <node>.
16053 (constructor_body:): Use `constructor_block_end' instead of
16054 `block_end'.
16055
16056 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16057
16058 * parse.y (statement_nsi:): Pop `for' statement block.
16059 (java_complete_lhs): Labeled blocks containing no statement are
16060 marked as completing normally.
16061
16062 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16063
16064 * xref.c (xref_set_current_fp): New function, defined.
16065 * xref.h (xref_set_current_fp): New function, prototyped.
16066
16067 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16068
16069 * check-init.c (check_init): Take into account that
16070 LABELED_BLOCK_STMT can be empty.
16071
16072 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16073
16074 * parse.y (java_check_regular_methods): Warning check on not
16075 overriding methods with default access in other packages does not
16076 apply to `<clinit>'.
16077 (java_complete_lhs): If block body is an empty_stmt_node, replace
16078 it by NULL_TREE. This prevents gcc from generating an irrelevant
16079 warning.
16080
16081 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16082
16083 * check-init.c (check_init): Removed code accepting to see things
16084 falling through default:, when doing xrefs.
16085 * java-tree.h (do_not_fold): New global variable, declared.
16086 * parse.y (do_not_fold): New global variable, defined.
16087 (java_complete_expand_method): Set `do_not_fold' to the value of
16088 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16089 and reinstall them after them have been purged; do not check for
16090 initializations; do not issue missing return errors.
16091 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16092 when doing xrefs.
16093 (patch_binop): Skip the fold part when doing xrefs.
16094 (build_string_concatenation): Skip the concatenation part when
16095 doing xrefs.
16096 (patch_synchronized_statement): Do not generate a try-finally when
16097 doing xrefs.
16098 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16099 and keep the location where the throw was seen.
16100 * typeck.c (convert): When `do_not_fold' is set, do not attempt
16101 any treatment on the converted node an simply return a NOP_EXPR of
16102 the targeted type.
16103 * xref.c (xref_get_data): New function, defined.
16104 * xref.h (xref_get_data): New function, declared.
16105 (XREF_GET_DATA): Use xref_get_data.
16106
16107 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16108
16109 * gjavah.c (print_include): Cast the result of `strlen' to int
16110 when comparing against a signed value.
16111 (add_namelet): Likewise.
16112
16113 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16114
16115 * expr.c (expand_invoke): Mark parameter `nargs' with
16116 ATTRIBUTE_UNUSED.
16117 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16118
16119 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16120 ATTRIBUTE_UNUSED.
16121
16122 * jcf-reader.c (get_attribute): Cast a value to long
16123 when comparing against a signed expression. Likewise.
16124
16125 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16126 HOST_BITS_PER_CHAR.
16127
16128 1999-05-11 Andrew Haley <aph@cygnus.com>
16129
16130 * parse.y (source_end_java_method): If the current method contains
16131 any exception handlers, force asynchronous_exceptions: this is
16132 necessary because signal handlers in libjava may throw exceptions.
16133 * decl.c (end_java_method): Ditto.
16134
16135 1999-05-11 Tom Tromey <tromey@cygnus.com>
16136
16137 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16138 flags.
16139 * jvspec.c (THREAD_NAME): Removed.
16140 (GC_NAME): Likewise.
16141 (MATHLIB): Likewise.
16142 (WITHLIBC): Likewise.
16143 (GCLIB): Likewise.
16144 (THREADLIB): Likewise.
16145 (MATH_LIBRARY): Likewise.
16146 (lang_specific_driver): Don't add `-l' options to command line.
16147 Instead, add a single --specs option. Recognize `-L' options and
16148 use them to search for spec file.
16149 (find_spec_file): New function.
16150 (SPEC_FILE): New define.
16151
16152 1999-05-11 Dave Brolley <brolley@cygnus.com>
16153
16154 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16155 cpplib-enabled build.
16156
16157 1999-05-05 Per Bothner <bothner@cygnus.com>
16158
16159 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16160 temporarily zero it while calling rest_of_decl_compilation.
16161
16162 * java-tree.h (string_ptr_type_node): Add declaration.
16163 * decl.c: Define and initialize string_ptr_type_node.
16164 * parse.y (patch_string_cst): Use string_ptr_type_node.
16165
16166 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16167 * parse.y (for_statement): Now unconditionally exit_block.
16168 (finish_labeled_statement): No longer exit_block if for-loop.
16169 (patch_loop_statement): Check harder if the loop is already labeled.
16170
16171 * parse.y (patch_initialized_static_field): Removed function.
16172 (maybe_generate_clinit): Removed special handling for interfaces.
16173 (java_complete_expand_methods): Do a preliminary java_complete_tree
16174 on <clinit> to determine if it can be removed.
16175 (java_complete_expand_method): Remove special handling for <clinit>.
16176 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16177 optimize if we get back empty_stmt_node.
16178 For MODIFY_EXPR, re-do checking of static initializers.
16179 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16180 For VAR_DECL, pass correct context.
16181
16182 * verify.c (verify_jvm_instructions): Better error messages.
16183
16184 1999-05-03 Tom Tromey <tromey@cygnus.com>
16185
16186 * parse-scan.y (interface_declaration): Call
16187 report_class_declaration for interfaces.
16188
16189 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
16190
16191 * Makefile.in: Remove -v from bison command lines.
16192
16193 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16194
16195 * check-init.c (check_init): Exclude a case of error when doing
16196 xrefs.
16197 * class.c (layout_class_method): Don't generate the error message
16198 twice when compiling from source.
16199 * lang-options.h: Added `-Wredundant-modifers' and
16200 `-Wunusupported-jdk11' flags and help text.
16201 * lang.c (lang_decode_option): Added support for
16202 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16203 flag_static_local_jdk11 and flag_redundant set accordingly.
16204 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16205 * parse.h (EXPR_WFL_ADD_COL): New macro.
16206 (DECL_END_SOURCE_LINE): Likewise.
16207 (DECL_INHERITED_SOURCE_LINE): Likewise.
16208 * parse.y (static_ref_err): New function, prototyped.
16209 (CCB_TK): Now tagged <operator>.
16210 (class_body:): Remember the location of the closing '}' of a class
16211 definition when doing xrefs.
16212 (block:): Likewise.
16213 (block_end:): Likewise.
16214 (create_class): Remember the location of the inherited class
16215 identifier when doing xrefs.
16216 (register_fields): Added test on first operand of `init' before
16217 testing it TREE_CODE.
16218 (method_header): Store the location of the class identifier in the
16219 class decl when doing xrefs.
16220 (finish_method_declaration): Don't combine first/last method line
16221 when doing xref.
16222 (java_check_regular_methods): Warning check on not overriding
16223 methods with default access on other packages move before check on
16224 static methods. Initialization of `aflags' also moved up.
16225 (resolve_expression_name): Call static_ref_err to report the error.
16226 (static_ref_err): New function, implemented.
16227 (resolve_field_access): Returned simplified static field access
16228 when doing xrefs.
16229 (resolve_qualified_expression_name): Check for illegal use of
16230 static fields in a non static context. Call static_ref_err to
16231 report error in various places.
16232 (java_complete_tree): Do not fold initialized static fields when
16233 doing xrefs.
16234 (java_complete_lhs): Likewise.
16235
16236 1999-04-29 Anthony Green <green@cygnus.com>
16237
16238 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16239 create internal labels.
16240 (lookup_label): Ditto.
16241
16242 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16243
16244 * class.c (layout_class_method): Generate <clinit>'s rtl for
16245 interfaces.
16246 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16247 for interfaces' <clinit>.
16248 * expr.c (lookup_field): Search for fields in interfaces.
16249 (expand_invoke): Fixed indentation.
16250 (expand_java_field_op): Likewise. Use IS_CLINIT.
16251 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16252 (IS_CLINIT): New macro.
16253 * parse.y (type_declaration:): Call maybe_generate_clinit after an
16254 interface was parsed.
16255 (maybe_generate_clinit): Don't generate if the current class is an
16256 interface with only fields of primitive types.
16257 (reset_method_name): Use IS_CLINIT.
16258 (java_complete_expand_method): Expand <clinit> when it exists for
16259 interfaces. Use IS_CLINIT.
16260 (resolve_expression_name): Use DECL_CONTEXT instead of
16261 current_class to build static field references.
16262 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16263 ARRAY_REF when doing xreferencing.
16264 (check_final_assignment): Fixed typo in leading comment. Use
16265 IS_CLINIT.
16266 (patch_array_ref): Don't fully expand array references when
16267 xreferencing.
16268 (patch_return): Use IS_CLINIT.
16269 (patch_throw_statement): Likewise.
16270
16271 1999-04-22 Tom Tromey <tromey@cygnus.com>
16272
16273 * Make-lang.in (JAVA_SRCS): Added check-init.c.
16274
16275 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16276
16277 * decl.c (predef_filenames, predef_filenames_size): New globals
16278 (init_decl_processing): predef_filenames and predef_filenames_size
16279 initialized.
16280 * java-tree.h (predef_filenames, predef_filenames_size): Declared
16281 extern.
16282 * jcf-parse.c (predefined_filename_p): New function.
16283 (yyparse): Check that files on the command line are specified only
16284 once and issue a warning otherwise.
16285 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16286 * parse.y (source_end_java_method): Nullify NOP method bodies, to
16287 avoid a gcc warning with -W -Wall turned on.
16288 (java_expand_classes): Abort if errors were encountered.
16289 (java_complete_lhs): If the cross reference flag is set, wrap
16290 field DECL node around a WFL when resolving expression name.
16291
16292 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16293
16294 * lang.c (lang_decode_option): Fixed returned value when parsing
16295 `-fxref=...' and `-Wall'.
16296 * parse.y (source_end_java_method): Do not generate code when
16297 flag_emit_xref is set.
16298 (resolve_expression_name): Do not build static field access when
16299 flag_emit_xref is set.
16300 (resolve_field_access): No special treatment on `length' when
16301 flag_emit_xref is set. Do not build qualified static field access
16302 when flag_emit_xref is set.
16303 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16304 when flag_emit_xref is set.
16305 (patch_assignment): Do not generate array store runtime check when
16306 flag_emit_xref is set.
16307 * xref.c (xref_flag_value): Fixed function declaration
16308 indentation.
16309 (xset_set_data): New function.
16310 * xref.h (xref_set_data): Added prototype for new function.
16311 (typedef struct xref_flag_table): New field data.
16312 (XREF_GET_DATA): New macro.
16313
16314 1999-04-19 Tom Tromey <tromey@cygnus.com>
16315
16316 * xref.h (enum): Removed trailing comma.
16317
16318 * parse.y (resolve_qualified_expression_name): Added missing
16319 `break'.
16320
16321 1999-04-15 Anthony Green <green@cygnus.com>
16322
16323 * gjavah.c: New prototypes for java_float_finite and
16324 java_double_finite.
16325
16326 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16327
16328 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16329 references.
16330
16331 1999-04-06 Jeffrey A Law (law@cygnus.com)
16332
16333 * Makefile.in (TREE_H): Add tree-check.h.
16334 (RTL_H): Add genrtl.h.
16335
16336 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
16337
16338 * parse.y (patch_assignment): Added ArrayStoreException runtime
16339 check.
16340
16341 1999-04-06 Per Bothner <bothner@cygnus.com>
16342
16343 * expr.c (pop_type_0): New function.
16344 (pop_type): Use pop_type_0.
16345 * java-tree.h (pop_type_0): New declaration.
16346 * verify.c (verify_jvm_instructions): Check return instructions.
16347
16348 * parse.y (patch_binop): Don't fold if non-constant and emiting
16349 class files.
16350
16351 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16352
16353 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16354
16355 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
16356 (main_jcf): Don't define.
16357 (process_file): Don't set `main_jcf'.
16358
16359 * java-tree.h (main_jcf): Don't declare.
16360
16361 * jcf-parse.c (main_jcf): Add static definition.
16362
16363 * lang.c (main_jcf): Don't define.
16364
16365 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16366
16367 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16368
16369 * decl.c (copy_lang_decl): Likewise for `bcopy'.
16370
16371 * jcf-depend.c: Include "config.h", not <config.h>.
16372
16373 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16374 `bcopy' to PTR.
16375
16376 * jcf-path.c: Include "config.h", not <config.h>.
16377
16378 * lex.c: Don't include various system header files.
16379 (java_init_lex): Cast the argument of `bzero' to PTR
16380
16381 * parse-scan.y (java_push_parser_context): Likewise.
16382
16383 * parse.y (java_push_parser_context): Likewise.
16384 (patch_bc_statement): Match format specifier to variable argument.
16385
16386 * xref.c: Don't include <stdio.h>.
16387
16388 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
16389
16390 * parse.y (struct parser_ctxt *ctxp): Now global.
16391 (declare_local_variables): Use WFL compound value for the
16392 declaration source line value, when doing cross-referencing.
16393
16394 1999-03-31 Tom Tromey <tromey@cygnus.com>
16395
16396 * gjavah.c (print_field_info): Allow constants of other types.
16397 (print_include): Generate include when new name is proper prefix
16398 of already printed name.
16399 (add_namelet): Likewise.
16400 (cxx_keyword_subst): New function.
16401 (print_method_info): Use it.
16402 (print_field_name): New function.
16403 (get_field_name): New function.
16404 (print_field_info): Use get_field_name and print_field_name.
16405
16406 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16407
16408 * Makefile.in (keyword.h): Generate using gperf language 'C', not
16409 'KR-C', so gperf uses the `const' keyword on strings.
16410
16411 * keyword.gperf (java_keyword): Const-ify a char*.
16412
16413 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16414
16415 * parse.y (patch_bc_statement): Fixed identation and a bogus
16416 `printf' format.
16417
16418 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16419
16420 * parse.y (patch_assignment): Allow static variables in other
16421 classes to be assigned.
16422
16423 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16424
16425 * class.c (maybe_add_interface): Remove unused variable
16426 `interface_binfo'.
16427 (make_class_data): Use = for assignment, not ==. Likewise.
16428 (emit_register_classes): Remove unused variable `decl'.
16429
16430 * lex.c: Fix comment so as not to contain an embedded `/*'.
16431
16432 * verify.c (verify_jvm_instructions): Remove unused variable
16433 `self_type'.
16434
16435 1999-03-27 Per Bothner <bothner@cygnus.com>
16436
16437 * parse.y (complete_loop_body): Rename to finish_loop_body.
16438 (complete_labeled_statement): Rename to finish_labeled_statement.
16439 (complete_for_loop): Rename to finish_for_loop.
16440 (complete_method_declaration): Rename to finish_method_declaration.
16441
16442 * java-tree.h (continue_identifier_node): New global node.
16443 * decl.c: Define and initialize continue_identifier_node.
16444 * parse.y (generate_labeled_block): Remove - no longer needed.
16445 (build_loop_body): Use continue_identifier_node for continue block.
16446 (finish_labeled_statement): Also do pop_labeled_block actions.
16447 (java_complete_lhs): POP_LOOP even if error.
16448 (build_labeled_block): Special handling for continue_identifier_node.
16449 (patch_loop_statement): Re-organize.
16450 (patch_bc_statement): Re-write.
16451
16452 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16453
16454 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16455 using a WFL compound value.
16456 * parse.y (xref.h): Include.
16457 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16458 WFL compound value.
16459 (register_fields): Set WFL compound value to lineno if doing
16460 xrefs.
16461 (java_complete_expand_method): Call expand_xref if flag_emit_xref
16462 is set.
16463 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16464 * xref.h (expand_xref): Prototype renamed from xref_generate.
16465
16466 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16467
16468 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16469 (GET_CURRENT_BLOCK): New macro.
16470 * parse.y (current_static_block): New global variable.
16471 (method_body:): Define action.
16472 (complete_method_declaration): Set current_function_decl to NULL
16473 when work on the current method is done.
16474 (declare_local_variables): Use GET_CURRENT_BLOCK.
16475 (java_method_add_stmt): Likewise.
16476 (java_complete_expand_method): Disable the use of `this' when
16477 expanding <clinit>.
16478 (enter_a_block): If no current method exist, use
16479 current_static_block to link static initializer blocks.
16480 (exit_block): Rewritten to use current_static_block when no current
16481 method decl exists.
16482 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16483 (patch_return): Forbid the use of `return' in static initializers.
16484 (patch_throw_statement): Fixed indentation. Issue specific error
16485 for uncaught thrown checked exception in static initializer
16486 blocks. Removed FIXME.
16487
16488 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
16489
16490 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16491 Link gcj from gcc.o.
16492
16493 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16494
16495 * parse.y (find_applicable_accessible_methods_list): When dealing
16496 with interface: ensure that a given interface or java.lang.Object
16497 are searched only once.
16498
16499 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16500
16501 * gjavah.c (print_c_decl): Remove unused argument `flags'.
16502
16503 * jcf-dump.c (print_access_flags): Add braces around if-else.
16504
16505 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16506 COMBINE_INPUTS.
16507
16508 * lex.c (build_wfl_node): Add static prototype.
16509
16510 * lex.h (build_wfl_node): Remove static prototype.
16511
16512 * parse.y: Include lex.c early enough to declare everything needed.
16513 Ensure calls to `build_wfl_node' pass the proper arguments.
16514 (create_class): Remove unused variable `super_decl'.
16515 (get_printable_method_name): Initialize variable `name'.
16516
16517 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16518
16519 * Changelog: Fixed 1999-03-22 typos.
16520 * lang.c (lang_decode_option): Fixed typo in error string in the
16521 XARG section.
16522
16523 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16524
16525 * Makefile.in (JAVA_OBJS): Added entry xref.o.
16526 (xref.o): New rule.
16527 * java-tree.h (flag_emit_xref): Declared extern.
16528 * lang.c (xref.h): Included.
16529 (flag_emit_xref): New global variable.
16530 (lang_decode_option): Added support for -fxref.
16531 * xref.c: Created.
16532 * xref.h: Likewise.
16533
16534 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
16535
16536 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16537 linked with.
16538
16539 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16540
16541 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16542 $(srcdir)/../system.h and $(JAVA_TREE_H).
16543 (jcf-io.o): Depend on $(JAVA_TREE_H).
16544 (mangle.o): Likewise.
16545
16546 * check-init.c (check_cond_init): Add static prototype.
16547
16548 * class.c (build_java_method_type, hashUtf8String,
16549 make_field_value, get_dispatch_vector, get_dispatch_table,
16550 append_gpp_mangled_type, mangle_static_field): Likewise.
16551 (strLengthUtf8): Hide unused definition.
16552 (hashUtf8String): Const-ify.
16553 (make_field_value): Un-ANSI-fy.
16554
16555 * constants.c: Move inclusion of jcf.h above java-tree.h.
16556 (set_constant_entry, find_class_or_string_constant,
16557 find_name_and_type_constant, get_tag_node,
16558 build_constant_data_ref): Add static prototype.
16559
16560 * decl.c (push_jvm_slot, builtin_function,
16561 lookup_name_current_level): Likewise.
16562 (builtin_function): Const-ify.
16563
16564 * except.c (expand_start_java_handler, expand_end_java_handler):
16565 Add static prototype.
16566
16567 * expr.c (flush_quick_stack, push_value, pop_value,
16568 java_stack_swap, java_stack_dup, build_java_athrow,
16569 build_java_jsr, build_java_ret, expand_java_multianewarray,
16570 expand_java_arraystore, expand_java_arrayload,
16571 expand_java_array_length, build_java_monitor, expand_java_pushc,
16572 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16573 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16574 expand_compare, expand_test, expand_cond, expand_java_goto,
16575 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16576 expand_java_field_op, java_push_constant_from_pool): Likewise.
16577
16578 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16579 (build_java_arraynull_check): Mark parameters `node' and `type'
16580 with ATTRIBUTE_UNUSED.
16581 (note_label): Likewise for parameter `current_pc'.
16582 (expand_java_call, expand_java_ret): Hide unused definition.
16583
16584 * java-tree.h (make_class, build_constants_constructor,
16585 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16586 init_outgoing_cpool, register_class, emit_register_classes,
16587 java_layout_seen_class_methods): Prototype.
16588 (unicode_mangling_length): Const-ify.
16589 (append_gpp_mangled_name, append_gpp_mangled_classtype,
16590 emit_unicode_mangled_name, format_int, format_uint,
16591 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16592 jcf_print_utf8_replace, open_class): Prototype.
16593
16594 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
16595 <stdio.h>. Include tree.h/java-tree.h.
16596 (utf8_equal_string usage, process_class): Add static prototype.
16597 (open_class): Don't prototype this here.
16598 (utf8_equal_string): Match arguments to format specifiers.
16599 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16600 TABLE_SWITCH, disassemble_method): Likewise.
16601
16602 * jcf-io.c: Include tree.h/java-tree.h.
16603 (open_class, find_classfile, jcf_print_utf8,
16604 jcf_print_utf8_replace): Const-ify.
16605
16606 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16607 parse_class_file): Add static prototype.
16608 (find_in_current_zip): Match definition to existing static
16609 prototype.
16610
16611 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16612 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16613 finish_jcf_block, define_jcf_label, get_jcf_label_here,
16614 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16615 write_chunks, adjust_typed_op, generate_bytecode_conditional,
16616 generate_bytecode_return, perform_relocations, init_jcf_state,
16617 init_jcf_method, release_jcf_state, generate_classfile):
16618 Add static prototype.
16619 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16620 (make_class_file_name): Const-ify.
16621
16622 * jcf.h (find_classfile): Const-ify.
16623
16624 * jv-scan.c (reset_report): Remove prototype.
16625
16626 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16627 (error): Rewrite to allow varargs.
16628
16629 * lang.c (lang_f_options): Const-ify.
16630
16631 * lex.c (java_parse_escape_sequence): Add static prototype.
16632 (java_allocate_new_line): Match definition to existing static
16633 prototype.
16634
16635 * mangle.c Include tree.h/java-tree.h.
16636 (unicode_mangling_length, emit_unicode_mangled_name,
16637 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16638
16639 * parse.h (jdep_code): Remove trailing comma in enumeration.
16640 (java_get_line_col): Move prototype outside of !JC1_LITE test.
16641 (reset_report): Add prototype.
16642
16643 * verify.c (push_pending_label, merge_types): Add static
16644 prototypes.
16645
16646 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16647
16648 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16649
16650 * parse.y (find_applicable_accessible_methods_list): Extend the
16651 search to superinterfaces when relevant.
16652 (search_applicable_methods_list): New function.
16653
16654 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16655
16656 * class.c (unmangle_classname): Implemented stricter testing
16657 before setting the QUALIFIED_P flag on an identifier.
16658
16659 1999-03-16 Per Bothner <bothner@cygnus.com>
16660
16661 * parse.y (java_complete_lhs): Call force_evaluation_order
16662 after patch_newarray.
16663 (patch_binop): Don't call fold if there are side effects.
16664
16665 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16666
16667 * parse.y (java_stabilize_reference): Use save_expr instead of
16668 building a SAVE_EXPR node.
16669 (java_complete_lhs): Patch the resulting string of the `+='
16670 operator (if necessary) and complete the RHS after having built
16671 the cast.
16672
16673 1999-03-15 Per Bothner <bothner@cygnus.com>
16674
16675 * class.c (make_class): Don't set CLASS_P here (because
16676 this function is also called by build_java_array_type).
16677 (push_class): Set CLASS_P here instead.
16678 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
16679
16680 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
16681 context. If the context is class, perfer "super" over "synchronized".
16682 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
16683
16684 * parse.y (create_class): Don't call parser_check_super here;
16685 it is not robust. Always wait until later.
16686
16687 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
16688 match what JDK 1.2 does), but don't set ACC_PUBLIC.
16689
16690 1999-03-13 Per Bothner <bothner@cygnus.com>
16691
16692 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
16693 * lex.h (UNGETC): Change misleading macro.
16694
16695 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16696
16697 * parse.y (java_stabilize_reference): Return NODE when patching a
16698 COMPOUND_EXPR.
16699 (java_complete_lhs): Put parenthesis around truth values.
16700
16701 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16702
16703 * class.c (layout_class_method): Don't make rtl for interface
16704 methods.
16705 * parse.h (GET_TYPE_NAME): New macro.
16706 * parse.y (if_then_statement:): Fixed indentation.
16707 (if_then_else_statement:): Likewise.
16708 (for_statement:): Fixed spacing.
16709 (try_statement:): Fixed indentation.
16710 (create_interface): Don't force interfaces to be abstract.
16711 (method_header): Abstract methods are OK in interfaces.
16712 (declare_local_variables): Fixed typo in comment.
16713 (java_complete_expand_method): Fixed indentation.
16714 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16715 non accessible fields.
16716 (java_stabilize_reference): New function.
16717 (java_complete_lhs): Fixed indentation. Use
16718 java_stabilize_reference in compound assignment. Insert the
16719 cast. If not processing `+' fix string constants before processing
16720 binop.
16721
16722 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16723
16724 * constants.c (find_class_or_string_constant): Cast variable `j'
16725 to a `jword' when comparing against one.
16726
16727 * expr.c (java_lang_expand_expr): Remove unused variables
16728 `has_finally_p' and `op0'.
16729
16730 * gjavah.c (print_field_info): Cast a value to jint when comparing
16731 against one. Likewise for a jlong.
16732 (add_namelet): Likewise cast a `sizeof' to an int when comparing
16733 against a signed quantity.
16734
16735 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16736 (print_signature): Don't needlessly dereference variable `str'
16737
16738 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16739 `max_locals' with ATTRIBUTE_UNUSED.
16740 (jcf_parse_class): Likewise for variable `index'.
16741
16742 * parse.h (reverse_jdep_list): Remove static prototype.
16743
16744 * parse.y (build_jump_to_finally): Remove prototype and definition.
16745 (reverse_jdep_list): Add static prototype.
16746
16747 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16748 `assignment' and `expr_decl'.
16749
16750 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16751
16752 1999-03-12 Andrew Haley <aph@cygnus.com>
16753
16754 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16755 we'll need a directory separator and a null character.
16756
16757 1999-03-10 Per Bothner <bothner@cygnus.com>
16758
16759 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
16760
16761 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
16762
16763 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16764 interfaces.
16765
16766 1999-03-05 Per Bothner <bothner@cygnus.com>
16767
16768 * lex.c (java_parse_end_comment): Take extra parameter (next char).
16769
16770 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
16771
16772 * class.c (layout_class_method): A static method in a base class
16773 is never overridden, so treat it like it doesn't exist.
16774 However, do complain about private non-static method overriding
16775 public static method.
16776
16777 * parse.y: Don't set unused INITIALIZED_P flag.
16778 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
16779
16780 * parse.y (find_expr_with_wfl): Optimize tail-calls.
16781 (build_array_from_name): Re-order &index[string] to &string[index].
16782
16783 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
16784 error_mark (it might catch more errors, but it is more likely to lose).
16785
16786 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16787
16788 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16789 (parse-scan.o): Depend on toplev.h.
16790
16791 * class.c (make_method_value): Add prototype. Make it static.
16792 Remove unused second argument, caller changed.
16793
16794 * expr.c (java_lang_expand_expr): Remove unused variable
16795 `return_label'.
16796
16797 * java-tree.h: Don't prototype find_in_current_zip.
16798 Add prototypes for verify_constant_pool, start_java_method,
16799 end_java_method, give_name_to_locals, expand_byte_code,
16800 open_in_zip, set_constant_value, find_constant1, find_constant2,
16801 find_utf8_constant, find_string_constant, find_class_constant,
16802 find_fieldref_index, find_methodref_index, write_constant_pool,
16803 count_constant_pool_bytes and encode_newarray_type.
16804
16805 * jcf-dump.c: Remove unused variable `LONG_temp'.
16806
16807 * jcf-parse.c: Include parse.h.
16808 (jcf_parse_source): Remove unused parameter, all callers changed.
16809 (jcf_figure_file_type): Add static prototype.
16810 (find_in_current_zip): Likewise. Also remove unused parameter,
16811 all callers changed.
16812 (read_class): Initialize variable `saved_pos'.
16813
16814 * jcf-reader.c (jcf_parse_preamble): Mark variables
16815 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16816
16817 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16818 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16819 (java_parse_doc_section): Initialize variable `seen_star'.
16820 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16821 (java_lex_error): Mark parameters `msg' and `forward' with
16822 ATTRIBUTE_UNUSED.
16823 (java_get_line_col): Mark parameters `filename' and `line' with
16824 ATTRIBUTE_UNUSED.
16825
16826 * parse-scan.y: Include toplev.h.
16827 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16828
16829 * parse.h: use `struct JCF', not plain `JCF'.
16830 (java_parser_context_save_global, java_expand_classes
16831 java_parser_context_restore_global, java_parse): Add prototypes.
16832
16833 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16834 `node'.
16835
16836 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
16837
16838 * check-init.c (check_init): COPYN takes word count, not bit count.
16839
16840 1999-02-26 Per Bothner <bothner@cygnus.com>
16841
16842 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
16843 explicit build_decl. (Avoids crash in reload when optimizing.)
16844
16845 1999-02-25 Per Bothner <bothner@cygnus.com>
16846
16847 * decl.c (complete_start_java_method): Handle synchronized method
16848 even when compiling from bytecode.
16849
16850 1999-02-26 Tom Tromey <tromey@cygnus.com>
16851
16852 * gjavah.c (add_class_decl): Only generate `#include' if outer
16853 class is not the name of the class we are processing. Correctly
16854 append `.h' in #include.
16855 (process_file): Clean up newlines around generated `#include's.
16856 (decode_signature_piece): Correctly handle inner classes.
16857 (struct include): New structure.
16858 (all_includes): New global.
16859 (print_include): New function.
16860 (add_class_decl): Use it.
16861 (process_file): Likewise.
16862 (add_class_decl): Generate include for java-array.h if array
16863 seen.
16864 (process_file): Don't generate java-array.h include.
16865
16866 * gjavah.c (add_namelet): Check for standard package names here.
16867 (add_class_decl): Don't check for standard package names here.
16868
16869 1999-02-25 Tom Tromey <tromey@cygnus.com>
16870
16871 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
16872 When reading a zip file, only use strncmp if both strings are
16873 bigger than the buffer length. Initialize `k' when looping
16874 through zip file.
16875
16876 1999-02-24 Tom Tromey <tromey@cygnus.com>
16877
16878 * gjavah.c (struct namelet): New structure.
16879 (add_namelet): New function.
16880 (print_namelet): New function.
16881 (print_class_decls): Use add_namelet and print_namelet to generate
16882 namespaces and not classes.
16883 (method_printed): New global.
16884 (HANDLE_END_METHOD): Examine method_printed.
16885 (print_method_info): Set method_printed when required. Print
16886 error if function to be ignored is marked virtual. Handle $finit$
16887 method.
16888 (METHOD_IS_FINAL): New macro.
16889 (print_field_info): Use it.
16890 (HANDLE_METHOD): Clear method_printed.
16891 (method_pass): New global.
16892 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
16893 (process_file): Do two passes over both fields and methods.
16894 (HANDLE_METHOD): Examine method_pass.
16895 (root): New global.
16896 (add_class_decl): New function.
16897 (print_class_decls): Don't scan over entire constant pool.
16898
16899 1999-02-23 Tom Tromey <tromey@cygnus.com>
16900
16901 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
16902 disable linking in that case.
16903
16904 1999-02-20 Tom Tromey <tromey@cygnus.com>
16905
16906 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
16907 not 0x1f.
16908
16909 1999-02-21 Per Bothner <bothner@cygnus.com>
16910
16911 * decl.c (build_result_decl), java-tree.h: New method.
16912 (complete_start_java_method): Handle synchronized methods.
16913 Don't build DECL_RESULT here. (Ordering dependency problem.)
16914 (start_java_method): Call build_result_decl here instead ...
16915 * parse.y (java_complete_expand_method): ... and here.
16916 (expand_start_java_method): Don't call complete_start_java_method here.
16917 (java_complete_expand_method): Call it here instead.
16918 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
16919 * java-tree.h: ... here.
16920
16921 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
16922 * parse.y (java_complete_lhs): Don't call force_evaluation_order
16923 for ARRAY_REF - it doesn't work when array bounds are checked.
16924 (patch_array_ref): Handle it here instead.
16925
16926 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
16927
16928 1999-02-19 Per Bothner <bothner@cygnus.com>
16929
16930 Force left-to-right evaluation of binary operations etc.
16931 * expr.c (force_evaluation_order), java-tree.h: New function.
16932 * parse.y (java_complete_lhs): Pass binary operations, procedure
16933 calls, and ARRAY_REFs to force_evaluation_order.
16934 (various): Set TREE_SIDE_EFFECTS more carefully.
16935
16936 Tolerate random (non-UTF8) encoding in comments without complaining.
16937 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
16938 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
16939
16940 * parse.y (resolve_qualified_expression_name): Handle error_mark.
16941 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
16942
16943 * parse.y (java_complete_lhs): Ignore an empty statement in a
16944 COMPOUND_EXPR. Don't complain about empty statement after return.
16945
16946 1999-02-19 Per Bothner <bothner@cygnus.com>
16947
16948 * parse.y (obtain_incomplete_type): Don't wrap unknown types
16949 in TREE_LIST - just chain the POINTER_TYPEs together.
16950 (resolve_class): If type already resolved, return decl.
16951 After resolving, update TREE_TYPE(class_type), and name (if array).
16952 * parse.h (do_resolve_class), parse.y: Make non-static.
16953 * class.c (maybe_layout_super_class): Take this_class argument.
16954 Do do_resolve_class if necessary.
16955 (layout_class, layout_class_methods): Adjust calls appropriately.
16956 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16957 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
16958 * typeck.c (build_java_array_type): Don't call layout_class.
16959
16960 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16961
16962 * parse.y (check_pkg_class_access): Allow private class access
16963 within the same package.
16964 (strip_out_static_field_access_decl): New function.
16965 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
16966 operator argument before testing its nature.
16967
16968 1999-02-03 Per Bothner <bothner@cygnus.com>
16969
16970 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
16971 (TRY_EXPR): Simplify - it no longer has a finally clause.
16972 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
16973 Simpler handling of TRY_EXPR, which no longer has a finally clause.
16974 * expr.c (java_lang_expand_expr): Likewise.
16975 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
16976 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
16977 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
16978 (build_try_statement): Remove finally parameter and handling.
16979 (build_try_finally_statement): New function.
16980 (patch_try_statement): No longer need to support finally clause.
16981 (try_statement): Update grammar action rules.
16982 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
16983 Simpler handling of TRY_EXPR, which no longer has a finally clause.
16984
16985 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
16986
16987 * jcf-parse.c (get_constant): Add braces around computation of 'd'
16988 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
16989
16990 1999-02-17 Andrew Haley <aph@cygnus.com>
16991
16992 * class.c (build_utf8_ref): Back out broken patch which was
16993 intended to to output signatures using '.' as a separator.
16994
16995 * class.c (make_class_data): Output signatures using '.' as a
16996 separator, rather than '/'.
16997 (mangled_classname): Likewise.
16998 (make_field_value): Likewise.
16999 (make_method_value): Likewise.
17000 * constants.c (alloc_class_constant): Likewise.
17001 * expr.c (build_invokeinterface): Likewise.
17002
17003 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17004
17005 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17006 of an ancient workaround.
17007
17008 1999-02-10 Jeffrey A Law (law@cygnus.com)
17009
17010 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17011 here anymore.
17012
17013 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17014
17015 * lex.c (yylex): Encode \0 as UTF8.
17016
17017 1999-02-10 Tom Tromey <tromey@cygnus.com>
17018
17019 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17020 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17021 (libgcj_zip): Renamed.
17022 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17023 LIBJAVA_ZIP_FILE.
17024 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17025
17026 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17027 (GC_NAME): Renamed -lgc to -lgcjgc.
17028
17029 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17030
17031 * lex.c (java_lang_cloneable): Initialize.
17032 * parse.y (java_lang_cloneable): New static variable.
17033 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17034 doing one more qualification round.
17035 (valid_ref_assignconv_cast_p): Reject null source or
17036 destination. Allow an array to be cast into java.lang.Cloneable.
17037 (patch_cast): Swapped two first arguments to first call to
17038 valid_ref_assignconv_cast_p.
17039
17040 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17041
17042 * parse.h: DECL_P renamed JDECL_P.
17043 * parse.y: DECL_P replaced by JDECL_P.
17044 (build_array_from_name): Always use pointer's type.
17045 (patch_bc_statement): Extra code to search continue target in a
17046 for loop. Fixed comments. Continue target is current loop when
17047 unlabeled.
17048
17049 1999-02-05 Andrew Haley <aph@cygnus.com>
17050
17051 * class.c (make_class_data): The superclass of an interface should
17052 be null, not class Object.
17053
17054 * lex.c (java_lex): Sign extend hex literals.
17055
17056 1999-02-04 Andrew Haley <aph@cygnus.com>
17057
17058 * class.c (build_utf8_ref): Output signatures using '.' as a
17059 separator, rather than '/'.
17060 (make_class_data): Likewise.
17061
17062 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17063
17064 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17065 mkstemp.o. Get them from libiberty now.
17066
17067 1999-02-02 Jeffrey A Law (law@cygnus.com)
17068
17069 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17070
17071 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17072
17073 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17074 from libiberty.h
17075
17076 1999-02-02 Per Bothner <bothner@cygnus.com>
17077
17078 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17079 * jcf-write.c (generate_bytecode_return): New function.
17080 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17081
17082 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17083 generate special [fd]const_[01] instructions.
17084
17085 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17086
17087 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17088 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17089
17090 1999-02-01 Per Bothner <bothner@cygnus.com>
17091
17092 * parse.y (patch_method_invocation): Handle calling static methods,
17093 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17094
17095 * parse.y (java_complete_lhs): Don't complain about unreachable
17096 exit condition in a do-while statement.
17097
17098 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
17099
17100 * lex.c (java_read_char): Fixed utf8 decoding.
17101 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17102 range.
17103 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17104 comments. Local variable `all_primitive' is gone. Broadened
17105 acceptance of `0' to floating point targets. `long' can now be
17106 widened to `double' or `float'.
17107 (valid_method_invocation_conversion_p): Added leading
17108 comment. Fixed tabulation.
17109 (build_string_concatenation): Optimize out left or right empty
17110 string constants.
17111
17112 1999-01-28 Per Bothner <bothner@cygnus.com>
17113
17114 * jcf-write.c (localvar_alloc): Only emit entry for
17115 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17116 (generate_bytecode_insns): Only call put_linenumber if
17117 debug_info_level > DINFO_LEVEL_NONE.
17118 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17119 is specified, add -g1 (for compatibility wih javac).
17120
17121 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
17122
17123 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17124 gjavah.o, check-init.o, jv-scan.o
17125
17126 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17127
17128 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17129
17130 * gjavah.c: Include config.h and system.h.
17131
17132 * javaop.h (inline): Don't define, its handled by system.h.
17133 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17134 from `inline' to `static inline'.
17135
17136 * jcf.h (inline): Don't define, its handled by system.h.
17137
17138 * lex.c (inline): Likewise.
17139
17140 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
17141
17142 * lang-specs.h: Map -Qn to -fno-ident.
17143
17144 1999-01-29 Richard Henderson <rth@cygnus.com>
17145
17146 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17147
17148 1999-01-29 Tom Tromey <tromey@cygnus.com>
17149
17150 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17151 then cast it to Object before calling `append' method.
17152
17153 1999-01-28 Per Bothner <bothner@cygnus.com>
17154
17155 * check-init.c (check_bool2_init, check_bool_init, check_init):
17156 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17157 * jcf-write.c (generate_bytecode_insns): Likewise.
17158
17159 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17160
17161 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17162 * parse.y (patch_cast): Allow a boolean to be cast into a
17163 boolean.
17164
17165 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17166
17167 * parse.y: (class_declaration:): Fixed indentation.
17168 (class_member_declaration:): Extra `;' after field declaration now
17169 accepted.
17170 (interface_declaration:): Removed debug messages in error reports.
17171 (patch_binop): Nodes created and returned inherit the orignal
17172 node's COMPOUND_ASSIGN_P flag value.
17173 (patch_cast): Fix cast from char to floating point.
17174
17175 1999-01-25 Andrew Haley <aph@cygnus.com>
17176
17177 * except.c, java-except.h (expand_resume_after_catch): new
17178 function.
17179 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17180 to branch back to main flow of control after a catch block.
17181
17182 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17183
17184 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17185 $(srcdir)/../system.h.
17186 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17187 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17188 (jcf-write.o): Likewise.
17189 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17190 (mangle.o): Depend on $(srcdir)/../toplev.h.
17191 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17192 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17193
17194 * class.c: Include output.h and parse.h.
17195 (mangled_classname): Add the `const' keyword to a char*.
17196 (find_named_method): Hide unused function definition.
17197 (build_utf8_ref): Change type of variable `c' to unsigned char.
17198 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17199 (build_class_ref): Add the `const' keyword to a char*.
17200 (layout_class_method): Remove unused variable `buf'.
17201
17202 * decl.c (find_local_variable): Remove unused variable `rtl'.
17203 (pushdecl): Likewise for variables `different_binding_level' and
17204 `oldglobal'.
17205 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17206 (maybe_build_cleanup): Likewise for parameter `decl'.
17207
17208 * except.c (expand_start_java_handler): Mark parameter `range'
17209 with ATTRIBUTE_UNUSED.
17210
17211 * expr.c: Include except.h.
17212 (pop_type): Remove unused variable `i'.
17213 (pop_value): Likewise for variables `n_words' and `i'.
17214 (expand_java_arrayload): Likewise for variable `convert'.
17215 (java_lang_expand_expr): Likewise for variables `op0', `type',
17216 `mode', `unsignedp', `node' and `elements'.
17217 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17218 `eh_ranges'.
17219 (process_jvm_instruction): Add a `const' qualifier to a char*.
17220
17221 * gjavah.c (output_directory): Add the `const' keyword to a char*.
17222 (temp_directory): Likewise.
17223 (print_c_decl): Likewise.
17224 (print_method_info): Likewise.
17225 (decode_signature_piece): Likewise.
17226 (print_mangled_classname): Likewise.
17227
17228 * java-except.h: Provide prototypes for maybe_start_try,
17229 maybe_end_try and add_handler.
17230
17231 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17232 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
17233 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17234 init_expr_processing, push_super_field, init_class_processing,
17235 can_widen_reference_to, class_depth, verify_jvm_instructions,
17236 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17237 set_local_type, merge_type_state, push_type, load_type_state,
17238 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17239 emit_unicode_mangled_name): Add prototypes.
17240
17241 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17242 (print_signature_type): Use ISDIGIT, not isdigit.
17243 (print_signature): Remove unused variable `j'.
17244
17245 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17246 int when comparing against one.
17247
17248 * jcf-parse.c: Include toplev.h.
17249
17250 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
17251 (localvar_free): Remove unused variable `i'.
17252 (generate_bytecode_conditional): Likewise for variable `kind'.
17253
17254 * jv-scan.c: Include config.h and system.h. Remove redundant
17255 OS header and gansidecl.h includes.
17256 (warning): Add the `const' keyword to a char*. Also add
17257 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
17258 __STDC__, when determining whether to use ANSI-isms.
17259 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
17260 (xmalloc): Don't redundantly prototype here.
17261 (main): Remove unused parameter `envp'. Also fix the arguments
17262 passed to function `fatal' to match the format specifier.
17263
17264 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17265
17266 * mangle.c: Include toplev.h.
17267 (emit_unicode_mangled_name): Declare parameter `len'.
17268
17269 * parse.y (parse_warning_context): Add the `const' keyword to a
17270 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
17271 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17272 (issue_warning_error_from_context): Add the `const' keyword to
17273 a char*.
17274 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
17275 not `__STDC__' for whether to use ANSI-isms.
17276
17277 * typeck.c (incomplete_type_error): Mark parameters `value' and
17278 `type' with ATTRIBUTE_UNUSED.
17279 (parse_signature_type): Use ISDIGIT, not isdigit.
17280
17281 * verify.c (check_pending_block): Add the `const' keyword to a char*.
17282 (verify_jvm_instructions): Likewise. Remove unused variables
17283 `field_name' and `default_val'.
17284
17285 * zextract.c: Include config.h and system.h. Remove redundant
17286 OS header includes.
17287
17288 * zipfile.h: Prototype `read_zip_archive'.
17289
17290 1999-01-21 Andrew Haley <aph@cygnus.com>
17291
17292 * typeck.c (convert): Allow conversions to void type: some
17293 optimizations in gcc do this.
17294
17295 1999-01-21 Andrew Haley <aph@cygnus.com>
17296
17297 * typeck.c (convert_ieee_real_to_integer): New function.
17298 (convert): When not using fast-math and using hardware fp, convert
17299 an IEEE NaN to zero.
17300
17301 1999-01-18 Andrew Haley <aph@cygnus.com>
17302
17303 * parse.y (patch_binop): Do a type conversion from signed to
17304 unsigned and then back to signed when a ">>>" is found.
17305
17306 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17307
17308 * java-tree.h: (check_for_initialization): Added prototype.
17309 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17310 * parse.y (do_resolve_class): Removed unused locals.
17311 (read_import_dir): Likewise.
17312 (resolve_qualified_expression_name): Array creation
17313 expressions are valid primary expressions.
17314 (qualify_ambiguous_name): Likewise.
17315 (patch_synchronized_statement): Removed unused local.
17316
17317 1999-01-17 Jeffrey A Law (law@cygnus.com)
17318
17319 * Makefile.in (zextract.o): Add dependencies.
17320
17321 * Makefile.in: Do not put ^Ls at the start of a line.
17322
17323 1999-01-15 Per Bothner <bothner@cygnus.com>
17324
17325 * expr.c (process_jvm_instruction): Coerce to correct Throwable
17326 sub-type the result of the call that gets the exception value.
17327
17328 * parse.y (java_complete_expand_methods): If flags_syntax_only,
17329 don't call finish_class.
17330
17331 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
17332 clear found before continuing.
17333
17334 * verify.c (verify_jvm_instructions): On an array load, allow
17335 and handle top of stack to be TYPE_NULL.
17336
17337 * gjavah.c (generate_access): Translate Java package private or
17338 protected access to C++ public, but with a comment.
17339
17340 1999-01-13 Andrew Haley <aph@cygnus.com>
17341
17342 * expr.c (generate_name): Name prefix changed to avoid clashes
17343 with assembler temp labels.
17344
17345 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17346 MODIFY_EXPR. Without this, code for the assignment may not be
17347 generated at all and the synchronized statement will read an
17348 uninitialized variable.
17349
17350 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17351
17352 * class.c (maybe_layout_super_class): Fixed returned value.
17353 * lex.c: Added 1999 to the copyright.
17354 (java_init_lex): Initialize java_lang_imported.
17355 * lex.h: Added 1999 to the copyright.
17356 * parse.h: Added 1999 to the copyright.
17357 (REGISTER_IMPORT): Fixed typo in trailing macro.
17358 (CURRENT_OSB): New macro.
17359 (struct parser_ctxt): New fields osb_depth, osb_limit.
17360 * parse.y (java_lang_id): New global variable.
17361 (type_import_on_demand_declaration): Don't import java.lang.* twice.
17362 (array_creation_expression:): Use CURRENT_OSB.
17363 (dims:): Uses a stack to keep track of array dimensions.
17364 (cast_expression:): Use CURRENT_OSB.
17365 (find_expr_with_wfl): Return NULL if node found doesn't meet the
17366 conditions.
17367 (register_fields): Fixed typos in comment.
17368 (check_method_redefinition): Fixed comment indentation.
17369 (java_check_regular_methods): Set saved found wfl to NULL after
17370 having reinstalled it in the previously found DECL_NAME.
17371
17372 1999-01-10 Richard Henderson <rth@cygnus.com>
17373
17374 * gjavah.c (java_float_finite): Use a union to do type punning.
17375 (java_double_finite): Likewise.
17376
17377 1999-01-09 Per Bothner <bothner@cygnus.com>
17378
17379 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
17380 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17381 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
17382 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
17383 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17384 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
17385
17386 1999-01-08 Per Bothner <bothner@cygnus.com>
17387
17388 * check-init.c (check_init): If compiling to native, we don't
17389 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
17390
17391 1999-01-08 Tom Tromey <tromey@cygnus.com>
17392
17393 * parse-scan.y (variable_declarator_id): Set or increment
17394 bracket_count.
17395 (bracket_count): New global.
17396 (formal_parameter): Handle case where bracket pairs trail variable
17397 declarator id.
17398
17399 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
17400
17401 * jcf-parse.c (yyparse): variable len changed from a char to an
17402 int to prevent overflow.
17403
17404 1999-01-06 Per Bothner <bothner@cygnus.com>
17405
17406 * java-tree.h: Declare read_class.
17407 * jcf-parse.c (read_class): New function.
17408 (load_class): Now just call read_class.
17409
17410 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
17411 * jcf-parse.c (parse_source_file): Declare save_error_count,
17412 which is needed by java_parse_abort_on_error macro,
17413 * parse.y (java_layout_classes, java_expand_classes): Likewise.
17414
17415 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
17416 constructor, if initializing a static field.
17417 (patch_new_array_init): Set TREE_CONSTANT if it is.
17418 * expr.c (java_lang_expand_expr): For a static array constructor
17419 of primitive elements, allocate the array itself statically.
17420 Disabled until we can set the vtable field statically.
17421
17422 * check-init.c: New file. Checks for definite assignment.
17423 * Makefile.in (JAVA_OBJS): Add check-init.o.
17424 * parse.y (java_complete_expand_method): Call check_for_initialization.
17425 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
17426
17427 1999-01-06 Graham <grahams@rcp.co.uk>
17428
17429 * parse.y : include system.h instead of including
17430 standard headers directly with the exception of <dirent.h>.
17431
17432 1999-01-06 Per Bothner <bothner@cygnus.com>
17433
17434 * lex.h: Moved static function declarations to lex.c,
17435 to shut up some -Wall warnings.
17436 * lex.c: Static function declarations moved here.
17437 * jcf-dump.c: Small fixes to shut up -Wall warnings.
17438
17439 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17440
17441 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17442
17443 1998-12-22 Per Bothner <bothner@cygnus.com>
17444
17445 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
17446 * verify.c (verify_jvm_instructions): Fix off-by-one error.
17447
17448 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
17449 (localvar_alloc): Change return type to void,
17450 (emit_unop): Remove unused variable size.
17451
17452 * jcf-write.c (struct jcf_block): Add new union.
17453 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
17454 (call_cleanups): New functions.
17455 (struct jcf_partial): New fields num_finalizers and return_value_decl.
17456 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
17457 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17458 * lang.c (lang_init): Call using_eh_for_cleanups.
17459 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
17460 completing operands to patch_synchronized_statement.
17461 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17462 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17463 WITH_CLEANUP_EXPR instead of TRY_EXPR.
17464
17465 1998-12-20 John F. Carr <jfc@mit.edu>
17466
17467 * Make-lang.in: Comment out control-Ls; they upset some makes.
17468
17469 1998-12-18 Tom Tromey <tromey@cygnus.com>
17470
17471 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17472 consistently.
17473
17474 1998-12-17 Tom Tromey <tromey@cygnus.com>
17475
17476 * parse.y (DIR_SEPARATOR): New define.
17477 (check_class_interface_creation): Use it.
17478
17479 * parse-scan.y (report_main_declaration): Recognize
17480 `java.lang.String' in argument to main.
17481
17482 1998-12-16 Per Bothner <bothner@cygnus.com>
17483
17484 * parse.y (create_interface): Remove bogus test.
17485
17486 1998-12-16 Per Bothner <bothner@cygnus.com>
17487
17488 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
17489 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
17490
17491 1998-12-16 Tom Tromey <tromey@cygnus.com>
17492
17493 * parse-scan.y (qualified_name): Use correct sprintf format.
17494
17495 1998-12-15 Tom Tromey <tromey@cygnus.com>
17496
17497 * gjavah.c (print_field_info): Changed how most negative number is
17498 printed.
17499
17500 1998-12-14 Per Bothner <bothner@cygnus.com>
17501
17502 * parse.y (fold_constant_for_init): New function.
17503 (resolve_expression_name): Don't replace static final
17504 constant-initialized fields by its value.
17505 (java_complete_lhs): New. Same as java_complete_tree, except does
17506 not replace static final constant-initialized fields by their values.
17507 (register_fields): If there is an initializer, set DECL_INITIAL and
17508 MODIFY_EXPR_FROM_INITIALIZATION_P.
17509 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
17510 Only call patch_initialized_static_field if
17511 MODIFY_EXPR_FROM_INITIALIZATION_P.
17512 (patch_initialized_static_field): If not valid constant, clear
17513 DECL_INITIAL.
17514
17515 * parse.y (lookup_field_wrapper): Fix thinko.
17516
17517 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
17518 set and restore global lineno.
17519
17520 1998-12-14 Tom Tromey <tromey@cygnus.com>
17521
17522 * gjavah.c (print_field_info): If value to print is the smallest
17523 value of its size, then print as hex to avoid later warnings from
17524 C++ compiler.
17525
17526 1998-12-14 Tom Tromey <tromey@cygnus.com>
17527
17528 * gjavah.c (decompile_method): Decompile `return null'.
17529 (process_file): Generate `#pragma interface'.
17530 (method_declared): New global.
17531 (print_method_info): Set it.
17532 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17533 (print_method_info): Handle abstract methods.
17534
17535 1998-12-13 Per Bothner <bothner@cygnus.com>
17536
17537 * parse.y (patch_method_invocation): If class_decl is null
17538 (e.g. an array type), use original type.
17539
17540 * parse.y (check_thrown_exceptions): Temporary hack to suppress
17541 errors about uncaught exception from clone (of array, specifically).
17542
17543 1998-12-13 Tom Tromey <tromey@cygnus.com>
17544
17545 * gjavah.c (decompile_method): Handle all types of `return'
17546 opcode. Decompile `return this' and `return'.
17547 (method_access): New global.
17548 (print_method_info): Set it.
17549 (decompile_method): Don't decompile a synchronized method.
17550
17551 1998-12-13 Tom Tromey <tromey@cygnus.com>
17552
17553 * jcf-reader.c (jcf_parse_one_method): Recognize
17554 HANDLE_END_METHOD.
17555 * gjavah.c (HANDLE_END_METHOD): New macro.
17556 (HANDLE_CODE_ATTRIBUTE): New macro.
17557 (decompile_method): New function.
17558 (print_method_info): Don't print `;\n' at end of function decl.
17559 Include java-opcodes.h.
17560 (decompiled): New global.
17561
17562 1998-12-12 Per Bothner <bothner@cygnus.com>
17563
17564 * class.c (build_class_ref): Handle PRIMTYPE.class if
17565 flag_emit_class_files.
17566 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
17567 if flag_emit_class_files.
17568 * parse.y (java_complete_tree): Pre-liminary support for
17569 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17570
17571 * parse.y (patch_synchronized_statement): Don't call monitorexit
17572 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
17573
17574 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
17575
17576 * zipfile.h (opendir_in_zip): New declaration.
17577 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
17578 (opendir_in_zip): New function, using code from open_in_zip.
17579 (open_in_zip): Call opendir_in_zip.
17580 (find_class): Remove no-longer-used do_class_file parameter,
17581 but add source_ok parameter. Change logic so if we find a .java file,
17582 we don't look for .class in later classpath emtries.
17583 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
17584 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
17585 * gjavah.c: Update call to find_class.
17586 * jcf-dump.c: Likewise.
17587
17588 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
17589 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
17590 nothing if body is empty_stmt_node.
17591 Various little fixes so SP gets correctly adjusted.
17592 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17593 For CALL_EXPR, test if static first.
17594 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
17595 such as the ones we create for Object and Class.
17596 Set and restore current_function_decl.
17597 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17598 (note_possible_classname): New function.
17599 (read_import_entry): Removed. Merged with read_import_dir.
17600 (read_import_dir): Don't call find_class - that only gives us
17601 the first classpath entry having the needed package.
17602 Use the struct buffer data structure from buffer.h.
17603 (read_import_dir, find_in_imports_on_demand): The remembered
17604 class names now use '.' (not '/') as package separator.
17605
17606 * parse.y (java_complete_expand_methods): Call write_classfile
17607 here, and not in java_expand_classes (which only gets first class).
17608
17609 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17610
17611 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
17612 (register_fields): If a static fields has an initializer, just
17613 chain it on ctxp->static_initialized, and handle later.
17614 (java_complete_expand_methods): Force <clinit> first.
17615 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
17616 - it's already been completed.
17617 (patch_initialized_static_field): New function.
17618 (java_complete_field): Call it.
17619
17620 1998-12-12 Per Bothner <bothner@cygnus.com>
17621
17622 * expr.c (encode_newarray_type, build_new_array): New functions.
17623 * java-tree.h: Declare build_new_array.
17624 * jcf-write.c (patch_newarray): Use build_new_array.
17625
17626 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
17627 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
17628
17629 * parse.y (patch_new_array_init): Re-organize.
17630 Now is passed the actual array (pointer) type of the value.
17631 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17632 (patch_array_constructor): Removed - merged into patch_new_array_init.
17633 (java_complete_tree): Update patch_new_array_init.
17634
17635 * jcf-write.c (find_constant_index): New function.
17636 (generate_bytecode_insns): Use find_constant_index.
17637 (generate_classfile): Use find_constant_index for ConstantValue.
17638
17639 1998-12-11 Tom Tromey <tromey@cygnus.com>
17640
17641 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17642 * decl.c (init_decl_processing): Renamed dtable -> vtable.
17643 * class.c (make_class_data): Renamed dtable -> vtable, and
17644 dtable_method_count -> vtable_method_count.
17645
17646 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17647
17648 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17649 global variables, initialized.
17650 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17651 Declared new global variables.
17652 * lex.c (java_lex): Return long_zero_node, float_zero_node,
17653 double_zero_node, integer_zero_node upon direct matching.
17654 * parse.y (purify_type_name): Added function prototype.
17655 (duplicate_declaration_error_p): Consider new_type as potentially
17656 being a incomplete type. Use purify_type_name on type string.
17657 (method_header): saved_type: unused variable removed. Don't figure
17658 return type if method name is invalid.
17659 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17660 processed by patch_unaryop.
17661 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17662 increment/decrement node into its original type after binary
17663 numeric promotion on its operands.
17664
17665 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17666
17667 * parse.y (array_initializer:): Array init operand is NULL_TREE
17668 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17669 now an error. Fixed indentation problems.
17670 (patch_string): Handle error_mark_node as an argument.
17671 (patch_new_array_init): Fixed indentation problems.
17672 (array_constructor_check_entry): Removed check on null wfl_value.
17673 Return an error if wfl_value's walk returns an error.
17674
17675 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17676
17677 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17678 * lex.c (java_lex): Remember column position before advancing one
17679 token. Retain location information on OCB_TK.
17680 * lex.h (typedef struct java_lc): Added new field.
17681 * parse.h (GET_SKIP_TYPE): New macro.
17682 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17683 * parse.y (build_new_array_init, patch_new_array_init,
17684 patch_array_constructor, maybe_build_array_element_wfl,
17685 array_constructor_check_entry): New function prototypes.
17686 (switch_block:): Tagged <node>.
17687 (OCB_TK): Tagged <operator>.
17688 (array_initializer:): Installed actions.
17689 (variable_initializer): Build location information on element if
17690 necessary.
17691 (switch_statement:): Fixed indentation typo.
17692 (switch_block:): Redefined default action.
17693 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17694 (patch_assignment): Removed duplicate code.
17695 (maybe_build_array_element_wfl, build_new_array_init,
17696 patch_new_array_init, patch_array_constructor,
17697 array_constructor_check_entry): New functions.
17698
17699 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
17700
17701 * parse.y (array_initializer): Tagged <node>.
17702 (variable_initializer:): Use default rule.
17703 (array_initializer:): Defined actions.
17704 (variable_initializers:): Likewise.
17705 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17706 non-static field accesses.
17707 (patch_invoke): Fixed indentation typo.
17708 (java_complete_tree): Likewise.
17709 (build_labeled_block): Changed leading comment. Generate an error
17710 in case of duplicate loop labels.
17711 (patch_conditional_expr): Patch results of string concatenation
17712 operations.
17713
17714 1998-12-06 Per Bothner <bothner@cygnus.com>
17715
17716 * constants.c (find_methodref_index): When the class is an interface,
17717 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17718
17719 * decl.c (finit_identifier_node): Use "$finit$", rather than
17720 "<finit>" (which Sun's verifier rejects).
17721 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
17722 (generate_field_initialization_code): Removed.
17723 (fix_constructors) Don't add call to $finit$ here (wrong order).
17724 (patch_method_invocation): Add $finit$ call here.
17725
17726 * java-tree.h (CALL_USING_SUPER): New macro.
17727 * parse.y (patch_invoke): Remove im local variable.
17728 (patch_method_invocation, patch_invoke): Don't pass super parameter.
17729 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
17730 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
17731
17732 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
17733
17734 * parse.y (java_complete_tree): Don't complain about unreachable
17735 statement if it is empty_stmt_node.
17736
17737 * jcf-write.c (find_constant_wide): New function.
17738 (push_long_const): Use find_constant_wide.
17739
17740 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
17741 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
17742 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17743 Emit invokeinterface when calling an interface method.
17744 Emit invokespecial also when calling super or private methods.
17745
17746 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
17747
17748 1998-12-06 Per Bothner <bothner@cygnus.com>
17749
17750 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
17751
17752 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
17753
17754 * java-tree.h (java_layout_seen_class_methods): New function
17755 prototype.
17756 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17757 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17758 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17759 * parse.y (method_declarator:): Defined action.
17760 (issue_warning_error_from_context): input_filename saved, set to
17761 the appropriate value and restored after java_error is called.
17762 (build_unresolved_array_type): Fixed comment.
17763 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17764 (method_header): Deal with return type the same way type are
17765 handled for fields and method's parameters and local variables
17766 types are handled.
17767 (check_method_redefinition): Removed extra CR.
17768 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17769 (java_layout_seen_class_methods): New function.
17770 (java_layout_classes): Call java_layout_seen_class_methods.
17771
17772 1998-12-03 Per Bothner <bothner@cygnus.com>
17773
17774 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
17775
17776 1998-12-03 Per Bothner <bothner@cygnus.com>
17777
17778 * jcf-dump.c (main): Fix error message.
17779 * jcf-path.c (add_entry): Style fix.
17780
17781 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
17782
17783 * class.c (layout_class_method): Call build_java_argument_signature
17784 on constructors too.
17785 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
17786 (patch_method_invocation): Define a primary when resolving an
17787 expression name. Augmented comment on code checking illegal `this'
17788 usage. Loosened it test by accepting NEW_CLASS_EXPR.
17789
17790 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
17791
17792 * class.c (layout_class_method): Don't report error on non-static
17793 overriding static if the method is private.
17794 * java-tree.h (finish_class): Prototype added.
17795 * lex.c (java_get_line_col): Handle col argument -2 value.
17796 * parse.h: All static method declarations moved to parse.y.
17797 * parse.y: Now contains all static method declarations previously
17798 found in parse.h.
17799 (find_expr_with_wfl, missing_return_error,
17800 unreachable_stmt_error): New functions.
17801 (java_get_real_method_name): Identify constructors bearing class
17802 names in source code compiled classes only.
17803 (java_complete_expand_methods): Call missing_return_error.
17804 (invocation_mode): Private methods invoked as static methods.
17805 (java_complete_tree): Call unreachable_stmt_error.
17806
17807 1998-12-01 Tom Tromey <tromey@cygnus.com>
17808
17809 * Makefile.in (+target): Removed.
17810 (+xmake_file): Likewise.
17811 (+tmake_file): Likewise.
17812 (.NOEXPORT): Removed duplicate.
17813
17814 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17815
17816 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17817
17818 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
17819
17820 * jvgenmain.c: Remove the xmalloc prototype, we get it from
17821 libiberty.h. Provide an xmalloc definition.
17822
17823 * jvspec.c: Remove the xmalloc prototype.
17824
17825 * parse-scan.y: Include config.h and system.h. Don't include
17826 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
17827 Provide an xstrdup definition.
17828
17829 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
17830
17831 * jcf-path.c (add_entry): Recognize ".jar" too.
17832 * lang-specs.h: Likewise.
17833
17834 1998-11-26 Per Bothner <bothner@cygnus.com>
17835
17836 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
17837 soft_monitorenter_node, soft_monitorexit_node, throw_node.
17838
17839 * jcf-write.c (generate_bytecode_insns):
17840 Handle pre/post-increment/decrement of long.
17841
17842 * jcf-write.c (generate_bytecode_insns):
17843 Handle missing exception handler (finally for synchronized).
17844
17845 1998-11-25 Per Bothner <bothner@cygnus.com>
17846
17847 * java-tree.h (end_params_node): Declare global.
17848 * decl.c (end_params_node): New global.
17849 (init_decl_processing, start_java_method): Use end_params_node for
17850 end of list of parameter types. Follows correct gcc conventions.
17851 * expr.c (pop_argument_types, pop_arguments): Likewise.
17852 * lang.c (put_decl_node): Likewise.
17853 * typeck.c (various places): Likewise.
17854 * class.y (various places): Likewise.
17855 * parse.y (various places): Likewise.
17856
17857 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
17858 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
17859
17860 * class.c: Add #include flags.h, remove no-longer needed declaration.
17861
17862 * class.c (layout_class_method): Remove commented-out code, re-format.
17863 Don't add vtable entry (or index) for private methods.
17864 * expr.c (expand_invoke): A private method is implicitly final.
17865 * class.c (make_class_data): If inlining or optimizing,
17866 skip private methods.
17867
17868 * class.c (finish_class): New function. Calls existing methods,
17869 but alls emits deferred inline functions.
17870 * jcf-parse.c (parse_class_file): Call finish_class.
17871 * parse.y (java_complete_expand_methods): Likewise.
17872
17873 * expr.c (build_java_binop): Explicit default, to silence -Wall.
17874
17875 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
17876
17877 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
17878
17879 * jcf-write.c (generate_bytecode_conditional): Fix typo.
17880
17881 1998-11-24 Per Bothner <bothner@cygnus.com>
17882
17883 * (generate_classfile): Always write class access flag with
17884 ACC_SUPER set.
17885
17886 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
17887
17888 * class.c (maybe_layout_super_class): New function.
17889 (layout_class): Reorganized. Loop on class methods dispatched into
17890 a new function. Call maybe_layout_super_class.
17891 (layout_class_methods, layout_class_method): New functions.
17892 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
17893 class.
17894 (expand_invoke): Likewise.
17895 * java-tree.h (all_class_list): New global variable declared.
17896 (layout_class_methods, layout_class_method): New function
17897 prototypes.
17898 (LAYOUT_SEEN_CLASS_METHODS): New macro.
17899 * jcf-parse.c (all_class_list): New global variable.
17900 (load_class): Extended what class_or_name can be. Use parser
17901 context mechanism to save globals before calling jcf_parse.
17902 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
17903 is set on the file name.
17904 (jcf_parse): Layout class methods when Object is loaded, otherwise
17905 record class in all_class_list for delayed method layout.
17906 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
17907 * lang.c (put_decl_node): Decode <init> into the decl context
17908 class name.
17909 * lex.c (java_allocate_new_line): Use xmalloc.
17910 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
17911 pointers, not TREE_LIST elements.
17912 (struct parser_ctxt): Fixed comment indentations, added comments
17913 and reordered some fields.
17914 (java_check_methods): Function prototype removed.
17915 * parse.y (java_push_parser_context): Use xmalloc.
17916 (java_parser_context_restore_global): Pop extra pushed ctxp only
17917 when there's nothing next.
17918 (maybe_create_class_interface_decl): Fixed comment, add new
17919 created class decl to all_class_list.
17920 (method_header): Use GET_REAL_TYPE on argument's types.
17921 (method_declarator): Use GET_REAL_TYPE, change type to the real
17922 type in TREE_LIST dependency node. Build argument list with the
17923 real type.
17924 (create_jdep_list): Use xmalloc. Removed allocation error message.
17925 (obtain_incomplete_type): Fixed leading comment. Broadened
17926 incoming argument meaning.
17927 (register_incomplete_type): Use xmalloc. Removed allocation error
17928 message.
17929 (safe_layout_class): Fixed leading comment.
17930 (jdep_resolve_class): Reversed if statement condition and switch
17931 if and else bodies.
17932 (resolve_and_layout): Fixed leading comment. Broadened incoming
17933 argument meaning.
17934 (complete_class_report_errors): New local variable name, for
17935 clarity. purify_type_name used for all error cases.
17936 (java_get_real_method_name): Stricter check on constructors.
17937 (java_check_regular_methods): Reverse methods list only if not
17938 already laid out. Layout artificial constructor.
17939 (java_check_methods): Deleted.
17940 (source_start_java_method): Obtain incomplete type for patchable
17941 method arguments.
17942 (java_layout_classes): Fixed leading comment. Use
17943 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17944 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17945 before returning. Fixed comments.
17946 (java_expand_classes): Check for errors up front.
17947 (patch_method_invocation): Class to search is resolved and laid
17948 out.
17949
17950 1998-11-24 Per Bothner <bothner@cygnus.com>
17951
17952 * expr.c (java_lang_expand_expr): Add missing emit_queue.
17953
17954 * javaop.h (int8): Removed - not used.
17955 (jbyte): Redefine portably with correct signedness.
17956
17957 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
17958
17959 * jcf-write.c (generate_bytecode_insns): Fix typo
17960 OPCODE_getstatic to OPCODE_getfield.
17961
17962 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
17963 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
17964 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17965
17966 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17967
17968 * jcf-parse.c (jcf_parse_source): Function returned type is
17969 void. Added prototype.
17970 (jcf_parse): Function returned type is void.
17971 (yyparse): Remove call to fclose on the last parsed file.
17972
17973 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17974
17975 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17976
17977 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17978 (layout_class): Cope with methods featuring WFL in decl names.
17979 * decl.c (unqualified_object_id_node): New global variable,
17980 initialized.
17981 (build_decl_no_layout): Removed.
17982 * expr.c (build_primtype_type_ref): Handle Double.
17983 (java_lang_expand_expr): Fixed indentations.
17984 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17985 (flag_wall, flag_redundant, flag_not_overriding,
17986 flag_static_local_jdk1_1, unqualified_object_id_node): Global
17987 variable declarations.
17988 (build_decl_no_layout): Removed prototype.
17989 (java_get_real_method_name): Added prototype.
17990 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17991 (java_parse_abort_on_error): Macro now just returns.
17992 * jcf-parse.c (jcf_parse_source): Check fclose returned
17993 value. Call emit_register_classes if java_report_errors returns
17994 zero.
17995 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
17996 flag_static_local_jdk1_1): New integer flags.
17997 (lang_decode_option): New flags set here.
17998 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17999 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18000 the flag_redundant variable.
18001 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18002 when parsing java.lang.Object class.
18003 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18004 NULL_TREE to build.
18005 (resolve_qualified_expression_name): Fixed indentation.
18006 (patch_array_ref): Changed prototype.
18007 (not_initialized_as_it_should_p): Prototype removed.
18008 (java_report_errors): Added function prototype.
18009 * parse.y (formal_parameter:): Changed error message for not yet
18010 supported final parameters.
18011 (class_type_list:): Set both PURPOSE and VALUE of created
18012 TREE_LIST to be class_type.
18013 (primary_no_new_array:): Handle class literals on primitive types.
18014 (parse_warning_context): Reinstalled correct force_error and
18015 do_warning flags setups.
18016 (java_report_errors): Changed prototype. Return java_error_count
18017 value.
18018 (variable_redefinition_error): Consider treating variable type as
18019 a fake pointer.
18020 (create_interface): Warn about redundant abstract modifier if
18021 flag_redundant is set. Changed error message.
18022 (lookup_field_wrapper): Save/restore globals before/after looking
18023 up field.
18024 (duplicate_declaration_error_p): Consider treating declaration
18025 type as a fake pointer.
18026 (register_fields): Extract real type from dependency node. Check
18027 for duplicate field declaration after type adjustment. Use
18028 DECL_INITIAL to store static final initialized values.
18029 (method_header): Extract real function type from dependency node.
18030 (check_abstract_method_header): Use GET_METHOD_NAME.
18031 (obtain_incomplete_type): Layout fake pointer type.
18032 (safe_layout_class): Don't try to check for methods before layout.
18033 (java_complete_class): Don't check for correct throws clause
18034 elements inheritance here.
18035 (resolve_and_layout): Broadened name parameter meaning.
18036 (reset_method_name): Use GET_METHOD_NAME.
18037 (java_get_real_method_name): New function.
18038 (java_check_regular_methods): Don't check methods in
18039 java.lang.Object. Verify lineage of throws clause elements. Use
18040 flag_no_overriding in warning report.
18041 (check_throws_clauses): Don't check if class was from
18042 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18043 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18044 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18045 warning on unsupported final local variables. Use build_decl
18046 instead of build_decl_no_layout. Get real local variable type from
18047 dependency node.
18048 (source_start_java_method): Get real parameter type from
18049 dependency node. Call build_decl instead of build_decl_no_layout.
18050 (java_layout_classes): Reverse tree and layout type and class as
18051 required. Mark class as loaded when done.
18052 (resolve_field_access): Fixed indentation. Restricted condition
18053 leading to static field access code generation. Set field_type
18054 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18055 (resolve_qualified_expression_name): Initialize type_found to
18056 null. Handle static field resolved during qualification. Fixed
18057 layout on non primitive field decl types.
18058 (not_accessible_p): Fixed typo in comment.
18059 (patch_method_invocation): Resolve and layout class to search from
18060 type.
18061 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18062 layout non primitive type, if necessary. Make method node only to
18063 report errors.
18064 (find_applicable_accessible_methods_list): Consider WFL'ed method
18065 decl names. Fixed indentation.
18066 (argument_types_convertible): Resolve and layout target type if
18067 necessary.
18068 (java_complete_tree): Fixed indentation problems. Rewrote
18069 CALL_EXPR thrown exceptions check. Re-installed further processing
18070 of the assignment in certain cases.
18071 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18072 inlining on class literals.
18073 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18074 0 literal.
18075 (valid_method_invocation_conversion_p): Likewise.
18076 (patch_string): Temporary disable forbidden use of `this' in
18077 explicit constructor invocations when doing string concatenation
18078 within their scope.
18079 (patch_unaryop): Added comment. Reinstalled code to disable
18080 further check on assignment operation with cast expression RHS.
18081 (patch_switch_statement): Fixed indentation.
18082 (build_try_statement): Call build_decl instead of
18083 build_decl_no_layout.
18084 (patch_synchronized_statement): Likewise.
18085 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18086 IS_UNCHECKED_EXPRESSION_P.
18087 (check_thrown_exceptions_do): Changed leading comment. Resolve and
18088 layout argument exception type.
18089 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18090 of IS_UNCHECKED_EXPRESSION_P.
18091
18092 1998-11-18 Anthony Green <green@cygnus.com>
18093
18094 * jcf-parse.c (yyparse): Open class file in binary mode.
18095
18096 1998-11-15 Per Bothner <bothner@cygnus.com>
18097
18098 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18099
18100 * jcf-write.c (perform_relocations): Move check out one loop.
18101
18102 1998-11-15 Anthony Green <green@hoser.cygnus.com>
18103
18104 * Make-lang.in: Fix reference to srcdir.
18105 * jv-scan.c: Add missing xmalloc prototype.
18106 * jvgenmain.c: Ditto.
18107
18108 1998-11-15 Per Bothner <bothner@cygnus.com>
18109
18110 * decl.c (error_mark_node), java-tree.h: New global.
18111 * parse.y: Use empty_stmt_node instead of size_zero_node.
18112 (build_if_else_statement): If missing else, use empty_stmt_node.
18113
18114 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18115 (java_complete_expand_method): Complain if return is missing.
18116 (java_check_regular_methods): Comment out incorrect error check.
18117 (not_accessible_p): Fix incorrect handling of protected methods.
18118 (patch_method_invocation): Pass correct context to not_accessible_p.
18119 (find_applicable_accessible_methods_list): Likewise.
18120 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18121 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18122 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18123 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18124
18125 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18126 (push_int_const): Remove reundant NOTE_PUSH.
18127 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18128 (- case SWITCH_EXPR): Fix code generation bug.
18129 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18130 (generate_classfile): More robust for abstract methods.
18131
18132 1998-11-15 Anthony Green <green@cygnus.com>
18133
18134 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18135 * Make-lang.in: Ditto.
18136
18137 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18138 * jvgenmain: Ditto.
18139
18140 1998-11-15 Per Bothner <bothner@cygnus.com>
18141
18142 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18143
18144 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18145
18146 1998-11-14 Per Bothner <bothner@cygnus.com>
18147
18148 Allow uses of interface types to verify. This is not really
18149 type-safe, but it matches what Sun does, and is OK as long as
18150 there are appropriate run-time checks.
18151 * verify.c (merge_types): If merging two interface types,
18152 just set the result to java.lang.Object.
18153 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18154
18155 1998-11-13 Tom Tromey <tromey@cygnus.com>
18156
18157 * gjavah.c (main): Handle --output-class-directory argument.
18158 * jvspec.c (lang_specific_driver): Translate `-d' into
18159 -foutput-class-dir.
18160 * jcf.h (jcf_write_base_directory): Declare.
18161 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18162 * lang-options.h: Mention -foutput-class-dir.
18163 * jcf-write.c (jcf_write_base_directory): New global.
18164 (make_class_file_name): Put generated .class file into `-d'
18165 directory, or into source directory if -d not given. Function now
18166 static.
18167 (write_classfile): Free class file name. Handle case where class
18168 file name is NULL.
18169 (DIR_SEPARATOR): New macro.
18170 Include <sys/stat.h>
18171
18172 * Makefile.in (prefix): New macro.
18173
18174 1998-11-12 Per Bothner <bothner@cygnus.com>
18175
18176 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18177 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18178 here (done in patch_invoke instead).
18179 (case_identity): Moved here from parse.y.
18180
18181 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18182 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18183 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18184 so they can be efficiently scanned without recursion.
18185 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18186 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
18187 in BLOCK iteratively, rather than recursively.
18188
18189 * parse.y (do_unary_numeric_promotion): New function.
18190 (patch_unaryop, patch_binop, patch_array_ref): Use it.
18191
18192 * parse.y (patch_newarray): Various fixes.
18193
18194 Re-do handling of switch statements (for proper block scoping).
18195 * parse.y: Add just a single block for the enture switch block,
18196 but don't create any "case blocks".
18197 (group_of_labels): Rmeoved unneeded non-terminal.
18198 CASE_EXPR and DEFAULT_EXPR are added to current block.
18199 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
18200 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18201 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
18202 * parse.y (wfl_operator, print_int_node): Make non-static.
18203 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
18204 as part of recursive scan of block.
18205 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
18206 (patch_switch_statement): Most tests move dinto java_complete_tree.
18207
18208 * parse.y: Make various production be non-typed (void).
18209 * parse.y (parse_error): Merged into issue_warning_error_from_context.
18210 * parse.y (add_stmt_to_compound): Don't create/change extra node.
18211 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
18212
18213 * jcf-write.c (struct jcf_handler): New type.
18214 (struct jcf_switch_state): New type.
18215 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
18216 (alloc_handler, emit_unop, emit_reloc): New functions.
18217 (adjust_typed_op): Add extra parameter ("max type" offset).
18218 (emit_switch_reloc, emit_case-reloc): New function.
18219 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
18220 (generate_bytecode_insns): Support REAL_CST, switch statements,
18221 exception handling, method calls, object/array creation, and more.
18222
18223 * class.c: Remove some unused variables.
18224 * constants.c (find_string_constant): New function.
18225 (count_constant_pool_bytes): Fix to correctly handle wide constants.
18226 * decl.c (complete_start_java_method): Don't _Jv_InitClass
18227 if flag_emit_class_files.
18228
18229 1998-11-12 Tom Tromey <tromey@cygnus.com>
18230
18231 * jcf-io.c (find_class): Added explanatory comment.
18232
18233 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
18234 trailing slash to `.zip' entries.
18235
18236 * jvspec.c (lang_specific_driver): Correctly handle case where
18237 GC_NAME not defined.
18238
18239 1998-11-11 Tom Tromey <tromey@cygnus.com>
18240
18241 * jvspec.c (GC_NAME): New define.
18242 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
18243 if required.
18244 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18245
18246 1998-11-11 Per Bothner <bothner@cygnus.com>
18247
18248 * jcf-dump.c (TABLE_SWITCH): Fix typos.
18249
18250 1998-11-11 Tom Tromey <tromey@cygnus.com>
18251
18252 * jcf-dump.c (main): Correctly recognize `--'-style long options.
18253
18254 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18255
18256 * class.c (is_compiled_class): Call safe_layout_class for class
18257 compiled from source.
18258 * conver.h (convert_to_integer, convert_to_real,
18259 convert_to_pointer): Added prototypes.
18260 * decl.c (init_decl_processing): Non longer push the decls of
18261 `methodtable', `constants', `Class', `Field', `dispatchTable'
18262 `jexception' and `Method'.
18263 * expr.c (build_invokeinterface): New function.
18264 (expand_invoke): static variable CLASS_IDENT now in
18265 build_invokeinterface. Use build_invokeinterface.
18266 (expand_java_field_op): Moved code to inline
18267 java.lang.PRIMTYPE.TYPE into a function.
18268 (build_primtype_type_ref): New function.
18269 * java-tree.def (INSTANCEOF_EXPR): New tree code.
18270 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18271 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18272 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18273 (DECL_LOCAL_STATIC_VALUE): New macro.
18274 (build_invokeinterface, build_primtype_type_ref): New function
18275 prototypes.
18276 (java_parse_abort_on_error): Macro rewritten.
18277 * jcf-parse.c (current_method): Add comment to declaration.
18278 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18279 Function prototypes fixed.
18280 (jcf_parse_source): push/pop parser context. save/restore global.
18281 (parse_source_file): Fixed leading comment. Now take a
18282 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18283 classes and pop the parser context anymore.
18284 (yyparse): Push parser context, save globals, parse the source
18285 file, restore globals and pop the parser context when processing a
18286 source file.
18287 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18288 * lex.c (java_parse_doc_section): New function.
18289 (java_lex): Call java_parse_doc_section when appropriate. Build an
18290 operator around INSTANCEOF_TK.
18291 * lex.h (java_lineterminator, java_sprint_unicode,
18292 java_unicode_2_utf8, java_lex_error, java_store_unicode):
18293 Prototypes rewritten.
18294 (java_parse_escape_sequence, java_letter_or_digit_p,
18295 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18296 java_read_unicode, java_store_unicode, java_read_char,
18297 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18298 Added function prototypes.
18299 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18300 define.
18301 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18302 New macros
18303 (struct parser_ctxt): New fields: deprecated,
18304 current_parsed_class_un, gclass_list.
18305 (fix_method_argument_names, issue_warning_error_from_context,
18306 resolve_package, lookup_package_type): New function prototypes.
18307 (resolve_expression_name): Fixed function prototype.
18308 (find_applicable_accessible_methods_list): Fixed indentation, added
18309 extra argument in prototype.
18310 (check_final_assignment, build_null_of_type, check_deprecation,
18311 check_method_redefinition, reset_method_name,
18312 java_check_regular_methods, java_check_abstract_methods,
18313 maybe_build_primttype_type_ref): New function prototype.
18314 * parse.y (conver.h): Include.
18315 (INSTANCEOF_TK): Tagged <operator>.
18316 (single_type_import_declaration): Use REGISTER_IMPORT macro.
18317 (relational_expression:): Build binop for instanceof.
18318 (java_push_parser_context): Remember ctxp->gclass_list across
18319 contexts.
18320 (java_pop_parser_context): Simply return if no context
18321 exists. Remember gclass_list across contexts.
18322 (issue_warning_error_from_context): New function.
18323 (parse_error_context): Don't setup ctxp->elc here. Call
18324 issue_warning_error_from_context instead.
18325 (parse_warning_context): Likewise.
18326 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18327 setup. Link new class/interface to ctxp->gclass_list.
18328 (add_superinterfaces): Register interface as incomplete if not
18329 loaded.
18330 (create_class): Remember class unqualified name in
18331 ctxp->current_parsed_class_un. Check class deprecation.
18332 (register_fields): Check field deprecation. Remember static final
18333 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18334 processing INIT.
18335 (method_header): New local variable ORIG_ARG. Use unqualified
18336 current class name for check on constructor errors. Promote return
18337 type if of record type. Argument list fix moved in
18338 fix_method_argument_names, called here. Check method deprecation.
18339 (fix_method_argument_names): New function.
18340 (method_declarator): Promote record typed arguments.
18341 (safe_layout_class): Check class methods before layout.
18342 (java_complete_class): Compute field layout when patched.
18343 (do_resolve_class): Try to load class after having it renamed
18344 after the package name.
18345 (get_printable_method_name): Use DECL_CONTEXT.
18346 (reset_method_name): New function.
18347 (check_method_redefinition): Use reset_method_name.
18348 (java_check_regular_methods): New local variable
18349 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18350 names for error report. Check for compile-time error when method
18351 found has default (package) access.
18352 (java_check_abstract_methods): Now takes an interface DECL node as
18353 an argument. Also reinstall real name on unchecked
18354 overriding/hiding methods for error report.
18355 (java_check_methods): Fixed leading comment. Get classes to verify
18356 from ctxp->gclass_list. Use CHECK_METHODS macro and set
18357 CLASS_METHOD_CHECKED_P on class verification.
18358 (lookup_java_method2): Get real method name if necessary.
18359 (find_in_imports): Don't check package class access here.
18360 (resolve_package, lookup_package_type): New functions.
18361 (java_layout_classes): Fixed leading comment. Take classes to be
18362 laid out from ctxp->gclass_list.
18363 (java_complete_expand_methods): Don't expand native and abstract
18364 methods.
18365 (java_expand_classes): New function.
18366 (resolve_expression_name): Use additional argument ORIG. Retrieve
18367 values of static final field of primitive types.
18368 (resolve_field_access): Handles static final field of promotive
18369 type.
18370 (resolve_qualified_expression_name): Handle STRING_CST as
18371 primaries and package name resolution. Check deprecation on found
18372 decls. Set where_found and type_found on non static field resolved
18373 during qualification. Layout non primitive field decl types.
18374 (check_deprecation): New function.
18375 (maybe_access_field): Simplified.
18376 (patch_method_invocation_stmt): Local variable CLASS_TYPE
18377 removed. Reverse method's argument when primary is a type. Don't
18378 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18379 instead. Include abstract class in the list of class searchable
18380 for constructors. Use DECL_CONTEXT of found method for access
18381 checks. Check method deprecation.
18382 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18383 converting arguments. Handle INVOKE_INTERFACE.
18384 (lookup_method_invoke): Search constructor using existing
18385 infrastructure (don't rely on lookup_java_constructor anymore).
18386 (find_applicable_accessible_methods_list): Extra argument flag
18387 LC. Now include constructor in the search.
18388 (qualify_ambiguous_name): Conditional expression are primaries.
18389 (not_initialized_as_it_should_p): static final are always
18390 initialized.
18391 (java_complete_tree): Pass extra NULL argument to
18392 resolve_expression_name. Stricter test to carry on patching
18393 assignments. New case for INSTANCEOF_EXPR.
18394 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18395 (check_final_assignment, maybe_build_primttype_type_ref): New
18396 functions.
18397 (patch_assignment): Detect resolved static finals and carry normal
18398 assignment error check on them. Inline PRIMTYPE.TYPE read access.
18399 (try_builtin_assignconv): Access constant 0 on all primitive
18400 types.
18401 (valid_builtin_assignconv_identity_widening_p): Accept identical
18402 types. Accept all promoted type on int type.
18403 (valid_ref_assignconv_cast_p): Accept a null pointer to be
18404 assigned to a reference.
18405 (valid_method_invocation_conversion_p): Accept to check null
18406 pointers.
18407 (build_binop): Merge declaration and initialization of local
18408 variable BINOP.
18409 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18410 numeric types. Improved validity test for qualify operators on
18411 references.
18412 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18413 and PREINCREMENT_EXPR. Also detect resolved static finals of a
18414 primitive type and issue the appropriate error message.
18415 (resolve_type_during_patch): Mark class loaded when resolved.
18416 (patch_cast): Allow null to be cased to reference types.
18417 (build_null_of_type): New function.
18418 (patch_array_ref): Handle array on references correctly.
18419 (patch_return): Removed unused local variable MODIFY. Force
18420 boolean to be returned as integers. Allows null to be returned by
18421 a function returning a reference.
18422 * typeck.c (convert_to_integer, convert_to_real,
18423 convert_to_pointer): Prototypes moved to convert.h
18424 (lookup_argument_method): Use method real name, if necessary.
18425
18426 1998-10-30 Tom Tromey <tromey@cygnus.com>
18427
18428 * class.c (build_class_ref): Changed name of primitive classes to
18429 start with `_Jv_'.
18430
18431 * class.c (make_class_data): Renamed fields: nmethods to
18432 method_count, method_count to dtable_method_count. Always set
18433 `state' field to 0.
18434 * decl.c (init_decl_processing): Likewise.
18435
18436 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
18437
18438 * class.c (layout_class): Don't mangle <finit>, produce
18439 __finit<class> instead. Don't verify artificial methods.
18440 * decl.c (finit_identifier_node): New declared global.
18441 (init_decl_processing): finit_identifier_node initialized.
18442 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18443 * java-tree.h (finit_identifier_node): Declared as extern.
18444 (struct lang_decl): New field called_constructor.
18445 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18446 (CLASS_HAS_FINIT_P): New macro.
18447 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18448 explicit constructor invocation.
18449 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18450 CALL_SUPER_CONSTRUCTOR_P): New macros.
18451 (write_classfile): Added prototype.
18452 * jcf-parse.c (jcf_parse_source): Parse and remember for
18453 generation if the file was seen on the command line.
18454 (parse_source_file): Don't write the class file here.
18455 (yyparse): Loop on files rewritten. Set current_jcf.
18456 (parse_zip_file_entries): Parse class file only if it was found.
18457 * lang.c (init_parse): Don't open command line provided filename
18458 here.
18459 (lang_parse): Don't set main_jcf anymore.
18460 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18461 (JCONSTRUCTOR_CHECK): New macro.
18462 (JBSC_TYPE_P): New macro.
18463 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18464 (COMPLETE_CHECK_OP_2): New macro.
18465 (struct parse_ctxt): New field explicit_constructor_p.
18466 (check_class_interface_creation): Fixed prototype indentation.
18467 (patch_method_invocation_stmt): Prototype reflects added argument.
18468 (patch_invoke): Likewise.
18469 (complete_method_declaration, build_super_invocation,
18470 verify_constructor_circularity,
18471 build_this_super_qualified_invocation, get_printable_method_name,
18472 patch_conditional_expr, maybe_generate_finit, fix_constructors,
18473 verify_constructor_super, create_artificial_method,
18474 start_artificial_method_body, end_artificial_method_body,
18475 generate_field_initialization_code): New function prototypes.
18476 * parse.y: Fixed leading comment
18477 (constructor_header:, constructor_body:, block_end:): Rules tagged
18478 <node>.
18479 (type_declaration:): Call maybe_generate_finit.
18480 (method_declaration:): Action for method_body: placed in new
18481 function complete_method_declaration, called here.
18482 (constructor_declaration:): Defined actions. Removed leading
18483 FIXME.
18484 (constructor_header:): New rule with action.
18485 (constructor_body:): Rule rewritten using block_begin: and
18486 block_end:. Defined actions.
18487 (constructor_declarator:, explicit_constructor_invocation:):
18488 Defined actions.
18489 (block:): Use new rules block_begin: block_end:.
18490 (block_begin:, block_end:): New rules and actions.
18491 (block_statements:): Fixed error message for explicit
18492 constructors.
18493 (method_invocation:): Call build_this_super_qualified_invocation
18494 if primary is `this' or `super' was seen.
18495 (conditional_expression:): Action defined.
18496 (extra_ctxp_pushed_p): New static global flag.
18497 (java_parser_context_save_global): Create parser context if
18498 necessary. Use extra_ctxp_pushed_p to remember it.
18499 (java_parser_context_restore_global): Pop extra parser context if
18500 one exists.
18501 (build_array_from_name): Array on primitive types are marked
18502 loaded.
18503 (register_fields): Restore new name in field initializer
18504 expression if type was altered. Non static fields initialized upon
18505 declaration marked initialized.
18506 (maybe_generate_finit): New function.
18507 (maybe_generate_clinit): Use create_artificial_method,
18508 start_artificial_method_body, end_artificial_method_body. Generate
18509 debug info for enclosed initialization statements.
18510 (method_header): Fixed leading comment. Check constructor
18511 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18512 accordingly.
18513 (complete_method_declaration, constructor_circularity_msg,
18514 verify_constructor_circularity): New functions.
18515 (get_printable_method_name): New function.
18516 (check_method_redefinition): Don't rename <finit> methods. Fix
18517 declared constructor names. Error message for
18518 constructors modified.
18519 (java_check_regular_methods): Local variable seen_constructor
18520 renamed saw_constructor. Skip verification on constructors. Create
18521 default constructor with create_artificial_method.
18522 (java_check_methods): Removed unnecessary empty line.
18523 (create_artificial_method, start_artificial_method_body,
18524 end_artificial_method_body): New functions.
18525 (java_layout_classes): Changed leading comment. Reverse fields
18526 list if necessary. Always layout java.lang.Object if being
18527 defined.
18528 (java_complete_expand_methods): Verify constructor circularity.
18529 (java_complete_expand_method): Call fix_constructor on
18530 constructors. Local variable no_ac_found removed. Restore
18531 bindings if method body expansion failed.
18532 (fix_constructors, verify_constructor_super,
18533 generate_field_initialization_code): New function.
18534 (java_expand_classes): Fixed leading comment. Write class file
18535 here.
18536 (resolve_expression_name): Check for illegal instance variable
18537 usage within the argument scope of an explicit constructor
18538 invocation.
18539 (resolve_qualified_expression_name): Pass extra from_super flag
18540 when invoking patch_method_invocation_stmt. New case for
18541 conditional expression when used as a primary. Check for error
18542 when acquiring super.
18543 (patch_method_invocation_stmt): Added extra argument super. New
18544 local variable is_static_flag. Set class_to_search according to
18545 the nature of the constructor invocation. Don't add `this'
18546 argument when expanding NEW_CLASS_EXPR. Check for illegal method
18547 invocation within the argument scope of explicit constructor
18548 invocation. Set is_static according to is_static_flag. Provide
18549 extra `super' argument to patch_invoke invocation.
18550 (patch_invoke): New argument from_super. Loop on arguments
18551 indentation fixed. Pass from_super to invocation_mode. New switch
18552 case INVOKE_SUPER. Fixed error message in switch default case.
18553 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18554 value.
18555 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18556 (lookup_method_invoke): Fixed prototypes in candidates list. Error
18557 message takes constructors into account.
18558 (find_applicable_accessible_methods_list): Fixed indentation.
18559 (qualify_ambiguous_name): Take explicit constructor invocation
18560 into account. Deal with a conditional expression as a primary to
18561 a method call.
18562 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18563 case. Added extra argument to patch_method_invocation_stmt.
18564 Register calls made to explicit constructor `this'. Don't call
18565 save_expr in ARRAY_REF case when emitting class files. Check for
18566 illegal use of this when expanding explicit constructor invocation
18567 arguments.
18568 (complete_function_arguments): Set and reset parser context
18569 explicit_constructor_p field value when appropriate.
18570 (build_super_invocation, build_this_super_qualified_invocation):
18571 New functions.
18572 (patch_assignment): Fixed typo.
18573 (patch_unaryop): Check on final fields occurs only when a decl
18574 exits.
18575 (patch_return): Take constructors into account.
18576 (patch_conditional_expr): New function.
18577 * typeck.c (build_java_signature): Removed unnecessary empty line.
18578
18579 1998-10-28 Jeffrey A Law (law@cygnus.com)
18580
18581 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18582
18583 1998-10-28 Tom Tromey <tromey@cygnus.com>
18584
18585 * decl.c (init_decl_processing): Renamed fields.
18586 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18587 interface_len, msize fields.
18588
18589 * class.c (make_class_data): Removed subclass_head and
18590 subclass_next fields.
18591 * decl.c (init_decl_processing): Removed subclass_head and
18592 subclass_next fields.
18593
18594 1998-10-28 Jeffrey A Law (law@cygnus.com)
18595
18596 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18597 * mangle.c (emit_unicode_mangled_name): Similarly.
18598
18599 1998-10-26 Nick Clifton <nickc@cygnus.com>
18600
18601 * jcf-parse.c (get_constant): Place braces around code to compute
18602 'd' when REAL_ARITHMETIC is not defined.
18603
18604 1998-10-25 H.J. Lu (hjl@gnu.org)
18605
18606 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18607 dependency.
18608
18609 1998-10-23 Tom Tromey <tromey@cygnus.com>
18610
18611 * lang-specs.h: `.zip' files are input to jc1.
18612
18613 1998-10-22 Per Bothner <bothner@cygnus.com>
18614
18615 * jvspecs.c: Add (but don't enable) support for combining multiple
18616 .class and .java input filenames to a single jc1 invocation.
18617 Add support for -C flag (copile to .class files).
18618 Translate -classpath and -CLASSPATH arguments.
18619 * lang-specs.h: Don't set %2 spec.
18620
18621 1998-10-22 Tom Tromey <tromey@cygnus.com>
18622
18623 * jcf-path.c (add_entry): Don't add trailing separator if entry is
18624 a .zip file.
18625 (add_path): Don't add trailing separator to non-empty path
18626 elements.
18627
18628 * lang.c (lang_decode_option): Check for -fclasspath and
18629 -fCLASSPATH before examining other `-f' options.
18630
18631 * java-tree.h (finalize_identifier_node): Don't declare.
18632 * class.c (make_class_data): Don't push "final" field.
18633 * decl.c (init_decl_processing): Don't push "final" field.
18634 (finalize_identifier_node): Removed.
18635 (init_decl_processing): Don't set finalize_identifier_node.
18636
18637 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18638
18639 1998-10-11 Anthony Green <green@cygnus.com>
18640
18641 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18642 (JV_SCAN_SOURCES): New macro.
18643 (JCF_DUMP_SOURCES): Likewise.
18644 (jcf-dump$(exeext)): New target.
18645 (jv-scan$(exeext)): New target.
18646
18647 1998-10-22 Tom Tromey <tromey@cygnus.com>
18648
18649 * Makefile.in (LEX): Removed.
18650 (LEXFLAGS): Likewise.
18651 (SET_BISON): New macro.
18652 (BISON): Removed.
18653 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
18654 spurious diffs in parse.c.
18655 ($(PARSE_SCAN_C)): Likewise.
18656 (PARSE_DIR): New macro.
18657 (PARSE_C): Use it.
18658 (PARSE_SCAN_C): Likewise.
18659 (PARSE_RELDIR): New macro.
18660
18661 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18662
18663 * jcf-io.c (find_class): Use saw_java_source to determine when to
18664 look for `.java' file.
18665 * jcf-parse.c (saw_java_source): New global.
18666 (yyparse): Set it if `.java' file seen.
18667
18668 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18669 (GCJH_SOURCES): Likewise.
18670 * Makefile.in (datadir): New macro.
18671 (libjava_zip): Likewise.
18672 (JAVA_OBJS): Added jcf-path.o.
18673 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18674 (../gcjh$(exeext)): Likewise.
18675 (jcf-path.o): New target.
18676 * java-tree.h (fix_classpath): Removed decl.
18677 * jcf-parse.c (fix_classpath): Removed.
18678 (load_class): Don't call fix_classpath.
18679 * parse.y (read_import_dir): Don't call fix_classpath.
18680 * lex.h: Don't mention classpath.
18681 * lex.c (java_init_lex): Don't initialize classpath.
18682 * jcf-io.c (classpath): Removed global.
18683 (find_class): Use jcf_path iteration functions. Correctly search
18684 class path for .java file.
18685 (open_in_zip): New argument `is_system'.
18686 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
18687 classpath-related options.
18688 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18689 and -I.
18690 (lang_init): Call jcf_path_init.
18691 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18692 * lang-specs.h: Handle -I. Minor cleanup to -M options.
18693 Correctly put braces around second string in each entry.
18694 * gjavah.c (main): Call jcf_path_init. Recognize all the new
18695 classpath-related options.
18696 (help): Updated for new options.
18697 * jcf.h: Declare functions from jcf-path.c. Don't mention
18698 `classpath' global.
18699 * jcf-path.c: New file.
18700
18701 * jcf-depend.c: Include jcf.h.
18702
18703 * jcf-write.c (localvar_alloc): Returns `void'.
18704 (localvar_free): Removed unused variable.
18705
18706 * lang.c (OBJECT_SUFFIX): Define if not already defined.
18707 (init_parse): Use OBJECT_SUFFIX, not ".o".
18708
18709 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
18710
18711 * class.c (emit_register_classes): Renamed from
18712 emit_register_class.
18713 * java-tree.h (emit_register_classes): Prototype renamed from
18714 emit_register_class.
18715 * jcf-parse.c (yyparse): Call emit_register_classes once before
18716 returning.
18717 * parse.y (java_expand_classes): No longer register classes.
18718
18719 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18720
18721 * class.c (is_compiled_class): New local variable
18722 seen_in_zip. Identify classes found in currently compiled source
18723 file(s).
18724 * decl.c (complete_start_java_method): Fixed typo.
18725 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18726 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18727 (CLASS_P): Moved around.
18728 (java_parse_abort_on_error): Macro moved from jcf-parse.c
18729 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18730 java-tree.h
18731 (jcf_parse_source): Changed leading comment. Removed unnecessary
18732 fclose and CLASS_FROM_SOURCE_P marking.
18733 (parse_source_file): New local variables remember_for_generation
18734 and filename. Mark parsed file name identifier node. Removed block
18735 executed when parse_only was null. Set remember_for_generation.
18736 Use it as an argument to java_pop_parser_context.
18737 (yyparse): New local variables several_files, list, next node and
18738 current_file_list. Split ampersand separated file names into
18739 current_file_list. Iterate through the list and parse accordingly.
18740 * parse.h (java_pop_parser_context): New function prototype.
18741 * parse.y (ctxp_for_generation): New static global variable.
18742 (java_pop_parser_context): New argument generate. Link popped ctxp
18743 to ctxp_for_generation list accordingly.
18744 (java_complete_expand_methods): Fixed indentation.
18745 (java_expand_classes): New function.
18746
18747 1998-10-17 Per Bothner <bothner@cygnus.com>
18748
18749 * Makefile.in: Link with libiberty.a instead of memmove.o.
18750
18751 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
18752
18753 * lex.c (setjmp.h): No longer included.
18754 * lex.h (setjmp.h): Included.
18755 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18756 (duplicate_declaration_error_p): Renamed from
18757 duplicate_declaration_error.
18758 (build_array_from_name): New function prototype.
18759 * parse.y (setjmp.h): No longer included.
18760 (variable_declarator_id): Define action.
18761 (build_array_from_name): New function.
18762 (duplicate_declaration_error_p): Renamed from
18763 duplicate_declaration_error. Fixed leading comment.
18764 (register_fields): Main `for' loop reorganized. Uses
18765 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
18766 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
18767 build_array_from_name.
18768 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
18769 types.
18770 (read_import_dir): Don't try to skip `.' and `..'.
18771 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
18772 build_array_from_name. Main `for' loop reorganized.
18773 (resolve_qualified_expression_name): When building access to a
18774 field, use the type where the field was found, not its own type.
18775 (maybe_access_field): Use field DECL_CONTEXT if the type where the
18776 field was found is null.
18777 (qualify_ambiguous_name): Sweep through all successive array
18778 dimensions.
18779
18780 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
18781
18782 * java-tree.h (pop_labeled_block, lang_printable_name,
18783 maybe_add_interface, set_super_info, get_access_flags_from_decl,
18784 interface_of_p, inherits_from_p, fix_classpath,
18785 complete_start_java_method, emit_handlers, init_outgoing_cpool,
18786 make_class_data, register_class, alloc_name_constant): New
18787 function prototypes.
18788 * lang.c (lang_decode_option): Set argc argument unused. Fixed
18789 indentation. Added cast to remove warning.
18790 (lang_printable_name): Set v argument unused.
18791 (lang_print_error): Added argument to lang_printable_name call.
18792 (java_dummy_print, print_lang_decl, print_lang_type,
18793 print_lang_identifier, lang_print_xnode): All argument marked
18794 unused.
18795 * lex.c (java_unget_unicode): Removed unnecessary argument.
18796 (java_allocate_new_line): Unused local variable is gone.
18797 (java_read_char): Added parenthesis in expressions to remove
18798 warnings. Added final return statement.
18799 (java_read_unicode): Added parenthesis in expression to remove
18800 warning.
18801 (java_parse_end_comment): Fixed java_unget_unicode invocation.
18802 (java_parse_escape_sequence): Likewise.
18803 (java_lex): Unused local variables are gone. Fixed
18804 java_unget_unicode invocation.
18805 * lex.h (set_float_handler): Prototype added when JC1_LITE not
18806 defined.
18807 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
18808 lang_printable_name invocation in macro.
18809 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
18810 Likewise.
18811 (duplicate_declaration_error): Suppressed unused argument in
18812 prototype.
18813 (identical_subpath_p): Function declaration is gone.
18814 (patch_invoke): Suppressed unused argument in prototype.
18815 (patch_cast, build_labeled_block, check_thrown_exceptions):
18816 Likewise.
18817 * parse.y (setjmp.h): Included
18818 (toplev.h): Likewise.
18819 (field_declaration:): Suppressed unused local
18820 (label_decl:): Fixed build_labeled_block invocation.
18821 (java_pop_parser_context): Put extra parenthesis around assignment
18822 in if.
18823 (yyerror): Suppressed unused local variables.
18824 (variable_redefinition_error): Fixed lang_printable_name
18825 invocation.
18826 (create_interface): Suppressed unused local variables.
18827 (create_class): Likewise.
18828 (duplicate_declaration_error): Suppressed unused argument. Fixed
18829 lang_printable_name invocation.
18830 (register_fields): Suppressed unused local variable. Fixed
18831 duplicate_declaration_error invocation.
18832 (method_header): Suppressed unused local variable.
18833 (method_declarator, parser_check_super): Likewise.
18834 (java_complete_class): Suppressed unused local variable. Fixed
18835 fatal error message.
18836 (complete_class_report_errors): Added default: in switch.
18837 (java_check_regular_methods): Fixed lang_printable_name
18838 invocations.
18839 (check_throws_clauses): Likewise.
18840 (java_check_abstract_methods): Suppressed unused local
18841 variable. Fixed lang_printable_name invocation.
18842 (read_import_entry): Added supplemental return statement.
18843 (read_import_dir): Suppressed unused local variables.
18844 (check_pkg_class_access, declare_local_variables): Likewise.
18845 (source_start_java_method): Suppressed unused extern variable
18846 declarations
18847 (expand_start_java_method): Suppressed unused extern and local
18848 variable declarations.
18849 (java_complete_expand_methods): Likewise.
18850 (java_complete_expand_method): Suppressed unused local variables.
18851 (make_qualified_name): Likewise.
18852 (resolve_qualified_expression_name): Added default: in
18853 switch. Fixed lang_printable_name invocation.
18854 (class_instance_creation_expression): Added parenthesis around
18855 expressions.
18856 (patch_method_invocation_stmt): Fixed lang_printable_name and
18857 patch_invoke invocations.
18858 (check_for_static_method_reference): Fixed lang_printable_name
18859 invocation.
18860 (patch_invoke): Suppressed unused arguments and local variables.
18861 (lookup_method_invoke): Suppressed unused local variables.
18862 (qualify_ambiguous_name): Added default: in switch.
18863 (identical_subpath_p): Function removed.
18864 (patch_assignment): Suppressed unused local variables. Suppressed
18865 unnecessary if statement. Fixed lang_printable_name invocations.
18866 (try_builtin_assignconv): Fixed lang_printable_name invocations.
18867 (valid_ref_assignconv_cast_p): Parenthesis around
18868 expression. Suppressed unused local variables.
18869 (build_binop): Suppressed unused local variables. fixed
18870 lang_printable_name invocations.
18871 (string_constant_concatenation): Suppressed unused local
18872 variables.
18873 (patch_unaryop): Fixed lang_printable_name invocation.
18874 (patch_cast): Suppressed unnecessary argument. Fixed
18875 lang_printable_name invocation.
18876 (patch_array_ref): Fixed lang_printable_name invocation.
18877 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
18878 (build_labeled_block): Suppressed unused argument.
18879 (generate_labeled_block): Fixed build_labeled_block invocation.
18880 (build_loop_body): Suppressed unused local variables.
18881 (patch_loop_statement): Likewise.
18882 (patch_exit): Fixed lang_printable_name invocation.
18883 (patch_switch_statement): Likewise.
18884 (case_identity): First argument marked unused.
18885 (patch_try_statement): Fixed lang_printable_name invocations.
18886 (patch_synchronized_statement, patch_throw_statement): Likewise.
18887 (check_thrown_exceptions): Fixed check_thrown_exceptions and
18888 lang_printable_name invocations.
18889 (check_thrown_exceptions_do): Suppressed unused argument.
18890
18891 1998-10-14 Tom Tromey <tromey@cygnus.com>
18892
18893 * jcf-write.c (write_classfile): Add output class file as target.
18894 * lang-options.h: Added -MD, -MMD, -M, and -MM.
18895 * jcf.h: Added declarations for dependency-tracking functions.
18896 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
18897 * lang.c (lang_decode_option): Recognize -MD and -MMD.
18898 (finish_parse): Call jcf_dependency_write.
18899 (dependency_tracking): New global.
18900 (DEPEND_SET_FILE): New define.
18901 (DEPEND_ENABLE): New define.
18902 (init_parse): Enable dependency tracking if required.
18903 Include "flags.h".
18904 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
18905 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18906 (../gcjh$(exeext)): Likewise.
18907 (jcf-depend.o): New target.
18908 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
18909 (GCJH_SOURCES): Likewise.
18910 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
18911 dep_name argument.
18912 (find_classfile): Added dep_name argument.
18913 (find_class): Compute name of dependency.
18914 (open_in_zip): Call jcf_dependency_add_file.
18915 * gjavah.c (output_file): No longer global.
18916 (usage): Don't mention "gjavah".
18917 (help): Likewise.
18918 (java_no_argument): Likewise.
18919 (version): Likewise.
18920 (main): Recognize and handle -M family of options.
18921 (print_mangled_classname): Return is void.
18922 (process_file): Handle case where output is suppressed.
18923 (HANDLE_END_FIELD): Likewise.
18924 (HANDLE_METHOD): Likewise.
18925 * jcf-depend.c: New file.
18926
18927 1998-10-13 Jeffrey A Law (law@cygnus.com)
18928
18929 * java-tree.def: Add missing newline at EOF.
18930
18931 1998-10-13 Tom Tromey <tromey@cygnus.com>
18932
18933 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18934 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
18935 function.
18936 Include <config.h> and "system.h".
18937 (disassemble_method): Undefine RET to avoid clash with
18938 config/i386/i386.h.
18939
18940 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
18941
18942 * decl.c (runtime_exception_type_node, error_exception_type_node):
18943 New global variables.
18944 (init_decl_processing): Initialized.
18945 * expr.c (java_lang_expand_expr): Set caught exception type to
18946 null if catch handler argument doesn't exit.
18947 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
18948 tree codes.
18949 * java-tree.h (runtime_exception_type_node,
18950 error_exception_type_node): Global variables declared.
18951 (DECL_FUNCTION_THROWS): New macro.
18952 (DECL_FUNCTION_BODY): Modified comment.
18953 (DECL_SPECIFIC_COUNT): Likewise.
18954 (struct lang_decl): New field throws_list.
18955 (IS_UNCHECKED_EXPRESSION_P): New macro.
18956 * lex.c (java_lex): Generate location information for THROW_TK.
18957 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
18958 EXCEPTIONS_P): New macros.
18959 (enum jdep_code): New value JDEP_EXCEPTION.
18960 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
18961 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18962 PATCH_METHOD_RETURN_ERROR): New macros.
18963 (patch_method_invocation_stmt): Added new argument to prototype.
18964 (patch_synchronized_statement, patch_throw_statement,
18965 check_thrown_exceptions, check_thrown_exceptions_do,
18966 purge_unchecked_exceptions, check_throws_clauses): New function
18967 prototypes.
18968 * parse.y Fixed typo in keyword section.
18969 (throw:): Rule tagged <node>.
18970 (THROW_TK): Keyword tagged <operator>.
18971 (method_header:): Last argument to call to method_header passed
18972 from throws: rule.
18973 (throws:, class_type_list:, throw_statement:,
18974 synchronized_statement:, synchronized:): Defined actions.
18975 (method_header): New local variable current. Register exceptions
18976 from throws clause.
18977 (java_complete_tree): Complete and verify exceptions from throws
18978 clause.
18979 (complete_class_report_errors): Error message on exceptions not
18980 found
18981 (java_check_regular_methods): Fixed typo. Shortcut on private
18982 overriding methods. Changed error message on method
18983 redefinition. Check for throws clause compatibility.
18984 (check_throws_clauses): New function.
18985 (java_check_abstract_methods): Use DECL_NAME for wfl or current
18986 method. Changed error message on method redefinition.
18987 (currently_caught_type_list): New static variable.
18988 (java_complete_expand_methods): Purge unchecked exceptions from
18989 throws clause list. Call PUSH_EXCEPTIONS before walk and
18990 POP_EXCEPTIONS after.
18991 (resolve_qualified_expression_name): Pass new argument as NULL to
18992 patch_method_invocation_stmt.
18993 (patch_method_invocation_stmt): New argument ref_decl. Invoke
18994 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18995 argument list when appropriate. Use new argument if non null to
18996 store selected method decl.
18997 (patch_invoke): Convert if necessary args of builtin types before
18998 forming CALL_EXPR. Argument list no longer reversed here.
18999 (invocation_mode): Treat final methods as static methods.
19000 (java_complete_tree): New cases for THROW_EXPR: and
19001 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19002 function call.
19003 (complete_function_arguments): No more RECORD_TYPE
19004 conversion. Function parameter nodes no longer saved.
19005 (valid_ref_assignconv_cast_p): Avoid handling null type.
19006 (patch_binop): Fixed null constant reference handling.
19007 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19008 BUILD_THROW macros.
19009 (patch_try_statement): Fixed comments. Record caught types in
19010 list, push the list, expand try block and pop the list.
19011 (patch_synchronized_statement, patch_throw_statement,
19012 check_thrown_exceptions, check_thrown_exceptions_do,
19013 purge_unchecked_exceptions): New functions.
19014 * typeck.c (lookup_argument_method): Allow WFL in place of method
19015 DECL_NAME during method definition check
19016
19017 1998-10-09 Tom Tromey <tromey@cygnus.com>
19018
19019 * gjavah.c (decode_signature_piece): New function.
19020 (print_c_decl): Use it. Added `name_override' argument.
19021 (print_method_info): Use name_override argument to print_c_decl.
19022 (seen_fields): Removed.
19023 (print_field_info): Don't update seen_fields.
19024 (struct method_name): New structure.
19025 (method_name_list): New global.
19026 (print_method_info): Add new method to list of methods.
19027 (name_is_method_p): New function.
19028 (print_field_info): If field name has same name as method, then
19029 change field name.
19030 (process_file): Parse methods before fields.
19031 (field_pass): New global.
19032 (HANDLE_END_FIELD): Take field_pass into account.
19033
19034 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19035
19036 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19037 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19038
19039 1998-10-03 Anthony Green <green@cygnus.com>
19040
19041 * jvspec.c: Fix bug in jvgenmain_spec patch.
19042
19043 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19044
19045 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19046 * decl.c (soft_exceptioninfo_call_node): New global variable.
19047 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19048 takes extra integer argument. soft_exceptioninfo_call_node
19049 initialized.
19050 * except.c (java_set_exception_lang_code): New function
19051 (method_init_exceptions): Called here.
19052 (prepare_eh_table_type): New function.
19053 (expand_end_java_handler): Called here.
19054 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19055 one argument. Modified generation of call to
19056 soft_badarrayindex_node to use new argument.
19057 (build_java_arrayaccess): Pass faulty index value to
19058 build_java_throw_out_of_bounds_exception.
19059 (generate_name): New function.
19060 (java_lang_expand_expr): New local variables node, current,
19061 has_finally_p. Expand TRY_EXPR node.
19062 (process_jvm_instruction): Replace top of the stack with thrown
19063 object reference when entering exception handler.
19064 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19065 specific tree codes.
19066 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19067 global.
19068 (DECL_SPECIFIC_COUNT): New macro.
19069 (prepare_eh_table_type, java_set_exception_lang_code,
19070 generate_name): New function declarations.
19071 (match_java_method): Declaration deleted.
19072 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19073 macros.
19074 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19075 * parse.h (redefinition_error, refine_accessible_methods_list,
19076 can_cast_to_p): Function declaration removed.
19077 (classitf_redefinition_error, variable_redefinition_error,
19078 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19079 find_most_specific_methods_list, argument_types_convertible,
19080 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19081 valid_cast_to_p, valid_method_invocation_conversion_p,
19082 try_reference_assignconv, add_stmt_to_compound,
19083 build_jump_to_finally, build_tree_list, patch_try_statement,
19084 java_get_catch_block): New function declarations.
19085 * parse.y (string_buffer_type): Global variable deleted.
19086 (group_of_labels, catches, catch_clause, catch_clause_parameter,
19087 finally): Rules tagged <node>.
19088 (TRY_TK, CATCH_TK): Token tagged <operator>.
19089 (class_body_declaration:, class_member_declaration:,
19090 formal_parameter:, explicit_constructor_invocation:,
19091 interface_member_declaration:, constant_declaration:,
19092 primary_no_new_array:, class_instance_creation_expression:,
19093 array_creation_expression:): Issue error on unsuported JDK1.1
19094 features.
19095 (try_statement:, catches:, finally:): Define actions.
19096 (catch_clause_parameter): New rule.
19097 (catch_clause:): Use new rule catch_clause_parameter.
19098 (parse_jdk1_1_error): New function.
19099 (redefinition_error): Renamed classitf_redefinition_error.
19100 (variable_redefinition_error): New function.
19101 (check_class_interface_creation): Call
19102 classitf_redefinition_error.
19103 (java_complete_tree): Added error message on JDEP_TYPE: case.
19104 (complete_class_report_errors): Fixed indentation.
19105 (declare_local_variables): Call variable_redefinition_error.
19106 (source_end_java_method): Call java_set_exception_lang_code and
19107 emit_handlers where appropriate.
19108 (java_method_add_stmt): Call add_stmt_to_block.
19109 (add_stmt_to_block): New function.
19110 (lookup_method_invoke): Fixed outside comment. new local variable
19111 candicates. Call find_applicable_accessible_methods_list and
19112 find_most_specific_methods_list when searching for a
19113 method. Modified error report to list possible candidates when
19114 applicable.
19115 (find_applicable_accessible_methods_list,
19116 find_most_specific_methods_list, argument_types_convertible): New
19117 function.
19118 (refine_accessible_methods_list): Function deleted.
19119 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19120 expr (if applicable) before calling patch_array_ref.
19121 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19122 (enter_block): Fixed comment.
19123 (enter_a_block): New function.
19124 (patch_assignment): Reorganized. Call try_reference_assignconv for
19125 references. Call valid_cast_to_p instead of can_cast_to_p.
19126 (try_reference_assignconv,
19127 valid_builtin_assignconv_identity_widening_p): New functions.
19128 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19129 (valid_cast_to_p, valid_method_invocation_conversion_p): New
19130 functions.
19131 (build_string_concatenation): Don't resolve StringBuffer.
19132 (patch_cast): Fixed inverted arguments.
19133 (patch_array_ref): Code to save array expr deleted. Call
19134 valid_cast_to_p instead of can_cast_to_p.
19135 (generate_labeled_block): Call generate_name.
19136 (build_jump_to_finally, build_try_statement, java_get_catch_block,
19137 patch_try_statement): New functions.
19138 * typeck.c (match_java_method): Function deleted.
19139
19140 1998-10-02 Anthony Green <green@cygnus.com>
19141
19142 * jvspec.c: jvgenmain_spec uses different temporary file names.
19143
19144 1998-10-02 Anthony Green <green@cygnus.com>
19145
19146 * jvspec.c (lang_specific_driver): Fail if user specifies
19147 --main= when not linking.
19148
19149 1998-09-28 Tom Tromey <tromey@cygnus.com>
19150
19151 * class.c (make_class_data): Push value for `thread' field.
19152 * decl.c (init_decl_processing): Added `thread' field to class.
19153
19154 * class.c (add_field): Always make static fields externally
19155 visible.
19156
19157 1998-09-26 Anthony Green <green@cygnus.com>
19158
19159 * expr.c (build_java_athrow,
19160 build_java_throw_out_of_bounds_exception, expand_invoke,
19161 build_newarray, expand_java_multianewarray, build_java_monitor):
19162 Update comments to reflect _Jv_* function names.
19163
19164 1998-09-25 Per Bothner <bothner@cygnus.com>
19165
19166 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19167 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19168 * parse.y (expand_start_java_method): Likewise.
19169
19170 1998-09-24 Per Bothner <bothner@cygnus.com>
19171
19172 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19173
19174 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19175 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19176 * expr.c: Remove no-longer-needed calls to promote_type.
19177 * decl.c (give_name_to_locals): Liekwise.
19178 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19179 * parse.y: Add/remove promote_type calls as appropriate.
19180 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19181 (parse_signature_string): Likewise.
19182 (build_java_array_type): Fix for now signature convenions.
19183
19184 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19185
19186 1998-09-23 Tom Tromey <tromey@cygnus.com>
19187
19188 * class.c (init_class_processing): libjava function renamed to
19189 _Jv_RegisterClass.
19190
19191 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19192
19193 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19194 * java-tree.def: Fixed DEFTREECODE third argument.
19195 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19196 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19197 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19198 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19199 JAVA_THIS_EXPR): Now replaced by tree code definitions.
19200 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19201 * lang.c (java_tree_code_type, java_tree_code_length,
19202 java_tree_code_name): New arrays.
19203 (lang_init): Append Java tree node definitions to Gcc ones.
19204 * lex.c (expression_obstack): Declared as extern when JC1_LITE
19205 defined.
19206 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19207 wfl_to_string.
19208 (java_lex): Allow declaration of empty string constants. Retain
19209 location information on CASE_TK and DEFAULT_TK.
19210 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19211 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19212 Modified to be more robust.
19213 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19214 (build_new_invocation, try_builtin_assignconv,
19215 patch_switch_statement, string_constant_concatenation,
19216 build_string_concatenation, patch_string_cst, patch_string,
19217 java_expand_switch): New function declarations.
19218 * parse.y: Rules related to switch and EH tagged <node>.
19219 (label_id): Set to NULL_TREE
19220 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19221 tree nodes.
19222 (this_or_super:): Fixed indentation.
19223 (statement:, statement_nsi:, statement_without_trailing_substatement:,
19224 statement_expression:): Removed call to RULE on all sub-rules.
19225 (switch_expression:, switch_labels:): New rules.
19226 (switch_statement:, switch_block:, switch_block_statement_groups:,
19227 switch_block_statement_group:, switch_labels:, switch_label:):
19228 Defined actions.
19229 (throw_statement:, synchronized_statement:, try_statement:):
19230 Defined temporary actions.
19231 (class_instance_creation_expression:): Call
19232 build_new_invocation. Fixed indentation.
19233 (field_access): Fixed indentation.
19234 (method_invocation): Likewise.
19235 (make_qualified_primary): Use THIS_EXPR.
19236 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19237 resolving from SUPER, set *type_found.
19238 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19239 (java_complete_tree): Removed unused local variable `location'. Case
19240 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19241 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19242 on MODIFY_EXPR: and all binary operator tree code cases. Removed
19243 STRING_CST: case. default: checks for patchable strings.
19244 (complete_function_arguments): Transform string constant or
19245 crafted StringBuffer if necessary.
19246 (build_method_invocation): Fixed comments.
19247 (build_new_invocation): New function.
19248 (patch_assignment): Call try_builtin_assignconv to figure a valid
19249 assignment conversion between builtin types.
19250 (try_builtin_assignconv): New function.
19251 (build_binop): Use URSHIFT_EXPR directly to call build.
19252 (operator_string): Use UNARY_PLUS_EXPR.
19253 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19254 operator.
19255 (do_merge_string_cste, merge_string_cste,
19256 string_constant_concatenation, build_string_concatenation,
19257 patch_string, patch_string_cst): New function.
19258 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19259 (patch_unaryop): Likewise. New test of valid ++/-- operands.
19260 (build_newarray_node): Use NEW_ARRAY_EXPR.
19261 (build_this): Use THIS_EXPR.
19262 (build_return): Enable debug information on return statement.
19263 (build_if_else_statement): Likewise.
19264 (complete_labeled_statement): Fixed related comment.
19265 (build_loop_body): Fixed comment.
19266 (build_bc_statement): Enable debug information on break/continue
19267 statements.
19268 (patch_bc_statement): Fixed typos. Handle SWITCH statement
19269 context.
19270 (patch_switch_statement, case_identity, java_expand_switch): New
19271 functions.
19272
19273 1998-09-21 Per Bothner <bothner@cygnus.com>
19274
19275 * buffer.h (BUFFER_INIT): New macro.
19276 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
19277 Pass (struct jcf_partial *state) to most functions.
19278 (jcf_block, jcf_relocation): New types.
19279 Support labels, branches, conditionals, loops.
19280
19281 1998-09-21 Tom Tromey <tromey@cygnus.com>
19282
19283 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19284
19285 1998-09-21 Per Bothner <bothner@cygnus.com>
19286
19287 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
19288 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
19289 not integer_type_node (INT_TYPE_SIZ bits).
19290
19291 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
19292
19293 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
19294 * jcf-dump.c (print_exception_table): New function.
19295 (disassemble_method): Better handling of wide instructions.
19296 Make more robust for bad input.
19297
19298 1998-09-30 Jeffrey A Law (law@cygnus.com)
19299
19300 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19301 FreeBSD.
19302
19303 1998-09-17 Jeffrey A Law (law@cygnus.com)
19304
19305 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19306
19307 1998-09-17 Tom Tromey <tromey@cygnus.com>
19308
19309 * Makefile.in ($(PARSE_H)): Removed target.
19310
19311 1998-09-17 Jeffrey A Law (law@cygnus.com)
19312
19313 * Makefile.in (JAVA_OBJS): Add memmove.o
19314 (memmove.o): New target & rules.
19315
19316 1998-09-15 Tom Tromey <tromey@cygnus.com>
19317
19318 * expr.c (expand_invoke): Don't generate a call to the class init
19319 code.
19320
19321 1998-09-14 Jeffrey A Law (law@cygnus.com)
19322
19323 * Makefile.in: Add many missing dependencies.
19324 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19325 as appropriate.
19326 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19327 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19328
19329 1998-09-11 Per Bothner <bothner@cygnus.com>
19330
19331 * decl.c (complete_start_java_method): If method is static (and
19332 not private) call _Jv_InitClass.
19333 * expr.c (expand_invoke): Don't call build_class_init.
19334
19335 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
19336
19337 1998-09-10 Jeffrey A Law (law@cygnus.com)
19338
19339 * Make-lang.in (GCJ): Define before using.
19340
19341 1998-09-09 Jeffrey A Law (law@cygnus.com)
19342
19343 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19344 losing due to namespace pollution in GNU getopt.h
19345
19346 1998-09-09 Tom Tromey <tromey@cygnus.com>
19347
19348 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19349 (java.all.cross): Likewise.
19350 (java.rest.encap): Likewise.
19351
19352 1998-09-08 Jeffrey A Law (law@cygnus.com)
19353
19354 * gjavah.c (print_class_decls): Fix thinko in arglist
19355 * jcv-io.c (find_classfile): Similarly.
19356
19357 1998-09-07 Jeffrey A Law (law@cygnus.com)
19358
19359 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19360
19361 1998-09-05 Tom Tromey <tromey@cygnus.com>
19362
19363 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19364 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19365 * Makefile.in (PARSE_C): New macro.
19366 (PARSE_H): Likewise.
19367 (PARSE_SCAN_C): Likewise.
19368 ($(PARSE_C)): Target renamed from parse.c.
19369 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19370 (clean): Remove parse-scan.c as well.
19371 (parse.o): Depend on $(PARSE_C).
19372
19373 1998-09-05 Anthony Green <green@cygnus.com>
19374
19375 * README, license.terms: Removed.
19376
19377 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19378 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19379 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19380 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19381 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19382 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19383 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19384 and Java trademark attribution.
19385
19386 1998-09-04 Tom Tromey <tromey@cygnus.com>
19387
19388 * Makefile.in: Use gcjh, not gjavah.
19389 * config-lang.in (stagestuff): Use gcjh, not gjavah.
19390 * Make-lang.in: Changed gjavah to gcjh everywhere.
19391
19392 1998-09-03 Per Bothner <bothner@cygnus.com>
19393
19394 * gjavah.c: Support new -prepend -add -append flags.
19395 (print_method_info): Method is not virtual if class is final.
19396
19397 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
19398
19399 * jv-scan.c: Fixed copyright assignment.
19400 * keyword.gperf: Likewise.
19401 * keyword.h: Likewise.
19402 * lex.c: Fixed copyright assignment.
19403 (java_lex): Push unicode back when parsing '<'.
19404 * lex.h: Fixed copyright assignment.
19405 * parse-scan.y: Likewise.
19406 * parse.h: Fixed copyright assignment.
19407 (build_debugable_stmt, complete_for_loop): New function prototypes.
19408 * parse.y: Fixed copyright assignment.
19409 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19410 size_zero_node when completing a loop with no exit condition.
19411 (for_statement_nsi:): Define action.
19412 (for_init:, for_update:): Return size_zero_node when empty.
19413 (declare_local_variables): Call build_debugable_stmt.
19414 (build_debugable_stmt): New function.
19415 (build_loop_body): Build debugable statement around loop
19416 condition part.
19417 (complete_loop_body): Take into account the debugable statement
19418 around the EXIT_EXPR.
19419 (complete_loop_body): New function.
19420 (patch_exit_expr): Fixed condition inversion.
19421
19422 1998-09-02 Tom Tromey <tromey@cygnus.com>
19423
19424 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19425 name of thread define.
19426 * jvspec.c (THREAD_NAME): New macro.
19427 (GCLIB): Likewise.
19428 (THREADLIB): Likewise.
19429 (lang_specific_driver): Recognize attempt to link with thread
19430 library or gc library. Recognize -ljava on command line so it
19431 isn't linked against more than once.
19432
19433 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19434
19435 * parse-scan.y (report_main_declaration): Name of the class
19436 containing `main' can be a qualified name.
19437
19438 1998-08-31 Tom Tromey <tromey@cygnus.com>
19439
19440 * config-lang.in: Changed gjavac to gjc everywhere.
19441 * Make-lang.in: Changed gjavac to gjc everywhere.
19442
19443 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19444
19445 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19446 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19447 and install the files.
19448 * Makefile.in (JAVA_OBJS_LITE): New variable.
19449 (compiler:): Now include jv-scan as a dependency.
19450 (../jv-scan$(exeext), parse-scan.c): New targets.
19451 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19452 * config-lang.in (compilers): Removed gcj, gjavah from the list.
19453 * jcf-parse.c (parse_source_file): Call java_layout_classes and
19454 check for errors even if parse_only.
19455 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19456 defined.
19457 (yylex): New function. Uses java_lex body.
19458 (java_lex): Removed commented out statement. Remove local variable
19459 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19460 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19461 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19462 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19463 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19464 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19465 where appropriate.
19466 (java_lex_error): Empty if JC1_LITE is defined.
19467 (java_get_line_col): Return 0 if JC1_LITE is defined.
19468 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19469 SET_MODIFIER_CTX): Moved into the section containing the macros
19470 conditionally defined by JC1_LITE.
19471 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19472 argument if JC1_LITE is defined.
19473 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19474 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19475 is defined.
19476 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19477 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19478 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19479 to different values according to JC1_LITE.
19480 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19481 declared if JC1_LITE set.
19482 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19483 defined if JC1_LITE not set.
19484 (struct parser_ctx): Reorganized and skip the jc1 front end part
19485 if JC1_LITE set.
19486 (java_layout_classes): New function definition.
19487 (java_push_parser_context, java_init_lex, yyparse, yylex,
19488 yyerror): Prototype always declared. All other static function
19489 prototypes declared only if JC1_LITE is not set.
19490 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19491 declared in parse.h.
19492 (java_layout_classes): New function.
19493 (java_complete_expand_methods): No longer layout the class here.
19494 * parse-scan.y: New file.
19495 * jv-scan.c: New file.
19496
19497 1998-08-25 Tom Tromey <tromey@cygnus.com>
19498
19499 * gjavah.c (main): Handle -friend option.
19500 (friend_specs): New global.
19501 (generate_access): Handle friend_specs.
19502 (process_file): Likewise.
19503 (MAX_FRIENDS): New macro.
19504 (friend_count): New global.
19505 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
19506 Changed all callers.
19507
19508 1998-08-24 Per Bothner <bothner@cygnus.com>
19509
19510 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
19511 (main): Handle processing all the entries of a named .zip archive.
19512 * jcf-io.c (jcf_trim_old_input): New function.
19513 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
19514
19515 1998-08-24 Per Bothner <bothner@cygnus.com>
19516
19517 * lang.c (flag_assume_compiled): Make default be on.
19518
19519 1998-08-21 Per Bothner <bothner@cygnus.com>
19520
19521 * jcf-dump.c: Add bunches of flags to control output more.
19522 (process_class): New function; support printing more than one class.
19523 (main): Support new --print-main and --javap flags.
19524 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
19525 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
19526
19527 1998-08-20 Per Bothner <bothner@cygnus.com>
19528
19529 Change mangling of dispatch table to match C++ vtable (w/thunks).
19530 * class.c (build_dtable_decl), java-tree.h: New function.
19531 (make_class_data): Call it.
19532 * decl.c (init_decl_processing): Likewise.
19533
19534 1998-08-19 Warren Levy <warrenl@cygnus.com>
19535
19536 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19537 soft_anewarray; adjust args passed.
19538 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19539 match _Jv_NewObjectArray.
19540
19541 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
19542
19543 * decl.c (push_labeled_block, pop_labeled_block): New functions.
19544 * expr.c (loopup_label): Call create_label_decl.
19545 (create_label_decl): New function.
19546 (java_lang_expand_expr): Call expand_start_bindings with argument
19547 set to zero.
19548 * java-tree.h Added space after PROTO in function declarations
19549 when necessary.
19550 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19551 (create_label_decl, push_labeled_block): New function
19552 declarations.
19553 * lex.c (label_id): Initialize.
19554 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19555 switch.
19556 * parse.h Added space after PROTO in function declarations when
19557 necessary.
19558 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19559 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19560 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19561 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19562 macros.
19563 (struct parser_ctxt): New fields current_loop,
19564 current_labeled_block.
19565 (build_if_else_statement, patch_if_else_statement,
19566 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19567 generate_labeled_block, complete_labeled_statement,
19568 build_bc_statement, patch_bc_statement, patch_loop_statement,
19569 build_new_loop, build_loop_body, complete_loop_body): New function
19570 declarations.
19571 * parse.y (java_warning_count): New global variable.
19572 (label_id): New static variable.
19573 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19574 (block:): Return size_zero_node when block is empty.
19575 (empty_statement:): Return size_zero_node.
19576 (statement:): Implement supplemental action when for_statement: is
19577 reduced.
19578 (label_decl:): New rule.
19579 (labeled_statement:): Rewritten using label_decl. Actions
19580 implemented.
19581 (labeled_statement_nsi:): Likewise.
19582 (if_then_statement): Actions implemented.
19583 (while_expression): New rule.
19584 (while_statement:): Rewritten using while_expression. Actions
19585 implemented.
19586 (while_statement_nsi:): Likewise.
19587 (do_statement_begin:): New rule.
19588 (do_statement:): Rewritten using do_statement_begin. Actions
19589 implemented.
19590 (for_statement:): Rewritten using for_begin. Actions implemented.
19591 (for_statement_nsi:): Likewise.
19592 (for_header:, for_begin:): New rules.
19593 (for_init:): Actions implemented.
19594 (statement_expression_list:, break_statement:,
19595 continue_statement:): Likewise.
19596 (yyerror): Count number of issued warning(s).
19597 (java_report_errors): Report error(s) and/or warning(s).
19598 (java_complete_class): Use build_java_argument_signature to
19599 recompute completed method signature.
19600 (java_check_regular_methods): New locals method_wfl and aflags.
19601 Use method_wfl instead of lookup_cl during error reports. Fixed
19602 indentation and modified some error messages. Use
19603 lang_printable_name in method instead of the DECL_NAME. New code
19604 to issue warnings on methods not overriding corresponding methods
19605 private to a different package.
19606 (java_method_add_stmt): Call add_stmt_to_compound.
19607 (add_stmt_to_compound): New function.
19608 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19609 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19610 (build_if_else_statement, patch_if_else_statement,
19611 build_labeled_block, generate_labeled_block,
19612 complete_labeled_statement, build_new_loop, build_loop_body,
19613 complete_loop_body, patch_loop_statement, build_bc_statement,
19614 patch_bc_statement, patch_exit_expr): New functions.
19615 * typeck.c (build_java_signature): Build argument signature before
19616 enclosing it in between parenthesis.
19617
19618 1998-08-17 Warren Levy <warrenl@cygnus.com>
19619
19620 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19621 (JAVA_OBJS): Added reminder comment
19622
19623 1998-08-13 Nick Clifton <nickc@cygnus.com>
19624
19625 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19626 be interpreted as a long long.
19627
19628 1998-08-13 Warren Levy <warrenl@cygnus.com>
19629
19630 * decl.c (init_decl_processing): Use _Jv_InitClass, not
19631 soft_initialise_class. Use _Jv_NewMultiArray, not
19632 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
19633 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
19634 _Jv_CheckArrayStore, not soft_checkarraystore. Use
19635 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19636
19637 1998-08-12 Per Bothner <bothner@cygnus.com>
19638
19639 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19640 length_identifier_node): New global tree node constants.
19641 * parse.y (kw_super, kw_this, kw_length): Removed globals.
19642 Replace uses by super_identifier_node etc.
19643 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
19644
19645 * parse.y (resolve_field_access): Don't special-case ".length" if
19646 flag_emit_class_files.
19647 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
19648 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
19649 and ARRAY.length.
19650
19651 1998-08-11 Per Bothner <bothner@cygnus.com>
19652
19653 * decl.c (init_decl_processing): Remove unused method_type_node fields.
19654 * class.c (make_method_value): Remove init for removed fields.
19655
19656 * class.c (layout_class): Use build_java_argument_signature.
19657 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
19658
19659 * typeck.c (push_java_argument_signature): Removed. Merged into ...
19660 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
19661 (build_java_signature): Don't use push_java_argument_signature.
19662
19663 * typeck.c (lookup_argument_method): New function.
19664 * parse.y (java_check_regular_methods): Use lookup_argument_method
19665 instead of lookup_java_method2 followed by lookup_java_method.
19666
19667 * parse.y (check_method_redefinition): Minor optimization.
19668
19669 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
19670 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19671
19672 1998-08-10 Tom Tromey <tromey@cygnus.com>
19673
19674 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19675 c-pragma.o.
19676
19677 * gjavah.c (java_float_finite): Use K&R-style definition.
19678 (java_double_finite): Likewise.
19679 (generate_access): Now returns void. Changed all callers.
19680 (last_access_generated): Removed.
19681 (process_file): Only make a single pass over the .class file.
19682
19683 1998-07-29 Per Bothner <bothner@cygnus.com>
19684
19685 * class.c (get_dispatch_table): Add extra dummy vtable entry,
19686 for compatibility for G++ (with -fvtable-thunks).
19687 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
19688
19689 * gjavah.c (process_file): Use public inheritance for super-class.
19690
19691 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
19692
19693 * lex.c (java_init_lex): Initialize ctxp->package.
19694 * parse.h (struct parser_ctxt): package and package_len replaced
19695 by tree package, an identifier node. Field method_decl_list is
19696 gone. Fixed comments.
19697 (lookup_field_wrapper, merge_qualified_name, not_accessible,
19698 class_in_current_package): New function prototypes.
19699 * parse.y (array_type:): Set class loaded flag on primitive type
19700 arrays.
19701 (package_declaration:): Assign ctxp->package to the
19702 identifier node.
19703 (method_invocation:): Handle invocation of method qualified by
19704 `super'.
19705 (single_type_import_declaration:): Removed ambiguity check.
19706 (java_pop_parser_context): New local variable `next'. Reset and
19707 set IMPORT_CLASSFILE_NAME flags on current and previous import
19708 list.
19709 (java_accstring_lookup): Use new local macro COPY_RETURN.
19710 (lookup_field_wrapper): New function.
19711 (parser_qualified_classname): Use merge_qualified_name.
19712 (parser_check_super_interface): Broaden error message.
19713 (do_resolve_class): Check for qualified class name in the current
19714 compilation unit if appropriate.
19715 (process_imports): Check for already defined classes.
19716 (check_pkg_class_access): Got rid of call to
19717 get_access_flags_from_decl.
19718 (java_complete_expand_methods): Call safe_layout_class based on
19719 the current class size.
19720 (make_qualified_primary): Build a WFL qualification on primary if
19721 none exists.
19722 (merge_qualified_name): New function.
19723 (make_qualified_name): Use merge_qualified_name.
19724 (resolve_expression_name): Use safe_lookup_field.
19725 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19726 (resolve_qualified_expression_name): Likewise. Check on resolved
19727 element accessibility.
19728 (not_accessible_p, class_in_current_package): New functions.
19729 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19730 (patch_method_invocation_stmt): Merged common pieces. Check
19731 accessibility of invoked method.
19732 (check_for_static_method_reference): Add returned type in error
19733 message.
19734 (invocation_mode): Get rid of bogus check on PRIVATE methods.
19735 (refine_accessible_methods_list): Merged two conditions in test.
19736 (java_complete_class): Sanity check on stabilize_ref gone.
19737 * zextract.c (read_zip_archive): Cast lseek second argument to long.
19738
19739 1998-07-28 Per Bothner <bothner@cygnus.com>
19740
19741 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
19742
19743 1998-07-24 Tom Tromey <tromey@cygnus.com>
19744
19745 * gjavah.c (F_NAN): Removed.
19746 (F_NAN_MASK): New macro.
19747 (F_POSITIVE_INFINITY): Removed.
19748 (F_NEGATIVE_INFINITY): Likewise.
19749 (java_float_finite): Rewrote.
19750 (D_NAN_MASK): Renamed.
19751 (java_double_finite): Rewrote.
19752 (D_POSITIVE_INFINITY): Removed.
19753 (D_NEGATIVE_INFINITY): Likewise.
19754
19755 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19756 If verbose, print underlying representation of value in hex.
19757
19758 1998-07-24 Per Bothner <bothner@cygnus.com>
19759
19760 * buffer.h, buffer.c: New files.
19761 * Makefile.in (JAVA_OBJS): Add buffer.o.
19762
19763 Support locals variables and writing their debug entries to .class.
19764 * jcf-write.c: Simplify some by user new buffer type.
19765 (vode_buffer_grow): Removed.
19766 (struct localvar_info): New type.
19767 (localsvars, localvartable): New buffers.
19768 (localvar_alloc, localvar_free): New functions.
19769 (generate_bytecode_insns): Handle local variables.
19770 (generate_classfile): Write LocalVariableTable attribute.
19771
19772 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
19773
19774 * jcf-io.c (open_in_zip): Check the zipfile magic number.
19775 * zipfile.h (ZIPMAGIC): New macro.
19776
19777 1998-07-24 Tom Tromey <tromey@cygnus.com>
19778
19779 * Makefile.in (gjavah.o): Updated dependencies.
19780 (jcf-dump.o): Likewise.
19781 (all.indirect): Use ../gjavah.
19782 (../gjavah$(exeext)): Likewise.
19783 (clean): Don't remove gjavah.
19784 (clean): Remove parse.c, not java/parse.c.
19785 * Make-lang.in (java): Added gjavah.
19786 (gjavah$(exeext)): New target.
19787 (GJAVAH_SOURCES): New macro.
19788 (java.all.build): Added gjavah.
19789 (java.all.cross): Likewise.
19790 (java.rest.encap): Likewise.
19791 * config-lang.in (compilers, stagestuff): Added gjavah.
19792
19793 1998-07-23 Tom Tromey <tromey@cygnus.com>
19794
19795 * gjavah.c (java_float_finite): New function.
19796 (java_double_finite): Likewise.
19797 (F_POSITIVE_INFINITY): New macro.
19798 (F_NEGATIVE_INFINITY): Likewise.
19799 (F_NAN): Likewise.
19800 (D_POSITIVE_INFINITY): Likewise.
19801 (D_NEGATIVE_INFINITY): Likewise.
19802 (D_NAN): Likewise.
19803 (print_field_info): Use java_float_finite and java_double_finite.
19804
19805 1998-07-23 Per Bothner <bothner@cygnus.com>
19806
19807 * parse.y (method_header): Name "this" implicit argument.
19808
19809 1998-07-22 Per Bothner <bothner@cygnus.com>
19810
19811 * jcf-write.c: Write out LineNumberTable attribute in .class file.
19812 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
19813 (put_linenumber): New function.
19814 (generate_bytecode_insns, generate_classfile): Write line numbers.
19815
19816 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19817
19818 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19819 (lookup_name, build_known_method_ref, build_class_init,
19820 build_invokevirtual, invoke_build_dtable, match_java_method,
19821 build_field_ref, pushdecl_force_head, build_java_binop,
19822 binary_numeric_promotion, build_decl_no_layout,
19823 build_java_arrayaccess, build_newarray, build_anewarray,
19824 build_java_array_length_access, build_java_arraynull_check): New
19825 extern function prototypes.
19826 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19827 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19828 java-tree.h.
19829 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
19830 to NULL
19831 * jcf.h (jcf_out_of_synch): New extern function prototype.
19832 * parse.h: Static/global function implemented in parse.y
19833 prototyped and declarations moved at the end of the file.
19834 (DECL_P): Check that the argument isn't null.
19835 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19836 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
19837 (QUAL_DECL_TYPE): New macro.
19838 (PARAMS): Macro definition removed.
19839 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19840 (return_statement:): Call build_return.
19841 (field_access:): Call make_qualified_primary in sub rule.
19842 (method_invocation:): Build method invocation and call
19843 make_qualified_primary when processing primaries.
19844 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
19845 get_type_from_signature.
19846 (java_check_regular_method): Extra integer 0 argument when calling
19847 lookup_java_method2.
19848 (lookup_java_interface_method2): Extra method DECL argument when
19849 calling lookup_java_interface_method2.
19850 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
19851 COMPOUND_EXPR node.
19852 (java_complete_expand_method): Layout current class iff not
19853 already done. Don't process interface's methods.
19854 (java_complete_expand_method): Use super class only if it
19855 exists. Use current class otherwise.
19856 (make_qualified_primary): New function.
19857 (resolve_expression_name): Process qualified expression or
19858 expression from primary the same way.
19859 (resolve_expression_name): Two last arguments to
19860 resolve_field_access are now NULL_TREEs.
19861 (resolve_field_access): New variable is_static. Local field must
19862 be DECLs. is_static computed on field DECLs only. Append code in
19863 where_found to the field access if necessary. Use QUAL_DECL_TYPE
19864 to initialize field_type.
19865 (resolve_qualified_expression_name): New local variable,
19866 previous_call_static and is_static. Handle primaries with function
19867 calls, casts, array references and `this'. `super' now handled as
19868 `(super_class)this'. Use is_static to clarify boolean expressions.
19869 Added code to handle case where a proper handle is required to
19870 access a field. Use QUAL_DECL_TYPE where applicable.
19871 (maybe_access_field): New function.
19872 (patch_method_invocation_stmt): New arguments primary, where,
19873 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
19874 deleted. Use `where' as a type to search from if specified. Check
19875 for static method reference where forbidden. Append primary or
19876 current_this to the argument list if not calling constructor nor
19877 static methods.
19878 (check_for_static_method_reference): New function.
19879 (patch_invoke): Layout the class on which new is done if
19880 necessary.
19881 (lookup_method_invoke): Changed format to report errors on
19882 methods.
19883 (qualify_ambiguous_name): New local variable this_found. Now
19884 handle things from primaries. Method call are considered
19885 expression names.
19886 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
19887 changed into NULLs.
19888 (not_initialized_as_it_should_p): Comply with the new DECL_P.
19889 (java_complete_tree): New case fo RETURN_EXPR. Process function
19890 call arguments in separate function.
19891 (complete_function_arguments): New function.
19892 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
19893 anymore.
19894 (patch_assignment): Take the return function slot into account as
19895 a RHS. Distinguish assignment from a return.
19896 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
19897 when checking methods in interfaces.
19898 (resolve_type_during_patch): NULL argument to unresolve_type_p
19899 instead of NULL_TREE.
19900 (patch_newarray): Fixed typo in comment.
19901 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
19902 (build_return, patch_return): New functions.
19903 * typeck.c (lookup_java_constructor): Fixed typo in comment.
19904
19905 1998-07-21 Per Bothner <bothner@cygnus.com>
19906
19907 * constants.c (find_name_and_type_constant, find_fieldref_index,
19908 find_methodref_index): New methods.
19909 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
19910 just return given method. Also, rename to build_known_method_ref.
19911 (expand_invoke): Rename call to build_invoke_non_interface.
19912 * java-tree.h, parse.h: Update prototype.
19913 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
19914 (such as expand_expr_stmt) if flag_emit_class_files.
19915 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
19916 STACK_TARGET, IGNORE_TARGET): New macros.
19917 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
19918 (generate_bytecode_insn): New function to generate method's bytecode.
19919 (generate_classfile): Node generate Code attribute for a method.
19920 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
19921 push_long_const, field_op, adjust_typed_op, maybe_wide):
19922 New functions used by generate_bytecode_insn.
19923
19924 * typeck.c (signature_include_return): Remove variable.
19925 (push_java_argument_signature, build_java_argument_signature): New.
19926 (build_java_signature): Use push_java_argument_signature.
19927 * parse.y: Use build_java_argument_signature instead of fiddling
19928 with signature_include_return.
19929
19930 1998-07-17 Tom Tromey <tromey@cygnus.com>
19931
19932 * gjavah.c (print_c_decl): Always generate JArray<>* for array
19933 types.
19934
19935 * Makefile.in (all.indirect): Added gjavah$(exeext).
19936 (gjavah$(exeext)): Added $(exeext).
19937 (clean): Likewise.
19938
19939 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19940
19941 * class.c (layout_class): Call to java_layout_parsed_class replace
19942 by safe_layout_class.
19943 * expr.c (build_java_array_length_access): Removed static storage
19944 class in the function definition.
19945 (build_java_arraynull_check): Likewise.
19946 Also fixed typos in two comments.
19947 * lex.c (java_init_lex): Initialize static global kw_length.
19948 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19949 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
19950 java_lex_error.
19951 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19952 * parse.h (resolve_no_layout): New static function declaration.
19953 (get_identifier_in_static): Declaration removed.
19954 (java_layout_parsed_class): Function name declaration changed to
19955 safe_layout_class.
19956 (build_newarray_node, patch_newarray, resolve_type_during_patch,
19957 not_initialized_as_it_should_p, build_this): New static function
19958 declarations.
19959 (pushdecl_force_head, build_java_binop, int_fits_type_p,
19960 binary_numeric_promotion, stabilize_reference,
19961 build_decl_no_layout, build_java_arrayaccess): Extern function
19962 declarations moved into their own section.
19963 (build_newarray, build_anewarray, build_java_array_length_access,
19964 build_java_arraynull_check): New extern function declarations.
19965 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19966 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
19967 fake tree codes.
19968 (CALL_CONSTRUCTOR_P): New macro.
19969 * parse.y (kw_length): New static global tree node.
19970 (return_statement): Tagged <node>.
19971 (RETURN_TK): Tagged <operator>.
19972 (variable_declarator_id:): Build variable declaration with an
19973 empty initialization value if a syntax error was found in the
19974 initialization part of the variable declaration.
19975 (statement_without_trailing_substatement:): return_statement: now
19976 uses the default rule.
19977 (return_statement:): Temporarily fixed to return NULL_TREE.
19978 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19979 (class_instance_creation_expression:): Class creation rules now
19980 call build_method_invocation upon reduction.
19981 (array_creation_expression:): Rules call build_newarray_node upon
19982 reduction.
19983 (dim_exprs:): Build a list of dimension expressions.
19984 (dim_expr:): Store location of the OSB_TK in the dimension
19985 expression node.
19986 (method_invocation:): Added a new error rule.
19987 (build_unresolved_array_type): WFL argument may also be an array
19988 on a primitive type. Name of the argument changed to reflect this.
19989 (method_declarator): Insert argument type at the beginning of the
19990 argument type list and later reverse the list.
19991 (unresolved_type_p): Argument 'returned' may be optionally
19992 NULL_TREE.
19993 (java_layout_class_from_source): Function renamed
19994 safe_layout_class.
19995 (resolve_and_layout): Now call resolve_no_layout and
19996 safe_layout_class.
19997 (resolve_no_layout): New function.
19998 (purify_type_name): New function.
19999 (complete_class_report_errors): Call purify_type_name during error
20000 report on a type not found.
20001 (process_imports): error_found local variable doesn't need to be
20002 initialized to zero.
20003 (declare_local_variables): New local type_wfl. Fixed typo in error
20004 message. type_wfl assigned to unresolved type and used to register
20005 incomplete type. Build a WFL around the variable initialization
20006 statement so that debug info can be generated on it.
20007 (source_start_java_method): Reverse argument list after they've
20008 been processed.
20009 (current_this): New static global variable.
20010 (java_complete_expand_methods): Set current_this when appropriate.
20011 (resolve_expression_name): Build correct static and non static
20012 field access bearing a simple name.
20013 (resolve_field_access): Resolve the length field of arrays. Handle
20014 f.m() cases.
20015 (patch_method_invocation_stmt): Set the type of the method
20016 invocation to error_mark_node. This value is later overridden by a
20017 valid type, if any. Don't handle qualified constructor invocation
20018 as qualified method invocation. Call lookup_method_invoke with its
20019 new flag. It's no longer necessary to access the selected method
20020 as the value of a tree list. Handle constructor invocation.
20021 (patch_invoke): Reverse argument list when invoking non interface
20022 methods. Insert call to new as the first argument of the
20023 constructor.
20024 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20025 defined within a final class. Return INVOKE_STATIC if the invoked
20026 method is a constructor.
20027 (lookup_method_invoke): New lc argument is a flag to indicate a
20028 constructor lookup. Now handle constructor lookup. Choose the most
20029 specific method in case several were matching the invocation
20030 requirements. Return a method decl instead of a tree list featuring
20031 one single method decl element.
20032 (refine_accessible_methods_list): New lc flag argument to
20033 indicate that a constructor is being looked up.
20034 (not_initialized_as_it_should_p): New function.
20035 (java_complete_tree): Now process fake tree codes
20036 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20037 save_expr on resolved function call arguments. Case on
20038 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20039 (patch_assignment): LHS can be a field access expression. When
20040 dealing with reference, lhs_type is the promoted type of the
20041 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20042 applicable.
20043 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20044 (patch_binop): Use not_initialized_as_it_should_p where
20045 applicable.
20046 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20047 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20048 where applicable.
20049 (resolve_type_during_patch): New function.
20050 (patch_cast): Call resolve_type_during_patch to resolve type and
20051 report error accordingly.
20052 (patch_array_ref): Use not_initialized_as_it_should_p where
20053 applicable. Array base expression is saved before being
20054 used. Promote the type of an array elements if it contains non
20055 builtin types.
20056 (build_newarray_node, patch_newarray, build_this): New functions.
20057
20058 1998-07-16 Tom Tromey <tromey@cygnus.com>
20059
20060 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20061 increment it in `for' statement.
20062 (print_field_info): If number is inf or nan, don't print it.
20063 (print_method_info): If method name is `delete', just ignore it.
20064 (print_c_decl): Special-case jstringArray.
20065
20066 * gjavah.c (help): New function.
20067 (no_argument): New function.
20068 (usage): Changed text.
20069 (main): Rewrote argument handling. Now handles -v, --help,
20070 --version.
20071 (version): New function.
20072 (found_error): New global.
20073 (main): Return found_error.
20074 (generate_access): Set found_error.
20075 (print_c_decl): Likewise.
20076
20077 1998-07-15 Tom Tromey <tromey@cygnus.com>
20078
20079 * gjavah.c (print_c_decl): Don't print "," when examining field.
20080 Skip type name when looking at "[L" types.
20081 (process_file): Now static.
20082 (generate_access): Now returns int.
20083 (last_access_generated): New global.
20084 (process_file): Clear last_access_generated; make multiple passes
20085 over the class.
20086 (print_field_info): Just return if generate_access returns true.
20087 (print_method_info): Likewise. Also, allow <init> functions to
20088 pass through.
20089 (print_c_decl): Added is_init argument. Print constructors
20090 properly.
20091 (print_cxx_classname): Use UTF8_GET to extract characters from
20092 string.
20093 (print_base_classname): New function.
20094 (print_class_decls): New function.
20095 (process_file): Use it.
20096 (utf8_cmp): New function.
20097
20098 1998-07-13 Nick Clifton <nickc@cygnus.com>
20099
20100 * lang-options.h: Format changed to match changes in gcc/toplev.c
20101 to implement a --help option.
20102
20103 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
20104
20105 * decl.c (init_decl_processing): Revert change to dtable_type.
20106
20107 1998-07-09 Per Bothner <bothner@cygnus.com>
20108
20109 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20110
20111 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
20112
20113 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20114
20115 * lang.c (lang_init): Default flag_exceptions to 1, without
20116 checking to see if it's 2 first.
20117
20118 1998-07-08 Jeffrey A Law (law@cygnus.com)
20119
20120 * constants.c: Include "system.h".
20121 * decl.c: Likewise.
20122 * lang.c (flag_new_exceptions): Get via extern now.
20123 (lang_init_options): New functions. Turn on flag_new_exceptions.
20124
20125 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
20126
20127 * lex.c (java_lex): Return 0 when we see an invalid character in
20128 the input.
20129
20130 * lex.c (java_read_char): Specify extra argument when calling
20131 java_lex_error.
20132 (java_read_unicode, java_parse_end_comment,
20133 java_parse_escape_sequence): Likewise,
20134 (java_lex): Specify extra argument when calling
20135 java_lex_error. Test that IDs are beginning with a legal character
20136 for IDs. Handle invalid characters with an error message and a
20137 call to java_lex_error.
20138 (java_lex_error): Adjust column position by new argument
20139 `forward'. Issue an error even if in the middle of reporting an
20140 other error.
20141
20142 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
20143
20144 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20145 we don't explicitly put a null pointer when we're copying it.
20146
20147 1998-07-07 Tom Tromey <tromey@cygnus.com>
20148
20149 * gjavah.c (print_cxx_classname): New function.
20150 (super_class_name): Likewise.
20151 (print_super_fields): Removed.
20152 (in_super): Removed.
20153 (print_field_info): Never generate #defines.
20154 (print_c_decl): Changed generated types to match JNI. No longer
20155 print class name before method name.
20156 (print_method_info): Print "static" before static methods.
20157 Print "virtual" before non-final methods.
20158 (usage): Use exit(1), not exit(-1).
20159 (main): Likewise.
20160 (print_field_info): Use %.17g to print a double.
20161 (last_access): New globals.
20162 (process_file): Initialize last_access.
20163 (usage): Now static.
20164 (ACC_VISIBILITY): New define.
20165 (generate_access): New function.
20166 (print_field_info): Call it.
20167 (print_method_info): Likewise. Also, generate information for all
20168 methods, not just native methods. Return void.
20169 (print_c_decl): Return void.
20170 (print_field_info): Return void.
20171
20172 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20173
20174 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20175 processing the jc1 grammar file. Prefix bison functions and
20176 variables with java_.
20177 (parse.c): Dependencies on parse.h and lex.h
20178 * expr.c (build_java_arrayaccess): Function now global.
20179 * java-tree.h: Comment reorganized to carry on previous
20180 classification effort.
20181 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20182 RESOLVE_TYPE_NAME_P): New flags on WFLs.
20183 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20184 java_parse (new prefix java_ generated by bison).
20185 (java_layout_parsed_class, java_register_parsed_class): Function
20186 call removed.
20187 (yyparse): Removed unnecessary call to init_outgoing_cpool.
20188 * lex.c (static tree wfl_op): Variable deleted.
20189 (java_init_lex): Initialize kw_super and kw_this. Initialize more
20190 ctxp fields to NULL_TREE.
20191 (java_lex): No longer create WFL for operators. Filename caching
20192 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20193 created as STRING_CST and later expanded. Removed extra argument
20194 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20195 and SUPER.
20196 (build_wfl_node): Removed code in comments.
20197 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20198 store token and location data in the current bison token.
20199 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20200 static/extern function declaration at the beginning of the file.
20201 (struct qualification): Data structure definition deleted.
20202 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20203 (qualify_ambiguous_name): Function declaration modified. Function
20204 now returns nothing.
20205 (build_array_ref, patch_array_ref, make_qualified_name,
20206 resolve_qualified_expression_name, maybe_generate_clinit,
20207 resolve_field_access): New static function declarations.
20208 (build_java_arrayaccess): New extern function declaration.
20209 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20210 (CALL_EXPR_PRIMARY): Macro deleted.
20211 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20212 (struct parser_ctxt): Field initialized_final
20213 removed. non_static_initialized, static_initialized: New fields.
20214 * parse.y (static tree kw_super, static tree kw_this): New global
20215 static.
20216 (%union): tree wfl field of operator member replaced by int
20217 location. WFLs are non longer created for operators.
20218 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20219 (qualified_name:): Now calls make_qualified_name to build the
20220 identifier.
20221 (type_declaration:): Consider generating <clinit> when class
20222 parsing completed.
20223 (variable_declarator:): Directly build an assignment node when the
20224 variable is initialized when declared.
20225 (this_or_super:): Build a WFL and set current location when THIS
20226 or SUPER are parsed.
20227 (expression_statement:): Wrap statement around a WFL.
20228 (primary_no_new_array:): Fixed typo. Changed value returned by
20229 THIS_TK because of its new type (temporary).
20230 (dim_exprs:): Temporary fix because of OSB_TK's new type.
20231 (field_access:): Build qualified name with SUPER.
20232 (method_invocation:): Fixed returned value because of SUPER's new
20233 type.
20234 (array_access:): Use OSB_TK location information.
20235 (post_increment_expression:, post_decrement_expression:,
20236 unary_expression:, pre_increment_expression:,
20237 pre_decrement_expression:, unary_expression_not_plus_minus:,
20238 cast_expression:, multiplicative_expression:,
20239 additive_expression:, shift_expression:, relational_expression:,
20240 equality_expression:, and_expression:, exclusive_or_expression:,
20241 inclusive_or_expression:, conditional_and_expression:,
20242 conditional_or_expression:, assignment:): Use new location/token
20243 information available on operators.
20244 (create_class): Set super_decl_type to NULL_TREE when processing
20245 java.lang.Object.
20246 (register_fields): Field initialization is now a MODIFY_EXPR
20247 node. Chain initialization code to the matching lists (according
20248 to the field declaration modifiers).
20249 (maybe_generate_clinit): New function.
20250 (method_header): Don't set method's DECL_NAME to a WFL when adding
20251 methods to java.lang.Object.
20252 (resolve_and_layout): Now can return NULL_TREE if the type
20253 resolution fails. Otherwise, return the class DECL instead of its
20254 TYPE.
20255 (check_method_redefinition): Don't patch method DECL_NAME if it
20256 belongs to java.lang.Object.
20257 (process_imports): Simply assign error_found to the value returned
20258 by check_pkg_class_access.
20259 (declare_local_variables): Don't use their init statements (if
20260 any) when parsing error were previously found. Reuse MODIFY_EXPR
20261 build during parsing as an init statement.
20262 (java_method_add_stmt): Now return the current method body.
20263 (java_layout_parsed_class, java_register_parsed_class): Functions
20264 removed.
20265 (java_complete_expand_methods): Initialize the constant pool on a
20266 per class basis. Layout the classes before expanding their method
20267 bodies. Don't try expand artificial constructor code if error were
20268 found. Make the classes data and register them if no error were
20269 found.
20270 (java_complete_expand_method): Retrieve an artificial constructor
20271 argument list before entering its body. Assign the top block to
20272 the artificial constructor function body and set types of declared
20273 blocks and compound statements to void. Walk method body if not an
20274 artificial constructor.
20275 (make_qualified_name, cut_identifier_in_qualified): New functions.
20276 (resolve_expression_name): Fixed comments. Save/restore the
20277 current class CLASS_LOADED_P flag value. Build non qualified
20278 static field access and handle qualified expression names.
20279 (resolve_field_access, resolve_qualified_expression_name): New
20280 functions.
20281 (patch_method_invocation_stmt): Use the new expression resolution
20282 scheme, calling resolve_field_access when the function call is
20283 resolved as an expression.
20284 (qualify_ambiguous_name): Function rewritten to work on qualified
20285 expression produced by make_qualified_name.
20286 (java_complete_tree): Promote type when function's argument are
20287 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20288 the assignment to discover further errors if RHS is a expression
20289 name that fails to evaluate. Declare LHS initialized even though
20290 the assignment failed. Don't use the location variable and removed
20291 extra argument in patch function calls. Now handle the ARRAY_REF
20292 case and build internal string representation when STRING_CSTs are
20293 walked.
20294 (build_method_invocation): Don't wrap function call around a WFL.
20295 (build_assignment): Likewise. Use the operator location
20296 information.
20297 (patch_assignment): Handle array access LHSs. Handle error
20298 provenance, resulting in a better error report.
20299 (build_binop): Use op_location from operator as binop location
20300 information.
20301 (build_unaryop, build_incdec, build_cast): Likewise.
20302 (patch_binop): Extract location information from the node. Fixed
20303 typo in error message.
20304 (patch_unary_op): Extract location information from the node.
20305 (build_array_ref, patch_array_ref): New functions.
20306
20307 1998-07-01 Tom Tromey <tromey@cygnus.com>
20308
20309 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20310 match _Jv_IsInstanceOf.
20311 * decl.c (init_decl_processing): Use _Jv_NewArray, not
20312 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
20313
20314 1998-06-30 Tom Tromey <tromey@cygnus.com>
20315
20316 * decl.c (init_decl_processing): Functions are now named
20317 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20318
20319 1998-06-29 Per Bothner <bothner@cygnus.com>
20320
20321 * java-tree.h (load_class): Add prototype.
20322 * class.c (is_compiled_class): Add missing arg to load_class.
20323 * expr.c (expand_java_NEW): Call load_class.
20324 * parse.y (process_import): Removed bogus use of void return value.
20325
20326 1998-06-25 Per Bothner <bothner@cygnus.com>
20327
20328 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
20329 Function name is "_Jv_Throw" instead of "soft_athrow".
20330 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
20331 Function name is "_Jv_AllocObject" instead of "soft_new".
20332 Takes an extra parameter (object size).
20333 * expr.c: Update calls.
20334
20335 1998-06-24 Per Bothner <bothner@cygnus.com>
20336
20337 * lex.c (java_get_line_col): Handle end-of-file.
20338 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
20339
20340 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
20341
20342 * lang.c (lang_init): Make -fexceptions the default.
20343 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20344 exception handling is not turned on.
20345
20346 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
20347
20348 * lang.c (flag_new_exceptions): Make this this default.
20349 * decl.c (end_java_method): Call emit_handlers.
20350 * except.c (method_init_exceptions): Set language code and version.
20351 (expand_start_java_handler): Enable exception, and call
20352 expand_eh_region_start.
20353 (expand_end_java_handler): Enable exception, and set up catch blocks.
20354 (emit_handlers): New routine to generate the saved handlers.
20355 * java-except.h (emit_handlers): Add prototype.
20356
20357 1998-06-12 Per Bothner <bothner@cygnus.com>
20358
20359 We used to have three different representations of the constant pool:
20360 the CPool structure, the tree_constant_pool, and the constructures
20361 used to build the Class object (which may need class and string
20362 constants) in compiled code. None were appropriate for compiling
20363 to .class files, so I did a major overhaul.
20364
20365 First, the tree_constant_pool array was removed. Things were
20366 modified to the CPool structure in the JCF could be used.
20367 Second, a "capacity" field was added to the CPool, and functions
20368 written to search for a matching constant, adding one if not found.
20369 The code that generated the Class object was changed to use a CPool.
20370 The actual TREE_LISTs used to build the CONSTRUCTORs used for
20371 the static Class object are now only in build_constants_constructor.
20372 Finally, I wrote code which can generate a .class file (including its
20373 constant pool) from the RECORD_TYPE of a class. This is a big step
20374 on the way to compiling Java source into .class files.
20375
20376 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
20377 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
20378
20379 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20380 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
20381 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20382 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20383 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
20384 (lang_type): Removed constant_pool field.
20385 * jcf.h (CPool): Renamed size to count. Added field capacity.
20386 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20387 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
20388 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20389
20390 * constants.c (current_constant_pool_tags, current_constant_pool_data,
20391 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20392 * constants.c (build_constants_constructor): Use new outgoing_cpool.
20393 (set_constant_entry, find_constant1, find_constant2,
20394 find_class_constant, count_constant_pool_bytes, write_constant_pool,
20395 find_utf8_constant, find_class_or_string_constant): New functions.
20396
20397 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
20398 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
20399 (give_name_to_class, get_class_constant): Likewise.
20400 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
20401 (get_name_and_type_constant, get_ref_constant): Removed.
20402 * parse.h (parser_ctxt): Remove field tree_constant_pool.
20403 * parse.y: Don't save/restore tree_constant_pool.
20404 * verify.c (verify_jvm_instructions): Update for new approach.
20405 * expr.c (expand_invoke, expand_java_field_op): Likewise.
20406
20407 * lang-options.h: Added -femit-class-file, -femit-class-files.
20408 * lang.c (flag_emit_class_files), java-tree.h: New flag.
20409 (lang_f_options): Added "emit-class-file(s)".
20410
20411 * expr.c (build_java_arrayaccess): Generate more efficient array
20412 bounds checking, by using unsigned compare.
20413
20414 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
20415
20416 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
20417
20418 * parse.h: New comment on the handling of unresolved type
20419 identifiers. JDEPs are now part of the jdep_code enum.
20420 (typedef struct jdep): Now use enum jdep_code or int, depending on
20421 availability. Both are narrowed down to an 8 bits bitfield.
20422 (CALL_EXPR_PRIMARY): Fixed comment.
20423
20424 1998-06-10 Tom Tromey <tromey@cygnus.com>
20425
20426 * Make-lang.in (java): Added gjavac and jvgenmain.
20427 (java.start.encap): Depend on gjavac.
20428 (java.rest.encap): Depend on jvgenmain.
20429
20430 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20431 (JAVA_CROSS_NAME): Likewise.
20432 (java.all.build): Depend on jvgenmain and gjavac.
20433 (java.all.cross): Depend on jvgenmain and gjavac-cross.
20434 (jvgenmain$(exeext)): New target.
20435 (java.install-common): Wrote.
20436 * config-lang.in (compilers, stagestuff): Added gjavac and
20437 jvgenmain.
20438
20439 1998-06-10 Dave Brolley <brolley@cygnus.com>
20440
20441 * lang.c (lang_decode_option): New argc/argv interface.
20442
20443 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
20444
20445 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20446 * decl.c (build_decl_no_layout): New function.
20447 * expr.c (java_lang_expand_expr): Layout declarations found in
20448 blocks before they're pushed.
20449 * jcf-parse.c (load_class): Save current line when parsing class
20450 file.
20451 (parse_source_file): Register class before expanding their
20452 methods.
20453 * lang.c (put_decl_node): Produce `null' when `void *' is
20454 processed.
20455 * lex.c (static tree wfl_op): New static global, for error report
20456 on casts.
20457 (java_init_lex): wfl_operator and wfl_op initialized
20458 here. Filename caching added for wfl_op. Return wfl_op when `(' is
20459 parsed.
20460 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20461 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20462 build_unresolved_array_type): New static function definitions.
20463 (build_decl_no_layout): New extern function declared.
20464 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20465 faulty modifier exists.
20466 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20467 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20468 (UNARY_PLUS_EXPR): New fake operator.
20469 (struct parser_ctxt): New field osb_number.
20470 * parse.y (static tree wfl_operator): New static WFL for operator
20471 bound error messages.
20472 (DECR_TK, INCR_TK): Moved.
20473 (OP_TK): Tagged <operator>.
20474 (array_type:): Now call build_unresolved_array_type.
20475 (dim_expr:): Count the number of '[' seen.
20476 (post_increment_expression, post_decrement_expression,
20477 pre_increment_expression, pre_decrement_expression,
20478 unary_expression_not_plus_minus, unary_expression:): Actions are
20479 now building the corresponding unary expressions.
20480 (cast_expression:): Actions are now building cast expressions.
20481 (build_unresolved_array_type): New function.
20482 (create_interface): Reset the number of declared interfaces.
20483 (create_class): Likewise.
20484 (method_header): Methods declared within the scope of an interface
20485 are now implicitly set public and abstract.
20486 (java_complete_class): Variable's and parameter's type are patched
20487 with a promoted type.
20488 (declare_local_variables): Resolved non builtin types are promoted
20489 before being used to build a variable decl. Removed type patch
20490 posted on variable initialization statement.
20491 (source_start_java_method): Use build_decl_no_layout to build the
20492 decl of a parameter of incomplete type.
20493 (java_register_parsed_class): Process interfaces too. Call
20494 rest_of_decl_compilation on each processed class declarations.
20495 (java_complete_expand_methods): Don't attempt to expand things in
20496 interfaces.
20497 (java_complete_tree): Process CONVERT_EXPR, even though it always
20498 has a type. Propagate error_mark_node to node's type too. Promote
20499 method's call argument type and return error_mark_node if
20500 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20501 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20502 handle unary operator nodes.
20503 (build_assignment): Added comment.
20504 (print_int_node): New function.
20505 (patch_assignment): New second argument. New error handling. Use
20506 print_int_node. Handle references. Use can_cast_to_p to issue
20507 different error message according to the context and check upon
20508 the initialization of the RHS.
20509 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20510 (operator_string): Handle more operators.
20511 (patch_binop): No longer use a function static
20512 wfl_operator. Improved error message on shift distance.
20513 (build_unaryop, build_incdec, build_cast, patch_unaryop,
20514 patch_cast): New functions.
20515
20516 1998-06-05 Per Bothner <bothner@cygnus.com>
20517
20518 * jvspec.c: New file.
20519 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
20520
20521 * java-tree.h (identifier_subst): Add declaration.
20522
20523 1998-06-04 Tom Tromey <tromey@cygnus.com>
20524
20525 * jvgenmain.c (main): Generate call to JvRunMain.
20526
20527 * class.c (make_class_data): Push value for "sync_info" field.
20528 * decl.c (init_decl_processing): Push "sync_info" field.
20529
20530 1998-06-03 Per Bothner <bothner@cygnus.com>
20531
20532 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
20533 Java (source) name, not signature.
20534 Set TYPE_ALIGN to (at least) that of element_type.
20535
20536 1998-06-02 Per Bothner <bothner@cygnus.com>
20537
20538 * class.c: Moved classname-mangling-rekated code to ...
20539 * mangle.c: ... this new file.
20540 * jvgenmain.c: New program (needs mangle.c) to generate main program.
20541 * Makefile.in: Update for above changes.
20542
20543 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20544
20545 * expr.c (truthvalue_conversion): Convert integer and floating
20546 point value to their truth value.
20547 * lex.c (java_lex): Handle the `null' literal.
20548 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20549 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20550 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20551 New macros.
20552
20553 * parse.y: Reorganization/documentation on token declaration.
20554 (binop_lookup[]): New added new tree codes.
20555 (relational_expression): Build corresponding binary operators.
20556 (equality_expression, conditional_and_expression,
20557 conditional_or_expression): Likewise.
20558 (java_complete_class): Fix crash in debug message.
20559 (java_complete_tree): Check initialization of method call
20560 arguments. Further bogus node evaluation to detect more error
20561 during assignments. Handles more binary operators.
20562 (patch_assignment): Use DECL_P.
20563 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20564 code.
20565 (operator_string): Handle more case. Compacted source.
20566 (patch_binop): Changed function comment. Checking for
20567 uninitialized first operand takes the compound assignment into
20568 account and uses DECL_P. Checking for uninitialized second operand
20569 delayed to routine's end. Use macros to issue type bound error
20570 messages and issue messages on both operands if their types are
20571 different. Force fixed type into node. Handle all binary
20572 operators.
20573
20574 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20575
20576 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20577 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20578 build operator node and return tokens.
20579 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20580 * parse.h (java_complete_tree): Changed returned type in prototype.
20581 (build_method_invocation, build_assignment, patch_assignment,
20582 patch_binop): New static function declarations.
20583 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20584 BUILD_EXPR_WFL): New macros.
20585 * parse.y (enum tree_code binop_lookup[]): New static for token to
20586 TREE_CODE lookup.
20587 (%union): Parser union has new sub-structure `operator'.
20588 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20589 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20590 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20591 ASSIGN_ANY_TK): Tokens tagged `operator'.
20592 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20593 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20594 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20595 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20596 (assignment_operator:): Rule tagged `operator'.
20597 (expression_statement:): Re-installed default rule.
20598 (method_invocation:): Sub rules call build_method_invocation.
20599 (postfix_expression:): Don't attempt to resolve name here. Just
20600 return an ID.
20601 (multiplicative_expression:): Sub-rules build corresponding binop
20602 expression node.
20603 (additive_expression:, shift_expression:, and_expression:,
20604 exclusive_or_expression:, inclusive_or_expression:): Likewise.
20605 (assignment:): Sub rule invoke build_assignment.
20606 (assignment_operator:): Default rules on sub rules.
20607 (force_error): Added documentation on this variable.
20608 (declare_local_variables): Build initialization calling
20609 build_assignment.
20610 (expand_start_java_method): Removed unused rtx declaration. Mark
20611 arguments as already initialized.
20612 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20613 (java_complete_expand_methods): Don't process next method if
20614 completion of the previous one triggered errors.
20615 (java_complete_expand_method): Call source_end_java_method if no
20616 error were found during completion.
20617 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20618 locals declaratilon. Handle names found within a class. Return
20619 error_mark_node when things aren't found.
20620 (patch_method_invocation_stmt): Return error_mark_node on failures.
20621 (patch_invoke): Removed unused local. Return the correct node.
20622 (java_complete_tree): Now returns a value. The BLOCK section binds
20623 local identifiers and the type of a BLOCK is now void. Assign the
20624 result of operand completion on COMPOUND_EXPR. Assign the
20625 encapsulated node of a WFL to the result of its completion, except
20626 when the node is an identifier. Now handle MODIFY_EXPR and several
20627 binary operators. Return error_mark_node on errors.
20628 (build_method_invocation, build_assignment, patch_assignment,
20629 build_binop, operator_string, patch_binop): New functions.
20630 * typeck.c (binary_numeric_promotion): New function.
20631
20632 1998-05-21 Per Bothner <bothner@cygnus.com>
20633
20634 * class.c (identifier_subst): New convenience wrapper for ident_subst.
20635 Replace most uses of ident_subst by identifier_subst.
20636
20637 * class.c (push_class_static_dummy_field): Removed function.
20638 (build_class_ref): Find Class object decl by looking up "CNAME.class",
20639 instead of looking got "class" static field. Create that decl here.
20640 (class_identifier_node): Removed; no longer needed.
20641 (init_class_processing): Don't init class_identifier_node.
20642 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
20643 Do nreverse 0 times (instead of twice) for Object and Class.
20644 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20645
20646 1998-05-20 Per Bothner <bothner@cygnus.com>
20647
20648 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
20649 while initializing linenumber_count and linenumber_table.
20650 Do it before init_function_start (which calls emit_line_note).
20651 * expr.c (expand_byte_code): Don't need to clear lineno here.
20652
20653 1998-05-18 Tom Tromey <tromey@cygnus.com>
20654
20655 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20656 then mangle number as _N_.
20657
20658 * class.c (mangle_class_field): New function.
20659 (build_class_ref): Set assembler name of class reference using
20660 mangle_class_field.
20661 (push_class_static_dummy_field): Likewise.
20662
20663 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
20664
20665 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20666 of assigning to TREE_CODE. The latter method exploits a feature
20667 of GCC that is not ANSI compliant.
20668
20669 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
20670
20671 * decl.c (pushdecl_force_head): New function.
20672 (pushlevel): Removed conditional printf.
20673 (complete_start_java_method): Don't enter local variable scope if
20674 function is compiled from source code.
20675 * expr.c: parse.h now included
20676 (java_lang_expand_expr): New function.
20677 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20678 printf. Terminate buffer when doing directories.
20679 * jcf-parse.c (parse_source_file): Call lang_init_source before
20680 parsing and before code generation.
20681 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20682 use printf if the macro is defined.
20683 * lang.c (lang_init): Install lang_expand_expr hook on
20684 java_lang_expand_expr.
20685 (java_dummy_print): New function.
20686 (lang_init_source): New function.
20687 * lex.c (java_lex): Remember location of an opening brace at the
20688 second nesting level.
20689 (java_is_eol): Unget character seen after a CR if it is EOF.
20690 * parse.h: Now includes lex.h
20691 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20692 printf if the macro is defined.
20693 (expand_start_java_method, build_expr_block, enter_block,
20694 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20695 New static function declarations.
20696 (pushdecl_force_head): New extern function declaration.
20697 (INCOMPLETE_TYPE_P): New macro.
20698 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20699 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20700 BLOCK_EXPR_ORIGIN): New macros.
20701 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20702 DECL_SOURCE_LINE_LAST): New macros.
20703 (struct parser_ctxt): Removed field current_method_decl, redundant
20704 with the field current_function_decl. Added fields
20705 first_ccb_indent1 and pending_block.
20706 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20707 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20708 tagged <node>
20709 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20710 (compilation_unit:): Cosmetic on sub rule.
20711 (type_declaration:): Cosmetic on sub rules. Added an error rule.
20712 (variable_initializer:): Installed default rule on expression:.
20713 (method_declaration:): method_header: starts a new
20714 method. method_body: installs the function body, absorbs blocks
20715 emitted for temporary variable scopings, pops function's body block
20716 and merges function's last statement lineno in DECL_SOURCE_LINE.
20717 (method_body:): Installed default rules.
20718 (block:): Call enter_block when an opening brace is seen. Absorb
20719 scoping blocks and call exit_block when a closing brace is seen.
20720 (block_statement:): Cosmetic changes.
20721 (method_invocation:): Create WFL around CALL_EXPR node.
20722 (patch_stage): Added comment around definition.
20723 (method_header): Try to use first_ccb_indent1 as the first line of
20724 the method, so BP debug info are emitted at the first opening
20725 brace of the function. If the function has no body, use the
20726 location of the function's name. Override currently defined method
20727 name with the matching WFL so we can point redefinition errors
20728 using the location where the function's name was declared.
20729 (check_abstract_method_header): Interprets DECL_NAME as an
20730 identifier or as a WFL, accordingly.
20731 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20732 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20733 location and name information out of it and reinstall DECL_NAME to
20734 its original identifier node value.
20735 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20736 function's source code).
20737 (read_import_dir): Test the value returned by find_class and issue
20738 a fatal accordingly.
20739 (declare_local_variables): Push a new block for the scope of the
20740 new variable(s) if code has been already generated at that nesting
20741 level. Pinpoint redefinition errors using the variable id
20742 WFLs. Generate initialization code if necessary. If the variable
20743 type is incomplete, register a patch on its decl.
20744 (source_start_java_method): Rewritten. Define a new block for the
20745 function's parameters. Build parameter decl out of function's
20746 arguments and register them for a patch if their types are
20747 incomplete.
20748 (expand_start_java_method): Includes the part of
20749 source_start_java_method that was pushing the parameter decls and
20750 completing the method start code.
20751 (source_end_java_method): Removed call the expand_end_bindings and
20752 poplevel (already taken care of). Reinstall function's arguments
20753 and get function's last line of code before calling
20754 expand_function_end.
20755 (java_method_add_stmt): New comment before the function's
20756 code. Complement the second operand of the current COMPOUND_EXPR
20757 if necessary.
20758 (java_complete_expand_methods): Don't generate debug info on line
20759 zero when expanding a generated constructor.
20760 (java_complete_expand_method): Set start and end line numbers for
20761 a artificially generated constructor to one and manually call
20762 enter_block and exit_block when defining it. For all methods:
20763 expand function's start calling the new expand_start_java_method
20764 and invoke java_complete_tree on the effective method's body, if
20765 any.
20766 (resolve_expression_name): Now use lookup_name_in_blocks to search
20767 local variable decls and print out an error when variables are
20768 undefined.
20769 (patch_method_invocation_stmt): Inserted comment before the
20770 function's code.
20771 (lookup_method_invoke): Chain method's arguments using chainon
20772 with the current arg list as a second argument. Inserted missing
20773 IDENTIFIER_POINTER when reporting an error on methods not found.
20774 (refine_accessible_methods_list): Don't retain constructors.
20775 (patch_arguments): Function removed.
20776 (java_complete_tree): Inserted comment before the function's
20777 code. New case for BLOCKs. Moved the WFL case a bit
20778 further. Complete function's arguments.
20779 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
20780 maybe_absorb_scoping_blocks): New functions.
20781
20782 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20783
20784 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
20785 previously set.
20786 * jcf-parse.c (parse_source_file, java_error_count): New forward
20787 and extern declarations.
20788 (java_parse_abort_on_error): Macro moved.
20789 (jcf_parse_source): fatal called if fopen fails. Now calls
20790 parse_source_file.
20791 (parse_source_file): New parse_only parameter. Reflects the
20792 elimination of the second pass.
20793 (yyparse): parse_source_file called with argument set to 0.
20794 * jcf.h (JCF_ZERO): Sets java_source to zero.
20795 * lex.c (java_init_lex): pass argument is gone. Function modified
20796 to be called once during the analysis of a file.
20797 (java_unget_unicode): Fixed typo in fatal message.
20798 (java_get_line_col): Likewise.
20799 (java_lval): Likewise. String literals no longer built during
20800 second pass.
20801 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
20802 account.
20803 * parse.h (MODIFIER_WFL): New macro.
20804 (parse_check_super, parser_check_super_interface): Now return int.
20805 (parser_chain_incomplete_item, not_builtin_p,
20806 complete_method_decl): Declarations removed.
20807 (build_method_invocation_stmt, build_invoke): Renamed using the
20808 `patch' instead of `build'
20809 (register-incomplete_type, obtain_incomplete_type,
20810 java_complete_tree, java_complete_expand_method,
20811 unresolved_type_p, create_jdep_list): New function declarations.
20812 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
20813 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
20814 (jdep): New typedef on new struct _jdep.
20815 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
20816 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20817 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20818 JDEP_RESOLVED_P): New macros.
20819 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
20820 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20821 JDEP_VARIABLE): New enum values and jdep kinds.
20822 (jdeplist): New typedef on struct _jdeplist.
20823 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
20824 macros.
20825 (CALL_EXPR_PRIMARY): New macro.
20826 (struct parser_ctxt): Fields java_pass, current_method_decl,
20827 method_decl_list deleted. New field jdeplist.
20828 (INCOMPLETE_P): Macro deleted.
20829 * parse.y (single_type_import_declaration:): Removed pass switch.
20830 (type_import_on_demand_declaration): Likewise.
20831 (field_declaration:): Removed pass switch on all sub rules.
20832 (class_declaration:): Call the complete_class_decl removed on
20833 class_body rules.
20834 (method_declaration:): Removed second pass switch. No longer chain
20835 methods decl when method_header reduced.
20836 (method_header:): Sub rules no longer depend on pass switch.
20837 (method_declarator:): Likewise.
20838 (method_body:): Likewise.
20839 (abstract_method_declaration:): Likewise.
20840 (block_statement:): Likewise.
20841 (local_variable_declaration:): Likewise.
20842 (argument_list:): Likewise.
20843 (method_invocation:): Likewise. Call to build_method_invocation_stmt
20844 removed. Partial CLASS_EXPR tree node built instead.
20845 (postfix_expression:): Removed pass switch on all sub rules.
20846 (java_pop_parser_context): Free classd_list content.
20847 (yyerror): Call obstrack_grow0 to finalize error message.
20848 (check_class_interface_creation): Comment modified to reflect new
20849 returned value meaning. Removed second pass switch. Return 1 if an
20850 error was found, 0 otherwise. Adjust pointer on filename if a
20851 leading path separator was found.
20852 (maybe_create_class_interface_decl): Removed first pass switch
20853 when linking the class decl to the class_list. Install a new
20854 jdep_list for the class.
20855 (add_superinterfaces): List of unresolved interfaces is
20856 gone. Unresolved interfaces are directly added to the current
20857 dependencies list.
20858 (create_interface): Second pass shortcut removed.
20859 ctpx->modifier_ctx access through MODIFIER_WFL.
20860 (create_class): Second pass shortcut removed. Call to
20861 register_incomplete_type replaces the call to
20862 parser_chain_incomplete_item.
20863 (complete_class_decl): Function removed.
20864 (duplicate_declaration_error): New way of retrieving redeclared
20865 item type.
20866 (register_fields): Call to lookup_modifier_cl replaced by
20867 MODIFIER_WFL. New way of handling unresolved type, using
20868 unresolved_type_p and obtain_incomplete_type.
20869 register_incomplete_type replaces call to parser_chain_incomplete_item.
20870 (patch_stage): New static global variable.
20871 (method_header): New way of handling unresolved type, using
20872 unresolved_type_p and obtain_incomplete_type. patch_stage used to
20873 indicates that the method decl needs to be patched.
20874 (check_abstract_method_header): Call to lookup_modifier_cl
20875 replaced by MODIFIER_WFL.
20876 (method_declarator): Incomplete argument type are registered
20877 calling register_incomplete_type. Patch on the declared method is
20878 issued in that case.
20879 (unresolved_type_p): New function.
20880 (parser_check_super_interface): New comment to reflect function's
20881 modified returned type (int). Function and has a new argument
20882 this_wfl. Call to parse_error_context uses this_wfl instead of
20883 relying on lookup_cl.
20884 (parser_check_super): Comment reflects function's new returned
20885 type (int). Function returns nonzero value on error.
20886 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
20887 register_incomplete_type, jdep_resolve_class): New functions to
20888 handle incomplete types in declarations.
20889 (java_complete_class): Rewritten to work with the new incomplete
20890 type handling scheme.
20891 (complete_class_report_errors): Likewise.
20892 (complete_method_decl): Removed: it jobs is now handled by
20893 java_complete_class.
20894 (do_resolve_class): Class loaded in not already loaded and not
20895 found in Java source code.
20896 (java_check_regular_methods, java_check_abstract_methods): Don't
20897 call complete_method_decl anymore.
20898 (lookup_modifier_cl, not_builtin_p): Functions deleted.
20899 (read_import_dir): Got rid of the pass number dependency.
20900 (declare_local_variables): New handling of unresolved types (patch
20901 issued).
20902 (source_start_java_method): New parameter level. Function called
20903 with level set to 1 when argument types are potentially
20904 unresolved. Called to complete the job with level set to 2 once
20905 types are complete.
20906 (source_end_java_method): Call to permanent_allocation
20907 removed. Waiting to be replaced by a more suitable obstack
20908 management.
20909 (java_complete_expand_methods, java_complete_expand_method,
20910 java_expand_finals): New functions.
20911 (build_method_invocation_stmt): Renamed
20912 patch_method_invocation_stmt. Extracts function call expression
20913 (wfl) and arguments (args) from CALL_EXPR tree operands.
20914 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
20915 call. Patch the function and argument operand of the CALL_EXPR
20916 tree argument.
20917 (patch_argument, java_complete_tree): New functions.
20918
20919 1998-04-20 Per Bothner <bothner@cygnus.com>
20920
20921 Recover from missing fields and methods (i.e. error instead of fatal).
20922 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
20923 * expr.c (expand_invoke): Recover from missing method.
20924 (expand_java_field_op): Recover from missing field.
20925 Inline references to java.lang.{Integer,Char,...}.TYPE.
20926 * typeck.c (get_type_from_signature), java-tree.h: New function.
20927 * class.c (add_method): Use get_type_from_signature.
20928 (build_class_ref): Handle a class that was not found.
20929 * typeck.c (convert): Handle conversion to pointers (for convenience).
20930 * verify.c (verify_jvm_instructions): Use get_type_from_signature
20931 instead of lookup_field to handle missing fields.
20932
20933 * jcf-parse.c (process_zip_dir): Set java_source.
20934
20935 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
20936
20937 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20938
20939 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
20940
20941 * jcf-parse.c (load_class): Don't change input_filename before
20942 calling jcf_parse_source (but still do it before calling
20943 jcf_parse).
20944 (jcf_parse_source): Assign input_filename after having saved the
20945 parser context.
20946 * lex.c (java_init_lex): Chain a WFL node to the import on demand
20947 list. ctxp->modifier_ctx zeroed according to its new
20948 definition. ctxp->filename initialized. Removed
20949 JAVA_MODIFIER_CTX_UNMARK.
20950 (java_unget_unicode): Update the character based column position.
20951 (java_allocate_new_line): ref_count not used anymore. Always free
20952 ctxp->p_line. Initialize c_line->char_col to 0.
20953 (java_get_unicode): Update the character based column position.
20954 (java_lex): Use ctxp->elc to store current position in source
20955 file, at the beginning of the parsed token. Set modifier_ctx entry
20956 corresponding to the parse modifier to a WFL node. Return a WFL
20957 node when an identifier is parsed.
20958 (java_lex_error): Now uses ctxp->elc to store current position in
20959 source.
20960 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20961 * lex.h (build_wfl_node): New function definitions.
20962 (struct java_line): ref_count and next fields are gone. New field
20963 char_col.
20964 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20965 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
20966 (JAVA_COLUMN_DELTA): New macro.
20967 (java_lc): New typedef on new struct _java_lc.
20968 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20969 (parse_error_context, parse_warning_context): Changed prototypes.
20970 (java_get_line_col): Added as an available global function.
20971 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20972 (IC_DECL): Replaced by macro IC_TYPE
20973 (DEPEND_WFL): New macro.
20974 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20975 wrong modifier.
20976 (exit_java_complete_class): Removed a commented out statement.
20977 (struct parser_ctxt): Added comments on fields. modifier_ctx is
20978 now an array of tree nodes. Deleted fields line_list and
20979 e_line. New field elc, to replace e_line.
20980 * parse.y (array_type:): Build WFL node.
20981 (qualified_name:): Build a single WFL node out of two. Retain
20982 the location information of the first node in the resulting node.
20983 (package_declaration:): Use package name as a WFL node
20984 (single_type_import_declaration:): Use imported name as a WFL node.
20985 (type_import_on_demand_declaration:): Use root of the imported
20986 packages as a WFL node.
20987 (field_declaration:): Removed unused local variable cl.
20988 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20989 (yyerror): New static elc. Removed static error_line, error_pos.
20990 New local code_from_source. Save ctxp->elc into elc at the first
20991 pass. Call java_get_line_col to get a string of the line where
20992 the error occurred.
20993 (debug_line): Removed static function.
20994 (parse_error_context, parse_warning_context): Parameter cl is now
20995 a WFL node. Use its value to initialize ctxp->elc.
20996 (redefinition_error): Parameter cl is now a WFL node.
20997 (parse_add_interface): New parameter wfl. No longer call
20998 lookup_cl, use wfl instead.
20999 (check_class_interface_creation): Parameter cl is now a WFL node.
21000 (maybe_create_class_interface_decl): Likewise.
21001 (add_superinterfaces): New function.
21002 (create_interface): Removed local cl, node, super_decl,
21003 super_decl_type. Function now uses id as a WFL node. Better
21004 warning/error report on obsolete or forbidden mix of
21005 modifiers. Now calls add_superinterfaces to register interfaces.
21006 (create_class): Removed local cl, node. Local variable id is used
21007 as a WFL node. Better error report on forbidden modifier
21008 mix. Uses add_superinterfaces to register interfaces.
21009 (find_field): Argument cl is now a WFL node. Now store the WFL
21010 node of a fields that needs to be checked for their
21011 initialization.
21012 (method_header): Local variable node non longer used. Local
21013 variable id replaces cl.
21014 (check_modifiers_consistency): Local variable cl is now a WFL
21015 node.
21016 (method_declarator): Local variable cl replaced by parameter id.
21017 (parser_qualified_name): Now uses parameter name as a WFL node.
21018 (parser_check_super_interface): New parameter wfl, for achieve
21019 greater accuracy during error reports.
21020 (parser_chain_incomplete_item): New parameter named location. Used,
21021 along the decl, to construct the incomplete item node.
21022 (java_complete_class): resolve_class now uses WFL node extracted
21023 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21024 where appropriate.
21025 (complete_method_decl): Unresolved function's argument types are WFL.
21026 (resolve_class): Parameter cl is now a WFL node.
21027 (resolve_and_layout): Likewise.
21028 (do_resolve_class): Likewise. Try first to use cl and then do the
21029 lookup on the decl when calling check_pkg_class_access.
21030 (complete_class_report_errors): Use IC_TYPE in place of
21031 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21032 instead of doing a lookup over the decl.
21033 (java_check_final): Use WFL info from field tree list.
21034 (lookup_cl): Rewritten and returns a statically defined WFL node.
21035 (lookup_modifier_cl): Now uses information from WFL nodes.
21036 (process_imports): Likewise.
21037 (read_import_dir): name and cl arguments replaced by a single WFL
21038 node. Function modified accordingly.
21039 (find_in_imports_on_demand): Now uses WFL node.
21040 (check_pkg_class_access): cl argument is now a WFL node.
21041 (declare_local_variables): Fixed to use WFL nodes.
21042 (resolve_expression_name): Likewise.
21043 (build_method_invocation_stmt): name_combo argument renamed
21044 wfl. Function modified to use WFL nodes.
21045 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21046 (lookup_method_invoke): cl is now a WFL node. Added missing
21047 IDENTIFIER_POINTER to class type decl name.
21048
21049 1998-04-14 Dave Brolley <brolley@cygnus.com>
21050
21051 * lang.c (init_parse): Now returns char* containing the filename.
21052
21053 1998-04-10 Per Bothner <bothner@cygnus.com>
21054
21055 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21056
21057 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21058 * class.c (make_class_data): If flag_assume_compiled, initial class
21059 state is CSTATE_PREPARED; make superclass and interfaces direct
21060 references, rather than constant pool indexes.
21061
21062 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21063
21064 * parser.y: Include flags.h. Removed debug variable pl.
21065 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21066 (block:): Likewise.
21067 (labeled_statement_nsi:): Generate debug info when reducing
21068 expression_statement:.
21069 (check_pkg_class_access): get_access_flags_from_decl invocation
21070 fixed for new CLASS_* flags location.
21071 (source_end_java_method): Save/restore parser context when
21072 entering/leaving this routine. Restore lineno to its right value
21073 before calling expand_end_bindings.
21074 (build_method_invocation_stmt): build_invoke called with the
21075 current line information.
21076 (build_invoke): New argument cl. Wrap the function call around a
21077 wfl node.
21078 (refine_accessible_methods_list): Changed comment, removed
21079 unnecessary code.
21080 * parse.h: Fixed typo in comments.
21081 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21082 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21083 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21084 parser_ccb_indent.
21085 * lex.c (java_lex): Record the last closing curly bracket of a
21086 function.
21087 * jcf-parse.c (jcf_parse_source): Now calls
21088 java_check_methods. Clarified comment, fixed typo.
21089
21090 1998-04-09 Dave Brolley <brolley@cygnus.com>
21091
21092 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21093 (finish_parse): Expose for non USE_CPPLIB builds.
21094
21095 1998-04-08 Jeffrey A Law (law@cygnus.com)
21096
21097 * lang.c (lang_print_xnode): New function.
21098
21099 1998-04-03 Per Bothner <bothner@cygnus.com>
21100
21101 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21102 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21103 used to build a class's dispatch table.
21104 (make_class_data): Generate dispatch table if flag_assume_compiled.
21105 Set dtable of class object to address of class_dtable_decl.
21106
21107 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21108 be volatile and have side effects - generates better code.
21109
21110 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21111 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21112
21113 * expr.c (expand_invoke): If class is final, method is
21114 effectively final, so can call it directly.
21115
21116 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21117
21118 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21119
21120 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
21121
21122 * parse.y (build_method_invocation_stmt): Removed extra argument
21123 to build_invoke.
21124
21125 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
21126
21127 * expr.c (dtable_indent): Now static global.
21128 (expand_invoke): Now call invoke_build_dtable and
21129 build_invokevirtual.
21130 (invoke_build_dtable, build_invokevirtual): New functions.
21131 * jcf-io.c (find_class): Defer issuing a warning by setting
21132 jcf->outofsynch to 1.
21133 * jcf-parse.c (jcf_out_of_synch): New function.
21134 (load_class): Test this_jcf.outofsynch flag and call
21135 jcf_out_of_synch accordingly.
21136 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21137 comment indentation.
21138 * lex.c (java_get_unicode): Fixed code indentation.
21139 (java_lex): Create string literal. Fixed typo. Removed several
21140 premature obstack_free.
21141 * parse.h: New enums for name resolution and invocation mode.
21142 (struct qualification): New data structure.
21143 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21144 (do_resolve_class, build_method_invocation_stmt,
21145 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21146 debug_line, identical_subpath_p, invocation_mode,
21147 refine_accessible_methods_list, build_invoke,
21148 lookup_method_invoke): New functions declared.
21149 (build_invokevirtual, invoke_build_dtable, match_java_method,
21150 build_field_ref, jcf_out_of_synch): New references to external
21151 functions.
21152 (struct parse_ctxt): Removed artificial_constructor field.
21153 * parse.y: (array_type:): Type defined for this rule.
21154 (class_type:): Installed default rule for interface_type:.
21155 (array_type:): Now build Java array type.
21156 (qualified_name:): Now use obstack_grow0.
21157 (method_declaration:): Skip the artificial constructor added to
21158 the list, if any.
21159 (abstract_method_declaration:): Execute the code only during pass 1.
21160 (block:): Installed default rule in block_statements:.
21161 (block_statement:): Add the statement to the method during pass 2.
21162 (statement_expression): Installed default rule for
21163 method_invocation:.
21164 (argument_list:): Added code to build the argument list.
21165 (method_invocation:): Added call to create the method invocation
21166 node.
21167 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21168 (debug_line): New function for debug.
21169 (complete_class_decl): No longer do something during pass 1.
21170 (method_header): Use BUILD_PTR_FROM_NAME.
21171 (parser_qualified_classname): Use obstack_grow0. Removed bogus
21172 obstack_free.
21173 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21174 function's main comment.
21175 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21176 classes.
21177 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21178 (resolve_class): Now works with arrays.
21179 (do_resolve_class, resolve_and_layout): New functions.
21180 (java_check_regular_methods): Reverse method list before and after
21181 having processed it. No longer set ctxp->artificial_constructor.
21182 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21183 accordingly. Fixed typo in issued error message. Now use
21184 obstack_grow0.
21185 (find_in_imports_on_demand): Now use obstack_grow0.
21186 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21187 (source_end_java_method): Call expand_expr_stmt instead of
21188 expand_expr. Calls it before calling expand_function_end.
21189 (java_method_add_stmt): Do nothing if errors were found during
21190 parsing.
21191 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21192 (build_method_invocation_stmt, build_invoke, invocation_mode,
21193 lookup_method_invoke, refine_accessible_methods_list,
21194 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21195 New functions.
21196 * typeck.c (build_java_signature): Properly end method signature
21197 if return type skipped.
21198 (match_java_method): New function.
21199
21200 1998-03-16 Per Bothner <bothner@cygnus.com>
21201
21202 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
21203
21204 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
21205
21206 * expr.c (build_invoke_non_interface): New function.
21207 (methods_ident, ncode_ident): Now static globals.
21208 (expand_invoke): Use build_invoke_non_interface.
21209 * java-tree.h (struct lang_decl): New field function_decl_body.
21210 (DECL_FUNCTION_BODY): New macro.
21211 * jcf-parse.c (jcf_parse_source): Deeper check before setting
21212 CLASS_FROM_SOURCE_P.
21213 (parse_source_file): Fixed typos. Call java_layout_parsed_class
21214 before starting pass 2. Call to java_generate_parsed_class replaced
21215 by java_register_parsed_class.
21216 * lex.c: Fixed typo in header. Some line width related formating.
21217 * lex.h: Some line width related formating.
21218 * parse.h (source_end_java_method, resolve_expression_name,
21219 complete_class_decl, maybe_create_class_interface_decl,
21220 check_class_interface_creation): New static function declarations.
21221 (java_layout_parsed_class, java_method_add_stmt): New function
21222 declarations.
21223 (struct parser_ctxt): Field mark_class_generate removed. New
21224 fields class_list and artificial_constructor.
21225 * parse.y: Fixed typo in header.
21226 (class_declaration:): Call complete_class_decl when class body
21227 parsed.
21228 (method_declaration:): Call source_end_java_method in pass 2 when
21229 the method body is defined.
21230 (postfix_expression:): Do expression name resolution on sub-rule
21231 name during pass 2.
21232 (create_class, create_interface): Merged common pieces.
21233 (check_class_interface_creation, maybe_create_class_interface_decl):
21234 New functions.
21235 (complete_class_decl): New function.
21236 (register_fields): Fixed line width related typo.
21237 (method_header): Correctly skip first argument when fixing
21238 argument line. Changed the loop.
21239 (java_check_circular_reference): Now use ctxp->class_list.
21240 (java_complete_class): Removed start/stop marking.
21241 (java_check_regular_methods): Now takes a class decl as an
21242 argument. Add default constructor if none were encountered.
21243 (java_check_methods): Now use ctxp->class_list. Changed call to
21244 java_check_regular_methods.
21245 (source_start_java_method): Set DECL_ARG_TYPE for each function
21246 arguments.
21247 (source_end_java_method, java_method_add_stmt): New functions.
21248 (java_generate_parsed_class): No longer exists.
21249 (java_layout_parsed_class, java_register_parsed_class): New functions.
21250 (resolve_expression_name): New function.
21251
21252 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21253
21254 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21255 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21256 until pass initializations are done. Call read_import_dir with
21257 pass set to 0.
21258 * parse.h: (lookup_modifier_cl): New function declared.
21259 (INTERFACE_FIELD_MODIFIERS): New macro.
21260 (OBSOLETE_MODIFIER_WARNING): New macro.
21261 * parse.y: (register_fields): Class type and current field name in
21262 local variables. Check modifier(s) if adding field(s) to an interface.
21263 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21264 and report errors using the faulty modifier line context.
21265 (lookup_modifier_cl): New function.
21266 (read_import_dir): Detect and report default import processing
21267 failure.
21268
21269 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
21270
21271 Add a pair of -fassume-compiled/-fno-assume-compiled options.
21272 * class.c (is_compiled_class): Return 1 after making sure it
21273 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21274 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21275 * java-tree.h (flag_assume_compiled): Add decl.
21276 * lang.c (lang_f_options): Add the flag.
21277 (flag_assume_compiled): Add decl, default to 0.
21278
21279 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21280
21281 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21282 (is_compiled_class): Likewise.
21283 (layout_class): Likewise.
21284 (layout_class): Detect and lay out classes defined in source code.
21285 (interface_of_p, add_interface_do, may_add_interface): New
21286 function.
21287 (add_interface): Now use add_interface_do.
21288 (add_method_1): New function.
21289 (add_method): Now use add_method_1.
21290 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21291 (complete_start_java_method): New function.
21292 (start_java_mehod): Now call complete_start_java_method.
21293 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21294 (expand_invoke): Likewise and fixed typo.
21295 *gjava.c: (print_super_field): Use new argument to find_class
21296 DO_CLASS_FILE.
21297 (main): Likewise.
21298 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21299 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21300 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21301 IDENTIFIER_NODE.
21302 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21303 (add_method_1, push_class): New prototypes.
21304 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21305 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21306 directory where the class was found.
21307 (find_class): New argument DO_CLASS_FILE. Function find_class
21308 modified accordingly.
21309 *jcf-parse.c: (fix_class_path): New function.
21310 (load_class): Use new VERBOSE argument. load_class now finds and
21311 loads/parses .class/.java files. Save read_state of current_jcf
21312 if necessary.
21313 (java_parser_abort_on_error): New macro.
21314 (jcf_parse_source, parse_source_file): New function.
21315 (jcf_parse): Fixed typo.
21316 (yyparse): Call parse_source_file () only.
21317 (process_zip_dir): Fixed typo, fix zdir->filename_length when
21318 writing the real class name back in the zip directory entry.
21319 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21320 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21321 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21322 (find_class): Prototype fixed.
21323 *lex.c: Added 1998 time stamp.
21324 Removed all static global variables, moved into the parser
21325 context data structure.. Now include unistd.h if SEEK_SET not
21326 defined.
21327 (java_init_lex): Rewritten.
21328 (java_sneak_unicode): Modified current unicode access in current line.
21329 (java_unget_unicode): Likewise.
21330 (java_allocate_new_line): New allocation management.
21331 (java_read_char): Modified access and storage of unget_utf8_value.
21332 New way of processing current unicode.
21333 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21334 (java_get_unicode): Now use the parser context.
21335 (java_lineterminator): Likewise.
21336 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21337 of the reentrant parser implementation. Function now use the
21338 parser context data structure and java_lval. Fixed production of
21339 the float and double constant "out of range" error message. Fixed
21340 obstack use. Return integer value when hitting a modifier. Now
21341 return type for TRUE, FALSE and other predefined types. Return
21342 identifier as a TREE_LIST list containing the current line context
21343 as the TREE_VALUE sub-node.
21344 (java_unicode_2_utf8): Fixed typo in declaration.
21345 (java_lex_error): Now use the parser context data structure.
21346 *lex.h: Added 1998 time stamp.
21347 (struct java_line): New fields ref_count and next.
21348 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21349 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21350 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21351 *parse.h: Added 1998 time stamp.
21352 (java_parse_source_file): Renamed from parse_source_file.
21353 (YYERROR_NOW, YYNOT_TWICE): Fixed.
21354 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21355 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21356 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21357 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21358 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21359 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21360 (struct parser_ctxt): New data structure to keep the parser context.
21361 *parse.y: Added 1998 time stamp, got rid of static global variables.
21362 (java_error_count, ctxp): New global variables.
21363 (%union): New value field.
21364 (numeric_type, integral_type): Rules removed.
21365 (primitive_type): Rule defined to handle integral, float, double and
21366 boolean types.
21367 (qualified_name, package_declaration,
21368 single_type_import_declaration, type_import_on_demand_declaration,
21369 modifiers, class_declaration, super, interfaces,
21370 interface_type_list, class_body, field_declaration,
21371 field_declaration, variable_declarators, variable_declarator,
21372 variable_declarator_id, method_declaration, method_header,
21373 formal_parameter_list, formal_parameter, method_body, block,
21374 static, interface_declaration, extends_interfaces,
21375 abstract_method_declaration, local_variable_declarators): Rules now
21376 define actions.
21377 (force_error, do_warning): New global statics.
21378 (push_parser_context, parser_context_save_global,
21379 parser_context_restore_global, pop_parser_context): New functions.
21380 (yyerror): Now uses the global parser context. Fixed use of obstack.
21381 (parse_error, parse_error_context, parse_warning_context,
21382 java_accstring_lookup, redefinition_error, check_modifiers,
21383 parser_add_interface, create_interface, create_class, find_field,
21384 duplicate_declaration_error, register_fields, method_header,
21385 check_modifiers_consistency, check_abstract_method_header,
21386 method_declarator, parser_qualified_classname,
21387 parser_check_super_interface, parser_check_super,
21388 parser_chain_incomplete_item, java_check_circular_reference,
21389 layout_class_from_source, java_complete_class,
21390 complete_method_decl, resolve_class, complete_class_report_errors,
21391 java_check_final, check_method_redefinition,
21392 java_check_regular_methods, java_check_abstract_methods,
21393 java_check_methods, lookup_java_interface_method2,
21394 lookup_java_method2, lookup_cl, find_name_in_single_imports,
21395 process_imports, find_in_imports, read_import_entry,
21396 read_import_dir, find_in_imports_on_demand,
21397 check_pkg_class_access, not_builtin_p, declare_local_variables,
21398 source_start_java_method, java_generate_parsed_class): New
21399 functions.
21400 *typeck.c: (signature_include_return): New global variable.
21401 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21402 to add the function returned type in the signature.
21403
21404 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
21405
21406 * jcf-io.c (open_in_zip): Use strncmp and LEN.
21407
21408 1998-01-29 Dave Brolley <brolley@cygnus.com>
21409
21410 * Make-lang.in (java.info): Added.
21411 (java.install-info): Added
21412
21413 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
21414
21415 * Makefile.in (clean): Also remove java/parse.c.
21416
21417 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
21418
21419 Add a pair of -fbounds-check/-fno-bounds-check options.
21420 * lang.c (lang_decode_option): Add code to grok arguments.
21421 (flag_bounds_check): Add decl.
21422 (lang_f_options): New array w/ the option in it.
21423 * java-tree.h (flag_bounds_check): Add decl.
21424 * lang-options.h: New file.
21425 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21426 of a static macro value.
21427 (JAVA_ARRAY_EXCEPTION): Delete macro.
21428
21429 1998-01-23 Per Bothner <bothner@cygnus.com>
21430
21431 * typeck.c (build_java_array_type): Fix two bugs in previous change.
21432 * expr.c (build_anewarray): Add missing promote_type.
21433
21434 1998-01-22 Per Bothner <bothner@cygnus.com>
21435
21436 Add array types with known length to optimize bounds checking.
21437 * typeck.c (build_java_array_type): Take length parameter.
21438 (java_array_type_length, build_prim_array_type): New functions.
21439 * java-tree.h: Update for new functions.
21440 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21441 * class.c: Use build_prim_array_type.
21442 * expr.c (can_widen_reference_to): Handle known-length array types.
21443 (verify_jvm_instructions): Keep track of integer push instructions
21444 followed by newarray/anewarray, so we can build known-length arrays.
21445 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
21446 (java_array_data_offset): New function.
21447 (build_java_array_length_access): New function. Optimize if constant.
21448 (build_java_arrayaccess): Constant fold bounds check.
21449 (expand_java_newarray, expand_java_anewarray): Replaced by ...
21450 (build_newarray, build_anewarray): New functions.
21451 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
21452 * verify.c (merge_types): Handle known-lengh array types.
21453
21454 1998-01-19 Per Bothner <bothner@cygnus.com>
21455
21456 * expr.c (expand_byte_code): Fix performace bug, which caused
21457 searching linenumber_table to be linear rather than constant.
21458
21459 1997-12-12 Per Bothner <bothner@cygnus.com>
21460
21461 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
21462
21463 * decl.c, java-tree.h (soft_fmod_node): New global.
21464 * decl.c (init_decl_processing): Define __builtin_fmod.
21465 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
21466 using __builtin_fmod.
21467
21468 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
21469
21470 * keyword.h: New file, output of keyword.gperf as processed by
21471 gperf.
21472 * lex.c (java_lex_init): Initialize java_error_flag.
21473 * parse.c (YYERROR_NOW): Uses java_error_flag.
21474 * parse.y: New static java_error_flag. Useless definition of
21475 buffer_error gone.
21476 * parse.y (java_error): Portable error recovery using
21477 java_error_flag (not yet completely tuned).
21478
21479 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
21480
21481 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21482
21483 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
21484
21485 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21486 (parse.c, lex.c, keyword.h): New rules for Java source code
21487 front-end.
21488 * parse.c: Renamed into jcf-parse.c.
21489 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21490 * keyword.gperf: New file, Java keywords.
21491 * parse.y: New file, Java language grammar.
21492 * parse.h: New file, Java language grammar definitions.
21493 * lex.c: New file, Java language lexer.
21494 * lex.h: New file, Java language lexer definitions.
21495
21496 1997-12-03 Per Bothner <bothner@cygnus.com>
21497
21498 * decl.c (clinit_identifier_node), java-tree.h: New global.
21499 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
21500 * verify.c (verify_jvm_instructions): Inline use of removed macros.
21501 * expr.c (expand_java_field_op): Check for invalid assignment
21502 to final field.
21503
21504 * jcf-reader.c (get_attribute): Test for wrong attribute length.
21505
21506 1997-10-27 Per Bothner <bothner@cygnus.com>
21507
21508 * verify.c (verify_jvm_instructions): When processing a handler,
21509 attempt to set the current_subr to the right value.
21510 (More complicated code combines Sep 17 and Oct 22 versions.)
21511
21512 1997-10-24 Per Bothner <bothner@cygnus.com>
21513
21514 * class.c (push_class): Figure out (guess) name of source file.
21515 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
21516 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
21517 (parse_class_file): Change return type from int to void.
21518 Call debug_start_source_file/debug_end_source_file.
21519
21520 * expr.c (build_java_binop): Fix masking 2nd operand.
21521 * decl.c (init_decl_processing): Set sizetype first.
21522
21523 1997-10-22 Per Bothner <bothner@cygnus.com>
21524
21525 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
21526 (Revert Sep 17 change.)
21527
21528 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
21529
21530 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21531 .class extension in their name and fix thing so we don't process
21532 them parse_zip_file_entries().
21533 (parse_zip_file_entries): Cleaned unused local variables.
21534
21535 1997-10-20 Per Bothner <bothner@cygnus.com>
21536
21537 * expr.c (can_widen_reference_to): Allows equal array element types.
21538 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
21539 * jcf-dump.c (RET): Get (and print) index.
21540
21541 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21542 Promote element type to POINTER_TYPE.
21543
21544 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
21545
21546 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21547 find_in_current_zip, jcf_figure_file_type): Moved from
21548 jcf-reader.c to parse.c.
21549 * zextract.c: (read_zip_archive): takes file_comment_length possible
21550 field into account.
21551
21552 1997-10-20 Per Bothner <bothner@cygnus.com>
21553
21554 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
21555
21556 * verify.c (merge_types): Handle array types even better ...
21557
21558 1997-10-17 Per Bothner <bothner@cygnus.com>
21559
21560 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
21561
21562 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
21563 * class.c (make_class_data): Don't build fields_decl if no fields.
21564 When building fields_decl, skip if DECL_ARTIFICIAL.
21565
21566 * expr.c (java_stack_swap): Update stack_type_map.
21567 * verify.c (merge_types): Handle array types better.
21568
21569 1997-10-15 Per Bothner <bothner@cygnus.com>
21570
21571 * class.c (add_field): Don't promote short integral fields to
21572 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21573 * expr.c (push_value): Promote and convert short integral values.
21574
21575 * decl.c, java-tree.h (integer_two_node): New constant node.
21576 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
21577
21578 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21579
21580 * class.c (append_gpp_mangled_type): Use function argument
21581 unpromoted type to generate mangled name.
21582
21583 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
21584
21585 * constants.c (build_constant_data_ref): Now uses current_class
21586 instead of main_class.
21587 (build_constants_constructor): Now uses current_class instead of
21588 main_class.
21589 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21590 of the global variable SeepZipFiles done here.
21591 * zextract.c (read_zip_archive): extra_field optional field taken
21592 into account while computing the position of the class file in the
21593 archive.
21594 * verify.c (verify_jvm_instructions): Use current_jcf to search
21595 the constant pool.
21596 * parse.c (load_class): First search for the class to load in the
21597 current zip file. Saves current_jcf (restored before returning
21598 from that function). Don't call JCF_FINISH in the class was found
21599 in the current ZIP file.
21600 (jcf_parse): If the class was found in the current ZIP file, save
21601 its tree_constant_pool (for later reuse).
21602 (parse_class_file): New function. Process each method defined in
21603 the current class and record the class as to be later registered.
21604 (yyparse): Rewritten. Figure the type of the current file and switch
21605 accordingly.
21606 * lang.c: New global variable current_jcf.
21607 (lang_init): Removed compiling_from_source test (done later, in
21608 yyparse). Removed call the jcf_parse ().
21609 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21610 (typedef struct JCF): New fields seen_in_zip (to mark a class found
21611 in the current ZIP file) and zip_offset (offset to the class data in
21612 the current zip file).
21613 * jcf-reader.c: zipfile.h included.
21614 localToFile: New ZipFileCache static global variable
21615 (parse_zip_file_entries): New function. Browse the current ZIP
21616 file directory and process each class found.
21617 (process_zip_dir): New function. Register each class found in the
21618 ZIP file directory. The class aren't parsed but a valid JCF is
21619 link to each of them.
21620 (find_in_current_zip): New function. Search for a class in the
21621 current ZIP file directory. If found, prepare the class so that it
21622 can be loaded.
21623 (jcf_figure_file_type): New function. Examine the file structure
21624 to figure a class file, a ZIP file. If none of these categories are
21625 matched, a source file is assumed.
21626 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21627 SeenZipFile: New global variable.
21628 (open_in_zip): Use zipmember's length to accelerate the search for
21629 a member. If zipmember was NULL and zip file successfully read,
21630 return 0.
21631 * java-tree.h: New global variable current_jcf declared. Added
21632 declaration for current_constant_pool_tags, current_constant_pool_data,
21633 current_constant_pool_length, current_constant_pool_data_ref.
21634 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21635 store the JCF of classes seen in a zip file) and tree *constant_pool
21636 (to save a loaded class constant pool). current_class declared here.
21637 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21638 retrieve method_ref_constant.
21639 (PUSHC): java_push_constant_from_pool now uses current_jcf.
21640 (OBJECT): get_class_constant now uses current_jcf.
21641 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21642 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21643 (expand_invoke): Now uses current_class instead of main_class
21644 (build_class_init): Now uses current_class instead of main_class
21645 * class.c: New static global variable registered_class.
21646 (register_class): New function.
21647 (emit_register_class): Modified to use registered_class instead of
21648 main_class
21649 (is_compiled_class): Now take into account class seen in the archive.
21650
21651 1997-10-06 Per Bothner <bothner@cygnus.com>
21652
21653 * except.h: Renamed to: java-except.h.
21654 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
21655 * except.c: Add semi-working (commented out) implementation.
21656
21657 * expr.c (expand_iinc): Add needed flush_quick_stack.
21658 * parse.c (set_source_filename): New function.
21659 (give_name_to_class): Set input_filename from package.classname.java.
21660
21661 * jcf-io.c (find_class): Don't look first in ".".
21662
21663 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21664
21665 * zextract.c (read_zip_archive): Now takes into account the
21666 extra_field field.
21667 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21668
21669 1997-09-20 Per Bothner <bothner@cygnus.com>
21670
21671 * constants.c, java-tree.h (build_internal_class_name): New function.
21672 (alloc_class_constant): Re-implement using build_internal_class_name.
21673 * class.c (make_class_data): Likewise.
21674 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
21675
21676 1997-09-17 Per Bothner <bothner@cygnus.com>
21677
21678 * verify.c (verify_jvm_instructions): Temporarily set current_subr
21679 to NULL before pushing an exception handler target.
21680
21681 * expr.c (flush_quick_stack): Save from low stack indexes to high.
21682 (java_stack_swap, java_stack_dup): Re-write to be safe from
21683 clobbering registers.
21684 (build_class_init): New function.
21685
21686 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
21687
21688 * typeck.c (build_java_array_type): Temporary use
21689 permanent_obstack to create the array 'length' field.
21690 * expr.c (lookup_label): Temporay use permanent_obstack to create
21691 label if not found.
21692 * class.c (push_super_field): Tempory use permanent_obstack.
21693
21694 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21695
21696 * typeck.c (type_for_mode): Now handles double_type_node and
21697 float_type_node.
21698 * verify.c (verify_jvm_instructions): The instruction following
21699 the wide bytecode is checked. OPCODE_ret added to the list of
21700 wide.
21701
21702 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21703
21704 * class.c (make_class): Temporary use permanent_obstack. Set the
21705 class CLASS_P field to 1.
21706 (push_class): Temporary use permanent_obstack.
21707 (set_super_info): Temporary use permanent_obstack.
21708 (add_method): Temporary use permanent_obstack, set
21709 METHOD_TRANSIENT().
21710 (add_field): Temporary use permanent_obstack. Sets
21711 FIELD_VOLATILE() and FIELD_TRANSIENT().
21712 (build_class_ref): Temporary use permanent_obstack if the class
21713 isn't compiled.
21714 (build_static_field_ref): Temporary use permanent_obstack when
21715 creating field's rtl.
21716 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21717 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21718 and fields. Function finalized, as far as flag handling.
21719 (push_class_static_dummy_field): Temporary use permanent_obstack.
21720 (emit_register_class): Force generation of class registration at
21721 -O3 or deeper.
21722 * decl.c (end_java_method): Call permanent_allocation() before
21723 returning.
21724 * expr.c (can_widen_reference_to): Added comment to interface
21725 handling, fixed typo.
21726 (lookup_field): Now uses CLASS_P() to correct FIXME
21727 (expand_invoke): Verification on public && !static &&
21728 !abstract moved into soft_lookupinterfacemethod (kaffe).
21729 Use Object class dtable if objectref is an array when expanding
21730 invokeinterface.
21731 (java_push_constant_from_pool): Temporary use permanent_obstack
21732 for CONSTANT_string
21733 * parse.c (get_ref_constant): Temporary use permanent_obstack to
21734 create constant references.
21735 (get_constant): Temporary use permanent_obstack to create constant.
21736 (load_class): Temporary use permanent_obstack to load class.
21737 (jcf_parse): Temporary use permanent_obstack to perform class
21738 layout.
21739 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21740 (build_java_signature): Temporary use permanent_obstack.
21741 * verify.c: (verify_jvm_instruction): removed unnecessary verification
21742 on ACC_SUPER flag.
21743 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21744 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21745 (CLASS_P): Defined
21746
21747 1997-09-11 Per Bothner <bothner@cygnus.com>
21748
21749 * class.c (append_gpp_mangled_type): Fix typo.
21750 (emit_register_class): Use main_class to get class object, rather
21751 than looking for no-longer-existing static decl starting with _CL.
21752 * typeck.c (parse_signature_type): Promote array element type
21753 if it is a RECORD_TYPE.
21754
21755 1997-09-10 Per Bothner <bothner@cygnus.com>
21756
21757 * class.c (push_class_static_dummy_field): New function.
21758 (mangle_static_field): New. Do G++-style mangling of static fields.
21759 (layout_class): Mandle static fields here, not in add_field.
21760 (build_class_ref): The class object is now a dummy static field.
21761 * decl.c (find_local_variable): Look for best, instead of first match.
21762 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
21763 (build_java_athrow): Don't check here if exception is Throwable.
21764 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
21765 (TYPE_USED): Removed. No longer used ...
21766 * parse.c (jcf_parse): Call push_class_static_dummy_field.
21767 * verify.c (push_pending_label): New function.
21768 (push_pending_block): Renamed to check_pending_block.
21769 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
21770 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
21771 re-checking possible handlers) after a store (less wasted work).
21772 Check for null handler (finally) before calling add_handler.
21773 Various changes to (finally?) correctly handle try/finally.
21774
21775 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
21776
21777 * class.c: Include stdio.h.
21778
21779 1997-09-04 Per Bothner <bothner@cygnus.com>
21780
21781 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
21782 to make sure class is initialized before static/special invoke.
21783
21784 * verify.c (verify_jvm_instructions): On a store instruction,
21785 call find_local_variable to force pre-allocation of decl and rtx.
21786 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
21787
21788 1997-09-03 Per Bothner <bothner@cygnus.com>
21789
21790 * class.c (build_class_ref): Strip off "promoted_" if need be.
21791 (make_field_value): Call build_java_signature when needed.
21792 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
21793 * expr.c (build_java_athrow): Don't push_value of exception.
21794 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21795 match specification of [fd]cmp[lg] for NaNs.
21796 (expand_byte_code): Add support for exception handler ranges.
21797 * except.c: Add skeleton for EH code-generation.
21798 * verify.c (merge_types): Treat all promoted integral types as equal.
21799 * constants.c (build_constants_constructor): To force creation of
21800 current_constant_pool_data_ref, call build_constant_data_ref.
21801
21802 * javaop.def (lload): Fix typo.
21803 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
21804
21805 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
21806
21807 * parse.c: Don't include function.h.
21808
21809 1997-08-27 Per Bothner <bothner@cygnus.com>
21810
21811 * except.[ch]: New files.
21812 * Makefile.in (JAVA_OBJS): Add except.o
21813 * expr.c: Temporary warning about unimplemented exceptions.
21814 * verify.c: Verify exception handlers.
21815
21816 * jcf-dump.c (disassemble_method): Print exception table.
21817
21818 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21819
21820 * expr.c (verify_jvm_instructions): Started a thorough
21821 verification of invoke* bytecodes.
21822 (expand_byte_code): flush quick stack if PC is the target of a
21823 branch. and undef RET (conflicting with config/i386/i386.h).
21824 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
21825 used.
21826 (expand_invoke): Now handles invokeinterface and do more
21827 verification according to the bytecode.
21828 (lookup_field): Don't try to load the class if processing
21829 dtable_type.
21830 (can_widen_reference_to): Now handles interfaces.
21831 * decl.c (init_decl_processing): New global variable
21832 soft_lookupinterfacemethod_node, declared in java-tree.h.
21833 Call set_super_info on string_type_node.
21834 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21835 defined.
21836 * class.c (set_super_info): Fills the CLASS_* flags according to
21837 access_flags.
21838 (get_access_flags_from_decl): Handles all class flags.
21839
21840 1997-08-26 Per Bothner <bothner@cygnus.com>
21841
21842 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
21843 * parse.c (yyparse): Check for abstract method, and missing code.
21844 * expr.c (expand_byte_code): Change interface.
21845 * lang.c (put_decl_node): Print promoted types prettier.
21846 * verify.c (verify_jvm_instruction): Change interface.
21847 Partial support for scanning exception table.
21848 For load instructions, handle promoted integral types.
21849
21850 1997-08-21 Per Bothner <bothner@cygnus.com>
21851
21852 * verify.c: New file, with contents moved from expr.c.
21853 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
21854 * typeck.c (is_array_type_p): Moved here from expr.c.
21855 * java-tree.h: Add some now-needed function declarations.
21856 * Makefile.in (JAVA_OBJS): Added verify.o.
21857
21858 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
21859
21860 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
21861 METHOD_ABSTRACT flag.
21862
21863 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
21864 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
21865 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
21866
21867 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
21868 variables.
21869 (start_java_method): Hook for SYNCHRONIZED methods.
21870
21871 * expr.c (build_java_jsr, build_java_ret): New functions
21872 (JSR,PRE): New macros
21873 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
21874 (verify_jvm_instructions): tableswitch, lookupswitch,
21875 monitorenter, monitorexit, goto_w: verified.
21876 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
21877 (build_java_monitor): New function.
21878 (MONITOR_OPERATION): Modified to call build_java_monitor()
21879 (verify_jvm_instructions): Started a thorough verification of
21880 invoke* bytecodes.
21881
21882 1997-08-19 Per Bothner <bothner@cygnus.com>
21883
21884 Support verification of jsr/ret subroutines (used for try/finally).
21885 * decl.c (return_address_type_node): New type node.
21886 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
21887 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
21888 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
21889 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
21890 TYPE_USED): New macros for special types in type_map.
21891
21892 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
21893 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
21894 BCODE_JUMP_TARGET.
21895 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
21896
21897 * expr.c (can_widen_reference_to): New function.
21898 (pop_type): Use it.
21899 (merge_type_state): Support handling start of subroutine.
21900 (push_pending_block): Return char* error message, instead of calling
21901 fatal on an error. Also handle subroutines.
21902 (verify_jvm_instructions): Handle errors from push_poending_block.
21903 Support jsr and ret instructions.
21904
21905 1997-08-19 Per Bothner <bothner@cygnus.com>
21906
21907 * jcf-io.c (find_classfile): Fix thinko.
21908 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
21909
21910 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
21911
21912 * Makefile.in (BISON): Remove.
21913
21914 1997-08-07 Per Bothner <bothner@cygnus.com>
21915
21916 * Makefile.in: Convert to autoconf.
21917 * config-lang.in (outputs): Added java/Makefile.
21918
21919 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
21920 Rename cc1java to jc1.
21921
21922 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
21923 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
21924
21925 * class.c (class_depth): Do load_class if needed.
21926
21927 Mostly better verification.
21928 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
21929 (init_decl_processing): Change return type of soft_checkcast.
21930 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
21931 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21932 lang_print_error): New functions.
21933 (lang_init): Set global hook print_error_function to lang_print_error.
21934 * expr.c: In the type_map ptr_type_node is only used for null now.
21935 (pop_type, merge_types): Hence ptr_type_node matches any reference.
21936 (merge_types): Dererence pointer to record types before comparing.
21937 (decode_newarray_type, merge_types): On error just return NULL.
21938 (build_java_binop): Add preliminary implementation (with warning)
21939 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21940 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
21941 (expand_compare, expand_java_goto, expand_java_call): Don't
21942 push_pending_block, since that only makes sense when verifying.
21943 (merge_type_state): Different return codes.
21944 (push_pending_block): A block may need to be verified more than once.
21945 (expand_byte_code): Warn about unused code at code generation time.
21946 (verify_jvm_instruction): Changed logic, since code may need to be
21947 re-verified if type-state has changed. Also, better error handling.
21948 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21949 Improve newarray, anewarray, ?aload, athrow,
21950 * java-tree.h (LABEL_CHANGED): New macro.
21951
21952 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
21953
21954 * decl.c (soft_athrow_node): New global variable initialized.
21955 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21956 * typeck.c (convert): Added support for REAL_TYPE.
21957 (convert_to_char): New function.
21958 (convert): Handle CHAR_TYPE.
21959 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21960 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21961 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21962 promoted type.
21963 (verify_jvm_instructions): Added break a the end of bogus unop: label.
21964 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21965 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21966 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21967 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21968 to Use The Right Things.
21969 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
21970 compatible with INT. BOOLEAN is made equivalent to BYTE.
21971 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
21972 OPCODE_ifnonnull): Now supported.
21973 (build_java_athrow): New function.
21974
21975 1997-08-04 Per Bothner <bothner@cygnus.com>
21976
21977 Rename method name <init> to match G++ (and fix mangling).
21978 * class.c (layout_class): Replace method name of <init> by class name.
21979 (make_method_value): Do inverse renaming of constructor from <init>.
21980 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
21981 * typeck.c (lookup_java_constructor): New function.
21982 * expr.c (expand_invoke): If method_name is <init>, call
21983 lookup_java_constructor to find constructor.
21984
21985 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
21986
21987 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21988
21989 * parse.c (get_class_constant): Modified to handle array "classes"
21990 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21991 wide type.
21992 (convert): Modified to handle real type.
21993 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21994 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21995 variables declared.
21996 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21997 soft_multianewarray, soft_newarray_node, soft_throw_node): New
21998 global variables initialized.
21999 (find_local_variable): Handles the case of a pointer
22000 (end_java_method): Restore the use of one more scope
22001 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22002 build_java_array_length_access, expand_java_arrayload,
22003 expand_java_arraystore, expand_java_array_length,
22004 expand_java_multianewarray, expand_java_anewarray,
22005 build_java_check_indexed_type, is_array_type_p,
22006 build_java_throw_out_of_bound_exception): New functions.
22007 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22008 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22009 OPCODE_<t>aload): Implemented code for verification.
22010 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22011 ARRAY_NEW_MULTI): Macro defined.
22012 (CONVERT): Modified to invoke convert().
22013 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22014
22015 1997-07-31 Per Bothner <bothner@cygnus.com>
22016
22017 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22018 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22019 (make_class_data): Field name needs '/' as package prefix.
22020 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22021
22022 1997-07-25 Per Bothner <bothner@cygnus.com>
22023
22024 Implement debug information for local variables.
22025 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22026 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22027 DECL_LOCAL_SLOT_CHAIN): New macros.
22028 (struct lang_decl_var): New type.
22029 * parse.c (give_name_to_locals): Move to decl.c.
22030 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22031 (start_java_method): Re-write parameter handling.
22032 (pending_local_decls): New global variable.
22033 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22034 (find_local_variable): Accept pc so we can skips decls not in range.
22035 (struct binding_level): Add end_pc field.
22036 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22037 (various): Change so current pc gets passed to find_local_variable.
22038
22039 * decl.c (init_decl_processing): Re-arrange fields in
22040 class_type_node and and method_type_node to match kaffe 0.9.1.
22041 * class.c (make_method_value, make_class_data): Update
22042 initializations to match.
22043
22044 1997-07-16 Per Bothner <bothner@cygnus.com>
22045
22046 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22047 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22048 (push_super_field): New function.
22049 (make_class_data): Handle inheritance of class static initializer.
22050 (layout_class): New name mangling.
22051 * constants.c (build_constant_data_ref): Init type of data array
22052 to a one-element array.
22053 (build_constants_constructor): Set DECL_SIZE from complete array type.
22054 * decl.c: Rename class_type, object_type etc to class_type_node,
22055 object_type_node etc. Make former inherit from latter.
22056 * expr.c (expand_invoke): Add cast of function address.
22057 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22058 * parse.c (yyparse): Don't call layout_class here.
22059 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22060
22061 1997-06-14 Per Bothner <bothner@cygnus.com>
22062
22063 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22064 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22065 (alloc_class_constant): New.
22066 * expr.c (expand_invoke): Make sure method's class is initialized.
22067 * class.c (interits_from_p, emit_register_class): New functions.
22068 * parse.c (yyparse): Call emit_register_class.
22069
22070 1997-06-09 Per Bothner <bothner@cygnus.com>
22071
22072 * constants.c: New file, to handle constant pool.
22073 * Makefile.in (JAVA_OBJS): Add constants.o.
22074 * decl.c (init_decl_processing): Update, fix, finish various structs.
22075 (pushdecl_top_level): New.
22076 * parse.c (layout_class): Moved to class.c.
22077 * expr.c (java_push_constant_from_pool): New function.
22078 * class.c (build_class_ref): Make work fully
22079 (make_class_data): Emit super-class, constant pool, interface vector.
22080
22081 1997-06-03 Per Bothner <bothner@cygnus.com>
22082
22083 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22084 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22085 * class.c (class_depth): New function.
22086 (lookup_named_class): Replaced by new function lookup_class.
22087 * decl.c (object_type_node, string_type_node): New.
22088 Remove various types that we no longer need.
22089 * expr.c (verify_jvm_instructions): New separate verifier pass.
22090 (push_type, pop_type): New functions for verifier.
22091 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22092 (expand_byte_code): Simplify, since we assume already verified.
22093 (expand_invoke): Now mostly works.
22094 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22095 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22096 * parse.c: Wait to allocate class object until we know its name.
22097 (layout_class): Calculate DECL_VINDEX for each virtual method.
22098 * typeck.c (get_array_type): Rename to ...
22099 (build_java_array_type): ... and provide working implementation.
22100 (build_java_signature): New function - build Java signature of type.
22101 (set_java_signature): New function - cache signature with type.
22102 (lookup_java_method): New function.
22103
22104 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
22105
22106 * class.c (ident_subst): Take extra SUFFIX parameter.
22107 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22108 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22109 (build_class_ref): Actually implement.
22110 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22111 * decl.c (builtin_function): New.
22112 (init_decl_processing): Update for current Kaffe. Declare some
22113 builtin Kaffe functions.
22114 * expr.c (build_address_of): New.
22115 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22116 Renamed (from expand_java_new etc), and added working implementations.
22117 (build_field_ref): Now also handle static fields.
22118 (expand_invoke): Implement invokestatic, and start implement rest.
22119 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22120 * javaop.def: Rename invokevirt -> invokevirtual.
22121 * lang.c (use_handles): Removed.
22122 * parse.c: Add support for ConstantValue attribute.
22123 Handle nested loading of a class. (JPOOL_UTF): New.
22124
22125 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
22126
22127 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22128
22129 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
22130
22131 * Make-lang.in (java.install-man): New empty rule.
22132 * typeck.c (set_local_type): New function.
22133 * expr.c (STORE_INTERNAL): Call find_local_variable,
22134 not find_stack_slot. Call set_local_type.
22135
22136 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
22137
22138 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22139 and building RECORD_TYPE CONSTRUCTORs.
22140 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22141
22142 * lang.c (use_handles): Change the default to 0.
22143 * decl.c: Define and build class_type, field_type, utf8const_type.
22144 * class.c (make_class_data, make_field_value,
22145 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22146 hashUtf8String, strLengthUtf8, mangled_classname:
22147 Functions to build reflective data structures.
22148 * parse.c (yyparse): Call make_class_data.
22149
22150 * jcf-io.c (open_class, find_classfile): New functions.
22151 * jcf-dump.c: Support reading classfile from explicitly-named
22152 class file (without CLASSPATH searching).
22153
22154 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22155
22156 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22157 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22158 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22159 (get_constant): Now trivial for CONSTANT_Utf8.
22160
22161 * jcf.h: Make NEW_CPOOL the default.
22162 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
22163
22164 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22165
22166 New directory.
22167
22168 \f
22169 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22170 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
22171
22172 Copying and distribution of this file, with or without modification,
22173 are permitted in any medium without royalty provided the copyright
22174 notice and this notice are preserved.